From 8cd2e14d3a4aa883651608b0406b45daf1baf0bb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Oct 2026 21:14:05 +0000 Subject: [PATCH 1/2] Bump the bundler group across 1 directory with 10 updates Bumps the bundler group with 10 updates in the / directory: | Package | From | To | | --- | --- | --- | | [irb](https://github.com/ruby/irb) | `1.15.1` | `1.18.0` | | [rake](https://github.com/ruby/rake) | `13.2.1` | `13.4.2` | | [rubocop](https://github.com/rubocop/rubocop) | `1.88.1` | `1.91.0` | | [rubocop-performance](https://github.com/rubocop/rubocop-performance) | `1.24.0` | `1.27.0` | | [rubocop-sorbet](https://github.com/shopify/rubocop-sorbet) | `0.9.0` | `0.16.0` | | [sorbet](https://github.com/sorbet/sorbet) | `0.5.11953` | `0.6.13528` | | [tapioca](https://github.com/Shopify/tapioca) | `0.16.11` | `0.20.0` | | [packwerk](https://github.com/Shopify/packwerk) | `3.2.2` | `3.3.1` | | [sorbet-runtime](https://github.com/sorbet/sorbet) | `0.5.11953` | `0.6.13528` | | [thor](https://github.com/rails/thor) | `1.3.2` | `1.5.0` | Updates `irb` from 1.15.1 to 1.18.0 - [Release notes](https://github.com/ruby/irb/releases) - [Commits](https://github.com/ruby/irb/compare/v1.15.1...v1.18.0) Updates `rake` from 13.2.1 to 13.4.2 - [Release notes](https://github.com/ruby/rake/releases) - [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc) - [Commits](https://github.com/ruby/rake/compare/v13.2.1...v13.4.2) Updates `rubocop` from 1.88.1 to 1.91.0 - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.88.1...v1.91.0) Updates `rubocop-performance` from 1.24.0 to 1.27.0 - [Release notes](https://github.com/rubocop/rubocop-performance/releases) - [Changelog](https://github.com/rubocop/rubocop-performance/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-performance/compare/v1.24.0...v1.27.0) Updates `rubocop-sorbet` from 0.9.0 to 0.16.0 - [Release notes](https://github.com/shopify/rubocop-sorbet/releases) - [Commits](https://github.com/shopify/rubocop-sorbet/compare/v0.9.0...v0.16.0) Updates `sorbet` from 0.5.11953 to 0.6.13528 - [Release notes](https://github.com/sorbet/sorbet/releases) - [Commits](https://github.com/sorbet/sorbet/commits) Updates `tapioca` from 0.16.11 to 0.20.0 - [Release notes](https://github.com/Shopify/tapioca/releases) - [Commits](https://github.com/Shopify/tapioca/compare/v0.16.11...v0.20.0) Updates `packwerk` from 3.2.2 to 3.3.1 - [Release notes](https://github.com/Shopify/packwerk/releases) - [Commits](https://github.com/Shopify/packwerk/compare/v3.2.2...v3.3.1) Updates `sorbet-runtime` from 0.5.11953 to 0.6.13528 - [Release notes](https://github.com/sorbet/sorbet/releases) - [Commits](https://github.com/sorbet/sorbet/commits) Updates `thor` from 1.3.2 to 1.5.0 - [Release notes](https://github.com/rails/thor/releases) - [Commits](https://github.com/rails/thor/compare/v1.3.2...v1.5.0) --- updated-dependencies: - dependency-name: irb dependency-version: 1.18.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: bundler - dependency-name: rake dependency-version: 13.4.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: bundler - dependency-name: rubocop dependency-version: 1.91.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: bundler - dependency-name: rubocop-performance dependency-version: 1.27.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: bundler - dependency-name: rubocop-sorbet dependency-version: 0.16.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: bundler - dependency-name: sorbet dependency-version: 0.6.13528 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: bundler - dependency-name: tapioca dependency-version: 0.20.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: bundler - dependency-name: packwerk dependency-version: 3.3.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: bundler - dependency-name: sorbet-runtime dependency-version: 0.6.13528 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: bundler - dependency-name: thor dependency-version: 1.5.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: bundler ... Signed-off-by: dependabot[bot] --- Gemfile | 8 +-- Gemfile.lock | 170 +++++++++++++++++++++++++++------------------------ 2 files changed, 94 insertions(+), 84 deletions(-) diff --git a/Gemfile b/Gemfile index e00e263..de5a681 100644 --- a/Gemfile +++ b/Gemfile @@ -10,12 +10,12 @@ gem 'pry' gem 'packs-specification' -gem 'rake', '~> 13.0' +gem 'rake', '~> 13.4' gem 'rspec', '~> 3.13' -gem 'rubocop', '~> 1.74' -gem 'rubocop-performance', '~> 1.24' -gem 'rubocop-sorbet', '~> 0.9' +gem 'rubocop', '~> 1.91' +gem 'rubocop-performance', '~> 1.27' +gem 'rubocop-sorbet', '~> 0.16' gem 'sorbet' gem 'tapioca' diff --git a/Gemfile.lock b/Gemfile.lock index b3e219d..87e525f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -13,13 +13,13 @@ PATH GEM remote: https://rubygems.org/ specs: - actionview (8.1.3) - activesupport (= 8.1.3) + actionview (8.1.4) + activesupport (= 8.1.4) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activesupport (8.1.3) + activesupport (8.1.4) base64 bigdecimal concurrent-ruby (~> 1.0, >= 1.3.1) @@ -33,11 +33,11 @@ GEM tzinfo (~> 2.0, >= 2.0.5) uri (>= 0.13.1) ast (2.4.3) - base64 (0.2.0) - benchmark (0.4.0) - better_html (2.1.1) - actionview (>= 6.0) - activesupport (>= 6.0) + base64 (0.3.0) + benchmark (0.5.0) + better_html (2.2.0) + actionview (>= 7.0) + activesupport (>= 7.0) ast (~> 2.0) erubi (~> 1.4) parser (>= 2.4) @@ -45,13 +45,13 @@ GEM bigdecimal (4.1.3) builder (3.3.0) coderay (1.1.3) - concurrent-ruby (1.3.7) - connection_pool (2.5.0) - constant_resolver (0.2.0) + concurrent-ruby (1.3.8) + connection_pool (3.0.2) + constant_resolver (0.3.0) crass (1.0.7) - date (3.4.1) diff-lcs (1.6.2) - drb (2.2.1) + drb (2.2.3) + erb (6.0.7) erubi (1.13.1) herb (0.11.0-aarch64-linux-gnu) herb (0.11.0-aarch64-linux-musl) @@ -59,17 +59,18 @@ GEM herb (0.11.0-x86_64-darwin) herb (0.11.0-x86_64-linux-gnu) herb (0.11.0-x86_64-linux-musl) - i18n (1.14.7) + i18n (1.15.2) concurrent-ruby (~> 1.0) - io-console (0.8.0) - irb (1.15.1) + io-console (0.9.4) + irb (1.18.0) pp (>= 0.6.0) + prism (>= 1.3.0) rdoc (>= 4.0.0) reline (>= 0.4.2) - json (2.21.2) - language_server-protocol (3.17.0.5) + json (3.0.2) + language_server-protocol (3.17.0.6) lint_roller (1.1.0) - logger (1.6.6) + logger (1.7.0) loofah (2.25.2) crass (~> 1.0.2) nokogiri (>= 1.12.0) @@ -92,37 +93,34 @@ GEM racc (~> 1.4) packs-specification (0.0.11) sorbet-runtime - packwerk (3.2.2) + packwerk (3.3.1) activesupport (>= 6.0) ast + benchmark better_html bundler - constant_resolver (>= 0.2.0) + constant_resolver (>= 0.3) parallel parser - prism (>= 0.25.0) - sorbet-runtime (>= 0.5.9914) + prism (>= 1.4.0) zeitwerk (>= 2.6.1) - parallel (2.1.0) + parallel (2.3.0) parse_packwerk (0.28.0) bigdecimal sorbet-runtime - parser (3.3.11.1) + parser (3.3.12.0) ast (~> 2.4.1) racc - pp (0.6.2) + pp (0.6.4) prettyprint - prettyprint (0.2.0) + prettyprint (0.2.1) prism (1.9.0) pry (0.16.0) coderay (~> 1.1) method_source (~> 1.0) reline (>= 0.6.0) - psych (5.2.3) - date - stringio racc (1.8.1) - rails-dom-testing (2.2.0) + rails-dom-testing (2.3.0) activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) @@ -130,18 +128,24 @@ GEM loofah (~> 2.25, >= 2.25.2) nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) rainbow (3.1.1) - rake (13.2.1) - rbi (0.3.1) + rake (13.4.2) + rbi (0.4.3) prism (~> 1.0) - rbs (>= 3.4.4) - sorbet-runtime (>= 0.5.9204) - rbs (3.9.0) + rbs (>= 4.0.1) + rbs (4.2.0) logger - rdoc (6.12.0) - psych (>= 4.0.0) - regexp_parser (2.12.0) - reline (0.6.0) + prism (>= 1.6.0) + tsort + rdoc (8.1.0) + erb + prism (>= 1.6.0) + rbs (>= 4.0.0) + tsort + regexp_parser (2.13.1) + reline (0.7.0) io-console (~> 0.5) + require-hooks (0.5.1) + rexml (3.4.4) rspec (3.13.2) rspec-core (~> 3.13.0) rspec-expectations (~> 3.13.0) @@ -155,8 +159,8 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-support (3.13.7) - rubocop (1.88.1) - json (~> 2.3) + rubocop (1.91.0) + json (>= 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) parallel (>= 1.10) @@ -166,57 +170,63 @@ GEM rubocop-ast (>= 1.49.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.49.1) + rubocop-ast (1.50.0) parser (>= 3.3.7.2) prism (~> 1.7) - rubocop-performance (1.24.0) + rubocop-performance (1.27.0) lint_roller (~> 1.1) - rubocop (>= 1.72.1, < 2.0) - rubocop-ast (>= 1.38.0, < 2.0) - rubocop-sorbet (0.9.0) - lint_roller (~> 1.1) - rubocop (>= 1) + rubocop (>= 1.89.0, < 2.0) + rubocop-ast (>= 1.47.1, < 2.0) + rubocop-sorbet (0.16.0) + lint_roller + rbi (~> 0.4) + rubocop (>= 1.75.2) + spoom (~> 1.8) ruby-progressbar (1.13.0) + rubydex (0.4.1-aarch64-linux) + rubydex (0.4.1-arm64-darwin) + rubydex (0.4.1-x86_64-darwin) + rubydex (0.4.1-x86_64-linux) securerandom (0.4.1) smart_properties (1.17.0) - sorbet (0.5.11953) - sorbet-static (= 0.5.11953) - sorbet-runtime (0.5.11953) - sorbet-static (0.5.11953-aarch64-linux) - sorbet-static (0.5.11953-universal-darwin) - sorbet-static (0.5.11953-x86_64-linux) - sorbet-static-and-runtime (0.5.11953) - sorbet (= 0.5.11953) - sorbet-runtime (= 0.5.11953) - spoom (1.6.1) + sorbet (0.6.13528) + sorbet-static (= 0.6.13528) + sorbet-runtime (0.6.13528) + sorbet-static (0.6.13528-aarch64-linux) + sorbet-static (0.6.13528-universal-darwin) + sorbet-static (0.6.13528-x86_64-linux) + sorbet-static-and-runtime (0.6.13528) + sorbet (= 0.6.13528) + sorbet-runtime (= 0.6.13528) + spoom (1.8.10) erubi (>= 1.10.0) prism (>= 0.28.0) - rbi (>= 0.2.3) + rbi (>= 0.4.2) + rbs (>= 4.0.0.dev.5) + rexml (>= 3.2.6) sorbet-static-and-runtime (>= 0.5.10187) thor (>= 0.19.2) - stringio (3.1.5) - tapioca (0.16.11) + tapioca (0.20.0) benchmark bundler (>= 2.2.25) netrc (>= 0.11.0) parallel (>= 1.21.0) - rbi (~> 0.2) - sorbet-static-and-runtime (>= 0.5.11087) - spoom (>= 1.2.0) + rbi (>= 0.4.1) + require-hooks (>= 0.2.2) + rubydex (>= 0.1.0.beta10) + sorbet-static-and-runtime (>= 0.6.12698) + spoom (>= 1.7.16) thor (>= 1.2.0) - yard-sorbet - thor (1.3.2) + tsort + thor (1.5.0) + tsort (0.2.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (3.2.0) - unicode-emoji (~> 4.1) - unicode-emoji (4.2.0) - uri (1.1.1) - yard (0.9.44) - yard-sorbet (0.9.0) - sorbet-runtime - yard - zeitwerk (2.7.2) + unicode-display_width (3.3.0) + unicode-emoji (~> 4.3) + unicode-emoji (4.3.0) + uri (1.1.2) + zeitwerk (2.8.3) PLATFORMS aarch64-linux @@ -234,11 +244,11 @@ DEPENDENCIES packs-specification pry query_packwerk! - rake (~> 13.0) + rake (~> 13.4) rspec (~> 3.13) - rubocop (~> 1.74) - rubocop-performance (~> 1.24) - rubocop-sorbet (~> 0.9) + rubocop (~> 1.91) + rubocop-performance (~> 1.27) + rubocop-sorbet (~> 0.16) sorbet tapioca From 10bbf1abed23659f5cd61425b15ab7b0c063c0aa Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Mon, 12 Oct 2026 14:30:49 -0700 Subject: [PATCH 2/2] Fix tapioca gems under tapioca 0.20 and new Sorbet cops Tapioca 0.20 rewrites RBS comments into sigs as gems load, and herb 0.11's `def self.parse(...)` crashes the released rbi 0.4.3 parser with "Unexpected parameter node `Prism::ForwardingParameterNode`". Use rbi from main, which includes Shopify/rbi#625, until 0.4.4 is released. - Regenerate gem RBIs, excluding stdlib gems that Sorbet already bundles - Bump rubocop to 1.92 and rubocop-sorbet to 0.17.1, and drop redundant T.let on constants and ivars per the new cops - Use define_method in specs where helpers are defined in blocks --- Gemfile | 3 + Gemfile.lock | 39 +- lib/query_packwerk/file_cache.rb | 4 +- lib/query_packwerk/packages.rb | 2 +- .../rule_rewriter/anonymize_arguments_rule.rb | 2 +- lib/query_packwerk/violation.rb | 4 +- lib/query_packwerk/violations.rb | 2 +- ...ionview@8.0.2.rbi => actionview@8.1.4.rbi} | 0 ...port@8.0.2.rbi => activesupport@8.1.4.rbi} | 0 sorbet/rbi/gems/ast@2.4.3.rbi | 117 +- sorbet/rbi/gems/base64@0.2.0.rbi | 9 - sorbet/rbi/gems/benchmark@0.4.0.rbi | 618 - ...r_html@2.1.1.rbi => better_html@2.2.0.rbi} | 0 sorbet/rbi/gems/bigdecimal@3.1.9.rbi | 9 - sorbet/rbi/gems/coderay@1.1.3.rbi | 1505 +- ...by@1.3.5.rbi => concurrent-ruby@1.3.8.rbi} | 0 ...ol@2.5.0.rbi => connection_pool@3.0.2.rbi} | 0 ...@0.2.0.rbi => constant_resolver@0.3.0.rbi} | 0 .../gems/{crass@1.0.6.rbi => crass@1.0.7.rbi} | 0 sorbet/rbi/gems/date@3.4.1.rbi | 75 - ...{diff-lcs@1.6.0.rbi => diff-lcs@1.6.2.rbi} | 313 +- sorbet/rbi/gems/drb@2.2.1.rbi | 1301 - sorbet/rbi/gems/erubi@1.13.1.rbi | 56 +- sorbet/rbi/gems/herb@0.11.0.rbi | 9276 +-- .../gems/{i18n@1.14.7.rbi => i18n@1.15.2.rbi} | 0 ...console@0.8.0.rbi => io-console@0.9.4.rbi} | 0 sorbet/rbi/gems/json@2.10.2.rbi | 2112 - ... => language_server-protocol@3.17.0.6.rbi} | 0 sorbet/rbi/gems/lint_roller@1.1.0.rbi | 189 +- sorbet/rbi/gems/logger@1.6.6.rbi | 940 - .../{loofah@2.24.0.rbi => loofah@2.25.2.rbi} | 0 sorbet/rbi/gems/method_source@1.1.0.rbi | 207 +- ...minitest@5.25.5.rbi => minitest@6.0.6.rbi} | 0 sorbet/rbi/gems/netrc@0.11.0.rbi | 100 +- ...okogiri@1.18.5.rbi => nokogiri@1.19.4.rbi} | 0 ....10.rbi => packs-specification@0.0.11.rbi} | 87 +- ...{packwerk@3.2.2.rbi => packwerk@3.3.1.rbi} | 0 sorbet/rbi/gems/parallel@1.26.3.rbi | 291 - sorbet/rbi/gems/parallel@2.3.0.rbi | 332 + ...k@0.26.0.rbi => parse_packwerk@0.28.0.rbi} | 156 +- sorbet/rbi/gems/parser@3.3.12.0.rbi | 5146 ++ sorbet/rbi/gems/parser@3.3.7.2.rbi | 5532 -- sorbet/rbi/gems/pp@0.6.2.rbi | 368 - sorbet/rbi/gems/prettyprint@0.2.0.rbi | 477 - .../gems/{prism@1.4.0.rbi => prism@1.9.0.rbi} | 16857 ++-- .../gems/{pry@0.15.2.rbi => pry@0.16.0.rbi} | 6108 +- sorbet/rbi/gems/psych@5.2.3.rbi | 2435 - sorbet/rbi/gems/racc@1.8.1.rbi | 160 - ...@2.2.0.rbi => rails-dom-testing@2.3.0.rbi} | 0 ...6.2.rbi => rails-html-sanitizer@1.7.1.rbi} | 0 sorbet/rbi/gems/rainbow@3.1.1.rbi | 241 +- .../gems/{rake@13.2.1.rbi => rake@13.4.2.rbi} | 1619 +- sorbet/rbi/gems/rbi@0.3.1.rbi | 6599 -- ...f1046d18efa4d268b46df4df79efd36f15b681.rbi | 5869 ++ sorbet/rbi/gems/rbs@3.9.0.rbi | 6978 -- sorbet/rbi/gems/rbs@4.2.0.rbi | 7133 ++ sorbet/rbi/gems/rdoc@6.12.0.rbi | 12758 --- sorbet/rbi/gems/regexp_parser@2.10.0.rbi | 3795 - sorbet/rbi/gems/regexp_parser@2.13.1.rbi | 3500 + sorbet/rbi/gems/reline@0.6.0.rbi | 2451 - sorbet/rbi/gems/require-hooks@0.5.1.rbi | 152 + ...-core@3.13.3.rbi => rspec-core@3.13.6.rbi} | 7071 +- sorbet/rbi/gems/rspec-expectations@3.13.3.rbi | 8183 -- sorbet/rbi/gems/rspec-expectations@3.13.5.rbi | 6064 ++ ...ocks@3.13.2.rbi => rspec-mocks@3.13.8.rbi} | 3094 +- sorbet/rbi/gems/rspec-support@3.13.2.rbi | 1630 - sorbet/rbi/gems/rspec-support@3.13.7.rbi | 1272 + sorbet/rbi/gems/rspec@3.13.0.rbi | 83 - sorbet/rbi/gems/rspec@3.13.2.rbi | 15 + sorbet/rbi/gems/rubocop-ast@1.41.0.rbi | 7788 -- sorbet/rbi/gems/rubocop-ast@1.50.0.rbi | 7231 ++ ...4.0.rbi => rubocop-performance@1.27.0.rbi} | 1701 +- sorbet/rbi/gems/rubocop-sorbet@0.17.1.rbi | 3628 + sorbet/rbi/gems/rubocop-sorbet@0.9.0.rbi | 1873 - sorbet/rbi/gems/rubocop@1.74.0.rbi | 61403 -------------- sorbet/rbi/gems/rubocop@1.92.0.rbi | 68420 ++++++++++++++++ sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi | 984 +- sorbet/rbi/gems/rubydex@0.4.1.rbi | 1620 + sorbet/rbi/gems/securerandom@0.4.1.rbi | 75 - sorbet/rbi/gems/spoom@1.6.1.rbi | 7274 -- sorbet/rbi/gems/spoom@1.8.10.rbi | 7282 ++ sorbet/rbi/gems/stringio@3.1.5.rbi | 9 - ...tapioca@0.16.11.rbi => tapioca@0.20.0.rbi} | 2636 +- .../gems/{thor@1.3.2.rbi => thor@1.5.0.rbi} | 1968 +- ....4.rbi => unicode-display_width@3.3.0.rbi} | 72 +- ...moji@4.0.4.rbi => unicode-emoji@4.3.0.rbi} | 119 +- sorbet/rbi/gems/uri@1.0.3.rbi | 2349 - sorbet/rbi/gems/yard-sorbet@0.9.0.rbi | 435 - sorbet/rbi/gems/yard@0.9.37.rbi | 18379 ----- ...{zeitwerk@2.7.2.rbi => zeitwerk@2.8.3.rbi} | 0 sorbet/tapioca/config.yml | 49 +- spec/query_packwerk/file_cache_spec.rb | 2 +- spec/query_packwerk/query_interface_spec.rb | 2 +- 93 files changed, 142749 insertions(+), 185889 deletions(-) rename sorbet/rbi/gems/{actionview@8.0.2.rbi => actionview@8.1.4.rbi} (100%) rename sorbet/rbi/gems/{activesupport@8.0.2.rbi => activesupport@8.1.4.rbi} (100%) delete mode 100644 sorbet/rbi/gems/base64@0.2.0.rbi delete mode 100644 sorbet/rbi/gems/benchmark@0.4.0.rbi rename sorbet/rbi/gems/{better_html@2.1.1.rbi => better_html@2.2.0.rbi} (100%) delete mode 100644 sorbet/rbi/gems/bigdecimal@3.1.9.rbi rename sorbet/rbi/gems/{concurrent-ruby@1.3.5.rbi => concurrent-ruby@1.3.8.rbi} (100%) rename sorbet/rbi/gems/{connection_pool@2.5.0.rbi => connection_pool@3.0.2.rbi} (100%) rename sorbet/rbi/gems/{constant_resolver@0.2.0.rbi => constant_resolver@0.3.0.rbi} (100%) rename sorbet/rbi/gems/{crass@1.0.6.rbi => crass@1.0.7.rbi} (100%) delete mode 100644 sorbet/rbi/gems/date@3.4.1.rbi rename sorbet/rbi/gems/{diff-lcs@1.6.0.rbi => diff-lcs@1.6.2.rbi} (81%) delete mode 100644 sorbet/rbi/gems/drb@2.2.1.rbi rename sorbet/rbi/gems/{i18n@1.14.7.rbi => i18n@1.15.2.rbi} (100%) rename sorbet/rbi/gems/{io-console@0.8.0.rbi => io-console@0.9.4.rbi} (100%) delete mode 100644 sorbet/rbi/gems/json@2.10.2.rbi rename sorbet/rbi/gems/{language_server-protocol@3.17.0.4.rbi => language_server-protocol@3.17.0.6.rbi} (100%) delete mode 100644 sorbet/rbi/gems/logger@1.6.6.rbi rename sorbet/rbi/gems/{loofah@2.24.0.rbi => loofah@2.25.2.rbi} (100%) rename sorbet/rbi/gems/{minitest@5.25.5.rbi => minitest@6.0.6.rbi} (100%) rename sorbet/rbi/gems/{nokogiri@1.18.5.rbi => nokogiri@1.19.4.rbi} (100%) rename sorbet/rbi/gems/{packs-specification@0.0.10.rbi => packs-specification@0.0.11.rbi} (51%) rename sorbet/rbi/gems/{packwerk@3.2.2.rbi => packwerk@3.3.1.rbi} (100%) delete mode 100644 sorbet/rbi/gems/parallel@1.26.3.rbi create mode 100644 sorbet/rbi/gems/parallel@2.3.0.rbi rename sorbet/rbi/gems/{parse_packwerk@0.26.0.rbi => parse_packwerk@0.28.0.rbi} (55%) create mode 100644 sorbet/rbi/gems/parser@3.3.12.0.rbi delete mode 100644 sorbet/rbi/gems/parser@3.3.7.2.rbi delete mode 100644 sorbet/rbi/gems/pp@0.6.2.rbi delete mode 100644 sorbet/rbi/gems/prettyprint@0.2.0.rbi rename sorbet/rbi/gems/{prism@1.4.0.rbi => prism@1.9.0.rbi} (69%) rename sorbet/rbi/gems/{pry@0.15.2.rbi => pry@0.16.0.rbi} (55%) delete mode 100644 sorbet/rbi/gems/psych@5.2.3.rbi delete mode 100644 sorbet/rbi/gems/racc@1.8.1.rbi rename sorbet/rbi/gems/{rails-dom-testing@2.2.0.rbi => rails-dom-testing@2.3.0.rbi} (100%) rename sorbet/rbi/gems/{rails-html-sanitizer@1.6.2.rbi => rails-html-sanitizer@1.7.1.rbi} (100%) rename sorbet/rbi/gems/{rake@13.2.1.rbi => rake@13.4.2.rbi} (61%) delete mode 100644 sorbet/rbi/gems/rbi@0.3.1.rbi create mode 100644 sorbet/rbi/gems/rbi@0.4.3-40f1046d18efa4d268b46df4df79efd36f15b681.rbi delete mode 100644 sorbet/rbi/gems/rbs@3.9.0.rbi create mode 100644 sorbet/rbi/gems/rbs@4.2.0.rbi delete mode 100644 sorbet/rbi/gems/rdoc@6.12.0.rbi delete mode 100644 sorbet/rbi/gems/regexp_parser@2.10.0.rbi create mode 100644 sorbet/rbi/gems/regexp_parser@2.13.1.rbi delete mode 100644 sorbet/rbi/gems/reline@0.6.0.rbi create mode 100644 sorbet/rbi/gems/require-hooks@0.5.1.rbi rename sorbet/rbi/gems/{rspec-core@3.13.3.rbi => rspec-core@3.13.6.rbi} (50%) delete mode 100644 sorbet/rbi/gems/rspec-expectations@3.13.3.rbi create mode 100644 sorbet/rbi/gems/rspec-expectations@3.13.5.rbi rename sorbet/rbi/gems/{rspec-mocks@3.13.2.rbi => rspec-mocks@3.13.8.rbi} (51%) delete mode 100644 sorbet/rbi/gems/rspec-support@3.13.2.rbi create mode 100644 sorbet/rbi/gems/rspec-support@3.13.7.rbi delete mode 100644 sorbet/rbi/gems/rspec@3.13.0.rbi create mode 100644 sorbet/rbi/gems/rspec@3.13.2.rbi delete mode 100644 sorbet/rbi/gems/rubocop-ast@1.41.0.rbi create mode 100644 sorbet/rbi/gems/rubocop-ast@1.50.0.rbi rename sorbet/rbi/gems/{rubocop-performance@1.24.0.rbi => rubocop-performance@1.27.0.rbi} (53%) create mode 100644 sorbet/rbi/gems/rubocop-sorbet@0.17.1.rbi delete mode 100644 sorbet/rbi/gems/rubocop-sorbet@0.9.0.rbi delete mode 100644 sorbet/rbi/gems/rubocop@1.74.0.rbi create mode 100644 sorbet/rbi/gems/rubocop@1.92.0.rbi create mode 100644 sorbet/rbi/gems/rubydex@0.4.1.rbi delete mode 100644 sorbet/rbi/gems/securerandom@0.4.1.rbi delete mode 100644 sorbet/rbi/gems/spoom@1.6.1.rbi create mode 100644 sorbet/rbi/gems/spoom@1.8.10.rbi delete mode 100644 sorbet/rbi/gems/stringio@3.1.5.rbi rename sorbet/rbi/gems/{tapioca@0.16.11.rbi => tapioca@0.20.0.rbi} (52%) rename sorbet/rbi/gems/{thor@1.3.2.rbi => thor@1.5.0.rbi} (65%) rename sorbet/rbi/gems/{unicode-display_width@3.1.4.rbi => unicode-display_width@3.3.0.rbi} (56%) rename sorbet/rbi/gems/{unicode-emoji@4.0.4.rbi => unicode-emoji@4.3.0.rbi} (63%) delete mode 100644 sorbet/rbi/gems/uri@1.0.3.rbi delete mode 100644 sorbet/rbi/gems/yard-sorbet@0.9.0.rbi delete mode 100644 sorbet/rbi/gems/yard@0.9.37.rbi rename sorbet/rbi/gems/{zeitwerk@2.7.2.rbi => zeitwerk@2.8.3.rbi} (100%) diff --git a/Gemfile b/Gemfile index de5a681..e1ff68a 100644 --- a/Gemfile +++ b/Gemfile @@ -19,3 +19,6 @@ gem 'rubocop-sorbet', '~> 0.16' gem 'sorbet' gem 'tapioca' + +# Unreleased fix for parsing `...` params (Shopify/rbi#625), needed by tapioca's RBS rewriter on herb 0.11 +gem 'rbi', github: 'Shopify/rbi' diff --git a/Gemfile.lock b/Gemfile.lock index 87e525f..d7bf0da 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,11 @@ +GIT + remote: https://github.com/Shopify/rbi.git + revision: 40f1046d18efa4d268b46df4df79efd36f15b681 + specs: + rbi (0.4.3) + prism (~> 1.0) + rbs (>= 4.0.1) + PATH remote: . specs: @@ -129,9 +137,6 @@ GEM nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) rainbow (3.1.1) rake (13.4.2) - rbi (0.4.3) - prism (~> 1.0) - rbs (>= 4.0.1) rbs (4.2.0) logger prism (>= 1.6.0) @@ -159,14 +164,14 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-support (3.13.7) - rubocop (1.91.0) + rubocop (1.92.0) json (>= 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) parallel (>= 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 2.9.3, < 3.0) + regexp_parser (>= 2.11.3, < 3.0) rubocop-ast (>= 1.49.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) @@ -177,9 +182,10 @@ GEM lint_roller (~> 1.1) rubocop (>= 1.89.0, < 2.0) rubocop-ast (>= 1.47.1, < 2.0) - rubocop-sorbet (0.16.0) + rubocop-sorbet (0.17.1) lint_roller - rbi (~> 0.4) + rbi (~> 0.4, >= 0.4.3) + rbs (>= 4.1.1) rubocop (>= 1.75.2) spoom (~> 1.8) ruby-progressbar (1.13.0) @@ -189,15 +195,15 @@ GEM rubydex (0.4.1-x86_64-linux) securerandom (0.4.1) smart_properties (1.17.0) - sorbet (0.6.13528) - sorbet-static (= 0.6.13528) - sorbet-runtime (0.6.13528) - sorbet-static (0.6.13528-aarch64-linux) - sorbet-static (0.6.13528-universal-darwin) - sorbet-static (0.6.13528-x86_64-linux) - sorbet-static-and-runtime (0.6.13528) - sorbet (= 0.6.13528) - sorbet-runtime (= 0.6.13528) + sorbet (0.6.13550) + sorbet-static (= 0.6.13550) + sorbet-runtime (0.6.13550) + sorbet-static (0.6.13550-aarch64-linux) + sorbet-static (0.6.13550-universal-darwin) + sorbet-static (0.6.13550-x86_64-linux) + sorbet-static-and-runtime (0.6.13550) + sorbet (= 0.6.13550) + sorbet-runtime (= 0.6.13550) spoom (1.8.10) erubi (>= 1.10.0) prism (>= 0.28.0) @@ -245,6 +251,7 @@ DEPENDENCIES pry query_packwerk! rake (~> 13.4) + rbi! rspec (~> 3.13) rubocop (~> 1.91) rubocop-performance (~> 1.27) diff --git a/lib/query_packwerk/file_cache.rb b/lib/query_packwerk/file_cache.rb index 31bd69d..0951f11 100644 --- a/lib/query_packwerk/file_cache.rb +++ b/lib/query_packwerk/file_cache.rb @@ -10,8 +10,8 @@ class FileCache extend T::Sig # The files packwerk parses as Ruby, from Packwerk::Parsers::Factory - RUBY_FILE = T.let(/(\.(rb|rake|builder|gemspec|ru)|Gemfile|Rakefile)\z/, Regexp) - ERB_FILE = T.let(/\.erb\z/, Regexp) + RUBY_FILE = /(\.(rb|rake|builder|gemspec|ru)|Gemfile|Rakefile)\z/ + ERB_FILE = /\.erb\z/ sig { void } def initialize diff --git a/lib/query_packwerk/packages.rb b/lib/query_packwerk/packages.rb index 068e2ae..c6cbd8d 100644 --- a/lib/query_packwerk/packages.rb +++ b/lib/query_packwerk/packages.rb @@ -12,7 +12,7 @@ class Packages Elem = type_member { { fixed: QueryPackwerk::Package } } - UNOWNED = T.let('Unowned', String) + UNOWNED = 'Unowned' include Enumerable include QueryInterface diff --git a/lib/query_packwerk/rule_rewriter/anonymize_arguments_rule.rb b/lib/query_packwerk/rule_rewriter/anonymize_arguments_rule.rb index 7227d38..6216c46 100644 --- a/lib/query_packwerk/rule_rewriter/anonymize_arguments_rule.rb +++ b/lib/query_packwerk/rule_rewriter/anonymize_arguments_rule.rb @@ -7,7 +7,7 @@ class AnonymizeArgumentsRule < BaseRule extend T::Sig # Arguments prefixed with a sigil like `*arg` and `&fn` - SIGIL_ARGS = T.let(%i[splat block_pass].freeze, T::Array[Symbol]) + SIGIL_ARGS = %i[splat block_pass].freeze sig { override.params(node: RuboCop::AST::Node).void } def on_send(node) diff --git a/lib/query_packwerk/violation.rb b/lib/query_packwerk/violation.rb index 1d6d608..3daf4e1 100644 --- a/lib/query_packwerk/violation.rb +++ b/lib/query_packwerk/violation.rb @@ -9,7 +9,7 @@ module QueryPackwerk class Violation extend T::Sig - ALL_CAPS = T.let(/\A[A-Z_]+\z/, Regexp) + ALL_CAPS = /\A[A-Z_]+\z/ sig { returns(QueryPackwerk::Package) } attr_reader :producing_pack @@ -37,7 +37,7 @@ def initialize(original_violation:, consuming_pack:, file_cache: QueryPackwerk:: QueryPackwerk::Package ) - @file_cache = T.let(file_cache, QueryPackwerk::FileCache) + @file_cache = file_cache @cache_loaded = T.let(false, T::Boolean) end diff --git a/lib/query_packwerk/violations.rb b/lib/query_packwerk/violations.rb index 86ed7cd..0e3ca38 100644 --- a/lib/query_packwerk/violations.rb +++ b/lib/query_packwerk/violations.rb @@ -69,7 +69,7 @@ def reload! end def initialize(original_collection, file_cache: QueryPackwerk::FileCache.new) @original_collection = original_collection - @file_cache = T.let(file_cache, QueryPackwerk::FileCache) + @file_cache = file_cache @original_collection.each do |violation| violation.set_cache!(file_cache) diff --git a/sorbet/rbi/gems/actionview@8.0.2.rbi b/sorbet/rbi/gems/actionview@8.1.4.rbi similarity index 100% rename from sorbet/rbi/gems/actionview@8.0.2.rbi rename to sorbet/rbi/gems/actionview@8.1.4.rbi diff --git a/sorbet/rbi/gems/activesupport@8.0.2.rbi b/sorbet/rbi/gems/activesupport@8.1.4.rbi similarity index 100% rename from sorbet/rbi/gems/activesupport@8.0.2.rbi rename to sorbet/rbi/gems/activesupport@8.1.4.rbi diff --git a/sorbet/rbi/gems/ast@2.4.3.rbi b/sorbet/rbi/gems/ast@2.4.3.rbi index 29c5bcc..e946b00 100644 --- a/sorbet/rbi/gems/ast@2.4.3.rbi +++ b/sorbet/rbi/gems/ast@2.4.3.rbi @@ -17,7 +17,7 @@ # See also {AST::Node}, {AST::Processor::Mixin} and {AST::Sexp} for # additional recommendations and design patterns. # -# source://ast//lib/ast.rb#13 +# pkg:gem/ast#lib/ast.rb:13 module AST; end # Node is an immutable class, instances of which represent abstract @@ -56,7 +56,7 @@ module AST; end # temporary node type requires making globally visible changes to # the codebase. # -# source://ast//lib/ast/node.rb#40 +# pkg:gem/ast#lib/ast/node.rb:40 class AST::Node # Constructs a new instance of Node. # @@ -68,23 +68,13 @@ class AST::Node # # The `properties` hash is passed to {#assign_properties}. # - # @return [Node] a new instance of Node - # - # source://ast//lib/ast/node.rb#72 + # pkg:gem/ast#lib/ast/node.rb:72 def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end - # Concatenates `array` with `children` and returns the resulting node. - # - # @return [AST::Node] - # - # source://ast//lib/ast/node.rb#168 + # pkg:gem/ast#lib/ast/node.rb:172 def +(array); end - # Appends `element` to `children` and returns the resulting node. - # - # @return [AST::Node] - # - # source://ast//lib/ast/node.rb#177 + # pkg:gem/ast#lib/ast/node.rb:181 def <<(element); end # Compares `self` to `other`, possibly converting with `to_ast`. Only @@ -92,14 +82,14 @@ class AST::Node # # @return [Boolean] # - # source://ast//lib/ast/node.rb#153 + # pkg:gem/ast#lib/ast/node.rb:153 def ==(other); end # Appends `element` to `children` and returns the resulting node. # # @return [AST::Node] # - # source://ast//lib/ast/node.rb#177 + # pkg:gem/ast#lib/ast/node.rb:177 def append(element); end # Returns the children of this node. @@ -114,23 +104,17 @@ class AST::Node # # @return [Array] # - # source://ast//lib/ast/node.rb#56 + # pkg:gem/ast#lib/ast/node.rb:56 def children; end - # Nodes are already frozen, so there is no harm in returning the - # current node as opposed to initializing from scratch and freezing - # another one. - # - # @return self - # - # source://ast//lib/ast/node.rb#115 + # pkg:gem/ast#lib/ast/node.rb:118 def clone; end # Concatenates `array` with `children` and returns the resulting node. # # @return [AST::Node] # - # source://ast//lib/ast/node.rb#168 + # pkg:gem/ast#lib/ast/node.rb:168 def concat(array); end # Enables matching for Node, where type is the first element @@ -138,7 +122,7 @@ class AST::Node # # @return [Array] # - # source://ast//lib/ast/node.rb#253 + # pkg:gem/ast#lib/ast/node.rb:253 def deconstruct; end # Nodes are already frozen, so there is no harm in returning the @@ -147,67 +131,48 @@ class AST::Node # # @return self # - # source://ast//lib/ast/node.rb#115 + # pkg:gem/ast#lib/ast/node.rb:115 def dup; end # Test if other object is equal to - # - # @param other [Object] + # @param [Object] other # @return [Boolean] # - # source://ast//lib/ast/node.rb#85 + # pkg:gem/ast#lib/ast/node.rb:85 def eql?(other); end # Returns the precomputed hash value for this node - # # @return [Integer] # - # source://ast//lib/ast/node.rb#61 + # pkg:gem/ast#lib/ast/node.rb:61 def hash; end # Converts `self` to a s-expression ruby string. # The code return will recreate the node, using the sexp module s() # - # @param indent [Integer] Base indentation level. + # @param [Integer] indent Base indentation level. # @return [String] # - # source://ast//lib/ast/node.rb#211 + # pkg:gem/ast#lib/ast/node.rb:211 def inspect(indent = T.unsafe(nil)); end - # Returns the children of this node. - # The returned value is frozen. - # The to_a alias is useful for decomposing nodes concisely. - # For example: - # - # node = s(:gasgn, :$foo, s(:integer, 1)) - # var_name, value = *node - # p var_name # => :$foo - # p value # => (integer 1) - # - # @return [Array] - # - # source://ast//lib/ast/node.rb#56 + # pkg:gem/ast#lib/ast/node.rb:57 def to_a; end # @return [AST::Node] self # - # source://ast//lib/ast/node.rb#229 + # pkg:gem/ast#lib/ast/node.rb:229 def to_ast; end - # Converts `self` to a pretty-printed s-expression. - # - # @param indent [Integer] Base indentation level. - # @return [String] - # - # source://ast//lib/ast/node.rb#187 + # pkg:gem/ast#lib/ast/node.rb:204 def to_s(indent = T.unsafe(nil)); end # Converts `self` to a pretty-printed s-expression. # - # @param indent [Integer] Base indentation level. + # @param [Integer] indent Base indentation level. # @return [String] # - # source://ast//lib/ast/node.rb#187 + # pkg:gem/ast#lib/ast/node.rb:187 def to_sexp(indent = T.unsafe(nil)); end # Converts `self` to an Array where the first element is the type as a Symbol, @@ -215,14 +180,13 @@ class AST::Node # # @return [Array] # - # source://ast//lib/ast/node.rb#237 + # pkg:gem/ast#lib/ast/node.rb:237 def to_sexp_array; end # Returns the type of this node. - # # @return [Symbol] # - # source://ast//lib/ast/node.rb#43 + # pkg:gem/ast#lib/ast/node.rb:43 def type; end # Returns a new instance of Node where non-nil arguments replace the @@ -234,12 +198,12 @@ class AST::Node # # If the resulting node would be identical to `self`, does nothing. # - # @param type [Symbol, nil] - # @param children [Array, nil] - # @param properties [Hash, nil] + # @param [Symbol, nil] type + # @param [Array, nil] children + # @param [Hash, nil] properties # @return [AST::Node] # - # source://ast//lib/ast/node.rb#133 + # pkg:gem/ast#lib/ast/node.rb:133 def updated(type = T.unsafe(nil), children = T.unsafe(nil), properties = T.unsafe(nil)); end protected @@ -252,7 +216,7 @@ class AST::Node # # @return [nil] # - # source://ast//lib/ast/node.rb#98 + # pkg:gem/ast#lib/ast/node.rb:98 def assign_properties(properties); end # Returns `@type` with all underscores replaced by dashes. This allows @@ -261,11 +225,12 @@ class AST::Node # # @return [String] # - # source://ast//lib/ast/node.rb#264 + # pkg:gem/ast#lib/ast/node.rb:264 def fancy_type; end private + # pkg:gem/ast#lib/ast/node.rb:107 def original_dup; end end @@ -276,7 +241,7 @@ end # # @deprecated Use {AST::Processor::Mixin} instead. # -# source://ast//lib/ast/processor.rb#8 +# pkg:gem/ast#lib/ast/processor.rb:8 class AST::Processor include ::AST::Processor::Mixin end @@ -519,14 +484,14 @@ end # use some partial evaluation before! The possibilites are # endless. Have fun. # -# source://ast//lib/ast/processor/mixin.rb#240 +# pkg:gem/ast#lib/ast/processor/mixin.rb:240 module AST::Processor::Mixin # Default handler. Does nothing. # - # @param node [AST::Node] + # @param [AST::Node] node # @return [AST::Node, nil] # - # source://ast//lib/ast/processor/mixin.rb#284 + # pkg:gem/ast#lib/ast/processor/mixin.rb:284 def handler_missing(node); end # Dispatches `node`. If a node has type `:foo`, then a handler @@ -537,19 +502,19 @@ module AST::Processor::Mixin # If the handler returns `nil`, `node` is returned; otherwise, # the return value of the handler is passed along. # - # @param node [AST::Node, nil] + # @param [AST::Node, nil] node # @return [AST::Node, nil] # - # source://ast//lib/ast/processor/mixin.rb#251 + # pkg:gem/ast#lib/ast/processor/mixin.rb:251 def process(node); end # {#process}es each node from `nodes` and returns an array of # results. # - # @param nodes [Array] + # @param [Array] nodes # @return [Array] # - # source://ast//lib/ast/processor/mixin.rb#274 + # pkg:gem/ast#lib/ast/processor/mixin.rb:274 def process_all(nodes); end end @@ -572,7 +537,7 @@ end # # This way the amount of boilerplate code is greatly reduced. # -# source://ast//lib/ast/sexp.rb#20 +# pkg:gem/ast#lib/ast/sexp.rb:20 module AST::Sexp # Creates a {Node} with type `type` and children `children`. # Note that the resulting node is of the type AST::Node and not a @@ -580,6 +545,6 @@ module AST::Sexp # This would not pose a problem with comparisons, as {Node#==} # ignores metadata. # - # source://ast//lib/ast/sexp.rb#26 + # pkg:gem/ast#lib/ast/sexp.rb:26 def s(type, *children); end end diff --git a/sorbet/rbi/gems/base64@0.2.0.rbi b/sorbet/rbi/gems/base64@0.2.0.rbi deleted file mode 100644 index 7f733b0..0000000 --- a/sorbet/rbi/gems/base64@0.2.0.rbi +++ /dev/null @@ -1,9 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `base64` gem. -# Please instead update this file by running `bin/tapioca gem base64`. - - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/benchmark@0.4.0.rbi b/sorbet/rbi/gems/benchmark@0.4.0.rbi deleted file mode 100644 index b1d8e20..0000000 --- a/sorbet/rbi/gems/benchmark@0.4.0.rbi +++ /dev/null @@ -1,618 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `benchmark` gem. -# Please instead update this file by running `bin/tapioca gem benchmark`. - - -# The Benchmark module provides methods to measure and report the time -# used to execute Ruby code. -# -# * Measure the time to construct the string given by the expression -# "a"*1_000_000_000: -# -# require 'benchmark' -# -# puts Benchmark.measure { "a"*1_000_000_000 } -# -# On my machine (OSX 10.8.3 on i5 1.7 GHz) this generates: -# -# 0.350000 0.400000 0.750000 ( 0.835234) -# -# This report shows the user CPU time, system CPU time, the sum of -# the user and system CPU times, and the elapsed real time. The unit -# of time is seconds. -# -# * Do some experiments sequentially using the #bm method: -# -# require 'benchmark' -# -# n = 5000000 -# Benchmark.bm do |x| -# x.report { for i in 1..n; a = "1"; end } -# x.report { n.times do ; a = "1"; end } -# x.report { 1.upto(n) do ; a = "1"; end } -# end -# -# The result: -# -# user system total real -# 1.010000 0.000000 1.010000 ( 1.014479) -# 1.000000 0.000000 1.000000 ( 0.998261) -# 0.980000 0.000000 0.980000 ( 0.981335) -# -# * Continuing the previous example, put a label in each report: -# -# require 'benchmark' -# -# n = 5000000 -# Benchmark.bm(7) do |x| -# x.report("for:") { for i in 1..n; a = "1"; end } -# x.report("times:") { n.times do ; a = "1"; end } -# x.report("upto:") { 1.upto(n) do ; a = "1"; end } -# end -# -# The result: -# -# user system total real -# for: 1.010000 0.000000 1.010000 ( 1.015688) -# times: 1.000000 0.000000 1.000000 ( 1.003611) -# upto: 1.030000 0.000000 1.030000 ( 1.028098) -# -# * The times for some benchmarks depend on the order in which items -# are run. These differences are due to the cost of memory -# allocation and garbage collection. To avoid these discrepancies, -# the #bmbm method is provided. For example, to compare ways to -# sort an array of floats: -# -# require 'benchmark' -# -# array = (1..1000000).map { rand } -# -# Benchmark.bmbm do |x| -# x.report("sort!") { array.dup.sort! } -# x.report("sort") { array.dup.sort } -# end -# -# The result: -# -# Rehearsal ----------------------------------------- -# sort! 1.490000 0.010000 1.500000 ( 1.490520) -# sort 1.460000 0.000000 1.460000 ( 1.463025) -# -------------------------------- total: 2.960000sec -# -# user system total real -# sort! 1.460000 0.000000 1.460000 ( 1.460465) -# sort 1.450000 0.010000 1.460000 ( 1.448327) -# -# * Report statistics of sequential experiments with unique labels, -# using the #benchmark method: -# -# require 'benchmark' -# include Benchmark # we need the CAPTION and FORMAT constants -# -# n = 5000000 -# Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| -# tf = x.report("for:") { for i in 1..n; a = "1"; end } -# tt = x.report("times:") { n.times do ; a = "1"; end } -# tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } -# [tf+tt+tu, (tf+tt+tu)/3] -# end -# -# The result: -# -# user system total real -# for: 0.950000 0.000000 0.950000 ( 0.952039) -# times: 0.980000 0.000000 0.980000 ( 0.984938) -# upto: 0.950000 0.000000 0.950000 ( 0.946787) -# >total: 2.880000 0.000000 2.880000 ( 2.883764) -# >avg: 0.960000 0.000000 0.960000 ( 0.961255) -# -# source://benchmark//lib/benchmark.rb#122 -module Benchmark - private - - # Invokes the block with a Benchmark::Report object, which - # may be used to collect and report on the results of individual - # benchmark tests. Reserves +label_width+ leading spaces for - # labels on each line. Prints +caption+ at the top of the - # report, and uses +format+ to format each line. - # (Note: +caption+ must contain a terminating newline character, - # see the default Benchmark::Tms::CAPTION for an example.) - # - # Returns an array of Benchmark::Tms objects. - # - # If the block returns an array of - # Benchmark::Tms objects, these will be used to format - # additional lines of output. If +labels+ parameter are - # given, these are used to label these extra lines. - # - # _Note_: Other methods provide a simpler interface to this one, and are - # suitable for nearly all benchmarking requirements. See the examples in - # Benchmark, and the #bm and #bmbm methods. - # - # Example: - # - # require 'benchmark' - # include Benchmark # we need the CAPTION and FORMAT constants - # - # n = 5000000 - # Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| - # tf = x.report("for:") { for i in 1..n; a = "1"; end } - # tt = x.report("times:") { n.times do ; a = "1"; end } - # tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } - # [tf+tt+tu, (tf+tt+tu)/3] - # end - # - # Generates: - # - # user system total real - # for: 0.970000 0.000000 0.970000 ( 0.970493) - # times: 0.990000 0.000000 0.990000 ( 0.989542) - # upto: 0.970000 0.000000 0.970000 ( 0.972854) - # >total: 2.930000 0.000000 2.930000 ( 2.932889) - # >avg: 0.976667 0.000000 0.976667 ( 0.977630) - # - # source://benchmark//lib/benchmark.rb#170 - def benchmark(caption = T.unsafe(nil), label_width = T.unsafe(nil), format = T.unsafe(nil), *labels); end - - # A simple interface to the #benchmark method, #bm generates sequential - # reports with labels. +label_width+ and +labels+ parameters have the same - # meaning as for #benchmark. - # - # require 'benchmark' - # - # n = 5000000 - # Benchmark.bm(7) do |x| - # x.report("for:") { for i in 1..n; a = "1"; end } - # x.report("times:") { n.times do ; a = "1"; end } - # x.report("upto:") { 1.upto(n) do ; a = "1"; end } - # end - # - # Generates: - # - # user system total real - # for: 0.960000 0.000000 0.960000 ( 0.957966) - # times: 0.960000 0.000000 0.960000 ( 0.960423) - # upto: 0.950000 0.000000 0.950000 ( 0.954864) - # - # source://benchmark//lib/benchmark.rb#215 - def bm(label_width = T.unsafe(nil), *labels, &blk); end - - # Sometimes benchmark results are skewed because code executed - # earlier encounters different garbage collection overheads than - # that run later. #bmbm attempts to minimize this effect by running - # the tests twice, the first time as a rehearsal in order to get the - # runtime environment stable, the second time for - # real. GC.start is executed before the start of each of - # the real timings; the cost of this is not included in the - # timings. In reality, though, there's only so much that #bmbm can - # do, and the results are not guaranteed to be isolated from garbage - # collection and other effects. - # - # Because #bmbm takes two passes through the tests, it can - # calculate the required label width. - # - # require 'benchmark' - # - # array = (1..1000000).map { rand } - # - # Benchmark.bmbm do |x| - # x.report("sort!") { array.dup.sort! } - # x.report("sort") { array.dup.sort } - # end - # - # Generates: - # - # Rehearsal ----------------------------------------- - # sort! 1.440000 0.010000 1.450000 ( 1.446833) - # sort 1.440000 0.000000 1.440000 ( 1.448257) - # -------------------------------- total: 2.890000sec - # - # user system total real - # sort! 1.460000 0.000000 1.460000 ( 1.458065) - # sort 1.450000 0.000000 1.450000 ( 1.455963) - # - # #bmbm yields a Benchmark::Job object and returns an array of - # Benchmark::Tms objects. - # - # source://benchmark//lib/benchmark.rb#257 - def bmbm(width = T.unsafe(nil)); end - - # Returns the time used to execute the given block as a - # Benchmark::Tms object. Takes +label+ option. - # - # require 'benchmark' - # - # n = 1000000 - # - # time = Benchmark.measure do - # n.times { a = "1" } - # end - # puts time - # - # Generates: - # - # 0.220000 0.000000 0.220000 ( 0.227313) - # - # source://benchmark//lib/benchmark.rb#302 - def measure(label = T.unsafe(nil)); end - - # Returns the elapsed real time used to execute the given block. - # The unit of time is seconds. - # - # Benchmark.realtime { "a" * 1_000_000_000 } - # #=> 0.5098029999935534 - # - # source://benchmark//lib/benchmark.rb#321 - def realtime; end - - class << self - # Invokes the block with a Benchmark::Report object, which - # may be used to collect and report on the results of individual - # benchmark tests. Reserves +label_width+ leading spaces for - # labels on each line. Prints +caption+ at the top of the - # report, and uses +format+ to format each line. - # (Note: +caption+ must contain a terminating newline character, - # see the default Benchmark::Tms::CAPTION for an example.) - # - # Returns an array of Benchmark::Tms objects. - # - # If the block returns an array of - # Benchmark::Tms objects, these will be used to format - # additional lines of output. If +labels+ parameter are - # given, these are used to label these extra lines. - # - # _Note_: Other methods provide a simpler interface to this one, and are - # suitable for nearly all benchmarking requirements. See the examples in - # Benchmark, and the #bm and #bmbm methods. - # - # Example: - # - # require 'benchmark' - # include Benchmark # we need the CAPTION and FORMAT constants - # - # n = 5000000 - # Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| - # tf = x.report("for:") { for i in 1..n; a = "1"; end } - # tt = x.report("times:") { n.times do ; a = "1"; end } - # tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } - # [tf+tt+tu, (tf+tt+tu)/3] - # end - # - # Generates: - # - # user system total real - # for: 0.970000 0.000000 0.970000 ( 0.970493) - # times: 0.990000 0.000000 0.990000 ( 0.989542) - # upto: 0.970000 0.000000 0.970000 ( 0.972854) - # >total: 2.930000 0.000000 2.930000 ( 2.932889) - # >avg: 0.976667 0.000000 0.976667 ( 0.977630) - # - # source://benchmark//lib/benchmark.rb#170 - def benchmark(caption = T.unsafe(nil), label_width = T.unsafe(nil), format = T.unsafe(nil), *labels); end - - # A simple interface to the #benchmark method, #bm generates sequential - # reports with labels. +label_width+ and +labels+ parameters have the same - # meaning as for #benchmark. - # - # require 'benchmark' - # - # n = 5000000 - # Benchmark.bm(7) do |x| - # x.report("for:") { for i in 1..n; a = "1"; end } - # x.report("times:") { n.times do ; a = "1"; end } - # x.report("upto:") { 1.upto(n) do ; a = "1"; end } - # end - # - # Generates: - # - # user system total real - # for: 0.960000 0.000000 0.960000 ( 0.957966) - # times: 0.960000 0.000000 0.960000 ( 0.960423) - # upto: 0.950000 0.000000 0.950000 ( 0.954864) - # - # source://benchmark//lib/benchmark.rb#215 - def bm(label_width = T.unsafe(nil), *labels, &blk); end - - # Sometimes benchmark results are skewed because code executed - # earlier encounters different garbage collection overheads than - # that run later. #bmbm attempts to minimize this effect by running - # the tests twice, the first time as a rehearsal in order to get the - # runtime environment stable, the second time for - # real. GC.start is executed before the start of each of - # the real timings; the cost of this is not included in the - # timings. In reality, though, there's only so much that #bmbm can - # do, and the results are not guaranteed to be isolated from garbage - # collection and other effects. - # - # Because #bmbm takes two passes through the tests, it can - # calculate the required label width. - # - # require 'benchmark' - # - # array = (1..1000000).map { rand } - # - # Benchmark.bmbm do |x| - # x.report("sort!") { array.dup.sort! } - # x.report("sort") { array.dup.sort } - # end - # - # Generates: - # - # Rehearsal ----------------------------------------- - # sort! 1.440000 0.010000 1.450000 ( 1.446833) - # sort 1.440000 0.000000 1.440000 ( 1.448257) - # -------------------------------- total: 2.890000sec - # - # user system total real - # sort! 1.460000 0.000000 1.460000 ( 1.458065) - # sort 1.450000 0.000000 1.450000 ( 1.455963) - # - # #bmbm yields a Benchmark::Job object and returns an array of - # Benchmark::Tms objects. - # - # source://benchmark//lib/benchmark.rb#257 - def bmbm(width = T.unsafe(nil)); end - - # Returns the time used to execute the given block as a - # Benchmark::Tms object. Takes +label+ option. - # - # require 'benchmark' - # - # n = 1000000 - # - # time = Benchmark.measure do - # n.times { a = "1" } - # end - # puts time - # - # Generates: - # - # 0.220000 0.000000 0.220000 ( 0.227313) - # - # source://benchmark//lib/benchmark.rb#302 - def measure(label = T.unsafe(nil)); end - - # Returns the elapsed real time used to execute the given block. - # The unit of time is seconds. - # - # Benchmark.realtime { "a" * 1_000_000_000 } - # #=> 0.5098029999935534 - # - # source://benchmark//lib/benchmark.rb#321 - def realtime; end - end -end - -# A Job is a sequence of labelled blocks to be processed by the -# Benchmark.bmbm method. It is of little direct interest to the user. -# -# source://benchmark//lib/benchmark.rb#333 -class Benchmark::Job - # Returns an initialized Job instance. - # Usually, one doesn't call this method directly, as new - # Job objects are created by the #bmbm method. - # +width+ is a initial value for the label offset used in formatting; - # the #bmbm method passes its +width+ argument to this constructor. - # - # @return [Job] a new instance of Job - # - # source://benchmark//lib/benchmark.rb#341 - def initialize(width); end - - # Registers the given label and block pair in the job list. - # - # @raise [ArgumentError] - # - # source://benchmark//lib/benchmark.rb#349 - def item(label = T.unsafe(nil), &blk); end - - # An array of 2-element arrays, consisting of label and block pairs. - # - # source://benchmark//lib/benchmark.rb#361 - def list; end - - # Registers the given label and block pair in the job list. - # - # @raise [ArgumentError] - # - # source://benchmark//lib/benchmark.rb#349 - def report(label = T.unsafe(nil), &blk); end - - # Length of the widest label in the #list. - # - # source://benchmark//lib/benchmark.rb#364 - def width; end -end - -# This class is used by the Benchmark.benchmark and Benchmark.bm methods. -# It is of little direct interest to the user. -# -# source://benchmark//lib/benchmark.rb#371 -class Benchmark::Report - # Returns an initialized Report instance. - # Usually, one doesn't call this method directly, as new - # Report objects are created by the #benchmark and #bm methods. - # +width+ and +format+ are the label offset and - # format string used by Tms#format. - # - # @return [Report] a new instance of Report - # - # source://benchmark//lib/benchmark.rb#379 - def initialize(width = T.unsafe(nil), format = T.unsafe(nil)); end - - # An array of Benchmark::Tms objects representing each item. - # - # source://benchmark//lib/benchmark.rb#398 - def format; end - - # Prints the +label+ and measured time for the block, - # formatted by +format+. See Tms#format for the - # formatting rules. - # - # source://benchmark//lib/benchmark.rb#388 - def item(label = T.unsafe(nil), *format, &blk); end - - # An array of Benchmark::Tms objects representing each item. - # - # source://benchmark//lib/benchmark.rb#398 - def list; end - - # Prints the +label+ and measured time for the block, - # formatted by +format+. See Tms#format for the - # formatting rules. - # - # source://benchmark//lib/benchmark.rb#388 - def report(label = T.unsafe(nil), *format, &blk); end - - # An array of Benchmark::Tms objects representing each item. - # - # source://benchmark//lib/benchmark.rb#398 - def width; end -end - -# A data object, representing the times associated with a benchmark -# measurement. -# -# source://benchmark//lib/benchmark.rb#407 -class Benchmark::Tms - # Returns an initialized Tms object which has - # +utime+ as the user CPU time, +stime+ as the system CPU time, - # +cutime+ as the children's user CPU time, +cstime+ as the children's - # system CPU time, +real+ as the elapsed real time and +label+ as the label. - # - # @return [Tms] a new instance of Tms - # - # source://benchmark//lib/benchmark.rb#442 - def initialize(utime = T.unsafe(nil), stime = T.unsafe(nil), cutime = T.unsafe(nil), cstime = T.unsafe(nil), real = T.unsafe(nil), label = T.unsafe(nil)); end - - # Returns a new Tms object obtained by memberwise multiplication - # of the individual times for this Tms object by +x+. - # - # source://benchmark//lib/benchmark.rb#490 - def *(x); end - - # Returns a new Tms object obtained by memberwise summation - # of the individual times for this Tms object with those of the +other+ - # Tms object. - # This method and #/() are useful for taking statistics. - # - # source://benchmark//lib/benchmark.rb#477 - def +(other); end - - # Returns a new Tms object obtained by memberwise subtraction - # of the individual times for the +other+ Tms object from those of this - # Tms object. - # - # source://benchmark//lib/benchmark.rb#484 - def -(other); end - - # Returns a new Tms object obtained by memberwise division - # of the individual times for this Tms object by +x+. - # This method and #+() are useful for taking statistics. - # - # source://benchmark//lib/benchmark.rb#497 - def /(x); end - - # Returns a new Tms object whose times are the sum of the times for this - # Tms object, plus the time required to execute the code block (+blk+). - # - # source://benchmark//lib/benchmark.rb#451 - def add(&blk); end - - # An in-place version of #add. - # Changes the times of this Tms object by making it the sum of the times - # for this Tms object, plus the time required to execute - # the code block (+blk+). - # - # source://benchmark//lib/benchmark.rb#461 - def add!(&blk); end - - # System CPU time of children - # - # source://benchmark//lib/benchmark.rb#425 - def cstime; end - - # User CPU time of children - # - # source://benchmark//lib/benchmark.rb#422 - def cutime; end - - # Returns the contents of this Tms object as - # a formatted string, according to a +format+ string - # like that passed to Kernel.format. In addition, #format - # accepts the following extensions: - # - # %u:: Replaced by the user CPU time, as reported by Tms#utime. - # %y:: Replaced by the system CPU time, as reported by #stime (Mnemonic: y of "s*y*stem") - # %U:: Replaced by the children's user CPU time, as reported by Tms#cutime - # %Y:: Replaced by the children's system CPU time, as reported by Tms#cstime - # %t:: Replaced by the total CPU time, as reported by Tms#total - # %r:: Replaced by the elapsed real time, as reported by Tms#real - # %n:: Replaced by the label string, as reported by Tms#label (Mnemonic: n of "*n*ame") - # - # If +format+ is not given, FORMAT is used as default value, detailing the - # user, system and real elapsed time. - # - # source://benchmark//lib/benchmark.rb#516 - def format(format = T.unsafe(nil), *args); end - - # Label - # - # source://benchmark//lib/benchmark.rb#434 - def label; end - - # Elapsed real time - # - # source://benchmark//lib/benchmark.rb#428 - def real; end - - # System CPU time - # - # source://benchmark//lib/benchmark.rb#419 - def stime; end - - # Returns a new 6-element array, consisting of the - # label, user CPU time, system CPU time, children's - # user CPU time, children's system CPU time and elapsed - # real time. - # - # source://benchmark//lib/benchmark.rb#541 - def to_a; end - - # Returns a hash containing the same data as `to_a`. - # - # source://benchmark//lib/benchmark.rb#548 - def to_h; end - - # Same as #format. - # - # source://benchmark//lib/benchmark.rb#531 - def to_s; end - - # Total time, that is +utime+ + +stime+ + +cutime+ + +cstime+ - # - # source://benchmark//lib/benchmark.rb#431 - def total; end - - # User CPU time - # - # source://benchmark//lib/benchmark.rb#416 - def utime; end - - protected - - # Returns a new Tms object obtained by memberwise operation +op+ - # of the individual times for this Tms object with those of the other - # Tms object (+x+). - # - # +op+ can be a mathematical operation such as +, -, - # *, / - # - # source://benchmark//lib/benchmark.rb#569 - def memberwise(op, x); end -end - -# source://benchmark//lib/benchmark.rb#124 -Benchmark::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/better_html@2.1.1.rbi b/sorbet/rbi/gems/better_html@2.2.0.rbi similarity index 100% rename from sorbet/rbi/gems/better_html@2.1.1.rbi rename to sorbet/rbi/gems/better_html@2.2.0.rbi diff --git a/sorbet/rbi/gems/bigdecimal@3.1.9.rbi b/sorbet/rbi/gems/bigdecimal@3.1.9.rbi deleted file mode 100644 index c52d9ff..0000000 --- a/sorbet/rbi/gems/bigdecimal@3.1.9.rbi +++ /dev/null @@ -1,9 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `bigdecimal` gem. -# Please instead update this file by running `bin/tapioca gem bigdecimal`. - - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/coderay@1.1.3.rbi b/sorbet/rbi/gems/coderay@1.1.3.rbi index 05a1a93..13a80f5 100644 --- a/sorbet/rbi/gems/coderay@1.1.3.rbi +++ b/sorbet/rbi/gems/coderay@1.1.3.rbi @@ -128,12 +128,12 @@ # 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 +# pkg:gem/coderay#lib/coderay.rb:126 module CodeRay class << self # Assuming the path is a subpath of lib/coderay/ # - # source://coderay//lib/coderay.rb#133 + # pkg:gem/coderay#lib/coderay.rb:133 def coderay_path(*path); end # Encode a string. @@ -144,7 +144,7 @@ module CodeRay # # See CodeRay::Encoder.encode. # - # source://coderay//lib/coderay.rb#196 + # pkg:gem/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+. @@ -156,7 +156,7 @@ module CodeRay # require 'coderay' # page = CodeRay.encode_file 'some_c_code.c', :html # - # source://coderay//lib/coderay.rb#221 + # pkg:gem/coderay#lib/coderay.rb:221 def encode_file(filename, format, options = T.unsafe(nil)); end # Encode pre-scanned Tokens. @@ -168,7 +168,7 @@ module CodeRay # tokens = CodeRay.scan '1 + 2', :ruby # puts CodeRay.encode_tokens(tokens, :span) # - # source://coderay//lib/coderay.rb#209 + # pkg:gem/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 @@ -186,7 +186,7 @@ module CodeRay # ] # #-> 2 out of 4 tokens have the kind :integer. # - # source://coderay//lib/coderay.rb#260 + # pkg:gem/coderay#lib/coderay.rb:260 def encoder(format, options = T.unsafe(nil)); end # Extract the options for the scanner from the +options+ hash. @@ -196,7 +196,7 @@ module CodeRay # This is used if a method like CodeRay.encode has to provide options # for Encoder _and_ scanner. # - # source://coderay//lib/coderay.rb#278 + # pkg:gem/coderay#lib/coderay.rb:278 def get_scanner_options(options); end # Highlight a string into a HTML
. @@ -206,7 +206,7 @@ module CodeRay # # See encode. # - # source://coderay//lib/coderay.rb#232 + # pkg:gem/coderay#lib/coderay.rb:232 def highlight(code, lang, options = T.unsafe(nil), format = T.unsafe(nil)); end # Highlight a file into a HTML
. @@ -216,7 +216,7 @@ module CodeRay # # See encode. # - # source://coderay//lib/coderay.rb#242 + # pkg:gem/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+. @@ -227,7 +227,7 @@ module CodeRay # # See also demo/demo_simple. # - # source://coderay//lib/coderay.rb#168 + # pkg:gem/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+. @@ -242,7 +242,7 @@ module CodeRay # require 'coderay' # page = CodeRay.scan_file('some_c_code.c').html # - # source://coderay//lib/coderay.rb#183 + # pkg:gem/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 @@ -250,12 +250,12 @@ module CodeRay # # See Scanner.new. # - # source://coderay//lib/coderay.rb#268 + # pkg:gem/coderay#lib/coderay.rb:268 def scanner(lang, options = T.unsafe(nil), &block); end end end -# source://coderay//lib/coderay.rb#130 +# pkg:gem/coderay#lib/coderay.rb:130 CodeRay::CODERAY_PATH = T.let(T.unsafe(nil), String) # = Duo @@ -273,7 +273,7 @@ CodeRay::CODERAY_PATH = T.let(T.unsafe(nil), String) # 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 +# pkg:gem/coderay#lib/coderay/duo.rb:17 class CodeRay::Duo # Create a new Duo, holding a lang and a format to highlight code. # @@ -292,12 +292,9 @@ class CodeRay::Duo # 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 + # pkg:gem/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) @@ -306,67 +303,49 @@ class CodeRay::Duo # # CodeRay::Duo[:python => :yaml].(code) # - # source://coderay//lib/coderay/duo.rb#64 + # pkg:gem/coderay#lib/coderay/duo.rb:77 def call(code, options = T.unsafe(nil)); end # Tokenize and highlight the code using +scanner+ and +encoder+. # - # source://coderay//lib/coderay/duo.rb#64 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/duo.rb:59 def encoder; end - # Returns the value of attribute format. - # - # source://coderay//lib/coderay/duo.rb#19 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/duo.rb:68 def highlight(code, options = T.unsafe(nil)); end - # Returns the value of attribute lang. - # - # source://coderay//lib/coderay/duo.rb#19 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/duo.rb:19 def lang=(_arg0); end - # Returns the value of attribute options. - # - # source://coderay//lib/coderay/duo.rb#19 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/duo.rb:54 def scanner; end class << self # To allow calls like Duo[:ruby, :html].highlight. + # + # pkg:gem/coderay#lib/coderay/duo.rb:50 def [](*_arg0); end end end @@ -379,7 +358,7 @@ end # mechanism and the [] method that returns the Encoder class # belonging to the given format. # -# source://coderay//lib/coderay/encoders.rb#10 +# pkg:gem/coderay#lib/coderay/encoders.rb:10 module CodeRay::Encoders extend ::CodeRay::PluginHost end @@ -394,39 +373,39 @@ end # # See also: TokenKindFilter, LinesOfCode # -# source://coderay//lib/coderay/encoders/comment_filter.rb#15 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/encoders/count.rb:7 class CodeRay::Encoders::Count < ::CodeRay::Encoders::Encoder - # source://coderay//lib/coderay/encoders/count.rb#29 + # pkg:gem/coderay#lib/coderay/encoders/count.rb:29 def begin_group(kind); end - # source://coderay//lib/coderay/encoders/count.rb#29 + # pkg:gem/coderay#lib/coderay/encoders/count.rb:33 def begin_line(kind); end - # source://coderay//lib/coderay/encoders/count.rb#29 + # pkg:gem/coderay#lib/coderay/encoders/count.rb:32 def end_group(kind); end - # source://coderay//lib/coderay/encoders/count.rb#29 + # pkg:gem/coderay#lib/coderay/encoders/count.rb:34 def end_line(kind); end - # source://coderay//lib/coderay/encoders/count.rb#25 + # pkg:gem/coderay#lib/coderay/encoders/count.rb:25 def text_token(text, kind); end protected - # source://coderay//lib/coderay/encoders/count.rb#19 + # pkg:gem/coderay#lib/coderay/encoders/count.rb:19 def finish(options); end - # source://coderay//lib/coderay/encoders/count.rb#13 + # pkg:gem/coderay#lib/coderay/encoders/count.rb:13 def setup(options); end end @@ -441,25 +420,25 @@ end # # See also: Scanners::Debug # -# source://coderay//lib/coderay/encoders/debug.rb#14 +# pkg:gem/coderay#lib/coderay/encoders/debug.rb:14 class CodeRay::Encoders::Debug < ::CodeRay::Encoders::Encoder - # source://coderay//lib/coderay/encoders/debug.rb#30 + # pkg:gem/coderay#lib/coderay/encoders/debug.rb:30 def begin_group(kind); end - # source://coderay//lib/coderay/encoders/debug.rb#38 + # pkg:gem/coderay#lib/coderay/encoders/debug.rb:38 def begin_line(kind); end - # source://coderay//lib/coderay/encoders/debug.rb#34 + # pkg:gem/coderay#lib/coderay/encoders/debug.rb:34 def end_group(kind); end - # source://coderay//lib/coderay/encoders/debug.rb#42 + # pkg:gem/coderay#lib/coderay/encoders/debug.rb:42 def end_line(kind); end - # source://coderay//lib/coderay/encoders/debug.rb#20 + # pkg:gem/coderay#lib/coderay/encoders/debug.rb:20 def text_token(text, kind); end end -# source://coderay//lib/coderay/encoders/debug.rb#18 +# pkg:gem/coderay#lib/coderay/encoders/debug.rb:18 CodeRay::Encoders::Debug::FILE_EXTENSION = T.let(T.unsafe(nil), String) # = Debug Lint Encoder @@ -473,35 +452,29 @@ CodeRay::Encoders::Debug::FILE_EXTENSION = T.let(T.unsafe(nil), String) # # See also: Encoders::Debug # -# source://coderay//lib/coderay/encoders/debug_lint.rb#16 +# pkg:gem/coderay#lib/coderay/encoders/debug_lint.rb:16 class CodeRay::Encoders::DebugLint < ::CodeRay::Encoders::Debug - # source://coderay//lib/coderay/encoders/debug_lint.rb#26 + # pkg:gem/coderay#lib/coderay/encoders/debug_lint.rb:26 def begin_group(kind); end - # source://coderay//lib/coderay/encoders/debug_lint.rb#37 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/encoders/debug_lint.rb:20 def text_token(text, kind); end protected - # source://coderay//lib/coderay/encoders/debug_lint.rb#55 + # pkg:gem/coderay#lib/coderay/encoders/debug_lint.rb:55 def finish(options); end - # source://coderay//lib/coderay/encoders/debug_lint.rb#50 + # pkg:gem/coderay#lib/coderay/encoders/debug_lint.rb:50 def setup(options); end end @@ -509,13 +482,13 @@ end # # See Encoders::HTML for available options. # -# source://coderay//lib/coderay/encoders/div.rb#9 +# pkg:gem/coderay#lib/coderay/encoders/div.rb:9 class CodeRay::Encoders::Div < ::CodeRay::Encoders::HTML; end -# source://coderay//lib/coderay/encoders/div.rb#15 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/encoders/div.rb:11 CodeRay::Encoders::Div::FILE_EXTENSION = T.let(T.unsafe(nil), String) # = Encoder @@ -531,7 +504,7 @@ CodeRay::Encoders::Div::FILE_EXTENSION = T.let(T.unsafe(nil), String) # 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 +# pkg:gem/coderay#lib/coderay/encoders/encoder.rb:16 class CodeRay::Encoders::Encoder extend ::CodeRay::Plugin @@ -546,79 +519,76 @@ class CodeRay::Encoders::Encoder # 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 + # pkg:gem/coderay#lib/coderay/encoders/encoder.rb:55 def initialize(options = T.unsafe(nil)); end - # source://coderay//lib/coderay/encoders/encoder.rb#87 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/encoders/encoder.rb:80 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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/encoders/encoder.rb:118 def text_token(text, kind); end # Called with +content+ and +kind+ of the currently scanned token. @@ -627,15 +597,10 @@ class CodeRay::Encoders::Encoder # 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 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/encoders/encoder.rb:184 def tokens(tokens, options = T.unsafe(nil)); end protected @@ -645,21 +610,21 @@ class CodeRay::Encoders::Encoder # The already created +tokens+ object must be used; it must be a # Tokens object. # - # source://coderay//lib/coderay/encoders/encoder.rb#168 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/encoders/encoder.rb:160 def finish(options); end - # source://coderay//lib/coderay/encoders/encoder.rb#148 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/encoders/encoder.rb:153 def output(data); end # Called with merged options before encoding starts. @@ -667,29 +632,29 @@ class CodeRay::Encoders::Encoder # # See the HTML Encoder for an example of option caching. # - # source://coderay//lib/coderay/encoders/encoder.rb#144 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/helpers/plugin.rb:41 CodeRay::Encoders::Encoder::PLUGIN_HOST = CodeRay::Encoders # A Filter encoder has another Tokens instance as output. @@ -707,29 +672,29 @@ CodeRay::Encoders::Encoder::PLUGIN_HOST = CodeRay::Encoders # # See also: TokenKindFilter # -# source://coderay//lib/coderay/encoders/filter.rb#18 +# pkg:gem/coderay#lib/coderay/encoders/filter.rb:18 class CodeRay::Encoders::Filter < ::CodeRay::Encoders::Encoder - # source://coderay//lib/coderay/encoders/filter.rb#39 + # pkg:gem/coderay#lib/coderay/encoders/filter.rb:39 def begin_group(kind); end - # source://coderay//lib/coderay/encoders/filter.rb#43 + # pkg:gem/coderay#lib/coderay/encoders/filter.rb:43 def begin_line(kind); end - # source://coderay//lib/coderay/encoders/filter.rb#47 + # pkg:gem/coderay#lib/coderay/encoders/filter.rb:47 def end_group(kind); end - # source://coderay//lib/coderay/encoders/filter.rb#51 + # pkg:gem/coderay#lib/coderay/encoders/filter.rb:51 def end_line(kind); end - # source://coderay//lib/coderay/encoders/filter.rb#35 + # pkg:gem/coderay#lib/coderay/encoders/filter.rb:35 def text_token(text, kind); end protected - # source://coderay//lib/coderay/encoders/filter.rb#29 + # pkg:gem/coderay#lib/coderay/encoders/filter.rb:29 def finish(options); end - # source://coderay//lib/coderay/encoders/filter.rb#23 + # pkg:gem/coderay#lib/coderay/encoders/filter.rb:23 def setup(options); end end @@ -825,119 +790,113 @@ end # # Default: false # -# source://coderay//lib/coderay/encoders/html.rb#97 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/encoders/html.rb:126 def css; end - # source://coderay//lib/coderay/encoders/html.rb#241 + # pkg:gem/coderay#lib/coderay/encoders/html.rb:241 def end_group(kind); end - # source://coderay//lib/coderay/encoders/html.rb#261 + # pkg:gem/coderay#lib/coderay/encoders/html.rb:261 def end_line(kind); end - # source://coderay//lib/coderay/encoders/html.rb#221 + # pkg:gem/coderay#lib/coderay/encoders/html.rb:221 def text_token(text, kind); end protected - # source://coderay//lib/coderay/encoders/html.rb#316 + # pkg:gem/coderay#lib/coderay/encoders/html.rb:316 def break_lines(text, style); end - # source://coderay//lib/coderay/encoders/html.rb#310 + # pkg:gem/coderay#lib/coderay/encoders/html.rb:310 def check_group_nesting(name, kind); end - # source://coderay//lib/coderay/encoders/html.rb#268 + # pkg:gem/coderay#lib/coderay/encoders/html.rb:268 def check_options!(options); end - # source://coderay//lib/coderay/encoders/html.rb#324 + # pkg:gem/coderay#lib/coderay/encoders/html.rb:324 def close_span; end - # source://coderay//lib/coderay/encoders/html.rb#280 + # pkg:gem/coderay#lib/coderay/encoders/html.rb:280 def css_class_for_kinds(kinds); end - # source://coderay//lib/coderay/encoders/html.rb#195 + # pkg:gem/coderay#lib/coderay/encoders/html.rb:195 def finish(options); end - # source://coderay//lib/coderay/encoders/html.rb#289 + # pkg:gem/coderay#lib/coderay/encoders/html.rb:289 def make_span_for_kinds(method, hint); end - # source://coderay//lib/coderay/encoders/html.rb#172 + # pkg:gem/coderay#lib/coderay/encoders/html.rb:172 def setup(options); end - # source://coderay//lib/coderay/encoders/html.rb#284 + # pkg:gem/coderay#lib/coderay/encoders/html.rb:284 def style_for_kinds(kinds); end class << self - # source://coderay//lib/coderay/encoders/html.rb#130 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/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 + # pkg:gem/coderay#lib/coderay/encoders/html/css.rb:13 def initialize(style = T.unsafe(nil)); end - # source://coderay//lib/coderay/encoders/html/css.rb#23 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/encoders/html/css.rb:7 def stylesheet; end private - # source://coderay//lib/coderay/encoders/html/css.rb#49 + # pkg:gem/coderay#lib/coderay/encoders/html/css.rb:49 def parse(stylesheet); end class << self - # source://coderay//lib/coderay/encoders/html/css.rb#9 + # pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/encoders/html/numbering.rb:6 module CodeRay::Encoders::HTML::Numbering class << self - # source://coderay//lib/coderay/encoders/html/numbering.rb#8 + # pkg:gem/coderay#lib/coderay/encoders/html/numbering.rb:8 def number!(output, mode = T.unsafe(nil), options = T.unsafe(nil)); end end end @@ -951,91 +910,79 @@ end # # TODO: Rewrite this without monkey patching. # -# source://coderay//lib/coderay/encoders/html/output.rb#14 +# pkg:gem/coderay#lib/coderay/encoders/html/output.rb:14 module CodeRay::Encoders::HTML::Output - # source://coderay//lib/coderay/encoders/html/output.rb#57 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/encoders/html/output.rb:16 def css=(_arg0); end - # source://coderay//lib/coderay/encoders/html/output.rb#86 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/encoders/html/output.rb:62 def wrap!(element, *args); end - # source://coderay//lib/coderay/encoders/html/output.rb#52 + # pkg:gem/coderay#lib/coderay/encoders/html/output.rb:52 def wrap_in!(template); end - # source://coderay//lib/coderay/encoders/html/output.rb#47 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/encoders/html/output.rb:50 def wrapped_in=(_arg0); end - # @return [Boolean] - # - # source://coderay//lib/coderay/encoders/html/output.rb#43 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/encoders/html/output.rb:22 def extended(o); end - # source://coderay//lib/coderay/encoders/html/output.rb#26 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/encoders/html/output.rb:92 class CodeRay::Encoders::HTML::Output::Template < ::String - # source://coderay//lib/coderay/encoders/html/output.rb#104 + # pkg:gem/coderay#lib/coderay/encoders/html/output.rb:104 def apply(target, replacement); end class << self - # source://coderay//lib/coderay/encoders/html/output.rb#94 + # pkg:gem/coderay#lib/coderay/encoders/html/output.rb:94 def wrap!(str, template, target); end end end -# source://coderay//lib/coderay/encoders/html.rb#146 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/encoders/html.rb:150 CodeRay::Encoders::HTML::TRANSPARENT_TOKEN_KINDS = T.let(T.unsafe(nil), Set) # A simple JSON Encoder. @@ -1053,36 +1000,36 @@ CodeRay::Encoders::HTML::TRANSPARENT_TOKEN_KINDS = T.let(T.unsafe(nil), Set) # {"type"=>"block", "action"=>"close", "kind"=>"string"}, # ] # -# source://coderay//lib/coderay/encoders/json.rb#18 +# pkg:gem/coderay#lib/coderay/encoders/json.rb:18 class CodeRay::Encoders::JSON < ::CodeRay::Encoders::Encoder - # source://coderay//lib/coderay/encoders/json.rb#64 + # pkg:gem/coderay#lib/coderay/encoders/json.rb:64 def begin_group(kind); end - # source://coderay//lib/coderay/encoders/json.rb#72 + # pkg:gem/coderay#lib/coderay/encoders/json.rb:72 def begin_line(kind); end - # source://coderay//lib/coderay/encoders/json.rb#68 + # pkg:gem/coderay#lib/coderay/encoders/json.rb:68 def end_group(kind); end - # source://coderay//lib/coderay/encoders/json.rb#76 + # pkg:gem/coderay#lib/coderay/encoders/json.rb:76 def end_line(kind); end - # source://coderay//lib/coderay/encoders/json.rb#60 + # pkg:gem/coderay#lib/coderay/encoders/json.rb:60 def text_token(text, kind); end protected - # source://coderay//lib/coderay/encoders/json.rb#49 + # pkg:gem/coderay#lib/coderay/encoders/json.rb:49 def append(data); end - # source://coderay//lib/coderay/encoders/json.rb#45 + # pkg:gem/coderay#lib/coderay/encoders/json.rb:45 def finish(options); end - # source://coderay//lib/coderay/encoders/json.rb#38 + # pkg:gem/coderay#lib/coderay/encoders/json.rb:38 def setup(options); end end -# source://coderay//lib/coderay/encoders/json.rb#35 +# pkg:gem/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. @@ -1099,18 +1046,18 @@ CodeRay::Encoders::JSON::FILE_EXTENSION = T.let(T.unsafe(nil), String) # 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 +# pkg:gem/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 + # pkg:gem/coderay#lib/coderay/encoders/lines_of_code.rb:38 def finish(options); end - # source://coderay//lib/coderay/encoders/lines_of_code.rb#25 + # pkg:gem/coderay#lib/coderay/encoders/lines_of_code.rb:25 def setup(options); end end -# source://coderay//lib/coderay/encoders/lines_of_code.rb#21 +# pkg:gem/coderay#lib/coderay/encoders/lines_of_code.rb:21 CodeRay::Encoders::LinesOfCode::NON_EMPTY_LINE = T.let(T.unsafe(nil), Regexp) # = Lint Encoder @@ -1124,57 +1071,51 @@ CodeRay::Encoders::LinesOfCode::NON_EMPTY_LINE = T.let(T.unsafe(nil), Regexp) # # See also: Encoders::DebugLint # -# source://coderay//lib/coderay/encoders/lint.rb#14 +# pkg:gem/coderay#lib/coderay/encoders/lint.rb:14 class CodeRay::Encoders::Lint < ::CodeRay::Encoders::Debug - # source://coderay//lib/coderay/encoders/lint.rb#28 + # pkg:gem/coderay#lib/coderay/encoders/lint.rb:28 def begin_group(kind); end - # source://coderay//lib/coderay/encoders/lint.rb#37 + # pkg:gem/coderay#lib/coderay/encoders/lint.rb:37 def begin_line(kind); end - # @raise [IncorrectTokenGroupNesting] - # - # source://coderay//lib/coderay/encoders/lint.rb#32 + # pkg:gem/coderay#lib/coderay/encoders/lint.rb:32 def end_group(kind); end - # @raise [IncorrectTokenGroupNesting] - # - # source://coderay//lib/coderay/encoders/lint.rb#41 + # pkg:gem/coderay#lib/coderay/encoders/lint.rb:41 def end_line(kind); end - # @raise [EmptyToken] - # - # source://coderay//lib/coderay/encoders/lint.rb#23 + # pkg:gem/coderay#lib/coderay/encoders/lint.rb:23 def text_token(text, kind); end protected - # source://coderay//lib/coderay/encoders/lint.rb#52 + # pkg:gem/coderay#lib/coderay/encoders/lint.rb:52 def finish(options); end - # source://coderay//lib/coderay/encoders/lint.rb#48 + # pkg:gem/coderay#lib/coderay/encoders/lint.rb:48 def setup(options); end end -# source://coderay//lib/coderay/encoders/lint.rb#19 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/encoders/lint.rb:18 class CodeRay::Encoders::Lint::InvalidTokenStream < ::StandardError; end -# source://coderay//lib/coderay/encoders/lint.rb#20 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/encoders/null.rb:7 class CodeRay::Encoders::Null < ::CodeRay::Encoders::Encoder - # source://coderay//lib/coderay/encoders/null.rb#11 + # pkg:gem/coderay#lib/coderay/encoders/null.rb:11 def text_token(text, kind); end end @@ -1183,135 +1124,148 @@ end # # See Encoders::HTML for available options. # -# source://coderay//lib/coderay/encoders/page.rb#10 +# pkg:gem/coderay#lib/coderay/encoders/page.rb:10 class CodeRay::Encoders::Page < ::CodeRay::Encoders::HTML; end -# source://coderay//lib/coderay/encoders/page.rb#16 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/encoders/span.rb:9 class CodeRay::Encoders::Span < ::CodeRay::Encoders::HTML; end -# source://coderay//lib/coderay/encoders/span.rb#15 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/encoders/statistic.rb:7 class CodeRay::Encoders::Statistic < ::CodeRay::Encoders::Encoder - # source://coderay//lib/coderay/encoders/statistic.rb#70 + # pkg:gem/coderay#lib/coderay/encoders/statistic.rb:70 def begin_group(kind); end - # source://coderay//lib/coderay/encoders/statistic.rb#78 + # pkg:gem/coderay#lib/coderay/encoders/statistic.rb:78 def begin_line(kind); end - # source://coderay//lib/coderay/encoders/statistic.rb#86 + # pkg:gem/coderay#lib/coderay/encoders/statistic.rb:86 def block_token(action, kind); end - # source://coderay//lib/coderay/encoders/statistic.rb#74 + # pkg:gem/coderay#lib/coderay/encoders/statistic.rb:74 def end_group(kind); end - # source://coderay//lib/coderay/encoders/statistic.rb#82 + # pkg:gem/coderay#lib/coderay/encoders/statistic.rb:82 def end_line(kind); end - # source://coderay//lib/coderay/encoders/statistic.rb#11 + # pkg:gem/coderay#lib/coderay/encoders/statistic.rb:11 def real_token_count; end - # source://coderay//lib/coderay/encoders/statistic.rb#62 + # pkg:gem/coderay#lib/coderay/encoders/statistic.rb:62 def text_token(text, kind); end - # source://coderay//lib/coderay/encoders/statistic.rb#11 + # pkg:gem/coderay#lib/coderay/encoders/statistic.rb:11 def type_stats; end protected - # source://coderay//lib/coderay/encoders/statistic.rb#42 + # pkg:gem/coderay#lib/coderay/encoders/statistic.rb:42 def finish(options); end - # source://coderay//lib/coderay/encoders/statistic.rb#17 + # pkg:gem/coderay#lib/coderay/encoders/statistic.rb:17 def setup(options); end end -# source://coderay//lib/coderay/encoders/statistic.rb#24 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 + # pkg:gem/coderay#lib/coderay/encoders/statistic.rb:13 def count; end - # Sets the attribute count - # - # @param value [Object] the value to set the attribute count to. - # @return [Object] the newly set value + # pkg:gem/coderay#lib/coderay/encoders/statistic.rb:13 def count=(_); end - # Returns the value of attribute size - # - # @return [Object] the current value of size + # pkg:gem/coderay#lib/coderay/encoders/statistic.rb:13 def size; end - # Sets the attribute size - # - # @param value [Object] the value to set the attribute size to. - # @return [Object] the newly set value + # pkg:gem/coderay#lib/coderay/encoders/statistic.rb:13 def size=(_); end class << self + # pkg:gem/coderay#lib/coderay/encoders/statistic.rb:13 def [](*_arg0); end + + # pkg:gem/coderay#lib/coderay/encoders/statistic.rb:13 def inspect; end + + # pkg:gem/coderay#lib/coderay/encoders/statistic.rb:13 def keyword_init?; end + + # pkg:gem/coderay#lib/coderay/encoders/statistic.rb:13 def members; end + + # pkg:gem/coderay#lib/coderay/encoders/statistic.rb:13 def new(*_arg0); end end end -# source://coderay//lib/coderay/encoders/terminal.rb#17 +# Outputs code highlighted for a color terminal. +# +# Note: This encoder is in beta. It currently doesn't use the Styles. +# +# Alias: +term+ +# +# == Authors & License +# +# By Rob Aldred (http://robaldred.co.uk) +# +# Based on idea by Nathan Weizenbaum (http://nex-3.com) +# +# MIT License (http://www.opensource.org/licenses/mit-license.php) +# +# pkg:gem/coderay#lib/coderay/encoders/terminal.rb:17 class CodeRay::Encoders::Terminal < ::CodeRay::Encoders::Encoder - # source://coderay//lib/coderay/encoders/terminal.rb#156 + # pkg:gem/coderay#lib/coderay/encoders/terminal.rb:156 def begin_group(kind); end - # source://coderay//lib/coderay/encoders/terminal.rb#156 + # pkg:gem/coderay#lib/coderay/encoders/terminal.rb:160 def begin_line(kind); end - # source://coderay//lib/coderay/encoders/terminal.rb#162 + # pkg:gem/coderay#lib/coderay/encoders/terminal.rb:162 def end_group(kind); end - # source://coderay//lib/coderay/encoders/terminal.rb#172 + # pkg:gem/coderay#lib/coderay/encoders/terminal.rb:172 def end_line(kind); end - # source://coderay//lib/coderay/encoders/terminal.rb#141 + # pkg:gem/coderay#lib/coderay/encoders/terminal.rb:141 def text_token(text, kind); end protected - # source://coderay//lib/coderay/encoders/terminal.rb#133 + # pkg:gem/coderay#lib/coderay/encoders/terminal.rb:133 def setup(options); end private - # source://coderay//lib/coderay/encoders/terminal.rb#179 + # pkg:gem/coderay#lib/coderay/encoders/terminal.rb:179 def open_token(kind); end end -# source://coderay//lib/coderay/encoders/terminal.rb#21 +# pkg:gem/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 @@ -1326,21 +1280,21 @@ CodeRay::Encoders::Terminal::TOKEN_COLORS = T.let(T.unsafe(nil), Hash) # # Default: empty String # -# source://coderay//lib/coderay/encoders/text.rb#15 +# pkg:gem/coderay#lib/coderay/encoders/text.rb:15 class CodeRay::Encoders::Text < ::CodeRay::Encoders::Encoder - # source://coderay//lib/coderay/encoders/text.rb#25 + # pkg:gem/coderay#lib/coderay/encoders/text.rb:25 def text_token(text, kind); end protected - # source://coderay//lib/coderay/encoders/text.rb#36 + # pkg:gem/coderay#lib/coderay/encoders/text.rb:36 def setup(options); end end -# source://coderay//lib/coderay/encoders/text.rb#21 +# pkg:gem/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 +# pkg:gem/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. @@ -1363,7 +1317,7 @@ CodeRay::Encoders::Text::FILE_EXTENSION = T.let(T.unsafe(nil), String) # # See also: CommentFilter # -# source://coderay//lib/coderay/encoders/token_kind_filter.rb#25 +# pkg:gem/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. @@ -1371,110 +1325,106 @@ class CodeRay::Encoders::TokenKindFilter < ::CodeRay::Encoders::Filter # 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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/encoders/token_kind_filter.rb:35 def setup(options); end end -# source://coderay//lib/coderay/encoders/token_kind_filter.rb#29 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/encoders/xml.rb:7 class CodeRay::Encoders::XML < ::CodeRay::Encoders::Encoder - # source://coderay//lib/coderay/encoders/xml.rb#58 + # pkg:gem/coderay#lib/coderay/encoders/xml.rb:58 def begin_group(kind); end - # source://coderay//lib/coderay/encoders/xml.rb#62 + # pkg:gem/coderay#lib/coderay/encoders/xml.rb:62 def end_group(kind); end - # source://coderay//lib/coderay/encoders/xml.rb#38 + # pkg:gem/coderay#lib/coderay/encoders/xml.rb:38 def text_token(text, kind); end protected - # source://coderay//lib/coderay/encoders/xml.rb#31 + # pkg:gem/coderay#lib/coderay/encoders/xml.rb:31 def finish(options); end - # source://coderay//lib/coderay/encoders/xml.rb#22 + # pkg:gem/coderay#lib/coderay/encoders/xml.rb:22 def setup(options); end end -# source://coderay//lib/coderay/encoders/xml.rb#15 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/encoders/yaml.rb:9 class CodeRay::Encoders::YAML < ::CodeRay::Encoders::Encoder - # source://coderay//lib/coderay/encoders/yaml.rb#31 + # pkg:gem/coderay#lib/coderay/encoders/yaml.rb:31 def begin_group(kind); end - # source://coderay//lib/coderay/encoders/yaml.rb#39 + # pkg:gem/coderay#lib/coderay/encoders/yaml.rb:39 def begin_line(kind); end - # source://coderay//lib/coderay/encoders/yaml.rb#35 + # pkg:gem/coderay#lib/coderay/encoders/yaml.rb:35 def end_group(kind); end - # source://coderay//lib/coderay/encoders/yaml.rb#43 + # pkg:gem/coderay#lib/coderay/encoders/yaml.rb:43 def end_line(kind); end - # source://coderay//lib/coderay/encoders/yaml.rb#27 + # pkg:gem/coderay#lib/coderay/encoders/yaml.rb:27 def text_token(text, kind); end protected - # source://coderay//lib/coderay/encoders/yaml.rb#22 + # pkg:gem/coderay#lib/coderay/encoders/yaml.rb:22 def finish(options); end - # source://coderay//lib/coderay/encoders/yaml.rb#16 + # pkg:gem/coderay#lib/coderay/encoders/yaml.rb:16 def setup(options); end end -# source://coderay//lib/coderay/encoders/yaml.rb#13 +# pkg:gem/coderay#lib/coderay/encoders/yaml.rb:13 CodeRay::Encoders::YAML::FILE_EXTENSION = T.let(T.unsafe(nil), String) # = FileType @@ -1492,7 +1442,7 @@ CodeRay::Encoders::YAML::FILE_EXTENSION = T.let(T.unsafe(nil), String) # # try the shebang line, too # lang = FileType.fetch file_name, :text, true # -# source://coderay//lib/coderay/helpers/file_type.rb#17 +# pkg:gem/coderay#lib/coderay/helpers/file_type.rb:17 module CodeRay::FileType class << self # Try to determine the file type of the file. @@ -1502,7 +1452,7 @@ module CodeRay::FileType # 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 + # pkg:gem/coderay#lib/coderay/helpers/file_type.rb:29 def [](filename, read_shebang = T.unsafe(nil)); end # This works like Hash#fetch. @@ -1510,26 +1460,26 @@ module CodeRay::FileType # If the filetype cannot be found, the +default+ value # is returned. # - # source://coderay//lib/coderay/helpers/file_type.rb#50 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/helpers/file_type.rb:19 class CodeRay::FileType::UnknownFileType < ::Exception; end # = Plugin @@ -1540,19 +1490,17 @@ class CodeRay::FileType::UnknownFileType < ::Exception; end # # See CodeRay::PluginHost for examples. # -# source://coderay//lib/coderay/helpers/plugin.rb#10 +# pkg:gem/coderay#lib/coderay/helpers/plugin.rb:10 module CodeRay::Plugin - # source://coderay//lib/coderay/helpers/plugin.rb#46 + # pkg:gem/coderay#lib/coderay/helpers/plugin.rb:46 def aliases; end # The PluginHost for this Plugin class. # - # source://coderay//lib/coderay/helpers/plugin.rb#39 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/helpers/plugin.rb:12 def plugin_id; end # Register this class for the given +id+. @@ -1565,13 +1513,13 @@ module CodeRay::Plugin # # See PluginHost.register. # - # source://coderay//lib/coderay/helpers/plugin.rb#23 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/helpers/plugin.rb:30 def title(title = T.unsafe(nil)); end end @@ -1600,27 +1548,27 @@ end # # or # Generators::Fancy # -# source://coderay//lib/coderay/helpers/plugin_host.rb#27 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/helpers/plugin_host.rb:61 def const_missing(const); end # Define the default plugin to use when no plugin is found @@ -1635,34 +1583,29 @@ module CodeRay::PluginHost # # MyColorHost.default # loads and returns the Gray plugin # - # source://coderay//lib/coderay/helpers/plugin_host.rb#114 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/helpers/plugin_host.rb:57 def load(id, *args, &blk); end # Loads all plugins using list and load. # - # source://coderay//lib/coderay/helpers/plugin_host.rb#39 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/helpers/plugin_host.rb:159 def load_plugin_map; end # Map a plugin_id to another. @@ -1675,17 +1618,17 @@ module CodeRay::PluginHost # :luna => :moon # end # - # source://coderay//lib/coderay/helpers/plugin_host.rb#95 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/helpers/plugin_host.rb:79 def plugin_path(*args); end # Every plugin must register itself for +id+ by calling register_for, @@ -1693,19 +1636,19 @@ module CodeRay::PluginHost # # See Plugin#register_for. # - # source://coderay//lib/coderay/helpers/plugin_host.rb#128 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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+. @@ -1713,33 +1656,31 @@ module CodeRay::PluginHost # 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 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/helpers/plugin_host.rb:72 def extended(mod); end end end -# source://coderay//lib/coderay/helpers/plugin_host.rb#33 +# pkg:gem/coderay#lib/coderay/helpers/plugin_host.rb:33 class CodeRay::PluginHost::HostNotFound < ::LoadError; end -# source://coderay//lib/coderay/helpers/plugin_host.rb#35 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/helpers/plugin_host.rb:32 class CodeRay::PluginHost::PluginNotFound < ::LoadError; end # = Scanners @@ -1754,40 +1695,40 @@ class CodeRay::PluginHost::PluginNotFound < ::LoadError; end # # See PluginHost. # -# source://coderay//lib/coderay/scanners.rb#18 +# pkg:gem/coderay#lib/coderay/scanners.rb:18 module CodeRay::Scanners extend ::CodeRay::PluginHost end # Scanner for C. # -# source://coderay//lib/coderay/scanners/c.rb#5 +# pkg:gem/coderay#lib/coderay/scanners/c.rb:5 class CodeRay::Scanners::C < ::CodeRay::Scanners::Scanner protected - # source://coderay//lib/coderay/scanners/c.rb#44 + # pkg:gem/coderay#lib/coderay/scanners/c.rb:44 def scan_tokens(encoder, options); end end -# source://coderay//lib/coderay/scanners/c.rb#27 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/scanners/c.rb:40 CodeRay::Scanners::C::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) # Scanner for C++. @@ -1795,268 +1736,270 @@ CodeRay::Scanners::C::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) # Aliases: +cplusplus+, c++ CodeRay::Scanners::CPlusPlus = CodeRay::Scanners::Text -# source://coderay//lib/coderay/scanners/css.rb#4 +# pkg:gem/coderay#lib/coderay/scanners/css.rb:4 class CodeRay::Scanners::CSS < ::CodeRay::Scanners::Scanner protected - # source://coderay//lib/coderay/scanners/css.rb#55 + # pkg:gem/coderay#lib/coderay/scanners/css.rb:55 def scan_tokens(encoder, options); end - # source://coderay//lib/coderay/scanners/css.rb#50 + # pkg:gem/coderay#lib/coderay/scanners/css.rb:50 def setup; end end -# source://coderay//lib/coderay/scanners/css.rb#8 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/scanners/css.rb:16 module CodeRay::Scanners::CSS::RE; end -# source://coderay//lib/coderay/scanners/css.rb#31 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# differs from standard because it allows uppercase hex too +# +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/scanners/css.rb:24 +CodeRay::Scanners::CSS::RE::String = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# Clojure scanner by Licenser. +# +# pkg:gem/coderay#lib/coderay/scanners/clojure.rb:6 class CodeRay::Scanners::Clojure < ::CodeRay::Scanners::Scanner protected - # source://coderay//lib/coderay/scanners/clojure.rb#145 + # pkg:gem/coderay#lib/coderay/scanners/clojure.rb:145 def scan_tokens(encoder, options); end end -# source://coderay//lib/coderay/scanners/clojure.rb#95 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/scanners/debug.rb:9 class CodeRay::Scanners::Debug < ::CodeRay::Scanners::Scanner protected - # source://coderay//lib/coderay/scanners/debug.rb#21 + # pkg:gem/coderay#lib/coderay/scanners/debug.rb:21 def scan_tokens(encoder, options); end - # source://coderay//lib/coderay/scanners/debug.rb#16 + # pkg:gem/coderay#lib/coderay/scanners/debug.rb:16 def setup; end end @@ -2064,157 +2007,157 @@ end # # Alias: +pascal+ # -# source://coderay//lib/coderay/scanners/delphi.rb#7 +# pkg:gem/coderay#lib/coderay/scanners/delphi.rb:7 class CodeRay::Scanners::Delphi < ::CodeRay::Scanners::Scanner protected - # source://coderay//lib/coderay/scanners/delphi.rb#45 + # pkg:gem/coderay#lib/coderay/scanners/delphi.rb:45 def scan_tokens(encoder, options); end end -# source://coderay//lib/coderay/scanners/delphi.rb#25 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/scanners/diff.rb:7 class CodeRay::Scanners::Diff < ::CodeRay::Scanners::Scanner protected - # source://coderay//lib/coderay/scanners/diff.rb#19 + # pkg:gem/coderay#lib/coderay/scanners/diff.rb:19 def scan_tokens(encoder, options); end private - # source://coderay//lib/coderay/scanners/diff.rb#204 + # pkg:gem/coderay#lib/coderay/scanners/diff.rb:204 def diff(a, b); end end -# source://coderay//lib/coderay/scanners/diff.rb#12 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/scanners/erb.rb:8 class CodeRay::Scanners::ERB < ::CodeRay::Scanners::Scanner protected - # source://coderay//lib/coderay/scanners/erb.rb#38 + # pkg:gem/coderay#lib/coderay/scanners/erb.rb:38 def reset_instance; end - # source://coderay//lib/coderay/scanners/erb.rb#43 + # pkg:gem/coderay#lib/coderay/scanners/erb.rb:43 def scan_tokens(encoder, options); end - # source://coderay//lib/coderay/scanners/erb.rb#33 + # pkg:gem/coderay#lib/coderay/scanners/erb.rb:33 def setup; end end -# source://coderay//lib/coderay/scanners/erb.rb#15 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/scanners/go.rb:4 class CodeRay::Scanners::Go < ::CodeRay::Scanners::Scanner protected - # source://coderay//lib/coderay/scanners/go.rb#50 + # pkg:gem/coderay#lib/coderay/scanners/go.rb:50 def scan_tokens(encoder, options); end end -# source://coderay//lib/coderay/scanners/go.rb#45 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/scanners/groovy.rb:7 class CodeRay::Scanners::Groovy < ::CodeRay::Scanners::Java protected - # source://coderay//lib/coderay/scanners/groovy.rb#43 + # pkg:gem/coderay#lib/coderay/scanners/groovy.rb:43 def scan_tokens(encoder, options); end - # source://coderay//lib/coderay/scanners/groovy.rb#39 + # pkg:gem/coderay#lib/coderay/scanners/groovy.rb:39 def setup; end end -# source://coderay//lib/coderay/scanners/groovy.rb#24 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/scanners/haml.rb:8 class CodeRay::Scanners::HAML < ::CodeRay::Scanners::Scanner protected - # source://coderay//lib/coderay/scanners/haml.rb#24 + # pkg:gem/coderay#lib/coderay/scanners/haml.rb:24 def scan_tokens(encoder, options); end - # source://coderay//lib/coderay/scanners/haml.rb#17 + # pkg:gem/coderay#lib/coderay/scanners/haml.rb:17 def setup; end end -# source://coderay//lib/coderay/scanners/haml.rb#13 +# pkg:gem/coderay#lib/coderay/scanners/haml.rb:13 CodeRay::Scanners::HAML::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) # HTML Scanner @@ -2223,184 +2166,186 @@ CodeRay::Scanners::HAML::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) # # See also: Scanners::XML # -# source://coderay//lib/coderay/scanners/html.rb#9 +# pkg:gem/coderay#lib/coderay/scanners/html.rb:9 class CodeRay::Scanners::HTML < ::CodeRay::Scanners::Scanner - # source://coderay//lib/coderay/scanners/html.rb#62 + # pkg:gem/coderay#lib/coderay/scanners/html.rb:62 def reset; end protected - # source://coderay//lib/coderay/scanners/html.rb#83 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/scanners/html.rb:76 def scan_java_script(encoder, code); end - # source://coderay//lib/coderay/scanners/html.rb#90 + # pkg:gem/coderay#lib/coderay/scanners/html.rb:90 def scan_tokens(encoder, options); end - # source://coderay//lib/coderay/scanners/html.rb#70 + # pkg:gem/coderay#lib/coderay/scanners/html.rb:70 def setup; end end -# source://coderay//lib/coderay/scanners/html.rb#39 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 + # pkg:gem/coderay#lib/coderay/scanners/json.rb:26 def scan_tokens(encoder, options); end - # source://coderay//lib/coderay/scanners/json.rb#21 + # pkg:gem/coderay#lib/coderay/scanners/json.rb:21 def setup; end end -# source://coderay//lib/coderay/scanners/json.rb#15 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/scanners/java.rb:5 class CodeRay::Scanners::Java < ::CodeRay::Scanners::Scanner protected - # source://coderay//lib/coderay/scanners/java.rb#51 + # pkg:gem/coderay#lib/coderay/scanners/java.rb:51 def scan_tokens(encoder, options); end end -# source://coderay//lib/coderay/scanners/java/builtin_types.rb#4 +# pkg:gem/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 +# :nocov: +# +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 + # pkg:gem/coderay#lib/coderay/scanners/java_script.rb:224 def reset_instance; end - # source://coderay//lib/coderay/scanners/java_script.rb#61 + # pkg:gem/coderay#lib/coderay/scanners/java_script.rb:61 def scan_tokens(encoder, options); end - # source://coderay//lib/coderay/scanners/java_script.rb#57 + # pkg:gem/coderay#lib/coderay/scanners/java_script.rb:57 def setup; end - # source://coderay//lib/coderay/scanners/java_script.rb#229 + # pkg:gem/coderay#lib/coderay/scanners/java_script.rb:229 def xml_scanner; end end -# source://coderay//lib/coderay/scanners/java_script.rb#42 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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. @@ -2409,34 +2354,34 @@ CodeRay::Scanners::JavaScript::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) # {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 +# pkg:gem/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 + # pkg:gem/coderay#lib/coderay/scanners/lua.rb:60 def scan_tokens(encoder, options); end # Scanner initialization. # - # source://coderay//lib/coderay/scanners/lua.rb#54 + # pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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' @@ -2451,89 +2396,89 @@ CodeRay::Scanners::Lua::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) # highlighted directly accordingly, without the need for specific # identifiers to be listed here. # -# source://coderay//lib/coderay/scanners/lua.rb#38 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/scanners/php.rb:10 class CodeRay::Scanners::PHP < ::CodeRay::Scanners::Scanner protected - # source://coderay//lib/coderay/scanners/php.rb#23 + # pkg:gem/coderay#lib/coderay/scanners/php.rb:23 def reset_instance; end - # source://coderay//lib/coderay/scanners/php.rb#234 + # pkg:gem/coderay#lib/coderay/scanners/php.rb:234 def scan_tokens(encoder, options); end - # source://coderay//lib/coderay/scanners/php.rb#19 + # pkg:gem/coderay#lib/coderay/scanners/php.rb:19 def setup; end end -# source://coderay//lib/coderay/scanners/php.rb#15 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/scanners/php.rb:197 module CodeRay::Scanners::PHP::RE; end -# source://coderay//lib/coderay/scanners/php.rb#211 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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. @@ -2541,71 +2486,71 @@ CodeRay::Scanners::PHP::Words::VARIABLE_KIND = T.let(T.unsafe(nil), CodeRay::Wor # Based on pygments' PythonLexer, see # http://dev.pocoo.org/projects/pygments/browser/pygments/lexers/agile.py. # -# source://coderay//lib/coderay/scanners/python.rb#8 +# pkg:gem/coderay#lib/coderay/scanners/python.rb:8 class CodeRay::Scanners::Python < ::CodeRay::Scanners::Scanner protected - # source://coderay//lib/coderay/scanners/python.rb#103 + # pkg:gem/coderay#lib/coderay/scanners/python.rb:103 def scan_tokens(encoder, options); end end -# source://coderay//lib/coderay/scanners/python.rb#86 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/scanners/raydebug.rb:9 class CodeRay::Scanners::Raydebug < ::CodeRay::Scanners::Scanner protected - # source://coderay//lib/coderay/scanners/raydebug.rb#22 + # pkg:gem/coderay#lib/coderay/scanners/raydebug.rb:22 def scan_tokens(encoder, options); end - # source://coderay//lib/coderay/scanners/raydebug.rb#17 + # pkg:gem/coderay#lib/coderay/scanners/raydebug.rb:17 def setup; end end @@ -2617,222 +2562,230 @@ end # It is optimized for HTML highlighting, and is not very useful for # parsing or pretty printing. # -# source://coderay//lib/coderay/scanners/ruby.rb#11 +# pkg:gem/coderay#lib/coderay/scanners/ruby.rb:11 class CodeRay::Scanners::Ruby < ::CodeRay::Scanners::Scanner - # source://coderay//lib/coderay/scanners/ruby.rb#19 + # pkg:gem/coderay#lib/coderay/scanners/ruby.rb:19 def interpreted_string_state; end protected - # source://coderay//lib/coderay/scanners/ruby.rb#29 + # pkg:gem/coderay#lib/coderay/scanners/ruby.rb:29 def scan_tokens(encoder, options); end - # source://coderay//lib/coderay/scanners/ruby.rb#25 + # pkg:gem/coderay#lib/coderay/scanners/ruby.rb:25 def setup; end end -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#5 +# pkg:gem/coderay#lib/coderay/scanners/ruby/patterns.rb:5 module CodeRay::Scanners::Ruby::Patterns; end -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#72 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# NOTE: This is not completely correct, but +# nobody needs heredoc delimiters ending with \n. +# +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# See http://murfy.de/ruby-constants. +# +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# Checks for a valid value to follow. This enables +# value_expected in method calls without parentheses. +# +# pkg:gem/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 +# pkg:gem/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#7 +# pkg:gem/coderay#lib/coderay/scanners/ruby/string_state.rb:7 class CodeRay::Scanners::Ruby::StringState < ::Struct - # @return [StringState] a new instance of StringState - # - # source://coderay//lib/coderay/scanners/ruby/string_state.rb#48 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/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 +# debug, if I try to change it with << +# +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/scanners/sql.rb:5 class CodeRay::Scanners::SQL < ::CodeRay::Scanners::Scanner - # source://coderay//lib/coderay/scanners/sql.rb#66 + # pkg:gem/coderay#lib/coderay/scanners/sql.rb:66 def scan_tokens(encoder, options); end end -# source://coderay//lib/coderay/scanners/sql.rb#23 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/scanners/sass.rb:5 class CodeRay::Scanners::Sass < ::CodeRay::Scanners::CSS protected - # source://coderay//lib/coderay/scanners/sass.rb#16 + # pkg:gem/coderay#lib/coderay/scanners/sass.rb:16 def scan_tokens(encoder, options); end - # source://coderay//lib/coderay/scanners/sass.rb#12 + # pkg:gem/coderay#lib/coderay/scanners/sass.rb:12 def setup; end end @@ -2860,7 +2813,7 @@ end # You can also use +map+, +any?+, +find+ and even +sort_by+, # if you want. # -# source://coderay//lib/coderay/scanners/scanner.rb#29 +# pkg:gem/coderay#lib/coderay/scanners/scanner.rb:29 class CodeRay::Scanners::Scanner < ::StringScanner include ::Enumerable extend ::CodeRay::Plugin @@ -2875,9 +2828,7 @@ class CodeRay::Scanners::Scanner < ::StringScanner # # Else, a Tokens object is used. # - # @return [Scanner] a new instance of Scanner - # - # source://coderay//lib/coderay/scanners/scanner.rb#125 + # pkg:gem/coderay#lib/coderay/scanners/scanner.rb:125 def initialize(code = T.unsafe(nil), options = T.unsafe(nil)); end # The string in binary encoding. @@ -2885,28 +2836,28 @@ class CodeRay::Scanners::Scanner < ::StringScanner # 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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/scanners/scanner.rb:155 def lang; end # The current line position of the scanner, starting with 1. @@ -2915,63 +2866,55 @@ class CodeRay::Scanners::Scanner < ::StringScanner # Beware, this is implemented inefficiently. It should be used # for debugging only. # - # source://coderay//lib/coderay/scanners/scanner.rb#202 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/scanners/scanner.rb:142 def reset; end - # Returns the value of attribute state. - # - # source://coderay//lib/coderay/scanners/scanner.rb#44 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/scanners/scanner.rb:328 def scan_rest; end # This is the central method, and commonly the only one a @@ -2980,18 +2923,16 @@ class CodeRay::Scanners::Scanner < ::StringScanner # 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 + # pkg:gem/coderay#lib/coderay/scanners/scanner.rb:260 def scan_tokens(tokens, options); end - # source://coderay//lib/coderay/scanners/scanner.rb#305 + # pkg:gem/coderay#lib/coderay/scanners/scanner.rb:305 def scanner_state_info(state); end - # source://coderay//lib/coderay/scanners/scanner.rb#239 + # pkg:gem/coderay#lib/coderay/scanners/scanner.rb:239 def set_string_from_source(source); end - # source://coderay//lib/coderay/scanners/scanner.rb#250 + # pkg:gem/coderay#lib/coderay/scanners/scanner.rb:250 def set_tokens_from_options(options); end # Can be implemented by subclasses to do some initialization @@ -3000,47 +2941,47 @@ class CodeRay::Scanners::Scanner < ::StringScanner # Use reset for initialization that has to be done once per # scan. # - # source://coderay//lib/coderay/scanners/scanner.rb#236 + # pkg:gem/coderay#lib/coderay/scanners/scanner.rb:236 def setup; end - # source://coderay//lib/coderay/scanners/scanner.rb#322 + # pkg:gem/coderay#lib/coderay/scanners/scanner.rb:322 def tokens_last(tokens, n); end - # source://coderay//lib/coderay/scanners/scanner.rb#318 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/scanners/scanner.rb:51 def normalize(code); end protected - # source://coderay//lib/coderay/scanners/scanner.rb#82 + # pkg:gem/coderay#lib/coderay/scanners/scanner.rb:82 def encode_with_encoding(code, target_encoding); end - # source://coderay//lib/coderay/scanners/scanner.rb#100 + # pkg:gem/coderay#lib/coderay/scanners/scanner.rb:100 def guess_encoding(s); end - # source://coderay//lib/coderay/scanners/scanner.rb#96 + # pkg:gem/coderay#lib/coderay/scanners/scanner.rb:96 def to_unix(code); end end end @@ -3049,31 +2990,31 @@ end # # Define @default_options for subclasses. # -# source://coderay//lib/coderay/scanners/scanner.rb#40 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/helpers/plugin.rb:41 CodeRay::Scanners::Scanner::PLUGIN_HOST = CodeRay::Scanners -# source://coderay//lib/coderay/scanners/scanner.rb#299 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/scanners/scanner.rb:35 class CodeRay::Scanners::Scanner::ScanError < ::StandardError; end -# source://coderay//lib/coderay/scanners/taskpaper.rb#4 +# pkg:gem/coderay#lib/coderay/scanners/taskpaper.rb:4 class CodeRay::Scanners::Taskpaper < ::CodeRay::Scanners::Scanner protected - # source://coderay//lib/coderay/scanners/taskpaper.rb#11 + # pkg:gem/coderay#lib/coderay/scanners/taskpaper.rb:11 def scan_tokens(encoder, options); end end @@ -3083,77 +3024,77 @@ end # # Alias: +plaintext+, +plain+ # -# source://coderay//lib/coderay/scanners/text.rb#9 +# pkg:gem/coderay#lib/coderay/scanners/text.rb:9 class CodeRay::Scanners::Text < ::CodeRay::Scanners::Scanner protected - # source://coderay//lib/coderay/scanners/text.rb#18 + # pkg:gem/coderay#lib/coderay/scanners/text.rb:18 def scan_tokens(encoder, options); end end -# source://coderay//lib/coderay/scanners/text.rb#14 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/scanners/yaml.rb:7 class CodeRay::Scanners::YAML < ::CodeRay::Scanners::Scanner protected - # source://coderay//lib/coderay/scanners/yaml.rb#16 + # pkg:gem/coderay#lib/coderay/scanners/yaml.rb:16 def scan_tokens(encoder, options); end end -# source://coderay//lib/coderay/scanners/yaml.rb#12 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/styles/alpha.rb:5 class CodeRay::Styles::Alpha < ::CodeRay::Styles::Style; end -# source://coderay//lib/coderay/styles/alpha.rb#14 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/coderay#lib/coderay/styles/style.rb:8 class CodeRay::Styles::Style extend ::CodeRay::Plugin end -# source://coderay//lib/coderay/styles/style.rb#12 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 @@ -3195,17 +3136,17 @@ CodeRay::TokenKinds = T.let(T.unsafe(nil), Hash) # 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 +# pkg:gem/coderay#lib/coderay/tokens.rb:41 class CodeRay::Tokens < ::Array - # source://coderay//lib/coderay/tokens.rb#156 + # pkg:gem/coderay#lib/coderay/tokens.rb:156 def begin_group(kind); end - # source://coderay//lib/coderay/tokens.rb#158 + # pkg:gem/coderay#lib/coderay/tokens.rb:158 def begin_line(kind); end # Return the actual number of tokens. # - # source://coderay//lib/coderay/tokens.rb#151 + # pkg:gem/coderay#lib/coderay/tokens.rb:151 def count; end # Encode the tokens using encoder. @@ -3216,13 +3157,13 @@ class CodeRay::Tokens < ::Array # # options are passed to the encoder. # - # source://coderay//lib/coderay/tokens.rb#56 + # pkg:gem/coderay#lib/coderay/tokens.rb:56 def encode(encoder, options = T.unsafe(nil)); end - # source://coderay//lib/coderay/tokens.rb#157 + # pkg:gem/coderay#lib/coderay/tokens.rb:157 def end_group(kind); end - # source://coderay//lib/coderay/tokens.rb#159 + # pkg:gem/coderay#lib/coderay/tokens.rb:159 def end_line(kind); end # Redirects unknown methods to encoder calls. @@ -3230,17 +3171,17 @@ class CodeRay::Tokens < ::Array # For example, if you call +tokens.html+, the HTML encoder # is used to highlight the tokens. # - # source://coderay//lib/coderay/tokens.rb#70 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/tokens.rb:47 def scanner; end # The Scanner instance that created the tokens. # - # source://coderay//lib/coderay/tokens.rb#47 + # pkg:gem/coderay#lib/coderay/tokens.rb:47 def scanner=(_arg0); end # Split the tokens into parts of the given +sizes+. @@ -3253,16 +3194,18 @@ class CodeRay::Tokens < ::Array # 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 + # pkg:gem/coderay#lib/coderay/tokens.rb:85 def split_into_parts(*sizes); end + # pkg:gem/coderay#lib/coderay/tokens.rb:155 def text_token(*_arg0); end # Turn tokens into a string by concatenating them. # - # source://coderay//lib/coderay/tokens.rb#62 + # pkg:gem/coderay#lib/coderay/tokens.rb:62 def to_s; end + # pkg:gem/coderay#lib/coderay/tokens.rb:160 def tokens(*_arg0); end end @@ -3271,92 +3214,66 @@ end # 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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/tokens_proxy.rb:9 def block=(_arg0); end # Overwrite Struct#each. # - # source://coderay//lib/coderay/tokens_proxy.rb#48 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/coderay#lib/coderay/tokens_proxy.rb:38 def tokens; end end -# source://coderay//lib/coderay/version.rb#2 +# pkg:gem/coderay#lib/coderay/version.rb:2 CodeRay::VERSION = T.let(T.unsafe(nil), String) # = WordList @@ -3397,31 +3314,29 @@ CodeRay::VERSION = T.let(T.unsafe(nil), String) # kind = IDENT_KIND[match] # ... # -# source://coderay//lib/coderay/helpers/word_list.rb#40 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/coderay#lib/coderay/helpers/word_list.rb:60 class CodeRay::WordList::CaseIgnoring < ::CodeRay::WordList - # source://coderay//lib/coderay/helpers/word_list.rb#62 + # pkg:gem/coderay#lib/coderay/helpers/word_list.rb:62 def [](key); end - # source://coderay//lib/coderay/helpers/word_list.rb#66 + # pkg:gem/coderay#lib/coderay/helpers/word_list.rb:66 def []=(key, value); end end diff --git a/sorbet/rbi/gems/concurrent-ruby@1.3.5.rbi b/sorbet/rbi/gems/concurrent-ruby@1.3.8.rbi similarity index 100% rename from sorbet/rbi/gems/concurrent-ruby@1.3.5.rbi rename to sorbet/rbi/gems/concurrent-ruby@1.3.8.rbi diff --git a/sorbet/rbi/gems/connection_pool@2.5.0.rbi b/sorbet/rbi/gems/connection_pool@3.0.2.rbi similarity index 100% rename from sorbet/rbi/gems/connection_pool@2.5.0.rbi rename to sorbet/rbi/gems/connection_pool@3.0.2.rbi diff --git a/sorbet/rbi/gems/constant_resolver@0.2.0.rbi b/sorbet/rbi/gems/constant_resolver@0.3.0.rbi similarity index 100% rename from sorbet/rbi/gems/constant_resolver@0.2.0.rbi rename to sorbet/rbi/gems/constant_resolver@0.3.0.rbi diff --git a/sorbet/rbi/gems/crass@1.0.6.rbi b/sorbet/rbi/gems/crass@1.0.7.rbi similarity index 100% rename from sorbet/rbi/gems/crass@1.0.6.rbi rename to sorbet/rbi/gems/crass@1.0.7.rbi diff --git a/sorbet/rbi/gems/date@3.4.1.rbi b/sorbet/rbi/gems/date@3.4.1.rbi deleted file mode 100644 index 1dcd7c8..0000000 --- a/sorbet/rbi/gems/date@3.4.1.rbi +++ /dev/null @@ -1,75 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `date` gem. -# Please instead update this file by running `bin/tapioca gem date`. - - -# source://date//lib/date.rb#6 -class Date - include ::Comparable - - # call-seq: - # infinite? -> false - # - # Returns +false+ - # - # @return [Boolean] - # - # source://date//lib/date.rb#13 - def infinite?; end -end - -# source://date//lib/date.rb#17 -class Date::Infinity < ::Numeric - # @return [Infinity] a new instance of Infinity - # - # source://date//lib/date.rb#19 - def initialize(d = T.unsafe(nil)); end - - # source://date//lib/date.rb#33 - def +@; end - - # source://date//lib/date.rb#32 - def -@; end - - # source://date//lib/date.rb#35 - def <=>(other); end - - # source://date//lib/date.rb#30 - def abs; end - - # source://date//lib/date.rb#51 - def coerce(other); end - - # @return [Boolean] - # - # source://date//lib/date.rb#26 - def finite?; end - - # @return [Boolean] - # - # source://date//lib/date.rb#27 - def infinite?; end - - # @return [Boolean] - # - # source://date//lib/date.rb#28 - def nan?; end - - # source://date//lib/date.rb#59 - def to_f; end - - # @return [Boolean] - # - # source://date//lib/date.rb#25 - def zero?; end - - protected - - # source://date//lib/date.rb#21 - def d; end -end - -# source://date//lib/date.rb#7 -Date::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/diff-lcs@1.6.0.rbi b/sorbet/rbi/gems/diff-lcs@1.6.2.rbi similarity index 81% rename from sorbet/rbi/gems/diff-lcs@1.6.0.rbi rename to sorbet/rbi/gems/diff-lcs@1.6.2.rbi index 39c426c..fded7ac 100644 --- a/sorbet/rbi/gems/diff-lcs@1.6.0.rbi +++ b/sorbet/rbi/gems/diff-lcs@1.6.2.rbi @@ -5,7 +5,7 @@ # Please instead update this file by running `bin/tapioca gem diff-lcs`. -# source://diff-lcs//lib/diff/lcs.rb#3 +# pkg:gem/diff-lcs#lib/diff/lcs.rb:3 module Diff; end # == How Diff Works (by Mark-Jason Dominus) @@ -55,11 +55,11 @@ module Diff; end # a x b y c z p d q # a b c a x b y c z # -# source://diff-lcs//lib/diff/lcs.rb#51 +# pkg:gem/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#76 + # pkg:gem/diff-lcs#lib/diff/lcs.rb:76 def diff(other, callbacks = T.unsafe(nil), &block); end # Returns an Array containing the longest common subsequence(s) between @@ -75,77 +75,71 @@ module Diff::LCS # O.new('a').eql?(O.new('a')) == true && # O.new('a').hash == O.new('a').hash # - # source://diff-lcs//lib/diff/lcs.rb#71 + # pkg:gem/diff-lcs#lib/diff/lcs.rb:71 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#102 + # pkg:gem/diff-lcs#lib/diff/lcs.rb:102 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#110 + # pkg:gem/diff-lcs#lib/diff/lcs.rb:110 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#124 + # pkg:gem/diff-lcs#lib/diff/lcs.rb:124 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#82 + # pkg:gem/diff-lcs#lib/diff/lcs.rb:82 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#95 + # pkg:gem/diff-lcs#lib/diff/lcs.rb:95 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#88 + # pkg:gem/diff-lcs#lib/diff/lcs.rb:88 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#102 + # pkg:gem/diff-lcs#lib/diff/lcs.rb:105 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#117 + # pkg:gem/diff-lcs#lib/diff/lcs.rb:117 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#135 + # pkg:gem/diff-lcs#lib/diff/lcs.rb:135 def unpatch_me(patchset); end class << self - # :yields: seq1[i] for each matched - # - # source://diff-lcs//lib/diff/lcs.rb#145 + # pkg:gem/diff-lcs#lib/diff/lcs.rb:158 def LCS(seq1, seq2, &block); end - # source://diff-lcs//lib/diff/lcs/callbacks.rb#52 + # pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:52 def callbacks_for(callbacks); end # #diff computes the smallest set of additions and deletions necessary to @@ -158,12 +152,10 @@ module Diff::LCS # initialise it. If the +callbacks+ object (possibly initialised) responds to # #finish, it will be called. # - # source://diff-lcs//lib/diff/lcs.rb#169 + # pkg:gem/diff-lcs#lib/diff/lcs.rb:169 def diff(seq1, seq2, callbacks = T.unsafe(nil), &block); end - # :yields: seq1[i] for each matched - # - # source://diff-lcs//lib/diff/lcs.rb#145 + # pkg:gem/diff-lcs#lib/diff/lcs.rb:145 def lcs(seq1, seq2, &block); end # Applies a +patchset+ to the sequence +src+ according to the +direction+ @@ -207,13 +199,13 @@ module Diff::LCS # representations of those objects. Prior to application, array # representations of Diff::LCS::Change objects will be reified. # - # source://diff-lcs//lib/diff/lcs.rb#627 + # pkg:gem/diff-lcs#lib/diff/lcs.rb:627 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#737 + # pkg:gem/diff-lcs#lib/diff/lcs.rb:737 def patch!(src, patchset); end # #sdiff computes all necessary components to show two sequences and their @@ -245,7 +237,7 @@ module Diff::LCS # end # end # - # source://diff-lcs//lib/diff/lcs.rb#201 + # pkg:gem/diff-lcs#lib/diff/lcs.rb:201 def sdiff(seq1, seq2, callbacks = T.unsafe(nil), &block); end # #traverse_balanced is an alternative to #traverse_sequences. It uses a @@ -330,7 +322,7 @@ module Diff::LCS # 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#476 + # pkg:gem/diff-lcs#lib/diff/lcs.rb:476 def traverse_balanced(seq1, seq2, callbacks = T.unsafe(nil)); end # #traverse_sequences is the most general facility provided by this module; @@ -415,18 +407,18 @@ module Diff::LCS # 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#286 + # pkg:gem/diff-lcs#lib/diff/lcs.rb:286 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#731 + # pkg:gem/diff-lcs#lib/diff/lcs.rb:731 def unpatch!(src, patchset); end private - # source://diff-lcs//lib/diff/lcs/internals.rb#4 + # pkg:gem/diff-lcs#lib/diff/lcs/internals.rb:4 def diff_traversal(method, seq1, seq2, callbacks, &block); end end end @@ -436,39 +428,31 @@ end # # Diff::LCS.LCS(seq1, seq2, Diff::LCS::BalancedCallbacks) # -# source://diff-lcs//lib/diff/lcs/callbacks.rb#50 +# pkg:gem/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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/diff-lcs#lib/diff/lcs/block.rb:7 def changes; end - # source://diff-lcs//lib/diff/lcs/block.rb#21 + # pkg:gem/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 + # pkg:gem/diff-lcs#lib/diff/lcs/block.rb:7 def insert; end - # source://diff-lcs//lib/diff/lcs/block.rb#25 + # pkg:gem/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 + # pkg:gem/diff-lcs#lib/diff/lcs/block.rb:7 def remove; end end @@ -476,89 +460,71 @@ end # addition of an element from either the old or the new sequenced # enumerable. # -# source://diff-lcs//lib/diff/lcs/change.rb#6 +# pkg:gem/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 + # pkg:gem/diff-lcs#lib/diff/lcs/change.rb:27 def initialize(*args); end - # source://diff-lcs//lib/diff/lcs/change.rb#65 + # pkg:gem/diff-lcs#lib/diff/lcs/change.rb:65 def <=>(other); end - # source://diff-lcs//lib/diff/lcs/change.rb#58 + # pkg:gem/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 + # pkg:gem/diff-lcs#lib/diff/lcs/change.rb:20 def action; end - # @return [Boolean] - # - # source://diff-lcs//lib/diff/lcs/change.rb#72 + # pkg:gem/diff-lcs#lib/diff/lcs/change.rb:72 def adding?; end - # @return [Boolean] - # - # source://diff-lcs//lib/diff/lcs/change.rb#84 + # pkg:gem/diff-lcs#lib/diff/lcs/change.rb:84 def changed?; end - # @return [Boolean] - # - # source://diff-lcs//lib/diff/lcs/change.rb#76 + # pkg:gem/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 + # pkg:gem/diff-lcs#lib/diff/lcs/change.rb:25 def element; end - # @return [Boolean] - # - # source://diff-lcs//lib/diff/lcs/change.rb#88 + # pkg:gem/diff-lcs#lib/diff/lcs/change.rb:88 def finished_a?; end - # @return [Boolean] - # - # source://diff-lcs//lib/diff/lcs/change.rb#92 + # pkg:gem/diff-lcs#lib/diff/lcs/change.rb:92 def finished_b?; end - # source://diff-lcs//lib/diff/lcs/change.rb#34 + # pkg:gem/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 + # pkg:gem/diff-lcs#lib/diff/lcs/change.rb:23 def position; end - # source://diff-lcs//lib/diff/lcs/change.rb#38 + # pkg:gem/diff-lcs#lib/diff/lcs/change.rb:38 def to_a; end - # source://diff-lcs//lib/diff/lcs/change.rb#38 + # pkg:gem/diff-lcs#lib/diff/lcs/change.rb:42 def to_ary; end - # @return [Boolean] - # - # source://diff-lcs//lib/diff/lcs/change.rb#80 + # pkg:gem/diff-lcs#lib/diff/lcs/change.rb:80 def unchanged?; end class << self - # source://diff-lcs//lib/diff/lcs/change.rb#44 + # pkg:gem/diff-lcs#lib/diff/lcs/change.rb:44 def from_a(arr); end - # @return [Boolean] - # - # source://diff-lcs//lib/diff/lcs/change.rb#15 + # pkg:gem/diff-lcs#lib/diff/lcs/change.rb:15 def valid_action?(action); end end end -# Fixnum is deprecated in Ruby 2.4 # standard:disable Naming/ConstantName -# -# source://diff-lcs//lib/diff/lcs/change.rb#7 +# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:7 Diff::LCS::Change::IntClass = Integer # The only actions valid for changes are '+' (add), '-' (delete), '=' @@ -566,60 +532,58 @@ Diff::LCS::Change::IntClass = Integer # '>' (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 +# pkg:gem/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 +# pkg:gem/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 + # pkg:gem/diff-lcs#lib/diff/lcs/change.rb:114 def initialize(*args); end - # source://diff-lcs//lib/diff/lcs/change.rb#166 + # pkg:gem/diff-lcs#lib/diff/lcs/change.rb:166 def <=>(other); end - # source://diff-lcs//lib/diff/lcs/change.rb#157 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/diff-lcs#lib/diff/lcs/change.rb:106 def old_position; end - # source://diff-lcs//lib/diff/lcs/change.rb#122 + # pkg:gem/diff-lcs#lib/diff/lcs/change.rb:122 def to_a; end - # source://diff-lcs//lib/diff/lcs/change.rb#122 + # pkg:gem/diff-lcs#lib/diff/lcs/change.rb:130 def to_ary; end class << self - # source://diff-lcs//lib/diff/lcs/change.rb#132 + # pkg:gem/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 + # pkg:gem/diff-lcs#lib/diff/lcs/change.rb:138 def simplify(event); end end end @@ -700,15 +664,15 @@ end # require 'pp' # pp diffs.map { |e| e.map { |f| f.to_a } } # -# source://diff-lcs//lib/diff/lcs/callbacks.rb#225 +# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:225 class Diff::LCS::ContextDiffCallbacks < ::Diff::LCS::DiffCallbacks - # source://diff-lcs//lib/diff/lcs/callbacks.rb#234 + # pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:234 def change(event); end - # source://diff-lcs//lib/diff/lcs/callbacks.rb#226 + # pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:226 def discard_a(event); end - # source://diff-lcs//lib/diff/lcs/callbacks.rb#230 + # pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:230 def discard_b(event); end end @@ -721,31 +685,32 @@ end # # Diff::LCS.LCS(seq1, seq2, Diff::LCS::DefaultCallbacks) # -# source://diff-lcs//lib/diff/lcs/callbacks.rb#14 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:17 def match(event); end private + # pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:36 def new(*_arg0); end end end @@ -800,38 +765,34 @@ end # require 'pp' # pp diffs.map { |e| e.map { |f| f.to_a } } # -# source://diff-lcs//lib/diff/lcs/callbacks.rb#108 +# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:108 class Diff::LCS::DiffCallbacks - # :yields: self - # - # @return [DiffCallbacks] a new instance of DiffCallbacks - # - # source://diff-lcs//lib/diff/lcs/callbacks.rb#112 + # pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:112 def initialize; end # Returns the difference set collected during the diff process. # - # source://diff-lcs//lib/diff/lcs/callbacks.rb#110 + # pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:110 def diffs; end - # source://diff-lcs//lib/diff/lcs/callbacks.rb#135 + # pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:135 def discard_a(event); end - # source://diff-lcs//lib/diff/lcs/callbacks.rb#139 + # pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:139 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#127 + # pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:127 def finish; end - # source://diff-lcs//lib/diff/lcs/callbacks.rb#131 + # pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:131 def match(_event); end private - # source://diff-lcs//lib/diff/lcs/callbacks.rb#143 + # pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:143 def finish_hunk; end end @@ -839,132 +800,110 @@ end # 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 +# pkg:gem/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 + # pkg:gem/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#64 + # pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:64 def blocks; end # Returns a diff string based on a format. # - # source://diff-lcs//lib/diff/lcs/hunk.rb#115 + # pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:115 def diff(format, last = T.unsafe(nil)); end - # Returns the value of attribute end_new. - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#66 + # pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:66 def end_new; end - # Returns the value of attribute end_old. - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#66 + # pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:66 def end_old; end - # Returns the value of attribute file_length_difference. - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#67 + # pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:67 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#71 + # pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:71 def flag_context; end - # source://diff-lcs//lib/diff/lcs/hunk.rb#73 + # pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:71 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#97 + # pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:97 def merge(hunk); end - # @return [Boolean] - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#347 + # pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:347 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#109 + # pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:109 def overlaps?(hunk); end - # Returns the value of attribute start_new. - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#65 + # pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:65 def start_new; end - # Returns the value of attribute start_old. - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#65 + # pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:65 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#97 + # pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:104 def unshift(hunk); end private - # source://diff-lcs//lib/diff/lcs/hunk.rb#222 + # pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:222 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#316 + # pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:316 def context_range(mode, op); end - # source://diff-lcs//lib/diff/lcs/hunk.rb#284 + # pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:284 def ed_diff(format, last); end - # source://diff-lcs//lib/diff/lcs/hunk.rb#360 + # pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:360 def encode(literal, target_encoding = T.unsafe(nil)); end - # source://diff-lcs//lib/diff/lcs/hunk.rb#364 + # pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:364 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#134 + # pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:134 def old_diff(last = T.unsafe(nil)); end - # source://diff-lcs//lib/diff/lcs/hunk.rb#167 + # pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:167 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#331 + # pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:331 def unified_range(mode); end end -# source://diff-lcs//lib/diff/lcs/hunk.rb#10 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 @@ -972,7 +911,7 @@ module Diff::LCS::Internals # 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 + # pkg:gem/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 @@ -983,7 +922,7 @@ module Diff::LCS::Internals # 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 + # pkg:gem/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 @@ -995,7 +934,7 @@ module Diff::LCS::Internals # assert_equal(a[i], b[e]) unless e.nil? # end # - # source://diff-lcs//lib/diff/lcs/internals.rb#41 + # pkg:gem/diff-lcs#lib/diff/lcs/internals.rb:41 def lcs(a, b); end private @@ -1004,14 +943,14 @@ module Diff::LCS::Internals # Enumerable, compute the inverse of +vector+ that maps this Enumerable # onto the collection. (Currently unused.) # - # source://diff-lcs//lib/diff/lcs/internals.rb#286 + # pkg:gem/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 + # pkg:gem/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 @@ -1023,7 +962,7 @@ module Diff::LCS::Internals # # This operation preserves the sort order. # - # source://diff-lcs//lib/diff/lcs/internals.rb#252 + # pkg:gem/diff-lcs#lib/diff/lcs/internals.rb:252 def replace_next_larger(enum, value, last_index = T.unsafe(nil)); end end end @@ -1093,32 +1032,26 @@ end # require 'pp' # pp diffs.map { |e| e.to_a } # -# source://diff-lcs//lib/diff/lcs/callbacks.rb#303 +# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:303 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#307 + # pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:307 def initialize; end - # source://diff-lcs//lib/diff/lcs/callbacks.rb#324 + # pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:324 def change(event); end # Returns the difference set collected during the diff process. # - # source://diff-lcs//lib/diff/lcs/callbacks.rb#305 + # pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:305 def diffs; end - # source://diff-lcs//lib/diff/lcs/callbacks.rb#316 + # pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:316 def discard_a(event); end - # source://diff-lcs//lib/diff/lcs/callbacks.rb#320 + # pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:320 def discard_b(event); end - # source://diff-lcs//lib/diff/lcs/callbacks.rb#312 + # pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:312 def match(event); end end @@ -1127,8 +1060,8 @@ end # # Diff::LCS.LCS(seq1, seq2, Diff::LCS::SequenceCallbacks) # -# source://diff-lcs//lib/diff/lcs/callbacks.rb#44 +# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:44 Diff::LCS::SequenceCallbacks = Diff::LCS::DefaultCallbacks -# source://diff-lcs//lib/diff/lcs.rb#52 +# pkg:gem/diff-lcs#lib/diff/lcs/version.rb:5 Diff::LCS::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/drb@2.2.1.rbi b/sorbet/rbi/gems/drb@2.2.1.rbi deleted file mode 100644 index 4c77c96..0000000 --- a/sorbet/rbi/gems/drb@2.2.1.rbi +++ /dev/null @@ -1,1301 +0,0 @@ -# typed: false - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `drb` gem. -# Please instead update this file by running `bin/tapioca gem drb`. - - -# for ruby-1.8.0 -# -# source://drb//lib/drb/eq.rb#2 -module DRb - private - - # Get the configuration of the current server. - # - # If there is no current server, this returns the default configuration. - # See #current_server and DRbServer::make_config. - # - # source://drb//lib/drb/drb.rb#1832 - def config; end - - # Get the 'current' server. - # - # In the context of execution taking place within the main - # thread of a dRuby server (typically, as a result of a remote - # call on the server or one of its objects), the current - # server is that server. Otherwise, the current server is - # the primary server. - # - # If the above rule fails to find a server, a DRbServerNotFound - # error is raised. - # - # @raise [DRbServerNotFound] - # - # source://drb//lib/drb/drb.rb#1789 - def current_server; end - - # Retrieves the server with the given +uri+. - # - # See also regist_server and remove_server. - # - # source://drb//lib/drb/drb.rb#1934 - def fetch_server(uri); end - - # Get the front object of the current server. - # - # This raises a DRbServerNotFound error if there is no current server. - # See #current_server. - # - # source://drb//lib/drb/drb.rb#1843 - def front; end - - # Is +uri+ the URI for the current local server? - # - # @return [Boolean] - # - # source://drb//lib/drb/drb.rb#1822 - def here?(uri); end - - # Set the default ACL to +acl+. - # - # See DRb::DRbServer.default_acl. - # - # source://drb//lib/drb/drb.rb#1888 - def install_acl(acl); end - - # Set the default id conversion object. - # - # This is expected to be an instance such as DRb::DRbIdConv that responds to - # #to_id and #to_obj that can convert objects to and from DRb references. - # - # See DRbServer#default_id_conv. - # - # source://drb//lib/drb/drb.rb#1880 - def install_id_conv(idconv); end - - # source://drb//lib/drb/drb.rb#1894 - def mutex; end - - # The primary local dRuby server. - # - # This is the server created by the #start_service call. - # - # source://drb//lib/drb/drb.rb#1776 - def primary_server; end - - # The primary local dRuby server. - # - # This is the server created by the #start_service call. - # - # source://drb//lib/drb/drb.rb#1776 - def primary_server=(_arg0); end - - # Registers +server+ with DRb. - # - # This is called when a new DRb::DRbServer is created. - # - # If there is no primary server then +server+ becomes the primary server. - # - # Example: - # - # require 'drb' - # - # s = DRb::DRbServer.new # automatically calls regist_server - # DRb.fetch_server s.uri #=> # - # - # source://drb//lib/drb/drb.rb#1912 - def regist_server(server); end - - # Removes +server+ from the list of registered servers. - # - # source://drb//lib/drb/drb.rb#1921 - def remove_server(server); end - - # Start a dRuby server locally. - # - # The new dRuby server will become the primary server, even - # if another server is currently the primary server. - # - # +uri+ is the URI for the server to bind to. If nil, - # the server will bind to random port on the default local host - # name and use the default dRuby protocol. - # - # +front+ is the server's front object. This may be nil. - # - # +config+ is the configuration for the new server. This may - # be nil. - # - # See DRbServer::new. - # - # source://drb//lib/drb/drb.rb#1768 - def start_service(uri = T.unsafe(nil), front = T.unsafe(nil), config = T.unsafe(nil)); end - - # Stop the local dRuby server. - # - # This operates on the primary server. If there is no primary - # server currently running, it is a noop. - # - # source://drb//lib/drb/drb.rb#1801 - def stop_service; end - - # Get the thread of the primary server. - # - # This returns nil if there is no primary server. See #primary_server. - # - # source://drb//lib/drb/drb.rb#1869 - def thread; end - - # Get a reference id for an object using the current server. - # - # This raises a DRbServerNotFound error if there is no current server. - # See #current_server. - # - # source://drb//lib/drb/drb.rb#1860 - def to_id(obj); end - - # Convert a reference into an object using the current server. - # - # This raises a DRbServerNotFound error if there is no current server. - # See #current_server. - # - # source://drb//lib/drb/drb.rb#1852 - def to_obj(ref); end - - # Get the URI defining the local dRuby space. - # - # This is the URI of the current server. See #current_server. - # - # source://drb//lib/drb/drb.rb#1810 - def uri; end - - class << self - # Get the configuration of the current server. - # - # If there is no current server, this returns the default configuration. - # See #current_server and DRbServer::make_config. - # - # source://drb//lib/drb/drb.rb#1832 - def config; end - - # Get the 'current' server. - # - # In the context of execution taking place within the main - # thread of a dRuby server (typically, as a result of a remote - # call on the server or one of its objects), the current - # server is that server. Otherwise, the current server is - # the primary server. - # - # If the above rule fails to find a server, a DRbServerNotFound - # error is raised. - # - # @raise [DRbServerNotFound] - # - # source://drb//lib/drb/drb.rb#1789 - def current_server; end - - # Retrieves the server with the given +uri+. - # - # See also regist_server and remove_server. - # - # source://drb//lib/drb/drb.rb#1934 - def fetch_server(uri); end - - # Get the front object of the current server. - # - # This raises a DRbServerNotFound error if there is no current server. - # See #current_server. - # - # source://drb//lib/drb/drb.rb#1843 - def front; end - - # Is +uri+ the URI for the current local server? - # - # @return [Boolean] - # - # source://drb//lib/drb/drb.rb#1822 - def here?(uri); end - - # Set the default ACL to +acl+. - # - # See DRb::DRbServer.default_acl. - # - # source://drb//lib/drb/drb.rb#1888 - def install_acl(acl); end - - # Set the default id conversion object. - # - # This is expected to be an instance such as DRb::DRbIdConv that responds to - # #to_id and #to_obj that can convert objects to and from DRb references. - # - # See DRbServer#default_id_conv. - # - # source://drb//lib/drb/drb.rb#1880 - def install_id_conv(idconv); end - - # source://drb//lib/drb/drb.rb#1894 - def mutex; end - - # The primary local dRuby server. - # - # This is the server created by the #start_service call. - # - # source://drb//lib/drb/drb.rb#1776 - def primary_server; end - - # The primary local dRuby server. - # - # This is the server created by the #start_service call. - # - # source://drb//lib/drb/drb.rb#1776 - def primary_server=(_arg0); end - - # Registers +server+ with DRb. - # - # This is called when a new DRb::DRbServer is created. - # - # If there is no primary server then +server+ becomes the primary server. - # - # Example: - # - # require 'drb' - # - # s = DRb::DRbServer.new # automatically calls regist_server - # DRb.fetch_server s.uri #=> # - # - # source://drb//lib/drb/drb.rb#1912 - def regist_server(server); end - - # Removes +server+ from the list of registered servers. - # - # source://drb//lib/drb/drb.rb#1921 - def remove_server(server); end - - # Start a dRuby server locally. - # - # The new dRuby server will become the primary server, even - # if another server is currently the primary server. - # - # +uri+ is the URI for the server to bind to. If nil, - # the server will bind to random port on the default local host - # name and use the default dRuby protocol. - # - # +front+ is the server's front object. This may be nil. - # - # +config+ is the configuration for the new server. This may - # be nil. - # - # See DRbServer::new. - # - # source://drb//lib/drb/drb.rb#1768 - def start_service(uri = T.unsafe(nil), front = T.unsafe(nil), config = T.unsafe(nil)); end - - # Stop the local dRuby server. - # - # This operates on the primary server. If there is no primary - # server currently running, it is a noop. - # - # source://drb//lib/drb/drb.rb#1801 - def stop_service; end - - # Get the thread of the primary server. - # - # This returns nil if there is no primary server. See #primary_server. - # - # source://drb//lib/drb/drb.rb#1869 - def thread; end - - # Get a reference id for an object using the current server. - # - # This raises a DRbServerNotFound error if there is no current server. - # See #current_server. - # - # source://drb//lib/drb/drb.rb#1860 - def to_id(obj); end - - # Convert a reference into an object using the current server. - # - # This raises a DRbServerNotFound error if there is no current server. - # See #current_server. - # - # source://drb//lib/drb/drb.rb#1852 - def to_obj(ref); end - - # Get the URI defining the local dRuby space. - # - # This is the URI of the current server. See #current_server. - # - # source://drb//lib/drb/drb.rb#1810 - def uri; end - end -end - -# An Array wrapper that can be sent to another server via DRb. -# -# All entries in the array will be dumped or be references that point to -# the local server. -# -# source://drb//lib/drb/drb.rb#518 -class DRb::DRbArray - # Creates a new DRbArray that either dumps or wraps all the items in the - # Array +ary+ so they can be loaded by a remote DRb server. - # - # @return [DRbArray] a new instance of DRbArray - # - # source://drb//lib/drb/drb.rb#523 - def initialize(ary); end - - # source://drb//lib/drb/drb.rb#542 - def _dump(lv); end - - class << self - # source://drb//lib/drb/drb.rb#538 - def _load(s); end - end -end - -# Class handling the connection between a DRbObject and the -# server the real object lives on. -# -# This class maintains a pool of connections, to reduce the -# overhead of starting and closing down connections for each -# method call. -# -# This class is used internally by DRbObject. The user does -# not normally need to deal with it directly. -# -# source://drb//lib/drb/drb.rb#1256 -class DRb::DRbConn - # @return [DRbConn] a new instance of DRbConn - # - # source://drb//lib/drb/drb.rb#1317 - def initialize(remote_uri); end - - # @return [Boolean] - # - # source://drb//lib/drb/drb.rb#1333 - def alive?; end - - # source://drb//lib/drb/drb.rb#1328 - def close; end - - # source://drb//lib/drb/drb.rb#1323 - def send_message(ref, msg_id, arg, block); end - - # source://drb//lib/drb/drb.rb#1321 - def uri; end - - class << self - # source://drb//lib/drb/drb.rb#1259 - def make_pool; end - - # source://drb//lib/drb/drb.rb#1297 - def open(remote_uri); end - - # source://drb//lib/drb/drb.rb#1292 - def stop_pool; end - end -end - -# Class responsible for converting between an object and its id. -# -# This, the default implementation, uses an object's local ObjectSpace -# __id__ as its id. This means that an object's identification over -# drb remains valid only while that object instance remains alive -# within the server runtime. -# -# For alternative mechanisms, see DRb::TimerIdConv in drb/timeridconv.rb -# and DRbNameIdConv in sample/name.rb in the full drb distribution. -# -# source://drb//lib/drb/drb.rb#360 -class DRb::DRbIdConv - # Convert an object into a reference id. - # - # This implementation returns the object's __id__ in the local - # object space. - # - # source://drb//lib/drb/drb.rb#374 - def to_id(obj); end - - # Convert an object reference id to an object. - # - # This implementation looks up the reference id in the local object - # space and returns the object it refers to. - # - # source://drb//lib/drb/drb.rb#366 - def to_obj(ref); end -end - -# Handler for sending and receiving drb messages. -# -# This takes care of the low-level marshalling and unmarshalling -# of drb requests and responses sent over the wire between server -# and client. This relieves the implementor of a new drb -# protocol layer with having to deal with these details. -# -# The user does not have to directly deal with this object in -# normal use. -# -# source://drb//lib/drb/drb.rb#556 -class DRb::DRbMessage - # @return [DRbMessage] a new instance of DRbMessage - # - # source://drb//lib/drb/drb.rb#557 - def initialize(config); end - - # source://drb//lib/drb/drb.rb#562 - def dump(obj, error = T.unsafe(nil)); end - - # @raise [DRbConnError] - # - # source://drb//lib/drb/drb.rb#579 - def load(soc); end - - # source://drb//lib/drb/drb.rb#639 - def recv_reply(stream); end - - # @raise [DRbConnError] - # - # source://drb//lib/drb/drb.rb#619 - def recv_request(stream); end - - # source://drb//lib/drb/drb.rb#633 - def send_reply(stream, succ, result); end - - # source://drb//lib/drb/drb.rb#605 - def send_request(stream, ref, msg_id, arg, b); end - - private - - # source://drb//lib/drb/drb.rb#646 - def make_proxy(obj, error = T.unsafe(nil)); end -end - -# source://drb//lib/drb/eq.rb#3 -class DRb::DRbObject - # Create a new remote object stub. - # - # +obj+ is the (local) object we want to create a stub for. Normally - # this is +nil+. +uri+ is the URI of the remote object that this - # will be a stub for. - # - # @return [DRbObject] a new instance of DRbObject - # - # source://drb//lib/drb/drb.rb#1089 - def initialize(obj, uri = T.unsafe(nil)); end - - # source://drb//lib/drb/eq.rb#4 - def ==(other); end - - # Get the reference of the object, if local. - # - # source://drb//lib/drb/drb.rb#1115 - def __drbref; end - - # Get the URI of the remote object. - # - # source://drb//lib/drb/drb.rb#1110 - def __drburi; end - - # Marshall this object. - # - # The URI and ref of the object are marshalled. - # - # source://drb//lib/drb/drb.rb#1080 - def _dump(lv); end - - # source://drb//lib/drb/eq.rb#4 - def eql?(other); end - - # source://drb//lib/drb/eq.rb#9 - def hash; end - - # source://drb//lib/drb/drb.rb#1135 - def method_missing(msg_id, *a, **_arg2, &b); end - - # source://drb//lib/drb/drb.rb#1187 - def pretty_print(q); end - - # source://drb//lib/drb/drb.rb#1191 - def pretty_print_cycle(q); end - - # Routes respond_to? to the referenced remote object. - # - # @return [Boolean] - # - # source://drb//lib/drb/drb.rb#1123 - def respond_to?(msg_id, priv = T.unsafe(nil)); end - - class << self - # Unmarshall a marshalled DRbObject. - # - # If the referenced object is located within the local server, then - # the object itself is returned. Otherwise, a new DRbObject is - # created to act as a stub for the remote referenced object. - # - # source://drb//lib/drb/drb.rb#1051 - def _load(s); end - - # Creates a DRb::DRbObject given the reference information to the remote - # host +uri+ and object +ref+. - # - # source://drb//lib/drb/drb.rb#1065 - def new_with(uri, ref); end - - # Create a new DRbObject from a URI alone. - # - # source://drb//lib/drb/drb.rb#1073 - def new_with_uri(uri); end - - # Returns a modified backtrace from +result+ with the +uri+ where each call - # in the backtrace came from. - # - # source://drb//lib/drb/drb.rb#1173 - def prepare_backtrace(uri, result); end - - # Given the +uri+ of another host executes the block provided. - # - # source://drb//lib/drb/drb.rb#1160 - def with_friend(uri); end - end -end - -# Module managing the underlying network protocol(s) used by drb. -# -# By default, drb uses the DRbTCPSocket protocol. Other protocols -# can be defined. A protocol must define the following class methods: -# -# [open(uri, config)] Open a client connection to the server at +uri+, -# using configuration +config+. Return a protocol -# instance for this connection. -# [open_server(uri, config)] Open a server listening at +uri+, -# using configuration +config+. Return a -# protocol instance for this listener. -# [uri_option(uri, config)] Take a URI, possibly containing an option -# component (e.g. a trailing '?param=val'), -# and return a [uri, option] tuple. -# -# All of these methods should raise a DRbBadScheme error if the URI -# does not identify the protocol they support (e.g. "druby:" for -# the standard Ruby protocol). This is how the DRbProtocol module, -# given a URI, determines which protocol implementation serves that -# protocol. -# -# The protocol instance returned by #open_server must have the -# following methods: -# -# [accept] Accept a new connection to the server. Returns a protocol -# instance capable of communicating with the client. -# [close] Close the server connection. -# [uri] Get the URI for this server. -# -# The protocol instance returned by #open must have the following methods: -# -# [send_request (ref, msg_id, arg, b)] -# Send a request to +ref+ with the given message id and arguments. -# This is most easily implemented by calling DRbMessage.send_request, -# providing a stream that sits on top of the current protocol. -# [recv_reply] -# Receive a reply from the server and return it as a [success-boolean, -# reply-value] pair. This is most easily implemented by calling -# DRb.recv_reply, providing a stream that sits on top of the -# current protocol. -# [alive?] -# Is this connection still alive? -# [close] -# Close this connection. -# -# The protocol instance returned by #open_server().accept() must have -# the following methods: -# -# [recv_request] -# Receive a request from the client and return a [object, message, -# args, block] tuple. This is most easily implemented by calling -# DRbMessage.recv_request, providing a stream that sits on top of -# the current protocol. -# [send_reply(succ, result)] -# Send a reply to the client. This is most easily implemented -# by calling DRbMessage.send_reply, providing a stream that sits -# on top of the current protocol. -# [close] -# Close this connection. -# -# A new protocol is registered with the DRbProtocol module using -# the add_protocol method. -# -# For examples of other protocols, see DRbUNIXSocket in drb/unix.rb, -# and HTTP0 in sample/http0.rb and sample/http0serv.rb in the full -# drb distribution. -# -# source://drb//lib/drb/drb.rb#721 -module DRb::DRbProtocol - private - - # Add a new protocol to the DRbProtocol module. - # - # source://drb//lib/drb/drb.rb#724 - def add_protocol(prot); end - - # source://drb//lib/drb/drb.rb#802 - def auto_load(uri); end - - # Open a client connection to +uri+ with the configuration +config+. - # - # The DRbProtocol module asks each registered protocol in turn to - # try to open the URI. Each protocol signals that it does not handle that - # URI by raising a DRbBadScheme error. If no protocol recognises the - # URI, then a DRbBadURI error is raised. If a protocol accepts the - # URI, but an error occurs in opening it, a DRbConnError is raised. - # - # @raise [DRbBadURI] - # - # source://drb//lib/drb/drb.rb#736 - def open(uri, config, first = T.unsafe(nil)); end - - # Open a server listening for connections at +uri+ with - # configuration +config+. - # - # The DRbProtocol module asks each registered protocol in turn to - # try to open a server at the URI. Each protocol signals that it does - # not handle that URI by raising a DRbBadScheme error. If no protocol - # recognises the URI, then a DRbBadURI error is raised. If a protocol - # accepts the URI, but an error occurs in opening it, the underlying - # error is passed on to the caller. - # - # @raise [DRbBadURI] - # - # source://drb//lib/drb/drb.rb#764 - def open_server(uri, config, first = T.unsafe(nil)); end - - # Parse +uri+ into a [uri, option] pair. - # - # The DRbProtocol module asks each registered protocol in turn to - # try to parse the URI. Each protocol signals that it does not handle that - # URI by raising a DRbBadScheme error. If no protocol recognises the - # URI, then a DRbBadURI error is raised. - # - # @raise [DRbBadURI] - # - # source://drb//lib/drb/drb.rb#785 - def uri_option(uri, config, first = T.unsafe(nil)); end - - class << self - # Add a new protocol to the DRbProtocol module. - # - # source://drb//lib/drb/drb.rb#724 - def add_protocol(prot); end - - # source://drb//lib/drb/drb.rb#802 - def auto_load(uri); end - - # Open a client connection to +uri+ with the configuration +config+. - # - # The DRbProtocol module asks each registered protocol in turn to - # try to open the URI. Each protocol signals that it does not handle that - # URI by raising a DRbBadScheme error. If no protocol recognises the - # URI, then a DRbBadURI error is raised. If a protocol accepts the - # URI, but an error occurs in opening it, a DRbConnError is raised. - # - # @raise [DRbBadURI] - # - # source://drb//lib/drb/drb.rb#736 - def open(uri, config, first = T.unsafe(nil)); end - - # Open a server listening for connections at +uri+ with - # configuration +config+. - # - # The DRbProtocol module asks each registered protocol in turn to - # try to open a server at the URI. Each protocol signals that it does - # not handle that URI by raising a DRbBadScheme error. If no protocol - # recognises the URI, then a DRbBadURI error is raised. If a protocol - # accepts the URI, but an error occurs in opening it, the underlying - # error is passed on to the caller. - # - # @raise [DRbBadURI] - # - # source://drb//lib/drb/drb.rb#764 - def open_server(uri, config, first = T.unsafe(nil)); end - - # Parse +uri+ into a [uri, option] pair. - # - # The DRbProtocol module asks each registered protocol in turn to - # try to parse the URI. Each protocol signals that it does not handle that - # URI by raising a DRbBadScheme error. If no protocol recognises the - # URI, then a DRbBadURI error is raised. - # - # @raise [DRbBadURI] - # - # source://drb//lib/drb/drb.rb#785 - def uri_option(uri, config, first = T.unsafe(nil)); end - end -end - -# An exception wrapping an error object -# -# source://drb//lib/drb/drb.rb#431 -class DRb::DRbRemoteError < ::DRb::DRbError - # Creates a new remote error that wraps the Exception +error+ - # - # @return [DRbRemoteError] a new instance of DRbRemoteError - # - # source://drb//lib/drb/drb.rb#434 - def initialize(error); end - - # the class of the error, as a string. - # - # source://drb//lib/drb/drb.rb#441 - def reason; end -end - -# source://drb//lib/drb/drb.rb#1350 -class DRb::DRbServer - # Create a new DRbServer instance. - # - # +uri+ is the URI to bind to. This is normally of the form - # 'druby://:' where is a hostname of - # the local machine. If nil, then the system's default hostname - # will be bound to, on a port selected by the system; these value - # can be retrieved from the +uri+ attribute. 'druby:' specifies - # the default dRuby transport protocol: another protocol, such - # as 'drbunix:', can be specified instead. - # - # +front+ is the front object for the server, that is, the object - # to which remote method calls on the server will be passed. If - # nil, then the server will not accept remote method calls. - # - # If +config_or_acl+ is a hash, it is the configuration to - # use for this server. The following options are recognised: - # - # :idconv :: an id-to-object conversion object. This defaults - # to an instance of the class DRb::DRbIdConv. - # :verbose :: if true, all unsuccessful remote calls on objects - # in the server will be logged to $stdout. false - # by default. - # :tcp_acl :: the access control list for this server. See - # the ACL class from the main dRuby distribution. - # :load_limit :: the maximum message size in bytes accepted by - # the server. Defaults to 25 MB (26214400). - # :argc_limit :: the maximum number of arguments to a remote - # method accepted by the server. Defaults to - # 256. - # The default values of these options can be modified on - # a class-wide basis by the class methods #default_argc_limit, - # #default_load_limit, #default_acl, #default_id_conv, - # and #verbose= - # - # If +config_or_acl+ is not a hash, but is not nil, it is - # assumed to be the access control list for this server. - # See the :tcp_acl option for more details. - # - # If no other server is currently set as the primary server, - # this will become the primary server. - # - # The server will immediately start running in its own thread. - # - # @return [DRbServer] a new instance of DRbServer - # - # source://drb//lib/drb/drb.rb#1451 - def initialize(uri = T.unsafe(nil), front = T.unsafe(nil), config_or_acl = T.unsafe(nil)); end - - # Is this server alive? - # - # @return [Boolean] - # - # source://drb//lib/drb/drb.rb#1506 - def alive?; end - - # Check that a method is callable via dRuby. - # - # +obj+ is the object we want to invoke the method on. +msg_id+ is the - # method name, as a Symbol. - # - # If the method is an insecure method (see #insecure_method?) a - # SecurityError is thrown. If the method is private or undefined, - # a NameError is thrown. - # - # @raise [ArgumentError] - # - # source://drb//lib/drb/drb.rb#1594 - def check_insecure_method(obj, msg_id); end - - # The configuration of this DRbServer - # - # source://drb//lib/drb/drb.rb#1493 - def config; end - - # The front object of the DRbServer. - # - # This object receives remote method calls made on the server's - # URI alone, with an object id. - # - # source://drb//lib/drb/drb.rb#1490 - def front; end - - # Is +uri+ the URI for this server? - # - # @return [Boolean] - # - # source://drb//lib/drb/drb.rb#1511 - def here?(uri); end - - # Stop this server. - # - # source://drb//lib/drb/drb.rb#1516 - def stop_service; end - - # The main thread of this DRbServer. - # - # This is the thread that listens for and accepts connections - # from clients, not that handles each client's request-response - # session. - # - # source://drb//lib/drb/drb.rb#1484 - def thread; end - - # Convert a local object to a dRuby reference. - # - # source://drb//lib/drb/drb.rb#1533 - def to_id(obj); end - - # Convert a dRuby reference to the local object it refers to. - # - # source://drb//lib/drb/drb.rb#1526 - def to_obj(ref); end - - # The URI of this DRbServer. - # - # source://drb//lib/drb/drb.rb#1477 - def uri; end - - # Get whether the server is in verbose mode. - # - # In verbose mode, failed calls are logged to stdout. - # - # source://drb//lib/drb/drb.rb#1503 - def verbose; end - - # Set whether to operate in verbose mode. - # - # In verbose mode, failed calls are logged to stdout. - # - # source://drb//lib/drb/drb.rb#1498 - def verbose=(v); end - - private - - # Coerce an object to a string, providing our own representation if - # to_s is not defined for the object. - # - # source://drb//lib/drb/drb.rb#1580 - def any_to_s(obj); end - - # source://drb//lib/drb/drb.rb#1696 - def error_print(exception); end - - # Has a method been included in the list of insecure methods? - # - # @return [Boolean] - # - # source://drb//lib/drb/drb.rb#1574 - def insecure_method?(msg_id); end - - # The main loop performed by a DRbServer's internal thread. - # - # Accepts a connection from a client, and starts up its own - # thread to handle it. This thread loops, receiving requests - # from the client, invoking them on a local object, and - # returning responses, until the client closes the connection - # or a local method call fails. - # - # source://drb//lib/drb/drb.rb#1714 - def main_loop; end - - # Starts the DRb main loop in a new thread. - # - # source://drb//lib/drb/drb.rb#1555 - def run; end - - # source://drb//lib/drb/drb.rb#1540 - def shutdown; end - - class << self - # Set the default access control list to +acl+. The default ACL is +nil+. - # - # See also DRb::ACL and #new() - # - # source://drb//lib/drb/drb.rb#1375 - def default_acl(acl); end - - # Set the default value for the :argc_limit option. - # - # See #new(). The initial default value is 256. - # - # source://drb//lib/drb/drb.rb#1361 - def default_argc_limit(argc); end - - # Set the default value for the :id_conv option. - # - # See #new(). The initial default value is a DRbIdConv instance. - # - # source://drb//lib/drb/drb.rb#1382 - def default_id_conv(idconv); end - - # Set the default value for the :load_limit option. - # - # See #new(). The initial default value is 25 MB. - # - # source://drb//lib/drb/drb.rb#1368 - def default_load_limit(sz); end - - # source://drb//lib/drb/drb.rb#1398 - def make_config(hash = T.unsafe(nil)); end - - # Get the default value of the :verbose option. - # - # source://drb//lib/drb/drb.rb#1394 - def verbose; end - - # Set the default value of the :verbose option. - # - # See #new(). The initial default value is false. - # - # source://drb//lib/drb/drb.rb#1389 - def verbose=(on); end - end -end - -# source://drb//lib/drb/drb.rb#1624 -class DRb::DRbServer::InvokeMethod - include ::DRb::DRbServer::InvokeMethod18Mixin - - # @return [InvokeMethod] a new instance of InvokeMethod - # - # source://drb//lib/drb/drb.rb#1625 - def initialize(drb_server, client); end - - # source://drb//lib/drb/drb.rb#1630 - def perform; end - - private - - # source://drb//lib/drb/drb.rb#1667 - def check_insecure_method; end - - # source://drb//lib/drb/drb.rb#1659 - def init_with_client; end - - # source://drb//lib/drb/drb.rb#1676 - def perform_without_block; end - - # source://drb//lib/drb/drb.rb#1671 - def setup_message; end -end - -# source://drb//lib/drb/invokemethod.rb#6 -module DRb::DRbServer::InvokeMethod18Mixin - # source://drb//lib/drb/invokemethod.rb#7 - def block_yield(x); end - - # source://drb//lib/drb/invokemethod.rb#14 - def perform_with_block; end -end - -# The default drb protocol which communicates over a TCP socket. -# -# The DRb TCP protocol URI looks like: -# druby://:?. The option is optional. -# -# source://drb//lib/drb/drb.rb#815 -class DRb::DRbTCPSocket - # Create a new DRbTCPSocket instance. - # - # +uri+ is the URI we are connected to. - # +soc+ is the tcp socket we are bound to. +config+ is our - # configuration. - # - # @return [DRbTCPSocket] a new instance of DRbTCPSocket - # - # source://drb//lib/drb/drb.rb#903 - def initialize(uri, soc, config = T.unsafe(nil)); end - - # On the server side, for an instance returned by #open_server, - # accept a client connection and return a new instance to handle - # the server's side of this client-server session. - # - # source://drb//lib/drb/drb.rb#971 - def accept; end - - # Check to see if this connection is alive. - # - # @return [Boolean] - # - # source://drb//lib/drb/drb.rb#1001 - def alive?; end - - # Close the connection. - # - # If this is an instance returned by #open_server, then this stops - # listening for new connections altogether. If this is an instance - # returned by #open or by #accept, then it closes this particular - # client-server session. - # - # source://drb//lib/drb/drb.rb#953 - def close; end - - # Get the address of our TCP peer (the other end of the socket - # we are bound to. - # - # source://drb//lib/drb/drb.rb#918 - def peeraddr; end - - # On the client side, receive a reply from the server. - # - # source://drb//lib/drb/drb.rb#941 - def recv_reply; end - - # On the server side, receive a request from the client. - # - # source://drb//lib/drb/drb.rb#931 - def recv_request; end - - # On the server side, send a reply to the client. - # - # source://drb//lib/drb/drb.rb#936 - def send_reply(succ, result); end - - # On the client side, send a request to the server. - # - # source://drb//lib/drb/drb.rb#926 - def send_request(ref, msg_id, arg, b); end - - # source://drb//lib/drb/drb.rb#1010 - def set_sockopt(soc); end - - # Graceful shutdown - # - # source://drb//lib/drb/drb.rb#996 - def shutdown; end - - # Get the socket. - # - # source://drb//lib/drb/drb.rb#923 - def stream; end - - # Get the URI that we are connected to. - # - # source://drb//lib/drb/drb.rb#914 - def uri; end - - private - - # source://drb//lib/drb/drb.rb#986 - def accept_or_shutdown; end - - # source://drb//lib/drb/drb.rb#962 - def close_shutdown_pipe; end - - class << self - # Returns the hostname of this server - # - # source://drb//lib/drb/drb.rb#845 - def getservername; end - - # Open a client connection to +uri+ (DRb URI string) using configuration - # +config+. - # - # This can raise DRb::DRbBadScheme or DRb::DRbBadURI if +uri+ is not for a - # recognized protocol. See DRb::DRbServer.new for information on built-in - # URI protocols. - # - # source://drb//lib/drb/drb.rb#838 - def open(uri, config); end - - # Open a server listening for connections at +uri+ using - # configuration +config+. - # - # source://drb//lib/drb/drb.rb#876 - def open_server(uri, config); end - - # For the families available for +host+, returns a TCPServer on +port+. - # If +port+ is 0 the first available port is used. IPv4 servers are - # preferred over IPv6 servers. - # - # source://drb//lib/drb/drb.rb#861 - def open_server_inaddr_any(host, port); end - - # source://drb//lib/drb/drb.rb#818 - def parse_uri(uri); end - - # Parse +uri+ into a [uri, option] pair. - # - # source://drb//lib/drb/drb.rb#893 - def uri_option(uri, config); end - end -end - -# source://drb//lib/drb/drb.rb#1021 -class DRb::DRbURIOption - # @return [DRbURIOption] a new instance of DRbURIOption - # - # source://drb//lib/drb/drb.rb#1022 - def initialize(option); end - - # source://drb//lib/drb/drb.rb#1028 - def ==(other); end - - # source://drb//lib/drb/drb.rb#1028 - def eql?(other); end - - # source://drb//lib/drb/drb.rb#1033 - def hash; end - - # Returns the value of attribute option. - # - # source://drb//lib/drb/drb.rb#1025 - def option; end - - # source://drb//lib/drb/drb.rb#1026 - def to_s; end -end - -# Mixin module making an object undumpable or unmarshallable. -# -# If an object which includes this module is returned by method -# called over drb, then the object remains in the server space -# and a reference to the object is returned, rather than the -# object being marshalled and moved into the client space. -# -# source://drb//lib/drb/drb.rb#390 -module DRb::DRbUndumped - # @raise [TypeError] - # - # source://drb//lib/drb/drb.rb#391 - def _dump(dummy); end -end - -# Class wrapping a marshalled object whose type is unknown locally. -# -# If an object is returned by a method invoked over drb, but the -# class of the object is unknown in the client namespace, or -# the object is a constant unknown in the client namespace, then -# the still-marshalled object is returned wrapped in a DRbUnknown instance. -# -# If this object is passed as an argument to a method invoked over -# drb, then the wrapped object is passed instead. -# -# The class or constant name of the object can be read from the -# +name+ attribute. The marshalled object is held in the +buf+ -# attribute. -# -# source://drb//lib/drb/drb.rb#457 -class DRb::DRbUnknown - # Create a new DRbUnknown object. - # - # +buf+ is a string containing a marshalled object that could not - # be unmarshalled. +err+ is the error message that was raised - # when the unmarshalling failed. It is used to determine the - # name of the unmarshalled object. - # - # @return [DRbUnknown] a new instance of DRbUnknown - # - # source://drb//lib/drb/drb.rb#465 - def initialize(err, buf); end - - # source://drb//lib/drb/drb.rb#494 - def _dump(lv); end - - # Buffer contained the marshalled, unknown object. - # - # source://drb//lib/drb/drb.rb#484 - def buf; end - - # Create a DRbUnknownError exception containing this object. - # - # source://drb//lib/drb/drb.rb#508 - def exception; end - - # The name of the unknown thing. - # - # Class name for unknown objects; variable name for unknown - # constants. - # - # source://drb//lib/drb/drb.rb#481 - def name; end - - # Attempt to load the wrapped marshalled object again. - # - # If the class of the object is now known locally, the object - # will be unmarshalled and returned. Otherwise, a new - # but identical DRbUnknown object will be returned. - # - # source://drb//lib/drb/drb.rb#503 - def reload; end - - class << self - # source://drb//lib/drb/drb.rb#486 - def _load(s); end - end -end - -# An exception wrapping a DRb::DRbUnknown object -# -# source://drb//lib/drb/drb.rb#410 -class DRb::DRbUnknownError < ::DRb::DRbError - # Create a new DRbUnknownError for the DRb::DRbUnknown object +unknown+ - # - # @return [DRbUnknownError] a new instance of DRbUnknownError - # - # source://drb//lib/drb/drb.rb#413 - def initialize(unknown); end - - # source://drb//lib/drb/drb.rb#425 - def _dump(lv); end - - # Get the wrapped DRb::DRbUnknown object. - # - # source://drb//lib/drb/drb.rb#419 - def unknown; end - - class << self - # source://drb//lib/drb/drb.rb#421 - def _load(s); end - end -end - -# source://drb//lib/drb/drb.rb#1199 -class DRb::ThreadObject - include ::MonitorMixin - - # @return [ThreadObject] a new instance of ThreadObject - # - # source://drb//lib/drb/drb.rb#1202 - def initialize(&blk); end - - # source://drb//lib/drb/drb.rb#1237 - def _execute; end - - # @return [Boolean] - # - # source://drb//lib/drb/drb.rb#1213 - def alive?; end - - # source://drb//lib/drb/drb.rb#1217 - def kill; end - - # source://drb//lib/drb/drb.rb#1222 - def method_missing(msg, *arg, &blk); end -end - -# source://drb//lib/drb/version.rb#2 -DRb::VERSION = T.let(T.unsafe(nil), String) - -# source://drb//lib/drb/drb.rb#1943 -DRbIdConv = DRb::DRbIdConv - -# :stopdoc: -# -# source://drb//lib/drb/drb.rb#1941 -DRbObject = DRb::DRbObject - -# source://drb//lib/drb/drb.rb#1942 -DRbUndumped = DRb::DRbUndumped diff --git a/sorbet/rbi/gems/erubi@1.13.1.rbi b/sorbet/rbi/gems/erubi@1.13.1.rbi index a291c13..dcc2f23 100644 --- a/sorbet/rbi/gems/erubi@1.13.1.rbi +++ b/sorbet/rbi/gems/erubi@1.13.1.rbi @@ -5,18 +5,22 @@ # Please instead update this file by running `bin/tapioca gem erubi`. -# source://erubi//lib/erubi.rb#3 +# pkg:gem/erubi#lib/erubi.rb:3 module Erubi private + # Escape characters with their HTML/XML equivalents. + # + # pkg:gem/erubi#lib/erubi.rb:22 def h(_arg0); end class << self + # pkg:gem/erubi#lib/erubi.rb:49 def h(_arg0); end end end -# source://erubi//lib/erubi.rb#51 +# pkg:gem/erubi#lib/erubi.rb:51 class Erubi::Engine # Initialize a new Erubi::Engine. Options: # +:bufval+ :: The value to use for the buffer variable, as a string (default '::String.new'). @@ -45,71 +49,65 @@ class Erubi::Engine # +:src+ :: The initial value to use for the source code, an empty string by default. # +:trim+ :: Whether to trim leading and trailing whitespace, true by default. # - # @return [Engine] a new instance of Engine - # - # source://erubi//lib/erubi.rb#91 + # pkg:gem/erubi#lib/erubi.rb:91 def initialize(input, properties = T.unsafe(nil)); end # The variable name used for the buffer variable. # - # source://erubi//lib/erubi.rb#62 + # pkg:gem/erubi#lib/erubi.rb:62 def bufvar; end # The filename of the template, if one was given. # - # source://erubi//lib/erubi.rb#59 + # pkg:gem/erubi#lib/erubi.rb:59 def filename; end # The frozen ruby source code generated from the template, which can be evaled. # - # source://erubi//lib/erubi.rb#56 + # pkg:gem/erubi#lib/erubi.rb:56 def src; end private - # :nocov: - # - # source://erubi//lib/erubi.rb#209 + # pkg:gem/erubi#lib/erubi.rb:209 def _dup_string_if_frozen(string); end # Add ruby code to the template # - # source://erubi//lib/erubi.rb#232 + # pkg:gem/erubi#lib/erubi.rb:232 def add_code(code); end # Add the given ruby expression result to the template, # escaping it based on the indicator given and escape flag. # - # source://erubi//lib/erubi.rb#241 + # pkg:gem/erubi#lib/erubi.rb:241 def add_expression(indicator, code); end # Add the result of Ruby expression to the template # - # source://erubi//lib/erubi.rb#250 + # pkg:gem/erubi#lib/erubi.rb:250 def add_expression_result(code); end # Add the escaped result of Ruby expression to the template # - # source://erubi//lib/erubi.rb#255 + # pkg:gem/erubi#lib/erubi.rb:255 def add_expression_result_escaped(code); end # Add the given postamble to the src. Can be overridden in subclasses # to make additional changes to src that depend on the current state. # - # source://erubi//lib/erubi.rb#261 + # pkg:gem/erubi#lib/erubi.rb:261 def add_postamble(postamble); end # Add raw text to the template. Modifies argument if argument is mutable as a memory optimization. # Must be called with a string, cannot be called with nil (Rails's subclass depends on it). # - # source://erubi//lib/erubi.rb#222 + # pkg:gem/erubi#lib/erubi.rb:222 def add_text(text); end # Raise an exception, as the base engine class does not support handling other indicators. # - # @raise [ArgumentError] - # - # source://erubi//lib/erubi.rb#267 + # pkg:gem/erubi#lib/erubi.rb:267 def handle(indicator, code, tailch, rspace, lspace); end # Make sure that any current expression has been terminated. @@ -117,7 +115,7 @@ class Erubi::Engine # the chain_appends option is used, expressions may not be # terminated. # - # source://erubi//lib/erubi.rb#295 + # pkg:gem/erubi#lib/erubi.rb:295 def terminate_expression; end # Make sure the buffer variable is the target of the next append @@ -127,29 +125,29 @@ class Erubi::Engine # This method should only be called if the block will result in # code where << will append to the bufvar. # - # source://erubi//lib/erubi.rb#277 + # pkg:gem/erubi#lib/erubi.rb:277 def with_buffer; end end # The default regular expression used for scanning. # -# source://erubi//lib/erubi.rb#53 +# pkg:gem/erubi#lib/erubi.rb:53 Erubi::Engine::DEFAULT_REGEXP = T.let(T.unsafe(nil), Regexp) -# source://erubi//lib/erubi.rb#17 +# pkg:gem/erubi#lib/erubi.rb:17 Erubi::FREEZE_TEMPLATE_LITERALS = T.let(T.unsafe(nil), TrueClass) -# source://erubi//lib/erubi.rb#15 +# pkg:gem/erubi#lib/erubi.rb:15 Erubi::MATCH_METHOD = T.let(T.unsafe(nil), Symbol) -# source://erubi//lib/erubi.rb#8 +# pkg:gem/erubi#lib/erubi.rb:8 Erubi::RANGE_FIRST = T.let(T.unsafe(nil), Integer) -# source://erubi//lib/erubi.rb#9 +# pkg:gem/erubi#lib/erubi.rb:9 Erubi::RANGE_LAST = T.let(T.unsafe(nil), Integer) -# source://erubi//lib/erubi.rb#16 +# pkg:gem/erubi#lib/erubi.rb:16 Erubi::SKIP_DEFINED_FOR_INSTANCE_VARIABLE = T.let(T.unsafe(nil), TrueClass) -# source://erubi//lib/erubi.rb#4 +# pkg:gem/erubi#lib/erubi.rb:4 Erubi::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/herb@0.11.0.rbi b/sorbet/rbi/gems/herb@0.11.0.rbi index 7a49cc0..e32058e 100644 --- a/sorbet/rbi/gems/herb@0.11.0.rbi +++ b/sorbet/rbi/gems/herb@0.11.0.rbi @@ -5,4864 +5,4415 @@ # Please instead update this file by running `bin/tapioca gem herb`. -# source://herb//lib/herb/colors.rb#6 +# NOTE: This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/herb/action_view/helper_registry.rb.erb +# rbs_inline: enabled +# NOTE: This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/herb/engine/slots/component_definitions.rb.erb +# NOTE: This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/herb/engine/slots/state_kinds.rb.erb +# NOTE: This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/herb/engine/slots/state_operators.rb.erb +# NOTE: This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/herb/engine/slots/state_predicates.rb.erb +# NOTE: This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/herb/engine/slots/state_transforms.rb.erb +# NOTE: This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/herb/errors.rb.erb +# NOTE: This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/herb/html/elements.rb.erb +# NOTE: This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/herb/parser_options.rb.erb +# +# pkg:gem/herb#lib/herb/colors.rb:6 module Herb class << self - # : (?arena_stats: bool) -> untyped - # - # source://herb//lib/herb.rb#96 - def arena_stats(*_arg0, **_arg1, &_arg2); end + # pkg:gem/herb#lib/herb.rb:96 + def arena_stats(*args, **, &blk); end - # source://herb//lib/herb.rb#132 + # pkg:gem/herb#lib/herb.rb:132 def configuration(project_path = T.unsafe(nil)); end - # source://herb//lib/herb.rb#138 + # pkg:gem/herb#lib/herb.rb:138 def configure(project_path = T.unsafe(nil)); end - # : () -> Array[String] - # - # source://herb//lib/herb.rb#128 + # pkg:gem/herb#lib/herb.rb:128 + sig { returns(T::Array[::String]) } def default_erb_openings; end - # : (String old_source, String new_source, ?track_whitespace_changes: bool) -> Herb::Diff::Result - # - # source://herb//lib/herb.rb#91 - def diff(*_arg0, **_arg1, &_arg2); end + # pkg:gem/herb#lib/herb.rb:91 + def diff(*args, **, &blk); end - # : (*String gems) -> void - # - # source://herb//lib/herb/ensure_installed.rb#5 + # pkg:gem/herb#lib/herb/ensure_installed.rb:5 def ensure_installed(*gems); end - # : (String source) -> String - # - # source://herb//lib/herb.rb#86 - def extract_html(*_arg0, **_arg1, &_arg2); end - - # : (String source, ?semicolons: bool, ?comments: bool, ?preserve_positions: bool, ?custom_tags: bool, ?erb_openers: Array[String]) -> String - # - # source://herb//lib/herb.rb#81 - def extract_ruby(*_arg0, **_arg1, &_arg2); end - - # : (String source) -> untyped - # - # source://herb//lib/herb.rb#101 - def leak_check(*_arg0, **_arg1, &_arg2); end - - # : (String input, ?erb_openers: Array[String], ?arena_stats: bool) -> LexResult - # - # source://herb//lib/herb.rb#76 - def lex(*_arg0, **_arg1, &_arg2); end - - # : (String path, ?arena_stats: bool) -> LexResult - # - # source://herb//lib/herb.rb#111 + # pkg:gem/herb#lib/herb.rb:86 + def extract_html(*args, **, &blk); end + + # pkg:gem/herb#lib/herb.rb:81 + def extract_ruby(*args, **, &blk); end + + # pkg:gem/herb#lib/herb.rb:101 + def leak_check(*args, **, &blk); end + + # pkg:gem/herb#lib/herb.rb:76 + def lex(*args, **, &blk); end + + # pkg:gem/herb#lib/herb.rb:111 + sig { params(path: ::String, arena_stats: T::Boolean).returns(::Herb::LexResult) } def lex_file(path, arena_stats: T.unsafe(nil)); end - # : (String input, ?track_whitespace: bool, ?track_locations: bool, ?analyze: bool, ?strict: bool, ?action_view_helpers: bool, ?transform_conditionals: bool, ?dot_notation_tags: bool, ?render_nodes: bool, ?strict_locals: bool, ?herb_directives: bool, ?iteration_nodes: bool, ?prism_nodes: bool, ?prism_nodes_deep: bool, ?prism_program: bool, ?html: bool, ?erb_openers: Array[String], ?arena_stats: bool) -> ParseResult - # - # source://herb//lib/herb.rb#71 - def parse(*_arg0, **_arg1, &_arg2); end + # pkg:gem/herb#lib/herb.rb:71 + def parse(*args, **, &blk); end - # : (String path, ?track_whitespace: bool, ?track_locations: bool, ?analyze: bool, ?strict: bool, ?action_view_helpers: bool, ?transform_conditionals: bool, ?strict_locals: bool, ?herb_directives: bool, ?prism_nodes: bool, ?prism_nodes_deep: bool, ?prism_program: bool, ?arena_stats: bool) -> ParseResult - # - # source://herb//lib/herb.rb#116 - def parse_file(path, track_locations: T.unsafe(nil), track_whitespace: T.unsafe(nil), analyze: T.unsafe(nil), strict: T.unsafe(nil), action_view_helpers: T.unsafe(nil), transform_conditionals: T.unsafe(nil), strict_locals: T.unsafe(nil), herb_directives: T.unsafe(nil), prism_nodes: T.unsafe(nil), prism_nodes_deep: T.unsafe(nil), prism_program: T.unsafe(nil), arena_stats: T.unsafe(nil)); end + # pkg:gem/herb#lib/herb.rb:116 + def parse_file(*args, **, &blk); end - # : (String source) -> Prism::ParseResult - # - # source://herb//lib/herb.rb#121 + # pkg:gem/herb#lib/herb.rb:121 + sig { params(source: ::String).returns(::Prism::ParseResult) } def parse_ruby(source); end - # source://herb//lib/herb.rb#144 + # pkg:gem/herb#lib/herb.rb:144 def reset_configuration!; end - # : () -> String - # - # source://herb//lib/herb.rb#106 + # pkg:gem/herb#lib/herb.rb:106 + sig { returns(::String) } def version; end private - # : (Array[String]) -> void - # - # @raise [LoadError] - # - # source://herb//lib/herb/ensure_installed.rb#35 + # pkg:gem/herb#lib/herb/ensure_installed.rb:35 def refuse_bundle_replacement(missing); end end end -# : type serialized_node = { -# | type: String, -# | location: serialized_location?, -# | errors: Array[serialized_error] -# | } -# -# source://herb//lib/herb/ast/node.rb#12 +# pkg:gem/herb#lib/herb/ast/node.rb:8 module Herb::AST; end -# : type serialized_cdata_node = { -# | tag_opening: Herb::Token?, -# | children: Array[Herb::AST::Node], -# | tag_closing: Herb::Token?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#1884 +# pkg:gem/herb#lib/herb/ast/nodes.rb:1798 class Herb::AST::CDATANode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Array[Herb::AST::Node], Herb::Token?) -> void - # - # @return [CDATANode] a new instance of CDATANode - # - # source://herb//lib/herb/ast/nodes.rb#1892 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1806 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_opening: T.nilable(::Herb::Token), + children: T::Array[::Herb::AST::Node], + tag_closing: T.nilable(::Herb::Token) + ).void + end def initialize(type, location, errors, tag_opening, children, tag_closing); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#1919 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1833 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#1924 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1838 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#1888 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1802 def children; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#1929 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1843 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#1934 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1848 + sig { returns(::String) } def inspect; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#1889 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1803 def tag_closing; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#1887 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1801 def tag_opening; end - # : () -> serialized_cdata_node - # - # source://herb//lib/herb/ast/nodes.rb#1910 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:1824 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#1939 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1853 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?tag_opening: Herb::Token?, ?children: Array[Herb::AST::Node], ?tag_closing: Herb::Token?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> CDATANode - # - # source://herb//lib/herb/ast/nodes.rb#1905 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1819 + sig do + params( + tag_opening: T.nilable(::Herb::Token), + children: T::Array[::Herb::AST::Node], + tag_closing: T.nilable(::Herb::Token), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::CDATANode) + end def build(tag_opening: T.unsafe(nil), children: T.unsafe(nil), tag_closing: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#1900 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1814 + sig { returns(::String) } def type; end end end -# : type serialized_document_node = { -# | children: Array[Herb::AST::Node], -# | prism_context: nil, -# | prism_node: String?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#16 +# pkg:gem/herb#lib/herb/ast/nodes.rb:12 class Herb::AST::DocumentNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Array[Herb::AST::Node], nil, String?) -> void - # - # @return [DocumentNode] a new instance of DocumentNode - # - # source://herb//lib/herb/ast/nodes.rb#24 + # pkg:gem/herb#lib/herb/ast/nodes.rb:20 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + children: T::Array[::Herb::AST::Node], + prism_context: ::NilClass, + prism_node: T.nilable(::String) + ).void + end def initialize(type, location, errors, children, prism_context, prism_node); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#67 + # pkg:gem/herb#lib/herb/ast/nodes.rb:63 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#72 + # pkg:gem/herb#lib/herb/ast/nodes.rb:68 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#19 + # pkg:gem/herb#lib/herb/ast/nodes.rb:15 def children; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#77 + # pkg:gem/herb#lib/herb/ast/nodes.rb:73 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : () -> Prism::node? - # - # source://herb//lib/herb/ast/nodes.rb#42 + # pkg:gem/herb#lib/herb/ast/nodes.rb:38 + sig { returns(T.nilable(::Prism::Node)) } def deserialized_prism_node; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#82 + # pkg:gem/herb#lib/herb/ast/nodes.rb:78 + sig { returns(::String) } def inspect; end - # : nil - # - # source://herb//lib/herb/ast/nodes.rb#20 + # pkg:gem/herb#lib/herb/ast/nodes.rb:16 def prism_context; end - # : String? - # - # source://herb//lib/herb/ast/nodes.rb#21 + # pkg:gem/herb#lib/herb/ast/nodes.rb:17 def prism_node; end - # : () -> serialized_document_node - # - # source://herb//lib/herb/ast/nodes.rb#58 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:54 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#87 + # pkg:gem/herb#lib/herb/ast/nodes.rb:83 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?children: Array[Herb::AST::Node], ?prism_context: nil, ?prism_node: String?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> DocumentNode - # - # source://herb//lib/herb/ast/nodes.rb#37 + # pkg:gem/herb#lib/herb/ast/nodes.rb:33 + sig do + params( + children: T::Array[::Herb::AST::Node], + prism_context: ::NilClass, + prism_node: T.nilable(::String), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::DocumentNode) + end def build(children: T.unsafe(nil), prism_context: T.unsafe(nil), prism_node: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#32 + # pkg:gem/herb#lib/herb/ast/nodes.rb:28 + sig { returns(::String) } def type; end end end -# : type serialized_erb_begin_node = { -# | tag_opening: Herb::Token?, -# | content: Herb::Token?, -# | tag_closing: Herb::Token?, -# | prism_node: String?, -# | statements: Array[Herb::AST::Node], -# | rescue_clause: Herb::AST::ERBRescueNode?, -# | else_clause: Herb::AST::ERBElseNode?, -# | ensure_clause: Herb::AST::ERBEnsureNode?, -# | end_node: Herb::AST::ERBEndNode?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#3935 +# pkg:gem/herb#lib/herb/ast/nodes.rb:3728 class Herb::AST::ERBBeginNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Herb::Token?, Herb::Token?, String?, Array[Herb::AST::Node], Herb::AST::ERBRescueNode?, Herb::AST::ERBElseNode?, Herb::AST::ERBEnsureNode?, Herb::AST::ERBEndNode?) -> void - # - # @return [ERBBeginNode] a new instance of ERBBeginNode - # - # source://herb//lib/herb/ast/nodes.rb#3949 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3742 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + prism_node: T.nilable(::String), + statements: T::Array[::Herb::AST::Node], + rescue_clause: T.nilable(::Herb::AST::ERBRescueNode), + else_clause: T.nilable(::Herb::AST::ERBElseNode), + ensure_clause: T.nilable(::Herb::AST::ERBEnsureNode), + end_node: T.nilable(::Herb::AST::ERBEndNode) + ).void + end def initialize(type, location, errors, tag_opening, content, tag_closing, prism_node, statements, rescue_clause, else_clause, ensure_clause, end_node); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#4004 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3797 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#4009 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3802 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#4014 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3807 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#3939 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3732 def content; end - # : () -> Prism::node? - # - # source://herb//lib/herb/ast/nodes.rb#3973 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3766 + sig { returns(T.nilable(::Prism::Node)) } def deserialized_prism_node; end - # : Herb::AST::ERBElseNode? - # - # source://herb//lib/herb/ast/nodes.rb#3944 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3737 def else_clause; end - # : Herb::AST::ERBEndNode? - # - # source://herb//lib/herb/ast/nodes.rb#3946 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3739 def end_node; end - # : Herb::AST::ERBEnsureNode? - # - # source://herb//lib/herb/ast/nodes.rb#3945 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3738 def ensure_clause; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#4019 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3812 + sig { returns(::String) } def inspect; end - # : String? - # - # source://herb//lib/herb/ast/nodes.rb#3941 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3734 def prism_node; end - # : Herb::AST::ERBRescueNode? - # - # source://herb//lib/herb/ast/nodes.rb#3943 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3736 def rescue_clause; end - # : Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#3942 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3735 def statements; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#3940 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3733 def tag_closing; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#3938 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3731 def tag_opening; end - # : () -> serialized_erb_begin_node - # - # source://herb//lib/herb/ast/nodes.rb#3989 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:3782 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#4024 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3817 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?tag_opening: Herb::Token?, ?content: Herb::Token?, ?tag_closing: Herb::Token?, ?prism_node: String?, ?statements: Array[Herb::AST::Node], ?rescue_clause: Herb::AST::ERBRescueNode?, ?else_clause: Herb::AST::ERBElseNode?, ?ensure_clause: Herb::AST::ERBEnsureNode?, ?end_node: Herb::AST::ERBEndNode?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> ERBBeginNode - # - # source://herb//lib/herb/ast/nodes.rb#3968 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3761 + sig do + params( + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + prism_node: T.nilable(::String), + statements: T::Array[::Herb::AST::Node], + rescue_clause: T.nilable(::Herb::AST::ERBRescueNode), + else_clause: T.nilable(::Herb::AST::ERBElseNode), + ensure_clause: T.nilable(::Herb::AST::ERBEnsureNode), + end_node: T.nilable(::Herb::AST::ERBEndNode), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::ERBBeginNode) + end def build(tag_opening: T.unsafe(nil), content: T.unsafe(nil), tag_closing: T.unsafe(nil), prism_node: T.unsafe(nil), statements: T.unsafe(nil), rescue_clause: T.unsafe(nil), else_clause: T.unsafe(nil), ensure_clause: T.unsafe(nil), end_node: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#3963 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3756 + sig { returns(::String) } def type; end end end -# : type serialized_erb_block_node = { -# | tag_opening: Herb::Token?, -# | content: Herb::Token?, -# | tag_closing: Herb::Token?, -# | prism_node: String?, -# | body: Array[Herb::AST::Node], -# | block_arguments: Array[Herb::AST::RubyParameterNode]?, -# | rescue_clause: Herb::AST::ERBRescueNode?, -# | else_clause: Herb::AST::ERBElseNode?, -# | ensure_clause: Herb::AST::ERBEnsureNode?, -# | end_node: Herb::AST::ERBEndNode?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#2534 +# pkg:gem/herb#lib/herb/ast/nodes.rb:2409 class Herb::AST::ERBBlockNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Herb::Token?, Herb::Token?, String?, Array[Herb::AST::Node], Array[Herb::AST::RubyParameterNode]?, Herb::AST::ERBRescueNode?, Herb::AST::ERBElseNode?, Herb::AST::ERBEnsureNode?, Herb::AST::ERBEndNode?) -> void - # - # @return [ERBBlockNode] a new instance of ERBBlockNode - # - # source://herb//lib/herb/ast/nodes.rb#2549 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2424 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + prism_node: T.nilable(::String), + body: T::Array[::Herb::AST::Node], + block_arguments: T.nilable(T::Array[::Herb::AST::RubyParameterNode]), + rescue_clause: T.nilable(::Herb::AST::ERBRescueNode), + else_clause: T.nilable(::Herb::AST::ERBElseNode), + ensure_clause: T.nilable(::Herb::AST::ERBEnsureNode), + end_node: T.nilable(::Herb::AST::ERBEndNode) + ).void + end def initialize(type, location, errors, tag_opening, content, tag_closing, prism_node, body, block_arguments, rescue_clause, else_clause, ensure_clause, end_node); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#2606 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2481 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : Array[Herb::AST::RubyParameterNode]? - # - # source://herb//lib/herb/ast/nodes.rb#2542 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2417 def block_arguments; end - # : Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#2541 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2416 def body; end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#2611 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2486 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#2616 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2491 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#2538 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2413 def content; end - # : () -> Prism::node? - # - # source://herb//lib/herb/ast/nodes.rb#2574 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2449 + sig { returns(T.nilable(::Prism::Node)) } def deserialized_prism_node; end - # : Herb::AST::ERBElseNode? - # - # source://herb//lib/herb/ast/nodes.rb#2544 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2419 def else_clause; end - # : Herb::AST::ERBEndNode? - # - # source://herb//lib/herb/ast/nodes.rb#2546 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2421 def end_node; end - # : Herb::AST::ERBEnsureNode? - # - # source://herb//lib/herb/ast/nodes.rb#2545 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2420 def ensure_clause; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#2621 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2496 + sig { returns(::String) } def inspect; end - # : String? - # - # source://herb//lib/herb/ast/nodes.rb#2540 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2415 def prism_node; end - # : Herb::AST::ERBRescueNode? - # - # source://herb//lib/herb/ast/nodes.rb#2543 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2418 def rescue_clause; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#2539 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2414 def tag_closing; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#2537 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2412 def tag_opening; end - # : () -> serialized_erb_block_node - # - # source://herb//lib/herb/ast/nodes.rb#2590 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:2465 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#2626 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2501 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?tag_opening: Herb::Token?, ?content: Herb::Token?, ?tag_closing: Herb::Token?, ?prism_node: String?, ?body: Array[Herb::AST::Node], ?block_arguments: Array[Herb::AST::RubyParameterNode]?, ?rescue_clause: Herb::AST::ERBRescueNode?, ?else_clause: Herb::AST::ERBElseNode?, ?ensure_clause: Herb::AST::ERBEnsureNode?, ?end_node: Herb::AST::ERBEndNode?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> ERBBlockNode - # - # source://herb//lib/herb/ast/nodes.rb#2569 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2444 + sig do + params( + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + prism_node: T.nilable(::String), + body: T::Array[::Herb::AST::Node], + block_arguments: T.nilable(T::Array[::Herb::AST::RubyParameterNode]), + rescue_clause: T.nilable(::Herb::AST::ERBRescueNode), + else_clause: T.nilable(::Herb::AST::ERBElseNode), + ensure_clause: T.nilable(::Herb::AST::ERBEnsureNode), + end_node: T.nilable(::Herb::AST::ERBEndNode), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::ERBBlockNode) + end def build(tag_opening: T.unsafe(nil), content: T.unsafe(nil), tag_closing: T.unsafe(nil), prism_node: T.unsafe(nil), body: T.unsafe(nil), block_arguments: T.unsafe(nil), rescue_clause: T.unsafe(nil), else_clause: T.unsafe(nil), ensure_clause: T.unsafe(nil), end_node: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#2564 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2439 + sig { returns(::String) } def type; end end end -# : type serialized_erb_case_match_node = { -# | tag_opening: Herb::Token?, -# | content: Herb::Token?, -# | tag_closing: Herb::Token?, -# | children: Array[Herb::AST::Node], -# | prism_node: String?, -# | conditions: Array[Herb::AST::ERBInNode], -# | else_clause: Herb::AST::ERBElseNode?, -# | end_node: Herb::AST::ERBEndNode?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#3174 +# pkg:gem/herb#lib/herb/ast/nodes.rb:3009 class Herb::AST::ERBCaseMatchNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Herb::Token?, Herb::Token?, Array[Herb::AST::Node], String?, Array[Herb::AST::ERBInNode], Herb::AST::ERBElseNode?, Herb::AST::ERBEndNode?) -> void - # - # @return [ERBCaseMatchNode] a new instance of ERBCaseMatchNode - # - # source://herb//lib/herb/ast/nodes.rb#3187 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3022 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + children: T::Array[::Herb::AST::Node], + prism_node: T.nilable(::String), + conditions: T::Array[::Herb::AST::ERBInNode], + else_clause: T.nilable(::Herb::AST::ERBElseNode), + end_node: T.nilable(::Herb::AST::ERBEndNode) + ).void + end def initialize(type, location, errors, tag_opening, content, tag_closing, children, prism_node, conditions, else_clause, end_node); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#3240 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3075 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#3245 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3080 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#3180 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3015 def children; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#3250 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3085 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : Array[Herb::AST::ERBInNode] - # - # source://herb//lib/herb/ast/nodes.rb#3182 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3017 def conditions; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#3178 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3013 def content; end - # : () -> Prism::node? - # - # source://herb//lib/herb/ast/nodes.rb#3210 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3045 + sig { returns(T.nilable(::Prism::Node)) } def deserialized_prism_node; end - # : Herb::AST::ERBElseNode? - # - # source://herb//lib/herb/ast/nodes.rb#3183 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3018 def else_clause; end - # : Herb::AST::ERBEndNode? - # - # source://herb//lib/herb/ast/nodes.rb#3184 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3019 def end_node; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#3255 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3090 + sig { returns(::String) } def inspect; end - # : String? - # - # source://herb//lib/herb/ast/nodes.rb#3181 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3016 def prism_node; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#3179 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3014 def tag_closing; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#3177 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3012 def tag_opening; end - # : () -> serialized_erb_case_match_node - # - # source://herb//lib/herb/ast/nodes.rb#3226 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:3061 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#3260 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3095 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?tag_opening: Herb::Token?, ?content: Herb::Token?, ?tag_closing: Herb::Token?, ?children: Array[Herb::AST::Node], ?prism_node: String?, ?conditions: Array[Herb::AST::ERBInNode], ?else_clause: Herb::AST::ERBElseNode?, ?end_node: Herb::AST::ERBEndNode?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> ERBCaseMatchNode - # - # source://herb//lib/herb/ast/nodes.rb#3205 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3040 + sig do + params( + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + children: T::Array[::Herb::AST::Node], + prism_node: T.nilable(::String), + conditions: T::Array[::Herb::AST::ERBInNode], + else_clause: T.nilable(::Herb::AST::ERBElseNode), + end_node: T.nilable(::Herb::AST::ERBEndNode), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::ERBCaseMatchNode) + end def build(tag_opening: T.unsafe(nil), content: T.unsafe(nil), tag_closing: T.unsafe(nil), children: T.unsafe(nil), prism_node: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), end_node: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#3200 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3035 + sig { returns(::String) } def type; end end end -# : type serialized_erb_case_node = { -# | tag_opening: Herb::Token?, -# | content: Herb::Token?, -# | tag_closing: Herb::Token?, -# | children: Array[Herb::AST::Node], -# | prism_node: String?, -# | conditions: Array[Herb::AST::ERBWhenNode], -# | else_clause: Herb::AST::ERBElseNode?, -# | end_node: Herb::AST::ERBEndNode?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#3022 +# pkg:gem/herb#lib/herb/ast/nodes.rb:2866 class Herb::AST::ERBCaseNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Herb::Token?, Herb::Token?, Array[Herb::AST::Node], String?, Array[Herb::AST::ERBWhenNode], Herb::AST::ERBElseNode?, Herb::AST::ERBEndNode?) -> void - # - # @return [ERBCaseNode] a new instance of ERBCaseNode - # - # source://herb//lib/herb/ast/nodes.rb#3035 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2879 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + children: T::Array[::Herb::AST::Node], + prism_node: T.nilable(::String), + conditions: T::Array[::Herb::AST::ERBWhenNode], + else_clause: T.nilable(::Herb::AST::ERBElseNode), + end_node: T.nilable(::Herb::AST::ERBEndNode) + ).void + end def initialize(type, location, errors, tag_opening, content, tag_closing, children, prism_node, conditions, else_clause, end_node); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#3088 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2932 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#3093 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2937 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#3028 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2872 def children; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#3098 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2942 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : Array[Herb::AST::ERBWhenNode] - # - # source://herb//lib/herb/ast/nodes.rb#3030 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2874 def conditions; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#3026 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2870 def content; end - # : () -> Prism::node? - # - # source://herb//lib/herb/ast/nodes.rb#3058 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2902 + sig { returns(T.nilable(::Prism::Node)) } def deserialized_prism_node; end - # : Herb::AST::ERBElseNode? - # - # source://herb//lib/herb/ast/nodes.rb#3031 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2875 def else_clause; end - # : Herb::AST::ERBEndNode? - # - # source://herb//lib/herb/ast/nodes.rb#3032 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2876 def end_node; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#3103 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2947 + sig { returns(::String) } def inspect; end - # : String? - # - # source://herb//lib/herb/ast/nodes.rb#3029 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2873 def prism_node; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#3027 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2871 def tag_closing; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#3025 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2869 def tag_opening; end - # : () -> serialized_erb_case_node - # - # source://herb//lib/herb/ast/nodes.rb#3074 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:2918 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#3108 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2952 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?tag_opening: Herb::Token?, ?content: Herb::Token?, ?tag_closing: Herb::Token?, ?children: Array[Herb::AST::Node], ?prism_node: String?, ?conditions: Array[Herb::AST::ERBWhenNode], ?else_clause: Herb::AST::ERBElseNode?, ?end_node: Herb::AST::ERBEndNode?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> ERBCaseNode - # - # source://herb//lib/herb/ast/nodes.rb#3053 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2897 + sig do + params( + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + children: T::Array[::Herb::AST::Node], + prism_node: T.nilable(::String), + conditions: T::Array[::Herb::AST::ERBWhenNode], + else_clause: T.nilable(::Herb::AST::ERBElseNode), + end_node: T.nilable(::Herb::AST::ERBEndNode), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::ERBCaseNode) + end def build(tag_opening: T.unsafe(nil), content: T.unsafe(nil), tag_closing: T.unsafe(nil), children: T.unsafe(nil), prism_node: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), end_node: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#3048 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2892 + sig { returns(::String) } def type; end end end -# : type serialized_erb_comment_node = { -# | tag_opening: Herb::Token?, -# | content: Herb::Token?, -# | tag_closing: Herb::Token?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#5473 +# pkg:gem/herb#lib/herb/ast/nodes.rb:5177 class Herb::AST::ERBCommentNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Herb::Token?, Herb::Token?) -> void - # - # @return [ERBCommentNode] a new instance of ERBCommentNode - # - # source://herb//lib/herb/ast/nodes.rb#5481 + # pkg:gem/herb#lib/herb/ast/nodes.rb:5185 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token) + ).void + end def initialize(type, location, errors, tag_opening, content, tag_closing); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#5508 + # pkg:gem/herb#lib/herb/ast/nodes.rb:5212 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#5513 + # pkg:gem/herb#lib/herb/ast/nodes.rb:5217 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#5518 + # pkg:gem/herb#lib/herb/ast/nodes.rb:5222 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#5477 + # pkg:gem/herb#lib/herb/ast/nodes.rb:5181 def content; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#5523 + # pkg:gem/herb#lib/herb/ast/nodes.rb:5227 + sig { returns(::String) } def inspect; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#5478 + # pkg:gem/herb#lib/herb/ast/nodes.rb:5182 def tag_closing; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#5476 + # pkg:gem/herb#lib/herb/ast/nodes.rb:5180 def tag_opening; end - # : () -> serialized_erb_comment_node - # - # source://herb//lib/herb/ast/nodes.rb#5499 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:5203 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#5528 + # pkg:gem/herb#lib/herb/ast/nodes.rb:5232 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?tag_opening: Herb::Token?, ?content: Herb::Token?, ?tag_closing: Herb::Token?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> ERBCommentNode - # - # source://herb//lib/herb/ast/nodes.rb#5494 + # pkg:gem/herb#lib/herb/ast/nodes.rb:5198 + sig do + params( + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::ERBCommentNode) + end def build(tag_opening: T.unsafe(nil), content: T.unsafe(nil), tag_closing: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#5489 + # pkg:gem/herb#lib/herb/ast/nodes.rb:5193 + sig { returns(::String) } def type; end end end -# : type serialized_erb_content_node = { -# | tag_opening: Herb::Token?, -# | content: Herb::Token?, -# | tag_closing: Herb::Token?, -# | analyzed_ruby: nil, -# | parsed: bool, -# | valid: bool, -# | prism_node: String?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#2055 +# pkg:gem/herb#lib/herb/ast/nodes.rb:1959 class Herb::AST::ERBContentNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Herb::Token?, Herb::Token?, nil, bool, bool, String?) -> void - # - # @return [ERBContentNode] a new instance of ERBContentNode - # - # source://herb//lib/herb/ast/nodes.rb#2067 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1971 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + analyzed_ruby: ::NilClass, + parsed: T::Boolean, + valid: T::Boolean, + prism_node: T.nilable(::String) + ).void + end def initialize(type, location, errors, tag_opening, content, tag_closing, analyzed_ruby, parsed, valid, prism_node); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#2118 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2022 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : nil - # - # source://herb//lib/herb/ast/nodes.rb#2061 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1965 def analyzed_ruby; end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#2123 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2027 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#2128 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2032 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#2059 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1963 def content; end - # : () -> Prism::node? - # - # source://herb//lib/herb/ast/nodes.rb#2089 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1993 + sig { returns(T.nilable(::Prism::Node)) } def deserialized_prism_node; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#2133 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2037 + sig { returns(::String) } def inspect; end - # : bool - # - # source://herb//lib/herb/ast/nodes.rb#2062 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1966 def parsed; end - # : () -> Prism::node? - # - # source://herb//lib/herb/ast/erb_content_node.rb#8 + # pkg:gem/herb#lib/herb/ast/erb_content_node.rb:8 + sig { returns(T.nilable(::Prism::Node)) } def parsed_prism_node; end - # : () -> Prism::node? - # - # source://herb//lib/herb/ast/erb_content_node.rb#25 + # pkg:gem/herb#lib/herb/ast/erb_content_node.rb:25 + sig { returns(T.nilable(::Prism::Node)) } def prism; end - # : String? - # - # source://herb//lib/herb/ast/nodes.rb#2064 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1968 def prism_node; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#2060 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1964 def tag_closing; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#2058 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1962 def tag_opening; end - # : () -> serialized_erb_content_node - # - # source://herb//lib/herb/ast/nodes.rb#2105 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:2009 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#2138 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2042 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end - # : bool - # - # source://herb//lib/herb/ast/nodes.rb#2063 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1967 def valid; end class << self - # : (?tag_opening: Herb::Token?, ?content: Herb::Token?, ?tag_closing: Herb::Token?, ?analyzed_ruby: nil, ?parsed: bool, ?valid: bool, ?prism_node: String?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> ERBContentNode - # - # source://herb//lib/herb/ast/nodes.rb#2084 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1988 + sig do + params( + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + analyzed_ruby: ::NilClass, + parsed: T::Boolean, + valid: T::Boolean, + prism_node: T.nilable(::String), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::ERBContentNode) + end def build(tag_opening: T.unsafe(nil), content: T.unsafe(nil), tag_closing: T.unsafe(nil), analyzed_ruby: T.unsafe(nil), parsed: T.unsafe(nil), valid: T.unsafe(nil), prism_node: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#2079 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1983 + sig { returns(::String) } def type; end end end -# : type serialized_erb_else_node = { -# | tag_opening: Herb::Token?, -# | content: Herb::Token?, -# | tag_closing: Herb::Token?, -# | statements: Array[Herb::AST::Node], -# | } -# -# source://herb//lib/herb/ast/nodes.rb#2278 +# pkg:gem/herb#lib/herb/ast/nodes.rb:2173 class Herb::AST::ERBElseNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Herb::Token?, Herb::Token?, Array[Herb::AST::Node]) -> void - # - # @return [ERBElseNode] a new instance of ERBElseNode - # - # source://herb//lib/herb/ast/nodes.rb#2287 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2182 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + statements: T::Array[::Herb::AST::Node] + ).void + end def initialize(type, location, errors, tag_opening, content, tag_closing, statements); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#2316 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2211 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#2321 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2216 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#2326 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2221 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#2282 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2177 def content; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#2331 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2226 + sig { returns(::String) } def inspect; end - # : Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#2284 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2179 def statements; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#2283 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2178 def tag_closing; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#2281 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2176 def tag_opening; end - # : () -> serialized_erb_else_node - # - # source://herb//lib/herb/ast/nodes.rb#2306 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:2201 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#2336 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2231 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?tag_opening: Herb::Token?, ?content: Herb::Token?, ?tag_closing: Herb::Token?, ?statements: Array[Herb::AST::Node], ?location: Location, ?errors: Array[Herb::Errors::Error]) -> ERBElseNode - # - # source://herb//lib/herb/ast/nodes.rb#2301 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2196 + sig do + params( + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + statements: T::Array[::Herb::AST::Node], + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::ERBElseNode) + end def build(tag_opening: T.unsafe(nil), content: T.unsafe(nil), tag_closing: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#2296 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2191 + sig { returns(::String) } def type; end end end -# : type serialized_erb_end_node = { -# | tag_opening: Herb::Token?, -# | content: Herb::Token?, -# | tag_closing: Herb::Token?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#2186 +# pkg:gem/herb#lib/herb/ast/nodes.rb:2086 class Herb::AST::ERBEndNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Herb::Token?, Herb::Token?) -> void - # - # @return [ERBEndNode] a new instance of ERBEndNode - # - # source://herb//lib/herb/ast/nodes.rb#2194 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2094 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token) + ).void + end def initialize(type, location, errors, tag_opening, content, tag_closing); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#2221 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2121 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#2226 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2126 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#2231 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2131 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#2190 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2090 def content; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#2236 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2136 + sig { returns(::String) } def inspect; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#2191 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2091 def tag_closing; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#2189 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2089 def tag_opening; end - # : () -> serialized_erb_end_node - # - # source://herb//lib/herb/ast/nodes.rb#2212 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:2112 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#2241 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2141 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?tag_opening: Herb::Token?, ?content: Herb::Token?, ?tag_closing: Herb::Token?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> ERBEndNode - # - # source://herb//lib/herb/ast/nodes.rb#2207 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2107 + sig do + params( + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::ERBEndNode) + end def build(tag_opening: T.unsafe(nil), content: T.unsafe(nil), tag_closing: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#2202 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2102 + sig { returns(::String) } def type; end end end -# : type serialized_erb_ensure_node = { -# | tag_opening: Herb::Token?, -# | content: Herb::Token?, -# | tag_closing: Herb::Token?, -# | statements: Array[Herb::AST::Node], -# | } -# -# source://herb//lib/herb/ast/nodes.rb#3833 +# pkg:gem/herb#lib/herb/ast/nodes.rb:3636 class Herb::AST::ERBEnsureNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Herb::Token?, Herb::Token?, Array[Herb::AST::Node]) -> void - # - # @return [ERBEnsureNode] a new instance of ERBEnsureNode - # - # source://herb//lib/herb/ast/nodes.rb#3842 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3645 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + statements: T::Array[::Herb::AST::Node] + ).void + end def initialize(type, location, errors, tag_opening, content, tag_closing, statements); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#3871 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3674 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#3876 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3679 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#3881 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3684 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#3837 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3640 def content; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#3886 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3689 + sig { returns(::String) } def inspect; end - # : Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#3839 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3642 def statements; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#3838 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3641 def tag_closing; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#3836 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3639 def tag_opening; end - # : () -> serialized_erb_ensure_node - # - # source://herb//lib/herb/ast/nodes.rb#3861 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:3664 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#3891 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3694 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?tag_opening: Herb::Token?, ?content: Herb::Token?, ?tag_closing: Herb::Token?, ?statements: Array[Herb::AST::Node], ?location: Location, ?errors: Array[Herb::Errors::Error]) -> ERBEnsureNode - # - # source://herb//lib/herb/ast/nodes.rb#3856 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3659 + sig do + params( + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + statements: T::Array[::Herb::AST::Node], + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::ERBEnsureNode) + end def build(tag_opening: T.unsafe(nil), content: T.unsafe(nil), tag_closing: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#3851 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3654 + sig { returns(::String) } def type; end end end -# : type serialized_erb_for_node = { -# | tag_opening: Herb::Token?, -# | content: Herb::Token?, -# | tag_closing: Herb::Token?, -# | prism_node: String?, -# | statements: Array[Herb::AST::Node], -# | end_node: Herb::AST::ERBEndNode?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#3592 +# pkg:gem/herb#lib/herb/ast/nodes.rb:3406 class Herb::AST::ERBForNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Herb::Token?, Herb::Token?, String?, Array[Herb::AST::Node], Herb::AST::ERBEndNode?) -> void - # - # @return [ERBForNode] a new instance of ERBForNode - # - # source://herb//lib/herb/ast/nodes.rb#3603 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3417 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + prism_node: T.nilable(::String), + statements: T::Array[::Herb::AST::Node], + end_node: T.nilable(::Herb::AST::ERBEndNode) + ).void + end def initialize(type, location, errors, tag_opening, content, tag_closing, prism_node, statements, end_node); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#3652 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3466 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#3657 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3471 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#3662 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3476 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#3596 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3410 def content; end - # : () -> Prism::node? - # - # source://herb//lib/herb/ast/nodes.rb#3624 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3438 + sig { returns(T.nilable(::Prism::Node)) } def deserialized_prism_node; end - # : Herb::AST::ERBEndNode? - # - # source://herb//lib/herb/ast/nodes.rb#3600 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3414 def end_node; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#3667 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3481 + sig { returns(::String) } def inspect; end - # : String? - # - # source://herb//lib/herb/ast/nodes.rb#3598 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3412 def prism_node; end - # : Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#3599 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3413 def statements; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#3597 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3411 def tag_closing; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#3595 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3409 def tag_opening; end - # : () -> serialized_erb_for_node - # - # source://herb//lib/herb/ast/nodes.rb#3640 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:3454 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#3672 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3486 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?tag_opening: Herb::Token?, ?content: Herb::Token?, ?tag_closing: Herb::Token?, ?prism_node: String?, ?statements: Array[Herb::AST::Node], ?end_node: Herb::AST::ERBEndNode?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> ERBForNode - # - # source://herb//lib/herb/ast/nodes.rb#3619 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3433 + sig do + params( + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + prism_node: T.nilable(::String), + statements: T::Array[::Herb::AST::Node], + end_node: T.nilable(::Herb::AST::ERBEndNode), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::ERBForNode) + end def build(tag_opening: T.unsafe(nil), content: T.unsafe(nil), tag_closing: T.unsafe(nil), prism_node: T.unsafe(nil), statements: T.unsafe(nil), end_node: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#3614 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3428 + sig { returns(::String) } def type; end end end -# : type serialized_erb_if_node = { -# | tag_opening: Herb::Token?, -# | content: Herb::Token?, -# | tag_closing: Herb::Token?, -# | then_keyword: Herb::Location?, -# | prism_node: String?, -# | statements: Array[Herb::AST::Node], -# | subsequent: (Herb::AST::ERBIfNode | Herb::AST::ERBElseNode)?, -# | end_node: Herb::AST::ERBEndNode?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#2379 +# pkg:gem/herb#lib/herb/ast/nodes.rb:2265 class Herb::AST::ERBIfNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Herb::Token?, Herb::Token?, Herb::Location?, String?, Array[Herb::AST::Node], (Herb::AST::ERBIfNode | Herb::AST::ERBElseNode)?, Herb::AST::ERBEndNode?) -> void - # - # @return [ERBIfNode] a new instance of ERBIfNode - # - # source://herb//lib/herb/ast/nodes.rb#2392 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2278 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + then_keyword: T.nilable(::Herb::Location), + prism_node: T.nilable(::String), + statements: T::Array[::Herb::AST::Node], + subsequent: T.nilable(T.any(::Herb::AST::ERBElseNode, ::Herb::AST::ERBIfNode)), + end_node: T.nilable(::Herb::AST::ERBEndNode) + ).void + end def initialize(type, location, errors, tag_opening, content, tag_closing, then_keyword, prism_node, statements, subsequent, end_node); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#2445 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2331 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#2450 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2336 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#2455 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2341 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#2383 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2269 def content; end - # : () -> Prism::node? - # - # source://herb//lib/herb/ast/nodes.rb#2415 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2301 + sig { returns(T.nilable(::Prism::Node)) } def deserialized_prism_node; end - # : Herb::AST::ERBEndNode? - # - # source://herb//lib/herb/ast/nodes.rb#2389 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2275 def end_node; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#2460 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2346 + sig { returns(::String) } def inspect; end - # : String? - # - # source://herb//lib/herb/ast/nodes.rb#2386 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2272 def prism_node; end - # : Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#2387 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2273 def statements; end - # : (Herb::AST::ERBIfNode | Herb::AST::ERBElseNode)? - # - # source://herb//lib/herb/ast/nodes.rb#2388 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2274 def subsequent; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#2384 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2270 def tag_closing; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#2382 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2268 def tag_opening; end - # : Herb::Location? - # - # source://herb//lib/herb/ast/nodes.rb#2385 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2271 def then_keyword; end - # : () -> serialized_erb_if_node - # - # source://herb//lib/herb/ast/nodes.rb#2431 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:2317 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#2465 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2351 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?tag_opening: Herb::Token?, ?content: Herb::Token?, ?tag_closing: Herb::Token?, ?then_keyword: Herb::Location?, ?prism_node: String?, ?statements: Array[Herb::AST::Node], ?subsequent: (Herb::AST::ERBIfNode | Herb::AST::ERBElseNode)?, ?end_node: Herb::AST::ERBEndNode?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> ERBIfNode - # - # source://herb//lib/herb/ast/nodes.rb#2410 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2296 + sig do + params( + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + then_keyword: T.nilable(::Herb::Location), + prism_node: T.nilable(::String), + statements: T::Array[::Herb::AST::Node], + subsequent: T.nilable(T.any(::Herb::AST::ERBElseNode, ::Herb::AST::ERBIfNode)), + end_node: T.nilable(::Herb::AST::ERBEndNode), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::ERBIfNode) + end def build(tag_opening: T.unsafe(nil), content: T.unsafe(nil), tag_closing: T.unsafe(nil), then_keyword: T.unsafe(nil), prism_node: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil), end_node: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#2405 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2291 + sig { returns(::String) } def type; end end end -# : type serialized_erb_in_node = { -# | tag_opening: Herb::Token?, -# | content: Herb::Token?, -# | tag_closing: Herb::Token?, -# | then_keyword: Herb::Location?, -# | statements: Array[Herb::AST::Node], -# | } -# -# source://herb//lib/herb/ast/nodes.rb#5061 +# pkg:gem/herb#lib/herb/ast/nodes.rb:4786 class Herb::AST::ERBInNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Herb::Token?, Herb::Token?, Herb::Location?, Array[Herb::AST::Node]) -> void - # - # @return [ERBInNode] a new instance of ERBInNode - # - # source://herb//lib/herb/ast/nodes.rb#5071 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4796 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + then_keyword: T.nilable(::Herb::Location), + statements: T::Array[::Herb::AST::Node] + ).void + end def initialize(type, location, errors, tag_opening, content, tag_closing, then_keyword, statements); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#5102 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4827 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#5107 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4832 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#5112 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4837 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#5065 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4790 def content; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#5117 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4842 + sig { returns(::String) } def inspect; end - # : Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#5068 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4793 def statements; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#5066 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4791 def tag_closing; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#5064 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4789 def tag_opening; end - # : Herb::Location? - # - # source://herb//lib/herb/ast/nodes.rb#5067 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4792 def then_keyword; end - # : () -> serialized_erb_in_node - # - # source://herb//lib/herb/ast/nodes.rb#5091 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:4816 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#5122 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4847 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?tag_opening: Herb::Token?, ?content: Herb::Token?, ?tag_closing: Herb::Token?, ?then_keyword: Herb::Location?, ?statements: Array[Herb::AST::Node], ?location: Location, ?errors: Array[Herb::Errors::Error]) -> ERBInNode - # - # source://herb//lib/herb/ast/nodes.rb#5086 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4811 + sig do + params( + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + then_keyword: T.nilable(::Herb::Location), + statements: T::Array[::Herb::AST::Node], + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::ERBInNode) + end def build(tag_opening: T.unsafe(nil), content: T.unsafe(nil), tag_closing: T.unsafe(nil), then_keyword: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#5081 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4806 + sig { returns(::String) } def type; end end end -# : type serialized_erb_iteration_block_node = { -# | tag_opening: Herb::Token?, -# | content: Herb::Token?, -# | tag_closing: Herb::Token?, -# | prism_node: String?, -# | receiver: Herb::Token?, -# | call_operator: Herb::Token?, -# | message: Herb::Token?, -# | arguments: Array[Herb::AST::RubyLiteralNode]?, -# | block_opening: Herb::Token?, -# | body: Array[Herb::AST::Node], -# | block_arguments: Array[Herb::AST::RubyParameterNode]?, -# | rescue_clause: Herb::AST::ERBRescueNode?, -# | else_clause: Herb::AST::ERBElseNode?, -# | ensure_clause: Herb::AST::ERBEnsureNode?, -# | end_node: Herb::AST::ERBEndNode?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#2715 +# pkg:gem/herb#lib/herb/ast/nodes.rb:2574 class Herb::AST::ERBIterationBlockNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Herb::Token?, Herb::Token?, String?, Herb::Token?, Herb::Token?, Herb::Token?, Array[Herb::AST::RubyLiteralNode]?, Herb::Token?, Array[Herb::AST::Node], Array[Herb::AST::RubyParameterNode]?, Herb::AST::ERBRescueNode?, Herb::AST::ERBElseNode?, Herb::AST::ERBEnsureNode?, Herb::AST::ERBEndNode?) -> void - # - # @return [ERBIterationBlockNode] a new instance of ERBIterationBlockNode - # - # source://herb//lib/herb/ast/nodes.rb#2735 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2594 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + prism_node: T.nilable(::String), + receiver: T.nilable(::Herb::Token), + call_operator: T.nilable(::Herb::Token), + message: T.nilable(::Herb::Token), + arguments: T.nilable(T::Array[::Herb::AST::RubyLiteralNode]), + block_opening: T.nilable(::Herb::Token), + body: T::Array[::Herb::AST::Node], + block_arguments: T.nilable(T::Array[::Herb::AST::RubyParameterNode]), + rescue_clause: T.nilable(::Herb::AST::ERBRescueNode), + else_clause: T.nilable(::Herb::AST::ERBElseNode), + ensure_clause: T.nilable(::Herb::AST::ERBEnsureNode), + end_node: T.nilable(::Herb::AST::ERBEndNode) + ).void + end def initialize(type, location, errors, tag_opening, content, tag_closing, prism_node, receiver, call_operator, message, arguments, block_opening, body, block_arguments, rescue_clause, else_clause, ensure_clause, end_node); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#2802 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2661 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : Array[Herb::AST::RubyLiteralNode]? - # - # source://herb//lib/herb/ast/nodes.rb#2725 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2584 def arguments; end - # : Array[Herb::AST::RubyParameterNode]? - # - # source://herb//lib/herb/ast/nodes.rb#2728 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2587 def block_arguments; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#2726 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2585 def block_opening; end - # : Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#2727 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2586 def body; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#2723 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2582 def call_operator; end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#2807 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2666 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#2812 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2671 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#2719 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2578 def content; end - # : () -> Prism::node? - # - # source://herb//lib/herb/ast/nodes.rb#2765 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2624 + sig { returns(T.nilable(::Prism::Node)) } def deserialized_prism_node; end - # : Herb::AST::ERBElseNode? - # - # source://herb//lib/herb/ast/nodes.rb#2730 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2589 def else_clause; end - # : Herb::AST::ERBEndNode? - # - # source://herb//lib/herb/ast/nodes.rb#2732 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2591 def end_node; end - # : Herb::AST::ERBEnsureNode? - # - # source://herb//lib/herb/ast/nodes.rb#2731 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2590 def ensure_clause; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#2817 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2676 + sig { returns(::String) } def inspect; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#2724 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2583 def message; end - # : String? - # - # source://herb//lib/herb/ast/nodes.rb#2721 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2580 def prism_node; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#2722 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2581 def receiver; end - # : Herb::AST::ERBRescueNode? - # - # source://herb//lib/herb/ast/nodes.rb#2729 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2588 def rescue_clause; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#2720 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2579 def tag_closing; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#2718 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2577 def tag_opening; end - # : () -> serialized_erb_iteration_block_node - # - # source://herb//lib/herb/ast/nodes.rb#2781 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:2640 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#2822 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2681 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?tag_opening: Herb::Token?, ?content: Herb::Token?, ?tag_closing: Herb::Token?, ?prism_node: String?, ?receiver: Herb::Token?, ?call_operator: Herb::Token?, ?message: Herb::Token?, ?arguments: Array[Herb::AST::RubyLiteralNode]?, ?block_opening: Herb::Token?, ?body: Array[Herb::AST::Node], ?block_arguments: Array[Herb::AST::RubyParameterNode]?, ?rescue_clause: Herb::AST::ERBRescueNode?, ?else_clause: Herb::AST::ERBElseNode?, ?ensure_clause: Herb::AST::ERBEnsureNode?, ?end_node: Herb::AST::ERBEndNode?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> ERBIterationBlockNode - # - # source://herb//lib/herb/ast/nodes.rb#2760 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2619 + sig do + params( + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + prism_node: T.nilable(::String), + receiver: T.nilable(::Herb::Token), + call_operator: T.nilable(::Herb::Token), + message: T.nilable(::Herb::Token), + arguments: T.nilable(T::Array[::Herb::AST::RubyLiteralNode]), + block_opening: T.nilable(::Herb::Token), + body: T::Array[::Herb::AST::Node], + block_arguments: T.nilable(T::Array[::Herb::AST::RubyParameterNode]), + rescue_clause: T.nilable(::Herb::AST::ERBRescueNode), + else_clause: T.nilable(::Herb::AST::ERBElseNode), + ensure_clause: T.nilable(::Herb::AST::ERBEnsureNode), + end_node: T.nilable(::Herb::AST::ERBEndNode), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::ERBIterationBlockNode) + end def build(tag_opening: T.unsafe(nil), content: T.unsafe(nil), tag_closing: T.unsafe(nil), prism_node: T.unsafe(nil), receiver: T.unsafe(nil), call_operator: T.unsafe(nil), message: T.unsafe(nil), arguments: T.unsafe(nil), block_opening: T.unsafe(nil), body: T.unsafe(nil), block_arguments: T.unsafe(nil), rescue_clause: T.unsafe(nil), else_clause: T.unsafe(nil), ensure_clause: T.unsafe(nil), end_node: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#2755 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2614 + sig { returns(::String) } def type; end end end -# : type serialized_erb_open_tag_node = { -# | tag_opening: Herb::Token?, -# | content: Herb::Token?, -# | tag_closing: Herb::Token?, -# | tag_name: Herb::Token?, -# | children: Array[Herb::AST::Node], -# | } -# -# source://herb//lib/herb/ast/nodes.rb#1340 +# pkg:gem/herb#lib/herb/ast/nodes.rb:1277 class Herb::AST::ERBOpenTagNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Herb::Token?, Herb::Token?, Herb::Token?, Array[Herb::AST::Node]) -> void - # - # @return [ERBOpenTagNode] a new instance of ERBOpenTagNode - # - # source://herb//lib/herb/ast/nodes.rb#1350 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1287 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + tag_name: T.nilable(::Herb::Token), + children: T::Array[::Herb::AST::Node] + ).void + end def initialize(type, location, errors, tag_opening, content, tag_closing, tag_name, children); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#1381 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1318 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#1386 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1323 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#1347 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1284 def children; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#1391 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1328 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#1344 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1281 def content; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#1396 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1333 + sig { returns(::String) } def inspect; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#1345 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1282 def tag_closing; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#1346 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1283 def tag_name; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#1343 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1280 def tag_opening; end - # : () -> serialized_erb_open_tag_node - # - # source://herb//lib/herb/ast/nodes.rb#1370 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:1307 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#1401 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1338 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?tag_opening: Herb::Token?, ?content: Herb::Token?, ?tag_closing: Herb::Token?, ?tag_name: Herb::Token?, ?children: Array[Herb::AST::Node], ?location: Location, ?errors: Array[Herb::Errors::Error]) -> ERBOpenTagNode - # - # source://herb//lib/herb/ast/nodes.rb#1365 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1302 + sig do + params( + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + tag_name: T.nilable(::Herb::Token), + children: T::Array[::Herb::AST::Node], + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::ERBOpenTagNode) + end def build(tag_opening: T.unsafe(nil), content: T.unsafe(nil), tag_closing: T.unsafe(nil), tag_name: T.unsafe(nil), children: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#1360 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1297 + sig { returns(::String) } def type; end end end -# : type serialized_erb_render_node = { -# | tag_opening: Herb::Token?, -# | content: Herb::Token?, -# | tag_closing: Herb::Token?, -# | analyzed_ruby: nil, -# | prism_node: String?, -# | keywords: Herb::AST::RubyRenderKeywordsNode?, -# | body: Array[Herb::AST::Node], -# | block_arguments: Array[Herb::AST::RubyParameterNode]?, -# | rescue_clause: Herb::AST::ERBRescueNode?, -# | else_clause: Herb::AST::ERBElseNode?, -# | ensure_clause: Herb::AST::ERBEnsureNode?, -# | end_node: Herb::AST::ERBEndNode?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#4558 +# pkg:gem/herb#lib/herb/ast/nodes.rb:4305 class Herb::AST::ERBRenderNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Herb::Token?, Herb::Token?, nil, String?, Herb::AST::RubyRenderKeywordsNode?, Array[Herb::AST::Node], Array[Herb::AST::RubyParameterNode]?, Herb::AST::ERBRescueNode?, Herb::AST::ERBElseNode?, Herb::AST::ERBEnsureNode?, Herb::AST::ERBEndNode?) -> void - # - # @return [ERBRenderNode] a new instance of ERBRenderNode - # - # source://herb//lib/herb/ast/nodes.rb#4575 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4322 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + analyzed_ruby: ::NilClass, + prism_node: T.nilable(::String), + keywords: T.nilable(::Herb::AST::RubyRenderKeywordsNode), + body: T::Array[::Herb::AST::Node], + block_arguments: T.nilable(T::Array[::Herb::AST::RubyParameterNode]), + rescue_clause: T.nilable(::Herb::AST::ERBRescueNode), + else_clause: T.nilable(::Herb::AST::ERBElseNode), + ensure_clause: T.nilable(::Herb::AST::ERBEnsureNode), + end_node: T.nilable(::Herb::AST::ERBEndNode) + ).void + end def initialize(type, location, errors, tag_opening, content, tag_closing, analyzed_ruby, prism_node, keywords, body, block_arguments, rescue_clause, else_clause, ensure_clause, end_node); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#4636 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4383 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : nil - # - # source://herb//lib/herb/ast/nodes.rb#4564 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4311 def analyzed_ruby; end - # : Array[Herb::AST::RubyParameterNode]? - # - # source://herb//lib/herb/ast/nodes.rb#4568 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4315 def block_arguments; end - # : Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#4567 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4314 def body; end - # @return [Boolean] - # - # source://herb//lib/herb/ast/erb_render_node.rb#38 + # pkg:gem/herb#lib/herb/ast/erb_render_node.rb:38 def bound_state?; end - # source://herb//lib/herb/ast/erb_render_node.rb#50 + # pkg:gem/herb#lib/herb/ast/erb_render_node.rb:50 def candidate_paths(name = T.unsafe(nil), view_root = T.unsafe(nil), source_directory = T.unsafe(nil)); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#4641 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4388 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#4646 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4393 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#4562 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4309 def content; end - # : () -> Prism::node? - # - # source://herb//lib/herb/ast/nodes.rb#4602 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4349 + sig { returns(T.nilable(::Prism::Node)) } def deserialized_prism_node; end - # @return [Boolean] - # - # source://herb//lib/herb/ast/erb_render_node.rb#14 + # pkg:gem/herb#lib/herb/ast/erb_render_node.rb:14 def dynamic?; end - # : Herb::AST::ERBElseNode? - # - # source://herb//lib/herb/ast/nodes.rb#4570 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4317 def else_clause; end - # : Herb::AST::ERBEndNode? - # - # source://herb//lib/herb/ast/nodes.rb#4572 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4319 def end_node; end - # : Herb::AST::ERBEnsureNode? - # - # source://herb//lib/herb/ast/nodes.rb#4571 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4318 def ensure_clause; end - # source://herb//lib/herb/ast/erb_render_node.rb#66 + # pkg:gem/herb#lib/herb/ast/erb_render_node.rb:66 def find_non_partial_matches(name = T.unsafe(nil), view_root = T.unsafe(nil), source_directory = T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#4651 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4398 + sig { returns(::String) } def inspect; end - # : Herb::AST::RubyRenderKeywordsNode? - # - # source://herb//lib/herb/ast/nodes.rb#4566 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4313 def keywords; end - # source://herb//lib/herb/ast/erb_render_node.rb#26 + # pkg:gem/herb#lib/herb/ast/erb_render_node.rb:26 def layout_name; end - # source://herb//lib/herb/ast/erb_render_node.rb#30 + # pkg:gem/herb#lib/herb/ast/erb_render_node.rb:30 def local_names; end - # source://herb//lib/herb/ast/erb_render_node.rb#18 + # pkg:gem/herb#lib/herb/ast/erb_render_node.rb:18 def partial_path; end - # : String? - # - # source://herb//lib/herb/ast/nodes.rb#4565 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4312 def prism_node; end - # : Herb::AST::ERBRescueNode? - # - # source://herb//lib/herb/ast/nodes.rb#4569 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4316 def rescue_clause; end - # source://herb//lib/herb/ast/erb_render_node.rb#42 + # pkg:gem/herb#lib/herb/ast/erb_render_node.rb:42 def resolve(view_root: T.unsafe(nil), source_directory: T.unsafe(nil)); end - # source://herb//lib/herb/ast/erb_render_node.rb#58 + # pkg:gem/herb#lib/herb/ast/erb_render_node.rb:58 def similar_partials(view_root: T.unsafe(nil), source_directory: T.unsafe(nil), limit: T.unsafe(nil)); end - # source://herb//lib/herb/ast/erb_render_node.rb#34 + # pkg:gem/herb#lib/herb/ast/erb_render_node.rb:34 def state_names; end - # @return [Boolean] - # - # source://herb//lib/herb/ast/erb_render_node.rb#10 + # pkg:gem/herb#lib/herb/ast/erb_render_node.rb:10 def static_partial?; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#4563 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4310 def tag_closing; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#4561 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4308 def tag_opening; end - # source://herb//lib/herb/ast/erb_render_node.rb#22 + # pkg:gem/herb#lib/herb/ast/erb_render_node.rb:22 def template_name; end - # : () -> serialized_erb_render_node - # - # source://herb//lib/herb/ast/nodes.rb#4618 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:4365 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#4656 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4403 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end private - # source://herb//lib/herb/ast/erb_render_node.rb#80 + # pkg:gem/herb#lib/herb/ast/erb_render_node.rb:80 def coerce_directory(directory); end - # source://herb//lib/herb/ast/erb_render_node.rb#76 + # pkg:gem/herb#lib/herb/ast/erb_render_node.rb:76 def resolver_for(view_root); end class << self - # : (?tag_opening: Herb::Token?, ?content: Herb::Token?, ?tag_closing: Herb::Token?, ?analyzed_ruby: nil, ?prism_node: String?, ?keywords: Herb::AST::RubyRenderKeywordsNode?, ?body: Array[Herb::AST::Node], ?block_arguments: Array[Herb::AST::RubyParameterNode]?, ?rescue_clause: Herb::AST::ERBRescueNode?, ?else_clause: Herb::AST::ERBElseNode?, ?ensure_clause: Herb::AST::ERBEnsureNode?, ?end_node: Herb::AST::ERBEndNode?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> ERBRenderNode - # - # source://herb//lib/herb/ast/nodes.rb#4597 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4344 + sig do + params( + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + analyzed_ruby: ::NilClass, + prism_node: T.nilable(::String), + keywords: T.nilable(::Herb::AST::RubyRenderKeywordsNode), + body: T::Array[::Herb::AST::Node], + block_arguments: T.nilable(T::Array[::Herb::AST::RubyParameterNode]), + rescue_clause: T.nilable(::Herb::AST::ERBRescueNode), + else_clause: T.nilable(::Herb::AST::ERBElseNode), + ensure_clause: T.nilable(::Herb::AST::ERBEnsureNode), + end_node: T.nilable(::Herb::AST::ERBEndNode), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::ERBRenderNode) + end def build(tag_opening: T.unsafe(nil), content: T.unsafe(nil), tag_closing: T.unsafe(nil), analyzed_ruby: T.unsafe(nil), prism_node: T.unsafe(nil), keywords: T.unsafe(nil), body: T.unsafe(nil), block_arguments: T.unsafe(nil), rescue_clause: T.unsafe(nil), else_clause: T.unsafe(nil), ensure_clause: T.unsafe(nil), end_node: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#4592 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4339 + sig { returns(::String) } def type; end end end -# : type serialized_erb_rescue_node = { -# | tag_opening: Herb::Token?, -# | content: Herb::Token?, -# | tag_closing: Herb::Token?, -# | statements: Array[Herb::AST::Node], -# | subsequent: Herb::AST::ERBRescueNode?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#3725 +# pkg:gem/herb#lib/herb/ast/nodes.rb:3533 class Herb::AST::ERBRescueNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Herb::Token?, Herb::Token?, Array[Herb::AST::Node], Herb::AST::ERBRescueNode?) -> void - # - # @return [ERBRescueNode] a new instance of ERBRescueNode - # - # source://herb//lib/herb/ast/nodes.rb#3735 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3543 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + statements: T::Array[::Herb::AST::Node], + subsequent: T.nilable(::Herb::AST::ERBRescueNode) + ).void + end def initialize(type, location, errors, tag_opening, content, tag_closing, statements, subsequent); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#3766 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3574 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#3771 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3579 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#3776 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3584 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#3729 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3537 def content; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#3781 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3589 + sig { returns(::String) } def inspect; end - # : Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#3731 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3539 def statements; end - # : Herb::AST::ERBRescueNode? - # - # source://herb//lib/herb/ast/nodes.rb#3732 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3540 def subsequent; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#3730 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3538 def tag_closing; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#3728 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3536 def tag_opening; end - # : () -> serialized_erb_rescue_node - # - # source://herb//lib/herb/ast/nodes.rb#3755 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:3563 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#3786 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3594 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?tag_opening: Herb::Token?, ?content: Herb::Token?, ?tag_closing: Herb::Token?, ?statements: Array[Herb::AST::Node], ?subsequent: Herb::AST::ERBRescueNode?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> ERBRescueNode - # - # source://herb//lib/herb/ast/nodes.rb#3750 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3558 + sig do + params( + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + statements: T::Array[::Herb::AST::Node], + subsequent: T.nilable(::Herb::AST::ERBRescueNode), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::ERBRescueNode) + end def build(tag_opening: T.unsafe(nil), content: T.unsafe(nil), tag_closing: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#3745 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3553 + sig { returns(::String) } def type; end end end -# : type serialized_erb_strict_locals_node = { -# | tag_opening: Herb::Token?, -# | content: Herb::Token?, -# | tag_closing: Herb::Token?, -# | analyzed_ruby: nil, -# | prism_node: String?, -# | locals: Array[Herb::AST::RubyParameterNode]?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#4845 +# pkg:gem/herb#lib/herb/ast/nodes.rb:4580 class Herb::AST::ERBStrictLocalsNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Herb::Token?, Herb::Token?, nil, String?, Array[Herb::AST::RubyParameterNode]?) -> void - # - # @return [ERBStrictLocalsNode] a new instance of ERBStrictLocalsNode - # - # source://herb//lib/herb/ast/nodes.rb#4856 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4591 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + analyzed_ruby: ::NilClass, + prism_node: T.nilable(::String), + locals: T.nilable(T::Array[::Herb::AST::RubyParameterNode]) + ).void + end def initialize(type, location, errors, tag_opening, content, tag_closing, analyzed_ruby, prism_node, locals); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#4905 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4640 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : nil - # - # source://herb//lib/herb/ast/nodes.rb#4851 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4586 def analyzed_ruby; end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#4910 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4645 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#4915 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4650 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#4849 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4584 def content; end - # : () -> Prism::node? - # - # source://herb//lib/herb/ast/nodes.rb#4877 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4612 + sig { returns(T.nilable(::Prism::Node)) } def deserialized_prism_node; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#4920 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4655 + sig { returns(::String) } def inspect; end - # : Array[Herb::AST::RubyParameterNode]? - # - # source://herb//lib/herb/ast/nodes.rb#4853 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4588 def locals; end - # : String? - # - # source://herb//lib/herb/ast/nodes.rb#4852 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4587 def prism_node; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#4850 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4585 def tag_closing; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#4848 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4583 def tag_opening; end - # : () -> serialized_erb_strict_locals_node - # - # source://herb//lib/herb/ast/nodes.rb#4893 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:4628 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#4925 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4660 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?tag_opening: Herb::Token?, ?content: Herb::Token?, ?tag_closing: Herb::Token?, ?analyzed_ruby: nil, ?prism_node: String?, ?locals: Array[Herb::AST::RubyParameterNode]?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> ERBStrictLocalsNode - # - # source://herb//lib/herb/ast/nodes.rb#4872 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4607 + sig do + params( + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + analyzed_ruby: ::NilClass, + prism_node: T.nilable(::String), + locals: T.nilable(T::Array[::Herb::AST::RubyParameterNode]), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::ERBStrictLocalsNode) + end def build(tag_opening: T.unsafe(nil), content: T.unsafe(nil), tag_closing: T.unsafe(nil), analyzed_ruby: T.unsafe(nil), prism_node: T.unsafe(nil), locals: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#4867 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4602 + sig { returns(::String) } def type; end end end -# : type serialized_erb_unless_node = { -# | tag_opening: Herb::Token?, -# | content: Herb::Token?, -# | tag_closing: Herb::Token?, -# | then_keyword: Herb::Location?, -# | prism_node: String?, -# | statements: Array[Herb::AST::Node], -# | else_clause: Herb::AST::ERBElseNode?, -# | end_node: Herb::AST::ERBEndNode?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#4104 +# pkg:gem/herb#lib/herb/ast/nodes.rb:3888 class Herb::AST::ERBUnlessNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Herb::Token?, Herb::Token?, Herb::Location?, String?, Array[Herb::AST::Node], Herb::AST::ERBElseNode?, Herb::AST::ERBEndNode?) -> void - # - # @return [ERBUnlessNode] a new instance of ERBUnlessNode - # - # source://herb//lib/herb/ast/nodes.rb#4117 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3901 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + then_keyword: T.nilable(::Herb::Location), + prism_node: T.nilable(::String), + statements: T::Array[::Herb::AST::Node], + else_clause: T.nilable(::Herb::AST::ERBElseNode), + end_node: T.nilable(::Herb::AST::ERBEndNode) + ).void + end def initialize(type, location, errors, tag_opening, content, tag_closing, then_keyword, prism_node, statements, else_clause, end_node); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#4170 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3954 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#4175 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3959 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#4180 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3964 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#4108 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3892 def content; end - # : () -> Prism::node? - # - # source://herb//lib/herb/ast/nodes.rb#4140 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3924 + sig { returns(T.nilable(::Prism::Node)) } def deserialized_prism_node; end - # : Herb::AST::ERBElseNode? - # - # source://herb//lib/herb/ast/nodes.rb#4113 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3897 def else_clause; end - # : Herb::AST::ERBEndNode? - # - # source://herb//lib/herb/ast/nodes.rb#4114 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3898 def end_node; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#4185 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3969 + sig { returns(::String) } def inspect; end - # : String? - # - # source://herb//lib/herb/ast/nodes.rb#4111 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3895 def prism_node; end - # : Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#4112 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3896 def statements; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#4109 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3893 def tag_closing; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#4107 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3891 def tag_opening; end - # : Herb::Location? - # - # source://herb//lib/herb/ast/nodes.rb#4110 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3894 def then_keyword; end - # : () -> serialized_erb_unless_node - # - # source://herb//lib/herb/ast/nodes.rb#4156 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:3940 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#4190 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3974 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?tag_opening: Herb::Token?, ?content: Herb::Token?, ?tag_closing: Herb::Token?, ?then_keyword: Herb::Location?, ?prism_node: String?, ?statements: Array[Herb::AST::Node], ?else_clause: Herb::AST::ERBElseNode?, ?end_node: Herb::AST::ERBEndNode?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> ERBUnlessNode - # - # source://herb//lib/herb/ast/nodes.rb#4135 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3919 + sig do + params( + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + then_keyword: T.nilable(::Herb::Location), + prism_node: T.nilable(::String), + statements: T::Array[::Herb::AST::Node], + else_clause: T.nilable(::Herb::AST::ERBElseNode), + end_node: T.nilable(::Herb::AST::ERBEndNode), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::ERBUnlessNode) + end def build(tag_opening: T.unsafe(nil), content: T.unsafe(nil), tag_closing: T.unsafe(nil), then_keyword: T.unsafe(nil), prism_node: T.unsafe(nil), statements: T.unsafe(nil), else_clause: T.unsafe(nil), end_node: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#4130 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3914 + sig { returns(::String) } def type; end end end -# : type serialized_erb_until_node = { -# | tag_opening: Herb::Token?, -# | content: Herb::Token?, -# | tag_closing: Herb::Token?, -# | prism_node: String?, -# | statements: Array[Herb::AST::Node], -# | end_node: Herb::AST::ERBEndNode?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#3458 +# pkg:gem/herb#lib/herb/ast/nodes.rb:3279 class Herb::AST::ERBUntilNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Herb::Token?, Herb::Token?, String?, Array[Herb::AST::Node], Herb::AST::ERBEndNode?) -> void - # - # @return [ERBUntilNode] a new instance of ERBUntilNode - # - # source://herb//lib/herb/ast/nodes.rb#3469 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3290 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + prism_node: T.nilable(::String), + statements: T::Array[::Herb::AST::Node], + end_node: T.nilable(::Herb::AST::ERBEndNode) + ).void + end def initialize(type, location, errors, tag_opening, content, tag_closing, prism_node, statements, end_node); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#3518 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3339 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#3523 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3344 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#3528 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3349 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#3462 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3283 def content; end - # : () -> Prism::node? - # - # source://herb//lib/herb/ast/nodes.rb#3490 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3311 + sig { returns(T.nilable(::Prism::Node)) } def deserialized_prism_node; end - # : Herb::AST::ERBEndNode? - # - # source://herb//lib/herb/ast/nodes.rb#3466 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3287 def end_node; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#3533 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3354 + sig { returns(::String) } def inspect; end - # : String? - # - # source://herb//lib/herb/ast/nodes.rb#3464 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3285 def prism_node; end - # : Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#3465 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3286 def statements; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#3463 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3284 def tag_closing; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#3461 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3282 def tag_opening; end - # : () -> serialized_erb_until_node - # - # source://herb//lib/herb/ast/nodes.rb#3506 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:3327 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#3538 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3359 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?tag_opening: Herb::Token?, ?content: Herb::Token?, ?tag_closing: Herb::Token?, ?prism_node: String?, ?statements: Array[Herb::AST::Node], ?end_node: Herb::AST::ERBEndNode?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> ERBUntilNode - # - # source://herb//lib/herb/ast/nodes.rb#3485 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3306 + sig do + params( + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + prism_node: T.nilable(::String), + statements: T::Array[::Herb::AST::Node], + end_node: T.nilable(::Herb::AST::ERBEndNode), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::ERBUntilNode) + end def build(tag_opening: T.unsafe(nil), content: T.unsafe(nil), tag_closing: T.unsafe(nil), prism_node: T.unsafe(nil), statements: T.unsafe(nil), end_node: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#3480 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3301 + sig { returns(::String) } def type; end end end -# : type serialized_erb_when_node = { -# | tag_opening: Herb::Token?, -# | content: Herb::Token?, -# | tag_closing: Herb::Token?, -# | then_keyword: Herb::Location?, -# | statements: Array[Herb::AST::Node], -# | } -# -# source://herb//lib/herb/ast/nodes.rb#2915 +# pkg:gem/herb#lib/herb/ast/nodes.rb:2768 class Herb::AST::ERBWhenNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Herb::Token?, Herb::Token?, Herb::Location?, Array[Herb::AST::Node]) -> void - # - # @return [ERBWhenNode] a new instance of ERBWhenNode - # - # source://herb//lib/herb/ast/nodes.rb#2925 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2778 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + then_keyword: T.nilable(::Herb::Location), + statements: T::Array[::Herb::AST::Node] + ).void + end def initialize(type, location, errors, tag_opening, content, tag_closing, then_keyword, statements); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#2956 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2809 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#2961 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2814 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#2966 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2819 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#2919 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2772 def content; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#2971 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2824 + sig { returns(::String) } def inspect; end - # : Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#2922 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2775 def statements; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#2920 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2773 def tag_closing; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#2918 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2771 def tag_opening; end - # : Herb::Location? - # - # source://herb//lib/herb/ast/nodes.rb#2921 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2774 def then_keyword; end - # : () -> serialized_erb_when_node - # - # source://herb//lib/herb/ast/nodes.rb#2945 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:2798 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#2976 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2829 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?tag_opening: Herb::Token?, ?content: Herb::Token?, ?tag_closing: Herb::Token?, ?then_keyword: Herb::Location?, ?statements: Array[Herb::AST::Node], ?location: Location, ?errors: Array[Herb::Errors::Error]) -> ERBWhenNode - # - # source://herb//lib/herb/ast/nodes.rb#2940 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2793 + sig do + params( + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + then_keyword: T.nilable(::Herb::Location), + statements: T::Array[::Herb::AST::Node], + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::ERBWhenNode) + end def build(tag_opening: T.unsafe(nil), content: T.unsafe(nil), tag_closing: T.unsafe(nil), then_keyword: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#2935 + # pkg:gem/herb#lib/herb/ast/nodes.rb:2788 + sig { returns(::String) } def type; end end end -# : type serialized_erb_while_node = { -# | tag_opening: Herb::Token?, -# | content: Herb::Token?, -# | tag_closing: Herb::Token?, -# | prism_node: String?, -# | statements: Array[Herb::AST::Node], -# | end_node: Herb::AST::ERBEndNode?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#3324 +# pkg:gem/herb#lib/herb/ast/nodes.rb:3152 class Herb::AST::ERBWhileNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Herb::Token?, Herb::Token?, String?, Array[Herb::AST::Node], Herb::AST::ERBEndNode?) -> void - # - # @return [ERBWhileNode] a new instance of ERBWhileNode - # - # source://herb//lib/herb/ast/nodes.rb#3335 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3163 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + prism_node: T.nilable(::String), + statements: T::Array[::Herb::AST::Node], + end_node: T.nilable(::Herb::AST::ERBEndNode) + ).void + end def initialize(type, location, errors, tag_opening, content, tag_closing, prism_node, statements, end_node); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#3384 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3212 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#3389 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3217 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#3394 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3222 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#3328 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3156 def content; end - # : () -> Prism::node? - # - # source://herb//lib/herb/ast/nodes.rb#3356 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3184 + sig { returns(T.nilable(::Prism::Node)) } def deserialized_prism_node; end - # : Herb::AST::ERBEndNode? - # - # source://herb//lib/herb/ast/nodes.rb#3332 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3160 def end_node; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#3399 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3227 + sig { returns(::String) } def inspect; end - # : String? - # - # source://herb//lib/herb/ast/nodes.rb#3330 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3158 def prism_node; end - # : Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#3331 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3159 def statements; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#3329 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3157 def tag_closing; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#3327 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3155 def tag_opening; end - # : () -> serialized_erb_while_node - # - # source://herb//lib/herb/ast/nodes.rb#3372 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:3200 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#3404 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3232 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?tag_opening: Herb::Token?, ?content: Herb::Token?, ?tag_closing: Herb::Token?, ?prism_node: String?, ?statements: Array[Herb::AST::Node], ?end_node: Herb::AST::ERBEndNode?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> ERBWhileNode - # - # source://herb//lib/herb/ast/nodes.rb#3351 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3179 + sig do + params( + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + prism_node: T.nilable(::String), + statements: T::Array[::Herb::AST::Node], + end_node: T.nilable(::Herb::AST::ERBEndNode), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::ERBWhileNode) + end def build(tag_opening: T.unsafe(nil), content: T.unsafe(nil), tag_closing: T.unsafe(nil), prism_node: T.unsafe(nil), statements: T.unsafe(nil), end_node: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#3346 + # pkg:gem/herb#lib/herb/ast/nodes.rb:3174 + sig { returns(::String) } def type; end end end -# : type serialized_erb_yield_node = { -# | tag_opening: Herb::Token?, -# | content: Herb::Token?, -# | tag_closing: Herb::Token?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#4968 +# pkg:gem/herb#lib/herb/ast/nodes.rb:4699 class Herb::AST::ERBYieldNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Herb::Token?, Herb::Token?) -> void - # - # @return [ERBYieldNode] a new instance of ERBYieldNode - # - # source://herb//lib/herb/ast/nodes.rb#4976 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4707 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token) + ).void + end def initialize(type, location, errors, tag_opening, content, tag_closing); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#5003 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4734 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#5008 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4739 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#5013 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4744 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#4972 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4703 def content; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#5018 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4749 + sig { returns(::String) } def inspect; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#4973 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4704 def tag_closing; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#4971 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4702 def tag_opening; end - # : () -> serialized_erb_yield_node - # - # source://herb//lib/herb/ast/nodes.rb#4994 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:4725 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#5023 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4754 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?tag_opening: Herb::Token?, ?content: Herb::Token?, ?tag_closing: Herb::Token?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> ERBYieldNode - # - # source://herb//lib/herb/ast/nodes.rb#4989 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4720 + sig do + params( + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::ERBYieldNode) + end def build(tag_opening: T.unsafe(nil), content: T.unsafe(nil), tag_closing: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#4984 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4715 + sig { returns(::String) } def type; end end end -# : type serialized_html_attribute_name_node = { -# | children: Array[(Herb::AST::LiteralNode | Herb::AST::ERBContentNode | Herb::AST::ERBCommentNode)]?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#1004 +# pkg:gem/herb#lib/herb/ast/nodes.rb:956 class Herb::AST::HTMLAttributeNameNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Array[(Herb::AST::LiteralNode | Herb::AST::ERBContentNode | Herb::AST::ERBCommentNode)]?) -> void - # - # @return [HTMLAttributeNameNode] a new instance of HTMLAttributeNameNode - # - # source://herb//lib/herb/ast/nodes.rb#1010 + # pkg:gem/herb#lib/herb/ast/nodes.rb:962 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + children: T.nilable(T::Array[T.any(::Herb::AST::ERBCommentNode, ::Herb::AST::ERBContentNode, ::Herb::AST::LiteralNode)]) + ).void + end def initialize(type, location, errors, children); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#1033 + # pkg:gem/herb#lib/herb/ast/nodes.rb:985 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#1038 + # pkg:gem/herb#lib/herb/ast/nodes.rb:990 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : Array[(Herb::AST::LiteralNode | Herb::AST::ERBContentNode | Herb::AST::ERBCommentNode)]? - # - # source://herb//lib/herb/ast/nodes.rb#1007 + # pkg:gem/herb#lib/herb/ast/nodes.rb:959 def children; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#1043 + # pkg:gem/herb#lib/herb/ast/nodes.rb:995 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#1048 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1000 + sig { returns(::String) } def inspect; end - # : () -> serialized_html_attribute_name_node - # - # source://herb//lib/herb/ast/nodes.rb#1026 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:978 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#1053 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1005 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?children: Array[(Herb::AST::LiteralNode | Herb::AST::ERBContentNode | Herb::AST::ERBCommentNode)]?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> HTMLAttributeNameNode - # - # source://herb//lib/herb/ast/nodes.rb#1021 + # pkg:gem/herb#lib/herb/ast/nodes.rb:973 + sig do + params( + children: T.nilable(T::Array[T.any(::Herb::AST::ERBCommentNode, ::Herb::AST::ERBContentNode, ::Herb::AST::LiteralNode)]), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::HTMLAttributeNameNode) + end def build(children: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#1016 + # pkg:gem/herb#lib/herb/ast/nodes.rb:968 + sig { returns(::String) } def type; end end end -# : type serialized_html_attribute_node = { -# | name: Herb::AST::HTMLAttributeNameNode?, -# | equals: Herb::Token?, -# | value: Herb::AST::HTMLAttributeValueNode?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#1082 +# pkg:gem/herb#lib/herb/ast/nodes.rb:1030 class Herb::AST::HTMLAttributeNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::AST::HTMLAttributeNameNode?, Herb::Token?, Herb::AST::HTMLAttributeValueNode?) -> void - # - # @return [HTMLAttributeNode] a new instance of HTMLAttributeNode - # - # source://herb//lib/herb/ast/nodes.rb#1090 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1038 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + name: T.nilable(::Herb::AST::HTMLAttributeNameNode), + equals: T.nilable(::Herb::Token), + value: T.nilable(::Herb::AST::HTMLAttributeValueNode) + ).void + end def initialize(type, location, errors, name, equals, value); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#1117 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1065 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#1122 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1070 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#1127 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1075 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#1086 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1034 def equals; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#1132 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1080 + sig { returns(::String) } def inspect; end - # : Herb::AST::HTMLAttributeNameNode? - # - # source://herb//lib/herb/ast/nodes.rb#1085 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1033 def name; end - # : () -> serialized_html_attribute_node - # - # source://herb//lib/herb/ast/nodes.rb#1108 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:1056 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#1137 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1085 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end - # : Herb::AST::HTMLAttributeValueNode? - # - # source://herb//lib/herb/ast/nodes.rb#1087 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1035 def value; end class << self - # : (?name: Herb::AST::HTMLAttributeNameNode?, ?equals: Herb::Token?, ?value: Herb::AST::HTMLAttributeValueNode?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> HTMLAttributeNode - # - # source://herb//lib/herb/ast/nodes.rb#1103 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1051 + sig do + params( + name: T.nilable(::Herb::AST::HTMLAttributeNameNode), + equals: T.nilable(::Herb::Token), + value: T.nilable(::Herb::AST::HTMLAttributeValueNode), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::HTMLAttributeNode) + end def build(name: T.unsafe(nil), equals: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#1098 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1046 + sig { returns(::String) } def type; end end end -# : type serialized_html_attribute_value_node = { -# | open_quote: Herb::Token?, -# | children: Array[Herb::AST::Node], -# | close_quote: Herb::Token?, -# | quoted: bool, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#910 +# pkg:gem/herb#lib/herb/ast/nodes.rb:864 class Herb::AST::HTMLAttributeValueNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Array[Herb::AST::Node], Herb::Token?, bool) -> void - # - # @return [HTMLAttributeValueNode] a new instance of HTMLAttributeValueNode - # - # source://herb//lib/herb/ast/nodes.rb#919 + # pkg:gem/herb#lib/herb/ast/nodes.rb:873 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + open_quote: T.nilable(::Herb::Token), + children: T::Array[::Herb::AST::Node], + close_quote: T.nilable(::Herb::Token), + quoted: T::Boolean + ).void + end def initialize(type, location, errors, open_quote, children, close_quote, quoted); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#948 + # pkg:gem/herb#lib/herb/ast/nodes.rb:902 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#953 + # pkg:gem/herb#lib/herb/ast/nodes.rb:907 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#914 + # pkg:gem/herb#lib/herb/ast/nodes.rb:868 def children; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#915 + # pkg:gem/herb#lib/herb/ast/nodes.rb:869 def close_quote; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#958 + # pkg:gem/herb#lib/herb/ast/nodes.rb:912 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#963 + # pkg:gem/herb#lib/herb/ast/nodes.rb:917 + sig { returns(::String) } def inspect; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#913 + # pkg:gem/herb#lib/herb/ast/nodes.rb:867 def open_quote; end - # : bool - # - # source://herb//lib/herb/ast/nodes.rb#916 + # pkg:gem/herb#lib/herb/ast/nodes.rb:870 def quoted; end - # : () -> serialized_html_attribute_value_node - # - # source://herb//lib/herb/ast/nodes.rb#938 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:892 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#968 + # pkg:gem/herb#lib/herb/ast/nodes.rb:922 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?open_quote: Herb::Token?, ?children: Array[Herb::AST::Node], ?close_quote: Herb::Token?, ?quoted: bool, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> HTMLAttributeValueNode - # - # source://herb//lib/herb/ast/nodes.rb#933 + # pkg:gem/herb#lib/herb/ast/nodes.rb:887 + sig do + params( + open_quote: T.nilable(::Herb::Token), + children: T::Array[::Herb::AST::Node], + close_quote: T.nilable(::Herb::Token), + quoted: T::Boolean, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::HTMLAttributeValueNode) + end def build(open_quote: T.unsafe(nil), children: T.unsafe(nil), close_quote: T.unsafe(nil), quoted: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#928 + # pkg:gem/herb#lib/herb/ast/nodes.rb:882 + sig { returns(::String) } def type; end end end -# : type serialized_html_close_tag_node = { -# | tag_opening: Herb::Token?, -# | tag_name: Herb::Token?, -# | children: Array[Herb::AST::WhitespaceNode]?, -# | tag_closing: Herb::Token?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#399 +# pkg:gem/herb#lib/herb/ast/nodes.rb:378 class Herb::AST::HTMLCloseTagNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Herb::Token?, Array[Herb::AST::WhitespaceNode]?, Herb::Token?) -> void - # - # @return [HTMLCloseTagNode] a new instance of HTMLCloseTagNode - # - # source://herb//lib/herb/ast/nodes.rb#408 + # pkg:gem/herb#lib/herb/ast/nodes.rb:387 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_opening: T.nilable(::Herb::Token), + tag_name: T.nilable(::Herb::Token), + children: T.nilable(T::Array[::Herb::AST::WhitespaceNode]), + tag_closing: T.nilable(::Herb::Token) + ).void + end def initialize(type, location, errors, tag_opening, tag_name, children, tag_closing); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#437 + # pkg:gem/herb#lib/herb/ast/nodes.rb:416 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#442 + # pkg:gem/herb#lib/herb/ast/nodes.rb:421 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : Array[Herb::AST::WhitespaceNode]? - # - # source://herb//lib/herb/ast/nodes.rb#404 + # pkg:gem/herb#lib/herb/ast/nodes.rb:383 def children; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#447 + # pkg:gem/herb#lib/herb/ast/nodes.rb:426 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#452 + # pkg:gem/herb#lib/herb/ast/nodes.rb:431 + sig { returns(::String) } def inspect; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#405 + # pkg:gem/herb#lib/herb/ast/nodes.rb:384 def tag_closing; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#403 + # pkg:gem/herb#lib/herb/ast/nodes.rb:382 def tag_name; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#402 + # pkg:gem/herb#lib/herb/ast/nodes.rb:381 def tag_opening; end - # : () -> serialized_html_close_tag_node - # - # source://herb//lib/herb/ast/nodes.rb#427 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:406 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#457 + # pkg:gem/herb#lib/herb/ast/nodes.rb:436 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?tag_opening: Herb::Token?, ?tag_name: Herb::Token?, ?children: Array[Herb::AST::WhitespaceNode]?, ?tag_closing: Herb::Token?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> HTMLCloseTagNode - # - # source://herb//lib/herb/ast/nodes.rb#422 + # pkg:gem/herb#lib/herb/ast/nodes.rb:401 + sig do + params( + tag_opening: T.nilable(::Herb::Token), + tag_name: T.nilable(::Herb::Token), + children: T.nilable(T::Array[::Herb::AST::WhitespaceNode]), + tag_closing: T.nilable(::Herb::Token), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::HTMLCloseTagNode) + end def build(tag_opening: T.unsafe(nil), tag_name: T.unsafe(nil), children: T.unsafe(nil), tag_closing: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#417 + # pkg:gem/herb#lib/herb/ast/nodes.rb:396 + sig { returns(::String) } def type; end end end -# : type serialized_html_comment_node = { -# | comment_start: Herb::Token?, -# | children: Array[Herb::AST::Node], -# | comment_end: Herb::Token?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#1517 +# pkg:gem/herb#lib/herb/ast/nodes.rb:1448 class Herb::AST::HTMLCommentNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Array[Herb::AST::Node], Herb::Token?) -> void - # - # @return [HTMLCommentNode] a new instance of HTMLCommentNode - # - # source://herb//lib/herb/ast/nodes.rb#1525 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1456 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + comment_start: T.nilable(::Herb::Token), + children: T::Array[::Herb::AST::Node], + comment_end: T.nilable(::Herb::Token) + ).void + end def initialize(type, location, errors, comment_start, children, comment_end); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#1552 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1483 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#1557 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1488 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#1521 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1452 def children; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#1522 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1453 def comment_end; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#1520 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1451 def comment_start; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#1562 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1493 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#1567 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1498 + sig { returns(::String) } def inspect; end - # : () -> serialized_html_comment_node - # - # source://herb//lib/herb/ast/nodes.rb#1543 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:1474 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#1572 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1503 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?comment_start: Herb::Token?, ?children: Array[Herb::AST::Node], ?comment_end: Herb::Token?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> HTMLCommentNode - # - # source://herb//lib/herb/ast/nodes.rb#1538 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1469 + sig do + params( + comment_start: T.nilable(::Herb::Token), + children: T::Array[::Herb::AST::Node], + comment_end: T.nilable(::Herb::Token), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::HTMLCommentNode) + end def build(comment_start: T.unsafe(nil), children: T.unsafe(nil), comment_end: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#1533 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1464 + sig { returns(::String) } def type; end end end -# : type serialized_html_conditional_element_node = { -# | condition: String?, -# | open_conditional: (Herb::AST::ERBIfNode | Herb::AST::ERBUnlessNode)?, -# | open_tag: Herb::AST::HTMLOpenTagNode?, -# | body: Array[Herb::AST::Node], -# | close_tag: (Herb::AST::HTMLCloseTagNode | Herb::AST::HTMLOmittedCloseTagNode)?, -# | close_conditional: (Herb::AST::ERBIfNode | Herb::AST::ERBUnlessNode)?, -# | tag_name: Herb::Token?, -# | element_source: String?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#773 +# pkg:gem/herb#lib/herb/ast/nodes.rb:732 class Herb::AST::HTMLConditionalElementNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], String?, (Herb::AST::ERBIfNode | Herb::AST::ERBUnlessNode)?, Herb::AST::HTMLOpenTagNode?, Array[Herb::AST::Node], (Herb::AST::HTMLCloseTagNode | Herb::AST::HTMLOmittedCloseTagNode)?, (Herb::AST::ERBIfNode | Herb::AST::ERBUnlessNode)?, Herb::Token?, String?) -> void - # - # @return [HTMLConditionalElementNode] a new instance of HTMLConditionalElementNode - # - # source://herb//lib/herb/ast/nodes.rb#786 + # pkg:gem/herb#lib/herb/ast/nodes.rb:745 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + condition: T.nilable(::String), + open_conditional: T.nilable(T.any(::Herb::AST::ERBIfNode, ::Herb::AST::ERBUnlessNode)), + open_tag: T.nilable(::Herb::AST::HTMLOpenTagNode), + body: T::Array[::Herb::AST::Node], + close_tag: T.nilable(T.any(::Herb::AST::HTMLCloseTagNode, ::Herb::AST::HTMLOmittedCloseTagNode)), + close_conditional: T.nilable(T.any(::Herb::AST::ERBIfNode, ::Herb::AST::ERBUnlessNode)), + tag_name: T.nilable(::Herb::Token), + element_source: T.nilable(::String) + ).void + end def initialize(type, location, errors, condition, open_conditional, open_tag, body, close_tag, close_conditional, tag_name, element_source); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#823 + # pkg:gem/herb#lib/herb/ast/nodes.rb:782 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#779 + # pkg:gem/herb#lib/herb/ast/nodes.rb:738 def body; end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#828 + # pkg:gem/herb#lib/herb/ast/nodes.rb:787 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : (Herb::AST::ERBIfNode | Herb::AST::ERBUnlessNode)? - # - # source://herb//lib/herb/ast/nodes.rb#781 + # pkg:gem/herb#lib/herb/ast/nodes.rb:740 def close_conditional; end - # : (Herb::AST::HTMLCloseTagNode | Herb::AST::HTMLOmittedCloseTagNode)? - # - # source://herb//lib/herb/ast/nodes.rb#780 + # pkg:gem/herb#lib/herb/ast/nodes.rb:739 def close_tag; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#833 + # pkg:gem/herb#lib/herb/ast/nodes.rb:792 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : String? - # - # source://herb//lib/herb/ast/nodes.rb#776 + # pkg:gem/herb#lib/herb/ast/nodes.rb:735 def condition; end - # : String? - # - # source://herb//lib/herb/ast/nodes.rb#783 + # pkg:gem/herb#lib/herb/ast/nodes.rb:742 def element_source; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#838 + # pkg:gem/herb#lib/herb/ast/nodes.rb:797 + sig { returns(::String) } def inspect; end - # : (Herb::AST::ERBIfNode | Herb::AST::ERBUnlessNode)? - # - # source://herb//lib/herb/ast/nodes.rb#777 + # pkg:gem/herb#lib/herb/ast/nodes.rb:736 def open_conditional; end - # : Herb::AST::HTMLOpenTagNode? - # - # source://herb//lib/herb/ast/nodes.rb#778 + # pkg:gem/herb#lib/herb/ast/nodes.rb:737 def open_tag; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#782 + # pkg:gem/herb#lib/herb/ast/nodes.rb:741 def tag_name; end - # : () -> serialized_html_conditional_element_node - # - # source://herb//lib/herb/ast/nodes.rb#809 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:768 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#843 + # pkg:gem/herb#lib/herb/ast/nodes.rb:802 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?condition: String?, ?open_conditional: (Herb::AST::ERBIfNode | Herb::AST::ERBUnlessNode)?, ?open_tag: Herb::AST::HTMLOpenTagNode?, ?body: Array[Herb::AST::Node], ?close_tag: (Herb::AST::HTMLCloseTagNode | Herb::AST::HTMLOmittedCloseTagNode)?, ?close_conditional: (Herb::AST::ERBIfNode | Herb::AST::ERBUnlessNode)?, ?tag_name: Herb::Token?, ?element_source: String?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> HTMLConditionalElementNode - # - # source://herb//lib/herb/ast/nodes.rb#804 + # pkg:gem/herb#lib/herb/ast/nodes.rb:763 + sig do + params( + condition: T.nilable(::String), + open_conditional: T.nilable(T.any(::Herb::AST::ERBIfNode, ::Herb::AST::ERBUnlessNode)), + open_tag: T.nilable(::Herb::AST::HTMLOpenTagNode), + body: T::Array[::Herb::AST::Node], + close_tag: T.nilable(T.any(::Herb::AST::HTMLCloseTagNode, ::Herb::AST::HTMLOmittedCloseTagNode)), + close_conditional: T.nilable(T.any(::Herb::AST::ERBIfNode, ::Herb::AST::ERBUnlessNode)), + tag_name: T.nilable(::Herb::Token), + element_source: T.nilable(::String), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::HTMLConditionalElementNode) + end def build(condition: T.unsafe(nil), open_conditional: T.unsafe(nil), open_tag: T.unsafe(nil), body: T.unsafe(nil), close_tag: T.unsafe(nil), close_conditional: T.unsafe(nil), tag_name: T.unsafe(nil), element_source: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#799 + # pkg:gem/herb#lib/herb/ast/nodes.rb:758 + sig { returns(::String) } def type; end end end -# : type serialized_html_conditional_open_tag_node = { -# | conditional: (Herb::AST::ERBIfNode | Herb::AST::ERBUnlessNode)?, -# | tag_name: Herb::Token?, -# | is_void: bool, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#302 +# pkg:gem/herb#lib/herb/ast/nodes.rb:286 class Herb::AST::HTMLConditionalOpenTagNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], (Herb::AST::ERBIfNode | Herb::AST::ERBUnlessNode)?, Herb::Token?, bool) -> void - # - # @return [HTMLConditionalOpenTagNode] a new instance of HTMLConditionalOpenTagNode - # - # source://herb//lib/herb/ast/nodes.rb#310 + # pkg:gem/herb#lib/herb/ast/nodes.rb:294 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + conditional: T.nilable(T.any(::Herb::AST::ERBIfNode, ::Herb::AST::ERBUnlessNode)), + tag_name: T.nilable(::Herb::Token), + is_void: T::Boolean + ).void + end def initialize(type, location, errors, conditional, tag_name, is_void); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#337 + # pkg:gem/herb#lib/herb/ast/nodes.rb:321 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#342 + # pkg:gem/herb#lib/herb/ast/nodes.rb:326 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#347 + # pkg:gem/herb#lib/herb/ast/nodes.rb:331 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : (Herb::AST::ERBIfNode | Herb::AST::ERBUnlessNode)? - # - # source://herb//lib/herb/ast/nodes.rb#305 + # pkg:gem/herb#lib/herb/ast/nodes.rb:289 def conditional; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#352 + # pkg:gem/herb#lib/herb/ast/nodes.rb:336 + sig { returns(::String) } def inspect; end - # : bool - # - # source://herb//lib/herb/ast/nodes.rb#307 + # pkg:gem/herb#lib/herb/ast/nodes.rb:291 def is_void; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#306 + # pkg:gem/herb#lib/herb/ast/nodes.rb:290 def tag_name; end - # : () -> serialized_html_conditional_open_tag_node - # - # source://herb//lib/herb/ast/nodes.rb#328 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:312 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#357 + # pkg:gem/herb#lib/herb/ast/nodes.rb:341 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?conditional: (Herb::AST::ERBIfNode | Herb::AST::ERBUnlessNode)?, ?tag_name: Herb::Token?, ?is_void: bool, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> HTMLConditionalOpenTagNode - # - # source://herb//lib/herb/ast/nodes.rb#323 + # pkg:gem/herb#lib/herb/ast/nodes.rb:307 + sig do + params( + conditional: T.nilable(T.any(::Herb::AST::ERBIfNode, ::Herb::AST::ERBUnlessNode)), + tag_name: T.nilable(::Herb::Token), + is_void: T::Boolean, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::HTMLConditionalOpenTagNode) + end def build(conditional: T.unsafe(nil), tag_name: T.unsafe(nil), is_void: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#318 + # pkg:gem/herb#lib/herb/ast/nodes.rb:302 + sig { returns(::String) } def type; end end end -# : type serialized_html_doctype_node = { -# | tag_opening: Herb::Token?, -# | children: Array[Herb::AST::Node], -# | tag_closing: Herb::Token?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#1607 +# pkg:gem/herb#lib/herb/ast/nodes.rb:1534 class Herb::AST::HTMLDoctypeNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Array[Herb::AST::Node], Herb::Token?) -> void - # - # @return [HTMLDoctypeNode] a new instance of HTMLDoctypeNode - # - # source://herb//lib/herb/ast/nodes.rb#1615 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1542 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_opening: T.nilable(::Herb::Token), + children: T::Array[::Herb::AST::Node], + tag_closing: T.nilable(::Herb::Token) + ).void + end def initialize(type, location, errors, tag_opening, children, tag_closing); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#1642 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1569 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#1647 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1574 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#1611 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1538 def children; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#1652 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1579 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#1657 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1584 + sig { returns(::String) } def inspect; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#1612 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1539 def tag_closing; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#1610 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1537 def tag_opening; end - # : () -> serialized_html_doctype_node - # - # source://herb//lib/herb/ast/nodes.rb#1633 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:1560 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#1662 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1589 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?tag_opening: Herb::Token?, ?children: Array[Herb::AST::Node], ?tag_closing: Herb::Token?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> HTMLDoctypeNode - # - # source://herb//lib/herb/ast/nodes.rb#1628 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1555 + sig do + params( + tag_opening: T.nilable(::Herb::Token), + children: T::Array[::Herb::AST::Node], + tag_closing: T.nilable(::Herb::Token), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::HTMLDoctypeNode) + end def build(tag_opening: T.unsafe(nil), children: T.unsafe(nil), tag_closing: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#1623 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1550 + sig { returns(::String) } def type; end end end -# : type serialized_html_element_node = { -# | open_tag: (Herb::AST::HTMLOpenTagNode | Herb::AST::HTMLConditionalOpenTagNode | Herb::AST::ERBOpenTagNode)?, -# | tag_name: Herb::Token?, -# | body: Array[Herb::AST::Node], -# | close_tag: (Herb::AST::HTMLCloseTagNode | Herb::AST::HTMLOmittedCloseTagNode | Herb::AST::HTMLVirtualCloseTagNode | Herb::AST::ERBEndNode)?, -# | is_void: bool, -# | element_source: String?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#652 +# pkg:gem/herb#lib/herb/ast/nodes.rb:620 class Herb::AST::HTMLElementNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], (Herb::AST::HTMLOpenTagNode | Herb::AST::HTMLConditionalOpenTagNode | Herb::AST::ERBOpenTagNode)?, Herb::Token?, Array[Herb::AST::Node], (Herb::AST::HTMLCloseTagNode | Herb::AST::HTMLOmittedCloseTagNode | Herb::AST::HTMLVirtualCloseTagNode | Herb::AST::ERBEndNode)?, bool, String?) -> void - # - # @return [HTMLElementNode] a new instance of HTMLElementNode - # - # source://herb//lib/herb/ast/nodes.rb#663 + # pkg:gem/herb#lib/herb/ast/nodes.rb:631 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + open_tag: T.nilable(T.any(::Herb::AST::ERBOpenTagNode, ::Herb::AST::HTMLConditionalOpenTagNode, ::Herb::AST::HTMLOpenTagNode)), + tag_name: T.nilable(::Herb::Token), + body: T::Array[::Herb::AST::Node], + close_tag: T.nilable(T.any(::Herb::AST::ERBEndNode, ::Herb::AST::HTMLCloseTagNode, ::Herb::AST::HTMLOmittedCloseTagNode, ::Herb::AST::HTMLVirtualCloseTagNode)), + is_void: T::Boolean, + element_source: T.nilable(::String) + ).void + end def initialize(type, location, errors, open_tag, tag_name, body, close_tag, is_void, element_source); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#696 + # pkg:gem/herb#lib/herb/ast/nodes.rb:664 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#657 + # pkg:gem/herb#lib/herb/ast/nodes.rb:625 def body; end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#701 + # pkg:gem/herb#lib/herb/ast/nodes.rb:669 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : (Herb::AST::HTMLCloseTagNode | Herb::AST::HTMLOmittedCloseTagNode | Herb::AST::HTMLVirtualCloseTagNode | Herb::AST::ERBEndNode)? - # - # source://herb//lib/herb/ast/nodes.rb#658 + # pkg:gem/herb#lib/herb/ast/nodes.rb:626 def close_tag; end - # : (Herb::AST::HTMLCloseTagNode | Herb::AST::HTMLOmittedCloseTagNode | Herb::AST::HTMLVirtualCloseTagNode | Herb::AST::ERBEndNode)? - # - # source://herb//lib/herb/ast/nodes.rb#658 + # pkg:gem/herb#lib/herb/ast/nodes.rb:626 def close_tag=(_arg0); end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#706 + # pkg:gem/herb#lib/herb/ast/nodes.rb:674 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : String? - # - # source://herb//lib/herb/ast/nodes.rb#660 + # pkg:gem/herb#lib/herb/ast/nodes.rb:628 def element_source; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#711 + # pkg:gem/herb#lib/herb/ast/nodes.rb:679 + sig { returns(::String) } def inspect; end - # : bool - # - # source://herb//lib/herb/ast/nodes.rb#659 + # pkg:gem/herb#lib/herb/ast/nodes.rb:627 def is_void; end - # : (Herb::AST::HTMLOpenTagNode | Herb::AST::HTMLConditionalOpenTagNode | Herb::AST::ERBOpenTagNode)? - # - # source://herb//lib/herb/ast/nodes.rb#655 + # pkg:gem/herb#lib/herb/ast/nodes.rb:623 def open_tag; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#656 + # pkg:gem/herb#lib/herb/ast/nodes.rb:624 def tag_name; end - # : () -> serialized_html_element_node - # - # source://herb//lib/herb/ast/nodes.rb#684 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:652 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#716 + # pkg:gem/herb#lib/herb/ast/nodes.rb:684 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?open_tag: (Herb::AST::HTMLOpenTagNode | Herb::AST::HTMLConditionalOpenTagNode | Herb::AST::ERBOpenTagNode)?, ?tag_name: Herb::Token?, ?body: Array[Herb::AST::Node], ?close_tag: (Herb::AST::HTMLCloseTagNode | Herb::AST::HTMLOmittedCloseTagNode | Herb::AST::HTMLVirtualCloseTagNode | Herb::AST::ERBEndNode)?, ?is_void: bool, ?element_source: String?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> HTMLElementNode - # - # source://herb//lib/herb/ast/nodes.rb#679 + # pkg:gem/herb#lib/herb/ast/nodes.rb:647 + sig do + params( + open_tag: T.nilable(T.any(::Herb::AST::ERBOpenTagNode, ::Herb::AST::HTMLConditionalOpenTagNode, ::Herb::AST::HTMLOpenTagNode)), + tag_name: T.nilable(::Herb::Token), + body: T::Array[::Herb::AST::Node], + close_tag: T.nilable(T.any(::Herb::AST::ERBEndNode, ::Herb::AST::HTMLCloseTagNode, ::Herb::AST::HTMLOmittedCloseTagNode, ::Herb::AST::HTMLVirtualCloseTagNode)), + is_void: T::Boolean, + element_source: T.nilable(::String), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::HTMLElementNode) + end def build(open_tag: T.unsafe(nil), tag_name: T.unsafe(nil), body: T.unsafe(nil), close_tag: T.unsafe(nil), is_void: T.unsafe(nil), element_source: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#674 + # pkg:gem/herb#lib/herb/ast/nodes.rb:642 + sig { returns(::String) } def type; end end end -# : type serialized_html_omitted_close_tag_node = { -# | tag_name: Herb::Token?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#493 +# pkg:gem/herb#lib/herb/ast/nodes.rb:470 class Herb::AST::HTMLOmittedCloseTagNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?) -> void - # - # @return [HTMLOmittedCloseTagNode] a new instance of HTMLOmittedCloseTagNode - # - # source://herb//lib/herb/ast/nodes.rb#499 + # pkg:gem/herb#lib/herb/ast/nodes.rb:476 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_name: T.nilable(::Herb::Token) + ).void + end def initialize(type, location, errors, tag_name); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#522 + # pkg:gem/herb#lib/herb/ast/nodes.rb:499 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#527 + # pkg:gem/herb#lib/herb/ast/nodes.rb:504 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#532 + # pkg:gem/herb#lib/herb/ast/nodes.rb:509 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#537 + # pkg:gem/herb#lib/herb/ast/nodes.rb:514 + sig { returns(::String) } def inspect; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#496 + # pkg:gem/herb#lib/herb/ast/nodes.rb:473 def tag_name; end - # : () -> serialized_html_omitted_close_tag_node - # - # source://herb//lib/herb/ast/nodes.rb#515 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:492 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#542 + # pkg:gem/herb#lib/herb/ast/nodes.rb:519 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?tag_name: Herb::Token?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> HTMLOmittedCloseTagNode - # - # source://herb//lib/herb/ast/nodes.rb#510 + # pkg:gem/herb#lib/herb/ast/nodes.rb:487 + sig do + params( + tag_name: T.nilable(::Herb::Token), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::HTMLOmittedCloseTagNode) + end def build(tag_name: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#505 + # pkg:gem/herb#lib/herb/ast/nodes.rb:482 + sig { returns(::String) } def type; end end end -# : type serialized_html_open_tag_node = { -# | tag_opening: Herb::Token?, -# | tag_name: Herb::Token?, -# | tag_closing: Herb::Token?, -# | children: Array[Herb::AST::Node], -# | is_void: bool, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#200 +# pkg:gem/herb#lib/herb/ast/nodes.rb:188 class Herb::AST::HTMLOpenTagNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Herb::Token?, Herb::Token?, Array[Herb::AST::Node], bool) -> void - # - # @return [HTMLOpenTagNode] a new instance of HTMLOpenTagNode - # - # source://herb//lib/herb/ast/nodes.rb#210 + # pkg:gem/herb#lib/herb/ast/nodes.rb:198 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_opening: T.nilable(::Herb::Token), + tag_name: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + children: T::Array[::Herb::AST::Node], + is_void: T::Boolean + ).void + end def initialize(type, location, errors, tag_opening, tag_name, tag_closing, children, is_void); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#241 + # pkg:gem/herb#lib/herb/ast/nodes.rb:229 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#246 + # pkg:gem/herb#lib/herb/ast/nodes.rb:234 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#206 + # pkg:gem/herb#lib/herb/ast/nodes.rb:194 def children; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#251 + # pkg:gem/herb#lib/herb/ast/nodes.rb:239 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#256 + # pkg:gem/herb#lib/herb/ast/nodes.rb:244 + sig { returns(::String) } def inspect; end - # : bool - # - # source://herb//lib/herb/ast/nodes.rb#207 + # pkg:gem/herb#lib/herb/ast/nodes.rb:195 def is_void; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#205 + # pkg:gem/herb#lib/herb/ast/nodes.rb:193 def tag_closing; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#204 + # pkg:gem/herb#lib/herb/ast/nodes.rb:192 def tag_name; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#203 + # pkg:gem/herb#lib/herb/ast/nodes.rb:191 def tag_opening; end - # : () -> serialized_html_open_tag_node - # - # source://herb//lib/herb/ast/nodes.rb#230 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:218 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#261 + # pkg:gem/herb#lib/herb/ast/nodes.rb:249 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?tag_opening: Herb::Token?, ?tag_name: Herb::Token?, ?tag_closing: Herb::Token?, ?children: Array[Herb::AST::Node], ?is_void: bool, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> HTMLOpenTagNode - # - # source://herb//lib/herb/ast/nodes.rb#225 + # pkg:gem/herb#lib/herb/ast/nodes.rb:213 + sig do + params( + tag_opening: T.nilable(::Herb::Token), + tag_name: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + children: T::Array[::Herb::AST::Node], + is_void: T::Boolean, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::HTMLOpenTagNode) + end def build(tag_opening: T.unsafe(nil), tag_name: T.unsafe(nil), tag_closing: T.unsafe(nil), children: T.unsafe(nil), is_void: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#220 + # pkg:gem/herb#lib/herb/ast/nodes.rb:208 + sig { returns(::String) } def type; end end end -# : type serialized_html_text_node = { -# | content: String?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#1440 +# pkg:gem/herb#lib/herb/ast/nodes.rb:1375 class Herb::AST::HTMLTextNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], String?) -> void - # - # @return [HTMLTextNode] a new instance of HTMLTextNode - # - # source://herb//lib/herb/ast/nodes.rb#1446 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1381 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + content: T.nilable(::String) + ).void + end def initialize(type, location, errors, content); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#1469 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1404 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#1474 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1409 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#1479 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1414 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : String? - # - # source://herb//lib/herb/ast/nodes.rb#1443 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1378 def content; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#1484 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1419 + sig { returns(::String) } def inspect; end - # : () -> serialized_html_text_node - # - # source://herb//lib/herb/ast/nodes.rb#1462 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:1397 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#1489 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1424 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?content: String?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> HTMLTextNode - # - # source://herb//lib/herb/ast/nodes.rb#1457 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1392 + sig do + params( + content: T.nilable(::String), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::HTMLTextNode) + end def build(content: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#1452 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1387 + sig { returns(::String) } def type; end end end -# : type serialized_html_virtual_close_tag_node = { -# | tag_name: Herb::Token?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#570 +# pkg:gem/herb#lib/herb/ast/nodes.rb:545 class Herb::AST::HTMLVirtualCloseTagNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?) -> void - # - # @return [HTMLVirtualCloseTagNode] a new instance of HTMLVirtualCloseTagNode - # - # source://herb//lib/herb/ast/nodes.rb#576 + # pkg:gem/herb#lib/herb/ast/nodes.rb:551 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_name: T.nilable(::Herb::Token) + ).void + end def initialize(type, location, errors, tag_name); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#599 + # pkg:gem/herb#lib/herb/ast/nodes.rb:574 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#604 + # pkg:gem/herb#lib/herb/ast/nodes.rb:579 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#609 + # pkg:gem/herb#lib/herb/ast/nodes.rb:584 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#614 + # pkg:gem/herb#lib/herb/ast/nodes.rb:589 + sig { returns(::String) } def inspect; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#573 + # pkg:gem/herb#lib/herb/ast/nodes.rb:548 def tag_name; end - # : () -> serialized_html_virtual_close_tag_node - # - # source://herb//lib/herb/ast/nodes.rb#592 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:567 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#619 + # pkg:gem/herb#lib/herb/ast/nodes.rb:594 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?tag_name: Herb::Token?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> HTMLVirtualCloseTagNode - # - # source://herb//lib/herb/ast/nodes.rb#587 + # pkg:gem/herb#lib/herb/ast/nodes.rb:562 + sig do + params( + tag_name: T.nilable(::Herb::Token), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::HTMLVirtualCloseTagNode) + end def build(tag_name: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#582 + # pkg:gem/herb#lib/herb/ast/nodes.rb:557 + sig { returns(::String) } def type; end end end -# source://herb//lib/herb/ast/helpers.rb#6 +# pkg:gem/herb#lib/herb/ast/helpers.rb:6 module Herb::AST::Helpers - # : (Herb::AST::Node?) -> Array[untyped] - # - # source://herb//lib/herb/ast/helpers.rb#100 + # pkg:gem/herb#lib/herb/ast/helpers.rb:100 + sig { params(node: T.nilable(::Herb::AST::Node)).returns(T::Array[T.untyped]) } def branch_open_tags(node); end - # : (String) -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/ast/helpers.rb#39 + # pkg:gem/herb#lib/herb/ast/helpers.rb:39 + sig { params(opening: ::String).returns(T::Boolean) } def erb_comment?(opening); end - # : (Herb::AST::Node?) -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/ast/helpers.rb#44 + # pkg:gem/herb#lib/herb/ast/helpers.rb:44 + sig { params(node: T.nilable(::Herb::AST::Node)).returns(T::Boolean) } def erb_comment_node?(node); end - # : (String) -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/ast/helpers.rb#52 + # pkg:gem/herb#lib/herb/ast/helpers.rb:52 + sig { params(opening: ::String).returns(T::Boolean) } def erb_custom_opening?(opening); end - # : (String) -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/ast/helpers.rb#62 + # pkg:gem/herb#lib/herb/ast/helpers.rb:62 + sig { params(opening: ::String).returns(T::Boolean) } def erb_escaped?(opening); end - # : (Herb::AST::Node?) -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/ast/helpers.rb#8 + # pkg:gem/herb#lib/herb/ast/helpers.rb:8 + sig { params(node: T.nilable(::Herb::AST::Node)).returns(T::Boolean) } def erb_node?(node); end - # : (String) -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/ast/helpers.rb#57 + # pkg:gem/herb#lib/herb/ast/helpers.rb:57 + sig { params(opening: ::String).returns(T::Boolean) } def erb_omitted?(opening); end - # : (Herb::AST::Node?) -> String - # - # source://herb//lib/herb/ast/helpers.rb#13 + # pkg:gem/herb#lib/herb/ast/helpers.rb:13 + sig { params(node: T.nilable(::Herb::AST::Node)).returns(::String) } def erb_opening(node); end - # : (String) -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/ast/helpers.rb#67 + # pkg:gem/herb#lib/herb/ast/helpers.rb:67 + sig { params(opening: ::String).returns(T::Boolean) } def erb_output?(opening); end - # : (Herb::AST::Node?) -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/ast/helpers.rb#23 + # pkg:gem/herb#lib/herb/ast/helpers.rb:23 + sig { params(node: T.nilable(::Herb::AST::Node)).returns(T::Boolean) } def erb_outputs?(node); end - # : (Herb::AST::Node?) -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/ast/helpers.rb#30 + # pkg:gem/herb#lib/herb/ast/helpers.rb:30 + sig { params(node: T.nilable(::Herb::AST::Node)).returns(T::Boolean) } def erb_statement?(node); end - # : (Herb::AST::ERBContentNode) -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/ast/helpers.rb#109 + # pkg:gem/herb#lib/herb/ast/helpers.rb:109 + sig { params(node: ::Herb::AST::ERBContentNode).returns(T::Boolean) } def inline_ruby_comment?(node); end - # : (Herb::AST::Node?) -> Herb::AST::HTMLOmittedCloseTagNode? - # - # source://herb//lib/herb/ast/helpers.rb#72 + # pkg:gem/herb#lib/herb/ast/helpers.rb:72 + sig { params(node: T.nilable(::Herb::AST::Node)).returns(T.nilable(::Herb::AST::HTMLOmittedCloseTagNode)) } def omitted_close_tag(node); end - # : (Herb::AST::Node?) -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/ast/helpers.rb#83 + # pkg:gem/herb#lib/herb/ast/helpers.rb:83 + sig { params(node: T.nilable(::Herb::AST::Node)).returns(T::Boolean) } def omitted_close_tag?(node); end - # : (Herb::AST::Node?) -> Array[untyped] - # - # source://herb//lib/herb/ast/helpers.rb#88 + # pkg:gem/herb#lib/herb/ast/helpers.rb:88 + sig { params(open_tag: T.nilable(::Herb::AST::Node)).returns(T::Array[T.untyped]) } def open_tags_for(open_tag); end end -# : type serialized_herb_directive_node = { -# | tag_opening: Herb::Token?, -# | content: Herb::Token?, -# | tag_closing: Herb::Token?, -# | key: Herb::Token?, -# | arguments: Herb::Token?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#5165 +# pkg:gem/herb#lib/herb/ast/nodes.rb:4884 class Herb::AST::HerbDirectiveNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Herb::Token?, Herb::Token?, Herb::Token?, Herb::Token?) -> void - # - # @return [HerbDirectiveNode] a new instance of HerbDirectiveNode - # - # source://herb//lib/herb/ast/nodes.rb#5175 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4894 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + key: T.nilable(::Herb::Token), + arguments: T.nilable(::Herb::Token) + ).void + end def initialize(type, location, errors, tag_opening, content, tag_closing, key, arguments); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#5206 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4925 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> String - # - # source://herb//lib/herb/ast/herb_directive_node.rb#13 + # pkg:gem/herb#lib/herb/ast/herb_directive_node.rb:13 + sig { returns(::String) } def argument; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#5172 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4891 def arguments; end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#5211 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4930 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#5216 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4935 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#5169 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4888 def content; end - # : () -> String - # - # source://herb//lib/herb/ast/herb_directive_node.rb#8 + # pkg:gem/herb#lib/herb/ast/herb_directive_node.rb:8 + sig { returns(::String) } def directive; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#5221 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4940 + sig { returns(::String) } def inspect; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#5171 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4890 def key; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#5170 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4889 def tag_closing; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#5168 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4887 def tag_opening; end - # : () -> serialized_herb_directive_node - # - # source://herb//lib/herb/ast/nodes.rb#5195 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:4914 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#5226 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4945 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?tag_opening: Herb::Token?, ?content: Herb::Token?, ?tag_closing: Herb::Token?, ?key: Herb::Token?, ?arguments: Herb::Token?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> HerbDirectiveNode - # - # source://herb//lib/herb/ast/nodes.rb#5190 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4909 + sig do + params( + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + key: T.nilable(::Herb::Token), + arguments: T.nilable(::Herb::Token), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::HerbDirectiveNode) + end def build(tag_opening: T.unsafe(nil), content: T.unsafe(nil), tag_closing: T.unsafe(nil), key: T.unsafe(nil), arguments: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#5185 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4904 + sig { returns(::String) } def type; end end end -# : type serialized_herb_state_declaration_node = { -# | name: Herb::Token?, -# | default_value: Herb::AST::RubyLiteralNode?, -# | kind: String?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#5268 +# pkg:gem/herb#lib/herb/ast/nodes.rb:4983 class Herb::AST::HerbStateDeclarationNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Herb::AST::RubyLiteralNode?, String?) -> void - # - # @return [HerbStateDeclarationNode] a new instance of HerbStateDeclarationNode - # - # source://herb//lib/herb/ast/nodes.rb#5276 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4991 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + name: T.nilable(::Herb::Token), + default_value: T.nilable(::Herb::AST::RubyLiteralNode), + kind: T.nilable(::String) + ).void + end def initialize(type, location, errors, name, default_value, kind); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#5303 + # pkg:gem/herb#lib/herb/ast/nodes.rb:5018 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#5308 + # pkg:gem/herb#lib/herb/ast/nodes.rb:5023 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#5313 + # pkg:gem/herb#lib/herb/ast/nodes.rb:5028 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : Herb::AST::RubyLiteralNode? - # - # source://herb//lib/herb/ast/nodes.rb#5272 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4987 def default_value; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#5318 + # pkg:gem/herb#lib/herb/ast/nodes.rb:5033 + sig { returns(::String) } def inspect; end - # : String? - # - # source://herb//lib/herb/ast/nodes.rb#5273 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4988 def kind; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#5271 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4986 def name; end - # : () -> serialized_herb_state_declaration_node - # - # source://herb//lib/herb/ast/nodes.rb#5294 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:5009 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#5323 + # pkg:gem/herb#lib/herb/ast/nodes.rb:5038 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?name: Herb::Token?, ?default_value: Herb::AST::RubyLiteralNode?, ?kind: String?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> HerbStateDeclarationNode - # - # source://herb//lib/herb/ast/nodes.rb#5289 + # pkg:gem/herb#lib/herb/ast/nodes.rb:5004 + sig do + params( + name: T.nilable(::Herb::Token), + default_value: T.nilable(::Herb::AST::RubyLiteralNode), + kind: T.nilable(::String), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::HerbStateDeclarationNode) + end def build(name: T.unsafe(nil), default_value: T.unsafe(nil), kind: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#5284 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4999 + sig { returns(::String) } def type; end end end -# : type serialized_herb_state_directive_node = { -# | tag_opening: Herb::Token?, -# | content: Herb::Token?, -# | tag_closing: Herb::Token?, -# | key: Herb::Token?, -# | signature: Herb::Token?, -# | states: Array[Herb::AST::HerbStateDeclarationNode]?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#5365 +# pkg:gem/herb#lib/herb/ast/nodes.rb:5073 class Herb::AST::HerbStateDirectiveNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Herb::Token?, Herb::Token?, Herb::Token?, Herb::Token?, Array[Herb::AST::HerbStateDeclarationNode]?) -> void - # - # @return [HerbStateDirectiveNode] a new instance of HerbStateDirectiveNode - # - # source://herb//lib/herb/ast/nodes.rb#5376 + # pkg:gem/herb#lib/herb/ast/nodes.rb:5084 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + key: T.nilable(::Herb::Token), + signature: T.nilable(::Herb::Token), + states: T.nilable(T::Array[::Herb::AST::HerbStateDeclarationNode]) + ).void + end def initialize(type, location, errors, tag_opening, content, tag_closing, key, signature, states); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#5409 + # pkg:gem/herb#lib/herb/ast/nodes.rb:5117 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#5414 + # pkg:gem/herb#lib/herb/ast/nodes.rb:5122 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#5419 + # pkg:gem/herb#lib/herb/ast/nodes.rb:5127 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#5369 + # pkg:gem/herb#lib/herb/ast/nodes.rb:5077 def content; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#5424 + # pkg:gem/herb#lib/herb/ast/nodes.rb:5132 + sig { returns(::String) } def inspect; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#5371 + # pkg:gem/herb#lib/herb/ast/nodes.rb:5079 def key; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#5372 + # pkg:gem/herb#lib/herb/ast/nodes.rb:5080 def signature; end - # : Array[Herb::AST::HerbStateDeclarationNode]? - # - # source://herb//lib/herb/ast/nodes.rb#5373 + # pkg:gem/herb#lib/herb/ast/nodes.rb:5081 def states; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#5370 + # pkg:gem/herb#lib/herb/ast/nodes.rb:5078 def tag_closing; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#5368 + # pkg:gem/herb#lib/herb/ast/nodes.rb:5076 def tag_opening; end - # : () -> serialized_herb_state_directive_node - # - # source://herb//lib/herb/ast/nodes.rb#5397 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:5105 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#5429 + # pkg:gem/herb#lib/herb/ast/nodes.rb:5137 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?tag_opening: Herb::Token?, ?content: Herb::Token?, ?tag_closing: Herb::Token?, ?key: Herb::Token?, ?signature: Herb::Token?, ?states: Array[Herb::AST::HerbStateDeclarationNode]?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> HerbStateDirectiveNode - # - # source://herb//lib/herb/ast/nodes.rb#5392 + # pkg:gem/herb#lib/herb/ast/nodes.rb:5100 + sig do + params( + tag_opening: T.nilable(::Herb::Token), + content: T.nilable(::Herb::Token), + tag_closing: T.nilable(::Herb::Token), + key: T.nilable(::Herb::Token), + signature: T.nilable(::Herb::Token), + states: T.nilable(T::Array[::Herb::AST::HerbStateDeclarationNode]), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::HerbStateDirectiveNode) + end def build(tag_opening: T.unsafe(nil), content: T.unsafe(nil), tag_closing: T.unsafe(nil), key: T.unsafe(nil), signature: T.unsafe(nil), states: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#5387 + # pkg:gem/herb#lib/herb/ast/nodes.rb:5095 + sig { returns(::String) } def type; end end end -# : type serialized_literal_node = { -# | content: String?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#121 +# pkg:gem/herb#lib/herb/ast/nodes.rb:115 class Herb::AST::LiteralNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], String?) -> void - # - # @return [LiteralNode] a new instance of LiteralNode - # - # source://herb//lib/herb/ast/nodes.rb#127 + # pkg:gem/herb#lib/herb/ast/nodes.rb:121 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + content: T.nilable(::String) + ).void + end def initialize(type, location, errors, content); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#150 + # pkg:gem/herb#lib/herb/ast/nodes.rb:144 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#155 + # pkg:gem/herb#lib/herb/ast/nodes.rb:149 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#160 + # pkg:gem/herb#lib/herb/ast/nodes.rb:154 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : String? - # - # source://herb//lib/herb/ast/nodes.rb#124 + # pkg:gem/herb#lib/herb/ast/nodes.rb:118 def content; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#165 + # pkg:gem/herb#lib/herb/ast/nodes.rb:159 + sig { returns(::String) } def inspect; end - # : () -> serialized_literal_node - # - # source://herb//lib/herb/ast/nodes.rb#143 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:137 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#170 + # pkg:gem/herb#lib/herb/ast/nodes.rb:164 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?content: String?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> LiteralNode - # - # source://herb//lib/herb/ast/nodes.rb#138 + # pkg:gem/herb#lib/herb/ast/nodes.rb:132 + sig do + params( + content: T.nilable(::String), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::LiteralNode) + end def build(content: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#133 + # pkg:gem/herb#lib/herb/ast/nodes.rb:127 + sig { returns(::String) } def type; end end end -# source://herb//lib/herb/ast/node.rb#13 +# pkg:gem/herb#lib/herb/ast/node.rb:9 class Herb::AST::Node - # : (String, Location, ?Array[Herb::Errors::Error]) -> void - # - # @return [Node] a new instance of Node - # - # source://herb//lib/herb/ast/node.rb#20 + # pkg:gem/herb#lib/herb/ast/node.rb:16 + sig { params(type: ::String, location: ::Herb::Location, errors: T::Array[::Herb::Errors::Error]).void } def initialize(type, location, errors = T.unsafe(nil)); end - # : (Visitor) -> void - # - # @raise [NoMethodError] - # - # source://herb//lib/herb/ast/node.rb#104 + # pkg:gem/herb#lib/herb/ast/node.rb:93 + sig { params(_visitor: ::Herb::Visitor).void } def accept(_visitor); end - # : () -> Array[Herb::AST::Node?] - # - # @raise [NoMethodError] - # - # source://herb//lib/herb/ast/node.rb#109 + # pkg:gem/herb#lib/herb/ast/node.rb:98 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> String - # - # source://herb//lib/herb/ast/node.rb#43 + # pkg:gem/herb#lib/herb/ast/node.rb:39 + sig { returns(::String) } def class_name; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/node.rb#116 + # pkg:gem/herb#lib/herb/ast/node.rb:105 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : () -> Array[Herb::AST::Node?] - # - # @raise [NoMethodError] - # - # source://herb//lib/herb/ast/node.rb#109 - def deconstruct; end + # pkg:gem/herb#lib/herb/ast/node.rb:102 + def deconstruct(*args, **, &blk); end - # : Array[Herb::Errors::Error] - # - # source://herb//lib/herb/ast/node.rb#16 + # pkg:gem/herb#lib/herb/ast/node.rb:12 def errors; end - # : ( - # | Array[Herb::AST::Node|Herb::Errors::Error], - # | ?item_name: String, - # | ?prefix: String, - # | ?indent: Integer, - # | ?depth: Integer, - # | ?depth_limit: Integer - # | ) -> String - # - # source://herb//lib/herb/ast/node.rb#72 + # pkg:gem/herb#lib/herb/ast/node.rb:61 + sig do + params( + array: T::Array[T.any(::Herb::AST::Node, ::Herb::Errors::Error)], + item_name: ::String, + prefix: ::String, + indent: ::Integer, + depth: ::Integer, + depth_limit: ::Integer + ).returns(::String) + end def inspect_array(array, item_name: T.unsafe(nil), prefix: T.unsafe(nil), indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end - # : (?prefix: String) -> String - # - # source://herb//lib/herb/ast/node.rb#58 + # pkg:gem/herb#lib/herb/ast/node.rb:54 + sig { params(prefix: ::String).returns(::String) } def inspect_errors(prefix: T.unsafe(nil)); end - # : (Herb::Position) -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/ast/node.rb#126 + # pkg:gem/herb#lib/herb/ast/node.rb:115 + sig { params(position: ::Herb::Position).returns(T::Boolean) } def locatable?(position); end - # : (Herb::Position) -> Herb::Locate::Result? - # - # source://herb//lib/herb/ast/node.rb#121 + # pkg:gem/herb#lib/herb/ast/node.rb:110 + sig { params(position: ::Herb::Position).returns(T.nilable(::Herb::Locate::Result)) } def locate(position); end - # : Location - # - # source://herb//lib/herb/ast/node.rb#15 + # pkg:gem/herb#lib/herb/ast/node.rb:11 def location; end - # : () -> String - # - # source://herb//lib/herb/ast/node.rb#48 + # pkg:gem/herb#lib/herb/ast/node.rb:44 + sig { returns(::String) } def node_name; end - # : () -> Array[Herb::Errors::Error] - # - # source://herb//lib/herb/ast/node.rb#131 + # pkg:gem/herb#lib/herb/ast/node.rb:120 + sig { returns(T::Array[::Herb::Errors::Error]) } def recursive_errors; end - # : String? - # - # source://herb//lib/herb/ast/node.rb#17 + # pkg:gem/herb#lib/herb/ast/node.rb:13 def source; end - # : (String?) -> void - # - # source://herb//lib/herb/ast/node.rb#28 + # pkg:gem/herb#lib/herb/ast/node.rb:24 + sig { params(source: T.nilable(::String)).void } def source=(source); end - # : () -> serialized_node - # - # source://herb//lib/herb/ast/node.rb#34 + # pkg:gem/herb#lib/herb/ast/node.rb:30 + sig do + returns({type: ::String, location: T.nilable({start: {line: ::Integer, column: ::Integer}, end: {line: ::Integer, column: ::Integer}}), errors: T::Array[{type: ::String, location: T.nilable({start: {line: ::Integer, column: ::Integer}, end: {line: ::Integer, column: ::Integer}}), message: ::String}]}) + end def to_hash; end - # : (?untyped) -> String - # - # source://herb//lib/herb/ast/node.rb#53 + # pkg:gem/herb#lib/herb/ast/node.rb:49 + sig { params(state: T.untyped).returns(::String) } def to_json(state = T.unsafe(nil)); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # @raise [NotImplementedError] - # - # source://herb//lib/herb/ast/node.rb#99 + # pkg:gem/herb#lib/herb/ast/node.rb:88 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end - # : String - # - # source://herb//lib/herb/ast/node.rb#14 + # pkg:gem/herb#lib/herb/ast/node.rb:10 def type; end protected - # : (Array[Herb::Errors::Error] accumulator) -> void - # - # source://herb//lib/herb/ast/node.rb#140 + # pkg:gem/herb#lib/herb/ast/node.rb:129 + sig { params(accumulator: T::Array[::Herb::Errors::Error]).void } def collect_errors(accumulator); end end -# : type serialized_ruby_html_attributes_splat_node = { -# | content: String?, -# | prefix: String?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#1257 +# pkg:gem/herb#lib/herb/ast/nodes.rb:1200 class Herb::AST::RubyHTMLAttributesSplatNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], String?, String?) -> void - # - # @return [RubyHTMLAttributesSplatNode] a new instance of RubyHTMLAttributesSplatNode - # - # source://herb//lib/herb/ast/nodes.rb#1264 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1207 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + content: T.nilable(::String), + prefix: T.nilable(::String) + ).void + end def initialize(type, location, errors, content, prefix); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#1289 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1232 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#1294 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1237 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#1299 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1242 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : String? - # - # source://herb//lib/herb/ast/nodes.rb#1260 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1203 def content; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#1304 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1247 + sig { returns(::String) } def inspect; end - # : String? - # - # source://herb//lib/herb/ast/nodes.rb#1261 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1204 def prefix; end - # : () -> serialized_ruby_html_attributes_splat_node - # - # source://herb//lib/herb/ast/nodes.rb#1281 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:1224 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#1309 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1252 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?content: String?, ?prefix: String?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> RubyHTMLAttributesSplatNode - # - # source://herb//lib/herb/ast/nodes.rb#1276 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1219 + sig do + params( + content: T.nilable(::String), + prefix: T.nilable(::String), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::RubyHTMLAttributesSplatNode) + end def build(content: T.unsafe(nil), prefix: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#1271 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1214 + sig { returns(::String) } def type; end end end -# : type serialized_ruby_literal_node = { -# | content: String?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#1181 +# pkg:gem/herb#lib/herb/ast/nodes.rb:1127 class Herb::AST::RubyLiteralNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], String?) -> void - # - # @return [RubyLiteralNode] a new instance of RubyLiteralNode - # - # source://herb//lib/herb/ast/nodes.rb#1187 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1133 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + content: T.nilable(::String) + ).void + end def initialize(type, location, errors, content); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#1210 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1156 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#1215 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1161 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#1220 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1166 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : String? - # - # source://herb//lib/herb/ast/nodes.rb#1184 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1130 def content; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#1225 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1171 + sig { returns(::String) } def inspect; end - # : () -> serialized_ruby_literal_node - # - # source://herb//lib/herb/ast/nodes.rb#1203 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:1149 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#1230 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1176 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?content: String?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> RubyLiteralNode - # - # source://herb//lib/herb/ast/nodes.rb#1198 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1144 + sig do + params( + content: T.nilable(::String), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::RubyLiteralNode) + end def build(content: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#1193 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1139 + sig { returns(::String) } def type; end end end -# : type serialized_ruby_parameter_node = { -# | name: Herb::Token?, -# | default_value: Herb::AST::RubyLiteralNode?, -# | kind: String?, -# | required: bool, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#4742 +# pkg:gem/herb#lib/herb/ast/nodes.rb:4484 class Herb::AST::RubyParameterNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Herb::AST::RubyLiteralNode?, String?, bool) -> void - # - # @return [RubyParameterNode] a new instance of RubyParameterNode - # - # source://herb//lib/herb/ast/nodes.rb#4751 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4493 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + name: T.nilable(::Herb::Token), + default_value: T.nilable(::Herb::AST::RubyLiteralNode), + kind: T.nilable(::String), + required: T::Boolean + ).void + end def initialize(type, location, errors, name, default_value, kind, required); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#4780 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4522 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#4785 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4527 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#4790 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4532 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : Herb::AST::RubyLiteralNode? - # - # source://herb//lib/herb/ast/nodes.rb#4746 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4488 def default_value; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#4795 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4537 + sig { returns(::String) } def inspect; end - # : String? - # - # source://herb//lib/herb/ast/nodes.rb#4747 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4489 def kind; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#4745 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4487 def name; end - # : bool - # - # source://herb//lib/herb/ast/nodes.rb#4748 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4490 def required; end - # : () -> serialized_ruby_parameter_node - # - # source://herb//lib/herb/ast/nodes.rb#4770 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:4512 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#4800 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4542 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?name: Herb::Token?, ?default_value: Herb::AST::RubyLiteralNode?, ?kind: String?, ?required: bool, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> RubyParameterNode - # - # source://herb//lib/herb/ast/nodes.rb#4765 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4507 + sig do + params( + name: T.nilable(::Herb::Token), + default_value: T.nilable(::Herb::AST::RubyLiteralNode), + kind: T.nilable(::String), + required: T::Boolean, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::RubyParameterNode) + end def build(name: T.unsafe(nil), default_value: T.unsafe(nil), kind: T.unsafe(nil), required: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#4760 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4502 + sig { returns(::String) } def type; end end end -# : type serialized_ruby_render_keywords_node = { -# | partial: Herb::Token?, -# | template_path: Herb::Token?, -# | layout: Herb::Token?, -# | file: Herb::Token?, -# | inline_template: Herb::Token?, -# | body: Herb::Token?, -# | plain: Herb::Token?, -# | html: Herb::Token?, -# | renderable: Herb::Token?, -# | collection: Herb::Token?, -# | object: Herb::Token?, -# | as_name: Herb::Token?, -# | spacer_template: Herb::Token?, -# | formats: Herb::Token?, -# | variants: Herb::Token?, -# | handlers: Herb::Token?, -# | content_type: Herb::Token?, -# | locals: Array[Herb::AST::RubyRenderLocalNode]?, -# | state: Array[Herb::AST::HerbStateDeclarationNode]?, -# | state_location: Herb::Location?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#4358 +# pkg:gem/herb#lib/herb/ast/nodes.rb:4118 class Herb::AST::RubyRenderKeywordsNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Herb::Token?, Herb::Token?, Herb::Token?, Herb::Token?, Herb::Token?, Herb::Token?, Herb::Token?, Herb::Token?, Herb::Token?, Herb::Token?, Herb::Token?, Herb::Token?, Herb::Token?, Herb::Token?, Herb::Token?, Herb::Token?, Array[Herb::AST::RubyRenderLocalNode]?, Array[Herb::AST::HerbStateDeclarationNode]?, Herb::Location?) -> void - # - # @return [RubyRenderKeywordsNode] a new instance of RubyRenderKeywordsNode - # - # source://herb//lib/herb/ast/nodes.rb#4383 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4143 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + partial: T.nilable(::Herb::Token), + template_path: T.nilable(::Herb::Token), + layout: T.nilable(::Herb::Token), + file: T.nilable(::Herb::Token), + inline_template: T.nilable(::Herb::Token), + body: T.nilable(::Herb::Token), + plain: T.nilable(::Herb::Token), + html: T.nilable(::Herb::Token), + renderable: T.nilable(::Herb::Token), + collection: T.nilable(::Herb::Token), + object: T.nilable(::Herb::Token), + as_name: T.nilable(::Herb::Token), + spacer_template: T.nilable(::Herb::Token), + formats: T.nilable(::Herb::Token), + variants: T.nilable(::Herb::Token), + handlers: T.nilable(::Herb::Token), + content_type: T.nilable(::Herb::Token), + locals: T.nilable(T::Array[::Herb::AST::RubyRenderLocalNode]), + state: T.nilable(T::Array[::Herb::AST::HerbStateDeclarationNode]), + state_location: T.nilable(::Herb::Location) + ).void + end def initialize(type, location, errors, partial, template_path, layout, file, inline_template, body, plain, html, renderable, collection, object, as_name, spacer_template, formats, variants, handlers, content_type, locals, state, state_location); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#4444 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4204 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#4372 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4132 def as_name; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#4366 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4126 def body; end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#4449 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4209 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#4370 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4130 def collection; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#4454 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4214 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#4377 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4137 def content_type; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#4364 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4124 def file; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#4374 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4134 def formats; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#4376 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4136 def handlers; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#4368 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4128 def html; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#4365 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4125 def inline_template; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#4459 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4219 + sig { returns(::String) } def inspect; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#4363 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4123 def layout; end - # : Array[Herb::AST::RubyRenderLocalNode]? - # - # source://herb//lib/herb/ast/nodes.rb#4378 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4138 def locals; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#4371 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4131 def object; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#4361 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4121 def partial; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#4367 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4127 def plain; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#4369 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4129 def renderable; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#4373 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4133 def spacer_template; end - # : Array[Herb::AST::HerbStateDeclarationNode]? - # - # source://herb//lib/herb/ast/nodes.rb#4379 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4139 def state; end - # : Herb::Location? - # - # source://herb//lib/herb/ast/nodes.rb#4380 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4140 def state_location; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#4362 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4122 def template_path; end - # : () -> serialized_ruby_render_keywords_node - # - # source://herb//lib/herb/ast/nodes.rb#4418 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:4178 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#4464 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4224 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#4375 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4135 def variants; end class << self - # : (?partial: Herb::Token?, ?template_path: Herb::Token?, ?layout: Herb::Token?, ?file: Herb::Token?, ?inline_template: Herb::Token?, ?body: Herb::Token?, ?plain: Herb::Token?, ?html: Herb::Token?, ?renderable: Herb::Token?, ?collection: Herb::Token?, ?object: Herb::Token?, ?as_name: Herb::Token?, ?spacer_template: Herb::Token?, ?formats: Herb::Token?, ?variants: Herb::Token?, ?handlers: Herb::Token?, ?content_type: Herb::Token?, ?locals: Array[Herb::AST::RubyRenderLocalNode]?, ?state: Array[Herb::AST::HerbStateDeclarationNode]?, ?state_location: Herb::Location?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> RubyRenderKeywordsNode - # - # source://herb//lib/herb/ast/nodes.rb#4413 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4173 + sig do + params( + partial: T.nilable(::Herb::Token), + template_path: T.nilable(::Herb::Token), + layout: T.nilable(::Herb::Token), + file: T.nilable(::Herb::Token), + inline_template: T.nilable(::Herb::Token), + body: T.nilable(::Herb::Token), + plain: T.nilable(::Herb::Token), + html: T.nilable(::Herb::Token), + renderable: T.nilable(::Herb::Token), + collection: T.nilable(::Herb::Token), + object: T.nilable(::Herb::Token), + as_name: T.nilable(::Herb::Token), + spacer_template: T.nilable(::Herb::Token), + formats: T.nilable(::Herb::Token), + variants: T.nilable(::Herb::Token), + handlers: T.nilable(::Herb::Token), + content_type: T.nilable(::Herb::Token), + locals: T.nilable(T::Array[::Herb::AST::RubyRenderLocalNode]), + state: T.nilable(T::Array[::Herb::AST::HerbStateDeclarationNode]), + state_location: T.nilable(::Herb::Location), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::RubyRenderKeywordsNode) + end def build(partial: T.unsafe(nil), template_path: T.unsafe(nil), layout: T.unsafe(nil), file: T.unsafe(nil), inline_template: T.unsafe(nil), body: T.unsafe(nil), plain: T.unsafe(nil), html: T.unsafe(nil), renderable: T.unsafe(nil), collection: T.unsafe(nil), object: T.unsafe(nil), as_name: T.unsafe(nil), spacer_template: T.unsafe(nil), formats: T.unsafe(nil), variants: T.unsafe(nil), handlers: T.unsafe(nil), content_type: T.unsafe(nil), locals: T.unsafe(nil), state: T.unsafe(nil), state_location: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#4408 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4168 + sig { returns(::String) } def type; end end end -# : type serialized_ruby_render_local_node = { -# | name: Herb::Token?, -# | value: Herb::AST::RubyLiteralNode?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#4251 +# pkg:gem/herb#lib/herb/ast/nodes.rb:4032 class Herb::AST::RubyRenderLocalNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Herb::AST::RubyLiteralNode?) -> void - # - # @return [RubyRenderLocalNode] a new instance of RubyRenderLocalNode - # - # source://herb//lib/herb/ast/nodes.rb#4258 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4039 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + name: T.nilable(::Herb::Token), + value: T.nilable(::Herb::AST::RubyLiteralNode) + ).void + end def initialize(type, location, errors, name, value); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#4283 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4064 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#4288 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4069 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#4293 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4074 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#4298 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4079 + sig { returns(::String) } def inspect; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#4254 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4035 def name; end - # : () -> serialized_ruby_render_local_node - # - # source://herb//lib/herb/ast/nodes.rb#4275 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:4056 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#4303 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4084 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end - # : Herb::AST::RubyLiteralNode? - # - # source://herb//lib/herb/ast/nodes.rb#4255 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4036 def value; end class << self - # : (?name: Herb::Token?, ?value: Herb::AST::RubyLiteralNode?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> RubyRenderLocalNode - # - # source://herb//lib/herb/ast/nodes.rb#4270 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4051 + sig do + params( + name: T.nilable(::Herb::Token), + value: T.nilable(::Herb::AST::RubyLiteralNode), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::RubyRenderLocalNode) + end def build(name: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#4265 + # pkg:gem/herb#lib/herb/ast/nodes.rb:4046 + sig { returns(::String) } def type; end end end -# : type serialized_whitespace_node = { -# | value: Herb::Token?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#1972 +# pkg:gem/herb#lib/herb/ast/nodes.rb:1797 +Herb::AST::SerializedCdataNode = T.type_alias { {tag_opening: T.nilable(::Herb::Token), children: T::Array[::Herb::AST::Node], tag_closing: T.nilable(::Herb::Token)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:11 +Herb::AST::SerializedDocumentNode = T.type_alias { {children: T::Array[::Herb::AST::Node], prism_context: ::NilClass, prism_node: T.nilable(::String)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:3727 +Herb::AST::SerializedErbBeginNode = T.type_alias { {tag_opening: T.nilable(::Herb::Token), content: T.nilable(::Herb::Token), tag_closing: T.nilable(::Herb::Token), prism_node: T.nilable(::String), statements: T::Array[::Herb::AST::Node], rescue_clause: T.nilable(::Herb::AST::ERBRescueNode), else_clause: T.nilable(::Herb::AST::ERBElseNode), ensure_clause: T.nilable(::Herb::AST::ERBEnsureNode), end_node: T.nilable(::Herb::AST::ERBEndNode)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:2408 +Herb::AST::SerializedErbBlockNode = T.type_alias { {tag_opening: T.nilable(::Herb::Token), content: T.nilable(::Herb::Token), tag_closing: T.nilable(::Herb::Token), prism_node: T.nilable(::String), body: T::Array[::Herb::AST::Node], block_arguments: T.nilable(T::Array[::Herb::AST::RubyParameterNode]), rescue_clause: T.nilable(::Herb::AST::ERBRescueNode), else_clause: T.nilable(::Herb::AST::ERBElseNode), ensure_clause: T.nilable(::Herb::AST::ERBEnsureNode), end_node: T.nilable(::Herb::AST::ERBEndNode)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:3008 +Herb::AST::SerializedErbCaseMatchNode = T.type_alias { {tag_opening: T.nilable(::Herb::Token), content: T.nilable(::Herb::Token), tag_closing: T.nilable(::Herb::Token), children: T::Array[::Herb::AST::Node], prism_node: T.nilable(::String), conditions: T::Array[::Herb::AST::ERBInNode], else_clause: T.nilable(::Herb::AST::ERBElseNode), end_node: T.nilable(::Herb::AST::ERBEndNode)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:2865 +Herb::AST::SerializedErbCaseNode = T.type_alias { {tag_opening: T.nilable(::Herb::Token), content: T.nilable(::Herb::Token), tag_closing: T.nilable(::Herb::Token), children: T::Array[::Herb::AST::Node], prism_node: T.nilable(::String), conditions: T::Array[::Herb::AST::ERBWhenNode], else_clause: T.nilable(::Herb::AST::ERBElseNode), end_node: T.nilable(::Herb::AST::ERBEndNode)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:5176 +Herb::AST::SerializedErbCommentNode = T.type_alias { {tag_opening: T.nilable(::Herb::Token), content: T.nilable(::Herb::Token), tag_closing: T.nilable(::Herb::Token)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:1958 +Herb::AST::SerializedErbContentNode = T.type_alias { {tag_opening: T.nilable(::Herb::Token), content: T.nilable(::Herb::Token), tag_closing: T.nilable(::Herb::Token), analyzed_ruby: ::NilClass, parsed: T::Boolean, valid: T::Boolean, prism_node: T.nilable(::String)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:2172 +Herb::AST::SerializedErbElseNode = T.type_alias { {tag_opening: T.nilable(::Herb::Token), content: T.nilable(::Herb::Token), tag_closing: T.nilable(::Herb::Token), statements: T::Array[::Herb::AST::Node]} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:2085 +Herb::AST::SerializedErbEndNode = T.type_alias { {tag_opening: T.nilable(::Herb::Token), content: T.nilable(::Herb::Token), tag_closing: T.nilable(::Herb::Token)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:3635 +Herb::AST::SerializedErbEnsureNode = T.type_alias { {tag_opening: T.nilable(::Herb::Token), content: T.nilable(::Herb::Token), tag_closing: T.nilable(::Herb::Token), statements: T::Array[::Herb::AST::Node]} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:3405 +Herb::AST::SerializedErbForNode = T.type_alias { {tag_opening: T.nilable(::Herb::Token), content: T.nilable(::Herb::Token), tag_closing: T.nilable(::Herb::Token), prism_node: T.nilable(::String), statements: T::Array[::Herb::AST::Node], end_node: T.nilable(::Herb::AST::ERBEndNode)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:2264 +Herb::AST::SerializedErbIfNode = T.type_alias { {tag_opening: T.nilable(::Herb::Token), content: T.nilable(::Herb::Token), tag_closing: T.nilable(::Herb::Token), then_keyword: T.nilable(::Herb::Location), prism_node: T.nilable(::String), statements: T::Array[::Herb::AST::Node], subsequent: T.nilable(T.any(::Herb::AST::ERBElseNode, ::Herb::AST::ERBIfNode)), end_node: T.nilable(::Herb::AST::ERBEndNode)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:4785 +Herb::AST::SerializedErbInNode = T.type_alias { {tag_opening: T.nilable(::Herb::Token), content: T.nilable(::Herb::Token), tag_closing: T.nilable(::Herb::Token), then_keyword: T.nilable(::Herb::Location), statements: T::Array[::Herb::AST::Node]} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:2573 +Herb::AST::SerializedErbIterationBlockNode = T.type_alias { {tag_opening: T.nilable(::Herb::Token), content: T.nilable(::Herb::Token), tag_closing: T.nilable(::Herb::Token), prism_node: T.nilable(::String), receiver: T.nilable(::Herb::Token), call_operator: T.nilable(::Herb::Token), message: T.nilable(::Herb::Token), arguments: T.nilable(T::Array[::Herb::AST::RubyLiteralNode]), block_opening: T.nilable(::Herb::Token), body: T::Array[::Herb::AST::Node], block_arguments: T.nilable(T::Array[::Herb::AST::RubyParameterNode]), rescue_clause: T.nilable(::Herb::AST::ERBRescueNode), else_clause: T.nilable(::Herb::AST::ERBElseNode), ensure_clause: T.nilable(::Herb::AST::ERBEnsureNode), end_node: T.nilable(::Herb::AST::ERBEndNode)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:1276 +Herb::AST::SerializedErbOpenTagNode = T.type_alias { {tag_opening: T.nilable(::Herb::Token), content: T.nilable(::Herb::Token), tag_closing: T.nilable(::Herb::Token), tag_name: T.nilable(::Herb::Token), children: T::Array[::Herb::AST::Node]} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:4304 +Herb::AST::SerializedErbRenderNode = T.type_alias { {tag_opening: T.nilable(::Herb::Token), content: T.nilable(::Herb::Token), tag_closing: T.nilable(::Herb::Token), analyzed_ruby: ::NilClass, prism_node: T.nilable(::String), keywords: T.nilable(::Herb::AST::RubyRenderKeywordsNode), body: T::Array[::Herb::AST::Node], block_arguments: T.nilable(T::Array[::Herb::AST::RubyParameterNode]), rescue_clause: T.nilable(::Herb::AST::ERBRescueNode), else_clause: T.nilable(::Herb::AST::ERBElseNode), ensure_clause: T.nilable(::Herb::AST::ERBEnsureNode), end_node: T.nilable(::Herb::AST::ERBEndNode)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:3532 +Herb::AST::SerializedErbRescueNode = T.type_alias { {tag_opening: T.nilable(::Herb::Token), content: T.nilable(::Herb::Token), tag_closing: T.nilable(::Herb::Token), statements: T::Array[::Herb::AST::Node], subsequent: T.nilable(::Herb::AST::ERBRescueNode)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:4579 +Herb::AST::SerializedErbStrictLocalsNode = T.type_alias { {tag_opening: T.nilable(::Herb::Token), content: T.nilable(::Herb::Token), tag_closing: T.nilable(::Herb::Token), analyzed_ruby: ::NilClass, prism_node: T.nilable(::String), locals: T.nilable(T::Array[::Herb::AST::RubyParameterNode])} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:3887 +Herb::AST::SerializedErbUnlessNode = T.type_alias { {tag_opening: T.nilable(::Herb::Token), content: T.nilable(::Herb::Token), tag_closing: T.nilable(::Herb::Token), then_keyword: T.nilable(::Herb::Location), prism_node: T.nilable(::String), statements: T::Array[::Herb::AST::Node], else_clause: T.nilable(::Herb::AST::ERBElseNode), end_node: T.nilable(::Herb::AST::ERBEndNode)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:3278 +Herb::AST::SerializedErbUntilNode = T.type_alias { {tag_opening: T.nilable(::Herb::Token), content: T.nilable(::Herb::Token), tag_closing: T.nilable(::Herb::Token), prism_node: T.nilable(::String), statements: T::Array[::Herb::AST::Node], end_node: T.nilable(::Herb::AST::ERBEndNode)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:2767 +Herb::AST::SerializedErbWhenNode = T.type_alias { {tag_opening: T.nilable(::Herb::Token), content: T.nilable(::Herb::Token), tag_closing: T.nilable(::Herb::Token), then_keyword: T.nilable(::Herb::Location), statements: T::Array[::Herb::AST::Node]} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:3151 +Herb::AST::SerializedErbWhileNode = T.type_alias { {tag_opening: T.nilable(::Herb::Token), content: T.nilable(::Herb::Token), tag_closing: T.nilable(::Herb::Token), prism_node: T.nilable(::String), statements: T::Array[::Herb::AST::Node], end_node: T.nilable(::Herb::AST::ERBEndNode)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:4698 +Herb::AST::SerializedErbYieldNode = T.type_alias { {tag_opening: T.nilable(::Herb::Token), content: T.nilable(::Herb::Token), tag_closing: T.nilable(::Herb::Token)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:4883 +Herb::AST::SerializedHerbDirectiveNode = T.type_alias { {tag_opening: T.nilable(::Herb::Token), content: T.nilable(::Herb::Token), tag_closing: T.nilable(::Herb::Token), key: T.nilable(::Herb::Token), arguments: T.nilable(::Herb::Token)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:4982 +Herb::AST::SerializedHerbStateDeclarationNode = T.type_alias { {name: T.nilable(::Herb::Token), default_value: T.nilable(::Herb::AST::RubyLiteralNode), kind: T.nilable(::String)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:5072 +Herb::AST::SerializedHerbStateDirectiveNode = T.type_alias { {tag_opening: T.nilable(::Herb::Token), content: T.nilable(::Herb::Token), tag_closing: T.nilable(::Herb::Token), key: T.nilable(::Herb::Token), signature: T.nilable(::Herb::Token), states: T.nilable(T::Array[::Herb::AST::HerbStateDeclarationNode])} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:955 +Herb::AST::SerializedHtmlAttributeNameNode = T.type_alias { {children: T.nilable(T::Array[T.any(::Herb::AST::ERBCommentNode, ::Herb::AST::ERBContentNode, ::Herb::AST::LiteralNode)])} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:1029 +Herb::AST::SerializedHtmlAttributeNode = T.type_alias { {name: T.nilable(::Herb::AST::HTMLAttributeNameNode), equals: T.nilable(::Herb::Token), value: T.nilable(::Herb::AST::HTMLAttributeValueNode)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:863 +Herb::AST::SerializedHtmlAttributeValueNode = T.type_alias { {open_quote: T.nilable(::Herb::Token), children: T::Array[::Herb::AST::Node], close_quote: T.nilable(::Herb::Token), quoted: T::Boolean} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:377 +Herb::AST::SerializedHtmlCloseTagNode = T.type_alias { {tag_opening: T.nilable(::Herb::Token), tag_name: T.nilable(::Herb::Token), children: T.nilable(T::Array[::Herb::AST::WhitespaceNode]), tag_closing: T.nilable(::Herb::Token)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:1447 +Herb::AST::SerializedHtmlCommentNode = T.type_alias { {comment_start: T.nilable(::Herb::Token), children: T::Array[::Herb::AST::Node], comment_end: T.nilable(::Herb::Token)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:731 +Herb::AST::SerializedHtmlConditionalElementNode = T.type_alias { {condition: T.nilable(::String), open_conditional: T.nilable(T.any(::Herb::AST::ERBIfNode, ::Herb::AST::ERBUnlessNode)), open_tag: T.nilable(::Herb::AST::HTMLOpenTagNode), body: T::Array[::Herb::AST::Node], close_tag: T.nilable(T.any(::Herb::AST::HTMLCloseTagNode, ::Herb::AST::HTMLOmittedCloseTagNode)), close_conditional: T.nilable(T.any(::Herb::AST::ERBIfNode, ::Herb::AST::ERBUnlessNode)), tag_name: T.nilable(::Herb::Token), element_source: T.nilable(::String)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:285 +Herb::AST::SerializedHtmlConditionalOpenTagNode = T.type_alias { {conditional: T.nilable(T.any(::Herb::AST::ERBIfNode, ::Herb::AST::ERBUnlessNode)), tag_name: T.nilable(::Herb::Token), is_void: T::Boolean} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:1533 +Herb::AST::SerializedHtmlDoctypeNode = T.type_alias { {tag_opening: T.nilable(::Herb::Token), children: T::Array[::Herb::AST::Node], tag_closing: T.nilable(::Herb::Token)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:619 +Herb::AST::SerializedHtmlElementNode = T.type_alias { {open_tag: T.nilable(T.any(::Herb::AST::ERBOpenTagNode, ::Herb::AST::HTMLConditionalOpenTagNode, ::Herb::AST::HTMLOpenTagNode)), tag_name: T.nilable(::Herb::Token), body: T::Array[::Herb::AST::Node], close_tag: T.nilable(T.any(::Herb::AST::ERBEndNode, ::Herb::AST::HTMLCloseTagNode, ::Herb::AST::HTMLOmittedCloseTagNode, ::Herb::AST::HTMLVirtualCloseTagNode)), is_void: T::Boolean, element_source: T.nilable(::String)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:469 +Herb::AST::SerializedHtmlOmittedCloseTagNode = T.type_alias { {tag_name: T.nilable(::Herb::Token)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:187 +Herb::AST::SerializedHtmlOpenTagNode = T.type_alias { {tag_opening: T.nilable(::Herb::Token), tag_name: T.nilable(::Herb::Token), tag_closing: T.nilable(::Herb::Token), children: T::Array[::Herb::AST::Node], is_void: T::Boolean} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:1374 +Herb::AST::SerializedHtmlTextNode = T.type_alias { {content: T.nilable(::String)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:544 +Herb::AST::SerializedHtmlVirtualCloseTagNode = T.type_alias { {tag_name: T.nilable(::Herb::Token)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:114 +Herb::AST::SerializedLiteralNode = T.type_alias { {content: T.nilable(::String)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:1199 +Herb::AST::SerializedRubyHtmlAttributesSplatNode = T.type_alias { {content: T.nilable(::String), prefix: T.nilable(::String)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:1126 +Herb::AST::SerializedRubyLiteralNode = T.type_alias { {content: T.nilable(::String)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:4483 +Herb::AST::SerializedRubyParameterNode = T.type_alias { {name: T.nilable(::Herb::Token), default_value: T.nilable(::Herb::AST::RubyLiteralNode), kind: T.nilable(::String), required: T::Boolean} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:4117 +Herb::AST::SerializedRubyRenderKeywordsNode = T.type_alias { {partial: T.nilable(::Herb::Token), template_path: T.nilable(::Herb::Token), layout: T.nilable(::Herb::Token), file: T.nilable(::Herb::Token), inline_template: T.nilable(::Herb::Token), body: T.nilable(::Herb::Token), plain: T.nilable(::Herb::Token), html: T.nilable(::Herb::Token), renderable: T.nilable(::Herb::Token), collection: T.nilable(::Herb::Token), object: T.nilable(::Herb::Token), as_name: T.nilable(::Herb::Token), spacer_template: T.nilable(::Herb::Token), formats: T.nilable(::Herb::Token), variants: T.nilable(::Herb::Token), handlers: T.nilable(::Herb::Token), content_type: T.nilable(::Herb::Token), locals: T.nilable(T::Array[::Herb::AST::RubyRenderLocalNode]), state: T.nilable(T::Array[::Herb::AST::HerbStateDeclarationNode]), state_location: T.nilable(::Herb::Location)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:4031 +Herb::AST::SerializedRubyRenderLocalNode = T.type_alias { {name: T.nilable(::Herb::Token), value: T.nilable(::Herb::AST::RubyLiteralNode)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:1883 +Herb::AST::SerializedWhitespaceNode = T.type_alias { {value: T.nilable(::Herb::Token)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:1619 +Herb::AST::SerializedXmlDeclarationNode = T.type_alias { {tag_opening: T.nilable(::Herb::Token), children: T::Array[::Herb::AST::Node], tag_closing: T.nilable(::Herb::Token)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:1705 +Herb::AST::SerializedXmlProcessingInstructionNode = T.type_alias { {tag_opening: T.nilable(::Herb::Token), target: T.nilable(::Herb::Token), children: T::Array[::Herb::AST::Node], tag_closing: T.nilable(::Herb::Token)} } + +# pkg:gem/herb#lib/herb/ast/nodes.rb:1884 class Herb::AST::WhitespaceNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?) -> void - # - # @return [WhitespaceNode] a new instance of WhitespaceNode - # - # source://herb//lib/herb/ast/nodes.rb#1978 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1890 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + value: T.nilable(::Herb::Token) + ).void + end def initialize(type, location, errors, value); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#2001 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1913 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#2006 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1918 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#2011 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1923 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#2016 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1928 + sig { returns(::String) } def inspect; end - # : () -> serialized_whitespace_node - # - # source://herb//lib/herb/ast/nodes.rb#1994 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:1906 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#2021 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1933 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#1975 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1887 def value; end class << self - # : (?value: Herb::Token?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> WhitespaceNode - # - # source://herb//lib/herb/ast/nodes.rb#1989 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1901 + sig do + params( + value: T.nilable(::Herb::Token), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::WhitespaceNode) + end def build(value: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#1984 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1896 + sig { returns(::String) } def type; end end end -# : type serialized_xml_declaration_node = { -# | tag_opening: Herb::Token?, -# | children: Array[Herb::AST::Node], -# | tag_closing: Herb::Token?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#1697 +# pkg:gem/herb#lib/herb/ast/nodes.rb:1620 class Herb::AST::XMLDeclarationNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Array[Herb::AST::Node], Herb::Token?) -> void - # - # @return [XMLDeclarationNode] a new instance of XMLDeclarationNode - # - # source://herb//lib/herb/ast/nodes.rb#1705 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1628 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_opening: T.nilable(::Herb::Token), + children: T::Array[::Herb::AST::Node], + tag_closing: T.nilable(::Herb::Token) + ).void + end def initialize(type, location, errors, tag_opening, children, tag_closing); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#1732 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1655 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#1737 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1660 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#1701 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1624 def children; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#1742 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1665 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#1747 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1670 + sig { returns(::String) } def inspect; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#1702 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1625 def tag_closing; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#1700 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1623 def tag_opening; end - # : () -> serialized_xml_declaration_node - # - # source://herb//lib/herb/ast/nodes.rb#1723 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:1646 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#1752 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1675 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?tag_opening: Herb::Token?, ?children: Array[Herb::AST::Node], ?tag_closing: Herb::Token?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> XMLDeclarationNode - # - # source://herb//lib/herb/ast/nodes.rb#1718 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1641 + sig do + params( + tag_opening: T.nilable(::Herb::Token), + children: T::Array[::Herb::AST::Node], + tag_closing: T.nilable(::Herb::Token), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::XMLDeclarationNode) + end def build(tag_opening: T.unsafe(nil), children: T.unsafe(nil), tag_closing: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#1713 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1636 + sig { returns(::String) } def type; end end end -# : type serialized_xml_processing_instruction_node = { -# | tag_opening: Herb::Token?, -# | target: Herb::Token?, -# | children: Array[Herb::AST::Node], -# | tag_closing: Herb::Token?, -# | } -# -# source://herb//lib/herb/ast/nodes.rb#1788 +# pkg:gem/herb#lib/herb/ast/nodes.rb:1706 class Herb::AST::XMLProcessingInstructionNode < ::Herb::AST::Node include ::Herb::Colors - # : (String, Location, Array[Herb::Errors::Error], Herb::Token?, Herb::Token?, Array[Herb::AST::Node], Herb::Token?) -> void - # - # @return [XMLProcessingInstructionNode] a new instance of XMLProcessingInstructionNode - # - # source://herb//lib/herb/ast/nodes.rb#1797 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1715 + sig do + params( + type: ::String, + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error], + tag_opening: T.nilable(::Herb::Token), + target: T.nilable(::Herb::Token), + children: T::Array[::Herb::AST::Node], + tag_closing: T.nilable(::Herb::Token) + ).void + end def initialize(type, location, errors, tag_opening, target, children, tag_closing); end - # : (Visitor) -> void - # - # source://herb//lib/herb/ast/nodes.rb#1826 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1744 + sig { params(visitor: ::Herb::Visitor).void } def accept(visitor); end - # : () -> Array[Herb::AST::Node?] - # - # source://herb//lib/herb/ast/nodes.rb#1831 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1749 + sig { returns(T::Array[T.nilable(::Herb::AST::Node)]) } def child_nodes; end - # : Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#1793 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1711 def children; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/ast/nodes.rb#1836 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1754 + sig { returns(T::Array[::Herb::AST::Node]) } def compact_child_nodes; end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#1841 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1759 + sig { returns(::String) } def inspect; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#1794 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1712 def tag_closing; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#1791 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1709 def tag_opening; end - # : Herb::Token? - # - # source://herb//lib/herb/ast/nodes.rb#1792 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1710 def target; end - # : () -> serialized_xml_processing_instruction_node - # - # source://herb//lib/herb/ast/nodes.rb#1816 - def to_hash; end + # pkg:gem/herb#lib/herb/ast/nodes.rb:1734 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/ast/nodes.rb#1846 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1764 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end class << self - # : (?tag_opening: Herb::Token?, ?target: Herb::Token?, ?children: Array[Herb::AST::Node], ?tag_closing: Herb::Token?, ?location: Location, ?errors: Array[Herb::Errors::Error]) -> XMLProcessingInstructionNode - # - # source://herb//lib/herb/ast/nodes.rb#1811 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1729 + sig do + params( + tag_opening: T.nilable(::Herb::Token), + target: T.nilable(::Herb::Token), + children: T::Array[::Herb::AST::Node], + tag_closing: T.nilable(::Herb::Token), + location: ::Herb::Location, + errors: T::Array[::Herb::Errors::Error] + ).returns(::Herb::AST::XMLProcessingInstructionNode) + end def build(tag_opening: T.unsafe(nil), target: T.unsafe(nil), children: T.unsafe(nil), tag_closing: T.unsafe(nil), location: T.unsafe(nil), errors: T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/ast/nodes.rb#1806 + # pkg:gem/herb#lib/herb/ast/nodes.rb:1724 + sig { returns(::String) } def type; end end end -# source://herb//lib/herb/analysis/partial_resolution.rb#6 +# pkg:gem/herb#lib/herb/analysis/partial_resolution.rb:6 module Herb::Analysis; end -# source://herb//lib/herb/analysis/partial_resolution.rb#7 +# pkg:gem/herb#lib/herb/analysis/partial_resolution.rb:7 module Herb::Analysis::PartialResolution class << self - # : (Array[String]) -> Array[String] - # - # source://herb//lib/herb/analysis/partial_resolution.rb#83 + # pkg:gem/herb#lib/herb/analysis/partial_resolution.rb:83 def by_precedence(files); end - # : (String, String | Pathname) -> Array[String] - # - # source://herb//lib/herb/analysis/partial_resolution.rb#104 + # pkg:gem/herb#lib/herb/analysis/partial_resolution.rb:104 def layout_candidates_for(template_file, view_root); end - # : (String, String) -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/analysis/partial_resolution.rb#73 + # pkg:gem/herb#lib/herb/analysis/partial_resolution.rb:73 def outranks_template?(candidate, incumbent); end - # : (String, String | Pathname) -> String? - # - # source://herb//lib/herb/analysis/partial_resolution.rb#130 + # pkg:gem/herb#lib/herb/analysis/partial_resolution.rb:130 def partial_name_for(file, view_root); end - # : (String) -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/analysis/partial_resolution.rb#52 + # pkg:gem/herb#lib/herb/analysis/partial_resolution.rb:52 def partial_path?(file); end - # : (String, String | Pathname) -> String? - # - # source://herb//lib/herb/analysis/partial_resolution.rb#88 + # pkg:gem/herb#lib/herb/analysis/partial_resolution.rb:88 def template_name_for(file, view_root); end - # : (String) -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/analysis/partial_resolution.rb#45 + # pkg:gem/herb#lib/herb/analysis/partial_resolution.rb:45 def template_path?(file); end - # : (String) -> Integer - # - # source://herb//lib/herb/analysis/partial_resolution.rb#61 + # pkg:gem/herb#lib/herb/analysis/partial_resolution.rb:61 def template_rank(file); end - # : (String | Pathname) -> Pathname - # - # source://herb//lib/herb/analysis/partial_resolution.rb#33 + # pkg:gem/herb#lib/herb/analysis/partial_resolution.rb:33 def view_root_for(project_path); end private - # : (String, String | Pathname) -> String? - # - # source://herb//lib/herb/analysis/partial_resolution.rb#148 + # pkg:gem/herb#lib/herb/analysis/partial_resolution.rb:148 def relative_to_view_root(file, view_root); end end end -# : String -# -# source://herb//lib/herb/analysis/partial_resolution.rb#27 +# pkg:gem/herb#lib/herb/analysis/partial_resolution.rb:27 Herb::Analysis::PartialResolution::APPLICATION_LAYOUT = T.let(T.unsafe(nil), String) -# source://herb//lib/herb/analysis/partial_resolution.rb#10 +# pkg:gem/herb#lib/herb/analysis/partial_resolution.rb:10 Herb::Analysis::PartialResolution::EXTENSIONS = T.let(T.unsafe(nil), Array) -# : Array[String] -# -# source://herb//lib/herb/analysis/partial_resolution.rb#19 +# pkg:gem/herb#lib/herb/analysis/partial_resolution.rb:19 Herb::Analysis::PartialResolution::EXTENSION_ALTERNATIVES = T.let(T.unsafe(nil), String) -# : String -# -# source://herb//lib/herb/analysis/partial_resolution.rb#26 +# pkg:gem/herb#lib/herb/analysis/partial_resolution.rb:26 Herb::Analysis::PartialResolution::LAYOUTS_DIRECTORY = T.let(T.unsafe(nil), String) -# : String -# -# source://herb//lib/herb/analysis/partial_resolution.rb#28 +# pkg:gem/herb#lib/herb/analysis/partial_resolution.rb:28 Herb::Analysis::PartialResolution::MAILER_LAYOUT = T.let(T.unsafe(nil), String) -# : String -# -# source://herb//lib/herb/analysis/partial_resolution.rb#29 +# pkg:gem/herb#lib/herb/analysis/partial_resolution.rb:29 Herb::Analysis::PartialResolution::MAILER_SUFFIX = T.let(T.unsafe(nil), String) -# : String -# -# source://herb//lib/herb/analysis/partial_resolution.rb#22 +# pkg:gem/herb#lib/herb/analysis/partial_resolution.rb:22 Herb::Analysis::PartialResolution::PARTIAL_GLOB_PATTERN = T.let(T.unsafe(nil), String) -# : String -# -# source://herb//lib/herb/analysis/partial_resolution.rb#8 +# pkg:gem/herb#lib/herb/analysis/partial_resolution.rb:8 Herb::Analysis::PartialResolution::PARTIAL_PREFIX = T.let(T.unsafe(nil), String) -# : String -# -# source://herb//lib/herb/analysis/partial_resolution.rb#21 +# pkg:gem/herb#lib/herb/analysis/partial_resolution.rb:21 Herb::Analysis::PartialResolution::TEMPLATE_GLOB_PATTERN = T.let(T.unsafe(nil), String) -# : String -# -# source://herb//lib/herb/analysis/partial_resolution.rb#24 +# pkg:gem/herb#lib/herb/analysis/partial_resolution.rb:24 Herb::Analysis::PartialResolution::VIEW_ROOT = T.let(T.unsafe(nil), String) # Finds the file a render call names, and what the compile of that file calls itself. @@ -4878,105 +4429,106 @@ Herb::Analysis::PartialResolution::VIEW_ROOT = T.let(T.unsafe(nil), String) # and then under the view root, and the identifier is the path relative to the project, # which is what the compile of that template reports as its own relative file path. # -# source://herb//lib/herb/analysis/partial_resolver.rb#24 +# pkg:gem/herb#lib/herb/analysis/partial_resolver.rb:24 class Herb::Analysis::PartialResolver - # : (?(String | Pathname)?, ?view_root: (String | Pathname | false)?) -> void - # - # @return [PartialResolver] a new instance of PartialResolver - # - # source://herb//lib/herb/analysis/partial_resolver.rb#36 + # pkg:gem/herb#lib/herb/analysis/partial_resolver.rb:36 + sig do + params( + project_path: T.nilable(T.any(::Pathname, ::String)), + view_root: T.nilable(T.any(::FalseClass, ::Pathname, ::String)) + ).void + end def initialize(project_path = T.unsafe(nil), view_root: T.unsafe(nil)); end - # : (String, Pathname?) -> Array[Pathname] - # - # source://herb//lib/herb/analysis/partial_resolver.rb#74 + # pkg:gem/herb#lib/herb/analysis/partial_resolver.rb:74 + sig { params(name: ::String, source_directory: T.nilable(::Pathname)).returns(T::Array[::Pathname]) } def candidate_paths(name, source_directory); end - # : (String, ?from: (String | Pathname)?) -> Array[Pathname] - # - # source://herb//lib/herb/analysis/partial_resolver.rb#57 + # pkg:gem/herb#lib/herb/analysis/partial_resolver.rb:57 + sig { params(name: ::String, from: T.nilable(T.any(::Pathname, ::String))).returns(T::Array[::Pathname]) } def candidates(name, from: T.unsafe(nil)); end - # : (Pathname) -> String - # - # source://herb//lib/herb/analysis/partial_resolver.rb#67 + # pkg:gem/herb#lib/herb/analysis/partial_resolver.rb:67 + sig { params(path: ::Pathname).returns(::String) } def identifier_for(path); end - # : (String, Pathname?) -> Array[String] - # - # source://herb//lib/herb/analysis/partial_resolver.rb#92 + # pkg:gem/herb#lib/herb/analysis/partial_resolver.rb:92 + sig { params(name: ::String, source_directory: T.nilable(::Pathname)).returns(T::Array[::String]) } def non_partial_matches(name, source_directory); end - # : Pathname - # - # source://herb//lib/herb/analysis/partial_resolver.rb#32 + # pkg:gem/herb#lib/herb/analysis/partial_resolver.rb:32 def project_path; end - # : (String, ?from: (String | Pathname)?, ?format: String?) -> Resolved? - # - # source://herb//lib/herb/analysis/partial_resolver.rb#46 + # pkg:gem/herb#lib/herb/analysis/partial_resolver.rb:46 + sig do + params( + name: ::String, + from: T.nilable(T.any(::Pathname, ::String)), + format: T.nilable(::String) + ).returns(T.nilable(::Herb::Analysis::PartialResolver::Resolved)) + end def resolve(name, from: T.unsafe(nil), format: T.unsafe(nil)); end - # : (String, ?from: (String | Pathname)?, ?limit: Integer) -> Array[String] - # - # source://herb//lib/herb/analysis/partial_resolver.rb#62 + # pkg:gem/herb#lib/herb/analysis/partial_resolver.rb:62 + sig do + params( + name: ::String, + from: T.nilable(T.any(::Pathname, ::String)), + limit: ::Integer + ).returns(T::Array[::String]) + end def similar(name, from: T.unsafe(nil), limit: T.unsafe(nil)); end - # : (String, Pathname?, ?limit: Integer) -> Array[String] - # - # source://herb//lib/herb/analysis/partial_resolver.rb#84 + # pkg:gem/herb#lib/herb/analysis/partial_resolver.rb:84 + sig { params(name: ::String, source_directory: T.nilable(::Pathname), limit: ::Integer).returns(T::Array[::String]) } def similar_partials(name, source_directory, limit: T.unsafe(nil)); end - # : Pathname? - # - # source://herb//lib/herb/analysis/partial_resolver.rb#33 + # pkg:gem/herb#lib/herb/analysis/partial_resolver.rb:33 def view_root; end private - # : (String, Pathname?) -> Array[Pathname] - # - # source://herb//lib/herb/analysis/partial_resolver.rb#106 + # pkg:gem/herb#lib/herb/analysis/partial_resolver.rb:106 + sig { params(name: ::String, source_directory: T.nilable(::Pathname)).returns(T::Array[::Pathname]) } def lookup_directories(name, source_directory); end - # : (Pathname?) -> Array[String] - # - # source://herb//lib/herb/analysis/partial_resolver.rb#115 + # pkg:gem/herb#lib/herb/analysis/partial_resolver.rb:115 + sig { params(source_directory: T.nilable(::Pathname)).returns(T::Array[::String]) } def partial_names(source_directory); end - # : (Array[Pathname], String) -> Array[Pathname] - # - # source://herb//lib/herb/analysis/partial_resolver.rb#137 + # pkg:gem/herb#lib/herb/analysis/partial_resolver.rb:137 + sig { params(paths: T::Array[::Pathname], format: ::String).returns(T::Array[::Pathname]) } def prefer_format(paths, format); end - # : ((String | Pathname)?) -> Pathname? - # - # source://herb//lib/herb/analysis/partial_resolver.rb#127 + # pkg:gem/herb#lib/herb/analysis/partial_resolver.rb:127 + sig { params(from: T.nilable(T.any(::Pathname, ::String))).returns(T.nilable(::Pathname)) } def source_directory(from); end end +# pkg:gem/herb#lib/herb/analysis/partial_resolver.rb:25 class Herb::Analysis::PartialResolver::Resolved < ::Data - # Returns the value of attribute identifier - # - # @return [Object] the current value of identifier + # pkg:gem/herb#lib/herb/analysis/partial_resolver.rb:25 def identifier; end - # Returns the value of attribute path - # - # @return [Object] the current value of path + # pkg:gem/herb#lib/herb/analysis/partial_resolver.rb:25 def path; end class << self + # pkg:gem/herb#lib/herb/analysis/partial_resolver.rb:25 def [](*_arg0); end + + # pkg:gem/herb#lib/herb/analysis/partial_resolver.rb:25 def inspect; end + + # pkg:gem/herb#lib/herb/analysis/partial_resolver.rb:25 def members; end + + # pkg:gem/herb#lib/herb/analysis/partial_resolver.rb:25 def new(*_arg0); end end end -# : String -# -# source://herb//lib/herb/analysis/partial_resolver.rb#30 +# pkg:gem/herb#lib/herb/analysis/partial_resolver.rb:30 Herb::Analysis::PartialResolver::TEMPLATE_HINT = T.let(T.unsafe(nil), String) # What the native extension defines, declared in Ruby so that it can be read without reading C. @@ -4991,2321 +4543,1934 @@ Herb::Analysis::PartialResolver::TEMPLATE_HINT = T.let(T.unsafe(nil), String) # The public API is `Herb.parse` and its neighbours, which are Ruby and live in `lib/herb.rb`. # This is only the seam they call through. # -# source://herb//lib/herb/backend.rb#16 +# pkg:gem/herb#lib/herb/backend.rb:16 module Herb::Backend extend ::Herb::Backend::Unavailable class << self + # pkg:gem/herb#lib/herb.rb:42 def arena_stats(*_arg0); end + + # pkg:gem/herb#lib/herb.rb:42 def default_erb_openings; end + + # pkg:gem/herb#lib/herb.rb:42 def diff(*_arg0); end + + # pkg:gem/herb#lib/herb.rb:42 def extract_html(_arg0); end + + # pkg:gem/herb#lib/herb.rb:42 def extract_ruby(*_arg0); end + + # pkg:gem/herb#lib/herb.rb:42 def leak_check(_arg0); end + + # pkg:gem/herb#lib/herb.rb:42 def lex(*_arg0); end + + # pkg:gem/herb#lib/herb.rb:42 def parse(*_arg0); end + + # pkg:gem/herb#lib/herb.rb:42 def version; end end end -# source://herb//lib/herb/backend.rb#17 +# pkg:gem/herb#lib/herb/backend.rb:17 module Herb::Backend::Unavailable - # : (**untyped) -> untyped - # - # source://herb//lib/herb/backend.rb#44 - def arena_stats(**_arg0); end + # pkg:gem/herb#lib/herb/backend.rb:44 + def arena_stats(**); end - # : () -> Array[String] - # - # source://herb//lib/herb/backend.rb#54 + # pkg:gem/herb#lib/herb/backend.rb:54 def default_erb_openings; end - # : (String, String, **untyped) -> Herb::Diff::Result - # - # source://herb//lib/herb/backend.rb#39 - def diff(_old_source, _new_source, **_arg2); end + # pkg:gem/herb#lib/herb/backend.rb:39 + def diff(_old_source, _new_source, **); end - # : (String) -> String - # - # source://herb//lib/herb/backend.rb#34 + # pkg:gem/herb#lib/herb/backend.rb:34 def extract_html(_source); end - # : (String, **untyped) -> String - # - # source://herb//lib/herb/backend.rb#29 - def extract_ruby(_source, **_arg1); end + # pkg:gem/herb#lib/herb/backend.rb:29 + def extract_ruby(_source, **); end - # : (String) -> untyped - # - # source://herb//lib/herb/backend.rb#49 + # pkg:gem/herb#lib/herb/backend.rb:49 def leak_check(_source); end - # : (String, **untyped) -> Herb::LexResult - # - # source://herb//lib/herb/backend.rb#24 - def lex(_source, **_arg1); end + # pkg:gem/herb#lib/herb/backend.rb:24 + def lex(_source, **); end - # : (String, **untyped) -> Herb::ParseResult - # - # source://herb//lib/herb/backend.rb#19 - def parse(_source, **_arg1); end + # pkg:gem/herb#lib/herb/backend.rb:19 + def parse(_source, **); end - # : () -> String - # - # source://herb//lib/herb/backend.rb#59 + # pkg:gem/herb#lib/herb/backend.rb:59 def version; end private - # : (Symbol?) -> bot - # - # @raise [NotImplementedError] - # - # source://herb//lib/herb/backend.rb#66 + # pkg:gem/herb#lib/herb/backend.rb:66 def unavailable(name); end end -# source://herb//lib/herb/colors.rb#7 +# pkg:gem/herb#lib/herb/colors.rb:7 module Herb::Colors private - # : (String) -> String - # - # source://herb//lib/herb/colors.rb#94 + # pkg:gem/herb#lib/herb/colors.rb:94 + sig { params(string: ::String).returns(::String) } def bold(string); end - # : (String) -> String - # - # source://herb//lib/herb/colors.rb#80 + # pkg:gem/herb#lib/herb/colors.rb:80 + sig { params(string: ::String).returns(::String) } def bright_magenta(string); end - # : (String) -> String - # - # source://herb//lib/herb/colors.rb#73 + # pkg:gem/herb#lib/herb/colors.rb:73 + sig { params(string: ::String).returns(::String) } def cyan(string); end - # : (String) -> String - # - # source://herb//lib/herb/colors.rb#87 + # pkg:gem/herb#lib/herb/colors.rb:87 + sig { params(string: ::String).returns(::String) } def dimmed(string); end - # : () -> bool - # - # source://herb//lib/herb/colors.rb#25 + # pkg:gem/herb#lib/herb/colors.rb:25 + sig { returns(T::Boolean) } def enabled?; end - # : (String, Integer) -> String - # - # source://herb//lib/herb/colors.rb#101 + # pkg:gem/herb#lib/herb/colors.rb:101 + sig { params(string: ::String, color: ::Integer).returns(::String) } def fg(string, color); end - # : (String, Integer, Integer) -> String - # - # source://herb//lib/herb/colors.rb#108 + # pkg:gem/herb#lib/herb/colors.rb:108 + sig { params(string: ::String, foreground: ::Integer, background: ::Integer).returns(::String) } def fg_bg(string, foreground, background); end - # : (String) -> String - # - # source://herb//lib/herb/colors.rb#52 + # pkg:gem/herb#lib/herb/colors.rb:52 + sig { params(string: ::String).returns(::String) } def green(string); end - # : (String) -> String - # - # source://herb//lib/herb/colors.rb#66 + # pkg:gem/herb#lib/herb/colors.rb:66 + sig { params(string: ::String).returns(::String) } def magenta(string); end - # : (String) -> String - # - # source://herb//lib/herb/colors.rb#59 + # pkg:gem/herb#lib/herb/colors.rb:59 + sig { params(string: ::String).returns(::String) } def red(string); end - # : (String) -> String - # - # source://herb//lib/herb/colors.rb#38 + # pkg:gem/herb#lib/herb/colors.rb:38 + sig { params(string: ::String).returns(::String) } def white(string); end - # : [T] (bool) { () -> T } -> T - # - # source://herb//lib/herb/colors.rb#15 + # pkg:gem/herb#lib/herb/colors.rb:15 def with_color(enabled); end - # : (String) -> String - # - # source://herb//lib/herb/colors.rb#45 + # pkg:gem/herb#lib/herb/colors.rb:45 + sig { params(string: ::String).returns(::String) } def yellow(string); end class << self - # : (String) -> String - # - # source://herb//lib/herb/colors.rb#94 + # pkg:gem/herb#lib/herb/colors.rb:94 def bold(string); end - # : (String) -> String - # - # source://herb//lib/herb/colors.rb#80 + # pkg:gem/herb#lib/herb/colors.rb:80 def bright_magenta(string); end - # : (String) -> String - # - # source://herb//lib/herb/colors.rb#73 + # pkg:gem/herb#lib/herb/colors.rb:73 def cyan(string); end - # : (String) -> String - # - # source://herb//lib/herb/colors.rb#87 + # pkg:gem/herb#lib/herb/colors.rb:87 def dimmed(string); end - # : () -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/colors.rb#25 + # pkg:gem/herb#lib/herb/colors.rb:25 def enabled?; end - # : (String, Integer) -> String - # - # source://herb//lib/herb/colors.rb#101 + # pkg:gem/herb#lib/herb/colors.rb:101 def fg(string, color); end - # : (String, Integer, Integer) -> String - # - # source://herb//lib/herb/colors.rb#108 + # pkg:gem/herb#lib/herb/colors.rb:108 def fg_bg(string, foreground, background); end - # : (String) -> String - # - # source://herb//lib/herb/colors.rb#52 + # pkg:gem/herb#lib/herb/colors.rb:52 def green(string); end - # : (String) -> String - # - # source://herb//lib/herb/colors.rb#66 + # pkg:gem/herb#lib/herb/colors.rb:66 def magenta(string); end - # : (String) -> String - # - # source://herb//lib/herb/colors.rb#59 + # pkg:gem/herb#lib/herb/colors.rb:59 def red(string); end - # : (String) -> String - # - # source://herb//lib/herb/colors.rb#38 + # pkg:gem/herb#lib/herb/colors.rb:38 def white(string); end - # : [T] (bool) { () -> T } -> T - # - # source://herb//lib/herb/colors.rb#15 + # pkg:gem/herb#lib/herb/colors.rb:15 def with_color(enabled); end - # : (String) -> String - # - # source://herb//lib/herb/colors.rb#45 + # pkg:gem/herb#lib/herb/colors.rb:45 def yellow(string); end end end -# source://herb//lib/herb/colors.rb#10 +# pkg:gem/herb#lib/herb/colors.rb:10 Herb::Colors::CLEAR_SCREEN = T.let(T.unsafe(nil), String) -# source://herb//lib/herb/colors.rb#8 +# pkg:gem/herb#lib/herb/colors.rb:8 Herb::Colors::HIDE_CURSOR = T.let(T.unsafe(nil), String) -# source://herb//lib/herb/colors.rb#9 +# pkg:gem/herb#lib/herb/colors.rb:9 Herb::Colors::SHOW_CURSOR = T.let(T.unsafe(nil), String) -# source://herb//lib/herb/diagnostic.rb#8 +# pkg:gem/herb#lib/herb/diagnostic.rb:8 class Herb::Diagnostic - # : (template: String, message: String, ?severity: Symbol?, ?kind: Symbol, ?origin: String, ?node: String?, ?code: String?, ?location: Herb::Location?, ?suggestion: String?, ?description: String?, ?docs_url: String?, ?value: String?, ?overlay: Symbol?, ?phase: Symbol, ?data: Hash[Symbol, untyped], ?error_class: Class?) -> void - # - # @return [Diagnostic] a new instance of Diagnostic - # - # source://herb//lib/herb/diagnostic.rb#29 + # pkg:gem/herb#lib/herb/diagnostic.rb:29 + sig do + params( + template: ::String, + message: ::String, + severity: T.nilable(::Symbol), + kind: ::Symbol, + origin: ::String, + node: T.nilable(::String), + code: T.nilable(::String), + location: T.nilable(::Herb::Location), + suggestion: T.nilable(::String), + description: T.nilable(::String), + docs_url: T.nilable(::String), + value: T.nilable(::String), + overlay: T.nilable(::Symbol), + phase: ::Symbol, + data: T::Hash[::Symbol, T.untyped], + error_class: T.nilable(::Class) + ).void + end def initialize(template:, message:, severity: T.unsafe(nil), kind: T.unsafe(nil), origin: T.unsafe(nil), node: T.unsafe(nil), code: T.unsafe(nil), location: T.unsafe(nil), suggestion: T.unsafe(nil), description: T.unsafe(nil), docs_url: T.unsafe(nil), value: T.unsafe(nil), overlay: T.unsafe(nil), phase: T.unsafe(nil), data: T.unsafe(nil), error_class: T.unsafe(nil)); end - # : String? - # - # source://herb//lib/herb/diagnostic.rb#14 + # pkg:gem/herb#lib/herb/diagnostic.rb:14 def code; end - # : Hash[Symbol, untyped] - # - # source://herb//lib/herb/diagnostic.rb#25 + # pkg:gem/herb#lib/herb/diagnostic.rb:25 def data; end - # : String? - # - # source://herb//lib/herb/diagnostic.rb#20 + # pkg:gem/herb#lib/herb/diagnostic.rb:20 def description; end - # : String? - # - # source://herb//lib/herb/diagnostic.rb#21 + # pkg:gem/herb#lib/herb/diagnostic.rb:21 def docs_url; end - # : () -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/diagnostic.rb#72 + # pkg:gem/herb#lib/herb/diagnostic.rb:72 + sig { returns(T::Boolean) } def error?; end - # : Class? - # - # source://herb//lib/herb/diagnostic.rb#26 + # pkg:gem/herb#lib/herb/diagnostic.rb:26 def error_class; end - # : () -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/diagnostic.rb#87 + # pkg:gem/herb#lib/herb/diagnostic.rb:87 + sig { returns(T::Boolean) } def hint?; end - # : () -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/diagnostic.rb#82 + # pkg:gem/herb#lib/herb/diagnostic.rb:82 + sig { returns(T::Boolean) } def info?; end - # : () -> Array[untyped] - # - # source://herb//lib/herb/diagnostic.rb#99 + # pkg:gem/herb#lib/herb/diagnostic.rb:99 + sig { returns(T::Array[T.untyped]) } def key; end - # : Symbol - # - # source://herb//lib/herb/diagnostic.rb#16 + # pkg:gem/herb#lib/herb/diagnostic.rb:16 def kind; end - # : Herb::Location? - # - # source://herb//lib/herb/diagnostic.rb#18 + # pkg:gem/herb#lib/herb/diagnostic.rb:18 def location; end - # : String - # - # source://herb//lib/herb/diagnostic.rb#12 + # pkg:gem/herb#lib/herb/diagnostic.rb:12 def message; end - # : String? - # - # source://herb//lib/herb/diagnostic.rb#13 + # pkg:gem/herb#lib/herb/diagnostic.rb:13 def node; end - # : String - # - # source://herb//lib/herb/diagnostic.rb#17 + # pkg:gem/herb#lib/herb/diagnostic.rb:17 def origin; end - # : Symbol? - # - # source://herb//lib/herb/diagnostic.rb#23 + # pkg:gem/herb#lib/herb/diagnostic.rb:23 def overlay; end - # : Symbol - # - # source://herb//lib/herb/diagnostic.rb#24 + # pkg:gem/herb#lib/herb/diagnostic.rb:24 def phase; end - # : Symbol? - # - # source://herb//lib/herb/diagnostic.rb#15 + # pkg:gem/herb#lib/herb/diagnostic.rb:15 def severity; end - # : String? - # - # source://herb//lib/herb/diagnostic.rb#19 + # pkg:gem/herb#lib/herb/diagnostic.rb:19 def suggestion; end - # : String - # - # source://herb//lib/herb/diagnostic.rb#11 + # pkg:gem/herb#lib/herb/diagnostic.rb:11 def template; end - # : () -> Hash[Symbol, untyped] - # - # source://herb//lib/herb/diagnostic.rb#104 + # pkg:gem/herb#lib/herb/diagnostic.rb:104 + sig { returns(T::Hash[::Symbol, T.untyped]) } def to_h; end - # : () -> Hash[Symbol, untyped] - # - # source://herb//lib/herb/diagnostic.rb#104 - def to_hash; end + # pkg:gem/herb#lib/herb/diagnostic.rb:123 + def to_hash(*args, **, &blk); end - # : (?untyped) -> String - # - # source://herb//lib/herb/diagnostic.rb#146 + # pkg:gem/herb#lib/herb/diagnostic.rb:146 + sig { params(state: T.untyped).returns(::String) } def to_json(state = T.unsafe(nil)); end - # : (?String?) -> String - # - # source://herb//lib/herb/diagnostic.rb#126 + # pkg:gem/herb#lib/herb/diagnostic.rb:126 + sig { params(compiled: T.nilable(::String)).returns(::String) } def to_ruby(compiled = T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/diagnostic.rb#153 + # pkg:gem/herb#lib/herb/diagnostic.rb:153 + sig { returns(::String) } def to_s; end - # : String? - # - # source://herb//lib/herb/diagnostic.rb#22 + # pkg:gem/herb#lib/herb/diagnostic.rb:22 def value; end - # : () -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/diagnostic.rb#77 + # pkg:gem/herb#lib/herb/diagnostic.rb:77 + sig { returns(T::Boolean) } def warning?; end - # : (String?) -> Diagnostic - # - # source://herb//lib/herb/diagnostic.rb#92 + # pkg:gem/herb#lib/herb/diagnostic.rb:92 + sig { params(node: T.nilable(::String)).returns(::Herb::Diagnostic) } def with_node(node); end private - # : (Herb::Location) -> Hash[Symbol, untyped] - # - # source://herb//lib/herb/diagnostic.rb#163 + # pkg:gem/herb#lib/herb/diagnostic.rb:163 + sig { params(location: ::Herb::Location).returns(T::Hash[::Symbol, T.untyped]) } def serialized_location(location); end - # : (Herb::Position) -> Hash[Symbol, Integer] - # - # source://herb//lib/herb/diagnostic.rb#168 + # pkg:gem/herb#lib/herb/diagnostic.rb:168 + sig { params(position: ::Herb::Position).returns(T::Hash[::Symbol, ::Integer]) } def serialized_position(position); end class << self - # : (String, Hash[Symbol, untyped]) -> Diagnostic - # - # source://herb//lib/herb/diagnostic.rb#54 + # pkg:gem/herb#lib/herb/diagnostic.rb:54 + sig { params(template: ::String, entry: T::Hash[::Symbol, T.untyped]).returns(::Herb::Diagnostic) } def from_compiled(template, entry); end - # : (Array[Herb::Errors::Error], template: String, ?origin: String) -> Array[Diagnostic] - # - # source://herb//lib/herb/diagnostic.rb#49 + # pkg:gem/herb#lib/herb/diagnostic.rb:49 + sig do + params( + errors: T::Array[::Herb::Errors::Error], + template: ::String, + origin: ::String + ).returns(T::Array[::Herb::Diagnostic]) + end def from_errors(errors, template:, origin: T.unsafe(nil)); end end end -# : String -# -# source://herb//lib/herb/diagnostic.rb#9 +# pkg:gem/herb#lib/herb/diagnostic.rb:9 Herb::Diagnostic::UNKNOWN_ORIGIN = T.let(T.unsafe(nil), String) -# source://herb//lib/herb/diff/operation.rb#5 +# pkg:gem/herb#lib/herb/diff/operation.rb:5 module Herb::Diff; end -# source://herb//lib/herb/diff/operation.rb#15 +# pkg:gem/herb#lib/herb/diff/operation.rb:6 class Herb::Diff::Operation < ::Data - # : () -> String - # - # source://herb//lib/herb/diff/operation.rb#31 + # pkg:gem/herb#lib/herb/diff/operation.rb:31 + sig { returns(::String) } def inspect; end - # Returns the value of attribute new_index - # - # @return [Object] the current value of new_index + # pkg:gem/herb#lib/herb/diff/operation.rb:6 def new_index; end - # Returns the value of attribute new_node - # - # @return [Object] the current value of new_node + # pkg:gem/herb#lib/herb/diff/operation.rb:6 def new_node; end - # Returns the value of attribute old_index - # - # @return [Object] the current value of old_index + # pkg:gem/herb#lib/herb/diff/operation.rb:6 def old_index; end - # Returns the value of attribute old_node - # - # @return [Object] the current value of old_node + # pkg:gem/herb#lib/herb/diff/operation.rb:6 def old_node; end - # Returns the value of attribute path - # - # @return [Object] the current value of path + # pkg:gem/herb#lib/herb/diff/operation.rb:6 def path; end - # : () -> Hash[Symbol, untyped] - # - # source://herb//lib/herb/diff/operation.rb#17 - def to_h; end + # pkg:gem/herb#lib/herb/diff/operation.rb:28 + def to_h(*args, **, &blk); end - # : () -> Hash[Symbol, untyped] - # - # source://herb//lib/herb/diff/operation.rb#17 + # pkg:gem/herb#lib/herb/diff/operation.rb:17 + sig { returns(T::Hash[::Symbol, T.untyped]) } def to_hash; end - # Returns the value of attribute type - # - # @return [Object] the current value of type + # pkg:gem/herb#lib/herb/diff/operation.rb:6 def type; end class << self + # pkg:gem/herb#lib/herb/diff/operation.rb:6 def [](*_arg0); end + + # pkg:gem/herb#lib/herb/diff/operation.rb:6 def inspect; end + + # pkg:gem/herb#lib/herb/diff/operation.rb:6 def members; end + + # pkg:gem/herb#lib/herb/diff/operation.rb:6 def new(*_arg0); end end end -# source://herb//lib/herb/diff/result.rb#6 +# pkg:gem/herb#lib/herb/diff/result.rb:6 class Herb::Diff::Result include ::Enumerable - # : (bool, Array[Herb::Diff::Operation]) -> void - # - # @return [Result] a new instance of Result - # - # source://herb//lib/herb/diff/result.rb#12 + # pkg:gem/herb#lib/herb/diff/result.rb:12 + sig { params(identical: T::Boolean, operations: T::Array[::Herb::Diff::Operation]).void } def initialize(identical, operations); end - # : () -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/diff/result.rb#38 + # pkg:gem/herb#lib/herb/diff/result.rb:37 + sig { returns(T::Boolean) } def changed?; end - # : () { (Herb::Diff::Operation) -> void } -> void - # : () -> Enumerator[Herb::Diff::Operation, void] - # - # source://herb//lib/herb/diff/result.rb#21 - def each(&block); end + # pkg:gem/herb#lib/herb/diff/result.rb:20 + def each(*args, **, &blk); end - # : () -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/diff/result.rb#28 + # pkg:gem/herb#lib/herb/diff/result.rb:27 + sig { returns(T::Boolean) } def identical?; end - # : () -> String - # - # source://herb//lib/herb/diff/result.rb#53 + # pkg:gem/herb#lib/herb/diff/result.rb:52 + sig { returns(::String) } def inspect; end - # : () -> Integer - # - # source://herb//lib/herb/diff/result.rb#33 + # pkg:gem/herb#lib/herb/diff/result.rb:32 + sig { returns(::Integer) } def operation_count; end - # : Array[Herb::Diff::Operation] + # [Herb::Diff::Operation] # - # source://herb//lib/herb/diff/result.rb#9 + # pkg:gem/herb#lib/herb/diff/result.rb:9 def operations; end - # : () -> Hash[Symbol, untyped] - # - # source://herb//lib/herb/diff/result.rb#43 - def to_h; end + # pkg:gem/herb#lib/herb/diff/result.rb:49 + def to_h(*args, **, &blk); end - # : () -> Hash[Symbol, untyped] - # - # source://herb//lib/herb/diff/result.rb#43 + # pkg:gem/herb#lib/herb/diff/result.rb:42 + sig { returns(T::Hash[::Symbol, T.untyped]) } def to_hash; end end -# : type serialized_error = { -# | type: String, -# | location: serialized_location?, -# | message: String -# | } -# -# source://herb//lib/herb/errors.rb#13 +# pkg:gem/herb#lib/herb/errors.rb:9 module Herb::Errors; end -# source://herb//lib/herb/errors.rb#616 +# pkg:gem/herb#lib/herb/errors.rb:612 class Herb::Errors::ConditionalElementConditionMismatchError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, String, String, Integer, Integer, String, Integer, Integer) -> void - # - # @return [ConditionalElementConditionMismatchError] a new instance of ConditionalElementConditionMismatchError - # - # source://herb//lib/herb/errors.rb#628 + # pkg:gem/herb#lib/herb/errors.rb:624 + sig do + params( + type: ::String, + location: T.nilable(::Herb::Location), + message: ::String, + tag_name: ::String, + open_condition: ::String, + open_line: ::Integer, + open_column: ::Integer, + close_condition: ::String, + close_line: ::Integer, + close_column: ::Integer + ).void + end def initialize(type, location, message, tag_name, open_condition, open_line, open_column, close_condition, close_line, close_column); end - # : Integer? - # - # source://herb//lib/herb/errors.rb#625 + # pkg:gem/herb#lib/herb/errors.rb:621 def close_column; end - # : String? - # - # source://herb//lib/herb/errors.rb#623 + # pkg:gem/herb#lib/herb/errors.rb:619 def close_condition; end - # : Integer? - # - # source://herb//lib/herb/errors.rb#624 + # pkg:gem/herb#lib/herb/errors.rb:620 def close_line; end - # : () -> String - # - # source://herb//lib/herb/errors.rb#640 + # pkg:gem/herb#lib/herb/errors.rb:636 + sig { returns(::String) } def inspect; end - # : Integer? - # - # source://herb//lib/herb/errors.rb#622 + # pkg:gem/herb#lib/herb/errors.rb:618 def open_column; end - # : String? - # - # source://herb//lib/herb/errors.rb#620 + # pkg:gem/herb#lib/herb/errors.rb:616 def open_condition; end - # : Integer? - # - # source://herb//lib/herb/errors.rb#621 + # pkg:gem/herb#lib/herb/errors.rb:617 def open_line; end - # : String? - # - # source://herb//lib/herb/errors.rb#619 + # pkg:gem/herb#lib/herb/errors.rb:615 def tag_name; end - # : () -> serialized_conditional_element_condition_mismatch_error - # - # source://herb//lib/herb/errors.rb#645 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:641 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#658 + # pkg:gem/herb#lib/herb/errors.rb:654 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#576 +# pkg:gem/herb#lib/herb/errors.rb:572 class Herb::Errors::ConditionalElementMultipleTagsError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, Integer, Integer) -> void - # - # @return [ConditionalElementMultipleTagsError] a new instance of ConditionalElementMultipleTagsError - # - # source://herb//lib/herb/errors.rb#583 + # pkg:gem/herb#lib/herb/errors.rb:579 + sig do + params( + type: ::String, + location: T.nilable(::Herb::Location), + message: ::String, + line: ::Integer, + column: ::Integer + ).void + end def initialize(type, location, message, line, column); end - # : Integer? - # - # source://herb//lib/herb/errors.rb#580 + # pkg:gem/herb#lib/herb/errors.rb:576 def column; end - # : () -> String - # - # source://herb//lib/herb/errors.rb#590 + # pkg:gem/herb#lib/herb/errors.rb:586 + sig { returns(::String) } def inspect; end - # : Integer? - # - # source://herb//lib/herb/errors.rb#579 + # pkg:gem/herb#lib/herb/errors.rb:575 def line; end - # : () -> serialized_conditional_element_multiple_tags_error - # - # source://herb//lib/herb/errors.rb#595 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:591 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#603 + # pkg:gem/herb#lib/herb/errors.rb:599 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#1983 +# pkg:gem/herb#lib/herb/errors.rb:1979 class Herb::Errors::DotNotationCasingError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, Herb::Token) -> void - # - # @return [DotNotationCasingError] a new instance of DotNotationCasingError - # - # source://herb//lib/herb/errors.rb#1989 + # pkg:gem/herb#lib/herb/errors.rb:1985 + sig { params(type: ::String, location: T.nilable(::Herb::Location), message: ::String, segment: ::Herb::Token).void } def initialize(type, location, message, segment); end - # : () -> String - # - # source://herb//lib/herb/errors.rb#1995 + # pkg:gem/herb#lib/herb/errors.rb:1991 + sig { returns(::String) } def inspect; end - # : Herb::Token? - # - # source://herb//lib/herb/errors.rb#1986 + # pkg:gem/herb#lib/herb/errors.rb:1982 def segment; end - # : () -> serialized_dot_notation_casing_error - # - # source://herb//lib/herb/errors.rb#2000 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:1996 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#2007 + # pkg:gem/herb#lib/herb/errors.rb:2003 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#556 +# pkg:gem/herb#lib/herb/errors.rb:552 class Herb::Errors::ERBCaseInlinePatternMatchError < ::Herb::Errors::Error include ::Herb::Colors - # : () -> String - # - # source://herb//lib/herb/errors.rb#560 + # pkg:gem/herb#lib/herb/errors.rb:556 + sig { returns(::String) } def inspect; end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#565 + # pkg:gem/herb#lib/herb/errors.rb:561 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#536 +# pkg:gem/herb#lib/herb/errors.rb:532 class Herb::Errors::ERBCaseWithConditionsError < ::Herb::Errors::Error include ::Herb::Colors - # : () -> String - # - # source://herb//lib/herb/errors.rb#540 + # pkg:gem/herb#lib/herb/errors.rb:536 + sig { returns(::String) } def inspect; end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#545 + # pkg:gem/herb#lib/herb/errors.rb:541 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#444 +# pkg:gem/herb#lib/herb/errors.rb:440 class Herb::Errors::ERBControlFlowScopeError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, String) -> void - # - # @return [ERBControlFlowScopeError] a new instance of ERBControlFlowScopeError - # - # source://herb//lib/herb/errors.rb#450 + # pkg:gem/herb#lib/herb/errors.rb:446 + sig { params(type: ::String, location: T.nilable(::Herb::Location), message: ::String, keyword: ::String).void } def initialize(type, location, message, keyword); end - # : () -> String - # - # source://herb//lib/herb/errors.rb#456 + # pkg:gem/herb#lib/herb/errors.rb:452 + sig { returns(::String) } def inspect; end - # : String? - # - # source://herb//lib/herb/errors.rb#447 + # pkg:gem/herb#lib/herb/errors.rb:443 def keyword; end - # : () -> serialized_erb_control_flow_scope_error - # - # source://herb//lib/herb/errors.rb#461 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:457 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#468 + # pkg:gem/herb#lib/herb/errors.rb:464 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#516 +# pkg:gem/herb#lib/herb/errors.rb:512 class Herb::Errors::ERBMultipleBlocksInTagError < ::Herb::Errors::Error include ::Herb::Colors - # : () -> String - # - # source://herb//lib/herb/errors.rb#520 + # pkg:gem/herb#lib/herb/errors.rb:516 + sig { returns(::String) } def inspect; end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#525 + # pkg:gem/herb#lib/herb/errors.rb:521 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#926 +# pkg:gem/herb#lib/herb/errors.rb:922 class Herb::Errors::EndTagWithTrailingSolidusError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, Herb::Token) -> void - # - # @return [EndTagWithTrailingSolidusError] a new instance of EndTagWithTrailingSolidusError - # - # source://herb//lib/herb/errors.rb#932 + # pkg:gem/herb#lib/herb/errors.rb:928 + sig do + params( + type: ::String, + location: T.nilable(::Herb::Location), + message: ::String, + tag_name: ::Herb::Token + ).void + end def initialize(type, location, message, tag_name); end - # : () -> String - # - # source://herb//lib/herb/errors.rb#943 + # pkg:gem/herb#lib/herb/errors.rb:939 + sig { returns(::String) } def inspect; end - # : () -> String? - # - # source://herb//lib/herb/errors.rb#938 + # pkg:gem/herb#lib/herb/errors.rb:934 + sig { returns(T.nilable(::String)) } def suggestion; end - # : Herb::Token? - # - # source://herb//lib/herb/errors.rb#929 + # pkg:gem/herb#lib/herb/errors.rb:925 def tag_name; end - # : () -> serialized_end_tag_with_trailing_solidus_error - # - # source://herb//lib/herb/errors.rb#948 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:944 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#955 + # pkg:gem/herb#lib/herb/errors.rb:951 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#14 +# pkg:gem/herb#lib/herb/errors.rb:10 class Herb::Errors::Error - # : (String, Location?, String) -> void - # - # @return [Error] a new instance of Error - # - # source://herb//lib/herb/errors.rb#20 + # pkg:gem/herb#lib/herb/errors.rb:16 + sig { params(type: ::String, location: T.nilable(::Herb::Location), message: ::String).void } def initialize(type, location, message); end - # : () -> String - # - # source://herb//lib/herb/errors.rb#56 + # pkg:gem/herb#lib/herb/errors.rb:52 + sig { returns(::String) } def class_name; end - # : () -> String - # - # source://herb//lib/herb/errors.rb#61 + # pkg:gem/herb#lib/herb/errors.rb:57 + sig { returns(::String) } def error_name; end - # : Location? - # - # source://herb//lib/herb/errors.rb#16 + # pkg:gem/herb#lib/herb/errors.rb:12 def location; end - # : String - # - # source://herb//lib/herb/errors.rb#17 + # pkg:gem/herb#lib/herb/errors.rb:13 def message; end - # : () -> String? - # - # source://herb//lib/herb/errors.rb#27 + # pkg:gem/herb#lib/herb/errors.rb:23 + sig { returns(T.nilable(::String)) } def suggestion; end - # : (template: String, ?origin: String) -> Herb::Diagnostic - # - # source://herb//lib/herb/errors.rb#32 + # pkg:gem/herb#lib/herb/errors.rb:28 + sig { params(template: ::String, origin: ::String).returns(::Herb::Diagnostic) } def to_diagnostic(template:, origin: T.unsafe(nil)); end - # : () -> serialized_error - # - # source://herb//lib/herb/errors.rb#47 + # pkg:gem/herb#lib/herb/errors.rb:43 + sig do + returns({type: ::String, location: T.nilable({start: {line: ::Integer, column: ::Integer}, end: {line: ::Integer, column: ::Integer}}), message: ::String}) + end def to_hash; end - # : (?untyped) -> String - # - # source://herb//lib/herb/errors.rb#66 + # pkg:gem/herb#lib/herb/errors.rb:62 + sig { params(state: T.untyped).returns(::String) } def to_json(state = T.unsafe(nil)); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # @raise [NotImplementedError] - # - # source://herb//lib/herb/errors.rb#71 + # pkg:gem/herb#lib/herb/errors.rb:67 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end - # : String - # - # source://herb//lib/herb/errors.rb#15 + # pkg:gem/herb#lib/herb/errors.rb:11 def type; end end -# source://herb//lib/herb/errors.rb#1917 +# pkg:gem/herb#lib/herb/errors.rb:1913 class Herb::Errors::HerbStateDuplicateDeclarationError < ::Herb::Errors::Error include ::Herb::Colors - # : () -> String - # - # source://herb//lib/herb/errors.rb#1921 + # pkg:gem/herb#lib/herb/errors.rb:1917 + sig { returns(::String) } def inspect; end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#1926 + # pkg:gem/herb#lib/herb/errors.rb:1922 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#1881 +# pkg:gem/herb#lib/herb/errors.rb:1877 class Herb::Errors::HerbStateInvalidParameterError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, String) -> void - # - # @return [HerbStateInvalidParameterError] a new instance of HerbStateInvalidParameterError - # - # source://herb//lib/herb/errors.rb#1887 + # pkg:gem/herb#lib/herb/errors.rb:1883 + sig { params(type: ::String, location: T.nilable(::Herb::Location), message: ::String, parameter: ::String).void } def initialize(type, location, message, parameter); end - # : () -> String - # - # source://herb//lib/herb/errors.rb#1893 + # pkg:gem/herb#lib/herb/errors.rb:1889 + sig { returns(::String) } def inspect; end - # : String? - # - # source://herb//lib/herb/errors.rb#1884 + # pkg:gem/herb#lib/herb/errors.rb:1880 def parameter; end - # : () -> serialized_herb_state_invalid_parameter_error - # - # source://herb//lib/herb/errors.rb#1898 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:1894 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#1905 + # pkg:gem/herb#lib/herb/errors.rb:1901 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#1805 +# pkg:gem/herb#lib/herb/errors.rb:1801 class Herb::Errors::HerbStateMissingParenthesisError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, String) -> void - # - # @return [HerbStateMissingParenthesisError] a new instance of HerbStateMissingParenthesisError - # - # source://herb//lib/herb/errors.rb#1811 + # pkg:gem/herb#lib/herb/errors.rb:1807 + sig { params(type: ::String, location: T.nilable(::Herb::Location), message: ::String, rest: ::String).void } def initialize(type, location, message, rest); end - # : () -> String - # - # source://herb//lib/herb/errors.rb#1817 + # pkg:gem/herb#lib/herb/errors.rb:1813 + sig { returns(::String) } def inspect; end - # : String? - # - # source://herb//lib/herb/errors.rb#1808 + # pkg:gem/herb#lib/herb/errors.rb:1804 def rest; end - # : () -> serialized_herb_state_missing_parenthesis_error - # - # source://herb//lib/herb/errors.rb#1822 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:1818 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#1829 + # pkg:gem/herb#lib/herb/errors.rb:1825 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#1841 +# pkg:gem/herb#lib/herb/errors.rb:1837 class Herb::Errors::HerbStateNonCanonicalDirectiveError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, String, String) -> void - # - # @return [HerbStateNonCanonicalDirectiveError] a new instance of HerbStateNonCanonicalDirectiveError - # - # source://herb//lib/herb/errors.rb#1848 + # pkg:gem/herb#lib/herb/errors.rb:1844 + sig do + params( + type: ::String, + location: T.nilable(::Herb::Location), + message: ::String, + found: ::String, + expected: ::String + ).void + end def initialize(type, location, message, found, expected); end - # : String? - # - # source://herb//lib/herb/errors.rb#1845 + # pkg:gem/herb#lib/herb/errors.rb:1841 def expected; end - # : String? - # - # source://herb//lib/herb/errors.rb#1844 + # pkg:gem/herb#lib/herb/errors.rb:1840 def found; end - # : () -> String - # - # source://herb//lib/herb/errors.rb#1855 + # pkg:gem/herb#lib/herb/errors.rb:1851 + sig { returns(::String) } def inspect; end - # : () -> serialized_herb_state_non_canonical_directive_error - # - # source://herb//lib/herb/errors.rb#1860 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:1856 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#1868 + # pkg:gem/herb#lib/herb/errors.rb:1864 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#768 +# pkg:gem/herb#lib/herb/errors.rb:764 class Herb::Errors::InvalidCommentClosingTagError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, Herb::Token) -> void - # - # @return [InvalidCommentClosingTagError] a new instance of InvalidCommentClosingTagError - # - # source://herb//lib/herb/errors.rb#774 + # pkg:gem/herb#lib/herb/errors.rb:770 + sig do + params( + type: ::String, + location: T.nilable(::Herb::Location), + message: ::String, + closing_tag: ::Herb::Token + ).void + end def initialize(type, location, message, closing_tag); end - # : Herb::Token? - # - # source://herb//lib/herb/errors.rb#771 + # pkg:gem/herb#lib/herb/errors.rb:767 def closing_tag; end - # : () -> String - # - # source://herb//lib/herb/errors.rb#780 + # pkg:gem/herb#lib/herb/errors.rb:776 + sig { returns(::String) } def inspect; end - # : () -> serialized_invalid_comment_closing_tag_error - # - # source://herb//lib/herb/errors.rb#785 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:781 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#792 + # pkg:gem/herb#lib/herb/errors.rb:788 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#1303 +# pkg:gem/herb#lib/herb/errors.rb:1299 class Herb::Errors::MalformedERBClosingTagError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, Herb::Token, Herb::Token) -> void - # - # @return [MalformedERBClosingTagError] a new instance of MalformedERBClosingTagError - # - # source://herb//lib/herb/errors.rb#1310 + # pkg:gem/herb#lib/herb/errors.rb:1306 + sig do + params( + type: ::String, + location: T.nilable(::Herb::Location), + message: ::String, + opening_tag: ::Herb::Token, + closing_tag: ::Herb::Token + ).void + end def initialize(type, location, message, opening_tag, closing_tag); end - # : Herb::Token? - # - # source://herb//lib/herb/errors.rb#1307 + # pkg:gem/herb#lib/herb/errors.rb:1303 def closing_tag; end - # : () -> String - # - # source://herb//lib/herb/errors.rb#1317 + # pkg:gem/herb#lib/herb/errors.rb:1313 + sig { returns(::String) } def inspect; end - # : Herb::Token? - # - # source://herb//lib/herb/errors.rb#1306 + # pkg:gem/herb#lib/herb/errors.rb:1302 def opening_tag; end - # : () -> serialized_malformed_erb_closing_tag_error - # - # source://herb//lib/herb/errors.rb#1322 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:1318 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#1330 + # pkg:gem/herb#lib/herb/errors.rb:1326 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#1007 +# pkg:gem/herb#lib/herb/errors.rb:1003 class Herb::Errors::MissingAttributeValueError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, String) -> void - # - # @return [MissingAttributeValueError] a new instance of MissingAttributeValueError - # - # source://herb//lib/herb/errors.rb#1013 + # pkg:gem/herb#lib/herb/errors.rb:1009 + sig do + params( + type: ::String, + location: T.nilable(::Herb::Location), + message: ::String, + attribute_name: ::String + ).void + end def initialize(type, location, message, attribute_name); end - # : String? - # - # source://herb//lib/herb/errors.rb#1010 + # pkg:gem/herb#lib/herb/errors.rb:1006 def attribute_name; end - # : () -> String - # - # source://herb//lib/herb/errors.rb#1026 + # pkg:gem/herb#lib/herb/errors.rb:1022 + sig { returns(::String) } def inspect; end - # : () -> String? - # - # source://herb//lib/herb/errors.rb#1019 + # pkg:gem/herb#lib/herb/errors.rb:1015 + sig { returns(T.nilable(::String)) } def suggestion; end - # : () -> serialized_missing_attribute_value_error - # - # source://herb//lib/herb/errors.rb#1031 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:1027 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#1038 + # pkg:gem/herb#lib/herb/errors.rb:1034 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#205 +# pkg:gem/herb#lib/herb/errors.rb:201 class Herb::Errors::MissingClosingTagError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, Herb::Token) -> void - # - # @return [MissingClosingTagError] a new instance of MissingClosingTagError - # - # source://herb//lib/herb/errors.rb#211 + # pkg:gem/herb#lib/herb/errors.rb:207 + sig do + params( + type: ::String, + location: T.nilable(::Herb::Location), + message: ::String, + opening_tag: ::Herb::Token + ).void + end def initialize(type, location, message, opening_tag); end - # : () -> String - # - # source://herb//lib/herb/errors.rb#222 + # pkg:gem/herb#lib/herb/errors.rb:218 + sig { returns(::String) } def inspect; end - # : Herb::Token? - # - # source://herb//lib/herb/errors.rb#208 + # pkg:gem/herb#lib/herb/errors.rb:204 def opening_tag; end - # : () -> String? - # - # source://herb//lib/herb/errors.rb#217 + # pkg:gem/herb#lib/herb/errors.rb:213 + sig { returns(T.nilable(::String)) } def suggestion; end - # : () -> serialized_missing_closing_tag_error - # - # source://herb//lib/herb/errors.rb#227 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:223 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#234 + # pkg:gem/herb#lib/herb/errors.rb:230 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#480 +# pkg:gem/herb#lib/herb/errors.rb:476 class Herb::Errors::MissingERBEndTagError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, String) -> void - # - # @return [MissingERBEndTagError] a new instance of MissingERBEndTagError - # - # source://herb//lib/herb/errors.rb#486 + # pkg:gem/herb#lib/herb/errors.rb:482 + sig { params(type: ::String, location: T.nilable(::Herb::Location), message: ::String, keyword: ::String).void } def initialize(type, location, message, keyword); end - # : () -> String - # - # source://herb//lib/herb/errors.rb#492 + # pkg:gem/herb#lib/herb/errors.rb:488 + sig { returns(::String) } def inspect; end - # : String? - # - # source://herb//lib/herb/errors.rb#483 + # pkg:gem/herb#lib/herb/errors.rb:479 def keyword; end - # : () -> serialized_missing_erb_end_tag_error - # - # source://herb//lib/herb/errors.rb#497 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:493 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#504 + # pkg:gem/herb#lib/herb/errors.rb:500 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#162 +# pkg:gem/herb#lib/herb/errors.rb:158 class Herb::Errors::MissingOpeningTagError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, Herb::Token) -> void - # - # @return [MissingOpeningTagError] a new instance of MissingOpeningTagError - # - # source://herb//lib/herb/errors.rb#168 + # pkg:gem/herb#lib/herb/errors.rb:164 + sig do + params( + type: ::String, + location: T.nilable(::Herb::Location), + message: ::String, + closing_tag: ::Herb::Token + ).void + end def initialize(type, location, message, closing_tag); end - # : Herb::Token? - # - # source://herb//lib/herb/errors.rb#165 + # pkg:gem/herb#lib/herb/errors.rb:161 def closing_tag; end - # : () -> String - # - # source://herb//lib/herb/errors.rb#179 + # pkg:gem/herb#lib/herb/errors.rb:175 + sig { returns(::String) } def inspect; end - # : () -> String? - # - # source://herb//lib/herb/errors.rb#174 + # pkg:gem/herb#lib/herb/errors.rb:170 + sig { returns(T.nilable(::String)) } def suggestion; end - # : () -> serialized_missing_opening_tag_error - # - # source://herb//lib/herb/errors.rb#184 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:180 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#191 + # pkg:gem/herb#lib/herb/errors.rb:187 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#1050 +# pkg:gem/herb#lib/herb/errors.rb:1046 class Herb::Errors::MissingWhitespaceBetweenAttributesError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, Herb::Token) -> void - # - # @return [MissingWhitespaceBetweenAttributesError] a new instance of MissingWhitespaceBetweenAttributesError - # - # source://herb//lib/herb/errors.rb#1056 + # pkg:gem/herb#lib/herb/errors.rb:1052 + sig { params(type: ::String, location: T.nilable(::Herb::Location), message: ::String, found: ::Herb::Token).void } def initialize(type, location, message, found); end - # : Herb::Token? - # - # source://herb//lib/herb/errors.rb#1053 + # pkg:gem/herb#lib/herb/errors.rb:1049 def found; end - # : () -> String - # - # source://herb//lib/herb/errors.rb#1067 + # pkg:gem/herb#lib/herb/errors.rb:1063 + sig { returns(::String) } def inspect; end - # : () -> String? - # - # source://herb//lib/herb/errors.rb#1062 + # pkg:gem/herb#lib/herb/errors.rb:1058 + sig { returns(T.nilable(::String)) } def suggestion; end - # : () -> serialized_missing_whitespace_between_attributes_error - # - # source://herb//lib/herb/errors.rb#1072 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:1068 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#1079 + # pkg:gem/herb#lib/herb/errors.rb:1075 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#719 +# pkg:gem/herb#lib/herb/errors.rb:715 class Herb::Errors::NestedCommentError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, Herb::Token, Herb::Token) -> void - # - # @return [NestedCommentError] a new instance of NestedCommentError - # - # source://herb//lib/herb/errors.rb#726 + # pkg:gem/herb#lib/herb/errors.rb:722 + sig do + params( + type: ::String, + location: T.nilable(::Herb::Location), + message: ::String, + comment_start: ::Herb::Token, + nested_start: ::Herb::Token + ).void + end def initialize(type, location, message, comment_start, nested_start); end - # : Herb::Token? - # - # source://herb//lib/herb/errors.rb#722 + # pkg:gem/herb#lib/herb/errors.rb:718 def comment_start; end - # : () -> String - # - # source://herb//lib/herb/errors.rb#738 + # pkg:gem/herb#lib/herb/errors.rb:734 + sig { returns(::String) } def inspect; end - # : Herb::Token? - # - # source://herb//lib/herb/errors.rb#723 + # pkg:gem/herb#lib/herb/errors.rb:719 def nested_start; end - # : () -> String? - # - # source://herb//lib/herb/errors.rb#733 + # pkg:gem/herb#lib/herb/errors.rb:729 + sig { returns(T.nilable(::String)) } def suggestion; end - # : () -> serialized_nested_comment_error - # - # source://herb//lib/herb/errors.rb#743 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:739 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#751 + # pkg:gem/herb#lib/herb/errors.rb:747 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#1367 +# pkg:gem/herb#lib/herb/errors.rb:1363 class Herb::Errors::NestedERBTagError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, Herb::Token, Integer, Integer) -> void - # - # @return [NestedERBTagError] a new instance of NestedERBTagError - # - # source://herb//lib/herb/errors.rb#1375 + # pkg:gem/herb#lib/herb/errors.rb:1371 + sig do + params( + type: ::String, + location: T.nilable(::Herb::Location), + message: ::String, + opening_tag: ::Herb::Token, + nested_tag_line: ::Integer, + nested_tag_column: ::Integer + ).void + end def initialize(type, location, message, opening_tag, nested_tag_line, nested_tag_column); end - # : () -> String - # - # source://herb//lib/herb/errors.rb#1383 + # pkg:gem/herb#lib/herb/errors.rb:1379 + sig { returns(::String) } def inspect; end - # : Integer? - # - # source://herb//lib/herb/errors.rb#1372 + # pkg:gem/herb#lib/herb/errors.rb:1368 def nested_tag_column; end - # : Integer? - # - # source://herb//lib/herb/errors.rb#1371 + # pkg:gem/herb#lib/herb/errors.rb:1367 def nested_tag_line; end - # : Herb::Token? - # - # source://herb//lib/herb/errors.rb#1370 + # pkg:gem/herb#lib/herb/errors.rb:1366 def opening_tag; end - # : () -> serialized_nested_erb_tag_error - # - # source://herb//lib/herb/errors.rb#1388 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:1384 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#1397 + # pkg:gem/herb#lib/herb/errors.rb:1393 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#806 +# pkg:gem/herb#lib/herb/errors.rb:802 class Herb::Errors::OmittedClosingTagError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, Herb::Token, Herb::Position) -> void - # - # @return [OmittedClosingTagError] a new instance of OmittedClosingTagError - # - # source://herb//lib/herb/errors.rb#813 + # pkg:gem/herb#lib/herb/errors.rb:809 + sig do + params( + type: ::String, + location: T.nilable(::Herb::Location), + message: ::String, + opening_tag: ::Herb::Token, + insertion_point: ::Herb::Position + ).void + end def initialize(type, location, message, opening_tag, insertion_point); end - # : Herb::Position? - # - # source://herb//lib/herb/errors.rb#810 + # pkg:gem/herb#lib/herb/errors.rb:806 def insertion_point; end - # : () -> String - # - # source://herb//lib/herb/errors.rb#820 + # pkg:gem/herb#lib/herb/errors.rb:816 + sig { returns(::String) } def inspect; end - # : Herb::Token? - # - # source://herb//lib/herb/errors.rb#809 + # pkg:gem/herb#lib/herb/errors.rb:805 def opening_tag; end - # : () -> serialized_omitted_closing_tag_error - # - # source://herb//lib/herb/errors.rb#825 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:821 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#833 + # pkg:gem/herb#lib/herb/errors.rb:829 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#1413 +# pkg:gem/herb#lib/herb/errors.rb:1409 class Herb::Errors::RenderAmbiguousLocalsError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, String) -> void - # - # @return [RenderAmbiguousLocalsError] a new instance of RenderAmbiguousLocalsError - # - # source://herb//lib/herb/errors.rb#1419 + # pkg:gem/herb#lib/herb/errors.rb:1415 + sig { params(type: ::String, location: T.nilable(::Herb::Location), message: ::String, partial: ::String).void } def initialize(type, location, message, partial); end - # : () -> String - # - # source://herb//lib/herb/errors.rb#1425 + # pkg:gem/herb#lib/herb/errors.rb:1421 + sig { returns(::String) } def inspect; end - # : String? - # - # source://herb//lib/herb/errors.rb#1416 + # pkg:gem/herb#lib/herb/errors.rb:1412 def partial; end - # : () -> serialized_render_ambiguous_locals_error - # - # source://herb//lib/herb/errors.rb#1430 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:1426 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#1437 + # pkg:gem/herb#lib/herb/errors.rb:1433 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#1509 +# pkg:gem/herb#lib/herb/errors.rb:1505 class Herb::Errors::RenderConflictingPartialError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, String, String) -> void - # - # @return [RenderConflictingPartialError] a new instance of RenderConflictingPartialError - # - # source://herb//lib/herb/errors.rb#1516 + # pkg:gem/herb#lib/herb/errors.rb:1512 + sig do + params( + type: ::String, + location: T.nilable(::Herb::Location), + message: ::String, + positional_partial: ::String, + keyword_partial: ::String + ).void + end def initialize(type, location, message, positional_partial, keyword_partial); end - # : () -> String - # - # source://herb//lib/herb/errors.rb#1523 + # pkg:gem/herb#lib/herb/errors.rb:1519 + sig { returns(::String) } def inspect; end - # : String? - # - # source://herb//lib/herb/errors.rb#1513 + # pkg:gem/herb#lib/herb/errors.rb:1509 def keyword_partial; end - # : String? - # - # source://herb//lib/herb/errors.rb#1512 + # pkg:gem/herb#lib/herb/errors.rb:1508 def positional_partial; end - # : () -> serialized_render_conflicting_partial_error - # - # source://herb//lib/herb/errors.rb#1528 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:1524 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#1536 + # pkg:gem/herb#lib/herb/errors.rb:1532 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#1549 +# pkg:gem/herb#lib/herb/errors.rb:1545 class Herb::Errors::RenderInvalidAsOptionError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, String) -> void - # - # @return [RenderInvalidAsOptionError] a new instance of RenderInvalidAsOptionError - # - # source://herb//lib/herb/errors.rb#1555 + # pkg:gem/herb#lib/herb/errors.rb:1551 + sig { params(type: ::String, location: T.nilable(::Herb::Location), message: ::String, as_value: ::String).void } def initialize(type, location, message, as_value); end - # : String? - # - # source://herb//lib/herb/errors.rb#1552 + # pkg:gem/herb#lib/herb/errors.rb:1548 def as_value; end - # : () -> String - # - # source://herb//lib/herb/errors.rb#1561 + # pkg:gem/herb#lib/herb/errors.rb:1557 + sig { returns(::String) } def inspect; end - # : () -> serialized_render_invalid_as_option_error - # - # source://herb//lib/herb/errors.rb#1566 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:1562 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#1573 + # pkg:gem/herb#lib/herb/errors.rb:1569 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#1605 +# pkg:gem/herb#lib/herb/errors.rb:1601 class Herb::Errors::RenderLayoutWithoutBlockError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, String) -> void - # - # @return [RenderLayoutWithoutBlockError] a new instance of RenderLayoutWithoutBlockError - # - # source://herb//lib/herb/errors.rb#1611 + # pkg:gem/herb#lib/herb/errors.rb:1607 + sig { params(type: ::String, location: T.nilable(::Herb::Location), message: ::String, layout: ::String).void } def initialize(type, location, message, layout); end - # : () -> String - # - # source://herb//lib/herb/errors.rb#1617 + # pkg:gem/herb#lib/herb/errors.rb:1613 + sig { returns(::String) } def inspect; end - # : String? - # - # source://herb//lib/herb/errors.rb#1608 + # pkg:gem/herb#lib/herb/errors.rb:1604 def layout; end - # : () -> serialized_render_layout_without_block_error - # - # source://herb//lib/herb/errors.rb#1622 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:1618 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#1629 + # pkg:gem/herb#lib/herb/errors.rb:1625 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#1449 +# pkg:gem/herb#lib/herb/errors.rb:1445 class Herb::Errors::RenderMissingLocalsError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, String, String) -> void - # - # @return [RenderMissingLocalsError] a new instance of RenderMissingLocalsError - # - # source://herb//lib/herb/errors.rb#1456 + # pkg:gem/herb#lib/herb/errors.rb:1452 + sig do + params( + type: ::String, + location: T.nilable(::Herb::Location), + message: ::String, + partial: ::String, + keywords: ::String + ).void + end def initialize(type, location, message, partial, keywords); end - # : () -> String - # - # source://herb//lib/herb/errors.rb#1463 + # pkg:gem/herb#lib/herb/errors.rb:1459 + sig { returns(::String) } def inspect; end - # : String? - # - # source://herb//lib/herb/errors.rb#1453 + # pkg:gem/herb#lib/herb/errors.rb:1449 def keywords; end - # : String? - # - # source://herb//lib/herb/errors.rb#1452 + # pkg:gem/herb#lib/herb/errors.rb:1448 def partial; end - # : () -> serialized_render_missing_locals_error - # - # source://herb//lib/herb/errors.rb#1468 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:1464 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#1476 + # pkg:gem/herb#lib/herb/errors.rb:1472 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#1489 +# pkg:gem/herb#lib/herb/errors.rb:1485 class Herb::Errors::RenderNoArgumentsError < ::Herb::Errors::Error include ::Herb::Colors - # : () -> String - # - # source://herb//lib/herb/errors.rb#1493 + # pkg:gem/herb#lib/herb/errors.rb:1489 + sig { returns(::String) } def inspect; end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#1498 + # pkg:gem/herb#lib/herb/errors.rb:1494 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#1585 +# pkg:gem/herb#lib/herb/errors.rb:1581 class Herb::Errors::RenderObjectAndCollectionError < ::Herb::Errors::Error include ::Herb::Colors - # : () -> String - # - # source://herb//lib/herb/errors.rb#1589 + # pkg:gem/herb#lib/herb/errors.rb:1585 + sig { returns(::String) } def inspect; end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#1594 + # pkg:gem/herb#lib/herb/errors.rb:1590 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#395 +# pkg:gem/herb#lib/herb/errors.rb:391 class Herb::Errors::RubyParseError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, String, String, String) -> void - # - # @return [RubyParseError] a new instance of RubyParseError - # - # source://herb//lib/herb/errors.rb#403 + # pkg:gem/herb#lib/herb/errors.rb:399 + sig do + params( + type: ::String, + location: T.nilable(::Herb::Location), + message: ::String, + error_message: ::String, + diagnostic_id: ::String, + level: ::String + ).void + end def initialize(type, location, message, error_message, diagnostic_id, level); end - # : String? - # - # source://herb//lib/herb/errors.rb#399 + # pkg:gem/herb#lib/herb/errors.rb:395 def diagnostic_id; end - # : String? - # - # source://herb//lib/herb/errors.rb#398 + # pkg:gem/herb#lib/herb/errors.rb:394 def error_message; end - # : () -> String - # - # source://herb//lib/herb/errors.rb#416 + # pkg:gem/herb#lib/herb/errors.rb:412 + sig { returns(::String) } def inspect; end - # : String? - # - # source://herb//lib/herb/errors.rb#400 + # pkg:gem/herb#lib/herb/errors.rb:396 def level; end - # : () -> String? - # - # source://herb//lib/herb/errors.rb#411 + # pkg:gem/herb#lib/herb/errors.rb:407 + sig { returns(T.nilable(::String)) } def suggestion; end - # : () -> serialized_ruby_parse_error - # - # source://herb//lib/herb/errors.rb#421 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:417 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#430 + # pkg:gem/herb#lib/herb/errors.rb:426 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#1347 +# pkg:gem/herb#lib/herb/errors.rb:1343 class Herb::Errors::StrayERBClosingTagError < ::Herb::Errors::Error include ::Herb::Colors - # : () -> String - # - # source://herb//lib/herb/errors.rb#1351 + # pkg:gem/herb#lib/herb/errors.rb:1347 + sig { returns(::String) } def inspect; end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#1356 + # pkg:gem/herb#lib/herb/errors.rb:1352 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#1677 +# pkg:gem/herb#lib/herb/errors.rb:1673 class Herb::Errors::StrictLocalsBlockArgumentError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, String) -> void - # - # @return [StrictLocalsBlockArgumentError] a new instance of StrictLocalsBlockArgumentError - # - # source://herb//lib/herb/errors.rb#1683 + # pkg:gem/herb#lib/herb/errors.rb:1679 + sig { params(type: ::String, location: T.nilable(::Herb::Location), message: ::String, name: ::String).void } def initialize(type, location, message, name); end - # : () -> String - # - # source://herb//lib/herb/errors.rb#1689 + # pkg:gem/herb#lib/herb/errors.rb:1685 + sig { returns(::String) } def inspect; end - # : String? - # - # source://herb//lib/herb/errors.rb#1680 + # pkg:gem/herb#lib/herb/errors.rb:1676 def name; end - # : () -> serialized_strict_locals_block_argument_error - # - # source://herb//lib/herb/errors.rb#1694 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:1690 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#1701 + # pkg:gem/herb#lib/herb/errors.rb:1697 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#1785 +# pkg:gem/herb#lib/herb/errors.rb:1781 class Herb::Errors::StrictLocalsDuplicateDeclarationError < ::Herb::Errors::Error include ::Herb::Colors - # : () -> String - # - # source://herb//lib/herb/errors.rb#1789 + # pkg:gem/herb#lib/herb/errors.rb:1785 + sig { returns(::String) } def inspect; end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#1794 + # pkg:gem/herb#lib/herb/errors.rb:1790 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#1749 +# pkg:gem/herb#lib/herb/errors.rb:1745 class Herb::Errors::StrictLocalsMissingParenthesisError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, String) -> void - # - # @return [StrictLocalsMissingParenthesisError] a new instance of StrictLocalsMissingParenthesisError - # - # source://herb//lib/herb/errors.rb#1755 + # pkg:gem/herb#lib/herb/errors.rb:1751 + sig { params(type: ::String, location: T.nilable(::Herb::Location), message: ::String, rest: ::String).void } def initialize(type, location, message, rest); end - # : () -> String - # - # source://herb//lib/herb/errors.rb#1761 + # pkg:gem/herb#lib/herb/errors.rb:1757 + sig { returns(::String) } def inspect; end - # : String? - # - # source://herb//lib/herb/errors.rb#1752 + # pkg:gem/herb#lib/herb/errors.rb:1748 def rest; end - # : () -> serialized_strict_locals_missing_parenthesis_error - # - # source://herb//lib/herb/errors.rb#1766 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:1762 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#1773 + # pkg:gem/herb#lib/herb/errors.rb:1769 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#1641 +# pkg:gem/herb#lib/herb/errors.rb:1637 class Herb::Errors::StrictLocalsPositionalArgumentError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, String) -> void - # - # @return [StrictLocalsPositionalArgumentError] a new instance of StrictLocalsPositionalArgumentError - # - # source://herb//lib/herb/errors.rb#1647 + # pkg:gem/herb#lib/herb/errors.rb:1643 + sig { params(type: ::String, location: T.nilable(::Herb::Location), message: ::String, name: ::String).void } def initialize(type, location, message, name); end - # : () -> String - # - # source://herb//lib/herb/errors.rb#1653 + # pkg:gem/herb#lib/herb/errors.rb:1649 + sig { returns(::String) } def inspect; end - # : String? - # - # source://herb//lib/herb/errors.rb#1644 + # pkg:gem/herb#lib/herb/errors.rb:1640 def name; end - # : () -> serialized_strict_locals_positional_argument_error - # - # source://herb//lib/herb/errors.rb#1658 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:1654 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#1665 + # pkg:gem/herb#lib/herb/errors.rb:1661 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#1713 +# pkg:gem/herb#lib/herb/errors.rb:1709 class Herb::Errors::StrictLocalsSplatArgumentError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, String) -> void - # - # @return [StrictLocalsSplatArgumentError] a new instance of StrictLocalsSplatArgumentError - # - # source://herb//lib/herb/errors.rb#1719 + # pkg:gem/herb#lib/herb/errors.rb:1715 + sig { params(type: ::String, location: T.nilable(::Herb::Location), message: ::String, name: ::String).void } def initialize(type, location, message, name); end - # : () -> String - # - # source://herb//lib/herb/errors.rb#1725 + # pkg:gem/herb#lib/herb/errors.rb:1721 + sig { returns(::String) } def inspect; end - # : String? - # - # source://herb//lib/herb/errors.rb#1716 + # pkg:gem/herb#lib/herb/errors.rb:1712 def name; end - # : () -> serialized_strict_locals_splat_argument_error - # - # source://herb//lib/herb/errors.rb#1730 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:1726 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#1737 + # pkg:gem/herb#lib/herb/errors.rb:1733 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#248 +# pkg:gem/herb#lib/herb/errors.rb:244 class Herb::Errors::TagNamesMismatchError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, Herb::Token, Herb::Token) -> void - # - # @return [TagNamesMismatchError] a new instance of TagNamesMismatchError - # - # source://herb//lib/herb/errors.rb#255 + # pkg:gem/herb#lib/herb/errors.rb:251 + sig do + params( + type: ::String, + location: T.nilable(::Herb::Location), + message: ::String, + opening_tag: ::Herb::Token, + closing_tag: ::Herb::Token + ).void + end def initialize(type, location, message, opening_tag, closing_tag); end - # : Herb::Token? - # - # source://herb//lib/herb/errors.rb#252 + # pkg:gem/herb#lib/herb/errors.rb:248 def closing_tag; end - # : () -> String - # - # source://herb//lib/herb/errors.rb#269 + # pkg:gem/herb#lib/herb/errors.rb:265 + sig { returns(::String) } def inspect; end - # : Herb::Token? - # - # source://herb//lib/herb/errors.rb#251 + # pkg:gem/herb#lib/herb/errors.rb:247 def opening_tag; end - # : () -> String? - # - # source://herb//lib/herb/errors.rb#262 + # pkg:gem/herb#lib/herb/errors.rb:258 + sig { returns(T.nilable(::String)) } def suggestion; end - # : () -> serialized_tag_names_mismatch_error - # - # source://herb//lib/herb/errors.rb#274 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:270 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#282 + # pkg:gem/herb#lib/herb/errors.rb:278 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#2021 +# pkg:gem/herb#lib/herb/errors.rb:2017 class Herb::Errors::TimeoutError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, Integer) -> void - # - # @return [TimeoutError] a new instance of TimeoutError - # - # source://herb//lib/herb/errors.rb#2027 + # pkg:gem/herb#lib/herb/errors.rb:2023 + sig { params(type: ::String, location: T.nilable(::Herb::Location), message: ::String, timeout_ms: ::Integer).void } def initialize(type, location, message, timeout_ms); end - # : () -> String - # - # source://herb//lib/herb/errors.rb#2033 + # pkg:gem/herb#lib/herb/errors.rb:2029 + sig { returns(::String) } def inspect; end - # : Integer? - # - # source://herb//lib/herb/errors.rb#2024 + # pkg:gem/herb#lib/herb/errors.rb:2020 def timeout_ms; end - # : () -> serialized_timeout_error - # - # source://herb//lib/herb/errors.rb#2038 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:2034 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#2045 + # pkg:gem/herb#lib/herb/errors.rb:2041 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#888 +# pkg:gem/herb#lib/herb/errors.rb:884 class Herb::Errors::UnclosedCloseTagError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, Herb::Token) -> void - # - # @return [UnclosedCloseTagError] a new instance of UnclosedCloseTagError - # - # source://herb//lib/herb/errors.rb#894 + # pkg:gem/herb#lib/herb/errors.rb:890 + sig do + params( + type: ::String, + location: T.nilable(::Herb::Location), + message: ::String, + tag_name: ::Herb::Token + ).void + end def initialize(type, location, message, tag_name); end - # : () -> String - # - # source://herb//lib/herb/errors.rb#900 + # pkg:gem/herb#lib/herb/errors.rb:896 + sig { returns(::String) } def inspect; end - # : Herb::Token? - # - # source://herb//lib/herb/errors.rb#891 + # pkg:gem/herb#lib/herb/errors.rb:887 def tag_name; end - # : () -> serialized_unclosed_close_tag_error - # - # source://herb//lib/herb/errors.rb#905 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:901 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#912 + # pkg:gem/herb#lib/herb/errors.rb:908 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#676 +# pkg:gem/herb#lib/herb/errors.rb:672 class Herb::Errors::UnclosedCommentError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, Herb::Token) -> void - # - # @return [UnclosedCommentError] a new instance of UnclosedCommentError - # - # source://herb//lib/herb/errors.rb#682 + # pkg:gem/herb#lib/herb/errors.rb:678 + sig do + params( + type: ::String, + location: T.nilable(::Herb::Location), + message: ::String, + comment_start: ::Herb::Token + ).void + end def initialize(type, location, message, comment_start); end - # : Herb::Token? - # - # source://herb//lib/herb/errors.rb#679 + # pkg:gem/herb#lib/herb/errors.rb:675 def comment_start; end - # : () -> String - # - # source://herb//lib/herb/errors.rb#693 + # pkg:gem/herb#lib/herb/errors.rb:689 + sig { returns(::String) } def inspect; end - # : () -> String? - # - # source://herb//lib/herb/errors.rb#688 + # pkg:gem/herb#lib/herb/errors.rb:684 + sig { returns(T.nilable(::String)) } def suggestion; end - # : () -> serialized_unclosed_comment_error - # - # source://herb//lib/herb/errors.rb#698 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:694 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#705 + # pkg:gem/herb#lib/herb/errors.rb:701 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#1265 +# pkg:gem/herb#lib/herb/errors.rb:1261 class Herb::Errors::UnclosedERBTagError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, Herb::Token) -> void - # - # @return [UnclosedERBTagError] a new instance of UnclosedERBTagError - # - # source://herb//lib/herb/errors.rb#1271 + # pkg:gem/herb#lib/herb/errors.rb:1267 + sig do + params( + type: ::String, + location: T.nilable(::Herb::Location), + message: ::String, + opening_tag: ::Herb::Token + ).void + end def initialize(type, location, message, opening_tag); end - # : () -> String - # - # source://herb//lib/herb/errors.rb#1277 + # pkg:gem/herb#lib/herb/errors.rb:1273 + sig { returns(::String) } def inspect; end - # : Herb::Token? - # - # source://herb//lib/herb/errors.rb#1268 + # pkg:gem/herb#lib/herb/errors.rb:1264 def opening_tag; end - # : () -> serialized_unclosed_erb_tag_error - # - # source://herb//lib/herb/errors.rb#1282 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:1278 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#1289 + # pkg:gem/herb#lib/herb/errors.rb:1285 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#352 +# pkg:gem/herb#lib/herb/errors.rb:348 class Herb::Errors::UnclosedElementError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, Herb::Token) -> void - # - # @return [UnclosedElementError] a new instance of UnclosedElementError - # - # source://herb//lib/herb/errors.rb#358 + # pkg:gem/herb#lib/herb/errors.rb:354 + sig do + params( + type: ::String, + location: T.nilable(::Herb::Location), + message: ::String, + opening_tag: ::Herb::Token + ).void + end def initialize(type, location, message, opening_tag); end - # : () -> String - # - # source://herb//lib/herb/errors.rb#369 + # pkg:gem/herb#lib/herb/errors.rb:365 + sig { returns(::String) } def inspect; end - # : Herb::Token? - # - # source://herb//lib/herb/errors.rb#355 + # pkg:gem/herb#lib/herb/errors.rb:351 def opening_tag; end - # : () -> String? - # - # source://herb//lib/herb/errors.rb#364 + # pkg:gem/herb#lib/herb/errors.rb:360 + sig { returns(T.nilable(::String)) } def suggestion; end - # : () -> serialized_unclosed_element_error - # - # source://herb//lib/herb/errors.rb#374 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:370 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#381 + # pkg:gem/herb#lib/herb/errors.rb:377 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#850 +# pkg:gem/herb#lib/herb/errors.rb:846 class Herb::Errors::UnclosedOpenTagError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, Herb::Token) -> void - # - # @return [UnclosedOpenTagError] a new instance of UnclosedOpenTagError - # - # source://herb//lib/herb/errors.rb#856 + # pkg:gem/herb#lib/herb/errors.rb:852 + sig do + params( + type: ::String, + location: T.nilable(::Herb::Location), + message: ::String, + tag_name: ::Herb::Token + ).void + end def initialize(type, location, message, tag_name); end - # : () -> String - # - # source://herb//lib/herb/errors.rb#862 + # pkg:gem/herb#lib/herb/errors.rb:858 + sig { returns(::String) } def inspect; end - # : Herb::Token? - # - # source://herb//lib/herb/errors.rb#853 + # pkg:gem/herb#lib/herb/errors.rb:849 def tag_name; end - # : () -> serialized_unclosed_open_tag_error - # - # source://herb//lib/herb/errors.rb#867 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:863 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#874 + # pkg:gem/herb#lib/herb/errors.rb:870 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#969 +# pkg:gem/herb#lib/herb/errors.rb:965 class Herb::Errors::UnclosedQuoteError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, Herb::Token) -> void - # - # @return [UnclosedQuoteError] a new instance of UnclosedQuoteError - # - # source://herb//lib/herb/errors.rb#975 + # pkg:gem/herb#lib/herb/errors.rb:971 + sig do + params( + type: ::String, + location: T.nilable(::Herb::Location), + message: ::String, + opening_quote: ::Herb::Token + ).void + end def initialize(type, location, message, opening_quote); end - # : () -> String - # - # source://herb//lib/herb/errors.rb#981 + # pkg:gem/herb#lib/herb/errors.rb:977 + sig { returns(::String) } def inspect; end - # : Herb::Token? - # - # source://herb//lib/herb/errors.rb#972 + # pkg:gem/herb#lib/herb/errors.rb:968 def opening_quote; end - # : () -> serialized_unclosed_quote_error - # - # source://herb//lib/herb/errors.rb#986 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:982 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#993 + # pkg:gem/herb#lib/herb/errors.rb:989 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#1093 +# pkg:gem/herb#lib/herb/errors.rb:1089 class Herb::Errors::UnexpectedCharacterInAttributeNameError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, Herb::Token) -> void - # - # @return [UnexpectedCharacterInAttributeNameError] a new instance of UnexpectedCharacterInAttributeNameError - # - # source://herb//lib/herb/errors.rb#1099 + # pkg:gem/herb#lib/herb/errors.rb:1095 + sig do + params( + type: ::String, + location: T.nilable(::Herb::Location), + message: ::String, + character: ::Herb::Token + ).void + end def initialize(type, location, message, character); end - # : Herb::Token? - # - # source://herb//lib/herb/errors.rb#1096 + # pkg:gem/herb#lib/herb/errors.rb:1092 def character; end - # : () -> String - # - # source://herb//lib/herb/errors.rb#1110 + # pkg:gem/herb#lib/herb/errors.rb:1106 + sig { returns(::String) } def inspect; end - # : () -> String? - # - # source://herb//lib/herb/errors.rb#1105 + # pkg:gem/herb#lib/herb/errors.rb:1101 + sig { returns(T.nilable(::String)) } def suggestion; end - # : () -> serialized_unexpected_character_in_attribute_name_error - # - # source://herb//lib/herb/errors.rb#1115 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:1111 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#1122 + # pkg:gem/herb#lib/herb/errors.rb:1118 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#1136 +# pkg:gem/herb#lib/herb/errors.rb:1132 class Herb::Errors::UnexpectedCharacterInUnquotedAttributeValueError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, Herb::Token) -> void - # - # @return [UnexpectedCharacterInUnquotedAttributeValueError] a new instance of UnexpectedCharacterInUnquotedAttributeValueError - # - # source://herb//lib/herb/errors.rb#1142 + # pkg:gem/herb#lib/herb/errors.rb:1138 + sig do + params( + type: ::String, + location: T.nilable(::Herb::Location), + message: ::String, + character: ::Herb::Token + ).void + end def initialize(type, location, message, character); end - # : Herb::Token? - # - # source://herb//lib/herb/errors.rb#1139 + # pkg:gem/herb#lib/herb/errors.rb:1135 def character; end - # : () -> String - # - # source://herb//lib/herb/errors.rb#1153 + # pkg:gem/herb#lib/herb/errors.rb:1149 + sig { returns(::String) } def inspect; end - # : () -> String? - # - # source://herb//lib/herb/errors.rb#1148 + # pkg:gem/herb#lib/herb/errors.rb:1144 + sig { returns(T.nilable(::String)) } def suggestion; end - # : () -> serialized_unexpected_character_in_unquoted_attribute_value_error - # - # source://herb//lib/herb/errors.rb#1158 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:1154 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#1165 + # pkg:gem/herb#lib/herb/errors.rb:1161 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#1179 +# pkg:gem/herb#lib/herb/errors.rb:1175 class Herb::Errors::UnexpectedEqualsSignBeforeAttributeNameError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, Herb::Token) -> void - # - # @return [UnexpectedEqualsSignBeforeAttributeNameError] a new instance of UnexpectedEqualsSignBeforeAttributeNameError - # - # source://herb//lib/herb/errors.rb#1185 + # pkg:gem/herb#lib/herb/errors.rb:1181 + sig { params(type: ::String, location: T.nilable(::Herb::Location), message: ::String, equals: ::Herb::Token).void } def initialize(type, location, message, equals); end - # : Herb::Token? - # - # source://herb//lib/herb/errors.rb#1182 + # pkg:gem/herb#lib/herb/errors.rb:1178 def equals; end - # : () -> String - # - # source://herb//lib/herb/errors.rb#1196 + # pkg:gem/herb#lib/herb/errors.rb:1192 + sig { returns(::String) } def inspect; end - # : () -> String? - # - # source://herb//lib/herb/errors.rb#1191 + # pkg:gem/herb#lib/herb/errors.rb:1187 + sig { returns(T.nilable(::String)) } def suggestion; end - # : () -> serialized_unexpected_equals_sign_before_attribute_name_error - # - # source://herb//lib/herb/errors.rb#1201 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:1197 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#1208 + # pkg:gem/herb#lib/herb/errors.rb:1204 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#76 +# pkg:gem/herb#lib/herb/errors.rb:72 class Herb::Errors::UnexpectedError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, String, String, String) -> void - # - # @return [UnexpectedError] a new instance of UnexpectedError - # - # source://herb//lib/herb/errors.rb#84 + # pkg:gem/herb#lib/herb/errors.rb:80 + sig do + params( + type: ::String, + location: T.nilable(::Herb::Location), + message: ::String, + description: ::String, + expected: ::String, + found: ::String + ).void + end def initialize(type, location, message, description, expected, found); end - # : String? - # - # source://herb//lib/herb/errors.rb#79 + # pkg:gem/herb#lib/herb/errors.rb:75 def description; end - # : String? - # - # source://herb//lib/herb/errors.rb#80 + # pkg:gem/herb#lib/herb/errors.rb:76 def expected; end - # : String? - # - # source://herb//lib/herb/errors.rb#81 + # pkg:gem/herb#lib/herb/errors.rb:77 def found; end - # : () -> String - # - # source://herb//lib/herb/errors.rb#92 + # pkg:gem/herb#lib/herb/errors.rb:88 + sig { returns(::String) } def inspect; end - # : () -> serialized_unexpected_error - # - # source://herb//lib/herb/errors.rb#97 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:93 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#106 + # pkg:gem/herb#lib/herb/errors.rb:102 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#1222 +# pkg:gem/herb#lib/herb/errors.rb:1218 class Herb::Errors::UnexpectedSolidusInTagError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, Herb::Token) -> void - # - # @return [UnexpectedSolidusInTagError] a new instance of UnexpectedSolidusInTagError - # - # source://herb//lib/herb/errors.rb#1228 + # pkg:gem/herb#lib/herb/errors.rb:1224 + sig { params(type: ::String, location: T.nilable(::Herb::Location), message: ::String, solidus: ::Herb::Token).void } def initialize(type, location, message, solidus); end - # : () -> String - # - # source://herb//lib/herb/errors.rb#1239 + # pkg:gem/herb#lib/herb/errors.rb:1235 + sig { returns(::String) } def inspect; end - # : Herb::Token? - # - # source://herb//lib/herb/errors.rb#1225 + # pkg:gem/herb#lib/herb/errors.rb:1221 def solidus; end - # : () -> String? - # - # source://herb//lib/herb/errors.rb#1234 + # pkg:gem/herb#lib/herb/errors.rb:1230 + sig { returns(T.nilable(::String)) } def suggestion; end - # : () -> serialized_unexpected_solidus_in_tag_error - # - # source://herb//lib/herb/errors.rb#1244 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:1240 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#1251 + # pkg:gem/herb#lib/herb/errors.rb:1247 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#120 +# pkg:gem/herb#lib/herb/errors.rb:116 class Herb::Errors::UnexpectedTokenError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, String, Herb::Token) -> void - # - # @return [UnexpectedTokenError] a new instance of UnexpectedTokenError - # - # source://herb//lib/herb/errors.rb#127 + # pkg:gem/herb#lib/herb/errors.rb:123 + sig do + params( + type: ::String, + location: T.nilable(::Herb::Location), + message: ::String, + expected_type: ::String, + found: ::Herb::Token + ).void + end def initialize(type, location, message, expected_type, found); end - # : String? - # - # source://herb//lib/herb/errors.rb#123 + # pkg:gem/herb#lib/herb/errors.rb:119 def expected_type; end - # : Herb::Token? - # - # source://herb//lib/herb/errors.rb#124 + # pkg:gem/herb#lib/herb/errors.rb:120 def found; end - # : () -> String - # - # source://herb//lib/herb/errors.rb#134 + # pkg:gem/herb#lib/herb/errors.rb:130 + sig { returns(::String) } def inspect; end - # : () -> serialized_unexpected_token_error - # - # source://herb//lib/herb/errors.rb#139 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:135 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#147 + # pkg:gem/herb#lib/herb/errors.rb:143 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#299 +# pkg:gem/herb#lib/herb/errors.rb:295 class Herb::Errors::VoidElementClosingTagError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, Herb::Token, String, String) -> void - # - # @return [VoidElementClosingTagError] a new instance of VoidElementClosingTagError - # - # source://herb//lib/herb/errors.rb#307 + # pkg:gem/herb#lib/herb/errors.rb:303 + sig do + params( + type: ::String, + location: T.nilable(::Herb::Location), + message: ::String, + tag_name: ::Herb::Token, + expected: ::String, + found: ::String + ).void + end def initialize(type, location, message, tag_name, expected, found); end - # : String? - # - # source://herb//lib/herb/errors.rb#303 + # pkg:gem/herb#lib/herb/errors.rb:299 def expected; end - # : String? - # - # source://herb//lib/herb/errors.rb#304 + # pkg:gem/herb#lib/herb/errors.rb:300 def found; end - # : () -> String - # - # source://herb//lib/herb/errors.rb#322 + # pkg:gem/herb#lib/herb/errors.rb:318 + sig { returns(::String) } def inspect; end - # : () -> String? - # - # source://herb//lib/herb/errors.rb#315 + # pkg:gem/herb#lib/herb/errors.rb:311 + sig { returns(T.nilable(::String)) } def suggestion; end - # : Herb::Token? - # - # source://herb//lib/herb/errors.rb#302 + # pkg:gem/herb#lib/herb/errors.rb:298 def tag_name; end - # : () -> serialized_void_element_closing_tag_error - # - # source://herb//lib/herb/errors.rb#327 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:323 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#336 + # pkg:gem/herb#lib/herb/errors.rb:332 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end -# source://herb//lib/herb/errors.rb#1937 +# pkg:gem/herb#lib/herb/errors.rb:1933 class Herb::Errors::VoidElementContentError < ::Herb::Errors::Error include ::Herb::Colors - # : (String, Location?, String, Herb::Token, String, String) -> void - # - # @return [VoidElementContentError] a new instance of VoidElementContentError - # - # source://herb//lib/herb/errors.rb#1945 + # pkg:gem/herb#lib/herb/errors.rb:1941 + sig do + params( + type: ::String, + location: T.nilable(::Herb::Location), + message: ::String, + tag_name: ::Herb::Token, + helper_name: ::String, + content_type: ::String + ).void + end def initialize(type, location, message, tag_name, helper_name, content_type); end - # : String? - # - # source://herb//lib/herb/errors.rb#1942 + # pkg:gem/herb#lib/herb/errors.rb:1938 def content_type; end - # : String? - # - # source://herb//lib/herb/errors.rb#1941 + # pkg:gem/herb#lib/herb/errors.rb:1937 def helper_name; end - # : () -> String - # - # source://herb//lib/herb/errors.rb#1953 + # pkg:gem/herb#lib/herb/errors.rb:1949 + sig { returns(::String) } def inspect; end - # : Herb::Token? - # - # source://herb//lib/herb/errors.rb#1940 + # pkg:gem/herb#lib/herb/errors.rb:1936 def tag_name; end - # : () -> serialized_void_element_content_error - # - # source://herb//lib/herb/errors.rb#1958 - def to_hash; end + # pkg:gem/herb#lib/herb/errors.rb:1954 + def to_hash(*args, **, &blk); end - # : (?indent: Integer, ?depth: Integer, ?depth_limit: Integer) -> String - # - # source://herb//lib/herb/errors.rb#1967 + # pkg:gem/herb#lib/herb/errors.rb:1963 + sig { params(indent: ::Integer, depth: ::Integer, depth_limit: ::Integer).returns(::String) } def tree_inspect(indent: T.unsafe(nil), depth: T.unsafe(nil), depth_limit: T.unsafe(nil)); end end @@ -7314,73 +6479,63 @@ end # Herb::Fingerprint.file(asset) #=> "9f2a1c4e…" # Herb::Fingerprint.template(source) #=> "d242d277…" # -# source://herb//lib/herb/fingerprint.rb#12 +# pkg:gem/herb#lib/herb/fingerprint.rb:12 module Herb::Fingerprint class << self - # : () -> Hash[Array[untyped], String] - # - # source://herb//lib/herb/fingerprint.rb#71 + # pkg:gem/herb#lib/herb/fingerprint.rb:71 + sig { returns(T::Hash[T::Array[T.untyped], ::String]) } def cache; end - # : () -> void - # - # source://herb//lib/herb/fingerprint.rb#64 + # pkg:gem/herb#lib/herb/fingerprint.rb:64 + sig { void } def clear_cache; end - # : ((String | Pathname)?) -> String? - # - # source://herb//lib/herb/fingerprint.rb#24 + # pkg:gem/herb#lib/herb/fingerprint.rb:24 + sig { params(path: T.nilable(T.any(::Pathname, ::String))).returns(T.nilable(::String)) } def file(path); end - # : (String?) -> String? - # - # source://herb//lib/herb/fingerprint.rb#17 + # pkg:gem/herb#lib/herb/fingerprint.rb:17 + sig { params(content: T.nilable(::String)).returns(T.nilable(::String)) } def of(content); end - # : (String?) -> String? - # - # source://herb//lib/herb/fingerprint.rb#59 + # pkg:gem/herb#lib/herb/fingerprint.rb:59 + sig { params(digest: T.nilable(::String)).returns(T.nilable(::String)) } def short(digest); end - # : (String) -> String - # - # source://herb//lib/herb/fingerprint.rb#76 + # pkg:gem/herb#lib/herb/fingerprint.rb:76 + sig { params(bytes: ::String).returns(::String) } def strip_bom(bytes); end - # : (String?) -> String? - # - # source://herb//lib/herb/fingerprint.rb#33 + # pkg:gem/herb#lib/herb/fingerprint.rb:33 + sig { params(source: T.nilable(::String)).returns(T.nilable(::String)) } def template(source); end - # : ((String | Pathname)?) -> String? - # - # source://herb//lib/herb/fingerprint.rb#40 + # pkg:gem/herb#lib/herb/fingerprint.rb:40 + sig { params(path: T.nilable(T.any(::Pathname, ::String))).returns(T.nilable(::String)) } def template_file(path); end end end -# : String -# -# source://herb//lib/herb/fingerprint.rb#13 +# pkg:gem/herb#lib/herb/fingerprint.rb:13 Herb::Fingerprint::BOM = T.let(T.unsafe(nil), String) -# : Integer -# -# source://herb//lib/herb/fingerprint.rb#14 +# pkg:gem/herb#lib/herb/fingerprint.rb:14 Herb::Fingerprint::SHORT_LENGTH = T.let(T.unsafe(nil), Integer) -# source://herb//lib/herb/lex_result.rb#5 +# pkg:gem/herb#lib/herb/lex_result.rb:5 class Herb::LexResult < ::Herb::Result - # : (Array[Herb::Token], String, Array[Herb::Warnings::Warning], Array[Herb::Errors::Error]) -> void - # - # @return [LexResult] a new instance of LexResult - # - # source://herb//lib/herb/lex_result.rb#9 + # pkg:gem/herb#lib/herb/lex_result.rb:9 + sig do + params( + value: T::Array[::Herb::Token], + source: ::String, + warnings: T::Array[::Herb::Warnings::Warning], + errors: T::Array[::Herb::Errors::Error] + ).void + end def initialize(value, source, warnings, errors); end - # : TokenList - # - # source://herb//lib/herb/lex_result.rb#6 + # pkg:gem/herb#lib/herb/lex_result.rb:6 def value; end end @@ -7416,1045 +6571,833 @@ end # result.node #=> # # result.ancestors #=> [#<...HTMLAttributeNameNode>, #<...HTMLAttributeNode>, ...] # -# source://herb//lib/herb/locate.rb#37 +# pkg:gem/herb#lib/herb/locate.rb:37 class Herb::Locate - # : (Herb::Position) -> void - # - # @return [Locate] a new instance of Locate - # - # source://herb//lib/herb/locate.rb#84 + # pkg:gem/herb#lib/herb/locate.rb:84 + sig { params(position: ::Herb::Position).void } def initialize(position); end - # : ((Herb::AST::Node | Herb::ParseResult)) -> Result? - # - # source://herb//lib/herb/locate.rb#93 + # pkg:gem/herb#lib/herb/locate.rb:93 + sig { params(node: T.any(::Herb::AST::Node, ::Herb::ParseResult)).returns(T.nilable(::Herb::Locate::Result)) } def call(node); end - # : ((Herb::AST::Node | Herb::ParseResult)) -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/locate.rb#102 + # pkg:gem/herb#lib/herb/locate.rb:102 + sig { params(node: T.any(::Herb::AST::Node, ::Herb::ParseResult)).returns(T::Boolean) } def locatable?(node); end private - # : (Herb::AST::Node) -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/locate.rb#123 + # pkg:gem/herb#lib/herb/locate.rb:123 + sig { params(node: ::Herb::AST::Node).returns(T::Boolean) } def contains?(node); end - # : (Herb::AST::Node, Array[Herb::AST::Node]) -> Result? - # - # source://herb//lib/herb/locate.rb#109 + # pkg:gem/herb#lib/herb/locate.rb:109 + sig do + params( + node: ::Herb::AST::Node, + ancestors: T::Array[::Herb::AST::Node] + ).returns(T.nilable(::Herb::Locate::Result)) + end def descend(node, ancestors); end - # : (Herb::AST::Node) -> Herb::Location? - # - # source://herb//lib/herb/locate.rb#140 + # pkg:gem/herb#lib/herb/locate.rb:140 + sig { params(node: ::Herb::AST::Node).returns(T.nilable(::Herb::Location)) } def extent(node); end - # : (Herb::Location?, Herb::Location) -> Herb::Location - # - # source://herb//lib/herb/locate.rb#154 + # pkg:gem/herb#lib/herb/locate.rb:154 + sig { params(first: T.nilable(::Herb::Location), second: ::Herb::Location).returns(::Herb::Location) } def union(first, second); end - # : (Herb::AST::Node) -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/locate.rb#133 + # pkg:gem/herb#lib/herb/locate.rb:133 + sig { params(node: ::Herb::AST::Node).returns(T::Boolean) } def within_extent?(node); end class << self - # : ((Herb::AST::Node | Herb::ParseResult), Herb::Position) -> Result? - # - # source://herb//lib/herb/locate.rb#69 + # pkg:gem/herb#lib/herb/locate.rb:69 + sig do + params( + node: T.any(::Herb::AST::Node, ::Herb::ParseResult), + position: ::Herb::Position + ).returns(T.nilable(::Herb::Locate::Result)) + end def call(node, position); end - # : ((Herb::AST::Node | Herb::ParseResult), Herb::Position) -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/locate.rb#74 + # pkg:gem/herb#lib/herb/locate.rb:74 + sig { params(node: T.any(::Herb::AST::Node, ::Herb::ParseResult), position: ::Herb::Position).returns(T::Boolean) } def locatable?(node, position); end - # : ((Herb::AST::Node | Herb::ParseResult)) -> Herb::AST::Node - # - # source://herb//lib/herb/locate.rb#79 + # pkg:gem/herb#lib/herb/locate.rb:79 + sig { params(node: T.any(::Herb::AST::Node, ::Herb::ParseResult)).returns(::Herb::AST::Node) } def root(node); end end end -# source://herb//lib/herb/locate.rb#38 +# pkg:gem/herb#lib/herb/locate.rb:38 class Herb::Locate::Result - # : (Herb::AST::Node, Array[Herb::AST::Node]) -> void - # - # @return [Result] a new instance of Result - # - # source://herb//lib/herb/locate.rb#43 + # pkg:gem/herb#lib/herb/locate.rb:43 + sig { params(node: ::Herb::AST::Node, ancestors: T::Array[::Herb::AST::Node]).void } def initialize(node, ancestors); end - # : Array[Herb::AST::Node] - # - # source://herb//lib/herb/locate.rb#40 + # pkg:gem/herb#lib/herb/locate.rb:40 def ancestors; end - # : (untyped) -> Herb::AST::Node? - # - # source://herb//lib/herb/locate.rb#51 + # pkg:gem/herb#lib/herb/locate.rb:51 + sig { params(kind: T.untyped).returns(T.nilable(::Herb::AST::Node)) } def innermost(kind); end - # : () -> String - # - # source://herb//lib/herb/locate.rb#63 + # pkg:gem/herb#lib/herb/locate.rb:63 + sig { returns(::String) } def inspect; end - # : Herb::AST::Node - # - # source://herb//lib/herb/locate.rb#39 + # pkg:gem/herb#lib/herb/locate.rb:39 def node; end - # : () -> Array[Herb::AST::Node] - # - # source://herb//lib/herb/locate.rb#58 + # pkg:gem/herb#lib/herb/locate.rb:58 + sig { returns(T::Array[::Herb::AST::Node]) } def path; end end -# : type serialized_location = { -# | start: serialized_position, -# | end: serialized_position -# | } -# -# source://herb//lib/herb/location.rb#9 +# pkg:gem/herb#lib/herb/location.rb:6 class Herb::Location - # : (Position, Position) -> void - # - # @return [Location] a new instance of Location - # - # source://herb//lib/herb/location.rb#14 + # pkg:gem/herb#lib/herb/location.rb:11 + sig { params(start_position: ::Herb::Position, end_position: ::Herb::Position).void } def initialize(start_position, end_position); end - # : (Position) -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/location.rb#38 + # pkg:gem/herb#lib/herb/location.rb:35 + sig { params(position: ::Herb::Position).returns(T::Boolean) } def contains?(position); end - # : (Location) -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/location.rb#43 + # pkg:gem/herb#lib/herb/location.rb:40 + sig { params(other: ::Herb::Location).returns(T::Boolean) } def covers?(other); end - # : () -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/location.rb#48 + # pkg:gem/herb#lib/herb/location.rb:45 + sig { returns(T::Boolean) } def empty?; end - # : Position - # - # source://herb//lib/herb/location.rb#11 + # pkg:gem/herb#lib/herb/location.rb:8 def end; end - # : () -> String - # - # source://herb//lib/herb/location.rb#71 + # pkg:gem/herb#lib/herb/location.rb:68 + sig { returns(::String) } def inspect; end - # : Position - # - # source://herb//lib/herb/location.rb#10 + # pkg:gem/herb#lib/herb/location.rb:7 def start; end - # : () -> serialized_location - # - # source://herb//lib/herb/location.rb#53 + # pkg:gem/herb#lib/herb/location.rb:50 + sig { returns({start: {line: ::Integer, column: ::Integer}, end: {line: ::Integer, column: ::Integer}}) } def to_hash; end - # : (?untyped) -> String - # - # source://herb//lib/herb/location.rb#61 + # pkg:gem/herb#lib/herb/location.rb:58 + sig { params(state: T.untyped).returns(::String) } def to_json(state = T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/location.rb#66 + # pkg:gem/herb#lib/herb/location.rb:63 + sig { returns(::String) } def tree_inspect; end class << self - # : (Integer, Integer, Integer, Integer) -> Location - # - # source://herb//lib/herb/location.rb#28 + # pkg:gem/herb#lib/herb/location.rb:25 + sig do + params( + start_line: ::Integer, + start_column: ::Integer, + end_line: ::Integer, + end_column: ::Integer + ).returns(::Herb::Location) + end def [](start_line, start_column, end_line, end_column); end - # : (Integer, Integer, Integer, Integer) -> Location - # - # source://herb//lib/herb/location.rb#20 + # pkg:gem/herb#lib/herb/location.rb:17 + sig do + params( + start_line: ::Integer, + start_column: ::Integer, + end_line: ::Integer, + end_column: ::Integer + ).returns(::Herb::Location) + end def from(start_line, start_column, end_line, end_column); end - # : () -> Location - # - # source://herb//lib/herb/location.rb#33 + # pkg:gem/herb#lib/herb/location.rb:30 + sig { returns(::Herb::Location) } def zero; end end end -# source://herb//lib/herb/parse_result.rb#9 +# pkg:gem/herb#lib/herb/parse_result.rb:9 class Herb::ParseResult < ::Herb::Result - # : (Herb::AST::DocumentNode, String, Array[Herb::Warnings::Warning], Array[Herb::Errors::Error], Herb::ParserOptions, ?Integer?) -> void - # - # @return [ParseResult] a new instance of ParseResult - # - # source://herb//lib/herb/parse_result.rb#15 + # pkg:gem/herb#lib/herb/parse_result.rb:15 + sig do + params( + value: ::Herb::AST::DocumentNode, + source: ::String, + warnings: T::Array[::Herb::Warnings::Warning], + errors: T::Array[::Herb::Errors::Error], + options: ::Herb::ParserOptions, + error_count: T.nilable(::Integer) + ).void + end def initialize(value, source, warnings, errors, options, error_count = T.unsafe(nil)); end - # : Integer? - # - # source://herb//lib/herb/parse_result.rb#12 + # pkg:gem/herb#lib/herb/parse_result.rb:12 def error_count; end - # : () -> Array[Herb::Errors::Error] - # - # source://herb//lib/herb/parse_result.rb#30 + # pkg:gem/herb#lib/herb/parse_result.rb:30 + sig { returns(T::Array[::Herb::Errors::Error]) } def errors; end - # : (Herb::Position) -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/parse_result.rb#47 + # pkg:gem/herb#lib/herb/parse_result.rb:47 + sig { params(position: ::Herb::Position).returns(T::Boolean) } def locatable?(position); end - # : (Herb::Position) -> Herb::Locate::Result? - # - # source://herb//lib/herb/parse_result.rb#42 + # pkg:gem/herb#lib/herb/parse_result.rb:42 + sig { params(position: ::Herb::Position).returns(T.nilable(::Herb::Locate::Result)) } def locate(position); end - # : Herb::ParserOptions - # - # source://herb//lib/herb/parse_result.rb#11 + # pkg:gem/herb#lib/herb/parse_result.rb:11 def options; end - # : () -> String - # - # source://herb//lib/herb/parse_result.rb#37 + # pkg:gem/herb#lib/herb/parse_result.rb:37 + sig { returns(::String) } def pretty_errors; end - # : Herb::AST::DocumentNode - # - # source://herb//lib/herb/parse_result.rb#10 + # pkg:gem/herb#lib/herb/parse_result.rb:10 def value; end - # : (Visitor) -> void - # - # source://herb//lib/herb/parse_result.rb#52 + # pkg:gem/herb#lib/herb/parse_result.rb:52 + sig { params(visitor: ::Herb::Visitor).void } def visit(visitor); end end -# source://herb//lib/herb/parser_options.rb#8 +# pkg:gem/herb#lib/herb/parser_options.rb:8 class Herb::ParserOptions - # : (?action_view_helpers: bool, ?analyze: bool, ?arena_stats: bool, ?dot_notation_tags: bool, ?erb_openers: Array[String], ?herb_directives: bool, ?html: bool, ?iteration_nodes: bool, ?max_errors: Integer?, ?prism_nodes: bool, ?prism_nodes_deep: bool, ?prism_program: bool, ?render_nodes: bool, ?strict: bool, ?strict_locals: bool, ?timeout: Numeric, ?track_locations: bool, ?track_whitespace: bool, ?transform_conditionals: bool) -> void - # - # @return [ParserOptions] a new instance of ParserOptions - # - # source://herb//lib/herb/parser_options.rb#49 + # pkg:gem/herb#lib/herb/parser_options.rb:49 + sig do + params( + action_view_helpers: T::Boolean, + analyze: T::Boolean, + arena_stats: T::Boolean, + dot_notation_tags: T::Boolean, + erb_openers: T::Array[::String], + herb_directives: T::Boolean, + html: T::Boolean, + iteration_nodes: T::Boolean, + max_errors: T.nilable(::Integer), + prism_nodes: T::Boolean, + prism_nodes_deep: T::Boolean, + prism_program: T::Boolean, + render_nodes: T::Boolean, + strict: T::Boolean, + strict_locals: T::Boolean, + timeout: ::Numeric, + track_locations: T::Boolean, + track_whitespace: T::Boolean, + transform_conditionals: T::Boolean + ).void + end def initialize(action_view_helpers: T.unsafe(nil), analyze: T.unsafe(nil), arena_stats: T.unsafe(nil), dot_notation_tags: T.unsafe(nil), erb_openers: T.unsafe(nil), herb_directives: T.unsafe(nil), html: T.unsafe(nil), iteration_nodes: T.unsafe(nil), max_errors: T.unsafe(nil), prism_nodes: T.unsafe(nil), prism_nodes_deep: T.unsafe(nil), prism_program: T.unsafe(nil), render_nodes: T.unsafe(nil), strict: T.unsafe(nil), strict_locals: T.unsafe(nil), timeout: T.unsafe(nil), track_locations: T.unsafe(nil), track_whitespace: T.unsafe(nil), transform_conditionals: T.unsafe(nil)); end - # : bool - # - # source://herb//lib/herb/parser_options.rb#9 + # pkg:gem/herb#lib/herb/parser_options.rb:9 def action_view_helpers; end - # : bool - # - # source://herb//lib/herb/parser_options.rb#10 + # pkg:gem/herb#lib/herb/parser_options.rb:10 def analyze; end - # : bool - # - # source://herb//lib/herb/parser_options.rb#11 + # pkg:gem/herb#lib/herb/parser_options.rb:11 def arena_stats; end - # : bool - # - # source://herb//lib/herb/parser_options.rb#12 + # pkg:gem/herb#lib/herb/parser_options.rb:12 def dot_notation_tags; end - # : Array[String] - # - # source://herb//lib/herb/parser_options.rb#13 + # pkg:gem/herb#lib/herb/parser_options.rb:13 def erb_openers; end - # : bool - # - # source://herb//lib/herb/parser_options.rb#14 + # pkg:gem/herb#lib/herb/parser_options.rb:14 def herb_directives; end - # : bool - # - # source://herb//lib/herb/parser_options.rb#15 + # pkg:gem/herb#lib/herb/parser_options.rb:15 def html; end - # : () -> String - # - # source://herb//lib/herb/parser_options.rb#97 + # pkg:gem/herb#lib/herb/parser_options.rb:97 + sig { returns(::String) } def inspect; end - # : bool - # - # source://herb//lib/herb/parser_options.rb#16 + # pkg:gem/herb#lib/herb/parser_options.rb:16 def iteration_nodes; end - # : Integer? - # - # source://herb//lib/herb/parser_options.rb#17 + # pkg:gem/herb#lib/herb/parser_options.rb:17 def max_errors; end - # : bool - # - # source://herb//lib/herb/parser_options.rb#18 + # pkg:gem/herb#lib/herb/parser_options.rb:18 def prism_nodes; end - # : bool - # - # source://herb//lib/herb/parser_options.rb#19 + # pkg:gem/herb#lib/herb/parser_options.rb:19 def prism_nodes_deep; end - # : bool - # - # source://herb//lib/herb/parser_options.rb#20 + # pkg:gem/herb#lib/herb/parser_options.rb:20 def prism_program; end - # : bool - # - # source://herb//lib/herb/parser_options.rb#21 + # pkg:gem/herb#lib/herb/parser_options.rb:21 def render_nodes; end - # : bool - # - # source://herb//lib/herb/parser_options.rb#22 + # pkg:gem/herb#lib/herb/parser_options.rb:22 def strict; end - # : bool - # - # source://herb//lib/herb/parser_options.rb#23 + # pkg:gem/herb#lib/herb/parser_options.rb:23 def strict_locals; end - # : Numeric - # - # source://herb//lib/herb/parser_options.rb#24 + # pkg:gem/herb#lib/herb/parser_options.rb:24 def timeout; end - # : () -> Hash[Symbol, (bool | Numeric | Array[String] | nil)] - # - # source://herb//lib/herb/parser_options.rb#72 + # pkg:gem/herb#lib/herb/parser_options.rb:72 + sig { returns(T::Hash[::Symbol, T.nilable(T.any(::Numeric, T::Array[::String], T::Boolean))]) } def to_h; end - # : bool - # - # source://herb//lib/herb/parser_options.rb#25 + # pkg:gem/herb#lib/herb/parser_options.rb:25 def track_locations; end - # : bool - # - # source://herb//lib/herb/parser_options.rb#26 + # pkg:gem/herb#lib/herb/parser_options.rb:26 def track_whitespace; end - # : bool - # - # source://herb//lib/herb/parser_options.rb#27 + # pkg:gem/herb#lib/herb/parser_options.rb:27 def transform_conditionals; end end -# : bool -# -# source://herb//lib/herb/parser_options.rb#29 +# pkg:gem/herb#lib/herb/parser_options.rb:29 Herb::ParserOptions::DEFAULT_ACTION_VIEW_HELPERS = T.let(T.unsafe(nil), FalseClass) -# : bool -# -# source://herb//lib/herb/parser_options.rb#30 +# pkg:gem/herb#lib/herb/parser_options.rb:30 Herb::ParserOptions::DEFAULT_ANALYZE = T.let(T.unsafe(nil), TrueClass) -# : bool -# -# source://herb//lib/herb/parser_options.rb#31 +# pkg:gem/herb#lib/herb/parser_options.rb:31 Herb::ParserOptions::DEFAULT_CAPTURE_ARENA_STATS = T.let(T.unsafe(nil), FalseClass) -# : bool -# -# source://herb//lib/herb/parser_options.rb#32 +# pkg:gem/herb#lib/herb/parser_options.rb:32 Herb::ParserOptions::DEFAULT_DOT_NOTATION_TAGS = T.let(T.unsafe(nil), FalseClass) -# : bool -# -# source://herb//lib/herb/parser_options.rb#33 +# pkg:gem/herb#lib/herb/parser_options.rb:33 Herb::ParserOptions::DEFAULT_HERB_DIRECTIVES = T.let(T.unsafe(nil), FalseClass) -# : bool -# -# source://herb//lib/herb/parser_options.rb#34 +# pkg:gem/herb#lib/herb/parser_options.rb:34 Herb::ParserOptions::DEFAULT_HTML = T.let(T.unsafe(nil), TrueClass) -# : bool -# -# source://herb//lib/herb/parser_options.rb#35 +# pkg:gem/herb#lib/herb/parser_options.rb:35 Herb::ParserOptions::DEFAULT_ITERATION_NODES = T.let(T.unsafe(nil), FalseClass) -# : Integer -# -# source://herb//lib/herb/parser_options.rb#36 +# pkg:gem/herb#lib/herb/parser_options.rb:36 Herb::ParserOptions::DEFAULT_MAX_ERRORS = T.let(T.unsafe(nil), Integer) -# : bool -# -# source://herb//lib/herb/parser_options.rb#37 +# pkg:gem/herb#lib/herb/parser_options.rb:37 Herb::ParserOptions::DEFAULT_PRISM_NODES = T.let(T.unsafe(nil), FalseClass) -# : bool -# -# source://herb//lib/herb/parser_options.rb#38 +# pkg:gem/herb#lib/herb/parser_options.rb:38 Herb::ParserOptions::DEFAULT_PRISM_NODES_DEEP = T.let(T.unsafe(nil), FalseClass) -# : bool -# -# source://herb//lib/herb/parser_options.rb#39 +# pkg:gem/herb#lib/herb/parser_options.rb:39 Herb::ParserOptions::DEFAULT_PRISM_PROGRAM = T.let(T.unsafe(nil), FalseClass) -# : bool -# -# source://herb//lib/herb/parser_options.rb#40 +# pkg:gem/herb#lib/herb/parser_options.rb:40 Herb::ParserOptions::DEFAULT_RENDER_NODES = T.let(T.unsafe(nil), FalseClass) -# : bool -# -# source://herb//lib/herb/parser_options.rb#41 +# pkg:gem/herb#lib/herb/parser_options.rb:41 Herb::ParserOptions::DEFAULT_STRICT = T.let(T.unsafe(nil), TrueClass) -# : bool -# -# source://herb//lib/herb/parser_options.rb#42 +# pkg:gem/herb#lib/herb/parser_options.rb:42 Herb::ParserOptions::DEFAULT_STRICT_LOCALS = T.let(T.unsafe(nil), FalseClass) -# : Numeric -# -# source://herb//lib/herb/parser_options.rb#43 +# pkg:gem/herb#lib/herb/parser_options.rb:43 Herb::ParserOptions::DEFAULT_TIMEOUT = T.let(T.unsafe(nil), Integer) -# : bool -# -# source://herb//lib/herb/parser_options.rb#44 +# pkg:gem/herb#lib/herb/parser_options.rb:44 Herb::ParserOptions::DEFAULT_TRACK_LOCATIONS = T.let(T.unsafe(nil), TrueClass) -# : bool -# -# source://herb//lib/herb/parser_options.rb#45 +# pkg:gem/herb#lib/herb/parser_options.rb:45 Herb::ParserOptions::DEFAULT_TRACK_WHITESPACE = T.let(T.unsafe(nil), FalseClass) -# : bool -# -# source://herb//lib/herb/parser_options.rb#46 +# pkg:gem/herb#lib/herb/parser_options.rb:46 Herb::ParserOptions::DEFAULT_TRANSFORM_CONDITIONALS = T.let(T.unsafe(nil), FalseClass) -# : type serialized_position = { line: Integer, column: Integer } -# -# source://herb//lib/herb/position.rb#6 +# pkg:gem/herb#lib/herb/position.rb:6 class Herb::Position include ::Comparable - # : (Integer, Integer) -> void - # - # @return [Position] a new instance of Position - # - # source://herb//lib/herb/position.rb#13 + # pkg:gem/herb#lib/herb/position.rb:13 + sig { params(line: ::Integer, column: ::Integer).void } def initialize(line, column); end - # : (untyped) -> Integer? - # - # source://herb//lib/herb/position.rb#34 + # pkg:gem/herb#lib/herb/position.rb:34 + sig { params(other: T.untyped).returns(T.nilable(::Integer)) } def <=>(other); end - # : Integer - # - # source://herb//lib/herb/position.rb#10 + # pkg:gem/herb#lib/herb/position.rb:10 def column; end - # : () -> String - # - # source://herb//lib/herb/position.rb#61 + # pkg:gem/herb#lib/herb/position.rb:61 + sig { returns(::String) } def inspect; end - # : Integer - # - # source://herb//lib/herb/position.rb#9 + # pkg:gem/herb#lib/herb/position.rb:9 def line; end - # : () -> serialized_position - # - # source://herb//lib/herb/position.rb#41 + # pkg:gem/herb#lib/herb/position.rb:41 + sig { returns({line: ::Integer, column: ::Integer}) } def to_hash; end - # : (?untyped) -> String - # - # source://herb//lib/herb/position.rb#51 + # pkg:gem/herb#lib/herb/position.rb:51 + sig { params(state: T.untyped).returns(::String) } def to_json(state = T.unsafe(nil)); end - # : () -> serialized_position - # - # source://herb//lib/herb/position.rb#46 + # pkg:gem/herb#lib/herb/position.rb:46 + sig { returns({line: ::Integer, column: ::Integer}) } def to_one_based; end - # : () -> String - # - # source://herb//lib/herb/position.rb#56 + # pkg:gem/herb#lib/herb/position.rb:56 + sig { returns(::String) } def tree_inspect; end class << self - # : (Integer, Integer) -> Position - # - # source://herb//lib/herb/position.rb#19 + # pkg:gem/herb#lib/herb/position.rb:19 + sig { params(line: ::Integer, column: ::Integer).returns(::Herb::Position) } def [](line, column); end - # : (Integer, Integer) -> Position - # - # source://herb//lib/herb/position.rb#24 + # pkg:gem/herb#lib/herb/position.rb:24 + sig { params(line: ::Integer, column: ::Integer).returns(::Herb::Position) } def from(line, column); end - # : () -> Position - # - # source://herb//lib/herb/position.rb#29 + # pkg:gem/herb#lib/herb/position.rb:29 + sig { returns(::Herb::Position) } def zero; end end end -# source://herb//lib/herb/prism_inspect.rb#4 +# pkg:gem/herb#lib/herb/prism_inspect.rb:4 module Herb::PrismInspect class << self - # : (Prism::Node, String, String) -> String - # - # source://herb//lib/herb/prism_inspect.rb#29 + # pkg:gem/herb#lib/herb/prism_inspect.rb:29 def inspect_prism_node(node, source, prefix); end - # : (String, String, String) -> String - # - # source://herb//lib/herb/prism_inspect.rb#9 + # pkg:gem/herb#lib/herb/prism_inspect.rb:9 def inspect_prism_serialized(serialized_bytes, source, prefix); end private - # : (untyped) -> Array[[Symbol, untyped]] - # - # source://herb//lib/herb/prism_inspect.rb#107 + # pkg:gem/herb#lib/herb/prism_inspect.rb:107 def display_fields(node); end - # : (Prism::Location) -> String - # - # source://herb//lib/herb/prism_inspect.rb#112 + # pkg:gem/herb#lib/herb/prism_inspect.rb:112 def format_location(location); end - # : (Symbol, Array[untyped], String, String, String, String) -> String - # - # source://herb//lib/herb/prism_inspect.rb#81 + # pkg:gem/herb#lib/herb/prism_inspect.rb:81 def inspect_array_field(name, value, source, prefix, symbol, child_prefix); end - # : (Symbol, untyped, String, String, String, String) -> String - # - # source://herb//lib/herb/prism_inspect.rb#50 + # pkg:gem/herb#lib/herb/prism_inspect.rb:50 def inspect_field(name, value, source, prefix, symbol, child_prefix); end - # : (Symbol, Prism::Node, String, String, String, String) -> String - # - # source://herb//lib/herb/prism_inspect.rb#70 + # pkg:gem/herb#lib/herb/prism_inspect.rb:70 def inspect_node_field(name, value, source, prefix, symbol, child_prefix); end end end -# source://herb//lib/herb/prism_inspect.rb#5 +# pkg:gem/herb#lib/herb/prism_inspect.rb:5 Herb::PrismInspect::SKIP_FIELDS = T.let(T.unsafe(nil), Array) -# : type serialized_range = [Integer, Integer] -# -# source://herb//lib/herb/range.rb#6 +# pkg:gem/herb#lib/herb/range.rb:6 class Herb::Range - # : (Integer, Integer) -> void - # - # @return [Range] a new instance of Range - # - # source://herb//lib/herb/range.rb#11 + # pkg:gem/herb#lib/herb/range.rb:11 + sig { params(from: ::Integer, to: ::Integer).void } def initialize(from, to); end - # : Integer - # - # source://herb//lib/herb/range.rb#7 + # pkg:gem/herb#lib/herb/range.rb:7 def from; end - # : () -> String - # - # source://herb//lib/herb/range.rb#47 + # pkg:gem/herb#lib/herb/range.rb:47 + sig { returns(::String) } def inspect; end - # : Integer - # - # source://herb//lib/herb/range.rb#8 + # pkg:gem/herb#lib/herb/range.rb:8 def to; end - # : () -> serialized_range - # - # source://herb//lib/herb/range.rb#32 + # pkg:gem/herb#lib/herb/range.rb:32 + sig { returns([::Integer, ::Integer]) } def to_a; end - # : (?untyped) -> String - # - # source://herb//lib/herb/range.rb#37 + # pkg:gem/herb#lib/herb/range.rb:37 + sig { params(state: T.untyped).returns(::String) } def to_json(state = T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/range.rb#52 + # pkg:gem/herb#lib/herb/range.rb:52 + sig { returns(::String) } def to_s; end - # : () -> String - # - # source://herb//lib/herb/range.rb#42 + # pkg:gem/herb#lib/herb/range.rb:42 + sig { returns(::String) } def tree_inspect; end class << self - # : (Integer, Integer) -> Range - # - # source://herb//lib/herb/range.rb#17 + # pkg:gem/herb#lib/herb/range.rb:17 + sig { params(from: ::Integer, to: ::Integer).returns(::Herb::Range) } def [](from, to); end - # : (Integer, Integer) -> Range - # - # source://herb//lib/herb/range.rb#22 + # pkg:gem/herb#lib/herb/range.rb:22 + sig { params(from: ::Integer, to: ::Integer).returns(::Herb::Range) } def from(from, to); end - # : () -> Range - # - # source://herb//lib/herb/range.rb#27 + # pkg:gem/herb#lib/herb/range.rb:27 + sig { returns(::Herb::Range) } def zero; end end end -# source://herb//lib/herb/result.rb#5 +# pkg:gem/herb#lib/herb/result.rb:5 class Herb::Result - # : (String, Array[Herb::Warnings::Warning], Array[Herb::Errors::Error]) -> void - # - # @return [Result] a new instance of Result - # - # source://herb//lib/herb/result.rb#11 + # pkg:gem/herb#lib/herb/result.rb:11 + sig do + params( + source: ::String, + warnings: T::Array[::Herb::Warnings::Warning], + errors: T::Array[::Herb::Errors::Error] + ).void + end def initialize(source, warnings, errors); end - # : Array[Herb::Errors::Error] - # - # source://herb//lib/herb/result.rb#8 + # pkg:gem/herb#lib/herb/result.rb:8 def errors; end - # : () -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/result.rb#23 + # pkg:gem/herb#lib/herb/result.rb:23 + sig { returns(T::Boolean) } def failed?; end - # : String - # - # source://herb//lib/herb/result.rb#6 + # pkg:gem/herb#lib/herb/result.rb:6 def source; end - # : () -> bool - # - # @return [Boolean] - # - # source://herb//lib/herb/result.rb#18 + # pkg:gem/herb#lib/herb/result.rb:18 + sig { returns(T::Boolean) } def success?; end - # : Array[Herb::Warnings::Warning] - # - # source://herb//lib/herb/result.rb#7 + # pkg:gem/herb#lib/herb/result.rb:7 def warnings; end end -# : type serialized_token = { -# | value: String, -# | range: serialized_range?, -# | location: serialized_location?, -# | type: String -# | } -# -# source://herb//lib/herb/token.rb#11 +# pkg:gem/herb#lib/herb/errors.rb:8 +Herb::SerializedError = T.type_alias { {type: ::String, location: T.nilable({start: {line: ::Integer, column: ::Integer}, end: {line: ::Integer, column: ::Integer}}), message: ::String} } + +# pkg:gem/herb#lib/herb/location.rb:5 +Herb::SerializedLocation = T.type_alias { {start: {line: ::Integer, column: ::Integer}, end: {line: ::Integer, column: ::Integer}} } + +# pkg:gem/herb#lib/herb/ast/node.rb:7 +Herb::SerializedNode = T.type_alias { {type: ::String, location: T.nilable({start: {line: ::Integer, column: ::Integer}, end: {line: ::Integer, column: ::Integer}}), errors: T::Array[{type: ::String, location: T.nilable({start: {line: ::Integer, column: ::Integer}, end: {line: ::Integer, column: ::Integer}}), message: ::String}]} } + +# pkg:gem/herb#lib/herb/position.rb:5 +Herb::SerializedPosition = T.type_alias { {line: ::Integer, column: ::Integer} } + +# pkg:gem/herb#lib/herb/range.rb:5 +Herb::SerializedRange = T.type_alias { [::Integer, ::Integer] } + +# pkg:gem/herb#lib/herb/token.rb:5 +Herb::SerializedToken = T.type_alias { {value: ::String, range: T.nilable([::Integer, ::Integer]), location: T.nilable({start: {line: ::Integer, column: ::Integer}, end: {line: ::Integer, column: ::Integer}}), type: ::String} } + +# pkg:gem/herb#lib/herb/token.rb:6 class Herb::Token include ::Herb::Colors - # : (String, Range, Location, String) -> void - # - # @return [Token] a new instance of Token - # - # source://herb//lib/herb/token.rb#25 + # pkg:gem/herb#lib/herb/token.rb:20 + sig { params(value: ::String, range: ::Herb::Range, location: ::Herb::Location, type: ::String).void } def initialize(value, range, location, type); end - # : (Position?) -> String - # - # source://herb//lib/herb/token.rb#71 + # pkg:gem/herb#lib/herb/token.rb:66 + sig { params(position: T.nilable(::Herb::Position)).returns(::String) } def colorize_position(position); end - # : () -> String - # - # source://herb//lib/herb/token.rb#64 + # pkg:gem/herb#lib/herb/token.rb:59 + sig { returns(::String) } def colorize_range; end - # : () -> String - # - # source://herb//lib/herb/token.rb#78 + # pkg:gem/herb#lib/herb/token.rb:73 + sig { returns(::String) } def inspect; end - # : Location - # - # source://herb//lib/herb/token.rb#16 + # pkg:gem/herb#lib/herb/token.rb:11 def location; end - # : Range - # - # source://herb//lib/herb/token.rb#15 + # pkg:gem/herb#lib/herb/token.rb:10 def range; end - # : () -> serialized_token - # - # source://herb//lib/herb/token.rb#33 + # pkg:gem/herb#lib/herb/token.rb:28 + sig do + returns({value: ::String, range: T.nilable([::Integer, ::Integer]), location: T.nilable({start: {line: ::Integer, column: ::Integer}, end: {line: ::Integer, column: ::Integer}}), type: ::String}) + end def to_hash; end - # : (?untyped) -> String - # - # source://herb//lib/herb/token.rb#43 + # pkg:gem/herb#lib/herb/token.rb:38 + sig { params(state: T.untyped).returns(::String) } def to_json(state = T.unsafe(nil)); end - # : () -> String - # - # source://herb//lib/herb/token.rb#48 + # pkg:gem/herb#lib/herb/token.rb:43 + sig { returns(::String) } def tree_inspect; end - # : String - # - # source://herb//lib/herb/token.rb#17 + # pkg:gem/herb#lib/herb/token.rb:12 def type; end - # : String - # - # source://herb//lib/herb/token.rb#14 + # pkg:gem/herb#lib/herb/token.rb:9 def value; end - # : () -> String - # - # source://herb//lib/herb/token.rb#55 + # pkg:gem/herb#lib/herb/token.rb:50 + sig { returns(::String) } def value_inspect; end class << self - # : (String | Symbol, String, ?location: Location, ?range: Range) -> Token - # - # source://herb//lib/herb/token.rb#20 + # pkg:gem/herb#lib/herb/token.rb:15 + sig do + params( + type: T.any(::String, ::Symbol), + value: ::String, + location: ::Herb::Location, + range: ::Herb::Range + ).returns(::Herb::Token) + end def from(type, value, location: T.unsafe(nil), range: T.unsafe(nil)); end end end -# source://herb//lib/herb/token_list.rb#7 +# pkg:gem/herb#lib/herb/token_list.rb:7 class Herb::TokenList < ::SimpleDelegator - # : () -> String - # - # source://herb//lib/herb/token_list.rb#9 + # pkg:gem/herb#lib/herb/token_list.rb:9 + sig { returns(::String) } def inspect; end private - # : () -> Array[Token] - # - # source://herb//lib/herb/token_list.rb#16 + # pkg:gem/herb#lib/herb/token_list.rb:16 + sig { returns(T::Array[::Herb::Token]) } def items; end end -# source://herb//lib/herb/version.rb#5 +# pkg:gem/herb#lib/herb/version.rb:5 Herb::VERSION = T.let(T.unsafe(nil), String) -# source://herb//lib/herb/visitor/parser_option_requirements.rb#5 +# pkg:gem/herb#lib/herb/visitor/parser_option_requirements.rb:5 class Herb::Visitor include ::Herb::AST::Helpers include ::Herb::Visitor::ParserOptionRequirements extend ::Herb::Visitor::ParserOptionRequirements::ClassMethods - # : (Herb::AST::Node?) -> void - # - # source://herb//lib/herb/visitor.rb#18 + # pkg:gem/herb#lib/herb/visitor.rb:18 + sig { params(node: T.nilable(::Herb::AST::Node)).void } def visit(node); end - # : (Array[Herb::AST::Node?]) -> void - # - # source://herb//lib/herb/visitor.rb#23 + # pkg:gem/herb#lib/herb/visitor.rb:23 + sig { params(nodes: T::Array[T.nilable(::Herb::AST::Node)]).void } def visit_all(nodes); end - # : (Herb::AST::CDATANode) -> void - # - # source://herb//lib/herb/visitor.rb#164 + # pkg:gem/herb#lib/herb/visitor.rb:164 + sig { params(node: ::Herb::AST::CDATANode).void } def visit_cdata_node(node); end - # : (Herb::AST::Node) -> void - # - # source://herb//lib/herb/visitor.rb#28 + # pkg:gem/herb#lib/herb/visitor.rb:28 + sig { params(node: ::Herb::AST::Node).void } def visit_child_nodes(node); end - # : (Herb::AST::DocumentNode) -> void - # - # source://herb//lib/herb/visitor.rb#43 + # pkg:gem/herb#lib/herb/visitor.rb:43 + sig { params(node: ::Herb::AST::DocumentNode).void } def visit_document_node(node); end - # : (Herb::AST::ERBBeginNode) -> void - # - # source://herb//lib/herb/visitor.rb#274 + # pkg:gem/herb#lib/herb/visitor.rb:274 + sig { params(node: ::Herb::AST::ERBBeginNode).void } def visit_erb_begin_node(node); end - # : (Herb::AST::ERBBlockNode) -> void - # - # source://herb//lib/herb/visitor.rb#204 + # pkg:gem/herb#lib/herb/visitor.rb:204 + sig { params(node: ::Herb::AST::ERBBlockNode).void } def visit_erb_block_node(node); end - # : (Herb::AST::ERBCaseMatchNode) -> void - # - # source://herb//lib/herb/visitor.rb#232 + # pkg:gem/herb#lib/herb/visitor.rb:232 + sig { params(node: ::Herb::AST::ERBCaseMatchNode).void } def visit_erb_case_match_node(node); end - # : (Herb::AST::ERBCaseNode) -> void - # - # source://herb//lib/herb/visitor.rb#225 + # pkg:gem/herb#lib/herb/visitor.rb:225 + sig { params(node: ::Herb::AST::ERBCaseNode).void } def visit_erb_case_node(node); end - # : (Herb::AST::ERBCommentNode) -> void - # - # source://herb//lib/herb/visitor.rb#354 + # pkg:gem/herb#lib/herb/visitor.rb:354 + sig { params(node: ::Herb::AST::ERBCommentNode).void } def visit_erb_comment_node(node); end - # : (Herb::AST::ERBContentNode) -> void - # - # source://herb//lib/herb/visitor.rb#176 + # pkg:gem/herb#lib/herb/visitor.rb:176 + sig { params(node: ::Herb::AST::ERBContentNode).void } def visit_erb_content_node(node); end - # : (Herb::AST::ERBElseNode) -> void - # - # source://herb//lib/herb/visitor.rb#190 + # pkg:gem/herb#lib/herb/visitor.rb:190 + sig { params(node: ::Herb::AST::ERBElseNode).void } def visit_erb_else_node(node); end - # : (Herb::AST::ERBEndNode) -> void - # - # source://herb//lib/herb/visitor.rb#183 + # pkg:gem/herb#lib/herb/visitor.rb:183 + sig { params(node: ::Herb::AST::ERBEndNode).void } def visit_erb_end_node(node); end - # : (Herb::AST::ERBEnsureNode) -> void - # - # source://herb//lib/herb/visitor.rb#267 + # pkg:gem/herb#lib/herb/visitor.rb:267 + sig { params(node: ::Herb::AST::ERBEnsureNode).void } def visit_erb_ensure_node(node); end - # : (Herb::AST::ERBForNode) -> void - # - # source://herb//lib/herb/visitor.rb#253 + # pkg:gem/herb#lib/herb/visitor.rb:253 + sig { params(node: ::Herb::AST::ERBForNode).void } def visit_erb_for_node(node); end - # : (Herb::AST::ERBIfNode) -> void - # - # source://herb//lib/herb/visitor.rb#197 + # pkg:gem/herb#lib/herb/visitor.rb:197 + sig { params(node: ::Herb::AST::ERBIfNode).void } def visit_erb_if_node(node); end - # : (Herb::AST::ERBInNode) -> void - # - # source://herb//lib/herb/visitor.rb#327 + # pkg:gem/herb#lib/herb/visitor.rb:327 + sig { params(node: ::Herb::AST::ERBInNode).void } def visit_erb_in_node(node); end - # : (Herb::AST::ERBIterationBlockNode) -> void - # - # source://herb//lib/herb/visitor.rb#211 + # pkg:gem/herb#lib/herb/visitor.rb:211 + sig { params(node: ::Herb::AST::ERBIterationBlockNode).void } def visit_erb_iteration_block_node(node); end - # : (Herb::AST::Node) -> void - # - # source://herb//lib/herb/visitor.rb#38 + # pkg:gem/herb#lib/herb/visitor.rb:38 + sig { params(node: ::Herb::AST::Node).void } def visit_erb_node(node); end - # : (Herb::AST::ERBOpenTagNode) -> void - # - # source://herb//lib/herb/visitor.rb#127 + # pkg:gem/herb#lib/herb/visitor.rb:127 + sig { params(node: ::Herb::AST::ERBOpenTagNode).void } def visit_erb_open_tag_node(node); end - # : (Herb::AST::ERBRenderNode) -> void - # - # source://herb//lib/herb/visitor.rb#300 + # pkg:gem/herb#lib/herb/visitor.rb:300 + sig { params(node: ::Herb::AST::ERBRenderNode).void } def visit_erb_render_node(node); end - # : (Herb::AST::ERBRescueNode) -> void - # - # source://herb//lib/herb/visitor.rb#260 + # pkg:gem/herb#lib/herb/visitor.rb:260 + sig { params(node: ::Herb::AST::ERBRescueNode).void } def visit_erb_rescue_node(node); end - # : (Herb::AST::ERBStrictLocalsNode) -> void - # - # source://herb//lib/herb/visitor.rb#313 + # pkg:gem/herb#lib/herb/visitor.rb:313 + sig { params(node: ::Herb::AST::ERBStrictLocalsNode).void } def visit_erb_strict_locals_node(node); end - # : (Herb::AST::ERBUnlessNode) -> void - # - # source://herb//lib/herb/visitor.rb#281 + # pkg:gem/herb#lib/herb/visitor.rb:281 + sig { params(node: ::Herb::AST::ERBUnlessNode).void } def visit_erb_unless_node(node); end - # : (Herb::AST::ERBUntilNode) -> void - # - # source://herb//lib/herb/visitor.rb#246 + # pkg:gem/herb#lib/herb/visitor.rb:246 + sig { params(node: ::Herb::AST::ERBUntilNode).void } def visit_erb_until_node(node); end - # : (Herb::AST::ERBWhenNode) -> void - # - # source://herb//lib/herb/visitor.rb#218 + # pkg:gem/herb#lib/herb/visitor.rb:218 + sig { params(node: ::Herb::AST::ERBWhenNode).void } def visit_erb_when_node(node); end - # : (Herb::AST::ERBWhileNode) -> void - # - # source://herb//lib/herb/visitor.rb#239 + # pkg:gem/herb#lib/herb/visitor.rb:239 + sig { params(node: ::Herb::AST::ERBWhileNode).void } def visit_erb_while_node(node); end - # : (Herb::AST::ERBYieldNode) -> void - # - # source://herb//lib/herb/visitor.rb#320 + # pkg:gem/herb#lib/herb/visitor.rb:320 + sig { params(node: ::Herb::AST::ERBYieldNode).void } def visit_erb_yield_node(node); end - # : (Herb::AST::HerbDirectiveNode) -> void - # - # source://herb//lib/herb/visitor.rb#334 + # pkg:gem/herb#lib/herb/visitor.rb:334 + sig { params(node: ::Herb::AST::HerbDirectiveNode).void } def visit_herb_directive_node(node); end - # : (Herb::AST::HerbStateDeclarationNode) -> void - # - # source://herb//lib/herb/visitor.rb#341 + # pkg:gem/herb#lib/herb/visitor.rb:341 + sig { params(node: ::Herb::AST::HerbStateDeclarationNode).void } def visit_herb_state_declaration_node(node); end - # : (Herb::AST::HerbStateDirectiveNode) -> void - # - # source://herb//lib/herb/visitor.rb#347 + # pkg:gem/herb#lib/herb/visitor.rb:347 + sig { params(node: ::Herb::AST::HerbStateDirectiveNode).void } def visit_herb_state_directive_node(node); end - # : (Herb::AST::HTMLAttributeNameNode) -> void - # - # source://herb//lib/herb/visitor.rb#103 + # pkg:gem/herb#lib/herb/visitor.rb:103 + sig { params(node: ::Herb::AST::HTMLAttributeNameNode).void } def visit_html_attribute_name_node(node); end - # : (Herb::AST::HTMLAttributeNode) -> void - # - # source://herb//lib/herb/visitor.rb#109 + # pkg:gem/herb#lib/herb/visitor.rb:109 + sig { params(node: ::Herb::AST::HTMLAttributeNode).void } def visit_html_attribute_node(node); end - # : (Herb::AST::HTMLAttributeValueNode) -> void - # - # source://herb//lib/herb/visitor.rb#97 + # pkg:gem/herb#lib/herb/visitor.rb:97 + sig { params(node: ::Herb::AST::HTMLAttributeValueNode).void } def visit_html_attribute_value_node(node); end - # : (Herb::AST::HTMLCloseTagNode) -> void - # - # source://herb//lib/herb/visitor.rb#67 + # pkg:gem/herb#lib/herb/visitor.rb:67 + sig { params(node: ::Herb::AST::HTMLCloseTagNode).void } def visit_html_close_tag_node(node); end - # : (Herb::AST::HTMLCommentNode) -> void - # - # source://herb//lib/herb/visitor.rb#140 + # pkg:gem/herb#lib/herb/visitor.rb:140 + sig { params(node: ::Herb::AST::HTMLCommentNode).void } def visit_html_comment_node(node); end - # : (Herb::AST::HTMLConditionalElementNode) -> void - # - # source://herb//lib/herb/visitor.rb#91 + # pkg:gem/herb#lib/herb/visitor.rb:91 + sig { params(node: ::Herb::AST::HTMLConditionalElementNode).void } def visit_html_conditional_element_node(node); end - # : (Herb::AST::HTMLConditionalOpenTagNode) -> void - # - # source://herb//lib/herb/visitor.rb#61 + # pkg:gem/herb#lib/herb/visitor.rb:61 + sig { params(node: ::Herb::AST::HTMLConditionalOpenTagNode).void } def visit_html_conditional_open_tag_node(node); end - # : (Herb::AST::HTMLDoctypeNode) -> void - # - # source://herb//lib/herb/visitor.rb#146 + # pkg:gem/herb#lib/herb/visitor.rb:146 + sig { params(node: ::Herb::AST::HTMLDoctypeNode).void } def visit_html_doctype_node(node); end - # : (Herb::AST::HTMLElementNode) -> void - # - # source://herb//lib/herb/visitor.rb#85 + # pkg:gem/herb#lib/herb/visitor.rb:85 + sig { params(node: ::Herb::AST::HTMLElementNode).void } def visit_html_element_node(node); end - # : (Herb::AST::HTMLOmittedCloseTagNode) -> void - # - # source://herb//lib/herb/visitor.rb#73 + # pkg:gem/herb#lib/herb/visitor.rb:73 + sig { params(node: ::Herb::AST::HTMLOmittedCloseTagNode).void } def visit_html_omitted_close_tag_node(node); end - # : (Herb::AST::HTMLOpenTagNode) -> void - # - # source://herb//lib/herb/visitor.rb#55 + # pkg:gem/herb#lib/herb/visitor.rb:55 + sig { params(node: ::Herb::AST::HTMLOpenTagNode).void } def visit_html_open_tag_node(node); end - # : (Herb::AST::HTMLTextNode) -> void - # - # source://herb//lib/herb/visitor.rb#134 + # pkg:gem/herb#lib/herb/visitor.rb:134 + sig { params(node: ::Herb::AST::HTMLTextNode).void } def visit_html_text_node(node); end - # : (Herb::AST::HTMLVirtualCloseTagNode) -> void - # - # source://herb//lib/herb/visitor.rb#79 + # pkg:gem/herb#lib/herb/visitor.rb:79 + sig { params(node: ::Herb::AST::HTMLVirtualCloseTagNode).void } def visit_html_virtual_close_tag_node(node); end - # : (Herb::AST::LiteralNode) -> void - # - # source://herb//lib/herb/visitor.rb#49 + # pkg:gem/herb#lib/herb/visitor.rb:49 + sig { params(node: ::Herb::AST::LiteralNode).void } def visit_literal_node(node); end - # : (Herb::AST::Node) -> void - # - # source://herb//lib/herb/visitor.rb#33 + # pkg:gem/herb#lib/herb/visitor.rb:33 + sig { params(node: ::Herb::AST::Node).void } def visit_node(node); end - # : (Herb::AST::RubyHTMLAttributesSplatNode) -> void - # - # source://herb//lib/herb/visitor.rb#121 + # pkg:gem/herb#lib/herb/visitor.rb:121 + sig { params(node: ::Herb::AST::RubyHTMLAttributesSplatNode).void } def visit_ruby_html_attributes_splat_node(node); end - # : (Herb::AST::RubyLiteralNode) -> void - # - # source://herb//lib/herb/visitor.rb#115 + # pkg:gem/herb#lib/herb/visitor.rb:115 + sig { params(node: ::Herb::AST::RubyLiteralNode).void } def visit_ruby_literal_node(node); end - # : (Herb::AST::RubyParameterNode) -> void - # - # source://herb//lib/herb/visitor.rb#307 + # pkg:gem/herb#lib/herb/visitor.rb:307 + sig { params(node: ::Herb::AST::RubyParameterNode).void } def visit_ruby_parameter_node(node); end - # : (Herb::AST::RubyRenderKeywordsNode) -> void - # - # source://herb//lib/herb/visitor.rb#294 + # pkg:gem/herb#lib/herb/visitor.rb:294 + sig { params(node: ::Herb::AST::RubyRenderKeywordsNode).void } def visit_ruby_render_keywords_node(node); end - # : (Herb::AST::RubyRenderLocalNode) -> void - # - # source://herb//lib/herb/visitor.rb#288 + # pkg:gem/herb#lib/herb/visitor.rb:288 + sig { params(node: ::Herb::AST::RubyRenderLocalNode).void } def visit_ruby_render_local_node(node); end - # : (Herb::AST::WhitespaceNode) -> void - # - # source://herb//lib/herb/visitor.rb#170 + # pkg:gem/herb#lib/herb/visitor.rb:170 + sig { params(node: ::Herb::AST::WhitespaceNode).void } def visit_whitespace_node(node); end - # : (Herb::AST::XMLDeclarationNode) -> void - # - # source://herb//lib/herb/visitor.rb#152 + # pkg:gem/herb#lib/herb/visitor.rb:152 + sig { params(node: ::Herb::AST::XMLDeclarationNode).void } def visit_xml_declaration_node(node); end - # : (Herb::AST::XMLProcessingInstructionNode) -> void - # - # source://herb//lib/herb/visitor.rb#158 + # pkg:gem/herb#lib/herb/visitor.rb:158 + sig { params(node: ::Herb::AST::XMLProcessingInstructionNode).void } def visit_xml_processing_instruction_node(node); end end @@ -8474,172 +7417,139 @@ end # `Herb::Visitor` includes this, so every visitor has it. Anything else that is passed to # `Herb::Engine` as a visitor can include it too. # -# source://herb//lib/herb/visitor/parser_option_requirements.rb#22 +# pkg:gem/herb#lib/herb/visitor/parser_option_requirements.rb:22 module Herb::Visitor::ParserOptionRequirements mixes_in_class_methods ::Herb::Visitor::ParserOptionRequirements::ClassMethods - # : () -> Hash[Symbol, untyped] - # - # source://herb//lib/herb/visitor/parser_option_requirements.rb#134 + # pkg:gem/herb#lib/herb/visitor/parser_option_requirements.rb:134 + sig { returns(T::Hash[::Symbol, T.untyped]) } def recommended_parser_options; end - # : () -> Hash[Symbol, untyped] - # - # source://herb//lib/herb/visitor/parser_option_requirements.rb#129 + # pkg:gem/herb#lib/herb/visitor/parser_option_requirements.rb:129 + sig { returns(T::Hash[::Symbol, T.untyped]) } def required_parser_options; end private - # : () -> untyped - # - # source://herb//lib/herb/visitor/parser_option_requirements.rb#146 + # pkg:gem/herb#lib/herb/visitor/parser_option_requirements.rb:146 + sig { returns(T.untyped) } def declaring_class; end class << self - # : (untyped) -> untyped - # - # source://herb//lib/herb/visitor/parser_option_requirements.rb#139 + # pkg:gem/herb#lib/herb/visitor/parser_option_requirements.rb:139 + sig { params(object: T.untyped).returns(T.untyped) } def class_of(object); end - # : (untyped) -> void - # - # source://herb//lib/herb/visitor/parser_option_requirements.rb#24 + # pkg:gem/herb#lib/herb/visitor/parser_option_requirements.rb:24 + sig { params(base: T.untyped).void } def included(base); end end end -# source://herb//lib/herb/visitor/parser_option_requirements.rb#30 +# pkg:gem/herb#lib/herb/visitor/parser_option_requirements.rb:30 module Herb::Visitor::ParserOptionRequirements::ClassMethods - # : (untyped) -> void - # - # source://herb//lib/herb/visitor/parser_option_requirements.rb#52 + # pkg:gem/herb#lib/herb/visitor/parser_option_requirements.rb:52 + sig { params(subclass: T.untyped).void } def inherited(subclass); end - # : (Array[untyped], ?Hash[Symbol, untyped]) -> Hash[Symbol, untyped] - # - # source://herb//lib/herb/visitor/parser_option_requirements.rb#60 + # pkg:gem/herb#lib/herb/visitor/parser_option_requirements.rb:60 + sig do + params( + visitors: T::Array[T.untyped], + parser_options: T::Hash[::Symbol, T.untyped] + ).returns(T::Hash[::Symbol, T.untyped]) + end def parser_options_for(visitors, parser_options = T.unsafe(nil)); end - # : (**untyped) -> void - # - # source://herb//lib/herb/visitor/parser_option_requirements.rb#37 + # pkg:gem/herb#lib/herb/visitor/parser_option_requirements.rb:37 + sig { params(options: T.untyped).void } def recommended_parser_option(**options); end - # : () -> Hash[Symbol, untyped] - # - # source://herb//lib/herb/visitor/parser_option_requirements.rb#47 + # pkg:gem/herb#lib/herb/visitor/parser_option_requirements.rb:47 + sig { returns(T::Hash[::Symbol, T.untyped]) } def recommended_parser_options; end - # : (**untyped) -> void - # - # source://herb//lib/herb/visitor/parser_option_requirements.rb#32 + # pkg:gem/herb#lib/herb/visitor/parser_option_requirements.rb:32 + sig { params(options: T.untyped).void } def required_parser_option(**options); end - # : () -> Hash[Symbol, untyped] - # - # source://herb//lib/herb/visitor/parser_option_requirements.rb#42 + # pkg:gem/herb#lib/herb/visitor/parser_option_requirements.rb:42 + sig { returns(T::Hash[::Symbol, T.untyped]) } def required_parser_options; end private - # : (Array[untyped], Hash[Symbol, untyped]) -> void - # - # source://herb//lib/herb/visitor/parser_option_requirements.rb#88 + # pkg:gem/herb#lib/herb/visitor/parser_option_requirements.rb:88 + sig { params(visitors: T::Array[T.untyped], options: T::Hash[::Symbol, T.untyped]).void } def apply_recommended_parser_options(visitors, options); end - # : (Array[untyped], Hash[Symbol, untyped]) -> void - # - # source://herb//lib/herb/visitor/parser_option_requirements.rb#72 + # pkg:gem/herb#lib/herb/visitor/parser_option_requirements.rb:72 + sig { params(visitors: T::Array[T.untyped], options: T::Hash[::Symbol, T.untyped]).void } def apply_required_parser_options(visitors, options); end - # : (Symbol) -> Hash[Symbol, untyped] - # - # source://herb//lib/herb/visitor/parser_option_requirements.rb#105 + # pkg:gem/herb#lib/herb/visitor/parser_option_requirements.rb:105 + sig { params(kind: ::Symbol).returns(T::Hash[::Symbol, T.untyped]) } def declared_parser_options(kind); end - # : (untyped) -> String - # - # source://herb//lib/herb/visitor/parser_option_requirements.rb#123 + # pkg:gem/herb#lib/herb/visitor/parser_option_requirements.rb:123 + sig { params(visitor: T.untyped).returns(::String) } def describe(visitor); end - # : (Array[untyped], Symbol) { (untyped, Symbol, untyped) -> void } -> void - # - # source://herb//lib/herb/visitor/parser_option_requirements.rb#112 + # pkg:gem/herb#lib/herb/visitor/parser_option_requirements.rb:112 def each_declared_parser_option(visitors, reader); end end -# source://herb//lib/herb/warnings.rb#5 +# pkg:gem/herb#lib/herb/warnings.rb:5 module Herb::Warnings; end +# pkg:gem/herb#lib/herb/warnings.rb:6 +Herb::Warnings::SerializedWarning = T.type_alias { {type: ::String, location: T.nilable({start: {line: ::Integer, column: ::Integer}, end: {line: ::Integer, column: ::Integer}}), message: ::String} } + # TODO: move to `config.yml` so they are in line with the way errors are defined and generated. # -# source://herb//lib/herb/warnings.rb#49 +# pkg:gem/herb#lib/herb/warnings.rb:45 class Herb::Warnings::UnkeyedCollectionWarning < ::Herb::Warnings::Warning - # : (Location, ?String?, ?tag_name: String?) -> void - # - # @return [UnkeyedCollectionWarning] a new instance of UnkeyedCollectionWarning - # - # source://herb//lib/herb/warnings.rb#54 + # pkg:gem/herb#lib/herb/warnings.rb:50 + sig { params(location: ::Herb::Location, expression: T.nilable(::String), tag_name: T.nilable(::String)).void } def initialize(location, expression = T.unsafe(nil), tag_name: T.unsafe(nil)); end - # : String? - # - # source://herb//lib/herb/warnings.rb#50 + # pkg:gem/herb#lib/herb/warnings.rb:46 def expression; end - # : String? - # - # source://herb//lib/herb/warnings.rb#51 + # pkg:gem/herb#lib/herb/warnings.rb:47 def tag_name; end end -# : type serialized_warning = { -# | type: String, -# | location: serialized_location?, -# | message: String -# | } -# -# source://herb//lib/herb/warnings.rb#11 +# pkg:gem/herb#lib/herb/warnings.rb:7 class Herb::Warnings::Warning - # : (String, Location, String) -> void - # - # @return [Warning] a new instance of Warning - # - # source://herb//lib/herb/warnings.rb#17 + # pkg:gem/herb#lib/herb/warnings.rb:13 + sig { params(type: ::String, location: ::Herb::Location, message: ::String).void } def initialize(type, location, message); end - # : () -> String - # - # source://herb//lib/herb/warnings.rb#33 + # pkg:gem/herb#lib/herb/warnings.rb:29 + sig { returns(::String) } def class_name; end - # : Location? - # - # source://herb//lib/herb/warnings.rb#13 + # pkg:gem/herb#lib/herb/warnings.rb:9 def location; end - # : String - # - # source://herb//lib/herb/warnings.rb#14 + # pkg:gem/herb#lib/herb/warnings.rb:10 def message; end - # : () -> serialized_warning - # - # source://herb//lib/herb/warnings.rb#24 + # pkg:gem/herb#lib/herb/warnings.rb:20 + sig do + returns({type: ::String, location: T.nilable({start: {line: ::Integer, column: ::Integer}, end: {line: ::Integer, column: ::Integer}}), message: ::String}) + end def to_hash; end - # : (?untyped) -> String - # - # source://herb//lib/herb/warnings.rb#43 + # pkg:gem/herb#lib/herb/warnings.rb:39 + sig { params(state: T.untyped).returns(::String) } def to_json(state = T.unsafe(nil)); end - # : String - # - # source://herb//lib/herb/warnings.rb#12 + # pkg:gem/herb#lib/herb/warnings.rb:8 def type; end - # : () -> String - # - # source://herb//lib/herb/warnings.rb#38 + # pkg:gem/herb#lib/herb/warnings.rb:34 + sig { returns(::String) } def warning_name; end end diff --git a/sorbet/rbi/gems/i18n@1.14.7.rbi b/sorbet/rbi/gems/i18n@1.15.2.rbi similarity index 100% rename from sorbet/rbi/gems/i18n@1.14.7.rbi rename to sorbet/rbi/gems/i18n@1.15.2.rbi diff --git a/sorbet/rbi/gems/io-console@0.8.0.rbi b/sorbet/rbi/gems/io-console@0.9.4.rbi similarity index 100% rename from sorbet/rbi/gems/io-console@0.8.0.rbi rename to sorbet/rbi/gems/io-console@0.9.4.rbi diff --git a/sorbet/rbi/gems/json@2.10.2.rbi b/sorbet/rbi/gems/json@2.10.2.rbi deleted file mode 100644 index 668bb3e..0000000 --- a/sorbet/rbi/gems/json@2.10.2.rbi +++ /dev/null @@ -1,2112 +0,0 @@ -# typed: false - -# 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`. - - -class Array - include ::Enumerable - include ::JSON::Ext::Generator::GeneratorMethods::Array -end - -# Extends any Class to include _json_creatable?_ method. -# -# source://json//lib/json/common.rb#979 -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#984 - def json_creatable?; end -end - -class FalseClass - include ::JSON::Ext::Generator::GeneratorMethods::FalseClass -end - -class Float < ::Numeric - include ::JSON::Ext::Generator::GeneratorMethods::Float -end - -class Hash - include ::Enumerable - include ::JSON::Ext::Generator::GeneratorMethods::Hash -end - -class Integer < ::Numeric - include ::JSON::Ext::Generator::GeneratorMethods::Integer -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) -# -# ====== Escaping Options -# -# Options +script_safe+ (boolean) specifies wether '\u2028', '\u2029' -# and '/' should be escaped as to make the JSON object safe to interpolate in script -# tags. -# -# Options +ascii_only+ (boolean) specifies wether all characters outside the ASCII range -# should be escaped. -# -# ====== 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 = <<~EOT -# Generated JSON: -# Without addition: #{json0} (#{json0.class}) -# With addition: #{json1} (#{json1.class}) -# Parsed JSON: -# Without addition: #{ruby0.inspect} (#{ruby0.class}) -# With addition: #{ruby1.inspect} (#{ruby1.class}) -# EOT -# puts display -# -# This output shows the different results: -# Generated JSON: -# Without addition: "0..2" (String) -# With addition: {"json_class":"Range","a":[0,2,false]} (String) -# Parsed JSON: -# Without addition: "0..2" (String) -# With addition: 0..2 (Range) -# -# The \JSON module includes additions for certain classes. -# You can also craft custom additions. -# See {Custom \JSON Additions}[#module-JSON-label-Custom+JSON+Additions]. -# -# === Built-in Additions -# -# The \JSON module includes additions for certain classes. -# To use an addition, +require+ its source: -# - BigDecimal: 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 = <<~EOT -# Generated JSON: -# Without custom addition: #{json0} (#{json0.class}) -# With custom addition: #{json1} (#{json1.class}) -# Parsed JSON: -# Without custom addition: #{obj0.inspect} (#{obj0.class}) -# With custom addition: #{obj1.inspect} (#{obj1.class}) -# EOT -# puts display -# -# Output: -# -# Generated JSON: -# Without custom addition: "#" (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#3 -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#823 - def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil), kwargs = 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#357 - 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#357 - 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#329 - 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+. - # - # 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. - # If you must use it, use JSON.unsafe_load instead to make it clear. - # - # Since JSON version 2.8.0, `load` emits a deprecation warning when a - # non native type is deserialized, without `create_additions` being explicitly - # enabled, and in JSON version 3.0, `load` will have `create_additions` disabled - # by default. - # - # - 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. - # - 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 = <<~JSON - # { - # "name": "Dave", - # "age" :40, - # "hats": [ - # "Cattleman's", - # "Panama", - # "Tophat" - # ] - # } - # JSON - # - # 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#742 - 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#278 - 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#289 - 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 = <<~JSON - # { - # "name": "Dave", - # "age" :40, - # "hats": [ - # "Cattleman's", - # "Panama", - # "Tophat" - # ] - # } - # JSON - # 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#247 - 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#262 - 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#402 - 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#402 - 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#768 - def recurse_proc(result, &proc); end - - # source://json//lib/json/common.rb#742 - 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#329 - def unparse(obj, opts = T.unsafe(nil)); end - - # :call-seq: - # JSON.unsafe_load(source, proc = nil, options = {}) -> object - # - # Returns the Ruby objects created by parsing the given +source+. - # - # 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 +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. - # - 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.unsafe_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 = <<~JSON - # { - # "name": "Dave", - # "age" :40, - # "hats": [ - # "Cattleman's", - # "Panama", - # "Tophat" - # ] - # } - # JSON - # - # Load a \String: - # ruby = JSON.unsafe_load(source) - # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} - # - # Load an \IO object: - # require 'stringio' - # object = JSON.unsafe_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.unsafe_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.unsafe_load - # ruby = JSON.unsafe_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#582 - def unsafe_load(source, proc = T.unsafe(nil), options = 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#23 - def [](object, opts = T.unsafe(nil)); end - - # source://json//lib/json/common.rb#80 - def create_fast_state; end - - # Returns the current create identifier. - # See also JSON.create_id=. - # - # source://json//lib/json/common.rb#115 - 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#109 - def create_id=(new_value); end - - # source://json//lib/json/common.rb#90 - 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#50 - 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#823 - def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil), kwargs = 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} - # - # source://json//lib/json/common.rb#789 - 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} - # - # source://json//lib/json/common.rb#789 - 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#357 - 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#357 - 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#329 - def generate(obj, opts = T.unsafe(nil)); end - - # Returns the JSON generator module that is used by JSON. - # - # source://json//lib/json/common.rb#100 - def generator; end - - # Set the module _generator_ to be used by JSON. - # - # source://json//lib/json/common.rb#57 - def generator=(generator); end - - # Encodes string using String.encode. - # - # source://json//lib/json/common.rb#856 - 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+. - # - # 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. - # If you must use it, use JSON.unsafe_load instead to make it clear. - # - # Since JSON version 2.8.0, `load` emits a deprecation warning when a - # non native type is deserialized, without `create_additions` being explicitly - # enabled, and in JSON version 3.0, `load` will have `create_additions` disabled - # by default. - # - # - 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. - # - 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 = <<~JSON - # { - # "name": "Dave", - # "age" :40, - # "hats": [ - # "Cattleman's", - # "Panama", - # "Tophat" - # ] - # } - # JSON - # - # 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#742 - 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#446 - 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#446 - 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#278 - 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#289 - 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 = <<~JSON - # { - # "name": "Dave", - # "age" :40, - # "hats": [ - # "Cattleman's", - # "Panama", - # "Tophat" - # ] - # } - # JSON - # 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#247 - 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#262 - def parse!(source, opts = T.unsafe(nil)); end - - # Returns the JSON parser class that is used by JSON. - # - # source://json//lib/json/common.rb#37 - def parser; end - - # Set the JSON parser class _parser_ to be used by JSON. - # - # source://json//lib/json/common.rb#40 - 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#402 - 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#402 - 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#768 - def recurse_proc(result, &proc); end - - # source://json//lib/json/common.rb#742 - 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. - # - # source://json//lib/json/common.rb#103 - def state; end - - # Sets or Returns the JSON generator state class that is used by JSON. - # - # source://json//lib/json/common.rb#103 - 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#329 - def unparse(obj, opts = T.unsafe(nil)); end - - # :call-seq: - # JSON.unsafe_load(source, proc = nil, options = {}) -> object - # - # Returns the Ruby objects created by parsing the given +source+. - # - # 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 +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. - # - 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.unsafe_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 = <<~JSON - # { - # "name": "Dave", - # "age" :40, - # "hats": [ - # "Cattleman's", - # "Panama", - # "Tophat" - # ] - # } - # JSON - # - # Load a \String: - # ruby = JSON.unsafe_load(source) - # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} - # - # Load an \IO object: - # require 'stringio' - # object = JSON.unsafe_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.unsafe_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.unsafe_load - # ruby = JSON.unsafe_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#582 - def unsafe_load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end - - # Sets or returns default options for the JSON.unsafe_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#432 - def unsafe_load_default_options; end - - # Sets or returns default options for the JSON.unsafe_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#432 - def unsafe_load_default_options=(_arg0); end - end -end - -# JSON::Coder holds a parser and generator configuration. -# -# module MyApp -# JSONC_CODER = JSON::Coder.new( -# allow_trailing_comma: true -# ) -# end -# -# MyApp::JSONC_CODER.load(document) -# -# source://json//lib/json/common.rb#870 -class JSON::Coder - # :call-seq: - # JSON.new(options = nil, &block) - # - # Argument +options+, if given, contains a \Hash of options for both parsing and generating. - # See {Parsing Options}[#module-JSON-label-Parsing+Options], and {Generating Options}[#module-JSON-label-Generating+Options]. - # - # For generation, the strict: true option is always set. When a Ruby object with no native \JSON counterpart is - # encoutered, the block provided to the initialize method is invoked, and must return a Ruby object that has a native - # \JSON counterpart: - # - # module MyApp - # API_JSON_CODER = JSON::Coder.new do |object| - # case object - # when Time - # object.iso8601(3) - # else - # object # Unknown type, will raise - # end - # end - # end - # - # puts MyApp::API_JSON_CODER.dump(Time.now.utc) # => "2025-01-21T08:41:44.286Z" - # - # @return [Coder] a new instance of Coder - # - # source://json//lib/json/common.rb#894 - def initialize(options = T.unsafe(nil), &as_json); end - - # call-seq: - # dump(object) -> String - # dump(object, io) -> io - # - # Serialize the given object into a \JSON document. - # - # source://json//lib/json/common.rb#913 - def dump(object, io = T.unsafe(nil)); end - - # call-seq: - # dump(object) -> String - # dump(object, io) -> io - # - # Serialize the given object into a \JSON document. - # - # source://json//lib/json/common.rb#913 - def generate(object, io = T.unsafe(nil)); end - - # call-seq: - # load(string) -> Object - # - # Parse the given \JSON document and return an equivalent Ruby object. - # - # source://json//lib/json/common.rb#922 - def load(source); end - - # call-seq: - # load(path) -> Object - # - # Parse the given \JSON document and return an equivalent Ruby object. - # - # source://json//lib/json/common.rb#931 - def load_file(path); end - - # call-seq: - # load(string) -> Object - # - # Parse the given \JSON document and return an equivalent Ruby object. - # - # source://json//lib/json/common.rb#922 - def parse(source); end -end - -module JSON::Ext::Generator::GeneratorMethods::String - mixes_in_class_methods ::JSON::Ext::Generator::GeneratorMethods::String::Extend -end - -# source://json//lib/json/ext/generator/state.rb#6 -class JSON::Ext::Generator::State - # call-seq: new(opts = {}) - # - # Instantiates a new State object, configured by _opts_. - # - # _opts_ can have the following keys: - # - # * *indent*: a string used to indent levels (default: ''), - # * *space*: a string that is put after, a : or , delimiter (default: ''), - # * *space_before*: a string that is put before a : pair delimiter (default: ''), - # * *object_nl*: a string that is put at the end of a JSON object (default: ''), - # * *array_nl*: a string that is put at the end of a JSON array (default: ''), - # * *allow_nan*: true if NaN, Infinity, and -Infinity should be - # generated, otherwise an exception is thrown, if these values are - # encountered. This options defaults to false. - # * *ascii_only*: true if only ASCII characters should be generated. This - # option defaults to false. - # * *buffer_initial_length*: sets the initial length of the generator's - # internal buffer. - # - # @return [State] a new instance of State - # - # source://json//lib/json/ext/generator/state.rb#25 - def initialize(opts = T.unsafe(nil)); end - - # call-seq: [](name) - # - # Returns the value returned by method +name+. - # - # source://json//lib/json/ext/generator/state.rb#84 - def [](name); end - - # call-seq: []=(name, value) - # - # Sets the attribute name to value. - # - # source://json//lib/json/ext/generator/state.rb#96 - def []=(name, value); end - - # call-seq: configure(opts) - # - # Configure this State instance with the Hash _opts_, and return - # itself. - # - # source://json//lib/json/ext/generator/state.rb#35 - def configure(opts); end - - # call-seq: configure(opts) - # - # Configure this State instance with the Hash _opts_, and return - # itself. - # - # source://json//lib/json/ext/generator/state.rb#35 - def merge(opts); end - - # call-seq: to_h - # - # Returns the configuration instance variables as a hash, that can be - # passed to the configure method. - # - # source://json//lib/json/ext/generator/state.rb#54 - def to_h; end - - # call-seq: to_h - # - # Returns the configuration instance variables as a hash, that can be - # passed to the configure method. - # - # source://json//lib/json/ext/generator/state.rb#54 - def to_hash; end -end - -# source://json//lib/json/ext.rb#9 -class JSON::Ext::Parser - # @return [Parser] a new instance of Parser - # - # source://json//lib/json/ext.rb#17 - def initialize(source, opts = T.unsafe(nil)); end - - # source://json//lib/json/ext.rb#26 - def parse; end - - # source://json//lib/json/ext.rb#22 - def source; end -end - -# source://json//lib/json/ext.rb#32 -JSON::Ext::Parser::Config = JSON::Ext::ParserConfig - -# Fragment of JSON document that is to be included as is: -# fragment = JSON::Fragment.new("[1, 2, 3]") -# JSON.generate({ count: 3, items: fragments }) -# -# This allows to easily assemble multiple JSON fragments that have -# been persisted somewhere without having to parse them nor resorting -# to string interpolation. -# -# Note: no validation is performed on the provided string. It is the -# responsability of the caller to ensure the string contains valid JSON. -# -# source://json//lib/json/common.rb#183 -class JSON::Fragment < ::Struct - # @return [Fragment] a new instance of Fragment - # - # source://json//lib/json/common.rb#184 - def initialize(json); end - - # Returns the value of attribute json - # - # @return [Object] the current value of json - def json; end - - # Sets the attribute json - # - # @param value [Object] the value to set the attribute json to. - # @return [Object] the newly set value - def json=(_); end - - # source://json//lib/json/common.rb#192 - def to_json(state = T.unsafe(nil), *_arg1); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# This exception is raised if a generator or unparser error occurs. -# -# source://json//lib/json/common.rb#146 -class JSON::GeneratorError < ::JSON::JSONError - # @return [GeneratorError] a new instance of GeneratorError - # - # source://json//lib/json/common.rb#149 - def initialize(message, invalid_object = T.unsafe(nil)); end - - # source://json//lib/json/common.rb#154 - def detailed_message(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute invalid_object. - # - # source://json//lib/json/common.rb#147 - def invalid_object; end -end - -# source://json//lib/json/generic_object.rb#9 -class JSON::GenericObject < ::OpenStruct - # source://json//lib/json/generic_object.rb#67 - def as_json(*_arg0); end - - # source://json//lib/json/generic_object.rb#51 - def to_hash; end - - # source://json//lib/json/generic_object.rb#71 - def to_json(*a); end - - # source://json//lib/json/generic_object.rb#63 - def |(other); end - - class << self - # source://json//lib/json/generic_object.rb#45 - def dump(obj, *args); end - - # source://json//lib/json/generic_object.rb#25 - 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#17 - def json_creatable=(_arg0); end - - # @return [Boolean] - # - # source://json//lib/json/generic_object.rb#13 - def json_creatable?; end - - # source://json//lib/json/generic_object.rb#19 - def json_create(data); end - - # source://json//lib/json/generic_object.rb#40 - 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#126 -class JSON::JSONError < ::StandardError - class << self - # source://json//lib/json/common.rb#127 - def wrap(exception); end - end -end - -# source://json//lib/json/common.rb#8 -JSON::NOT_SET = T.let(T.unsafe(nil), Object) - -# source://json//lib/json/common.rb#43 -JSON::Parser = JSON::Ext::Parser - -# source://json//lib/json/common.rb#72 -JSON::State = JSON::Ext::Generator::State - -# For backwards compatibility -# -# source://json//lib/json/common.rb#167 -JSON::UnparserError = JSON::GeneratorError - -# source://json//lib/json/common.rb#937 -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#964 - 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#942 - 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#951 - def jj(*objs); end -end - -class NilClass - include ::JSON::Ext::Generator::GeneratorMethods::NilClass -end - -class Object < ::BasicObject - include ::Kernel - include ::PP::ObjectMixin - include ::JSON::Ext::Generator::GeneratorMethods::Object -end - -class String - include ::Comparable - include ::JSON::Ext::Generator::GeneratorMethods::String - extend ::JSON::Ext::Generator::GeneratorMethods::String::Extend -end - -class TrueClass - include ::JSON::Ext::Generator::GeneratorMethods::TrueClass -end diff --git a/sorbet/rbi/gems/language_server-protocol@3.17.0.4.rbi b/sorbet/rbi/gems/language_server-protocol@3.17.0.6.rbi similarity index 100% rename from sorbet/rbi/gems/language_server-protocol@3.17.0.4.rbi rename to sorbet/rbi/gems/language_server-protocol@3.17.0.6.rbi diff --git a/sorbet/rbi/gems/lint_roller@1.1.0.rbi b/sorbet/rbi/gems/lint_roller@1.1.0.rbi index ef073b8..b6e9bd4 100644 --- a/sorbet/rbi/gems/lint_roller@1.1.0.rbi +++ b/sorbet/rbi/gems/lint_roller@1.1.0.rbi @@ -5,236 +5,185 @@ # Please instead update this file by running `bin/tapioca gem lint_roller`. -# source://lint_roller//lib/lint_roller/context.rb#1 +# pkg:gem/lint_roller#lib/lint_roller/context.rb:1 module LintRoller; end -# source://lint_roller//lib/lint_roller/about.rb#2 +# pkg:gem/lint_roller#lib/lint_roller/about.rb:2 class LintRoller::About < ::Struct - # Returns the value of attribute description - # - # @return [Object] the current value of description + # pkg:gem/lint_roller#lib/lint_roller/about.rb:2 def description; end - # Sets the attribute description - # - # @param value [Object] the value to set the attribute description to. - # @return [Object] the newly set value + # pkg:gem/lint_roller#lib/lint_roller/about.rb:2 def description=(_); end - # Returns the value of attribute homepage - # - # @return [Object] the current value of homepage + # pkg:gem/lint_roller#lib/lint_roller/about.rb:2 def homepage; end - # Sets the attribute homepage - # - # @param value [Object] the value to set the attribute homepage to. - # @return [Object] the newly set value + # pkg:gem/lint_roller#lib/lint_roller/about.rb:2 def homepage=(_); end - # Returns the value of attribute name - # - # @return [Object] the current value of name + # pkg:gem/lint_roller#lib/lint_roller/about.rb:2 def name; end - # Sets the attribute name - # - # @param value [Object] the value to set the attribute name to. - # @return [Object] the newly set value + # pkg:gem/lint_roller#lib/lint_roller/about.rb:2 def name=(_); end - # Returns the value of attribute version - # - # @return [Object] the current value of version + # pkg:gem/lint_roller#lib/lint_roller/about.rb:2 def version; end - # Sets the attribute version - # - # @param value [Object] the value to set the attribute version to. - # @return [Object] the newly set value + # pkg:gem/lint_roller#lib/lint_roller/about.rb:2 def version=(_); end class << self + # pkg:gem/lint_roller#lib/lint_roller/about.rb:2 def [](*_arg0); end + + # pkg:gem/lint_roller#lib/lint_roller/about.rb:2 def inspect; end + + # pkg:gem/lint_roller#lib/lint_roller/about.rb:2 def keyword_init?; end + + # pkg:gem/lint_roller#lib/lint_roller/about.rb:2 def members; end + + # pkg:gem/lint_roller#lib/lint_roller/about.rb:2 def new(*_arg0); end end end -# source://lint_roller//lib/lint_roller/context.rb#2 +# pkg:gem/lint_roller#lib/lint_roller/context.rb:2 class LintRoller::Context < ::Struct - # Returns the value of attribute engine - # - # @return [Object] the current value of engine + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 def engine; end - # Sets the attribute engine - # - # @param value [Object] the value to set the attribute engine to. - # @return [Object] the newly set value + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 def engine=(_); end - # Returns the value of attribute engine_version - # - # @return [Object] the current value of engine_version + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 def engine_version; end - # Sets the attribute engine_version - # - # @param value [Object] the value to set the attribute engine_version to. - # @return [Object] the newly set value + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 def engine_version=(_); end - # Returns the value of attribute rule_format - # - # @return [Object] the current value of rule_format + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 def rule_format; end - # Sets the attribute rule_format - # - # @param value [Object] the value to set the attribute rule_format to. - # @return [Object] the newly set value + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 def rule_format=(_); end - # Returns the value of attribute runner - # - # @return [Object] the current value of runner + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 def runner; end - # Sets the attribute runner - # - # @param value [Object] the value to set the attribute runner to. - # @return [Object] the newly set value + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 def runner=(_); end - # Returns the value of attribute runner_version - # - # @return [Object] the current value of runner_version + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 def runner_version; end - # Sets the attribute runner_version - # - # @param value [Object] the value to set the attribute runner_version to. - # @return [Object] the newly set value + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 def runner_version=(_); end - # Returns the value of attribute target_ruby_version - # - # @return [Object] the current value of target_ruby_version + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 def target_ruby_version; end - # Sets the attribute target_ruby_version - # - # @param value [Object] the value to set the attribute target_ruby_version to. - # @return [Object] the newly set value + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 def target_ruby_version=(_); end class << self + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 def [](*_arg0); end + + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 def inspect; end + + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 def keyword_init?; end + + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 def members; end + + # pkg:gem/lint_roller#lib/lint_roller/context.rb:2 def new(*_arg0); end end end -# source://lint_roller//lib/lint_roller/error.rb#2 +# pkg:gem/lint_roller#lib/lint_roller/error.rb:2 class LintRoller::Error < ::StandardError; end -# source://lint_roller//lib/lint_roller/plugin.rb#2 +# pkg:gem/lint_roller#lib/lint_roller/plugin.rb:2 class LintRoller::Plugin # `config' is a Hash of options passed to the plugin by the user # - # @return [Plugin] a new instance of Plugin - # - # source://lint_roller//lib/lint_roller/plugin.rb#4 + # pkg:gem/lint_roller#lib/lint_roller/plugin.rb:4 def initialize(config = T.unsafe(nil)); end - # @raise [Error] - # - # source://lint_roller//lib/lint_roller/plugin.rb#8 + # pkg:gem/lint_roller#lib/lint_roller/plugin.rb:8 def about; end # `context' is an instance of LintRoller::Context provided by the runner # - # @raise [Error] - # - # source://lint_roller//lib/lint_roller/plugin.rb#18 + # pkg:gem/lint_roller#lib/lint_roller/plugin.rb:18 def rules(context); end # `context' is an instance of LintRoller::Context provided by the runner # - # @return [Boolean] - # - # source://lint_roller//lib/lint_roller/plugin.rb#13 + # pkg:gem/lint_roller#lib/lint_roller/plugin.rb:13 def supported?(context); end end -# source://lint_roller//lib/lint_roller/rules.rb#2 +# pkg:gem/lint_roller#lib/lint_roller/rules.rb:2 class LintRoller::Rules < ::Struct - # Returns the value of attribute config_format - # - # @return [Object] the current value of config_format + # pkg:gem/lint_roller#lib/lint_roller/rules.rb:2 def config_format; end - # Sets the attribute config_format - # - # @param value [Object] the value to set the attribute config_format to. - # @return [Object] the newly set value + # pkg:gem/lint_roller#lib/lint_roller/rules.rb:2 def config_format=(_); end - # Returns the value of attribute error - # - # @return [Object] the current value of error + # pkg:gem/lint_roller#lib/lint_roller/rules.rb:2 def error; end - # Sets the attribute error - # - # @param value [Object] the value to set the attribute error to. - # @return [Object] the newly set value + # pkg:gem/lint_roller#lib/lint_roller/rules.rb:2 def error=(_); end - # Returns the value of attribute type - # - # @return [Object] the current value of type + # pkg:gem/lint_roller#lib/lint_roller/rules.rb:2 def type; end - # Sets the attribute type - # - # @param value [Object] the value to set the attribute type to. - # @return [Object] the newly set value + # pkg:gem/lint_roller#lib/lint_roller/rules.rb:2 def type=(_); end - # Returns the value of attribute value - # - # @return [Object] the current value of value + # pkg:gem/lint_roller#lib/lint_roller/rules.rb:2 def value; end - # Sets the attribute value - # - # @param value [Object] the value to set the attribute value to. - # @return [Object] the newly set value + # pkg:gem/lint_roller#lib/lint_roller/rules.rb:2 def value=(_); end class << self + # pkg:gem/lint_roller#lib/lint_roller/rules.rb:2 def [](*_arg0); end + + # pkg:gem/lint_roller#lib/lint_roller/rules.rb:2 def inspect; end + + # pkg:gem/lint_roller#lib/lint_roller/rules.rb:2 def keyword_init?; end + + # pkg:gem/lint_roller#lib/lint_roller/rules.rb:2 def members; end + + # pkg:gem/lint_roller#lib/lint_roller/rules.rb:2 def new(*_arg0); end end end -# source://lint_roller//lib/lint_roller/support/merges_upstream_metadata.rb#2 +# pkg:gem/lint_roller#lib/lint_roller/support/merges_upstream_metadata.rb:2 module LintRoller::Support; end -# source://lint_roller//lib/lint_roller/support/merges_upstream_metadata.rb#3 +# pkg:gem/lint_roller#lib/lint_roller/support/merges_upstream_metadata.rb:3 class LintRoller::Support::MergesUpstreamMetadata - # source://lint_roller//lib/lint_roller/support/merges_upstream_metadata.rb#4 + # pkg:gem/lint_roller#lib/lint_roller/support/merges_upstream_metadata.rb:4 def merge(plugin_yaml, upstream_yaml); end end -# source://lint_roller//lib/lint_roller/version.rb#2 +# pkg:gem/lint_roller#lib/lint_roller/version.rb:2 LintRoller::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/logger@1.6.6.rbi b/sorbet/rbi/gems/logger@1.6.6.rbi deleted file mode 100644 index 3ba5d2c..0000000 --- a/sorbet/rbi/gems/logger@1.6.6.rbi +++ /dev/null @@ -1,940 +0,0 @@ -# typed: false - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `logger` gem. -# Please instead update this file by running `bin/tapioca gem logger`. - - -# \Class \Logger provides a simple but sophisticated logging utility that -# you can use to create one or more -# {event logs}[https://en.wikipedia.org/wiki/Logging_(software)#Event_logs] -# for your program. -# Each such log contains a chronological sequence of entries -# that provides a record of the program's activities. -# -# == About the Examples -# -# All examples on this page assume that \Logger has been required: -# -# require 'logger' -# -# == Synopsis -# -# Create a log with Logger.new: -# -# # Single log file. -# logger = Logger.new('t.log') -# # Size-based rotated logging: 3 10-megabyte files. -# logger = Logger.new('t.log', 3, 10485760) -# # Period-based rotated logging: daily (also allowed: 'weekly', 'monthly'). -# logger = Logger.new('t.log', 'daily') -# # Log to an IO stream. -# logger = Logger.new($stdout) -# -# Add entries (level, message) with Logger#add: -# -# logger.add(Logger::DEBUG, 'Maximal debugging info') -# logger.add(Logger::INFO, 'Non-error information') -# logger.add(Logger::WARN, 'Non-error warning') -# logger.add(Logger::ERROR, 'Non-fatal error') -# logger.add(Logger::FATAL, 'Fatal error') -# logger.add(Logger::UNKNOWN, 'Most severe') -# -# Close the log with Logger#close: -# -# logger.close -# -# == Entries -# -# You can add entries with method Logger#add: -# -# logger.add(Logger::DEBUG, 'Maximal debugging info') -# logger.add(Logger::INFO, 'Non-error information') -# logger.add(Logger::WARN, 'Non-error warning') -# logger.add(Logger::ERROR, 'Non-fatal error') -# logger.add(Logger::FATAL, 'Fatal error') -# logger.add(Logger::UNKNOWN, 'Most severe') -# -# These shorthand methods also add entries: -# -# logger.debug('Maximal debugging info') -# logger.info('Non-error information') -# logger.warn('Non-error warning') -# logger.error('Non-fatal error') -# logger.fatal('Fatal error') -# logger.unknown('Most severe') -# -# When you call any of these methods, -# the entry may or may not be written to the log, -# depending on the entry's severity and on the log level; -# see {Log Level}[rdoc-ref:Logger@Log+Level] -# -# An entry always has: -# -# - A severity (the required argument to #add). -# - An automatically created timestamp. -# -# And may also have: -# -# - A message. -# - A program name. -# -# Example: -# -# logger = Logger.new($stdout) -# logger.add(Logger::INFO, 'My message.', 'mung') -# # => I, [2022-05-07T17:21:46.536234 #20536] INFO -- mung: My message. -# -# The default format for an entry is: -# -# "%s, [%s #%d] %5s -- %s: %s\n" -# -# where the values to be formatted are: -# -# - \Severity (one letter). -# - Timestamp. -# - Process id. -# - \Severity (word). -# - Program name. -# - Message. -# -# You can use a different entry format by: -# -# - Setting a custom format proc (affects following entries); -# see {formatter=}[Logger.html#attribute-i-formatter]. -# - Calling any of the methods above with a block -# (affects only the one entry). -# Doing so can have two benefits: -# -# - Context: the block can evaluate the entire program context -# and create a context-dependent message. -# - Performance: the block is not evaluated unless the log level -# permits the entry actually to be written: -# -# logger.error { my_slow_message_generator } -# -# Contrast this with the string form, where the string is -# always evaluated, regardless of the log level: -# -# logger.error("#{my_slow_message_generator}") -# -# === \Severity -# -# The severity of a log entry has two effects: -# -# - Determines whether the entry is selected for inclusion in the log; -# see {Log Level}[rdoc-ref:Logger@Log+Level]. -# - Indicates to any log reader (whether a person or a program) -# the relative importance of the entry. -# -# === Timestamp -# -# The timestamp for a log entry is generated automatically -# when the entry is created. -# -# The logged timestamp is formatted by method -# {Time#strftime}[https://docs.ruby-lang.org/en/master/Time.html#method-i-strftime] -# using this format string: -# -# '%Y-%m-%dT%H:%M:%S.%6N' -# -# Example: -# -# logger = Logger.new($stdout) -# logger.add(Logger::INFO) -# # => I, [2022-05-07T17:04:32.318331 #20536] INFO -- : nil -# -# You can set a different format using method #datetime_format=. -# -# === Message -# -# The message is an optional argument to an entry method: -# -# logger = Logger.new($stdout) -# logger.add(Logger::INFO, 'My message') -# # => I, [2022-05-07T18:15:37.647581 #20536] INFO -- : My message -# -# For the default entry formatter, Logger::Formatter, -# the message object may be: -# -# - A string: used as-is. -# - An Exception: message.message is used. -# - Anything else: message.inspect is used. -# -# *Note*: Logger::Formatter does not escape or sanitize -# the message passed to it. -# Developers should be aware that malicious data (user input) -# may be in the message, and should explicitly escape untrusted data. -# -# You can use a custom formatter to escape message data; -# see the example at {formatter=}[Logger.html#attribute-i-formatter]. -# -# === Program Name -# -# The program name is an optional argument to an entry method: -# -# logger = Logger.new($stdout) -# logger.add(Logger::INFO, 'My message', 'mung') -# # => I, [2022-05-07T18:17:38.084716 #20536] INFO -- mung: My message -# -# The default program name for a new logger may be set in the call to -# Logger.new via optional keyword argument +progname+: -# -# logger = Logger.new('t.log', progname: 'mung') -# -# The default program name for an existing logger may be set -# by a call to method #progname=: -# -# logger.progname = 'mung' -# -# The current program name may be retrieved with method -# {progname}[Logger.html#attribute-i-progname]: -# -# logger.progname # => "mung" -# -# == Log Level -# -# The log level setting determines whether an entry is actually -# written to the log, based on the entry's severity. -# -# These are the defined severities (least severe to most severe): -# -# logger = Logger.new($stdout) -# logger.add(Logger::DEBUG, 'Maximal debugging info') -# # => D, [2022-05-07T17:57:41.776220 #20536] DEBUG -- : Maximal debugging info -# logger.add(Logger::INFO, 'Non-error information') -# # => I, [2022-05-07T17:59:14.349167 #20536] INFO -- : Non-error information -# logger.add(Logger::WARN, 'Non-error warning') -# # => W, [2022-05-07T18:00:45.337538 #20536] WARN -- : Non-error warning -# logger.add(Logger::ERROR, 'Non-fatal error') -# # => E, [2022-05-07T18:02:41.592912 #20536] ERROR -- : Non-fatal error -# logger.add(Logger::FATAL, 'Fatal error') -# # => F, [2022-05-07T18:05:24.703931 #20536] FATAL -- : Fatal error -# logger.add(Logger::UNKNOWN, 'Most severe') -# # => A, [2022-05-07T18:07:54.657491 #20536] ANY -- : Most severe -# -# The default initial level setting is Logger::DEBUG, the lowest level, -# which means that all entries are to be written, regardless of severity: -# -# logger = Logger.new($stdout) -# logger.level # => 0 -# logger.add(0, "My message") -# # => D, [2022-05-11T15:10:59.773668 #20536] DEBUG -- : My message -# -# You can specify a different setting in a new logger -# using keyword argument +level+ with an appropriate value: -# -# logger = Logger.new($stdout, level: Logger::ERROR) -# logger = Logger.new($stdout, level: 'error') -# logger = Logger.new($stdout, level: :error) -# logger.level # => 3 -# -# With this level, entries with severity Logger::ERROR and higher -# are written, while those with lower severities are not written: -# -# logger = Logger.new($stdout, level: Logger::ERROR) -# logger.add(3) -# # => E, [2022-05-11T15:17:20.933362 #20536] ERROR -- : nil -# logger.add(2) # Silent. -# -# You can set the log level for an existing logger -# with method #level=: -# -# logger.level = Logger::ERROR -# -# These shorthand methods also set the level: -# -# logger.debug! # => 0 -# logger.info! # => 1 -# logger.warn! # => 2 -# logger.error! # => 3 -# logger.fatal! # => 4 -# -# You can retrieve the log level with method #level. -# -# logger.level = Logger::ERROR -# logger.level # => 3 -# -# These methods return whether a given -# level is to be written: -# -# logger.level = Logger::ERROR -# logger.debug? # => false -# logger.info? # => false -# logger.warn? # => false -# logger.error? # => true -# logger.fatal? # => true -# -# == Log File Rotation -# -# By default, a log file is a single file that grows indefinitely -# (until explicitly closed); there is no file rotation. -# -# To keep log files to a manageable size, -# you can use _log_ _file_ _rotation_, which uses multiple log files: -# -# - Each log file has entries for a non-overlapping -# time interval. -# - Only the most recent log file is open and active; -# the others are closed and inactive. -# -# === Size-Based Rotation -# -# For size-based log file rotation, call Logger.new with: -# -# - Argument +logdev+ as a file path. -# - Argument +shift_age+ with a positive integer: -# the number of log files to be in the rotation. -# - Argument +shift_size+ as a positive integer: -# the maximum size (in bytes) of each log file; -# defaults to 1048576 (1 megabyte). -# -# Examples: -# -# logger = Logger.new('t.log', 3) # Three 1-megabyte files. -# logger = Logger.new('t.log', 5, 10485760) # Five 10-megabyte files. -# -# For these examples, suppose: -# -# logger = Logger.new('t.log', 3) -# -# Logging begins in the new log file, +t.log+; -# the log file is "full" and ready for rotation -# when a new entry would cause its size to exceed +shift_size+. -# -# The first time +t.log+ is full: -# -# - +t.log+ is closed and renamed to +t.log.0+. -# - A new file +t.log+ is opened. -# -# The second time +t.log+ is full: -# -# - +t.log.0 is renamed as +t.log.1+. -# - +t.log+ is closed and renamed to +t.log.0+. -# - A new file +t.log+ is opened. -# -# Each subsequent time that +t.log+ is full, -# the log files are rotated: -# -# - +t.log.1+ is removed. -# - +t.log.0 is renamed as +t.log.1+. -# - +t.log+ is closed and renamed to +t.log.0+. -# - A new file +t.log+ is opened. -# -# === Periodic Rotation -# -# For periodic rotation, call Logger.new with: -# -# - Argument +logdev+ as a file path. -# - Argument +shift_age+ as a string period indicator. -# -# Examples: -# -# logger = Logger.new('t.log', 'daily') # Rotate log files daily. -# logger = Logger.new('t.log', 'weekly') # Rotate log files weekly. -# logger = Logger.new('t.log', 'monthly') # Rotate log files monthly. -# -# Example: -# -# logger = Logger.new('t.log', 'daily') -# -# When the given period expires: -# -# - The base log file, +t.log+ is closed and renamed -# with a date-based suffix such as +t.log.20220509+. -# - A new log file +t.log+ is opened. -# - Nothing is removed. -# -# The default format for the suffix is '%Y%m%d', -# which produces a suffix similar to the one above. -# You can set a different format using create-time option -# +shift_period_suffix+; -# see details and suggestions at -# {Time#strftime}[https://docs.ruby-lang.org/en/master/Time.html#method-i-strftime]. -# -# source://logger//lib/logger/version.rb#3 -class Logger - include ::Logger::Severity - - # :call-seq: - # Logger.new(logdev, shift_age = 0, shift_size = 1048576, **options) - # - # With the single argument +logdev+, - # returns a new logger with all default options: - # - # Logger.new('t.log') # => # - # - # Argument +logdev+ must be one of: - # - # - A string filepath: entries are to be written - # to the file at that path; if the file at that path exists, - # new entries are appended. - # - An IO stream (typically +$stdout+, +$stderr+. or an open file): - # entries are to be written to the given stream. - # - +nil+ or +File::NULL+: no entries are to be written. - # - # Examples: - # - # Logger.new('t.log') - # Logger.new($stdout) - # - # The keyword options are: - # - # - +level+: sets the log level; default value is Logger::DEBUG. - # See {Log Level}[rdoc-ref:Logger@Log+Level]: - # - # Logger.new('t.log', level: Logger::ERROR) - # - # - +progname+: sets the default program name; default is +nil+. - # See {Program Name}[rdoc-ref:Logger@Program+Name]: - # - # Logger.new('t.log', progname: 'mung') - # - # - +formatter+: sets the entry formatter; default is +nil+. - # See {formatter=}[Logger.html#attribute-i-formatter]. - # - +datetime_format+: sets the format for entry timestamp; - # default is +nil+. - # See #datetime_format=. - # - +binmode+: sets whether the logger writes in binary mode; - # default is +false+. - # - +shift_period_suffix+: sets the format for the filename suffix - # for periodic log file rotation; default is '%Y%m%d'. - # See {Periodic Rotation}[rdoc-ref:Logger@Periodic+Rotation]. - # - +reraise_write_errors+: An array of exception classes, which will - # be reraised if there is an error when writing to the log device. - # The default is to swallow all exceptions raised. - # - # @return [Logger] a new instance of Logger - # - # source://logger//lib/logger.rb#581 - def initialize(logdev, shift_age = T.unsafe(nil), shift_size = T.unsafe(nil), level: T.unsafe(nil), progname: T.unsafe(nil), formatter: T.unsafe(nil), datetime_format: T.unsafe(nil), binmode: T.unsafe(nil), shift_period_suffix: T.unsafe(nil), reraise_write_errors: T.unsafe(nil)); end - - # Writes the given +msg+ to the log with no formatting; - # returns the number of characters written, - # or +nil+ if no log device exists: - # - # logger = Logger.new($stdout) - # logger << 'My message.' # => 10 - # - # Output: - # - # My message. - # - # source://logger//lib/logger.rb#689 - def <<(msg); end - - # Creates a log entry, which may or may not be written to the log, - # depending on the entry's severity and on the log level. - # See {Log Level}[rdoc-ref:Logger@Log+Level] - # and {Entries}[rdoc-ref:Logger@Entries] for details. - # - # Examples: - # - # logger = Logger.new($stdout, progname: 'mung') - # logger.add(Logger::INFO) - # logger.add(Logger::ERROR, 'No good') - # logger.add(Logger::ERROR, 'No good', 'gnum') - # - # Output: - # - # I, [2022-05-12T16:25:31.469726 #36328] INFO -- mung: mung - # E, [2022-05-12T16:25:55.349414 #36328] ERROR -- mung: No good - # E, [2022-05-12T16:26:35.841134 #36328] ERROR -- gnum: No good - # - # These convenience methods have implicit severity: - # - # - #debug. - # - #info. - # - #warn. - # - #error. - # - #fatal. - # - #unknown. - # - # source://logger//lib/logger.rb#656 - def add(severity, message = T.unsafe(nil), progname = T.unsafe(nil)); end - - # Closes the logger; returns +nil+: - # - # logger = Logger.new('t.log') - # logger.close # => nil - # logger.info('foo') # Prints "log writing failed. closed stream" - # - # Related: Logger#reopen. - # - # source://logger//lib/logger.rb#736 - def close; end - - # Returns the date-time format; see #datetime_format=. - # - # source://logger//lib/logger.rb#438 - def datetime_format; end - - # Sets the date-time format. - # - # Argument +datetime_format+ should be either of these: - # - # - A string suitable for use as a format for method - # {Time#strftime}[https://docs.ruby-lang.org/en/master/Time.html#method-i-strftime]. - # - +nil+: the logger uses '%Y-%m-%dT%H:%M:%S.%6N'. - # - # source://logger//lib/logger.rb#432 - def datetime_format=(datetime_format); end - - # Equivalent to calling #add with severity Logger::DEBUG. - # - # source://logger//lib/logger.rb#695 - def debug(progname = T.unsafe(nil), &block); end - - # Sets the log level to Logger::DEBUG. - # See {Log Level}[rdoc-ref:Logger@Log+Level]. - # - # source://logger//lib/logger.rb#487 - def debug!; end - - # Returns +true+ if the log level allows entries with severity - # Logger::DEBUG to be written, +false+ otherwise. - # See {Log Level}[rdoc-ref:Logger@Log+Level]. - # - # @return [Boolean] - # - # source://logger//lib/logger.rb#482 - def debug?; end - - # Equivalent to calling #add with severity Logger::ERROR. - # - # source://logger//lib/logger.rb#713 - def error(progname = T.unsafe(nil), &block); end - - # Sets the log level to Logger::ERROR. - # See {Log Level}[rdoc-ref:Logger@Log+Level]. - # - # source://logger//lib/logger.rb#520 - def error!; end - - # Returns +true+ if the log level allows entries with severity - # Logger::ERROR to be written, +false+ otherwise. - # See {Log Level}[rdoc-ref:Logger@Log+Level]. - # - # @return [Boolean] - # - # source://logger//lib/logger.rb#515 - def error?; end - - # Equivalent to calling #add with severity Logger::FATAL. - # - # source://logger//lib/logger.rb#719 - def fatal(progname = T.unsafe(nil), &block); end - - # Sets the log level to Logger::FATAL. - # See {Log Level}[rdoc-ref:Logger@Log+Level]. - # - # source://logger//lib/logger.rb#531 - def fatal!; end - - # Returns +true+ if the log level allows entries with severity - # Logger::FATAL to be written, +false+ otherwise. - # See {Log Level}[rdoc-ref:Logger@Log+Level]. - # - # @return [Boolean] - # - # source://logger//lib/logger.rb#526 - def fatal?; end - - # Sets or retrieves the logger entry formatter proc. - # - # When +formatter+ is +nil+, the logger uses Logger::Formatter. - # - # When +formatter+ is a proc, a new entry is formatted by the proc, - # which is called with four arguments: - # - # - +severity+: The severity of the entry. - # - +time+: A Time object representing the entry's timestamp. - # - +progname+: The program name for the entry. - # - +msg+: The message for the entry (string or string-convertible object). - # - # The proc should return a string containing the formatted entry. - # - # This custom formatter uses - # {String#dump}[https://docs.ruby-lang.org/en/master/String.html#method-i-dump] - # to escape the message string: - # - # logger = Logger.new($stdout, progname: 'mung') - # original_formatter = logger.formatter || Logger::Formatter.new - # logger.formatter = proc { |severity, time, progname, msg| - # original_formatter.call(severity, time, progname, msg.dump) - # } - # logger.add(Logger::INFO, "hello \n ''") - # logger.add(Logger::INFO, "\f\x00\xff\\\"") - # - # Output: - # - # I, [2022-05-13T13:16:29.637488 #8492] INFO -- mung: "hello \n ''" - # I, [2022-05-13T13:16:29.637610 #8492] INFO -- mung: "\f\x00\xFF\\\"" - # - # source://logger//lib/logger.rb#473 - def formatter; end - - # Sets or retrieves the logger entry formatter proc. - # - # When +formatter+ is +nil+, the logger uses Logger::Formatter. - # - # When +formatter+ is a proc, a new entry is formatted by the proc, - # which is called with four arguments: - # - # - +severity+: The severity of the entry. - # - +time+: A Time object representing the entry's timestamp. - # - +progname+: The program name for the entry. - # - +msg+: The message for the entry (string or string-convertible object). - # - # The proc should return a string containing the formatted entry. - # - # This custom formatter uses - # {String#dump}[https://docs.ruby-lang.org/en/master/String.html#method-i-dump] - # to escape the message string: - # - # logger = Logger.new($stdout, progname: 'mung') - # original_formatter = logger.formatter || Logger::Formatter.new - # logger.formatter = proc { |severity, time, progname, msg| - # original_formatter.call(severity, time, progname, msg.dump) - # } - # logger.add(Logger::INFO, "hello \n ''") - # logger.add(Logger::INFO, "\f\x00\xff\\\"") - # - # Output: - # - # I, [2022-05-13T13:16:29.637488 #8492] INFO -- mung: "hello \n ''" - # I, [2022-05-13T13:16:29.637610 #8492] INFO -- mung: "\f\x00\xFF\\\"" - # - # source://logger//lib/logger.rb#473 - def formatter=(_arg0); end - - # Equivalent to calling #add with severity Logger::INFO. - # - # source://logger//lib/logger.rb#701 - def info(progname = T.unsafe(nil), &block); end - - # Sets the log level to Logger::INFO. - # See {Log Level}[rdoc-ref:Logger@Log+Level]. - # - # source://logger//lib/logger.rb#498 - def info!; end - - # Returns +true+ if the log level allows entries with severity - # Logger::INFO to be written, +false+ otherwise. - # See {Log Level}[rdoc-ref:Logger@Log+Level]. - # - # @return [Boolean] - # - # source://logger//lib/logger.rb#493 - def info?; end - - # Logging severity threshold (e.g. Logger::INFO). - # - # source://logger//lib/logger.rb#383 - def level; end - - # Sets the log level; returns +severity+. - # See {Log Level}[rdoc-ref:Logger@Log+Level]. - # - # Argument +severity+ may be an integer, a string, or a symbol: - # - # logger.level = Logger::ERROR # => 3 - # logger.level = 3 # => 3 - # logger.level = 'error' # => "error" - # logger.level = :error # => :error - # - # Logger#sev_threshold= is an alias for Logger#level=. - # - # source://logger//lib/logger.rb#399 - def level=(severity); end - - # Creates a log entry, which may or may not be written to the log, - # depending on the entry's severity and on the log level. - # See {Log Level}[rdoc-ref:Logger@Log+Level] - # and {Entries}[rdoc-ref:Logger@Entries] for details. - # - # Examples: - # - # logger = Logger.new($stdout, progname: 'mung') - # logger.add(Logger::INFO) - # logger.add(Logger::ERROR, 'No good') - # logger.add(Logger::ERROR, 'No good', 'gnum') - # - # Output: - # - # I, [2022-05-12T16:25:31.469726 #36328] INFO -- mung: mung - # E, [2022-05-12T16:25:55.349414 #36328] ERROR -- mung: No good - # E, [2022-05-12T16:26:35.841134 #36328] ERROR -- gnum: No good - # - # These convenience methods have implicit severity: - # - # - #debug. - # - #info. - # - #warn. - # - #error. - # - #fatal. - # - #unknown. - # - # source://logger//lib/logger.rb#656 - def log(severity, message = T.unsafe(nil), progname = T.unsafe(nil)); end - - # Program name to include in log messages. - # - # source://logger//lib/logger.rb#422 - def progname; end - - # Program name to include in log messages. - # - # source://logger//lib/logger.rb#422 - def progname=(_arg0); end - - # Sets the logger's output stream: - # - # - If +logdev+ is +nil+, reopens the current output stream. - # - If +logdev+ is a filepath, opens the indicated file for append. - # - If +logdev+ is an IO stream - # (usually $stdout, $stderr, or an open File object), - # opens the stream for append. - # - # Example: - # - # logger = Logger.new('t.log') - # logger.add(Logger::ERROR, 'one') - # logger.close - # logger.add(Logger::ERROR, 'two') # Prints 'log writing failed. closed stream' - # logger.reopen - # logger.add(Logger::ERROR, 'three') - # logger.close - # File.readlines('t.log') - # # => - # # ["# Logfile created on 2022-05-12 14:21:19 -0500 by logger.rb/v1.5.0\n", - # # "E, [2022-05-12T14:21:27.596726 #22428] ERROR -- : one\n", - # # "E, [2022-05-12T14:23:05.847241 #22428] ERROR -- : three\n"] - # - # source://logger//lib/logger.rb#624 - def reopen(logdev = T.unsafe(nil)); end - - # Logging severity threshold (e.g. Logger::INFO). - # - # source://logger//lib/logger.rb#383 - def sev_threshold; end - - # Sets the log level; returns +severity+. - # See {Log Level}[rdoc-ref:Logger@Log+Level]. - # - # Argument +severity+ may be an integer, a string, or a symbol: - # - # logger.level = Logger::ERROR # => 3 - # logger.level = 3 # => 3 - # logger.level = 'error' # => "error" - # logger.level = :error # => :error - # - # Logger#sev_threshold= is an alias for Logger#level=. - # - # source://logger//lib/logger.rb#399 - def sev_threshold=(severity); end - - # Equivalent to calling #add with severity Logger::UNKNOWN. - # - # source://logger//lib/logger.rb#725 - def unknown(progname = T.unsafe(nil), &block); end - - # Equivalent to calling #add with severity Logger::WARN. - # - # source://logger//lib/logger.rb#707 - def warn(progname = T.unsafe(nil), &block); end - - # Sets the log level to Logger::WARN. - # See {Log Level}[rdoc-ref:Logger@Log+Level]. - # - # source://logger//lib/logger.rb#509 - def warn!; end - - # Returns +true+ if the log level allows entries with severity - # Logger::WARN to be written, +false+ otherwise. - # See {Log Level}[rdoc-ref:Logger@Log+Level]. - # - # @return [Boolean] - # - # source://logger//lib/logger.rb#504 - def warn?; end - - # Adjust the log level during the block execution for the current Fiber only - # - # logger.with_level(:debug) do - # logger.debug { "Hello" } - # end - # - # source://logger//lib/logger.rb#408 - def with_level(severity); end - - private - - # source://logger//lib/logger.rb#758 - def format_message(severity, datetime, progname, msg); end - - # source://logger//lib/logger.rb#745 - def format_severity(severity); end - - # source://logger//lib/logger.rb#754 - def level_key; end - - # Guarantee the existence of this ivar even when subclasses don't call the superclass constructor. - # - # source://logger//lib/logger.rb#750 - def level_override; end -end - -# Default formatter for log messages. -# -# source://logger//lib/logger/formatter.rb#5 -class Logger::Formatter - # @return [Formatter] a new instance of Formatter - # - # source://logger//lib/logger/formatter.rb#11 - def initialize; end - - # source://logger//lib/logger/formatter.rb#15 - def call(severity, time, progname, msg); end - - # Returns the value of attribute datetime_format. - # - # source://logger//lib/logger/formatter.rb#9 - def datetime_format; end - - # Sets the attribute datetime_format - # - # @param value the value to set the attribute datetime_format to. - # - # source://logger//lib/logger/formatter.rb#9 - def datetime_format=(_arg0); end - - private - - # source://logger//lib/logger/formatter.rb#21 - def format_datetime(time); end - - # source://logger//lib/logger/formatter.rb#25 - def msg2str(msg); end -end - -# source://logger//lib/logger/formatter.rb#7 -Logger::Formatter::DatetimeFormat = T.let(T.unsafe(nil), String) - -# source://logger//lib/logger/formatter.rb#6 -Logger::Formatter::Format = T.let(T.unsafe(nil), String) - -# Device used for logging messages. -# -# source://logger//lib/logger/log_device.rb#7 -class Logger::LogDevice - include ::Logger::Period - include ::MonitorMixin - - # @return [LogDevice] a new instance of LogDevice - # - # source://logger//lib/logger/log_device.rb#14 - def initialize(log = T.unsafe(nil), shift_age: T.unsafe(nil), shift_size: T.unsafe(nil), shift_period_suffix: T.unsafe(nil), binmode: T.unsafe(nil), reraise_write_errors: T.unsafe(nil)); end - - # source://logger//lib/logger/log_device.rb#43 - def close; end - - # Returns the value of attribute dev. - # - # source://logger//lib/logger/log_device.rb#10 - def dev; end - - # Returns the value of attribute filename. - # - # source://logger//lib/logger/log_device.rb#11 - def filename; end - - # source://logger//lib/logger/log_device.rb#53 - def reopen(log = T.unsafe(nil)); end - - # source://logger//lib/logger/log_device.rb#32 - def write(message); end - - private - - # source://logger//lib/logger/log_device.rb#149 - def add_log_header(file); end - - # source://logger//lib/logger/log_device.rb#155 - def check_shift_log; end - - # source://logger//lib/logger/log_device.rb#125 - def create_logfile(filename); end - - # source://logger//lib/logger/log_device.rb#96 - def fixup_mode(dev, filename); end - - # source://logger//lib/logger/log_device.rb#141 - def handle_write_errors(mesg); end - - # source://logger//lib/logger/log_device.rb#170 - def lock_shift_log; end - - # source://logger//lib/logger/log_device.rb#112 - def open_logfile(filename); end - - # source://logger//lib/logger/log_device.rb#81 - def set_dev(log); end - - # source://logger//lib/logger/log_device.rb#199 - def shift_log_age; end - - # source://logger//lib/logger/log_device.rb#211 - def shift_log_period(period_end); end -end - -# :stopdoc: -# -# source://logger//lib/logger/log_device.rb#72 -Logger::LogDevice::MODE = T.let(T.unsafe(nil), Integer) - -# source://logger//lib/logger/log_device.rb#79 -Logger::LogDevice::MODE_TO_CREATE = T.let(T.unsafe(nil), Integer) - -# source://logger//lib/logger/log_device.rb#75 -Logger::LogDevice::MODE_TO_OPEN = T.let(T.unsafe(nil), Integer) - -# source://logger//lib/logger/period.rb#4 -module Logger::Period - private - - # source://logger//lib/logger/period.rb#9 - def next_rotate_time(now, shift_age); end - - # source://logger//lib/logger/period.rb#31 - def previous_period_end(now, shift_age); end - - class << self - # source://logger//lib/logger/period.rb#9 - def next_rotate_time(now, shift_age); end - - # source://logger//lib/logger/period.rb#31 - def previous_period_end(now, shift_age); end - end -end - -# source://logger//lib/logger/period.rb#7 -Logger::Period::SiD = T.let(T.unsafe(nil), Integer) - -# \Severity label for logging (max 5 chars). -# -# source://logger//lib/logger.rb#743 -Logger::SEV_LABEL = T.let(T.unsafe(nil), Array) - -# Logging severity. -# -# source://logger//lib/logger/severity.rb#5 -module Logger::Severity - class << self - # source://logger//lib/logger/severity.rb#29 - def coerce(severity); end - end -end - -# source://logger//lib/logger/severity.rb#19 -Logger::Severity::LEVELS = T.let(T.unsafe(nil), Hash) diff --git a/sorbet/rbi/gems/loofah@2.24.0.rbi b/sorbet/rbi/gems/loofah@2.25.2.rbi similarity index 100% rename from sorbet/rbi/gems/loofah@2.24.0.rbi rename to sorbet/rbi/gems/loofah@2.25.2.rbi diff --git a/sorbet/rbi/gems/method_source@1.1.0.rbi b/sorbet/rbi/gems/method_source@1.1.0.rbi index 2f1a741..feaff62 100644 --- a/sorbet/rbi/gems/method_source@1.1.0.rbi +++ b/sorbet/rbi/gems/method_source@1.1.0.rbi @@ -5,214 +5,199 @@ # Please instead update this file by running `bin/tapioca gem method_source`. -# source://method_source//lib/method_source.rb#163 +# pkg:gem/method_source#lib/method_source.rb:163 class Method include ::MethodSource::SourceLocation::MethodExtensions include ::MethodSource::MethodExtensions end -# source://method_source//lib/method_source/version.rb#1 +# pkg:gem/method_source#lib/method_source/version.rb:1 module MethodSource extend ::MethodSource::CodeHelpers class << self # Clear cache. # - # source://method_source//lib/method_source.rb#59 + # pkg:gem/method_source#lib/method_source.rb:59 def clear_cache; end # 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] + # @param [Array] source_location The array returned by Method#source_location + # @param [String] method_name # @return [String] The comments up to the point of the method. # - # source://method_source//lib/method_source.rb#38 + # pkg:gem/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#71 + # pkg:gem/method_source#lib/method_source.rb:71 def extract_code(source_location); end # Load a memoized copy of the lines in a file. # - # @param file_name [String] - # @param method_name [String] + # @param [String] file_name + # @param [String] method_name + # @return [Array] the contents of the file # @raise [SourceNotFoundError] - # @return [Array] the contents of the file # - # source://method_source//lib/method_source.rb#51 + # pkg:gem/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] + # @param [Array] source_location The array returned by Method#source_location + # @param [String] method_name # @return [String] The method body # - # source://method_source//lib/method_source.rb#23 + # pkg:gem/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#64 + # pkg:gem/method_source#lib/method_source.rb:64 def valid_expression?(str); end end end -# source://method_source//lib/method_source/code_helpers.rb#3 +# pkg:gem/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 + # @param [Array, File, String] file The file to parse, either as a File or as + # a String or an Array of lines. + # @param [Integer] line_number 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 + # pkg:gem/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. - # + # @param [String] code The code to validate. + # @return [Boolean] Whether or not the code is a complete Ruby expression. + # @raise [SyntaxError] Any SyntaxError that does not represent incompleteness. # @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 + # pkg:gem/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. # + # @param [Array, File, String] file The file to parse, either as a File or as + # @param [Integer] line_number The line number at which to look. + # NOTE: The first line in a file is # line 1! + # @param [Hash] options The optional configuration parameters. + # @option options [Boolean] :strict If set to true, then only completely + # valid expressions are returned. Otherwise heuristics are used to extract + # expressions that may have been valid inside an eval. + # @option options [Integer] :consume A number of lines to automatically + # consume (add to the expression buffer) without checking for validity. + # @return [String] The first complete expression + # @raise [SyntaxError] If the first complete expression can't be identified # - # @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 + # pkg:gem/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 + # @param [Array] lines + # @param [Integer] consume 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 + # @return [String] a valid ruby expression + # @raise [SyntaxError] # - # source://method_source//lib/method_source/code_helpers.rb#92 + # pkg:gem/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] + # @param [Array] lines # @return [String] # - # source://method_source//lib/method_source/code_helpers.rb#106 + # pkg:gem/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 +# pkg:gem/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 + # pkg:gem/method_source#lib/method_source/code_helpers.rb:137 def ===(ex); end - # @return [Boolean] - # - # source://method_source//lib/method_source/code_helpers.rb#149 + # pkg:gem/method_source#lib/method_source/code_helpers.rb:149 def rbx?; end end end -# source://method_source//lib/method_source/code_helpers.rb#125 +# pkg:gem/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 +# pkg:gem/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#77 +# pkg:gem/method_source#lib/method_source.rb:77 module MethodSource::MethodExtensions # Return the comments associated with the method class/module. + # @return [String] The method's comments as a string + # @raise SourceNotFoundException # # @example - # MethodSource::MethodExtensions.method(:included).module_comment - # => - # # This module is to be included by `Method` and `UnboundMethod` and - # # provides the `#source` functionality - # @raise SourceNotFoundException - # @return [String] The method's comments as a string + # MethodSource::MethodExtensions.method(:included).module_comment + # => + # # This module is to be included by `Method` and `UnboundMethod` and + # # provides the `#source` functionality # - # source://method_source//lib/method_source.rb#139 + # pkg:gem/method_source#lib/method_source.rb:139 def class_comment; end # Return the comments associated with the method as a string. + # @return [String] The method's comments as a string + # @raise SourceNotFoundException # # @example - # Set.instance_method(:clear).comment.display - # => - # # Removes all elements and returns self. - # @raise SourceNotFoundException - # @return [String] The method's comments as a string + # Set.instance_method(:clear).comment.display + # => + # # Removes all elements and returns self. # - # source://method_source//lib/method_source.rb#126 + # pkg:gem/method_source#lib/method_source.rb:126 def comment; end - # Return the comments associated with the method class/module. - # - # @example - # MethodSource::MethodExtensions.method(:included).module_comment - # => - # # This module is to be included by `Method` and `UnboundMethod` and - # # provides the `#source` functionality - # @raise SourceNotFoundException - # @return [String] The method's comments as a string - # - # source://method_source//lib/method_source.rb#139 + # pkg:gem/method_source#lib/method_source.rb:159 def module_comment; end # Return the sourcecode for the method as a string + # @return [String] The method sourcecode as a string + # @raise SourceNotFoundException # # @example - # Set.instance_method(:clear).source.display - # => - # def clear - # @hash.clear - # self - # end - # @raise SourceNotFoundException - # @return [String] The method sourcecode as a string + # Set.instance_method(:clear).source.display + # => + # def clear + # @hash.clear + # self + # end # - # source://method_source//lib/method_source.rb#114 + # pkg:gem/method_source#lib/method_source.rb:114 def source; end class << self @@ -220,84 +205,88 @@ module MethodSource::MethodExtensions # 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 [Class] klass The class that includes the module. # - # @param klass [Class] The class that includes the module. - # - # source://method_source//lib/method_source.rb#84 + # pkg:gem/method_source#lib/method_source.rb:84 def included(klass); end end end -# source://method_source//lib/method_source/source_location.rb#2 +# pkg:gem/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 + # pkg:gem/method_source#lib/method_source/source_location.rb:5 def source_location; end end -# source://method_source//lib/method_source/source_location.rb#10 +# pkg:gem/method_source#lib/method_source/source_location.rb:10 module MethodSource::SourceLocation; end -# source://method_source//lib/method_source/source_location.rb#11 +# pkg:gem/method_source#lib/method_source/source_location.rb:11 module MethodSource::SourceLocation::MethodExtensions + # JRuby version source_location hack + # @return [Array] A two element array containing the source location of the method # 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 + # pkg:gem/method_source#lib/method_source/source_location.rb:40 def source_location; end private - # source://method_source//lib/method_source/source_location.rb#26 + # pkg:gem/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 +# pkg:gem/method_source#lib/method_source/source_location.rb:54 module MethodSource::SourceLocation::ProcExtensions + # Return the source location for a Proc (Rubinius only) + # @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. # 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 + # pkg:gem/method_source#lib/method_source/source_location.rb:74 def source_location; end end -# source://method_source//lib/method_source/source_location.rb#81 +# pkg:gem/method_source#lib/method_source/source_location.rb:81 module MethodSource::SourceLocation::UnboundMethodExtensions + # JRuby version source_location hack + # @return [Array] A two element array containing the source location of the method # 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 + # pkg:gem/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 +# pkg:gem/method_source#lib/method_source.rb:16 class MethodSource::SourceNotFoundError < ::StandardError; end -# source://method_source//lib/method_source/version.rb#2 +# pkg:gem/method_source#lib/method_source/version.rb:2 MethodSource::VERSION = T.let(T.unsafe(nil), String) -# source://method_source//lib/method_source.rb#173 +# pkg:gem/method_source#lib/method_source.rb:173 class Proc include ::MethodSource::SourceLocation::ProcExtensions include ::MethodSource::MethodExtensions end -# source://method_source//lib/method_source.rb#168 +# pkg:gem/method_source#lib/method_source.rb:168 class UnboundMethod include ::MethodSource::SourceLocation::UnboundMethodExtensions include ::MethodSource::MethodExtensions diff --git a/sorbet/rbi/gems/minitest@5.25.5.rbi b/sorbet/rbi/gems/minitest@6.0.6.rbi similarity index 100% rename from sorbet/rbi/gems/minitest@5.25.5.rbi rename to sorbet/rbi/gems/minitest@6.0.6.rbi diff --git a/sorbet/rbi/gems/netrc@0.11.0.rbi b/sorbet/rbi/gems/netrc@0.11.0.rbi index 4ae989b..b1ad683 100644 --- a/sorbet/rbi/gems/netrc@0.11.0.rbi +++ b/sorbet/rbi/gems/netrc@0.11.0.rbi @@ -5,71 +5,61 @@ # Please instead update this file by running `bin/tapioca gem netrc`. -# source://netrc//lib/netrc.rb#3 +# pkg:gem/netrc#lib/netrc.rb:3 class Netrc - # @return [Netrc] a new instance of Netrc - # - # source://netrc//lib/netrc.rb#166 + # pkg:gem/netrc#lib/netrc.rb:166 def initialize(path, data); end - # source://netrc//lib/netrc.rb#180 + # pkg:gem/netrc#lib/netrc.rb:180 def [](k); end - # source://netrc//lib/netrc.rb#188 + # pkg:gem/netrc#lib/netrc.rb:188 def []=(k, info); end - # source://netrc//lib/netrc.rb#200 + # pkg:gem/netrc#lib/netrc.rb:200 def delete(key); end - # source://netrc//lib/netrc.rb#211 + # pkg:gem/netrc#lib/netrc.rb:211 def each(&block); end - # source://netrc//lib/netrc.rb#196 + # pkg:gem/netrc#lib/netrc.rb:196 def length; end - # source://netrc//lib/netrc.rb#215 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/netrc#lib/netrc.rb:178 def new_item_prefix=(_arg0); end - # source://netrc//lib/netrc.rb#219 + # pkg:gem/netrc#lib/netrc.rb:219 def save; end - # source://netrc//lib/netrc.rb#233 + # pkg:gem/netrc#lib/netrc.rb:233 def unparse; end class << self - # source://netrc//lib/netrc.rb#42 + # pkg:gem/netrc#lib/netrc.rb:42 def check_permissions(path); end - # source://netrc//lib/netrc.rb#33 + # pkg:gem/netrc#lib/netrc.rb:33 def config; end - # @yield [self.config] - # - # source://netrc//lib/netrc.rb#37 + # pkg:gem/netrc#lib/netrc.rb:37 def configure; end - # source://netrc//lib/netrc.rb#10 + # pkg:gem/netrc#lib/netrc.rb:10 def default_path; end - # source://netrc//lib/netrc.rb#14 + # pkg:gem/netrc#lib/netrc.rb:14 def home_path; end - # source://netrc//lib/netrc.rb#85 + # pkg:gem/netrc#lib/netrc.rb:85 def lex(lines); end - # source://netrc//lib/netrc.rb#29 + # pkg:gem/netrc#lib/netrc.rb:29 def netrc_filename; end # Returns two values, a header and a list of items. @@ -84,76 +74,74 @@ class Netrc # This lets us change individual fields, then write out the file # with all its original formatting. # - # source://netrc//lib/netrc.rb#129 + # pkg:gem/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 + # pkg:gem/netrc#lib/netrc.rb:51 def read(path = T.unsafe(nil)); end - # @return [Boolean] - # - # source://netrc//lib/netrc.rb#112 + # pkg:gem/netrc#lib/netrc.rb:112 def skip?(s); end end end -# source://netrc//lib/netrc.rb#8 +# pkg:gem/netrc#lib/netrc.rb:8 Netrc::CYGWIN = T.let(T.unsafe(nil), T.untyped) -# source://netrc//lib/netrc.rb#244 +# pkg:gem/netrc#lib/netrc.rb:244 class Netrc::Entry < ::Struct - # Returns the value of attribute login - # - # @return [Object] the current value of login + # pkg:gem/netrc#lib/netrc.rb:244 def login; end - # Sets the attribute login - # - # @param value [Object] the value to set the attribute login to. - # @return [Object] the newly set value + # pkg:gem/netrc#lib/netrc.rb:244 def login=(_); end - # Returns the value of attribute password - # - # @return [Object] the current value of password + # pkg:gem/netrc#lib/netrc.rb:244 def password; end - # Sets the attribute password - # - # @param value [Object] the value to set the attribute password to. - # @return [Object] the newly set value + # pkg:gem/netrc#lib/netrc.rb:244 def password=(_); end + # pkg:gem/netrc#lib/netrc.rb:245 def to_ary; end class << self + # pkg:gem/netrc#lib/netrc.rb:244 def [](*_arg0); end + + # pkg:gem/netrc#lib/netrc.rb:244 def inspect; end + + # pkg:gem/netrc#lib/netrc.rb:244 def keyword_init?; end + + # pkg:gem/netrc#lib/netrc.rb:244 def members; end + + # pkg:gem/netrc#lib/netrc.rb:244 def new(*_arg0); end end end -# source://netrc//lib/netrc.rb#250 +# pkg:gem/netrc#lib/netrc.rb:250 class Netrc::Error < ::StandardError; end -# source://netrc//lib/netrc.rb#68 +# pkg:gem/netrc#lib/netrc.rb:68 class Netrc::TokenArray < ::Array - # source://netrc//lib/netrc.rb#76 + # pkg:gem/netrc#lib/netrc.rb:76 def readto; end - # source://netrc//lib/netrc.rb#69 + # pkg:gem/netrc#lib/netrc.rb:69 def take; end end -# source://netrc//lib/netrc.rb#4 +# pkg:gem/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 +# pkg:gem/netrc#lib/netrc.rb:7 Netrc::WINDOWS = T.let(T.unsafe(nil), T.untyped) diff --git a/sorbet/rbi/gems/nokogiri@1.18.5.rbi b/sorbet/rbi/gems/nokogiri@1.19.4.rbi similarity index 100% rename from sorbet/rbi/gems/nokogiri@1.18.5.rbi rename to sorbet/rbi/gems/nokogiri@1.19.4.rbi diff --git a/sorbet/rbi/gems/packs-specification@0.0.10.rbi b/sorbet/rbi/gems/packs-specification@0.0.11.rbi similarity index 51% rename from sorbet/rbi/gems/packs-specification@0.0.10.rbi rename to sorbet/rbi/gems/packs-specification@0.0.11.rbi index 0e1bb25..42db78a 100644 --- a/sorbet/rbi/gems/packs-specification@0.0.10.rbi +++ b/sorbet/rbi/gems/packs-specification@0.0.11.rbi @@ -9,118 +9,133 @@ # because this allows a production environment to require `packs-specification` only and get some simple functionality, without # needing to load all of `packs`. # -# source://packs-specification//lib/packs/pack.rb#3 +# pkg:gem/packs-specification#lib/packs/pack.rb:3 module Packs class << self - # source://packs-specification//lib/packs-specification.rb#19 + # pkg:gem/packs-specification#lib/packs-specification.rb:19 sig { returns(T::Array[::Packs::Pack]) } def all; end - # source://packs-specification//lib/packs-specification.rb#24 + # pkg:gem/packs-specification#lib/packs-specification.rb:24 sig { params(name: ::String).returns(T.nilable(::Packs::Pack)) } def find(name); end - # source://packs-specification//lib/packs-specification.rb#29 + # pkg:gem/packs-specification#lib/packs-specification.rb:29 sig { params(file_path: T.any(::Pathname, ::String)).returns(T.nilable(::Packs::Pack)) } def for_file(file_path); end end end -# source://packs-specification//lib/packs-specification.rb#13 +# pkg:gem/packs-specification#lib/packs-specification.rb:13 Packs::PACKAGE_FILE = T.let(T.unsafe(nil), String) -# source://packs-specification//lib/packs/pack.rb#4 -class Packs::Pack < ::T::Struct - const :name, ::String - const :path, ::Pathname - const :relative_path, ::Pathname - const :raw_hash, T::Hash[T.untyped, T.untyped] +# pkg:gem/packs-specification#lib/packs/pack.rb:4 +class Packs::Pack + # pkg:gem/packs-specification#lib/packs/pack.rb:17 + sig { params(name: ::String, path: ::Pathname, relative_path: ::Pathname).void } + def initialize(name:, path:, relative_path:); end - # source://packs-specification//lib/packs/pack.rb#39 + # pkg:gem/packs-specification#lib/packs/pack.rb:55 sig { returns(T::Boolean) } def is_gem?; end - # source://packs-specification//lib/packs/pack.rb#34 + # pkg:gem/packs-specification#lib/packs/pack.rb:50 sig { returns(::String) } def last_name; end - # source://packs-specification//lib/packs/pack.rb#44 + # pkg:gem/packs-specification#lib/packs/pack.rb:60 sig { returns(T::Hash[T.untyped, T.untyped]) } def metadata; end - # source://packs-specification//lib/packs/pack.rb#28 + # pkg:gem/packs-specification#lib/packs/pack.rb:8 + sig { returns(::String) } + def name; end + + # pkg:gem/packs-specification#lib/packs/pack.rb:11 + sig { returns(::Pathname) } + def path; end + + # pkg:gem/packs-specification#lib/packs/pack.rb:39 + sig { returns(T::Hash[T.untyped, T.untyped]) } + def raw_hash; end + + # pkg:gem/packs-specification#lib/packs/pack.rb:14 + sig { returns(::Pathname) } + def relative_path; end + + # pkg:gem/packs-specification#lib/packs/pack.rb:44 sig { params(relative: T::Boolean).returns(::Pathname) } def yml(relative: T.unsafe(nil)); end + private + + # pkg:gem/packs-specification#lib/packs/pack.rb:65 + sig { returns(T::Array[::Symbol]) } + def instance_variables_to_inspect; end + class << self - # source://packs-specification//lib/packs/pack.rb#13 + # pkg:gem/packs-specification#lib/packs/pack.rb:26 sig { params(package_yml_absolute_path: ::Pathname).returns(::Packs::Pack) } def from(package_yml_absolute_path); end - - # source://sorbet-runtime/0.5.11953/lib/types/struct.rb#13 - def inherited(s); end end end -# source://packs-specification//lib/packs/specification/configuration.rb#4 +# pkg:gem/packs-specification#lib/packs/specification/configuration.rb:4 module Packs::Specification class << self - # source://packs-specification//lib/packs/specification.rb#31 + # pkg:gem/packs-specification#lib/packs/specification.rb:31 sig { returns(T::Array[::Packs::Pack]) } def all; end - # source://packs-specification//lib/packs/specification.rb#24 + # pkg:gem/packs-specification#lib/packs/specification.rb:24 sig { void } def bust_cache!; end - # source://packs-specification//lib/packs/specification.rb#18 + # pkg:gem/packs-specification#lib/packs/specification.rb:18 sig { returns(::Packs::Specification::Configuration) } def config; end - # source://packs-specification//lib/packs/specification.rb#36 + # pkg:gem/packs-specification#lib/packs/specification.rb:36 sig { params(name: ::String).returns(T.nilable(::Packs::Pack)) } def find(name); end - # source://packs-specification//lib/packs/specification.rb#41 + # pkg:gem/packs-specification#lib/packs/specification.rb:41 sig { params(file_path: T.any(::Pathname, ::String)).returns(T.nilable(::Packs::Pack)) } def for_file(file_path); end - # source://packs-specification//lib/packs/specification.rb#13 + # pkg:gem/packs-specification#lib/packs/specification.rb:13 sig { returns(::Pathname) } def root; end private - # source://packs-specification//lib/packs/specification.rb#65 + # pkg:gem/packs-specification#lib/packs/specification.rb:65 sig { returns(T::Array[::Pathname]) } def package_glob_patterns; end - # source://packs-specification//lib/packs/specification.rb#51 + # pkg:gem/packs-specification#lib/packs/specification.rb:51 sig { returns(T::Hash[::String, ::Packs::Pack]) } def packs_by_name; end end end -# source://packs-specification//lib/packs/specification/configuration.rb#5 +# pkg:gem/packs-specification#lib/packs/specification/configuration.rb:5 class Packs::Specification::Configuration < ::T::Struct prop :pack_paths, T::Array[::String] class << self - # source://packs-specification//lib/packs/specification/configuration.rb#17 + # pkg:gem/packs-specification#lib/packs/specification/configuration.rb:17 sig { returns(::Packs::Specification::Configuration) } def fetch; end - # source://sorbet-runtime/0.5.11953/lib/types/struct.rb#13 - def inherited(s); end - - # source://packs-specification//lib/packs/specification/configuration.rb#26 + # pkg:gem/packs-specification#lib/packs/specification/configuration.rb:26 sig { params(config_hash: T::Hash[T.untyped, T.untyped]).returns(T::Array[::String]) } def pack_paths(config_hash); end end end -# source://packs-specification//lib/packs/specification/configuration.rb#7 +# pkg:gem/packs-specification#lib/packs/specification/configuration.rb:7 Packs::Specification::Configuration::CONFIGURATION_PATHNAME = T.let(T.unsafe(nil), Pathname) -# source://packs-specification//lib/packs/specification/configuration.rb#9 +# pkg:gem/packs-specification#lib/packs/specification/configuration.rb:9 Packs::Specification::Configuration::DEFAULT_PACK_PATHS = T.let(T.unsafe(nil), Array) diff --git a/sorbet/rbi/gems/packwerk@3.2.2.rbi b/sorbet/rbi/gems/packwerk@3.3.1.rbi similarity index 100% rename from sorbet/rbi/gems/packwerk@3.2.2.rbi rename to sorbet/rbi/gems/packwerk@3.3.1.rbi diff --git a/sorbet/rbi/gems/parallel@1.26.3.rbi b/sorbet/rbi/gems/parallel@1.26.3.rbi deleted file mode 100644 index 854c487..0000000 --- a/sorbet/rbi/gems/parallel@1.26.3.rbi +++ /dev/null @@ -1,291 +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 - class << self - # @return [Boolean] - # - # source://parallel//lib/parallel.rb#243 - def all?(*args, &block); end - - # @return [Boolean] - # - # source://parallel//lib/parallel.rb#238 - def any?(*args, &block); end - - # source://parallel//lib/parallel.rb#234 - def each(array, options = T.unsafe(nil), &block); end - - # source://parallel//lib/parallel.rb#248 - def each_with_index(array, options = T.unsafe(nil), &block); end - - # source://parallel//lib/parallel.rb#307 - def filter_map(*_arg0, **_arg1, &_arg2); end - - # source://parallel//lib/parallel.rb#303 - def flat_map(*_arg0, **_arg1, &_arg2); end - - # source://parallel//lib/parallel.rb#228 - def in_processes(options = T.unsafe(nil), &block); end - - # source://parallel//lib/parallel.rb#212 - def in_threads(options = T.unsafe(nil)); end - - # source://parallel//lib/parallel.rb#252 - def map(source, options = T.unsafe(nil), &block); end - - # source://parallel//lib/parallel.rb#299 - def map_with_index(array, options = T.unsafe(nil), &block); end - - # Number of physical processor cores on the current system. - # - # source://parallel//lib/parallel.rb#312 - def physical_processor_count; end - - # Number of processors seen by the OS or value considering CPU quota if the process is inside a cgroup, - # used for process scheduling - # - # source://parallel//lib/parallel.rb#342 - def processor_count; end - - # source://parallel//lib/parallel.rb#346 - 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#351 - def worker_number=(worker_num); end - - private - - # source://parallel//lib/parallel.rb#384 - def add_progress_bar!(job_factory, options); end - - # source://parallel//lib/parallel.rb#699 - def available_processor_count; end - - # source://parallel//lib/parallel.rb#647 - def call_with_index(item, index, options, &block); end - - # source://parallel//lib/parallel.rb#579 - def create_workers(job_factory, options, &block); end - - # options is either a Integer or a Hash with :count - # - # source://parallel//lib/parallel.rb#637 - def extract_count_from_options(options); end - - # source://parallel//lib/parallel.rb#665 - def instrument_finish(item, index, result, options); end - - # yield results in the order of the input items - # needs to use `options` to store state between executions - # needs to use `done` index since a nil result would also be valid - # - # source://parallel//lib/parallel.rb#674 - def instrument_finish_in_order(item, index, result, options); end - - # source://parallel//lib/parallel.rb#694 - def instrument_start(item, index, options); end - - # source://parallel//lib/parallel.rb#357 - def physical_processor_count_windows; end - - # source://parallel//lib/parallel.rb#613 - def process_incoming_jobs(read, write, job_factory, options, &block); end - - # source://parallel//lib/parallel.rb#567 - def replace_worker(job_factory, workers, index, options, blk); end - - # source://parallel//lib/parallel.rb#378 - def run(command); end - - # source://parallel//lib/parallel.rb#658 - def with_instrumentation(item, index, options); end - - # source://parallel//lib/parallel.rb#409 - def work_direct(job_factory, options, &block); end - - # source://parallel//lib/parallel.rb#519 - def work_in_processes(job_factory, options, &blk); end - - # source://parallel//lib/parallel.rb#453 - def work_in_ractors(job_factory, options); end - - # source://parallel//lib/parallel.rb#428 - def work_in_threads(job_factory, options, &block); end - - # source://parallel//lib/parallel.rb#587 - def worker(job_factory, options, &block); end - end -end - -# source://parallel//lib/parallel.rb#11 -class Parallel::Break < ::StandardError - # @return [Break] a new instance of Break - # - # source://parallel//lib/parallel.rb#14 - def initialize(value = T.unsafe(nil)); end - - # Returns the value of attribute value. - # - # source://parallel//lib/parallel.rb#12 - def value; end -end - -# source://parallel//lib/parallel.rb#8 -class Parallel::DeadWorker < ::StandardError; end - -# source://parallel//lib/parallel.rb#32 -class Parallel::ExceptionWrapper - # @return [ExceptionWrapper] a new instance of ExceptionWrapper - # - # source://parallel//lib/parallel.rb#35 - def initialize(exception); end - - # Returns the value of attribute exception. - # - # source://parallel//lib/parallel.rb#33 - def exception; end -end - -# source://parallel//lib/parallel.rb#98 -class Parallel::JobFactory - # @return [JobFactory] a new instance of JobFactory - # - # source://parallel//lib/parallel.rb#99 - def initialize(source, mutex); end - - # source://parallel//lib/parallel.rb#107 - 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#136 - def pack(item, index); end - - # source://parallel//lib/parallel.rb#126 - def size; end - - # unpack item that is sent to workers - # - # source://parallel//lib/parallel.rb#141 - def unpack(data); end - - private - - # @return [Boolean] - # - # source://parallel//lib/parallel.rb#147 - def producer?; end - - # source://parallel//lib/parallel.rb#151 - def queue_wrapper(array); end -end - -# source://parallel//lib/parallel.rb#20 -class Parallel::Kill < ::Parallel::Break; end - -# source://parallel//lib/parallel.rb#6 -Parallel::Stop = T.let(T.unsafe(nil), Object) - -# source://parallel//lib/parallel.rb#23 -class Parallel::UndumpableException < ::StandardError - # @return [UndumpableException] a new instance of UndumpableException - # - # source://parallel//lib/parallel.rb#26 - def initialize(original); end - - # Returns the value of attribute backtrace. - # - # source://parallel//lib/parallel.rb#24 - def backtrace; end -end - -# source://parallel//lib/parallel.rb#156 -class Parallel::UserInterruptHandler - class << self - # source://parallel//lib/parallel.rb#181 - def kill(thing); end - - # kill all these pids or threads if user presses Ctrl+c - # - # source://parallel//lib/parallel.rb#161 - def kill_on_ctrl_c(pids, options); end - - private - - # source://parallel//lib/parallel.rb#205 - def restore_interrupt(old, signal); end - - # source://parallel//lib/parallel.rb#190 - def trap_interrupt(signal); end - end -end - -# source://parallel//lib/parallel.rb#157 -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#51 -class Parallel::Worker - # @return [Worker] a new instance of Worker - # - # source://parallel//lib/parallel.rb#55 - 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#68 - def close_pipes; end - - # Returns the value of attribute pid. - # - # source://parallel//lib/parallel.rb#52 - def pid; end - - # Returns the value of attribute read. - # - # source://parallel//lib/parallel.rb#52 - def read; end - - # source://parallel//lib/parallel.rb#61 - def stop; end - - # Returns the value of attribute thread. - # - # source://parallel//lib/parallel.rb#53 - def thread; end - - # Sets the attribute thread - # - # @param value the value to set the attribute thread to. - # - # source://parallel//lib/parallel.rb#53 - def thread=(_arg0); end - - # source://parallel//lib/parallel.rb#73 - def work(data); end - - # Returns the value of attribute write. - # - # source://parallel//lib/parallel.rb#52 - def write; end - - private - - # source://parallel//lib/parallel.rb#91 - def wait; end -end diff --git a/sorbet/rbi/gems/parallel@2.3.0.rbi b/sorbet/rbi/gems/parallel@2.3.0.rbi new file mode 100644 index 0000000..77e77e1 --- /dev/null +++ b/sorbet/rbi/gems/parallel@2.3.0.rbi @@ -0,0 +1,332 @@ +# 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`. + + +# pkg:gem/parallel#lib/parallel/version.rb:2 +module Parallel + class << self + # pkg:gem/parallel#lib/parallel.rb:256 + def all?(*args, &block); end + + # pkg:gem/parallel#lib/parallel.rb:251 + def any?(*args, &block); end + + # pkg:gem/parallel#lib/parallel.rb:247 + def each(array, options = T.unsafe(nil), &block); end + + # pkg:gem/parallel#lib/parallel.rb:261 + def each_with_index(array, options = T.unsafe(nil), &block); end + + # pkg:gem/parallel#lib/parallel.rb:333 + def filter_map(*, **, &); end + + # pkg:gem/parallel#lib/parallel.rb:329 + def flat_map(*, **, &); end + + # pkg:gem/parallel#lib/parallel.rb:241 + def in_processes(options = T.unsafe(nil), &block); end + + # pkg:gem/parallel#lib/parallel.rb:225 + def in_threads(options = T.unsafe(nil)); end + + # pkg:gem/parallel#lib/parallel.rb:265 + def map(source, options = T.unsafe(nil), &block); end + + # pkg:gem/parallel#lib/parallel.rb:325 + def map_with_index(array, options = T.unsafe(nil), &block); end + + # Number of physical processor cores on the current system. + # + # pkg:gem/parallel#lib/parallel.rb:338 + def physical_processor_count; end + + # Number of processors seen by the OS or value considering CPU quota if the process is inside a cgroup, + # used for process scheduling + # + # pkg:gem/parallel#lib/parallel.rb:368 + def processor_count; end + + # pkg:gem/parallel#lib/parallel.rb:372 + def worker_number; end + + # TODO: this does not work when doing threads in forks, so should remove and yield the number instead if needed + # + # pkg:gem/parallel#lib/parallel.rb:377 + def worker_number=(worker_num); end + + private + + # pkg:gem/parallel#lib/parallel.rb:410 + def add_progress_bar!(job_factory, options); end + + # pkg:gem/parallel#lib/parallel.rb:800 + def available_processor_count; end + + # pkg:gem/parallel#lib/parallel.rb:748 + def call_with_index(item, index, options, &block); end + + # pkg:gem/parallel#lib/parallel.rb:655 + def create_workers(job_factory, options, &block); end + + # options is either a Integer or a Hash with :count + # + # pkg:gem/parallel#lib/parallel.rb:738 + def extract_count_from_options(options); end + + # pkg:gem/parallel#lib/parallel.rb:766 + def instrument_finish(item, index, result, options); end + + # yield results in the order of the input items + # needs to use `options` to store state between executions + # needs to use `done` index since a nil result would also be valid + # + # pkg:gem/parallel#lib/parallel.rb:775 + def instrument_finish_in_order(item, index, result, options); end + + # pkg:gem/parallel#lib/parallel.rb:795 + def instrument_start(item, index, options); end + + # pkg:gem/parallel#lib/parallel.rb:383 + def physical_processor_count_windows; end + + # pkg:gem/parallel#lib/parallel.rb:713 + def process_incoming_jobs(read, write, job_factory, options, &block); end + + # ractors cannot execute blocks, so run the callback directly when not using ractors + # + # pkg:gem/parallel#lib/parallel.rb:548 + def ractor_block(options); end + + # pkg:gem/parallel#lib/parallel.rb:554 + def ractor_build(use_port); end + + # pkg:gem/parallel#lib/parallel.rb:577 + def ractor_result(item, index, result, results, results_mutex, options); end + + # pkg:gem/parallel#lib/parallel.rb:582 + def ractor_send(ractor, callback, job, options); end + + # pkg:gem/parallel#lib/parallel.rb:588 + def ractor_stop(ractor); end + + # pkg:gem/parallel#lib/parallel.rb:643 + def replace_worker(job_factory, workers, index, options, blk); end + + # pkg:gem/parallel#lib/parallel.rb:404 + def run(command); end + + # pkg:gem/parallel#lib/parallel.rb:759 + def with_instrumentation(item, index, options); end + + # pkg:gem/parallel#lib/parallel.rb:435 + def work_direct(job_factory, options, &block); end + + # pkg:gem/parallel#lib/parallel.rb:594 + def work_in_processes(job_factory, options, &blk); end + + # pkg:gem/parallel#lib/parallel.rb:481 + def work_in_ractors(job_factory, options); end + + # pkg:gem/parallel#lib/parallel.rb:456 + def work_in_threads(job_factory, options, &block); end + + # pkg:gem/parallel#lib/parallel.rb:670 + def worker(job_factory, options, &block); end + end +end + +# pkg:gem/parallel#lib/parallel.rb:12 +class Parallel::Break < ::StandardError + # pkg:gem/parallel#lib/parallel.rb:15 + def initialize(value = T.unsafe(nil)); end + + # marshal_dump that is used for ruby exceptions + # avoid dumping the cause since nobody needs that and it can include undumpable exceptions + # + # pkg:gem/parallel#lib/parallel.rb:22 + def _dump(_depth); end + + # pkg:gem/parallel#lib/parallel.rb:13 + def value; end + + class << self + # marshal_load that is used for ruby exceptions + # + # pkg:gem/parallel#lib/parallel.rb:27 + def _load(data); end + end +end + +# pkg:gem/parallel#lib/parallel.rb:9 +class Parallel::DeadWorker < ::StandardError; end + +# pkg:gem/parallel#lib/parallel.rb:44 +class Parallel::ExceptionWrapper + # pkg:gem/parallel#lib/parallel.rb:47 + def initialize(exception); end + + # pkg:gem/parallel#lib/parallel.rb:45 + def exception; end +end + +# pkg:gem/parallel#lib/parallel.rb:111 +class Parallel::JobFactory + # pkg:gem/parallel#lib/parallel.rb:112 + def initialize(source, mutex); end + + # pkg:gem/parallel#lib/parallel.rb:120 + def next; end + + # generate item that is sent to workers + # just index is faster + less likely to blow up with unserializable errors + # + # pkg:gem/parallel#lib/parallel.rb:149 + def pack(item, index); end + + # pkg:gem/parallel#lib/parallel.rb:139 + def size; end + + # unpack item that is sent to workers + # + # pkg:gem/parallel#lib/parallel.rb:154 + def unpack(data); end + + private + + # pkg:gem/parallel#lib/parallel.rb:160 + def producer?; end + + # pkg:gem/parallel#lib/parallel.rb:164 + def queue_wrapper(array); end +end + +# pkg:gem/parallel#lib/parallel.rb:32 +class Parallel::Kill < ::Parallel::Break; end + +# Pluggable wire serializers. Each must respond to `dump(data, io)` / +# `load(io)` (used directly by Worker) and `dump(data)` / `load(string)` +# (used by wrappers like Hmac). +# +# pkg:gem/parallel#lib/parallel/serializer.rb:9 +module Parallel::Serializer; end + +# Wraps any inner serializer with a length-prefixed HMAC-SHA256 frame keyed +# on a per-worker secret generated before fork. Forged frames from a +# pipe-injector fail verification. +# +# pkg:gem/parallel#lib/parallel/serializer.rb:17 +class Parallel::Serializer::Hmac + # SHA256 + # + # pkg:gem/parallel#lib/parallel/serializer.rb:22 + def initialize(inner: T.unsafe(nil), secret: T.unsafe(nil)); end + + # pkg:gem/parallel#lib/parallel/serializer.rb:31 + def dump(data, io); end + + # pkg:gem/parallel#lib/parallel/serializer.rb:27 + def inspect; end + + # pkg:gem/parallel#lib/parallel/serializer.rb:37 + def load(io); end +end + +# 32-bit big-endian unsigned int +# +# pkg:gem/parallel#lib/parallel/serializer.rb:19 +Parallel::Serializer::Hmac::LENGTH_BYTES = T.let(T.unsafe(nil), Integer) + +# pkg:gem/parallel#lib/parallel/serializer.rb:18 +Parallel::Serializer::Hmac::LENGTH_FORMAT = T.let(T.unsafe(nil), String) + +# pkg:gem/parallel#lib/parallel/serializer.rb:20 +Parallel::Serializer::Hmac::MAC_BYTES = T.let(T.unsafe(nil), Integer) + +# Raw Marshal. Fast but trusts anything written to the pipe — a same-UID +# attacker that reopens /proc//fd/ can inject Marshal gadgets (RCE). +# +# pkg:gem/parallel#lib/parallel/serializer.rb:12 +Parallel::Serializer::Marshal = Marshal + +# pkg:gem/parallel#lib/parallel.rb:7 +Parallel::Stop = T.let(T.unsafe(nil), Object) + +# pkg:gem/parallel#lib/parallel.rb:35 +class Parallel::UndumpableException < ::StandardError + # pkg:gem/parallel#lib/parallel.rb:38 + def initialize(original); end + + # pkg:gem/parallel#lib/parallel.rb:36 + def backtrace; end +end + +# pkg:gem/parallel#lib/parallel.rb:169 +class Parallel::UserInterruptHandler + class << self + # pkg:gem/parallel#lib/parallel.rb:194 + def kill(thing); end + + # kill all these pids or threads if user presses Ctrl+c + # + # pkg:gem/parallel#lib/parallel.rb:174 + def kill_on_ctrl_c(pids, options); end + + private + + # pkg:gem/parallel#lib/parallel.rb:218 + def restore_interrupt(old, signal); end + + # pkg:gem/parallel#lib/parallel.rb:203 + def trap_interrupt(signal); end + end +end + +# pkg:gem/parallel#lib/parallel.rb:170 +Parallel::UserInterruptHandler::INTERRUPT_SIGNAL = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/parallel#lib/parallel/version.rb:3 +Parallel::VERSION = T.let(T.unsafe(nil), String) + +# pkg:gem/parallel#lib/parallel/version.rb:3 +Parallel::Version = T.let(T.unsafe(nil), String) + +# pkg:gem/parallel#lib/parallel.rb:63 +class Parallel::Worker + # pkg:gem/parallel#lib/parallel.rb:67 + def initialize(read, write, pid, serializer); 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 + # + # pkg:gem/parallel#lib/parallel.rb:81 + def close_pipes; end + + # pkg:gem/parallel#lib/parallel.rb:64 + def pid; end + + # pkg:gem/parallel#lib/parallel.rb:64 + def read; end + + # pkg:gem/parallel#lib/parallel.rb:74 + def stop; end + + # pkg:gem/parallel#lib/parallel.rb:65 + def thread; end + + # pkg:gem/parallel#lib/parallel.rb:65 + def thread=(_arg0); end + + # pkg:gem/parallel#lib/parallel.rb:86 + def work(data); end + + # pkg:gem/parallel#lib/parallel.rb:64 + def write; end + + private + + # pkg:gem/parallel#lib/parallel.rb:104 + def wait; end +end diff --git a/sorbet/rbi/gems/parse_packwerk@0.26.0.rbi b/sorbet/rbi/gems/parse_packwerk@0.28.0.rbi similarity index 55% rename from sorbet/rbi/gems/parse_packwerk@0.26.0.rbi rename to sorbet/rbi/gems/parse_packwerk@0.28.0.rbi index beff091..c37c827 100644 --- a/sorbet/rbi/gems/parse_packwerk@0.26.0.rbi +++ b/sorbet/rbi/gems/parse_packwerk@0.28.0.rbi @@ -5,34 +5,51 @@ # Please instead update this file by running `bin/tapioca gem parse_packwerk`. -# source://parse_packwerk//lib/parse_packwerk/constants.rb#3 +# pkg:gem/parse_packwerk#lib/parse_packwerk/constants.rb:4 module ParsePackwerk class << self - # source://parse_packwerk//lib/parse_packwerk.rb#37 + # pkg:gem/parse_packwerk#lib/parse_packwerk.rb:51 sig { returns(T::Array[::ParsePackwerk::Package]) } def all; end - # source://parse_packwerk//lib/parse_packwerk.rb#134 + # pkg:gem/parse_packwerk#lib/parse_packwerk.rb:164 sig { void } def bust_cache!; end - # source://parse_packwerk//lib/parse_packwerk.rb#42 + # pkg:gem/parse_packwerk#lib/parse_packwerk.rb:56 sig { params(name: ::String).returns(T.nilable(::ParsePackwerk::Package)) } def find(name); end - # source://parse_packwerk//lib/parse_packwerk.rb#103 + # pkg:gem/parse_packwerk#lib/parse_packwerk.rb:133 sig { returns(T::Array[::String]) } def key_sort_order; end - # source://parse_packwerk//lib/parse_packwerk.rb#52 + # pkg:gem/parse_packwerk#lib/parse_packwerk.rb:66 sig { params(file_path: T.any(::Pathname, ::String)).returns(::ParsePackwerk::Package) } def package_from_path(file_path); end - # source://parse_packwerk//lib/parse_packwerk.rb#63 + # pkg:gem/parse_packwerk#lib/parse_packwerk.rb:45 + sig { returns(T::Boolean) } + def preserve_key_order; end + + # pkg:gem/parse_packwerk#lib/parse_packwerk.rb:45 + sig { params(preserve_key_order: T::Boolean).returns(T::Boolean) } + def preserve_key_order=(preserve_key_order); end + + # pkg:gem/parse_packwerk#lib/parse_packwerk.rb:116 + sig do + params( + config: T::Hash[T.untyped, T.untyped], + original_key_order: T::Array[::String] + ).returns(T::Hash[T.untyped, T.untyped]) + end + def sort_keys(config, original_key_order); end + + # pkg:gem/parse_packwerk#lib/parse_packwerk.rb:77 sig { params(package: ::ParsePackwerk::Package).void } def write_package_yml!(package); end - # source://parse_packwerk//lib/parse_packwerk.rb#47 + # pkg:gem/parse_packwerk#lib/parse_packwerk.rb:61 sig { returns(::ParsePackwerk::Configuration) } def yml; end @@ -41,13 +58,13 @@ module ParsePackwerk # We memoize packages_by_name for fast lookup. # Since Graph is an immutable value object, we can create indexes and general caching mechanisms safely. # - # source://parse_packwerk//lib/parse_packwerk.rb#122 + # pkg:gem/parse_packwerk#lib/parse_packwerk.rb:152 sig { returns(T::Hash[::String, ::ParsePackwerk::Package]) } def packages_by_name; end end end -# source://parse_packwerk//lib/parse_packwerk/configuration.rb#4 +# pkg:gem/parse_packwerk#lib/parse_packwerk/configuration.rb:5 class ParsePackwerk::Configuration < ::T::Struct const :exclude, T::Array[::String] const :package_paths, T::Array[::String] @@ -55,96 +72,96 @@ class ParsePackwerk::Configuration < ::T::Struct const :raw, T::Hash[::String, T.untyped] class << self - # source://parse_packwerk//lib/parse_packwerk/configuration.rb#32 + # pkg:gem/parse_packwerk#lib/parse_packwerk/configuration.rb:33 sig { params(config_hash: T::Hash[T.untyped, T.untyped]).returns(T::Array[::String]) } def excludes(config_hash); end - # source://parse_packwerk//lib/parse_packwerk/configuration.rb#13 + # pkg:gem/parse_packwerk#lib/parse_packwerk/configuration.rb:14 sig { returns(::ParsePackwerk::Configuration) } def fetch; end - # source://sorbet-runtime/0.5.11953/lib/types/struct.rb#13 - def inherited(s); end - - # source://parse_packwerk//lib/parse_packwerk/configuration.rb#44 + # pkg:gem/parse_packwerk#lib/parse_packwerk/configuration.rb:51 sig { params(config_hash: T::Hash[T.untyped, T.untyped]).returns(T::Array[::String]) } def package_paths(config_hash); end end end -# source://parse_packwerk//lib/parse_packwerk/constants.rb#23 +# pkg:gem/parse_packwerk#lib/parse_packwerk/constants.rb:25 ParsePackwerk::DEFAULT_EXCLUDE_GLOBS = T.let(T.unsafe(nil), Array) -# source://parse_packwerk//lib/parse_packwerk/constants.rb#24 +# pkg:gem/parse_packwerk#lib/parse_packwerk/constants.rb:26 ParsePackwerk::DEFAULT_PACKAGE_PATHS = T.let(T.unsafe(nil), Array) -# source://parse_packwerk//lib/parse_packwerk/constants.rb#25 +# pkg:gem/parse_packwerk#lib/parse_packwerk/constants.rb:27 ParsePackwerk::DEFAULT_PUBLIC_PATH = T.let(T.unsafe(nil), String) -# source://parse_packwerk//lib/parse_packwerk/constants.rb#15 +# pkg:gem/parse_packwerk#lib/parse_packwerk/constants.rb:17 ParsePackwerk::DEPENDENCIES = T.let(T.unsafe(nil), String) -# source://parse_packwerk//lib/parse_packwerk/constants.rb#11 +# pkg:gem/parse_packwerk#lib/parse_packwerk/constants.rb:12 ParsePackwerk::DEPENDENCY_VIOLATION_TYPE = T.let(T.unsafe(nil), String) -# source://parse_packwerk//lib/parse_packwerk/constants.rb#8 +# pkg:gem/parse_packwerk#lib/parse_packwerk/constants.rb:9 ParsePackwerk::ENFORCE_DEPENDENCIES = T.let(T.unsafe(nil), String) -# source://parse_packwerk//lib/parse_packwerk/constants.rb#10 +# pkg:gem/parse_packwerk#lib/parse_packwerk/constants.rb:11 ParsePackwerk::ENFORCE_LAYERS = T.let(T.unsafe(nil), String) -# source://parse_packwerk//lib/parse_packwerk/constants.rb#9 +# pkg:gem/parse_packwerk#lib/parse_packwerk/constants.rb:10 ParsePackwerk::ENFORCE_PRIVACY = T.let(T.unsafe(nil), String) -# source://parse_packwerk//lib/parse_packwerk/extensions.rb#4 +# pkg:gem/parse_packwerk#lib/parse_packwerk/extensions.rb:5 module ParsePackwerk::Extensions class << self - # source://parse_packwerk//lib/parse_packwerk/extensions.rb#8 + # pkg:gem/parse_packwerk#lib/parse_packwerk/extensions.rb:9 sig { returns(T::Boolean) } def all_extensions_installed?; end - # source://parse_packwerk//lib/parse_packwerk/extensions.rb#18 + # pkg:gem/parse_packwerk#lib/parse_packwerk/extensions.rb:19 sig { returns(T::Boolean) } def layer_extension_installed?; end - # source://parse_packwerk//lib/parse_packwerk/extensions.rb#13 + # pkg:gem/parse_packwerk#lib/parse_packwerk/extensions.rb:14 sig { returns(T::Boolean) } def privacy_extension_installed?; end end end -# source://parse_packwerk//lib/parse_packwerk/constants.rb#14 +# pkg:gem/parse_packwerk#lib/parse_packwerk/constants.rb:16 ParsePackwerk::METADATA = T.let(T.unsafe(nil), String) # Since this metadata is unstructured YAML, it could be any type. We leave it to clients of `ParsePackwerk::Package` # to add types based on their known usage of metadata. # -# source://parse_packwerk//lib/parse_packwerk/constants.rb#19 +# pkg:gem/parse_packwerk#lib/parse_packwerk/constants.rb:21 ParsePackwerk::MetadataYmlType = T.type_alias { T::Hash[T.untyped, T.untyped] } -# source://parse_packwerk//lib/parse_packwerk.rb#23 +# pkg:gem/parse_packwerk#lib/parse_packwerk.rb:24 class ParsePackwerk::MissingConfiguration < ::StandardError - # source://parse_packwerk//lib/parse_packwerk.rb#27 + # pkg:gem/parse_packwerk#lib/parse_packwerk.rb:28 sig { params(packwerk_file_name: ::Pathname).void } def initialize(packwerk_file_name); end end -# source://parse_packwerk//lib/parse_packwerk/constants.rb#7 +# pkg:gem/parse_packwerk#lib/parse_packwerk/constants.rb:15 +ParsePackwerk::OWNER = T.let(T.unsafe(nil), String) + +# pkg:gem/parse_packwerk#lib/parse_packwerk/constants.rb:8 ParsePackwerk::PACKAGE_TODO_YML_NAME = T.let(T.unsafe(nil), String) -# source://parse_packwerk//lib/parse_packwerk/constants.rb#5 +# pkg:gem/parse_packwerk#lib/parse_packwerk/constants.rb:6 ParsePackwerk::PACKAGE_YML_NAME = T.let(T.unsafe(nil), String) -# source://parse_packwerk//lib/parse_packwerk/constants.rb#6 +# pkg:gem/parse_packwerk#lib/parse_packwerk/constants.rb:7 ParsePackwerk::PACKWERK_YML_NAME = T.let(T.unsafe(nil), String) -# source://parse_packwerk//lib/parse_packwerk/constants.rb#12 +# pkg:gem/parse_packwerk#lib/parse_packwerk/constants.rb:13 ParsePackwerk::PRIVACY_VIOLATION_TYPE = T.let(T.unsafe(nil), String) -# source://parse_packwerk//lib/parse_packwerk/constants.rb#13 +# pkg:gem/parse_packwerk#lib/parse_packwerk/constants.rb:14 ParsePackwerk::PUBLIC_PATH = T.let(T.unsafe(nil), String) -# source://parse_packwerk//lib/parse_packwerk/package.rb#4 +# pkg:gem/parse_packwerk#lib/parse_packwerk/package.rb:5 class ParsePackwerk::Package < ::T::Struct const :name, ::String const :enforce_dependencies, T.nilable(T.any(::String, T::Boolean)) @@ -155,52 +172,61 @@ class ParsePackwerk::Package < ::T::Struct const :dependencies, T::Array[::String] const :config, T::Hash[T.untyped, T.untyped] const :violations, T::Array[::ParsePackwerk::Violation] + const :original_key_order, T::Array[::String], default: T.unsafe(nil) - # source://parse_packwerk//lib/parse_packwerk/package.rb#46 + # pkg:gem/parse_packwerk#lib/parse_packwerk/package.rb:52 sig { returns(::Pathname) } def directory; end - # source://parse_packwerk//lib/parse_packwerk/package.rb#56 + # pkg:gem/parse_packwerk#lib/parse_packwerk/package.rb:62 sig { returns(T.nilable(T.any(::String, T::Boolean))) } def enforces_dependencies?; end - # source://parse_packwerk//lib/parse_packwerk/package.rb#66 + # pkg:gem/parse_packwerk#lib/parse_packwerk/package.rb:72 sig { returns(T.any(::String, T::Boolean)) } def enforces_layers?; end - # source://parse_packwerk//lib/parse_packwerk/package.rb#61 + # pkg:gem/parse_packwerk#lib/parse_packwerk/package.rb:67 sig { returns(T.any(::String, T::Boolean)) } def enforces_privacy?; end - # source://parse_packwerk//lib/parse_packwerk/package.rb#51 + # `owner` is read from `config` rather than stored as a prop, so edits through `config` and `with(owner:)` can't disagree. + # Only the top-level key is read. Unlike `CodeOwnership.for_package`, this doesn't fall back to `metadata.owner`. + # + # pkg:gem/parse_packwerk#lib/parse_packwerk/package.rb:79 + sig { returns(T.nilable(::String)) } + def owner; end + + # pkg:gem/parse_packwerk#lib/parse_packwerk/package.rb:57 sig { returns(::Pathname) } def public_directory; end - # source://parse_packwerk//lib/parse_packwerk/package.rb#41 + # pkg:gem/parse_packwerk#lib/parse_packwerk/package.rb:85 + sig { params(changed_props: T::Hash[::Symbol, T.untyped]).returns(::ParsePackwerk::Package) } + def with(changed_props); end + + # pkg:gem/parse_packwerk#lib/parse_packwerk/package.rb:47 sig { returns(::Pathname) } def yml; end class << self - # source://parse_packwerk//lib/parse_packwerk/package.rb#36 + # pkg:gem/parse_packwerk#lib/parse_packwerk/package.rb:42 sig { params(package_name: ::String).returns(::Pathname) } def directory(package_name); end - # source://parse_packwerk//lib/parse_packwerk/package.rb#18 + # pkg:gem/parse_packwerk#lib/parse_packwerk/package.rb:21 sig { params(pathname: ::Pathname).returns(::ParsePackwerk::Package) } def from(pathname); end - - # source://sorbet-runtime/0.5.11953/lib/types/struct.rb#13 - def inherited(s); end end end -# source://parse_packwerk//lib/parse_packwerk.rb#20 +# pkg:gem/parse_packwerk#lib/parse_packwerk.rb:21 class ParsePackwerk::PackageParseError < ::StandardError; end -# source://parse_packwerk//lib/parse_packwerk/package_set.rb#8 +# pkg:gem/parse_packwerk#lib/parse_packwerk/package_set.rb:8 class ParsePackwerk::PackageSet class << self - # source://parse_packwerk//lib/parse_packwerk/package_set.rb#12 + # pkg:gem/parse_packwerk#lib/parse_packwerk/package_set.rb:12 sig do params( package_pathspec: T::Array[::String], @@ -211,55 +237,47 @@ class ParsePackwerk::PackageSet private - # source://parse_packwerk//lib/parse_packwerk/package_set.rb#28 + # pkg:gem/parse_packwerk#lib/parse_packwerk/package_set.rb:28 sig { params(globs: T::Array[::String], path: ::Pathname).returns(T::Boolean) } def exclude_path?(globs, path); end end end -# source://parse_packwerk//lib/parse_packwerk/package_todo.rb#4 +# pkg:gem/parse_packwerk#lib/parse_packwerk/package_todo.rb:5 class ParsePackwerk::PackageTodo < ::T::Struct const :pathname, ::Pathname const :violations, T::Array[::ParsePackwerk::Violation] class << self - # source://parse_packwerk//lib/parse_packwerk/package_todo.rb#11 + # pkg:gem/parse_packwerk#lib/parse_packwerk/package_todo.rb:12 sig { params(package: ::ParsePackwerk::Package).returns(::ParsePackwerk::PackageTodo) } def for(package); end - # source://parse_packwerk//lib/parse_packwerk/package_todo.rb#16 + # pkg:gem/parse_packwerk#lib/parse_packwerk/package_todo.rb:17 sig { params(pathname: ::Pathname).returns(::ParsePackwerk::PackageTodo) } def from(pathname); end - # source://sorbet-runtime/0.5.11953/lib/types/struct.rb#13 - def inherited(s); end - - # source://parse_packwerk//lib/parse_packwerk/package_todo.rb#46 + # pkg:gem/parse_packwerk#lib/parse_packwerk/package_todo.rb:47 sig { params(dirname: ::Pathname).returns(::Pathname) } def yml(dirname); end end end -# source://parse_packwerk//lib/parse_packwerk/constants.rb#4 +# pkg:gem/parse_packwerk#lib/parse_packwerk/constants.rb:5 ParsePackwerk::ROOT_PACKAGE_NAME = T.let(T.unsafe(nil), String) -# source://parse_packwerk//lib/parse_packwerk/violation.rb#4 +# pkg:gem/parse_packwerk#lib/parse_packwerk/violation.rb:5 class ParsePackwerk::Violation < ::T::Struct const :type, ::String const :to_package_name, ::String const :class_name, ::String const :files, T::Array[::String] - # source://parse_packwerk//lib/parse_packwerk/violation.rb#13 + # pkg:gem/parse_packwerk#lib/parse_packwerk/violation.rb:14 sig { returns(T::Boolean) } def dependency?; end - # source://parse_packwerk//lib/parse_packwerk/violation.rb#18 + # pkg:gem/parse_packwerk#lib/parse_packwerk/violation.rb:19 sig { returns(T::Boolean) } def privacy?; end - - class << self - # source://sorbet-runtime/0.5.11953/lib/types/struct.rb#13 - def inherited(s); end - end end diff --git a/sorbet/rbi/gems/parser@3.3.12.0.rbi b/sorbet/rbi/gems/parser@3.3.12.0.rbi new file mode 100644 index 0000000..3876382 --- /dev/null +++ b/sorbet/rbi/gems/parser@3.3.12.0.rbi @@ -0,0 +1,5146 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `parser` gem. +# Please instead update this file by running `bin/tapioca gem parser`. + + +# @api public +# +# pkg:gem/parser#lib/parser.rb:19 +module Parser; end + +# pkg:gem/parser#lib/parser.rb:24 +module Parser::AST; end + +# {Parser::AST::Node} contains information about a single AST node and its +# child nodes. It extends the basic [AST::Node](https://www.rubydoc.info/gems/ast/AST/Node) +# class provided by gem [ast](https://www.rubydoc.info/gems/ast). +# +# @api public +# +# @!attribute [r] location +# Source map for this Node. +# @return [Parser::Source::Map] +# +# pkg:gem/parser#lib/parser/ast/node.rb:17 +class Parser::AST::Node < ::AST::Node + # Assigns various properties to this AST node. Currently only the + # location can be set. + # + # @param [Hash] properties + # @option properties [Parser::Source::Map] :location Location information + # of the node. + # + # pkg:gem/parser#lib/parser/ast/node.rb:30 + def assign_properties(properties); end + + # pkg:gem/parser#lib/parser/ast/node.rb:20 + def loc; end + + # pkg:gem/parser#lib/parser/ast/node.rb:18 + def location; end +end + +# @api public +# +# pkg:gem/parser#lib/parser/ast/processor.rb:9 +class Parser::AST::Processor + include ::AST::Processor::Mixin + + # pkg:gem/parser#lib/parser/ast/processor.rb:179 + def on_alias(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:222 + def on_and(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:67 + def on_and_asgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:122 + def on_arg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:148 + def on_arg_expr(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:103 + def on_args(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:105 + def on_argument(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:22 + def on_array(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:258 + def on_array_pattern(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:259 + def on_array_pattern_with_tail(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:42 + def on_back_ref(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:240 + def on_begin(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:195 + def on_block(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:151 + def on_block_pass(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:125 + def on_blockarg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:150 + def on_blockarg_expr(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:213 + def on_break(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:228 + def on_case(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:246 + def on_case_match(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:89 + def on_casgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:157 + def on_class(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:81 + def on_const(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:261 + def on_const_pattern(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:190 + def on_csend(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:41 + def on_cvar(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:65 + def on_cvasgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:160 + def on_def(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:219 + def on_defined?(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:169 + def on_defs(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:16 + def on_dstr(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:17 + def on_dsym(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:231 + def on_eflipflop(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:288 + def on_empty_else(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:238 + def on_ensure(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:27 + def on_erange(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:262 + def on_find_pattern(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:210 + def on_for(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:130 + def on_forward_arg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:154 + def on_forwarded_kwrestarg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:153 + def on_forwarded_restarg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:40 + def on_gvar(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:64 + def on_gvasgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:24 + def on_hash(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:260 + def on_hash_pattern(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:225 + def on_if(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:251 + def on_if_guard(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:230 + def on_iflipflop(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:247 + def on_in_match(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:250 + def on_in_pattern(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:192 + def on_index(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:193 + def on_indexasgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:26 + def on_irange(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:39 + def on_ivar(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:63 + def on_ivasgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:127 + def on_kwarg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:25 + def on_kwargs(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:241 + def on_kwbegin(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:128 + def on_kwoptarg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:129 + def on_kwrestarg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:21 + def on_kwsplat(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:196 + def on_lambda(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:38 + def on_lvar(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:62 + def on_lvasgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:79 + def on_masgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:256 + def on_match_alt(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:257 + def on_match_as(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:233 + def on_match_current_line(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:248 + def on_match_pattern(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:249 + def on_match_pattern_p(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:254 + def on_match_rest(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:253 + def on_match_var(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:234 + def on_match_with_lvasgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:78 + def on_mlhs(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:156 + def on_module(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:214 + def on_next(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:221 + def on_not(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:43 + def on_nth_ref(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:198 + def on_numblock(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:70 + def on_op_asgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:123 + def on_optarg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:223 + def on_or(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:68 + def on_or_asgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:23 + def on_pair(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:255 + def on_pin(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:244 + def on_postexe(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:243 + def on_preexe(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:132 + def on_procarg0(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:215 + def on_redo(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:18 + def on_regexp(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:236 + def on_resbody(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:237 + def on_rescue(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:124 + def on_restarg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:149 + def on_restarg_expr(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:216 + def on_retry(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:212 + def on_return(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:158 + def on_sclass(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:181 + def on_send(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:126 + def on_shadowarg(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:20 + def on_splat(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:217 + def on_super(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:178 + def on_undef(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:252 + def on_unless_guard(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:208 + def on_until(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:209 + def on_until_post(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:29 + def on_var(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:45 + def on_vasgn(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:227 + def on_when(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:206 + def on_while(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:207 + def on_while_post(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:19 + def on_xstr(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:218 + def on_yield(node); end + + # @private + # + # pkg:gem/parser#lib/parser/ast/processor.rb:118 + def process_argument_node(node); end + + # pkg:gem/parser#lib/parser/ast/processor.rb:12 + def process_regular_node(node); end + + # @private + # + # pkg:gem/parser#lib/parser/ast/processor.rb:58 + def process_var_asgn_node(node); end + + # @private + # + # pkg:gem/parser#lib/parser/ast/processor.rb:34 + def process_variable_node(node); end +end + +# Base class for version-specific parsers. +# +# @api public +# +# @!attribute [r] diagnostics +# @return [Parser::Diagnostic::Engine] +# +# @!attribute [r] static_env +# @return [Parser::StaticEnvironment] +# +# @!attribute [r] version +# @return [Integer] +# +# pkg:gem/parser#lib/parser/base.rb:19 +class Parser::Base < ::Racc::Parser + # @param [Parser::Builders::Default] builder The AST builder to use. + # + # pkg:gem/parser#lib/parser/base.rb:129 + def initialize(builder = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/base.rb:117 + def builder; end + + # pkg:gem/parser#lib/parser/base.rb:120 + def context; end + + # pkg:gem/parser#lib/parser/base.rb:122 + def current_arg_stack; end + + # pkg:gem/parser#lib/parser/base.rb:116 + def diagnostics; end + + # pkg:gem/parser#lib/parser/base.rb:115 + def lexer; end + + # pkg:gem/parser#lib/parser/base.rb:121 + def max_numparam_stack; end + + # Parses a source buffer and returns the AST, or `nil` in case of a non fatal error. + # + # @param [Parser::Source::Buffer] source_buffer The source buffer to parse. + # @return [Parser::AST::Node, nil] + # + # pkg:gem/parser#lib/parser/base.rb:189 + def parse(source_buffer); end + + # Parses a source buffer and returns the AST and the source code comments. + # + # @see #parse + # @see Parser::Source::Comment#associate + # @return [Array] + # + # pkg:gem/parser#lib/parser/base.rb:207 + def parse_with_comments(source_buffer); end + + # pkg:gem/parser#lib/parser/base.rb:124 + def pattern_hash_keys; end + + # pkg:gem/parser#lib/parser/base.rb:123 + def pattern_variables; end + + # Resets the state of the parser. + # + # pkg:gem/parser#lib/parser/base.rb:170 + def reset; end + + # pkg:gem/parser#lib/parser/base.rb:119 + def source_buffer; end + + # pkg:gem/parser#lib/parser/base.rb:118 + def static_env; end + + # Parses a source buffer and returns the AST, the source code comments, + # and the tokens emitted by the lexer. In case of a fatal error, a {SyntaxError} + # is raised, unless `recover` is true. In case of an error + # (non-fatal or recovered), `nil` is returned instead of the AST, and + # comments as well as tokens are only returned up to the location of + # the error. + # + # Currently, token stream format returned by #tokenize is not documented, + # but is considered part of a public API and only changed according + # to Semantic Versioning. + # + # However, note that the exact token composition of various constructs + # might vary. For example, a string `"foo"` is represented equally well + # by `:tSTRING_BEG " :tSTRING_CONTENT foo :tSTRING_END "` and + # `:tSTRING "foo"`; such details must not be relied upon. + # + # @param [Parser::Source::Buffer] source_buffer + # @param [Boolean] recover If true, recover from syntax errors. False by default. + # @return [Array] + # + # pkg:gem/parser#lib/parser/base.rb:236 + def tokenize(source_buffer, recover = T.unsafe(nil)); end + + private + + # pkg:gem/parser#lib/parser/base.rb:260 + def check_kwarg_name(name_t); end + + # pkg:gem/parser#lib/parser/base.rb:269 + def diagnostic(level, reason, arguments, location_t, highlights_ts = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/base.rb:254 + def next_token; end + + # pkg:gem/parser#lib/parser/base.rb:285 + def on_error(error_token_id, error_value, value_stack); end + + class << self + # @return [Parser::Base] parser with the default options set. + # + # pkg:gem/parser#lib/parser/base.rb:87 + def default_parser; end + + # Parses a string of Ruby code and returns the AST. If the source + # cannot be parsed, {SyntaxError} is raised and a diagnostic is + # printed to `stderr`. + # + # @example + # Parser::Base.parse('puts "hello"') + # + # @param [String] string The block of code to parse. + # @param [String] file The name of the file the code originated from. + # @param [Numeric] line The initial line number. + # @return [Parser::AST::Node] + # + # pkg:gem/parser#lib/parser/base.rb:33 + def parse(string, file = T.unsafe(nil), line = T.unsafe(nil)); end + + # Parses Ruby source code by reading it from a file. If the source + # cannot be parsed, {SyntaxError} is raised and a diagnostic is + # printed to `stderr`. + # + # @param [String] filename Path to the file to parse. + # @return [Parser::AST::Node] + # @see #parse + # + # pkg:gem/parser#lib/parser/base.rb:67 + def parse_file(filename); end + + # Parses Ruby source code by reading it from a file and returns the AST and + # comments. If the source cannot be parsed, {SyntaxError} is raised and a + # diagnostic is printed to `stderr`. + # + # @param [String] filename Path to the file to parse. + # @return [Array] + # @see #parse + # + # pkg:gem/parser#lib/parser/base.rb:80 + def parse_file_with_comments(filename); end + + # Parses a string of Ruby code and returns the AST and comments. If the + # source cannot be parsed, {SyntaxError} is raised and a diagnostic is + # printed to `stderr`. + # + # @example + # Parser::Base.parse_with_comments('puts "hello"') + # + # @param [String] string The block of code to parse. + # @param [String] file The name of the file the code originated from. + # @param [Numeric] line The initial line number. + # @return [Array] + # + # pkg:gem/parser#lib/parser/base.rb:52 + def parse_with_comments(string, file = T.unsafe(nil), line = T.unsafe(nil)); end + + private + + # pkg:gem/parser#lib/parser/base.rb:100 + def setup_source_buffer(file, line, string, encoding); end + end +end + +# pkg:gem/parser#lib/parser.rb:78 +module Parser::Builders; end + +# Default AST builder. Uses {AST::Node}s. +# +# pkg:gem/parser#lib/parser/builders/default.rb:8 +class Parser::Builders::Default + # Initializes attributes: + # + # * `emit_file_line_as_literals`: `true` + # + # pkg:gem/parser#lib/parser/builders/default.rb:243 + def initialize; end + + # pkg:gem/parser#lib/parser/builders/default.rb:703 + def __ENCODING__(__ENCODING__t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:348 + def __FILE__(__FILE__t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:312 + def __LINE__(__LINE__t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:622 + def accessible(node); end + + # pkg:gem/parser#lib/parser/builders/default.rb:878 + def alias(alias_t, to, from); end + + # pkg:gem/parser#lib/parser/builders/default.rb:917 + def arg(name_t); end + + # Ruby 1.8 block arguments + # + # pkg:gem/parser#lib/parser/builders/default.rb:1007 + def arg_expr(expr); end + + # Formal arguments + # + # pkg:gem/parser#lib/parser/builders/default.rb:887 + def args(begin_t, args, end_t, check_args = T.unsafe(nil)); end + + # Arrays + # + # pkg:gem/parser#lib/parser/builders/default.rb:440 + def array(begin_t, elements, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1598 + def array_pattern(lbrack_t, elements, rbrack_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:767 + def assign(lhs, eql_t, rhs); end + + # Assignment + # + # pkg:gem/parser#lib/parser/builders/default.rb:712 + def assignable(node); end + + # pkg:gem/parser#lib/parser/builders/default.rb:540 + def associate(begin_t, pairs, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1175 + def attr_asgn(receiver, dot_t, selector_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:612 + def back_ref(token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1443 + def begin(begin_t, body, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1385 + 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 + + # pkg:gem/parser#lib/parser/builders/default.rb:1461 + def begin_keyword(begin_t, body, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1213 + def binary_op(receiver, operator_t, arg); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1122 + def block(method_call, begin_t, args, body, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1161 + def block_pass(amper_t, arg); end + + # pkg:gem/parser#lib/parser/builders/default.rb:982 + def blockarg(amper_t, name_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1027 + def blockarg_expr(amper_t, expr); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1113 + def call_lambda(lambda_t); end + + # pkg:gem/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 + + # Method calls + # + # pkg:gem/parser#lib/parser/builders/default.rb:1068 + def call_type_for_dot(dot_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1318 + def case(case_t, expr, when_bodies, else_t, else_body, end_t); end + + # PATTERN MATCHING + # + # pkg:gem/parser#lib/parser/builders/default.rb:1481 + def case_match(case_t, expr, in_bodies, else_t, else_body, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:343 + def character(char_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:284 + def complex(complex_t); end + + # Expression grouping + # + # pkg:gem/parser#lib/parser/builders/default.rb:1431 + def compstmt(statements); end + + # Conditionals + # + # pkg:gem/parser#lib/parser/builders/default.rb:1294 + def condition(cond_t, cond, then_t, if_true, else_t, if_false, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1300 + def condition_mod(if_true, if_false, cond_t, cond); end + + # pkg:gem/parser#lib/parser/builders/default.rb:686 + def const(name_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:698 + def const_fetch(scope, t_colon2, name_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:691 + def const_global(t_colon3, name_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:763 + def const_op_assignable(node); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1628 + def const_pattern(const, ldelim_t, pattern, rdelim_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:607 + def cvar(token); end + + # Indented (interpolated, noninterpolated, executable) strings + # + # pkg:gem/parser#lib/parser/builders/default.rb:388 + def dedent_string(node, dedent_level); end + + # Class and module definition + # + # pkg:gem/parser#lib/parser/builders/default.rb:814 + def def_class(class_t, name, lt_t, superclass, body, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:845 + def def_endless_method(def_t, name_t, args, assignment_t, body); end + + # pkg:gem/parser#lib/parser/builders/default.rb:863 + def def_endless_singleton(def_t, definee, dot_t, name_t, args, assignment_t, body); end + + # Method (un)definition + # + # pkg:gem/parser#lib/parser/builders/default.rb:837 + def def_method(def_t, name_t, args, body, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:827 + def def_module(module_t, name, body, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:821 + def def_sclass(class_t, lshft_t, expr, body, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:853 + def def_singleton(def_t, definee, dot_t, name_t, args, body, end_t); end + + # If set to true (the default), `__FILE__` and `__LINE__` are transformed to + # literal nodes. For example, `s(:str, "lib/foo.rb")` and `s(:int, 10)`. + # + # If set to false, `__FILE__` and `__LINE__` are emitted as-is, + # i.e. as `s(:__FILE__)` and `s(:__LINE__)` nodes. + # + # Source maps are identical in both cases. + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:237 + def emit_file_line_as_literals; end + + # If set to true (the default), `__FILE__` and `__LINE__` are transformed to + # literal nodes. For example, `s(:str, "lib/foo.rb")` and `s(:int, 10)`. + # + # If set to false, `__FILE__` and `__LINE__` are emitted as-is, + # i.e. as `s(:__FILE__)` and `s(:__LINE__)` nodes. + # + # Source maps are identical in both cases. + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:237 + def emit_file_line_as_literals=(_arg0); end + + # pkg:gem/parser#lib/parser/builders/default.rb:265 + def false(false_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1619 + def find_pattern(lbrack_t, elements, rbrack_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:276 + def float(float_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1339 + def for(for_t, iterator, in_t, iteratee, do_t, body, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:913 + def forward_arg(dots_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:903 + def forward_only_args(begin_t, dots_t, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1084 + def forwarded_args(dots_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1092 + def forwarded_kwrestarg(dstar_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1088 + def forwarded_restarg(star_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:596 + def gvar(token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1592 + def hash_pattern(lbrace_t, kwargs, rbrace_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:586 + def ident(token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1508 + def if_guard(if_t, if_body); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1487 + def in_match(lhs, in_t, rhs); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1502 + def in_pattern(in_t, pattern, guard, then_t, body); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1184 + def index(receiver, lbrack_t, indexes, rbrack_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1198 + def index_asgn(receiver, lbrack_t, indexes, rbrack_t); end + + # Numerics + # + # pkg:gem/parser#lib/parser/builders/default.rb:272 + def integer(integer_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:591 + def ivar(token); end + + # Keywords + # + # pkg:gem/parser#lib/parser/builders/default.rb:1347 + def keyword_cmd(type, keyword_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:944 + def kwarg(name_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:970 + def kwnilarg(dstar_t, nil_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:951 + def kwoptarg(name_t, value); end + + # pkg:gem/parser#lib/parser/builders/default.rb:958 + def kwrestarg(dstar_t, name_t = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:535 + def kwsplat(dstar_t, arg); end + + # Logical operations: and, or + # + # pkg:gem/parser#lib/parser/builders/default.rb:1287 + def logical_op(type, lhs, op_t, rhs); end + + # Loops + # + # pkg:gem/parser#lib/parser/builders/default.rb:1325 + def loop(type, keyword_t, cond, do_t, body, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1330 + def loop_mod(type, body, keyword_t, cond); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1642 + def match_alt(left, pipe_t, right); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1649 + def match_as(value, assoc_t, as); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1528 + def match_hash_var(name_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1542 + def match_hash_var_from_str(begin_t, strings, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1680 + def match_label(label_type, label); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1656 + def match_nil_pattern(dstar_t, nil_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1235 + def match_op(receiver, match_t, arg); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1661 + def match_pair(label_type, label, value); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1492 + def match_pattern(lhs, match_t, rhs); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1497 + def match_pattern_p(lhs, match_t, rhs); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1581 + def match_rest(star_t, name_t = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1516 + def match_var(name_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1624 + def match_with_trailing_comma(match, comma_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:805 + def multi_assign(lhs, eql_t, rhs); end + + # pkg:gem/parser#lib/parser/builders/default.rb:800 + def multi_lhs(begin_t, items, end_t); end + + # Singletons + # + # pkg:gem/parser#lib/parser/builders/default.rb:255 + def nil(nil_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1263 + def not_op(not_t, begin_t = T.unsafe(nil), receiver = T.unsafe(nil), end_t = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:617 + def nth_ref(token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:899 + def numargs(max_numparam); end + + # MacRuby Objective-C arguments + # + # pkg:gem/parser#lib/parser/builders/default.rb:1038 + def objc_kwarg(kwname_t, assoc_t, name_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1052 + def objc_restarg(star_t, name = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1166 + def objc_varargs(pair, rest_of_varargs); end + + # pkg:gem/parser#lib/parser/builders/default.rb:774 + def op_assign(lhs, op_t, rhs); end + + # pkg:gem/parser#lib/parser/builders/default.rb:924 + def optarg(name_t, eql_t, value); end + + # Hashes + # + # pkg:gem/parser#lib/parser/builders/default.rb:488 + def pair(key, assoc_t, value); end + + # pkg:gem/parser#lib/parser/builders/default.rb:505 + def pair_keyword(key_t, value); end + + # pkg:gem/parser#lib/parser/builders/default.rb:521 + def pair_label(key_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:493 + def pair_list_18(list); end + + # pkg:gem/parser#lib/parser/builders/default.rb:513 + def pair_quoted(begin_t, parts, end_t, value); end + + # @api private + # + # pkg:gem/parser#lib/parser/builders/default.rb:225 + def parser; end + + # @api private + # + # pkg:gem/parser#lib/parser/builders/default.rb:225 + def parser=(_arg0); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1637 + def pin(pin_t, var); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1370 + def postexe(postexe_t, lbrace_t, compstmt, rbrace_t); end + + # BEGIN, END + # + # pkg:gem/parser#lib/parser/builders/default.rb:1365 + def preexe(preexe_t, lbrace_t, compstmt, rbrace_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:992 + def procarg0(arg); end + + # pkg:gem/parser#lib/parser/builders/default.rb:572 + def range_exclusive(lhs, dot3_t, rhs); end + + # Ranges + # + # pkg:gem/parser#lib/parser/builders/default.rb:567 + def range_inclusive(lhs, dot2_t, rhs); end + + # pkg:gem/parser#lib/parser/builders/default.rb:280 + def rational(rational_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:426 + def regexp_compose(begin_t, parts, end_t, options); end + + # Regular expressions + # + # pkg:gem/parser#lib/parser/builders/default.rb:417 + def regexp_options(regopt_t); end + + # Exception handling + # + # pkg:gem/parser#lib/parser/builders/default.rb:1377 + def rescue_body(rescue_t, exc_list, assoc_t, exc_var, then_t, compound_stmt); end + + # pkg:gem/parser#lib/parser/builders/default.rb:933 + def restarg(star_t, name_t = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1016 + def restarg_expr(star_t, expr = T.unsafe(nil)); end + + # Access + # + # pkg:gem/parser#lib/parser/builders/default.rb:581 + def self(token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:975 + def shadowarg(name_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:445 + def splat(star_t, arg = T.unsafe(nil)); end + + # Strings + # + # pkg:gem/parser#lib/parser/builders/default.rb:319 + def string(string_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:329 + def string_compose(begin_t, parts, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:324 + def string_internal(string_t); end + + # Symbols + # + # pkg:gem/parser#lib/parser/builders/default.rb:355 + def symbol(symbol_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:365 + def symbol_compose(begin_t, parts, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:360 + def symbol_internal(symbol_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:469 + def symbols_compose(begin_t, parts, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1305 + def ternary(cond, question_t, if_true, colon_t, if_false); end + + # pkg:gem/parser#lib/parser/builders/default.rb:260 + def true(true_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:294 + def unary_num(unary_t, numeric); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1251 + def unary_op(op_t, receiver); end + + # pkg:gem/parser#lib/parser/builders/default.rb:873 + def undef_method(undef_t, names); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1512 + def unless_guard(unless_t, unless_body); end + + # Case matching + # + # pkg:gem/parser#lib/parser/builders/default.rb:1312 + def when(when_t, patterns, then_t, body); end + + # pkg:gem/parser#lib/parser/builders/default.rb:455 + def word(parts); end + + # pkg:gem/parser#lib/parser/builders/default.rb:464 + def words_compose(begin_t, parts, end_t); end + + # Executable strings + # + # pkg:gem/parser#lib/parser/builders/default.rb:381 + def xstring_compose(begin_t, parts, end_t); end + + private + + # pkg:gem/parser#lib/parser/builders/default.rb:1829 + def arg_name_collides?(this_name, that_name); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2025 + def arg_prefix_map(op_t, name_t = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1999 + def binary_op_map(left_e, op_t, right_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2127 + def block_map(receiver_l, begin_t, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1804 + def check_assignment_to_numparam(name, loc); end + + # VERIFICATION + # + # pkg:gem/parser#lib/parser/builders/default.rb:1696 + def check_condition(cond); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1775 + def check_duplicate_arg(this_arg, map = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1750 + def check_duplicate_args(args, map = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1862 + def check_duplicate_pattern_key(name, loc); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1852 + def check_duplicate_pattern_variable(name, loc); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1844 + def check_lvar_name(name, loc); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1819 + def check_reserved_for_numparam(name, loc); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2293 + def collapse_string_parts?(parts); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1950 + def collection_map(begin_t, parts, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2154 + def condition_map(keyword_t, cond_e, begin_t, body_e, else_t, else_e, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1985 + def constant_map(scope, colon2_t, name_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2058 + def definition_map(keyword_t, operator_t, name_t, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1891 + def delimited_string_map(string_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2315 + def diagnostic(type, reason, arguments, location, highlights = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2198 + def eh_keyword_map(compstmt_e, keyword_t, body_es, else_t, else_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2064 + def endless_definition_map(keyword_t, operator_t, name_t, assignment_t, body_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1946 + def expr_map(loc); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2179 + def for_map(keyword_t, in_t, begin_t, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2226 + def guard_map(keyword_t, guard_body_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2116 + def index_map(receiver_e, lbrack_t, rbrack_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1882 + def join_exprs(left_expr, right_expr); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2132 + def keyword_map(keyword_t, begin_t, args, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2149 + def keyword_mod_map(pre_e, keyword_t, post_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2035 + def kwarg_map(name_t, value_e = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2346 + def kwargs?(node); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2310 + def loc(token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2048 + def module_definition_map(keyword_t, name_e, operator_t, end_t); end + + # SOURCE MAPS + # + # pkg:gem/parser#lib/parser/builders/default.rb:1874 + def n(type, children, source_map); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1878 + def n0(type, source_map); end + + # pkg:gem/parser#lib/parser/builders/default.rb:288 + def numeric(kind, token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1916 + def pair_keyword_map(key_t, value_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1931 + def pair_quoted_map(begin_t, end_t, value_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1902 + def prefix_string_map(symbol); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2013 + def range_map(start_e, op_t, end_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1980 + def regexp_map(begin_t, end_t, options_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2185 + def rescue_body_map(keyword_t, exc_list_e, assoc_t, exc_var_e, then_t, compstmt_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2336 + def rewrite_hash_args_to_kwargs(args); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2098 + def send_binary_op_map(lhs_e, selector_t, rhs_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2121 + def send_index_map(receiver_e, lbrack_t, rbrack_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2072 + def send_map(receiver_e, dot_t, selector_t, begin_t = T.unsafe(nil), args = T.unsafe(nil), end_t = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2104 + def send_unary_op_map(selector_t, arg_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2257 + def static_regexp(parts, options); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2282 + def static_regexp_node(node); end + + # Extract a static string from e.g. a regular expression, + # honoring the fact that MRI expands interpolations like #{""} + # at parse time. + # + # pkg:gem/parser#lib/parser/builders/default.rb:2240 + def static_string(nodes); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1966 + def string_map(begin_t, parts, end_t); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2302 + def string_value(token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2174 + def ternary_map(begin_e, question_t, mid_e, colon_t, end_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1887 + def token_map(token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2003 + def unary_op_map(op_t, arg_e = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1911 + def unquoted_map(token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2324 + def validate_definee(definee); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1789 + def validate_no_forward_arg_after_restarg(args); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2298 + def value(token); end + + # pkg:gem/parser#lib/parser/builders/default.rb:2092 + def var_send_map(variable_e); end + + # pkg:gem/parser#lib/parser/builders/default.rb:1995 + def variable_map(name_t); end + + class << self + # AST compatibility attribute; causes a single non-mlhs + # block argument to be wrapped in s(:procarg0). + # + # If set to false (the default), block arguments `|a|` are emitted as + # `s(:args, s(:procarg0, :a))` + # + # If set to true, block arguments `|a|` are emitted as + # `s(:args, s(:procarg0, s(:arg, :a))` + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:97 + def emit_arg_inside_procarg0; end + + # AST compatibility attribute; causes a single non-mlhs + # block argument to be wrapped in s(:procarg0). + # + # If set to false (the default), block arguments `|a|` are emitted as + # `s(:args, s(:procarg0, :a))` + # + # If set to true, block arguments `|a|` are emitted as + # `s(:args, s(:procarg0, s(:arg, :a))` + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:97 + def emit_arg_inside_procarg0=(_arg0); end + + # AST compatibility attribute; locations of `__ENCODING__` are not the same + # as locations of `Encoding::UTF_8` causing problems during rewriting, + # all new code should set this attribute to true. + # + # If set to false (the default), `__ENCODING__` is emitted as + # ` s(:const, s(:const, nil, :Encoding), :UTF_8)`. + # + # If set to true, `__ENCODING__` is emitted as + # `s(:__ENCODING__)`. + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:58 + def emit_encoding; end + + # AST compatibility attribute; locations of `__ENCODING__` are not the same + # as locations of `Encoding::UTF_8` causing problems during rewriting, + # all new code should set this attribute to true. + # + # If set to false (the default), `__ENCODING__` is emitted as + # ` s(:const, s(:const, nil, :Encoding), :UTF_8)`. + # + # If set to true, `__ENCODING__` is emitted as + # `s(:__ENCODING__)`. + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:58 + def emit_encoding=(_arg0); end + + # AST compatibility attribute; arguments forwarding initially + # didn't have support for leading arguments + # (i.e. `def m(a, ...); end` was a syntax error). However, Ruby 3.0 + # added support for any number of arguments in front of the `...`. + # + # If set to false (the default): + # 1. `def m(...) end` is emitted as + # s(:def, :m, s(:forward_args), nil) + # 2. `def m(a, b, ...) end` is emitted as + # s(:def, :m, + # s(:args, s(:arg, :a), s(:arg, :b), s(:forward_arg))) + # + # If set to true it uses a single format: + # 1. `def m(...) end` is emitted as + # s(:def, :m, s(:args, s(:forward_arg))) + # 2. `def m(a, b, ...) end` is emitted as + # s(:def, :m, s(:args, s(:arg, :a), s(:arg, :b), s(:forward_arg))) + # + # It does't matter that much on 2.7 (because there can't be any leading arguments), + # but on 3.0 it should be better enabled to use a single AST format. + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:126 + def emit_forward_arg; end + + # AST compatibility attribute; arguments forwarding initially + # didn't have support for leading arguments + # (i.e. `def m(a, ...); end` was a syntax error). However, Ruby 3.0 + # added support for any number of arguments in front of the `...`. + # + # If set to false (the default): + # 1. `def m(...) end` is emitted as + # s(:def, :m, s(:forward_args), nil) + # 2. `def m(a, b, ...) end` is emitted as + # s(:def, :m, + # s(:args, s(:arg, :a), s(:arg, :b), s(:forward_arg))) + # + # If set to true it uses a single format: + # 1. `def m(...) end` is emitted as + # s(:def, :m, s(:args, s(:forward_arg))) + # 2. `def m(a, b, ...) end` is emitted as + # s(:def, :m, s(:args, s(:arg, :a), s(:arg, :b), s(:forward_arg))) + # + # It does't matter that much on 2.7 (because there can't be any leading arguments), + # but on 3.0 it should be better enabled to use a single AST format. + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:126 + def emit_forward_arg=(_arg0); end + + # AST compatibility attribute; indexed assignment, `x[] = 1`, is not + # semantically equivalent to calling the method directly, `x.[]=(1)`. + # Specifically, in the former case, the expression's value is always 1, + # and in the latter case, the expression's value is the return value + # of the `[]=` method. + # + # If set to false (the default), `self[1]` is emitted as + # `s(:send, s(:self), :[], s(:int, 1))`, and `self[1] = 2` is + # emitted as `s(:send, s(:self), :[]=, s(:int, 1), s(:int, 2))`. + # + # If set to true, `self[1]` is emitted as + # `s(:index, s(:self), s(:int, 1))`, and `self[1] = 2` is + # emitted as `s(:indexasgn, s(:self), s(:int, 1), s(:int, 2))`. + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:80 + def emit_index; end + + # AST compatibility attribute; indexed assignment, `x[] = 1`, is not + # semantically equivalent to calling the method directly, `x.[]=(1)`. + # Specifically, in the former case, the expression's value is always 1, + # and in the latter case, the expression's value is the return value + # of the `[]=` method. + # + # If set to false (the default), `self[1]` is emitted as + # `s(:send, s(:self), :[], s(:int, 1))`, and `self[1] = 2` is + # emitted as `s(:send, s(:self), :[]=, s(:int, 1), s(:int, 2))`. + # + # If set to true, `self[1]` is emitted as + # `s(:index, s(:self), s(:int, 1))`, and `self[1] = 2` is + # emitted as `s(:indexasgn, s(:self), s(:int, 1), s(:int, 2))`. + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:80 + def emit_index=(_arg0); end + + # AST compatibility attribute; Starting from Ruby 2.7 keyword arguments + # of method calls that are passed explicitly as a hash (i.e. with curly braces) + # are treated as positional arguments and Ruby 2.7 emits a warning on such method + # call. Ruby 3.0 given an ArgumentError. + # + # If set to false (the default) the last hash argument is emitted as `hash`: + # + # ``` + # (send nil :foo + # (hash + # (pair + # (sym :bar) + # (int 42)))) + # ``` + # + # If set to true it is emitted as `kwargs`: + # + # ``` + # (send nil :foo + # (kwargs + # (pair + # (sym :bar) + # (int 42)))) + # ``` + # + # Note that `kwargs` node is just a replacement for `hash` argument, + # so if there's are multiple arguments (or a `kwsplat`) all of them + # are wrapped into `kwargs` instead of `hash`: + # + # ``` + # (send nil :foo + # (kwargs + # (pair + # (sym :a) + # (int 42)) + # (kwsplat + # (send nil :b)) + # (pair + # (sym :c) + # (int 10)))) + # ``` + # + # pkg:gem/parser#lib/parser/builders/default.rb:174 + def emit_kwargs; end + + # AST compatibility attribute; Starting from Ruby 2.7 keyword arguments + # of method calls that are passed explicitly as a hash (i.e. with curly braces) + # are treated as positional arguments and Ruby 2.7 emits a warning on such method + # call. Ruby 3.0 given an ArgumentError. + # + # If set to false (the default) the last hash argument is emitted as `hash`: + # + # ``` + # (send nil :foo + # (hash + # (pair + # (sym :bar) + # (int 42)))) + # ``` + # + # If set to true it is emitted as `kwargs`: + # + # ``` + # (send nil :foo + # (kwargs + # (pair + # (sym :bar) + # (int 42)))) + # ``` + # + # Note that `kwargs` node is just a replacement for `hash` argument, + # so if there's are multiple arguments (or a `kwsplat`) all of them + # are wrapped into `kwargs` instead of `hash`: + # + # ``` + # (send nil :foo + # (kwargs + # (pair + # (sym :a) + # (int 42)) + # (kwsplat + # (send nil :b)) + # (pair + # (sym :c) + # (int 10)))) + # ``` + # + # pkg:gem/parser#lib/parser/builders/default.rb:174 + def emit_kwargs=(_arg0); end + + # AST compatibility attribute; since `-> {}` is not semantically + # equivalent to `lambda {}`, all new code should set this attribute + # to true. + # + # If set to false (the default), `-> {}` is emitted as + # `s(:block, s(:send, nil, :lambda), s(:args), nil)`. + # + # If set to true, `-> {}` is emitted as + # `s(:block, s(:lambda), s(:args), nil)`. + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:22 + def emit_lambda; end + + # AST compatibility attribute; since `-> {}` is not semantically + # equivalent to `lambda {}`, all new code should set this attribute + # to true. + # + # If set to false (the default), `-> {}` is emitted as + # `s(:block, s(:send, nil, :lambda), s(:args), nil)`. + # + # If set to true, `-> {}` is emitted as + # `s(:block, s(:lambda), s(:args), nil)`. + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:22 + def emit_lambda=(_arg0); end + + # AST compatibility attribute; Starting from 3.0 Ruby returns + # true/false from single-line pattern matching with `in` keyword. + # + # Before 3.0 there was an exception if given value doesn't match pattern. + # + # NOTE: This attribute affects only Ruby 2.7 grammar. + # 3.0 grammar always emits `match_pattern`/`match_pattern_p` + # + # If compatibility attribute set to false `foo in bar` is emitted as `in_match`: + # + # ``` + # (in-match + # (send nil :foo) + # (match-var :bar)) + # ``` + # + # If set to true it's emitted as `match_pattern_p`: + # ``` + # (match-pattern-p + # (send nil :foo) + # (match-var :bar)) + # ``` + # + # pkg:gem/parser#lib/parser/builders/default.rb:203 + def emit_match_pattern; end + + # AST compatibility attribute; Starting from 3.0 Ruby returns + # true/false from single-line pattern matching with `in` keyword. + # + # Before 3.0 there was an exception if given value doesn't match pattern. + # + # NOTE: This attribute affects only Ruby 2.7 grammar. + # 3.0 grammar always emits `match_pattern`/`match_pattern_p` + # + # If compatibility attribute set to false `foo in bar` is emitted as `in_match`: + # + # ``` + # (in-match + # (send nil :foo) + # (match-var :bar)) + # ``` + # + # If set to true it's emitted as `match_pattern_p`: + # ``` + # (match-pattern-p + # (send nil :foo) + # (match-var :bar)) + # ``` + # + # pkg:gem/parser#lib/parser/builders/default.rb:203 + def emit_match_pattern=(_arg0); end + + # AST compatibility attribute; block arguments of `m { |a| }` are + # not semantically equivalent to block arguments of `m { |a,| }` or `m { |a, b| }`, + # all new code should set this attribute to true. + # + # If set to false (the default), arguments of `m { |a| }` are emitted as + # `s(:args, s(:arg, :a))`. + # + # If set to true, arguments of `m { |a| }` are emitted as + # `s(:args, s(:procarg0, :a)). + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:40 + def emit_procarg0; end + + # AST compatibility attribute; block arguments of `m { |a| }` are + # not semantically equivalent to block arguments of `m { |a,| }` or `m { |a, b| }`, + # all new code should set this attribute to true. + # + # If set to false (the default), arguments of `m { |a| }` are emitted as + # `s(:args, s(:arg, :a))`. + # + # If set to true, arguments of `m { |a| }` are emitted as + # `s(:args, s(:procarg0, :a)). + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/builders/default.rb:40 + def emit_procarg0=(_arg0); end + + # @api private + # + # pkg:gem/parser#lib/parser/builders/default.rb:211 + def modernize; end + end +end + +# {Parser::ClobberingError} is raised when {Parser::Source::Rewriter} +# detects a clobbering rewrite action. This class inherits {RuntimeError} +# rather than {StandardError} for backward compatibility. +# +# @api public +# +# pkg:gem/parser#lib/parser/clobbering_error.rb:11 +class Parser::ClobberingError < ::RuntimeError; end + +# Context of parsing that is represented by a stack of scopes. +# +# Supported states: +# + :class - in the class body (class A; end) +# + :module - in the module body (module M; end) +# + :sclass - in the singleton class body (class << obj; end) +# + :def - in the method body (def m; end) +# + :defs - in the singleton method body (def self.m; end) +# + :def_open_args - in the arglist of the method definition +# keep in mind that it's set **only** after reducing the first argument, +# if you need to handle the first argument check `lex_state == expr_fname` +# + :block - in the block body (tap {}) +# + :lambda - in the lambda body (-> {}) +# +# pkg:gem/parser#lib/parser/context.rb:18 +class Parser::Context + # pkg:gem/parser#lib/parser/context.rb:30 + def initialize; end + + # pkg:gem/parser#lib/parser/context.rb:45 + def cant_return; end + + # pkg:gem/parser#lib/parser/context.rb:45 + def cant_return=(_arg0); end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_argdef; end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_argdef=(_arg0); end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_block; end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_block=(_arg0); end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_class; end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_class=(_arg0); end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_def; end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_def=(_arg0); end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_defined; end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_defined=(_arg0); end + + # pkg:gem/parser#lib/parser/context.rb:47 + def in_dynamic_block?; end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_kwarg; end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_kwarg=(_arg0); end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_lambda; end + + # pkg:gem/parser#lib/parser/context.rb:45 + def in_lambda=(_arg0); end + + # pkg:gem/parser#lib/parser/context.rb:34 + def reset; end +end + +# pkg:gem/parser#lib/parser/context.rb:19 +Parser::Context::FLAGS = T.let(T.unsafe(nil), Array) + +# Stack that holds names of current arguments, +# i.e. while parsing +# def m1(a = (def m2(b = def m3(c = 1); end); end)); end +# ^ +# stack is [:a, :b, :c] +# +# Emulates `p->cur_arg` in MRI's parse.y +# +# @api private +# +# pkg:gem/parser#lib/parser/current_arg_stack.rb:14 +class Parser::CurrentArgStack + # pkg:gem/parser#lib/parser/current_arg_stack.rb:17 + def initialize; end + + # pkg:gem/parser#lib/parser/current_arg_stack.rb:22 + def empty?; end + + # pkg:gem/parser#lib/parser/current_arg_stack.rb:34 + def pop; end + + # pkg:gem/parser#lib/parser/current_arg_stack.rb:26 + def push(value); end + + # pkg:gem/parser#lib/parser/current_arg_stack.rb:38 + def reset; end + + # pkg:gem/parser#lib/parser/current_arg_stack.rb:30 + def set(value); end + + # pkg:gem/parser#lib/parser/current_arg_stack.rb:15 + def stack; end + + # pkg:gem/parser#lib/parser/current_arg_stack.rb:42 + def top; end +end + +# @api private +# +# pkg:gem/parser#lib/parser/deprecation.rb:7 +module Parser::Deprecation + # pkg:gem/parser#lib/parser/deprecation.rb:9 + def warn_of_deprecation; end + + # pkg:gem/parser#lib/parser/deprecation.rb:8 + def warned_of_deprecation=(_arg0); end +end + +# @api public +# +# @!attribute [r] level +# @see LEVELS +# @return [Symbol] diagnostic level +# +# @!attribute [r] reason +# @see Parser::MESSAGES +# @return [Symbol] reason for error +# +# @!attribute [r] arguments +# @see Parser::MESSAGES +# @return [Symbol] extended arguments that describe the error +# +# @!attribute [r] message +# @return [String] error message +# +# @!attribute [r] location +# Main error-related source range. +# @return [Parser::Source::Range] +# +# @!attribute [r] highlights +# Supplementary error-related source ranges. +# @return [Array] +# +# pkg:gem/parser#lib/parser/diagnostic.rb:31 +class Parser::Diagnostic + # @param [Symbol] level + # @param [Symbol] reason + # @param [Hash] arguments + # @param [Parser::Source::Range] location + # @param [Array] highlights + # + # pkg:gem/parser#lib/parser/diagnostic.rb:49 + def initialize(level, reason, arguments, location, highlights = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/diagnostic.rb:39 + def arguments; end + + # pkg:gem/parser#lib/parser/diagnostic.rb:40 + def highlights; end + + # pkg:gem/parser#lib/parser/diagnostic.rb:39 + def level; end + + # pkg:gem/parser#lib/parser/diagnostic.rb:40 + def location; end + + # @return [String] the rendered message. + # + # pkg:gem/parser#lib/parser/diagnostic.rb:69 + def message; end + + # pkg:gem/parser#lib/parser/diagnostic.rb:39 + def reason; end + + # Renders the diagnostic message as a clang-like diagnostic. + # + # @example + # diagnostic.render # => + # # [ + # # "(fragment:0):1:5: error: unexpected token $end", + # # "foo +", + # # " ^" + # # ] + # + # @return [Array] + # + # pkg:gem/parser#lib/parser/diagnostic.rb:86 + def render; end + + private + + # If necessary, shrink a `Range` so as to include only the first line. + # + # @return [Parser::Source::Range] + # + # pkg:gem/parser#lib/parser/diagnostic.rb:142 + def first_line_only(range); end + + # If necessary, shrink a `Range` so as to include only the last line. + # + # @return [Parser::Source::Range] + # + # pkg:gem/parser#lib/parser/diagnostic.rb:155 + def last_line_only(range); end + + # Renders one source line in clang diagnostic style, with highlights. + # + # @return [Array] + # + # pkg:gem/parser#lib/parser/diagnostic.rb:110 + def render_line(range, ellipsis = T.unsafe(nil), range_end = T.unsafe(nil)); end +end + +# {Parser::Diagnostic::Engine} provides a basic API for dealing with +# diagnostics by delegating them to registered consumers. +# +# @example +# buffer = Parser::Source::Buffer.new(__FILE__, source: 'foobar') +# +# consumer = lambda do |diagnostic| +# puts diagnostic.message +# end +# +# engine = Parser::Diagnostic::Engine.new(consumer) +# diagnostic = Parser::Diagnostic.new( +# :warning, :unexpected_token, { :token => 'abc' }, buffer, 1..2) +# +# engine.process(diagnostic) # => "unexpected token abc" +# +# @api public +# +# @!attribute [rw] consumer +# @return [#call(Diagnostic)] +# +# @!attribute [rw] all_errors_are_fatal +# When set to `true` any error that is encountered will result in +# {Parser::SyntaxError} being raised. +# @return [Boolean] +# +# @!attribute [rw] ignore_warnings +# When set to `true` warnings will be ignored. +# @return [Boolean] +# +# pkg:gem/parser#lib/parser/diagnostic/engine.rb:36 +class Parser::Diagnostic::Engine + # @param [#call(Diagnostic)] consumer + # + # pkg:gem/parser#lib/parser/diagnostic/engine.rb:45 + def initialize(consumer = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/diagnostic/engine.rb:39 + def all_errors_are_fatal; end + + # pkg:gem/parser#lib/parser/diagnostic/engine.rb:39 + def all_errors_are_fatal=(_arg0); end + + # pkg:gem/parser#lib/parser/diagnostic/engine.rb:37 + def consumer; end + + # pkg:gem/parser#lib/parser/diagnostic/engine.rb:37 + def consumer=(_arg0); end + + # pkg:gem/parser#lib/parser/diagnostic/engine.rb:40 + def ignore_warnings; end + + # pkg:gem/parser#lib/parser/diagnostic/engine.rb:40 + def ignore_warnings=(_arg0); end + + # Processes a `diagnostic`: + # * Passes the diagnostic to the consumer, if it's not a warning when + # `ignore_warnings` is set. + # * After that, raises {Parser::SyntaxError} when `all_errors_are_fatal` + # is set to true. + # + # @param [Parser::Diagnostic] diagnostic + # @return [Parser::Diagnostic::Engine] + # @see ignore? + # @see raise? + # + # pkg:gem/parser#lib/parser/diagnostic/engine.rb:64 + def process(diagnostic); end + + protected + + # Checks whether `diagnostic` should be ignored. + # + # @param [Parser::Diagnostic] diagnostic + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/diagnostic/engine.rb:86 + def ignore?(diagnostic); end + + # Checks whether `diagnostic` should be raised as an exception. + # + # @param [Parser::Diagnostic] diagnostic + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/diagnostic/engine.rb:97 + def raise?(diagnostic); end +end + +# Collection of the available diagnostic levels. +# +# @return [Array] +# +# pkg:gem/parser#lib/parser/diagnostic.rb:37 +Parser::Diagnostic::LEVELS = T.let(T.unsafe(nil), Array) + +# line 3 "lib/parser/lexer.rl" +# +# === BEFORE YOU START === +# +# Read the Ruby Hacking Guide chapter 11, available in English at +# http://whitequark.org/blog/2013/04/01/ruby-hacking-guide-ch-11-finite-state-lexer/ +# +# Remember two things about Ragel scanners: +# +# 1) Longest match wins. +# +# 2) If two matches have the same length, the first +# in source code wins. +# +# General rules of making Ragel and Bison happy: +# +# * `p` (position) and `@te` contain the index of the character +# they're pointing to ("current"), plus one. `@ts` contains the index +# of the corresponding character. The code for extracting matched token is: +# +# @source_buffer.slice(@ts...@te) +# +# * If your input is `foooooooobar` and the rule is: +# +# 'f' 'o'+ +# +# the result will be: +# +# foooooooobar +# ^ ts=0 ^ p=te=9 +# +# * A Ragel lexer action should not emit more than one token, unless +# you know what you are doing. +# +# * All Ragel commands (fnext, fgoto, ...) end with a semicolon. +# +# * If an action emits the token and transitions to another state, use +# these Ragel commands: +# +# emit($whatever) +# fnext $next_state; fbreak; +# +# If you perform `fgoto` in an action which does not emit a token nor +# rewinds the stream pointer, the parser's side-effectful, +# context-sensitive lookahead actions will break in a hard to detect +# and debug way. +# +# * If an action does not emit a token: +# +# fgoto $next_state; +# +# * If an action features lookbehind, i.e. matches characters with the +# intent of passing them to another action: +# +# p = @ts - 1 +# fgoto $next_state; +# +# or, if the lookbehind consists of a single character: +# +# fhold; fgoto $next_state; +# +# * Ragel merges actions. So, if you have `e_lparen = '(' %act` and +# `c_lparen = '('` and a lexer action `e_lparen | c_lparen`, the result +# _will_ invoke the action `act`. +# +# e_something stands for "something with **e**mbedded action". +# +# * EOF is explicit and is matched by `c_eof`. If you want to introspect +# the state of the lexer, add this rule to the state: +# +# c_eof => do_eof; +# +# * If you proceed past EOF, the lexer will complain: +# +# NoMethodError: undefined method `ord' for nil:NilClass +# +# pkg:gem/parser#lib/parser/lexer-F1.rb:82 +class Parser::Lexer + # pkg:gem/parser#lib/parser/lexer-F1.rb:8250 + def initialize(version); end + + # Return next token: [type, value]. + # + # pkg:gem/parser#lib/parser/lexer-F1.rb:8419 + def advance; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8244 + def cmdarg; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8244 + def cmdarg=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8248 + def cmdarg_stack; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8244 + def command_start; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8244 + def command_start=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8246 + def comments; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8246 + def comments=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8244 + def cond; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8244 + def cond=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8248 + def cond_stack; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8281 + def construct_float(chars); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8244 + def context; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8244 + def context=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8414 + def dedent_level; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8240 + def diagnostics; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8240 + def diagnostics=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8367 + def encoding; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8242 + def force_utf32; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8242 + def force_utf32=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8248 + def lambda_stack; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8248 + def paren_nest; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8401 + def pop_cmdarg; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8410 + def pop_cond; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8396 + def push_cmdarg; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8405 + def push_cond; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8290 + def reset(reset_state = T.unsafe(nil)); end + + # line 82 "lib/parser/lexer.rl" + # % + # + # pkg:gem/parser#lib/parser/lexer-F1.rb:8238 + def source_buffer; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8343 + def source_buffer=(source_buffer); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8388 + def state; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8392 + def state=(state); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8241 + def static_env; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8241 + def static_env=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8246 + def tokens; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8246 + def tokens=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8248 + def version; end + + protected + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14701 + def arg_or_cmdarg(cmd_state); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14763 + def check_ambiguous_slash(tm); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14725 + def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14731 + def e_lbrace; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14675 + def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14784 + def emit_class_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14812 + def emit_colon_with_digits(p, tm, diag_msg); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14709 + def emit_comment(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14721 + def emit_comment_from_range(p, pe); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14691 + def emit_do(do_block = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14774 + def emit_global_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14792 + def emit_instance_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14800 + def emit_rbrace_rparen_rbrack; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14822 + def emit_singleton_class; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14685 + def emit_table(table, s = T.unsafe(nil), e = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14740 + def numeric_literal_int; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14759 + def on_newline(p); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14671 + def range(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14662 + def stack_pop; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14667 + def tok(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:14658 + def version?(*versions); end + + class << self + # pkg:gem/parser#lib/parser/lexer-F1.rb:8186 + def lex_en_expr_arg; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8186 + def lex_en_expr_arg=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8202 + def lex_en_expr_beg; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8202 + def lex_en_expr_beg=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8190 + def lex_en_expr_cmdarg; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8190 + def lex_en_expr_cmdarg=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8182 + def lex_en_expr_dot; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8182 + def lex_en_expr_dot=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8214 + def lex_en_expr_end; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8214 + def lex_en_expr_end=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8194 + def lex_en_expr_endarg; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8194 + def lex_en_expr_endarg=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8178 + def lex_en_expr_endfn; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8178 + def lex_en_expr_endfn=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8174 + def lex_en_expr_fname; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8174 + def lex_en_expr_fname=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8206 + def lex_en_expr_labelarg; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8206 + def lex_en_expr_labelarg=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8198 + def lex_en_expr_mid; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8198 + def lex_en_expr_mid=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8210 + def lex_en_expr_value; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8210 + def lex_en_expr_value=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8170 + def lex_en_expr_variable; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8170 + def lex_en_expr_variable=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8230 + def lex_en_inside_string; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8230 + def lex_en_inside_string=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8218 + def lex_en_leading_dot; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8218 + def lex_en_leading_dot=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8226 + def lex_en_line_begin; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8226 + def lex_en_line_begin=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8222 + def lex_en_line_comment; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8222 + def lex_en_line_comment=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8165 + def lex_error; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8165 + def lex_error=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8161 + def lex_start; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8161 + def lex_start=(_arg0); end + + private + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8064 + def _lex_eof_trans; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:8064 + def _lex_eof_trans=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:7967 + def _lex_from_state_actions; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:7967 + def _lex_from_state_actions=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:461 + def _lex_index_offsets; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:461 + def _lex_index_offsets=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:558 + def _lex_indicies; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:558 + def _lex_indicies=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:364 + def _lex_key_spans; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:364 + def _lex_key_spans=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:7870 + def _lex_to_state_actions; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:7870 + def _lex_to_state_actions=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:7722 + def _lex_trans_actions; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:7722 + def _lex_trans_actions=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:87 + def _lex_trans_keys; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:87 + def _lex_trans_keys=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:7574 + def _lex_trans_targs; end + + # pkg:gem/parser#lib/parser/lexer-F1.rb:7574 + def _lex_trans_targs=(_arg0); end + end +end + +# pkg:gem/parser#lib/parser/lexer/dedenter.rb:5 +class Parser::Lexer::Dedenter + # pkg:gem/parser#lib/parser/lexer/dedenter.rb:9 + def initialize(dedent_level); end + + # For a heredoc like + # <<-HERE + # a + # b + # HERE + # this method gets called with " a\n" and " b\n" + # + # However, the following heredoc: + # + # <<-HERE + # a\ + # b + # HERE + # calls this method only once with a string " a\\\n b\n" + # + # This is important because technically it's a single line, + # but it has to be concatenated __after__ dedenting. + # + # It has no effect for non-squiggly heredocs, i.e. it simply removes "\\\n" + # Of course, lexer could do it but once again: it's all because of dedenting. + # + # pkg:gem/parser#lib/parser/lexer/dedenter.rb:36 + def dedent(string); end + + # pkg:gem/parser#lib/parser/lexer/dedenter.rb:83 + def interrupt; end +end + +# Tab (\t) counts as 8 spaces +# +# pkg:gem/parser#lib/parser/lexer/dedenter.rb:7 +Parser::Lexer::Dedenter::TAB_WIDTH = T.let(T.unsafe(nil), Integer) + +# pkg:gem/parser#lib/parser/lexer-F1.rb:14869 +Parser::Lexer::ESCAPE_WHITESPACE = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/lexer-F1.rb:14855 +Parser::Lexer::KEYWORDS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/lexer-F1.rb:14862 +Parser::Lexer::KEYWORDS_BEGIN = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/lexer-F1.rb:8371 +Parser::Lexer::LEX_STATES = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/lexer/literal.rb:6 +class Parser::Lexer::Literal + # pkg:gem/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 + + # pkg:gem/parser#lib/parser/lexer/literal.rb:116 + def backslash_delimited?; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:39 + def dedent_level; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:191 + def end_interp_brace_and_try_closing; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:218 + def extend_content; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:222 + def extend_space(ts, te); end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:197 + def extend_string(string, ts, te); end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:204 + def flush_string; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:104 + def heredoc?; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:39 + def heredoc_e; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:168 + def infer_indent_level(line); end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:91 + def interpolate?; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:124 + def munge_escape?(character); end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:134 + def nest_and_try_closing(delimiter, ts, te, lookahead = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:108 + def plain_heredoc?; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:100 + def regexp?; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:40 + def saved_herebody_s; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:40 + def saved_herebody_s=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:112 + def squiggly_heredoc?; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:187 + def start_interp_brace; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:39 + def str_s; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:232 + def supports_line_continuation_via_slash?; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:120 + def type; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:95 + def words?; end + + protected + + # pkg:gem/parser#lib/parser/lexer/literal.rb:263 + def clear_buffer; end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:259 + def coerce_encoding(string); end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:238 + def delimiter?(delimiter); end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:279 + def emit(token, type, s, e); end + + # pkg:gem/parser#lib/parser/lexer/literal.rb:274 + def emit_start_tok; end +end + +# pkg:gem/parser#lib/parser/lexer/literal.rb:7 +Parser::Lexer::Literal::DELIMITERS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/lexer/literal.rb:8 +Parser::Lexer::Literal::SPACE = T.let(T.unsafe(nil), Integer) + +# pkg:gem/parser#lib/parser/lexer/literal.rb:9 +Parser::Lexer::Literal::TAB = T.let(T.unsafe(nil), Integer) + +# pkg:gem/parser#lib/parser/lexer/literal.rb:11 +Parser::Lexer::Literal::TYPES = T.let(T.unsafe(nil), Hash) + +# Mapping of strings to parser tokens. +# +# pkg:gem/parser#lib/parser/lexer-F1.rb:14829 +Parser::Lexer::PUNCTUATION = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/lexer-F1.rb:14849 +Parser::Lexer::PUNCTUATION_BEGIN = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/lexer/stack_state.rb:5 +class Parser::Lexer::StackState + # pkg:gem/parser#lib/parser/lexer/stack_state.rb:6 + def initialize(name); end + + # pkg:gem/parser#lib/parser/lexer/stack_state.rb:34 + def active?; end + + # pkg:gem/parser#lib/parser/lexer/stack_state.rb:11 + def clear; end + + # pkg:gem/parser#lib/parser/lexer/stack_state.rb:38 + def empty?; end + + # pkg:gem/parser#lib/parser/lexer/stack_state.rb:46 + def inspect; end + + # pkg:gem/parser#lib/parser/lexer/stack_state.rb:29 + def lexpop; end + + # pkg:gem/parser#lib/parser/lexer/stack_state.rb:22 + def pop; end + + # pkg:gem/parser#lib/parser/lexer/stack_state.rb:15 + def push(bit); end + + # pkg:gem/parser#lib/parser/lexer/stack_state.rb:42 + def to_s; end +end + +# line 3 "lib/parser/lexer-strings.rl" +# +# pkg:gem/parser#lib/parser/lexer-strings.rb:6 +class Parser::LexerStrings + # pkg:gem/parser#lib/parser/lexer-strings.rb:3300 + def initialize(lexer, version); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3339 + def advance(p); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5069 + def close_interp_on_current_literal(p); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5043 + def continue_lexing(current_literal); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5092 + def dedent_level; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3295 + def herebody_s; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3295 + def herebody_s=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5047 + def literal; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5015 + def next_state_for_literal(literal); end + + # This hook is triggered by "main" lexer on every newline character + # + # pkg:gem/parser#lib/parser/lexer-strings.rb:5100 + def on_newline(p); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5051 + def pop_literal; end + + # === LITERAL STACK === + # + # pkg:gem/parser#lib/parser/lexer-strings.rb:5009 + def push_literal(*args); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:4999 + def read_character_constant(p); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3314 + def reset; end + + # Set by "main" lexer + # + # pkg:gem/parser#lib/parser/lexer-strings.rb:3298 + def source_buffer; end + + # Set by "main" lexer + # + # pkg:gem/parser#lib/parser/lexer-strings.rb:3298 + def source_buffer=(_arg0); end + + # Set by "main" lexer + # + # pkg:gem/parser#lib/parser/lexer-strings.rb:3298 + def source_pts; end + + # Set by "main" lexer + # + # pkg:gem/parser#lib/parser/lexer-strings.rb:3298 + def source_pts=(_arg0); end + + protected + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5406 + def check_ambiguous_slash(tm); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5417 + def check_invalid_escapes(p); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5136 + def cond; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5132 + def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5128 + def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5396 + def emit_character_constant; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5373 + def emit_interp_var(interp_var_kind); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5140 + def emit_invalid_escapes?; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5291 + def encode_escape(ord); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5384 + def encode_escaped_char(p); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5112 + def eof_codepoint?(point); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5210 + def extend_interp_code(current_literal); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5225 + def extend_interp_digit_var; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5364 + def extend_interp_var(current_literal); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5234 + def extend_string_eol_check_eof(current_literal, pe); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5251 + def extend_string_eol_heredoc_intertwined(p); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5241 + def extend_string_eol_heredoc_line; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5267 + def extend_string_eol_words(current_literal, p); end + + # String escaping + # + # pkg:gem/parser#lib/parser/lexer-strings.rb:5154 + def extend_string_escaped; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5287 + def extend_string_for_token_range(current_literal, string); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5279 + def extend_string_slice_end(lookahead); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5124 + def range(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5356 + def read_post_meta_or_ctrl_char(p); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5388 + def slash_c_char; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5392 + def slash_m_char; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5120 + def tok(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5295 + def unescape_char(p); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5307 + def unicode_points(p); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:5116 + def version?(*versions); end + + class << self + # pkg:gem/parser#lib/parser/lexer-strings.rb:3275 + def lex_en_character; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3275 + def lex_en_character=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3255 + def lex_en_interp_backslash_delimited; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3255 + def lex_en_interp_backslash_delimited=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3263 + def lex_en_interp_backslash_delimited_words; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3263 + def lex_en_interp_backslash_delimited_words=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3243 + def lex_en_interp_string; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3243 + def lex_en_interp_string=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3239 + def lex_en_interp_words; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3239 + def lex_en_interp_words=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3259 + def lex_en_plain_backslash_delimited; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3259 + def lex_en_plain_backslash_delimited=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3267 + def lex_en_plain_backslash_delimited_words; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3267 + def lex_en_plain_backslash_delimited_words=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3251 + def lex_en_plain_string; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3251 + def lex_en_plain_string=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3247 + def lex_en_plain_words; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3247 + def lex_en_plain_words=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3271 + def lex_en_regexp_modifiers; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3271 + def lex_en_regexp_modifiers=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3279 + def lex_en_unknown; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3279 + def lex_en_unknown=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3234 + def lex_error; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3234 + def lex_error=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3230 + def lex_start; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3230 + def lex_start=(_arg0); end + + private + + # pkg:gem/parser#lib/parser/lexer-strings.rb:11 + def _lex_actions; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:11 + def _lex_actions=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3184 + def _lex_eof_trans; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3184 + def _lex_eof_trans=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3138 + def _lex_from_state_actions; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3138 + def _lex_from_state_actions=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:244 + def _lex_index_offsets; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:244 + def _lex_index_offsets=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:290 + def _lex_indicies; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:290 + def _lex_indicies=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:198 + def _lex_key_spans; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:198 + def _lex_key_spans=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3092 + def _lex_to_state_actions; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3092 + def _lex_to_state_actions=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3029 + def _lex_trans_actions; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:3029 + def _lex_trans_actions=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:76 + def _lex_trans_keys; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:76 + def _lex_trans_keys=(_arg0); end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:2966 + def _lex_trans_targs; end + + # pkg:gem/parser#lib/parser/lexer-strings.rb:2966 + def _lex_trans_targs=(_arg0); end + end +end + +# line 6 "lib/parser/lexer-strings.rl" +# % +# +# pkg:gem/parser#lib/parser/lexer-strings.rb:3287 +Parser::LexerStrings::ESCAPES = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/lexer-strings.rb:5423 +Parser::LexerStrings::ESCAPE_WHITESPACE = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/lexer-strings.rb:3332 +Parser::LexerStrings::LEX_STATES = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/lexer-strings.rb:3293 +Parser::LexerStrings::REGEXP_META_CHARACTERS = T.let(T.unsafe(nil), Regexp) + +# Diagnostic messages (errors, warnings and notices) that can be generated. +# +# @see Diagnostic +# +# @api public +# +# pkg:gem/parser#lib/parser/messages.rb:11 +Parser::MESSAGES = T.let(T.unsafe(nil), Hash) + +# Holds p->max_numparam from parse.y +# +# @api private +# +# pkg:gem/parser#lib/parser/max_numparam_stack.rb:8 +class Parser::MaxNumparamStack + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:13 + def initialize; end + + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:17 + def empty?; end + + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:29 + def has_numparams?; end + + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:21 + def has_ordinary_params!; end + + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:25 + def has_ordinary_params?; end + + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:45 + def pop; end + + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:41 + def push(static:); end + + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:33 + def register(numparam); end + + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:9 + def stack; end + + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:37 + def top; end + + private + + # pkg:gem/parser#lib/parser/max_numparam_stack.rb:51 + def set(value); end +end + +# pkg:gem/parser#lib/parser/max_numparam_stack.rb:11 +Parser::MaxNumparamStack::ORDINARY_PARAMS = T.let(T.unsafe(nil), Integer) + +# @api private +# +# pkg:gem/parser#lib/parser/messages.rb:112 +module Parser::Messages + class << self + # Formats the message, returns a raw template if there's nothing to interpolate + # + # Code like `format("", {})` gives a warning, and so this method tries interpolating + # only if `arguments` hash is not empty. + # + # @api private + # + # pkg:gem/parser#lib/parser/messages.rb:119 + def compile(reason, arguments); end + end +end + +# Parser metadata +# +# pkg:gem/parser#lib/parser/meta.rb:5 +module Parser::Meta; end + +# All node types that parser can produce. Not all parser versions +# will be able to produce every possible node. +# Includes node types that are only emitted by the prism parser translator. +# +# pkg:gem/parser#lib/parser/meta.rb:17 +Parser::Meta::NODE_TYPES = T.let(T.unsafe(nil), Set) + +# These are node types required by `Prism::Translation::Parser`, +# which has advanced syntax support ahead of the Parser gem. +# +# pkg:gem/parser#lib/parser/meta.rb:9 +Parser::Meta::PRISM_TRANSLATION_PARSER_NODE_TYPES = T.let(T.unsafe(nil), Array) + +# {Parser::Rewriter} is deprecated. Use {Parser::TreeRewriter} instead. +# It has a backwards compatible API and uses {Parser::Source::TreeRewriter} +# instead of {Parser::Source::Rewriter}. +# Please check the documentation for {Parser::Source::Rewriter} for details. +# +# @api public +# @deprecated Use {Parser::TreeRewriter} +# +# pkg:gem/parser#lib/parser/rewriter.rb:14 +class Parser::Rewriter < ::Parser::AST::Processor + extend ::Parser::Deprecation + + # pkg:gem/parser#lib/parser/rewriter.rb:98 + def initialize(*); end + + # Returns `true` if the specified node is an assignment node, returns false + # otherwise. + # + # @param [Parser::AST::Node] node + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/rewriter.rb:38 + def assignment?(node); end + + # Inserts new code after the given source range. + # + # @param [Parser::Source::Range] range + # @param [String] content + # + # pkg:gem/parser#lib/parser/rewriter.rb:77 + def insert_after(range, content); end + + # Inserts new code before the given source range. + # + # @param [Parser::Source::Range] range + # @param [String] content + # + # pkg:gem/parser#lib/parser/rewriter.rb:67 + def insert_before(range, content); end + + # Removes the source range. + # + # @param [Parser::Source::Range] range + # + # pkg:gem/parser#lib/parser/rewriter.rb:47 + def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @param [Parser::Source::Range] range + # @param [String] content + # + # pkg:gem/parser#lib/parser/rewriter.rb:87 + def replace(range, content); end + + # Rewrites the AST/source buffer and returns a String containing the new + # version. + # + # @param [Parser::Source::Buffer] source_buffer + # @param [Parser::AST::Node] ast + # @return [String] + # + # pkg:gem/parser#lib/parser/rewriter.rb:23 + def rewrite(source_buffer, ast); end + + # Wraps the given source range with the given values. + # + # @param [Parser::Source::Range] range + # @param [String] content + # + # pkg:gem/parser#lib/parser/rewriter.rb:57 + def wrap(range, before, after); end +end + +# pkg:gem/parser#lib/parser/rewriter.rb:91 +Parser::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) + +# pkg:gem/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. +# +# @!attribute [r] name +# Buffer name. If the buffer was created from a file, the name corresponds +# to relative path to the file. +# @return [String] buffer name +# +# @!attribute [r] first_line +# First line of the buffer, 1 by default. +# @return [Integer] first line +# +# @api public +# +# pkg:gem/parser#lib/parser/source/buffer.rb:25 +class Parser::Source::Buffer + # pkg:gem/parser#lib/parser/source/buffer.rb:110 + def initialize(name, first_line = T.unsafe(nil), source: T.unsafe(nil)); end + + # Convert a character index into the source to a column number. + # + # @param [Integer] position + # @return [Integer] column + # @api private + # + # pkg:gem/parser#lib/parser/source/buffer.rb:247 + def column_for_position(position); end + + # Convert a character index into the source to a `[line, column]` tuple. + # + # @param [Integer] position + # @return [[Integer, Integer]] `[line, column]` + # + # pkg:gem/parser#lib/parser/source/buffer.rb:222 + def decompose_position(position); end + + # pkg:gem/parser#lib/parser/source/buffer.rb:26 + def first_line; end + + # pkg:gem/parser#lib/parser/source/buffer.rb:317 + def freeze; end + + # pkg:gem/parser#lib/parser/source/buffer.rb:323 + def inspect; end + + # Number of last line in the buffer + # + # @return [Integer] + # + # pkg:gem/parser#lib/parser/source/buffer.rb:312 + def last_line; end + + # Convert a character index into the source to a line number. + # + # @param [Integer] position + # @return [Integer] line + # @api private + # + # pkg:gem/parser#lib/parser/source/buffer.rb:236 + def line_for_position(position); end + + # Extract line `lineno` as a new `Range`, taking `first_line` into account. + # + # @param [Integer] lineno + # @return [Range] + # @raise [IndexError] if `lineno` is out of bounds + # + # pkg:gem/parser#lib/parser/source/buffer.rb:289 + def line_range(lineno); end + + # pkg:gem/parser#lib/parser/source/buffer.rb:26 + def name; end + + # Populate this buffer from a string without encoding autodetection. + # + # @param [String] input + # @raise [ArgumentError] if already populated + # @return [String] + # + # pkg:gem/parser#lib/parser/source/buffer.rb:185 + def raw_source=(input); end + + # Populate this buffer from correspondingly named file. + # + # @example + # Parser::Source::Buffer.new('foo/bar.rb').read + # + # @return [Buffer] self + # @raise [ArgumentError] if already populated + # + # pkg:gem/parser#lib/parser/source/buffer.rb:136 + def read; end + + # pkg:gem/parser#lib/parser/source/buffer.rb:199 + def slice(start, length = T.unsafe(nil)); end + + # Source code contained in this buffer. + # + # @return [String] source code + # @raise [RuntimeError] if buffer is not populated yet + # + # pkg:gem/parser#lib/parser/source/buffer.rb:150 + def source; end + + # Populate this buffer from a string with encoding autodetection. + # `input` is mutated if not frozen. + # + # @param [String] input + # @raise [ArgumentError] if already populated + # @raise [EncodingError] if `input` includes invalid byte sequence for the encoding + # @return [String] + # + # pkg:gem/parser#lib/parser/source/buffer.rb:167 + def source=(input); end + + # Extract line `lineno` from source, taking `first_line` into account. + # + # @param [Integer] lineno + # @return [String] + # @raise [IndexError] if `lineno` is out of bounds + # + # pkg:gem/parser#lib/parser/source/buffer.rb:278 + def source_line(lineno); end + + # Return an `Array` of source code lines. + # + # @return [Array] + # + # pkg:gem/parser#lib/parser/source/buffer.rb:257 + def source_lines; end + + # @return [Range] A range covering the whole source + # + # pkg:gem/parser#lib/parser/source/buffer.rb:303 + def source_range; end + + private + + # RUBY_VERSION >= 2.3 + # + # pkg:gem/parser#lib/parser/source/buffer.rb:353 + def bsearch(line_begins, position); end + + # @returns [0, line_begin_of_line_1, ..., source.size + 1] + # + # pkg:gem/parser#lib/parser/source/buffer.rb:330 + def line_begins; end + + # @returns 0-based line index of position + # + # pkg:gem/parser#lib/parser/source/buffer.rb:344 + 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. + # + # @param [String] string + # @raise [Parser::UnknownEncodingInMagicComment] if the encoding is not recognized + # @return [String, nil] encoding name, if recognized + # + # pkg:gem/parser#lib/parser/source/buffer.rb:52 + 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. + # + # @param [String] input + # @return [String] + # @raise [EncodingError] + # + # pkg:gem/parser#lib/parser/source/buffer.rb:95 + def reencode_string(input); end + end +end + +# @api private +# +# pkg:gem/parser#lib/parser/source/buffer.rb:31 +Parser::Source::Buffer::ENCODING_RE = T.let(T.unsafe(nil), Regexp) + +# A comment in the source code. +# +# @!attribute [r] text +# @return [String] +# +# @!attribute [r] location +# @return [Parser::Source::Range] +# +# @api public +# +# pkg:gem/parser#lib/parser/source/comment.rb:17 +class Parser::Source::Comment + # @param [Parser::Source::Range] range + # + # pkg:gem/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. + # + # @param [Object] other + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/source/comment.rb:120 + def ==(other); end + + # @see #type + # @return [Boolean] true if this is a block comment. + # + # pkg:gem/parser#lib/parser/source/comment.rb:109 + def document?; end + + # @see #type + # @return [Boolean] true if this is an inline comment. + # + # pkg:gem/parser#lib/parser/source/comment.rb:101 + def inline?; end + + # @return [String] a human-readable representation of this comment + # + # pkg:gem/parser#lib/parser/source/comment.rb:128 + def inspect; end + + # pkg:gem/parser#lib/parser/source/comment.rb:21 + def loc; end + + # pkg:gem/parser#lib/parser/source/comment.rb:20 + def location; end + + # pkg:gem/parser#lib/parser/source/comment.rb:18 + def text; end + + # Type of this comment. + # + # * Inline comments correspond to `:inline`: + # + # # whatever + # + # * Block comments correspond to `:document`: + # + # =begin + # hi i am a document + # =end + # + # @return [Symbol] + # + # pkg:gem/parser#lib/parser/source/comment.rb:89 + def type; end + + class << self + # Associate `comments` with `ast` nodes by their corresponding node. + # + # @param [Parser::AST::Node] ast + # @param [Array] comments + # @return [Hash>] + # @see Parser::Source::Comment::Associator#associate + # @deprecated Use {associate_locations}. + # + # pkg:gem/parser#lib/parser/source/comment.rb:32 + def associate(ast, comments); end + + # Associate `comments` with `ast` nodes using identity. + # + # @param [Parser::AST::Node] ast + # @param [Array] comments + # @return [Hash>] + # @see Parser::Source::Comment::Associator#associate_by_identity + # + # pkg:gem/parser#lib/parser/source/comment.rb:59 + def associate_by_identity(ast, comments); end + + # Associate `comments` with `ast` nodes by their location in the + # source. + # + # @param [Parser::AST::Node] ast + # @param [Array] comments + # @return [Hash>] + # @see Parser::Source::Comment::Associator#associate_locations + # + # pkg:gem/parser#lib/parser/source/comment.rb:46 + def associate_locations(ast, comments); end + end +end + +# A processor which associates AST nodes with comments based on their +# location in source code. It may be used, for example, to implement +# rdoc-style processing. +# +# @example +# require 'parser/current' +# +# ast, comments = Parser::CurrentRuby.parse_with_comments(<<-CODE) +# # Class stuff +# class Foo +# # Attr stuff +# # @see bar +# attr_accessor :foo +# end +# CODE +# +# p Parser::Source::Comment.associate(ast, comments) +# # => { +# # (class (const nil :Foo) ...) => +# # [#], +# # (send nil :attr_accessor (sym :foo)) => +# # [#, +# # #] +# # } +# +# @see {associate} +# +# @!attribute skip_directives +# Skip file processing directives disguised as comments. +# Namely: +# +# * Shebang line, +# * Magic encoding comment. +# +# @return [Boolean] +# +# @api public +# +# pkg:gem/parser#lib/parser/source/comment/associator.rb:45 +class Parser::Source::Comment::Associator + # @param [Parser::AST::Node] ast + # @param [Array] comments + # + # pkg:gem/parser#lib/parser/source/comment/associator.rb:51 + def initialize(ast, comments); end + + # Compute a mapping between AST nodes and comments. Comment is + # associated with the node, if it is one of the following types: + # + # - preceding comment, it ends before the node start + # - sparse comment, it is located inside the node, after all child nodes + # - decorating comment, it starts at the same line, where the node ends + # + # This rule is unambiguous and produces the result + # one could reasonably expect; for example, this code + # + # # foo + # hoge # bar + # + fuga + # + # will result in the following association: + # + # { + # (send (lvar :hoge) :+ (lvar :fuga)) => + # [#], + # (lvar :fuga) => + # [#] + # } + # + # Note that comments after the end of the end of a passed tree range are + # ignored (except root decorating comment). + # + # Note that {associate} produces unexpected result for nodes which are + # equal but have distinct locations; comments for these nodes are merged. + # You may prefer using {associate_by_identity} or {associate_locations}. + # + # @return [Hash>] + # @deprecated Use {associate_locations}. + # + # pkg:gem/parser#lib/parser/source/comment/associator.rb:92 + def associate; end + + # Same as {associate}, but compares by identity, thus producing an unambiguous + # result even in presence of equal nodes. + # + # @return [Hash>] + # + # pkg:gem/parser#lib/parser/source/comment/associator.rb:115 + def associate_by_identity; end + + # Same as {associate}, but uses `node.loc` instead of `node` as + # the hash key, thus producing an unambiguous result even in presence + # of equal nodes. + # + # @return [Hash>] + # + # pkg:gem/parser#lib/parser/source/comment/associator.rb:104 + def associate_locations; end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:46 + def skip_directives; end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:46 + def skip_directives=(_arg0); end + + private + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:182 + def advance_comment; end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:214 + def advance_through_directives; end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:206 + def associate_and_advance_comment(node); end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:123 + def children_in_source_order(node); end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:187 + def current_comment_before?(node); end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:194 + def current_comment_before_end?(node); end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:201 + def current_comment_decorates?(node); end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:135 + def do_associate; end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:166 + def process_leading_comments(node); end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:173 + def process_trailing_comments(node); end + + # pkg:gem/parser#lib/parser/source/comment/associator.rb:148 + def visit(node); end +end + +# pkg:gem/parser#lib/parser/source/comment/associator.rb:212 +Parser::Source::Comment::Associator::MAGIC_COMMENT_RE = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/parser#lib/parser/source/comment/associator.rb:122 +Parser::Source::Comment::Associator::POSTFIX_TYPES = T.let(T.unsafe(nil), Set) + +# {Map} relates AST nodes to the source code they were parsed from. +# More specifically, a {Map} or its subclass contains a set of ranges: +# +# * `expression`: smallest range which includes all source corresponding +# to the node and all `expression` ranges of its children. +# * other ranges (`begin`, `end`, `operator`, ...): node-specific ranges +# pointing to various interesting tokens corresponding to the node. +# +# Note that the {Map::Heredoc} map is the only one whose `expression` does +# not include other ranges. It only covers the heredoc marker (`< 2]').children[0].loc +# # => > +# +# The {file:doc/AST_FORMAT.md} document describes how ranges associated to source +# code tokens. For example, the entry +# +# (array (int 1) (int 2)) +# +# "[1, 2]" +# ^ begin +# ^ end +# ~~~~~~ expression +# +# means that if `node` is an {Parser::AST::Node} `(array (int 1) (int 2))`, +# then `node.loc` responds to `begin`, `end` and `expression`, and +# `node.loc.begin` returns a range pointing at the opening bracket, and so on. +# +# If you want to write code polymorphic by the source map (i.e. accepting +# several subclasses of {Map}), use `respond_to?` instead of `is_a?` to +# check whether the map features the range you need. Concrete {Map} +# subclasses may not be preserved between versions, but their interfaces +# will be kept compatible. +# +# You can visualize the source maps with `ruby-parse -E` command-line tool. +# +# @example +# require 'parser/current' +# +# p Parser::CurrentRuby.parse('[1, 2]').loc +# # => #, +# # @begin=#, +# # @expression=#> +# +# @!attribute [r] node +# The node that is described by this map. Nodes and maps have 1:1 correspondence. +# @return [Parser::AST::Node] +# +# @!attribute [r] expression +# @return [Range] +# +# @api public +# +# pkg:gem/parser#lib/parser/source/map.rb:70 +class Parser::Source::Map + # @param [Range] expression + # + # pkg:gem/parser#lib/parser/source/map.rb:76 + def initialize(expression); end + + # Compares source maps. + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/source/map.rb:140 + def ==(other); end + + # A shortcut for `self.expression.column`. + # @return [Integer] + # + # pkg:gem/parser#lib/parser/source/map.rb:109 + def column; end + + # pkg:gem/parser#lib/parser/source/map.rb:72 + def expression; end + + # pkg:gem/parser#lib/parser/source/map.rb:103 + def first_line; end + + # A shortcut for `self.expression.last_column`. + # @return [Integer] + # + # pkg:gem/parser#lib/parser/source/map.rb:125 + def last_column; end + + # A shortcut for `self.expression.last_line`. + # @return [Integer] + # + # pkg:gem/parser#lib/parser/source/map.rb:117 + def last_line; end + + # A shortcut for `self.expression.line`. + # @return [Integer] + # + # pkg:gem/parser#lib/parser/source/map.rb:99 + def line; end + + # pkg:gem/parser#lib/parser/source/map.rb:71 + def node; end + + # @api private + # + # pkg:gem/parser#lib/parser/source/map.rb:89 + def node=(node); end + + # Converts this source map to a hash with keys corresponding to + # ranges. For example, if called on an instance of {Collection}, + # which adds the `begin` and `end` ranges, the resulting hash + # will contain keys `:expression`, `:begin` and `:end`. + # + # @example + # require 'parser/current' + # + # p Parser::CurrentRuby.parse('[1, 2]').loc.to_hash + # # => { + # # :begin => #, + # # :end => #, + # # :expression => # + # # } + # + # @return [Hash] + # + # pkg:gem/parser#lib/parser/source/map.rb:166 + def to_hash; end + + # @api private + # + # pkg:gem/parser#lib/parser/source/map.rb:132 + def with_expression(expression_l); end + + protected + + # pkg:gem/parser#lib/parser/source/map.rb:180 + def update_expression(expression_l); end + + # pkg:gem/parser#lib/parser/source/map.rb:176 + def with(&block); end + + private + + # @api private + # + # pkg:gem/parser#lib/parser/source/map.rb:82 + def initialize_copy(other); end +end + +# pkg:gem/parser#lib/parser/source/map/collection.rb:6 +class Parser::Source::Map::Collection < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/collection.rb:10 + def initialize(begin_l, end_l, expression_l); end + + # pkg:gem/parser#lib/parser/source/map/collection.rb:7 + def begin; end + + # pkg:gem/parser#lib/parser/source/map/collection.rb:8 + def end; end +end + +# pkg:gem/parser#lib/parser/source/map/condition.rb:6 +class Parser::Source::Map::Condition < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/condition.rb:12 + def initialize(keyword_l, begin_l, else_l, end_l, expression_l); end + + # pkg:gem/parser#lib/parser/source/map/condition.rb:8 + def begin; end + + # pkg:gem/parser#lib/parser/source/map/condition.rb:9 + def else; end + + # pkg:gem/parser#lib/parser/source/map/condition.rb:10 + def end; end + + # pkg:gem/parser#lib/parser/source/map/condition.rb:7 + def keyword; end +end + +# pkg:gem/parser#lib/parser/source/map/constant.rb:6 +class Parser::Source::Map::Constant < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/constant.rb:11 + def initialize(double_colon, name, expression); end + + # pkg:gem/parser#lib/parser/source/map/constant.rb:7 + def double_colon; end + + # pkg:gem/parser#lib/parser/source/map/constant.rb:8 + def name; end + + # pkg:gem/parser#lib/parser/source/map/constant.rb:9 + def operator; end + + # @api private + # + # pkg:gem/parser#lib/parser/source/map/constant.rb:20 + def with_operator(operator_l); end + + protected + + # pkg:gem/parser#lib/parser/source/map/constant.rb:26 + def update_operator(operator_l); end +end + +# pkg:gem/parser#lib/parser/source/map/definition.rb:6 +class Parser::Source::Map::Definition < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/definition.rb:12 + def initialize(keyword_l, operator_l, name_l, end_l); end + + # pkg:gem/parser#lib/parser/source/map/definition.rb:10 + def end; end + + # pkg:gem/parser#lib/parser/source/map/definition.rb:7 + def keyword; end + + # pkg:gem/parser#lib/parser/source/map/definition.rb:9 + def name; end + + # pkg:gem/parser#lib/parser/source/map/definition.rb:8 + def operator; end +end + +# pkg:gem/parser#lib/parser/source/map/for.rb:6 +class Parser::Source::Map::For < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/for.rb:10 + def initialize(keyword_l, in_l, begin_l, end_l, expression_l); end + + # pkg:gem/parser#lib/parser/source/map/for.rb:8 + def begin; end + + # pkg:gem/parser#lib/parser/source/map/for.rb:8 + def end; end + + # pkg:gem/parser#lib/parser/source/map/for.rb:7 + def in; end + + # pkg:gem/parser#lib/parser/source/map/for.rb:7 + def keyword; end +end + +# pkg:gem/parser#lib/parser/source/map/heredoc.rb:6 +class Parser::Source::Map::Heredoc < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/heredoc.rb:10 + def initialize(begin_l, body_l, end_l); end + + # pkg:gem/parser#lib/parser/source/map/heredoc.rb:7 + def heredoc_body; end + + # pkg:gem/parser#lib/parser/source/map/heredoc.rb:8 + def heredoc_end; end +end + +# pkg:gem/parser#lib/parser/source/map/index.rb:6 +class Parser::Source::Map::Index < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/index.rb:11 + def initialize(begin_l, end_l, expression_l); end + + # pkg:gem/parser#lib/parser/source/map/index.rb:7 + def begin; end + + # pkg:gem/parser#lib/parser/source/map/index.rb:8 + def end; end + + # pkg:gem/parser#lib/parser/source/map/index.rb:9 + def operator; end + + # @api private + # + # pkg:gem/parser#lib/parser/source/map/index.rb:21 + def with_operator(operator_l); end + + protected + + # pkg:gem/parser#lib/parser/source/map/index.rb:27 + def update_operator(operator_l); end +end + +# pkg:gem/parser#lib/parser/source/map/keyword.rb:6 +class Parser::Source::Map::Keyword < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/keyword.rb:11 + def initialize(keyword_l, begin_l, end_l, expression_l); end + + # pkg:gem/parser#lib/parser/source/map/keyword.rb:8 + def begin; end + + # pkg:gem/parser#lib/parser/source/map/keyword.rb:9 + def end; end + + # pkg:gem/parser#lib/parser/source/map/keyword.rb:7 + def keyword; end +end + +# pkg:gem/parser#lib/parser/source/map/method_definition.rb:6 +class Parser::Source::Map::MethodDefinition < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/method_definition.rb:13 + def initialize(keyword_l, operator_l, name_l, end_l, assignment_l, body_l); end + + # pkg:gem/parser#lib/parser/source/map/method_definition.rb:11 + def assignment; end + + # pkg:gem/parser#lib/parser/source/map/method_definition.rb:10 + def end; end + + # pkg:gem/parser#lib/parser/source/map/method_definition.rb:7 + def keyword; end + + # pkg:gem/parser#lib/parser/source/map/method_definition.rb:9 + def name; end + + # pkg:gem/parser#lib/parser/source/map/method_definition.rb:8 + def operator; end +end + +# pkg:gem/parser#lib/parser/source/map/objc_kwarg.rb:6 +class Parser::Source::Map::ObjcKwarg < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/objc_kwarg.rb:11 + def initialize(keyword_l, operator_l, argument_l, expression_l); end + + # pkg:gem/parser#lib/parser/source/map/objc_kwarg.rb:9 + def argument; end + + # pkg:gem/parser#lib/parser/source/map/objc_kwarg.rb:7 + def keyword; end + + # pkg:gem/parser#lib/parser/source/map/objc_kwarg.rb:8 + def operator; end +end + +# pkg:gem/parser#lib/parser/source/map/operator.rb:6 +class Parser::Source::Map::Operator < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/operator.rb:9 + def initialize(operator, expression); end + + # pkg:gem/parser#lib/parser/source/map/operator.rb:7 + def operator; end +end + +# pkg:gem/parser#lib/parser/source/map/rescue_body.rb:6 +class Parser::Source::Map::RescueBody < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/rescue_body.rb:11 + def initialize(keyword_l, assoc_l, begin_l, expression_l); end + + # pkg:gem/parser#lib/parser/source/map/rescue_body.rb:8 + def assoc; end + + # pkg:gem/parser#lib/parser/source/map/rescue_body.rb:9 + def begin; end + + # pkg:gem/parser#lib/parser/source/map/rescue_body.rb:7 + def keyword; end +end + +# pkg:gem/parser#lib/parser/source/map/send.rb:6 +class Parser::Source::Map::Send < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/send.rb:13 + def initialize(dot_l, selector_l, begin_l, end_l, expression_l); end + + # pkg:gem/parser#lib/parser/source/map/send.rb:10 + def begin; end + + # pkg:gem/parser#lib/parser/source/map/send.rb:7 + def dot; end + + # pkg:gem/parser#lib/parser/source/map/send.rb:11 + def end; end + + # pkg:gem/parser#lib/parser/source/map/send.rb:9 + def operator; end + + # pkg:gem/parser#lib/parser/source/map/send.rb:8 + def selector; end + + # @api private + # + # pkg:gem/parser#lib/parser/source/map/send.rb:24 + def with_operator(operator_l); end + + protected + + # pkg:gem/parser#lib/parser/source/map/send.rb:30 + def update_operator(operator_l); end +end + +# pkg:gem/parser#lib/parser/source/map/ternary.rb:6 +class Parser::Source::Map::Ternary < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/ternary.rb:10 + def initialize(question_l, colon_l, expression_l); end + + # pkg:gem/parser#lib/parser/source/map/ternary.rb:8 + def colon; end + + # pkg:gem/parser#lib/parser/source/map/ternary.rb:7 + def question; end +end + +# pkg:gem/parser#lib/parser/source/map/variable.rb:6 +class Parser::Source::Map::Variable < ::Parser::Source::Map + # pkg:gem/parser#lib/parser/source/map/variable.rb:10 + def initialize(name_l, expression_l = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/source/map/variable.rb:7 + def name; end + + # pkg:gem/parser#lib/parser/source/map/variable.rb:8 + def operator; end + + # @api private + # + # pkg:gem/parser#lib/parser/source/map/variable.rb:19 + def with_operator(operator_l); end + + protected + + # pkg:gem/parser#lib/parser/source/map/variable.rb:25 + def update_operator(operator_l); end +end + +# A range of characters in a particular source buffer. +# +# The range is always exclusive, i.e. a range with `begin_pos` of 3 and +# `end_pos` of 5 will contain the following characters: +# +# example +# ^^ +# +# @!attribute [r] source_buffer +# @return [Parser::Source::Buffer] +# +# @!attribute [r] begin_pos +# @return [Integer] index of the first character in the range +# +# @!attribute [r] end_pos +# @return [Integer] index of the character after the last character in the range +# +# @api public +# +# pkg:gem/parser#lib/parser/source/range.rb:26 +class Parser::Source::Range + include ::Comparable + + # @param [Buffer] source_buffer + # @param [Integer] begin_pos + # @param [Integer] end_pos + # + # pkg:gem/parser#lib/parser/source/range.rb:37 + def initialize(source_buffer, begin_pos, end_pos); end + + # Compare ranges, first by begin_pos, then by end_pos. + # + # pkg:gem/parser#lib/parser/source/range.rb:301 + def <=>(other); end + + # @param [Hash] Endpoint(s) to change, any combination of :begin_pos or :end_pos + # @return [Range] the same range as this range but with the given end point(s) adjusted + # by the given amount(s) + # + # pkg:gem/parser#lib/parser/source/range.rb:193 + def adjust(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end + + # @return [Range] a zero-length range located just before the beginning + # of this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:55 + def begin; end + + # pkg:gem/parser#lib/parser/source/range.rb:30 + def begin_pos; end + + # @return [Integer] zero-based column number of the beginning of this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:92 + def column; end + + # @return [::Range] a range of columns spanned by this range. + # @raise RangeError + # + # pkg:gem/parser#lib/parser/source/range.rb:114 + def column_range; end + + # Return `other.contains?(self)` + # + # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? + # + # @param [Range] other + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/source/range.rb:274 + def contained?(other); end + + # Returns true iff this range contains (strictly) `other`. + # + # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? + # + # @param [Range] other + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/source/range.rb:262 + def contains?(other); end + + # Returns true iff both ranges intersect and also have different elements from one another. + # + # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? + # + # @param [Range] other + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/source/range.rb:286 + def crossing?(other); end + + # Return `true` iff this range and `other` are disjoint. + # + # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? + # + # @param [Range] other + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/source/range.rb:236 + def disjoint?(other); end + + # Checks if a range is empty; if it contains no characters + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/source/range.rb:294 + def empty?; end + + # @return [Range] a zero-length range located just after the end + # of this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:63 + def end; end + + # pkg:gem/parser#lib/parser/source/range.rb:30 + def end_pos; end + + # pkg:gem/parser#lib/parser/source/range.rb:308 + def eql?(_arg0); end + + # pkg:gem/parser#lib/parser/source/range.rb:87 + def first_line; end + + # Support for Ranges be used in as Hash indices and in Sets. + # + # pkg:gem/parser#lib/parser/source/range.rb:313 + def hash; end + + # @return [String] a human-readable representation of this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:320 + def inspect; end + + # @param [Range] other + # @return [Range] overlapping region of this range and `other`, or `nil` + # if they do not overlap + # + # pkg:gem/parser#lib/parser/source/range.rb:220 + def intersect(other); end + + # `is?` provides a concise way to compare the source corresponding to this range. + # For example, `r.source == '(' || r.source == 'begin'` is equivalent to + # `r.is?('(', 'begin')`. + # + # pkg:gem/parser#lib/parser/source/range.rb:141 + def is?(*what); end + + # @param [Range] other + # @return [Range] smallest possible range spanning both this range and `other`. + # + # pkg:gem/parser#lib/parser/source/range.rb:209 + def join(other); end + + # @return [Integer] zero-based column number of the end of this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:106 + def last_column; end + + # @return [Integer] line number of the end of this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:99 + def last_line; end + + # pkg:gem/parser#lib/parser/source/range.rb:74 + def length; end + + # Line number of the beginning of this range. By default, the first line + # of a buffer is 1; as such, line numbers are most commonly one-based. + # + # @see Buffer + # @return [Integer] line number of the beginning of this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:83 + def line; end + + # Return `true` iff this range is not disjoint from `other`. + # + # @param [Range] other + # @return [Boolean] `true` if this range and `other` overlap + # + # pkg:gem/parser#lib/parser/source/range.rb:250 + def overlaps?(other); end + + # @param [Integer] new_size + # @return [Range] a range beginning at the same point as this range and length `new_size`. + # + # pkg:gem/parser#lib/parser/source/range.rb:201 + def resize(new_size); end + + # @return [Integer] amount of characters included in this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:70 + def size; end + + # @return [String] all source code covered by this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:132 + def source; end + + # pkg:gem/parser#lib/parser/source/range.rb:29 + def source_buffer; end + + # @return [String] a line of source code containing the beginning of this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:125 + def source_line; end + + # @return [Array] a set of character indexes contained in this range. + # + # pkg:gem/parser#lib/parser/source/range.rb:148 + def to_a; end + + # @return [Range] a Ruby range with the same `begin_pos` and `end_pos` + # + # pkg:gem/parser#lib/parser/source/range.rb:155 + def to_range; end + + # Composes a GNU/Clang-style string representation of the beginning of this + # range. + # + # For example, for the following range in file `foo.rb`, + # + # def foo + # ^^^ + # + # `to_s` will return `foo.rb:1:5`. + # Note that the column index is one-based. + # + # @return [String] + # + # pkg:gem/parser#lib/parser/source/range.rb:173 + def to_s; end + + # @param [Hash] Endpoint(s) to change, any combination of :begin_pos or :end_pos + # @return [Range] the same range as this range but with the given end point(s) changed + # to the given value(s). + # + # pkg:gem/parser#lib/parser/source/range.rb:184 + def with(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end +end + +# {Rewriter} is deprecated. Use {TreeRewriter} instead. +# +# TreeRewriter has simplified semantics, and customizable policies +# with regards to clobbering. Please read the documentation. +# +# Keep in mind: +# - Rewriter was discarding the `end_pos` of the given range for `insert_before`, +# and the `begin_pos` for `insert_after`. These are meaningful in TreeRewriter. +# - TreeRewriter's wrap/insert_before/insert_after are multiple by default, while +# Rewriter would raise clobbering errors if the non '_multi' version was called. +# - The TreeRewriter policy closest to Rewriter's behavior is: +# different_replacements: :raise, +# swallowed_insertions: :raise, +# crossing_deletions: :accept +# +# @!attribute [r] source_buffer +# @return [Source::Buffer] +# +# @!attribute [r] diagnostics +# @return [Diagnostic::Engine] +# +# @api public +# @deprecated Use {TreeRewriter} +# +# pkg:gem/parser#lib/parser/source/rewriter.rb:31 +class Parser::Source::Rewriter + extend ::Parser::Deprecation + + # @param [Source::Buffer] source_buffer + # @deprecated Use {TreeRewriter} + # + # pkg:gem/parser#lib/parser/source/rewriter.rb:39 + def initialize(source_buffer); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:33 + def diagnostics; end + + # Inserts new code after the given source range. + # + # @param [Range] range + # @param [String] content + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # @deprecated Use {TreeRewriter#insert_after} + # + # pkg:gem/parser#lib/parser/source/rewriter.rb:131 + def insert_after(range, content); end + + # Inserts new code after the given source range by allowing other + # insertions at the same position. + # Note that an insertion with latter invocation comes _after_ earlier + # insertion at the same position in the rewritten source. + # + # @example Inserting ')]' + # rewriter. + # insert_after_multi(range, ')'). + # insert_after_multi(range, ']'). + # process + # + # @param [Range] range + # @param [String] content + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # @deprecated Use {TreeRewriter#insert_after} + # + # pkg:gem/parser#lib/parser/source/rewriter.rb:153 + def insert_after_multi(range, content); end + + # Inserts new code before the given source range. + # + # @param [Range] range + # @param [String] content + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # @deprecated Use {TreeRewriter#insert_before} + # + # pkg:gem/parser#lib/parser/source/rewriter.rb:80 + def insert_before(range, content); end + + # Inserts new code before the given source range by allowing other + # insertions at the same position. + # Note that an insertion with latter invocation comes _before_ earlier + # insertion at the same position in the rewritten source. + # + # @example Inserting '[(' + # rewriter. + # insert_before_multi(range, '('). + # insert_before_multi(range, '['). + # process + # + # @param [Range] range + # @param [String] content + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # @deprecated Use {TreeRewriter#insert_before} + # + # pkg:gem/parser#lib/parser/source/rewriter.rb:117 + def insert_before_multi(range, content); end + + # Applies all scheduled changes to the `source_buffer` and returns + # modified source as a new string. + # + # @return [String] + # @deprecated Use {TreeRewriter#process} + # + # pkg:gem/parser#lib/parser/source/rewriter.rb:178 + def process; end + + # Removes the source range. + # + # @param [Range] range + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # @deprecated Use {TreeRewriter#remove} + # + # pkg:gem/parser#lib/parser/source/rewriter.rb:67 + def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @param [Range] range + # @param [String] content + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # @deprecated Use {TreeRewriter#replace} + # + # pkg:gem/parser#lib/parser/source/rewriter.rb:167 + def replace(range, content); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:32 + def source_buffer; end + + # Provides a protected block where a sequence of multiple rewrite actions + # are handled atomically. If any of the actions failed by clobbering, + # all the actions are rolled back. + # + # @example + # begin + # rewriter.transaction do + # rewriter.insert_before(range_of_something, '(') + # rewriter.insert_after(range_of_something, ')') + # end + # rescue Parser::ClobberingError + # end + # + # @raise [RuntimeError] when no block is passed + # @raise [RuntimeError] when already in a transaction + # @deprecated Use {TreeRewriter#transaction} + # + # pkg:gem/parser#lib/parser/source/rewriter.rb:216 + def transaction; end + + # Inserts new code before and after the given source range. + # + # @param [Range] range + # @param [String] before + # @param [String] after + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # @deprecated Use {TreeRewriter#wrap} + # + # pkg:gem/parser#lib/parser/source/rewriter.rb:94 + def wrap(range, before, after); end + + private + + # pkg:gem/parser#lib/parser/source/rewriter.rb:476 + def active_clobber; end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:484 + def active_clobber=(value); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:480 + def active_insertions; end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:492 + def active_insertions=(value); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:472 + def active_queue; end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:500 + def adjacent?(range1, range2); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:351 + def adjacent_insertion_mask(range); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:366 + def adjacent_insertions?(range); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:347 + def adjacent_position_mask(range); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:377 + def adjacent_updates?(range); end + + # Schedule a code update. If it overlaps with another update, check + # whether they conflict, and raise a clobbering error if they do. + # (As a special case, zero-length ranges at the same position are + # considered to "overlap".) Otherwise, merge them. + # + # Updates which are adjacent to each other, but do not overlap, are also + # merged. + # + # RULES: + # + # - Insertion ("replacing" a zero-length range): + # - Two insertions at the same point conflict. This is true even + # if the earlier insertion has already been merged with an adjacent + # update, and even if they are both inserting the same text. + # - An insertion never conflicts with a replace or remove operation + # on its right or left side, which does not overlap it (in other + # words, which does not update BOTH its right and left sides). + # - An insertion always conflicts with a remove operation which spans + # both its sides. + # - An insertion conflicts with a replace operation which spans both its + # sides, unless the replacement text is longer than the replaced text + # by the size of the insertion (or more), and the portion of + # replacement text immediately after the insertion position is + # identical to the inserted text. + # + # - Removal operations never conflict with each other. + # + # - Replacement operations: + # - Take the portion of each replacement text which falls within: + # - The other operation's replaced region + # - The other operation's replacement text, if it extends past the + # end of its own replaced region (in other words, if the replacement + # text is longer than the text it replaces) + # - If and only if the taken texts are identical for both operations, + # they do not conflict. + # + # pkg:gem/parser#lib/parser/source/rewriter.rb:280 + def append(action); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:389 + def can_merge?(action, existing); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:355 + def clobbered_insertion?(insertion); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:343 + def clobbered_position_mask(range); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:468 + def in_transaction?; end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:410 + def merge_actions(action, existing); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:419 + def merge_actions!(action, existing); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:425 + def merge_replacements(actions); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:450 + def raise_clobber_error(action, existing); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:335 + def record_insertion(range); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:339 + def record_replace(range); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:445 + def replace_actions(old, updated); end + + # pkg:gem/parser#lib/parser/source/rewriter.rb:383 + def replace_compatible_with_insertion?(replace, insertion); end +end + +# @api private +# +# pkg:gem/parser#lib/parser/source/rewriter/action.rb:9 +class Parser::Source::Rewriter::Action + include ::Comparable + + # pkg:gem/parser#lib/parser/source/rewriter/action.rb:15 + def initialize(range, replacement = T.unsafe(nil), allow_multiple_insertions = T.unsafe(nil), order = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/source/rewriter/action.rb:24 + def <=>(other); end + + # pkg:gem/parser#lib/parser/source/rewriter/action.rb:12 + def allow_multiple_insertions; end + + # pkg:gem/parser#lib/parser/source/rewriter/action.rb:13 + def allow_multiple_insertions?; end + + # pkg:gem/parser#lib/parser/source/rewriter/action.rb:12 + def order; end + + # pkg:gem/parser#lib/parser/source/rewriter/action.rb:12 + def range; end + + # pkg:gem/parser#lib/parser/source/rewriter/action.rb:12 + def replacement; end + + # pkg:gem/parser#lib/parser/source/rewriter/action.rb:30 + def to_s; end +end + +# pkg:gem/parser#lib/parser/source/rewriter.rb:504 +Parser::Source::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) + +# {TreeRewriter} performs the heavy lifting in the source rewriting process. +# It schedules code updates to be performed in the correct order. +# +# For simple cases, the resulting source will be obvious. +# +# Examples for more complex cases follow. Assume these examples are acting on +# the source `'puts(:hello, :world)`. The methods #wrap, #remove, etc. +# receive a Range as first argument; for clarity, examples below use english +# sentences and a string of raw code instead. +# +# ## Overlapping ranges: +# +# Any two rewriting actions on overlapping ranges will fail and raise +# a `ClobberingError`, unless they are both deletions (covered next). +# +# * wrap ':hello, ' with '(' and ')' +# * wrap ', :world' with '(' and ')' +# => CloberringError +# +# ## Overlapping deletions: +# +# * remove ':hello, ' +# * remove ', :world' +# +# The overlapping ranges are merged and `':hello, :world'` will be removed. +# This policy can be changed. `:crossing_deletions` defaults to `:accept` +# but can be set to `:warn` or `:raise`. +# +# ## Multiple actions at the same end points: +# +# Results will always be independent on the order they were given. +# Exception: rewriting actions done on exactly the same range (covered next). +# +# Example: +# * replace ', ' by ' => ' +# * wrap ':hello, :world' with '{' and '}' +# * replace ':world' with ':everybody' +# * wrap ':world' with '[', ']' +# +# The resulting string will be `'puts({:hello => [:everybody]})'` +# and this result is independent on the order the instructions were given in. +# +# Note that if the two "replace" were given as a single replacement of ', :world' +# for ' => :everybody', the result would be a `ClobberingError` because of the wrap +# in square brackets. +# +# ## Multiple wraps on same range: +# * wrap ':hello' with '(' and ')' +# * wrap ':hello' with '[' and ']' +# +# The wraps are combined in order given and results would be `'puts([(:hello)], :world)'`. +# +# ## Multiple replacements on same range: +# * replace ':hello' by ':hi', then +# * replace ':hello' by ':hey' +# +# The replacements are made in the order given, so the latter replacement +# supersedes the former and ':hello' will be replaced by ':hey'. +# +# This policy can be changed. `:different_replacements` defaults to `:accept` +# but can be set to `:warn` or `:raise`. +# +# ## Swallowed insertions: +# wrap 'world' by '__', '__' +# replace ':hello, :world' with ':hi' +# +# A containing replacement will swallow the contained rewriting actions +# and `':hello, :world'` will be replaced by `':hi'`. +# +# This policy can be changed for swallowed insertions. `:swallowed_insertions` +# defaults to `:accept` but can be set to `:warn` or `:raise` +# +# ## Implementation +# The updates are organized in a tree, according to the ranges they act on +# (where children are strictly contained by their parent), hence the name. +# +# @!attribute [r] source_buffer +# @return [Source::Buffer] +# +# @!attribute [r] diagnostics +# @return [Diagnostic::Engine] +# +# @api public +# +# pkg:gem/parser#lib/parser/source/tree_rewriter.rb:91 +class Parser::Source::TreeRewriter + extend ::Parser::Deprecation + + # @param [Source::Buffer] source_buffer + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:98 + def initialize(source_buffer, crossing_deletions: T.unsafe(nil), different_replacements: T.unsafe(nil), swallowed_insertions: T.unsafe(nil)); end + + # Returns a representation of the rewriter as nested insertions (:wrap) and replacements. + # + # rewriter.as_actions # =>[ [:wrap, 1...10, '(', ')'], + # [:wrap, 2...6, '', '!'], # aka "insert_after" + # [:replace, 2...4, 'foo'], + # [:replace, 5...6, ''], # aka "removal" + # ], + # + # Contrary to `as_replacements`, this representation is sufficient to recreate exactly + # the rewriter. + # + # @return [Array<(Symbol, Range, String{, String})>] + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:299 + def as_nested_actions; end + + # Returns a representation of the rewriter as an ordered list of replacements. + # + # rewriter.as_replacements # => [ [1...1, '('], + # [2...4, 'foo'], + # [5...6, ''], + # [6...6, '!'], + # [10...10, ')'], + # ] + # + # This representation is sufficient to recreate the result of `process` but it is + # not sufficient to recreate completely the rewriter for further merging/actions. + # See `as_nested_actions` + # + # @return [Array] an ordered list of pairs of range & replacement + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:281 + def as_replacements; end + + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:93 + def diagnostics; end + + # Returns true iff no (non trivial) update has been recorded + # + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:125 + def empty?; end + + # For special cases where one needs to merge a rewriter attached to a different source_buffer + # or that needs to be offset. Policies of the receiver are used. + # + # @param [TreeRewriter] rewriter from different source_buffer + # @param [Integer] offset + # @return [Rewriter] self + # @raise [IndexError] if action ranges (once offset) don't fit the current buffer + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:168 + def import!(foreign_rewriter, offset: T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:329 + def in_transaction?; end + + # Shortcut for `wrap(range, nil, content)` + # + # @param [Range] range + # @param [String] content + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:242 + def insert_after(range, content); end + + # @api private + # @deprecated Use insert_after or wrap + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:351 + def insert_after_multi(range, text); end + + # Shortcut for `wrap(range, content, nil)` + # + # @param [Range] range + # @param [String] content + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:230 + def insert_before(range, content); end + + # @api private + # @deprecated Use insert_after or wrap + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:342 + def insert_before_multi(range, text); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:334 + def inspect; end + + # Returns a new rewriter that consists of the updates of the received + # and the given argument. Policies of the receiver are used. + # + # @param [Rewriter] with + # @return [Rewriter] merge of receiver and argument + # @raise [ClobberingError] when clobbering is detected + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:155 + def merge(with); end + + # Merges the updates of argument with the receiver. + # Policies of the receiver are used. + # This action is atomic in that it won't change the receiver + # unless it succeeds. + # + # @param [Rewriter] with + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:139 + def merge!(with); end + + # Applies all scheduled changes to the `source_buffer` and returns + # modified source as a new string. + # + # @return [String] + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:252 + def process; end + + # Shortcut for `replace(range, '')` + # + # @param [Range] range + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:217 + def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @param [Range] range + # @param [String] content + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:193 + def replace(range, content); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:92 + def source_buffer; end + + # Provides a protected block where a sequence of multiple rewrite actions + # are handled atomically. If any of the actions failed by clobbering, + # all the actions are rolled back. Transactions can be nested. + # + # @raise [RuntimeError] when no block is passed + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:310 + def transaction; end + + # Inserts the given strings before and after the given range. + # + # @param [Range] range + # @param [String, nil] insert_before + # @param [String, nil] insert_after + # @return [Rewriter] self + # @raise [ClobberingError] when clobbering is detected + # + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:206 + def wrap(range, insert_before, insert_after); end + + protected + + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:365 + def action_root; end + + private + + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:369 + def action_summary; end + + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:392 + def check_policy_validity; end + + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:404 + def check_range_validity(range); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:397 + def combine(range, attributes); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:411 + def enforce_policy(event); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter.rb:418 + def trigger_policy(event, range: T.unsafe(nil), conflict: T.unsafe(nil), **arguments); end +end + +# pkg:gem/parser#lib/parser/source/tree_rewriter.rb:391 +Parser::Source::TreeRewriter::ACTIONS = T.let(T.unsafe(nil), Array) + +# @api private +# +# Actions are arranged in a tree and get combined so that: +# +# * Children are strictly contained by their parent +# * Siblings are all disjointed from one another and ordered +# * Only actions with `replacement == nil` may have children +# +# pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:14 +class Parser::Source::TreeRewriter::Action + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:17 + def initialize(range, enforcer, insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil), children: T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:29 + def combine(action); end + + # A root action has its range set to the whole source range, even + # though it typically does not act on that range. + # This method returns the action as if it was a child action with + # its range contracted. + # @return [Action] + # + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:68 + def contract; end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:34 + def empty?; end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:15 + def insert_after; end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:15 + def insert_before; end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:58 + def insertion?; end + + # @return [Action] that has been moved to the given source_buffer and with the given offset + # No check is done on validity of resulting range. + # + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:81 + def moved(source_buffer, offset); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:50 + def nested_actions; end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:41 + def ordered_replacements; end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:15 + def range; end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:15 + def replacement; end + + protected + + # Returns the children in a hierarchy with respect to `action`: + # :sibbling_left, sibbling_right (for those that are disjoint from `action`) + # :parent (in case one of our children contains `action`) + # :child (in case `action` strictly contains some of our children) + # :fusible (in case `action` overlaps some children but they can be fused in one deletion) + # or raises a `CloberingError` + # In case a child has equal range to `action`, it is returned as `:parent` + # Reminder: an empty range 1...1 is considered disjoint from 1...10 + # + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:159 + def analyse_hierarchy(action); end + + # Similar to @children.bsearch_index || size + # except allows for a starting point + # and `bsearch_index` is only Ruby 2.3+ + # + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:146 + def bsearch_child_index(from = T.unsafe(nil)); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:225 + def call_enforcer_for_merge(action); end + + # @param [Array(Action | nil)] fusible + # + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:205 + def check_fusible(action, *fusible); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:95 + def children; end + + # Assumes `more_children` all contained within `@range` + # + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:130 + def combine_children(more_children); end + + # Assumes range.contains?(action.range) && action.children.empty? + # + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:103 + def do_combine(action); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:136 + def fuse_deletions(action, fusible, other_sibblings); end + + # Assumes action.range == range && action.children.empty? + # + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:216 + def merge(action); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:111 + def place_in_hierarchy(action); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:233 + def swallow(children); end + + # pkg:gem/parser#lib/parser/source/tree_rewriter/action.rb:97 + def with(range: T.unsafe(nil), enforcer: T.unsafe(nil), children: T.unsafe(nil), insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil)); end +end + +# pkg:gem/parser#lib/parser/source/tree_rewriter.rb:356 +Parser::Source::TreeRewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) + +# pkg:gem/parser#lib/parser/source/tree_rewriter.rb:417 +Parser::Source::TreeRewriter::POLICY_TO_LEVEL = T.let(T.unsafe(nil), Hash) + +# pkg:gem/parser#lib/parser/static_environment.rb:5 +class Parser::StaticEnvironment + # pkg:gem/parser#lib/parser/static_environment.rb:17 + def initialize; end + + # pkg:gem/parser#lib/parser/static_environment.rb:55 + def declare(name); end + + # Anonymous blockarg + # + # pkg:gem/parser#lib/parser/static_environment.rb:77 + def declare_anonymous_blockarg; end + + # Anonymous kwresarg + # + # pkg:gem/parser#lib/parser/static_environment.rb:113 + def declare_anonymous_kwrestarg; end + + # Anonymous restarg + # + # pkg:gem/parser#lib/parser/static_environment.rb:95 + def declare_anonymous_restarg; end + + # Forward args + # + # pkg:gem/parser#lib/parser/static_environment.rb:67 + def declare_forward_args; end + + # pkg:gem/parser#lib/parser/static_environment.rb:61 + def declared?(name); end + + # pkg:gem/parser#lib/parser/static_environment.rb:81 + def declared_anonymous_blockarg?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:85 + def declared_anonymous_blockarg_in_current_scpe?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:117 + def declared_anonymous_kwrestarg?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:121 + def declared_anonymous_kwrestarg_in_current_scope?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:99 + def declared_anonymous_restarg?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:103 + def declared_anonymous_restarg_in_current_scope?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:71 + def declared_forward_args?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:129 + def empty?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:33 + def extend_dynamic; end + + # pkg:gem/parser#lib/parser/static_environment.rb:26 + def extend_static; end + + # pkg:gem/parser#lib/parser/static_environment.rb:89 + def parent_has_anonymous_blockarg?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:125 + def parent_has_anonymous_kwrestarg?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:107 + def parent_has_anonymous_restarg?; end + + # pkg:gem/parser#lib/parser/static_environment.rb:21 + def reset; end + + # pkg:gem/parser#lib/parser/static_environment.rb:49 + def unextend; end +end + +# pkg:gem/parser#lib/parser/static_environment.rb:15 +Parser::StaticEnvironment::ANONYMOUS_BLOCKARG_INHERITED = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/parser#lib/parser/static_environment.rb:14 +Parser::StaticEnvironment::ANONYMOUS_BLOCKARG_IN_CURRENT_SCOPE = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/parser#lib/parser/static_environment.rb:12 +Parser::StaticEnvironment::ANONYMOUS_KWRESTARG_INHERITED = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/parser#lib/parser/static_environment.rb:11 +Parser::StaticEnvironment::ANONYMOUS_KWRESTARG_IN_CURRENT_SCOPE = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/parser#lib/parser/static_environment.rb:9 +Parser::StaticEnvironment::ANONYMOUS_RESTARG_INHERITED = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/parser#lib/parser/static_environment.rb:8 +Parser::StaticEnvironment::ANONYMOUS_RESTARG_IN_CURRENT_SCOPE = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/parser#lib/parser/static_environment.rb:6 +Parser::StaticEnvironment::FORWARD_ARGS = T.let(T.unsafe(nil), Symbol) + +# {Parser::SyntaxError} is raised whenever parser detects a syntax error, +# similar to the standard SyntaxError class. +# +# @api public +# +# @!attribute [r] diagnostic +# @return [Parser::Diagnostic] +# +# pkg:gem/parser#lib/parser/syntax_error.rb:13 +class Parser::SyntaxError < ::StandardError + # pkg:gem/parser#lib/parser/syntax_error.rb:16 + def initialize(diagnostic); end + + # pkg:gem/parser#lib/parser/syntax_error.rb:14 + def diagnostic; end +end + +# {Parser::TreeRewriter} offers a basic API that makes it easy to rewrite +# existing ASTs. It's built on top of {Parser::AST::Processor} and +# {Parser::Source::TreeRewriter} +# +# For example, assume you want to remove `do` tokens from a while statement. +# You can do this as following: +# +# require 'parser/current' +# +# class RemoveDo < Parser::TreeRewriter +# def on_while(node) +# # Check if the statement starts with "do" +# if node.location.begin.is?('do') +# remove(node.location.begin) +# end +# end +# end +# +# code = <<-EOF +# while true do +# puts 'hello' +# end +# EOF +# +# ast = Parser::CurrentRuby.parse code +# buffer = Parser::Source::Buffer.new('(example)', source: code) +# rewriter = RemoveDo.new +# +# # Rewrite the AST, returns a String with the new form. +# puts rewriter.rewrite(buffer, ast) +# +# This would result in the following Ruby code: +# +# while true +# puts 'hello' +# end +# +# Keep in mind that {Parser::TreeRewriter} does not take care of indentation when +# inserting/replacing code so you'll have to do this yourself. +# +# See also [a blog entry](http://whitequark.org/blog/2013/04/26/lets-play-with-ruby-code/) +# describing rewriters in greater detail. +# +# @api public +# +# pkg:gem/parser#lib/parser/tree_rewriter.rb:51 +class Parser::TreeRewriter < ::Parser::AST::Processor + # Returns `true` if the specified node is an assignment node, returns false + # otherwise. + # + # @param [Parser::AST::Node] node + # @return [Boolean] + # + # pkg:gem/parser#lib/parser/tree_rewriter.rb:79 + def assignment?(node); end + + # Inserts new code after the given source range. + # + # @param [Parser::Source::Range] range + # @param [String] content + # + # pkg:gem/parser#lib/parser/tree_rewriter.rb:118 + def insert_after(range, content); end + + # Inserts new code before the given source range. + # + # @param [Parser::Source::Range] range + # @param [String] content + # + # pkg:gem/parser#lib/parser/tree_rewriter.rb:108 + def insert_before(range, content); end + + # Removes the source range. + # + # @param [Parser::Source::Range] range + # + # pkg:gem/parser#lib/parser/tree_rewriter.rb:88 + def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @param [Parser::Source::Range] range + # @param [String] content + # + # pkg:gem/parser#lib/parser/tree_rewriter.rb:128 + def replace(range, content); end + + # Rewrites the AST/source buffer and returns a String containing the new + # version. + # + # @param [Parser::Source::Buffer] source_buffer + # @param [Parser::AST::Node] ast + # @param [Symbol] crossing_deletions:, different_replacements:, swallowed_insertions: + # policy arguments for TreeRewriter (optional) + # @return [String] + # + # pkg:gem/parser#lib/parser/tree_rewriter.rb:62 + def rewrite(source_buffer, ast, **policy); end + + # Wraps the given source range with the given values. + # + # @param [Parser::Source::Range] range + # @param [String] content + # + # pkg:gem/parser#lib/parser/tree_rewriter.rb:98 + def wrap(range, before, after); end +end + +# {Parser::UnknownEncodingInMagicComment} is raised when a magic encoding +# comment is encountered that the currently running Ruby version doesn't +# recognize. It inherits from {ArgumentError} since that is the exception +# Ruby itself raises when trying to execute a file with an unknown encoding. +# As such, it is also not a {Parser::SyntaxError}. +# +# @api public +# +# pkg:gem/parser#lib/parser/unknown_encoding_in_magic_comment_error.rb:13 +class Parser::UnknownEncodingInMagicComment < ::ArgumentError; end + +# pkg:gem/parser#lib/parser/version.rb:4 +Parser::VERSION = T.let(T.unsafe(nil), String) + +# pkg:gem/parser#lib/parser/variables_stack.rb:5 +class Parser::VariablesStack + # pkg:gem/parser#lib/parser/variables_stack.rb:6 + def initialize; end + + # pkg:gem/parser#lib/parser/variables_stack.rb:27 + def declare(name); end + + # pkg:gem/parser#lib/parser/variables_stack.rb:31 + def declared?(name); end + + # pkg:gem/parser#lib/parser/variables_stack.rb:11 + def empty?; end + + # pkg:gem/parser#lib/parser/variables_stack.rb:19 + def pop; end + + # pkg:gem/parser#lib/parser/variables_stack.rb:15 + def push; end + + # pkg:gem/parser#lib/parser/variables_stack.rb:23 + def reset; end +end diff --git a/sorbet/rbi/gems/parser@3.3.7.2.rbi b/sorbet/rbi/gems/parser@3.3.7.2.rbi deleted file mode 100644 index 92c9777..0000000 --- a/sorbet/rbi/gems/parser@3.3.7.2.rbi +++ /dev/null @@ -1,5532 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `parser` gem. -# Please instead update this file by running `bin/tapioca gem parser`. - - -# @api public -# -# source://parser//lib/parser.rb#19 -module Parser; end - -# @api public -# -# source://parser//lib/parser.rb#24 -module Parser::AST; end - -# {Parser::AST::Node} contains information about a single AST node and its -# child nodes. It extends the basic [AST::Node](https://www.rubydoc.info/gems/ast/AST/Node) -# class provided by gem [ast](https://www.rubydoc.info/gems/ast). -# -# @api public -# -# source://parser//lib/parser/ast/node.rb#17 -class Parser::AST::Node < ::AST::Node - # Assigns various properties to this AST node. Currently only the - # location can be set. - # - # @api public - # @option properties - # @param properties [Hash] - # - # source://parser//lib/parser/ast/node.rb#30 - def assign_properties(properties); end - - # Source map for this Node. - # - # @api public - # @return [Parser::Source::Map] - # - # source://parser//lib/parser/ast/node.rb#18 - def loc; end - - # Source map for this Node. - # - # @api public - # @return [Parser::Source::Map] - # - # source://parser//lib/parser/ast/node.rb#18 - def location; end -end - -# @api public -# -# source://parser//lib/parser/ast/processor.rb#9 -class Parser::AST::Processor - include ::AST::Processor::Mixin - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_alias(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_and(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_and_asgn(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#118 - def on_arg(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_arg_expr(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_args(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#105 - def on_argument(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_array(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_array_pattern(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_array_pattern_with_tail(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#34 - def on_back_ref(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_begin(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_block(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_block_pass(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#118 - def on_blockarg(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_blockarg_expr(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_break(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_case(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_case_match(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#89 - def on_casgn(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_class(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#81 - def on_const(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_const_pattern(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#181 - def on_csend(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#34 - def on_cvar(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#58 - def on_cvasgn(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#160 - def on_def(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_defined?(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#169 - def on_defs(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_dstr(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_dsym(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_eflipflop(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#288 - def on_empty_else(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_ensure(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_erange(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_find_pattern(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_for(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#118 - def on_forward_arg(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_forwarded_kwrestarg(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_forwarded_restarg(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#34 - def on_gvar(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#58 - def on_gvasgn(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_hash(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_hash_pattern(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_if(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_if_guard(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_iflipflop(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_in_match(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_in_pattern(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_index(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_indexasgn(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_irange(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#34 - def on_ivar(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#58 - def on_ivasgn(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#118 - def on_kwarg(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_kwargs(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_kwbegin(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#118 - def on_kwoptarg(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#118 - def on_kwrestarg(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_kwsplat(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_lambda(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#34 - def on_lvar(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#58 - def on_lvasgn(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_masgn(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_match_alt(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_match_as(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_match_current_line(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_match_pattern(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_match_pattern_p(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_match_rest(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#34 - def on_match_var(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_match_with_lvasgn(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_mlhs(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_module(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_next(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_not(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#34 - def on_nth_ref(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#198 - def on_numblock(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#70 - def on_op_asgn(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#118 - def on_optarg(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_or(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_or_asgn(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_pair(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_pin(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_postexe(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_preexe(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#132 - def on_procarg0(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_redo(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_regexp(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_resbody(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_rescue(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#118 - def on_restarg(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_restarg_expr(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_retry(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_return(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_sclass(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#181 - def on_send(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#118 - def on_shadowarg(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_splat(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_super(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_undef(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_unless_guard(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_until(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_until_post(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#29 - def on_var(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#45 - def on_vasgn(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_when(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_while(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_while_post(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_xstr(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def on_yield(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#281 - def process_argument_node(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#12 - def process_regular_node(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#273 - def process_var_asgn_node(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#265 - def process_variable_node(node); end -end - -# Base class for version-specific parsers. -# -# @api public -# -# source://parser//lib/parser/base.rb#16 -class Parser::Base < ::Racc::Parser - # @api public - # @param builder [Parser::Builders::Default] The AST builder to use. - # @return [Base] a new instance of Base - # - # source://parser//lib/parser/base.rb#126 - def initialize(builder = T.unsafe(nil)); end - - # @api public - # - # source://parser//lib/parser/base.rb#114 - def builder; end - - # @api public - # - # source://parser//lib/parser/base.rb#117 - def context; end - - # @api public - # - # source://parser//lib/parser/base.rb#119 - def current_arg_stack; end - - # @api public - # @return [Parser::Diagnostic::Engine] - # - # source://parser//lib/parser/base.rb#113 - def diagnostics; end - - # @api public - # - # source://parser//lib/parser/base.rb#112 - def lexer; end - - # @api public - # - # source://parser//lib/parser/base.rb#118 - def max_numparam_stack; end - - # Parses a source buffer and returns the AST, or `nil` in case of a non fatal error. - # - # @api public - # @param source_buffer [Parser::Source::Buffer] The source buffer to parse. - # @return [Parser::AST::Node, nil] - # - # source://parser//lib/parser/base.rb#186 - def parse(source_buffer); end - - # Parses a source buffer and returns the AST and the source code comments. - # - # @api public - # @return [Array] - # @see #parse - # @see Parser::Source::Comment#associate - # - # source://parser//lib/parser/base.rb#204 - def parse_with_comments(source_buffer); end - - # @api public - # - # source://parser//lib/parser/base.rb#121 - def pattern_hash_keys; end - - # @api public - # - # source://parser//lib/parser/base.rb#120 - def pattern_variables; end - - # Resets the state of the parser. - # - # @api public - # - # source://parser//lib/parser/base.rb#167 - def reset; end - - # @api public - # - # source://parser//lib/parser/base.rb#116 - def source_buffer; end - - # @api public - # @return [Parser::StaticEnvironment] - # - # source://parser//lib/parser/base.rb#115 - def static_env; end - - # Parses a source buffer and returns the AST, the source code comments, - # and the tokens emitted by the lexer. In case of a fatal error, a {SyntaxError} - # is raised, unless `recover` is true. In case of an error - # (non-fatal or recovered), `nil` is returned instead of the AST, and - # comments as well as tokens are only returned up to the location of - # the error. - # - # Currently, token stream format returned by #tokenize is not documented, - # but is considered part of a public API and only changed according - # to Semantic Versioning. - # - # However, note that the exact token composition of various constructs - # might vary. For example, a string `"foo"` is represented equally well - # by `:tSTRING_BEG " :tSTRING_CONTENT foo :tSTRING_END "` and - # `:tSTRING "foo"`; such details must not be relied upon. - # - # @api public - # @param source_buffer [Parser::Source::Buffer] - # @param recover [Boolean] If true, recover from syntax errors. False by default. - # @return [Array] - # - # source://parser//lib/parser/base.rb#233 - def tokenize(source_buffer, recover = T.unsafe(nil)); end - - private - - # @api public - # - # source://parser//lib/parser/base.rb#257 - def check_kwarg_name(name_t); end - - # @api public - # - # source://parser//lib/parser/base.rb#266 - def diagnostic(level, reason, arguments, location_t, highlights_ts = T.unsafe(nil)); end - - # @api public - # - # source://parser//lib/parser/base.rb#251 - def next_token; end - - # @api public - # - # source://parser//lib/parser/base.rb#282 - def on_error(error_token_id, error_value, value_stack); end - - class << self - # @api public - # @return [Parser::Base] parser with the default options set. - # - # source://parser//lib/parser/base.rb#84 - def default_parser; end - - # Parses a string of Ruby code and returns the AST. If the source - # cannot be parsed, {SyntaxError} is raised and a diagnostic is - # printed to `stderr`. - # - # @api public - # @example - # Parser::Base.parse('puts "hello"') - # @param string [String] The block of code to parse. - # @param file [String] The name of the file the code originated from. - # @param line [Numeric] The initial line number. - # @return [Parser::AST::Node] - # - # source://parser//lib/parser/base.rb#30 - def parse(string, file = T.unsafe(nil), line = T.unsafe(nil)); end - - # Parses Ruby source code by reading it from a file. If the source - # cannot be parsed, {SyntaxError} is raised and a diagnostic is - # printed to `stderr`. - # - # @api public - # @param filename [String] Path to the file to parse. - # @return [Parser::AST::Node] - # @see #parse - # - # source://parser//lib/parser/base.rb#64 - def parse_file(filename); end - - # Parses Ruby source code by reading it from a file and returns the AST and - # comments. If the source cannot be parsed, {SyntaxError} is raised and a - # diagnostic is printed to `stderr`. - # - # @api public - # @param filename [String] Path to the file to parse. - # @return [Array] - # @see #parse - # - # source://parser//lib/parser/base.rb#77 - def parse_file_with_comments(filename); end - - # Parses a string of Ruby code and returns the AST and comments. If the - # source cannot be parsed, {SyntaxError} is raised and a diagnostic is - # printed to `stderr`. - # - # @api public - # @example - # Parser::Base.parse_with_comments('puts "hello"') - # @param string [String] The block of code to parse. - # @param file [String] The name of the file the code originated from. - # @param line [Numeric] The initial line number. - # @return [Array] - # - # source://parser//lib/parser/base.rb#49 - def parse_with_comments(string, file = T.unsafe(nil), line = T.unsafe(nil)); end - - private - - # @api public - # - # source://parser//lib/parser/base.rb#97 - def setup_source_buffer(file, line, string, encoding); end - end -end - -# @api public -# -# source://parser//lib/parser.rb#78 -module Parser::Builders; end - -# source://parser//lib/parser/builders/default.rb#8 -class Parser::Builders::Default - # source://parser//lib/parser/builders/default.rb#243 - def initialize; end - - # source://parser//lib/parser/builders/default.rb#703 - def __ENCODING__(__ENCODING__t); end - - # source://parser//lib/parser/builders/default.rb#348 - def __FILE__(__FILE__t); end - - # source://parser//lib/parser/builders/default.rb#312 - def __LINE__(__LINE__t); end - - # source://parser//lib/parser/builders/default.rb#622 - def accessible(node); end - - # source://parser//lib/parser/builders/default.rb#878 - def alias(alias_t, to, from); end - - # source://parser//lib/parser/builders/default.rb#917 - def arg(name_t); end - - # source://parser//lib/parser/builders/default.rb#1007 - def arg_expr(expr); end - - # 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#1590 - def array_pattern(lbrack_t, elements, rbrack_t); end - - # source://parser//lib/parser/builders/default.rb#767 - def assign(lhs, eql_t, rhs); end - - # 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#1171 - def attr_asgn(receiver, dot_t, selector_t); end - - # source://parser//lib/parser/builders/default.rb#612 - def back_ref(token); end - - # source://parser//lib/parser/builders/default.rb#1435 - def begin(begin_t, body, end_t); end - - # 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#1453 - def begin_keyword(begin_t, body, end_t); end - - # source://parser//lib/parser/builders/default.rb#1205 - def binary_op(receiver, operator_t, arg); end - - # 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#1157 - def block_pass(amper_t, arg); end - - # source://parser//lib/parser/builders/default.rb#982 - def blockarg(amper_t, name_t); end - - # source://parser//lib/parser/builders/default.rb#1027 - def blockarg_expr(amper_t, expr); end - - # source://parser//lib/parser/builders/default.rb#1113 - def call_lambda(lambda_t); end - - # 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#1068 - def call_type_for_dot(dot_t); end - - # 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#1473 - def case_match(case_t, expr, in_bodies, else_t, else_body, end_t); end - - # source://parser//lib/parser/builders/default.rb#343 - def character(char_t); end - - # source://parser//lib/parser/builders/default.rb#284 - def complex(complex_t); end - - # source://parser//lib/parser/builders/default.rb#1423 - def compstmt(statements); end - - # 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#1292 - def condition_mod(if_true, if_false, cond_t, cond); end - - # source://parser//lib/parser/builders/default.rb#686 - def const(name_t); end - - # source://parser//lib/parser/builders/default.rb#698 - def const_fetch(scope, t_colon2, name_t); end - - # source://parser//lib/parser/builders/default.rb#691 - def const_global(t_colon3, name_t); end - - # source://parser//lib/parser/builders/default.rb#763 - def const_op_assignable(node); end - - # 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#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#814 - def def_class(class_t, name, lt_t, superclass, body, end_t); end - - # 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#863 - def def_endless_singleton(def_t, definee, dot_t, name_t, args, assignment_t, body); end - - # 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#827 - def def_module(module_t, name, body, end_t); end - - # 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#853 - def def_singleton(def_t, definee, dot_t, name_t, args, body, end_t); end - - # source://parser//lib/parser/builders/default.rb#237 - def emit_file_line_as_literals; end - - # source://parser//lib/parser/builders/default.rb#237 - def emit_file_line_as_literals=(_arg0); end - - # source://parser//lib/parser/builders/default.rb#265 - def false(false_t); end - - # 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#1331 - def for(for_t, iterator, in_t, iteratee, do_t, body, end_t); end - - # source://parser//lib/parser/builders/default.rb#913 - def forward_arg(dots_t); end - - # 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#1084 - def forwarded_args(dots_t); end - - # source://parser//lib/parser/builders/default.rb#1092 - def forwarded_kwrestarg(dstar_t); end - - # source://parser//lib/parser/builders/default.rb#1088 - def forwarded_restarg(star_t); end - - # source://parser//lib/parser/builders/default.rb#596 - def gvar(token); end - - # source://parser//lib/parser/builders/default.rb#1584 - def hash_pattern(lbrace_t, kwargs, rbrace_t); end - - # source://parser//lib/parser/builders/default.rb#586 - def ident(token); end - - # source://parser//lib/parser/builders/default.rb#1500 - def if_guard(if_t, if_body); end - - # source://parser//lib/parser/builders/default.rb#1479 - def in_match(lhs, in_t, rhs); end - - # 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#1180 - def index(receiver, lbrack_t, indexes, rbrack_t); end - - # 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#591 - def ivar(token); end - - # 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#944 - def kwarg(name_t); end - - # source://parser//lib/parser/builders/default.rb#970 - def kwnilarg(dstar_t, nil_t); end - - # source://parser//lib/parser/builders/default.rb#951 - def kwoptarg(name_t, value); end - - # 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#1279 - def logical_op(type, lhs, op_t, rhs); end - - # 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#1322 - def loop_mod(type, body, keyword_t, cond); end - - # source://parser//lib/parser/builders/default.rb#1634 - def match_alt(left, pipe_t, right); end - - # source://parser//lib/parser/builders/default.rb#1641 - def match_as(value, assoc_t, as); end - - # source://parser//lib/parser/builders/default.rb#1520 - def match_hash_var(name_t); end - - # 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#1672 - def match_label(label_type, label); end - - # source://parser//lib/parser/builders/default.rb#1648 - def match_nil_pattern(dstar_t, nil_t); end - - # source://parser//lib/parser/builders/default.rb#1227 - def match_op(receiver, match_t, arg); end - - # source://parser//lib/parser/builders/default.rb#1653 - def match_pair(label_type, label, value); end - - # source://parser//lib/parser/builders/default.rb#1484 - def match_pattern(lhs, match_t, rhs); end - - # source://parser//lib/parser/builders/default.rb#1489 - def match_pattern_p(lhs, match_t, rhs); end - - # 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#1508 - def match_var(name_t); end - - # source://parser//lib/parser/builders/default.rb#1616 - def match_with_trailing_comma(match, comma_t); end - - # source://parser//lib/parser/builders/default.rb#805 - def multi_assign(lhs, eql_t, rhs); end - - # 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#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#617 - def nth_ref(token); end - - # source://parser//lib/parser/builders/default.rb#899 - def numargs(max_numparam); end - - # 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#1052 - def objc_restarg(star_t, name = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#1162 - def objc_varargs(pair, rest_of_varargs); end - - # source://parser//lib/parser/builders/default.rb#774 - def op_assign(lhs, op_t, rhs); end - - # source://parser//lib/parser/builders/default.rb#924 - def optarg(name_t, eql_t, value); end - - # source://parser//lib/parser/builders/default.rb#488 - def pair(key, assoc_t, value); end - - # source://parser//lib/parser/builders/default.rb#505 - def pair_keyword(key_t, value); end - - # source://parser//lib/parser/builders/default.rb#521 - def pair_label(key_t); end - - # source://parser//lib/parser/builders/default.rb#493 - def pair_list_18(list); end - - # source://parser//lib/parser/builders/default.rb#513 - def pair_quoted(begin_t, parts, end_t, value); end - - # source://parser//lib/parser/builders/default.rb#225 - def parser; end - - # source://parser//lib/parser/builders/default.rb#225 - def parser=(_arg0); end - - # source://parser//lib/parser/builders/default.rb#1629 - def pin(pin_t, var); end - - # 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#1357 - def preexe(preexe_t, lbrace_t, compstmt, rbrace_t); end - - # source://parser//lib/parser/builders/default.rb#992 - def procarg0(arg); end - - # source://parser//lib/parser/builders/default.rb#572 - def range_exclusive(lhs, dot3_t, rhs); end - - # source://parser//lib/parser/builders/default.rb#567 - def range_inclusive(lhs, dot2_t, rhs); end - - # source://parser//lib/parser/builders/default.rb#280 - def rational(rational_t); end - - # source://parser//lib/parser/builders/default.rb#426 - def regexp_compose(begin_t, parts, end_t, options); end - - # source://parser//lib/parser/builders/default.rb#417 - def regexp_options(regopt_t); end - - # 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#933 - def restarg(star_t, name_t = T.unsafe(nil)); end - - # 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#581 - def self(token); end - - # source://parser//lib/parser/builders/default.rb#975 - def shadowarg(name_t); end - - # source://parser//lib/parser/builders/default.rb#445 - def splat(star_t, arg = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#319 - def string(string_t); end - - # source://parser//lib/parser/builders/default.rb#329 - def string_compose(begin_t, parts, end_t); end - - # source://parser//lib/parser/builders/default.rb#324 - def string_internal(string_t); end - - # source://parser//lib/parser/builders/default.rb#355 - def symbol(symbol_t); end - - # source://parser//lib/parser/builders/default.rb#365 - def symbol_compose(begin_t, parts, end_t); end - - # source://parser//lib/parser/builders/default.rb#360 - def symbol_internal(symbol_t); end - - # source://parser//lib/parser/builders/default.rb#469 - def symbols_compose(begin_t, parts, end_t); end - - # 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 - def true(true_t); end - - # source://parser//lib/parser/builders/default.rb#294 - def unary_num(unary_t, numeric); end - - # source://parser//lib/parser/builders/default.rb#1243 - def unary_op(op_t, receiver); end - - # source://parser//lib/parser/builders/default.rb#873 - def undef_method(undef_t, names); end - - # source://parser//lib/parser/builders/default.rb#1504 - def unless_guard(unless_t, unless_body); end - - # 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 - def word(parts); end - - # source://parser//lib/parser/builders/default.rb#464 - def words_compose(begin_t, parts, end_t); end - - # source://parser//lib/parser/builders/default.rb#381 - def xstring_compose(begin_t, parts, end_t); end - - private - - # source://parser//lib/parser/builders/default.rb#1821 - def arg_name_collides?(this_name, that_name); end - - # 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#1991 - def binary_op_map(left_e, op_t, right_e); end - - # 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#1796 - def check_assignment_to_numparam(name, loc); end - - # source://parser//lib/parser/builders/default.rb#1688 - def check_condition(cond); end - - # 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#1742 - def check_duplicate_args(args, map = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#1854 - def check_duplicate_pattern_key(name, loc); end - - # source://parser//lib/parser/builders/default.rb#1844 - def check_duplicate_pattern_variable(name, loc); end - - # source://parser//lib/parser/builders/default.rb#1836 - def check_lvar_name(name, loc); end - - # source://parser//lib/parser/builders/default.rb#1811 - def check_reserved_for_numparam(name, loc); end - - # source://parser//lib/parser/builders/default.rb#2280 - def collapse_string_parts?(parts); end - - # source://parser//lib/parser/builders/default.rb#1942 - def collection_map(begin_t, parts, end_t); end - - # 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#1977 - def constant_map(scope, colon2_t, name_t); end - - # 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#1883 - def delimited_string_map(string_t); end - - # 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#2190 - def eh_keyword_map(compstmt_e, keyword_t, body_es, else_t, else_e); end - - # 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#1938 - def expr_map(loc); end - - # 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#2218 - def guard_map(keyword_t, guard_body_e); end - - # 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#1874 - def join_exprs(left_expr, right_expr); end - - # 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#2141 - def keyword_mod_map(pre_e, keyword_t, post_e); end - - # 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#2333 - def kwargs?(node); end - - # source://parser//lib/parser/builders/default.rb#2297 - def loc(token); end - - # 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#1866 - def n(type, children, source_map); end - - # 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#1908 - def pair_keyword_map(key_t, value_e); end - - # 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#1894 - def prefix_string_map(symbol); end - - # 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#1972 - def regexp_map(begin_t, end_t, options_e); end - - # 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#2323 - def rewrite_hash_args_to_kwargs(args); end - - # 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#2113 - def send_index_map(receiver_e, lbrack_t, rbrack_t); end - - # 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#2096 - def send_unary_op_map(selector_t, arg_e); end - - # source://parser//lib/parser/builders/default.rb#2249 - def static_regexp(parts, options); end - - # source://parser//lib/parser/builders/default.rb#2269 - def static_regexp_node(node); end - - # source://parser//lib/parser/builders/default.rb#2232 - def static_string(nodes); end - - # source://parser//lib/parser/builders/default.rb#1958 - def string_map(begin_t, parts, end_t); end - - # source://parser//lib/parser/builders/default.rb#2289 - def string_value(token); end - - # 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#1879 - def token_map(token); end - - # 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#1903 - def unquoted_map(token); end - - # source://parser//lib/parser/builders/default.rb#2311 - def validate_definee(definee); end - - # source://parser//lib/parser/builders/default.rb#1781 - def validate_no_forward_arg_after_restarg(args); end - - # source://parser//lib/parser/builders/default.rb#2285 - def value(token); end - - # source://parser//lib/parser/builders/default.rb#2084 - def var_send_map(variable_e); end - - # source://parser//lib/parser/builders/default.rb#1987 - def variable_map(name_t); end - - class << self - # source://parser//lib/parser/builders/default.rb#97 - def emit_arg_inside_procarg0; end - - # source://parser//lib/parser/builders/default.rb#97 - def emit_arg_inside_procarg0=(_arg0); end - - # source://parser//lib/parser/builders/default.rb#58 - def emit_encoding; end - - # source://parser//lib/parser/builders/default.rb#58 - def emit_encoding=(_arg0); end - - # source://parser//lib/parser/builders/default.rb#126 - def emit_forward_arg; end - - # source://parser//lib/parser/builders/default.rb#126 - def emit_forward_arg=(_arg0); end - - # source://parser//lib/parser/builders/default.rb#80 - def emit_index; end - - # source://parser//lib/parser/builders/default.rb#80 - def emit_index=(_arg0); end - - # source://parser//lib/parser/builders/default.rb#174 - def emit_kwargs; end - - # source://parser//lib/parser/builders/default.rb#174 - def emit_kwargs=(_arg0); end - - # source://parser//lib/parser/builders/default.rb#22 - def emit_lambda; end - - # source://parser//lib/parser/builders/default.rb#22 - def emit_lambda=(_arg0); end - - # source://parser//lib/parser/builders/default.rb#203 - def emit_match_pattern; end - - # source://parser//lib/parser/builders/default.rb#203 - def emit_match_pattern=(_arg0); end - - # source://parser//lib/parser/builders/default.rb#40 - def emit_procarg0; end - - # source://parser//lib/parser/builders/default.rb#40 - def emit_procarg0=(_arg0); end - - # source://parser//lib/parser/builders/default.rb#211 - def modernize; end - end -end - -# {Parser::ClobberingError} is raised when {Parser::Source::Rewriter} -# detects a clobbering rewrite action. This class inherits {RuntimeError} -# rather than {StandardError} for backward compatibility. -# -# @api public -# -# source://parser//lib/parser/clobbering_error.rb#11 -class Parser::ClobberingError < ::RuntimeError; end - -# Context of parsing that is represented by a stack of scopes. -# -# Supported states: -# + :class - in the class body (class A; end) -# + :module - in the module body (module M; end) -# + :sclass - in the singleton class body (class << obj; end) -# + :def - in the method body (def m; end) -# + :defs - in the singleton method body (def self.m; end) -# + :def_open_args - in the arglist of the method definition -# keep in mind that it's set **only** after reducing the first argument, -# if you need to handle the first argument check `lex_state == expr_fname` -# + :block - in the block body (tap {}) -# + :lambda - in the lambda body (-> {}) -# -# source://parser//lib/parser/context.rb#18 -class Parser::Context - # @return [Context] a new instance of Context - # - # source://parser//lib/parser/context.rb#30 - def initialize; end - - # source://parser//lib/parser/context.rb#45 - def cant_return; end - - # source://parser//lib/parser/context.rb#45 - def cant_return=(_arg0); end - - # source://parser//lib/parser/context.rb#45 - def in_argdef; end - - # source://parser//lib/parser/context.rb#45 - def in_argdef=(_arg0); end - - # source://parser//lib/parser/context.rb#45 - def in_block; end - - # source://parser//lib/parser/context.rb#45 - def in_block=(_arg0); end - - # source://parser//lib/parser/context.rb#45 - def in_class; end - - # source://parser//lib/parser/context.rb#45 - def in_class=(_arg0); end - - # source://parser//lib/parser/context.rb#45 - def in_def; end - - # source://parser//lib/parser/context.rb#45 - def in_def=(_arg0); end - - # source://parser//lib/parser/context.rb#45 - def in_defined; end - - # source://parser//lib/parser/context.rb#45 - def in_defined=(_arg0); end - - # @return [Boolean] - # - # source://parser//lib/parser/context.rb#47 - def in_dynamic_block?; end - - # source://parser//lib/parser/context.rb#45 - def in_kwarg; end - - # source://parser//lib/parser/context.rb#45 - def in_kwarg=(_arg0); end - - # source://parser//lib/parser/context.rb#45 - def in_lambda; end - - # source://parser//lib/parser/context.rb#45 - def in_lambda=(_arg0); end - - # source://parser//lib/parser/context.rb#34 - def reset; end -end - -# source://parser//lib/parser/context.rb#19 -Parser::Context::FLAGS = T.let(T.unsafe(nil), Array) - -# Stack that holds names of current arguments, -# i.e. while parsing -# def m1(a = (def m2(b = def m3(c = 1); end); end)); end -# ^ -# stack is [:a, :b, :c] -# -# Emulates `p->cur_arg` in MRI's parse.y -# -# @api private -# -# source://parser//lib/parser/current_arg_stack.rb#14 -class Parser::CurrentArgStack - # @api private - # @return [CurrentArgStack] a new instance of CurrentArgStack - # - # source://parser//lib/parser/current_arg_stack.rb#17 - def initialize; end - - # @api private - # @return [Boolean] - # - # source://parser//lib/parser/current_arg_stack.rb#22 - def empty?; end - - # @api private - # - # source://parser//lib/parser/current_arg_stack.rb#34 - def pop; end - - # @api private - # - # source://parser//lib/parser/current_arg_stack.rb#26 - def push(value); end - - # @api private - # - # source://parser//lib/parser/current_arg_stack.rb#38 - def reset; end - - # @api private - # - # source://parser//lib/parser/current_arg_stack.rb#30 - def set(value); end - - # @api private - # - # source://parser//lib/parser/current_arg_stack.rb#15 - def stack; end - - # @api private - # - # source://parser//lib/parser/current_arg_stack.rb#42 - def top; end -end - -# @api private -# -# source://parser//lib/parser/deprecation.rb#7 -module Parser::Deprecation - # @api private - # - # source://parser//lib/parser/deprecation.rb#9 - def warn_of_deprecation; end - - # @api private - # - # source://parser//lib/parser/deprecation.rb#8 - def warned_of_deprecation=(_arg0); end -end - -# @api public -# -# source://parser//lib/parser/diagnostic.rb#31 -class Parser::Diagnostic - # @api public - # @param level [Symbol] - # @param reason [Symbol] - # @param arguments [Hash] - # @param location [Parser::Source::Range] - # @param highlights [Array] - # @return [Diagnostic] a new instance of Diagnostic - # - # source://parser//lib/parser/diagnostic.rb#49 - def initialize(level, reason, arguments, location, highlights = T.unsafe(nil)); end - - # @api public - # @return [Symbol] extended arguments that describe the error - # @see Parser::MESSAGES - # - # source://parser//lib/parser/diagnostic.rb#39 - def arguments; end - - # Supplementary error-related source ranges. - # - # @api public - # @return [Array] - # - # source://parser//lib/parser/diagnostic.rb#40 - def highlights; end - - # @api public - # @return [Symbol] diagnostic level - # @see LEVELS - # - # source://parser//lib/parser/diagnostic.rb#39 - def level; end - - # Main error-related source range. - # - # @api public - # @return [Parser::Source::Range] - # - # source://parser//lib/parser/diagnostic.rb#40 - def location; end - - # @api public - # @return [String] the rendered message. - # - # source://parser//lib/parser/diagnostic.rb#69 - def message; end - - # @api public - # @return [Symbol] reason for error - # @see Parser::MESSAGES - # - # source://parser//lib/parser/diagnostic.rb#39 - def reason; end - - # Renders the diagnostic message as a clang-like diagnostic. - # - # @api public - # @example - # diagnostic.render # => - # # [ - # # "(fragment:0):1:5: error: unexpected token $end", - # # "foo +", - # # " ^" - # # ] - # @return [Array] - # - # source://parser//lib/parser/diagnostic.rb#86 - def render; end - - private - - # If necessary, shrink a `Range` so as to include only the first line. - # - # @api public - # @return [Parser::Source::Range] - # - # source://parser//lib/parser/diagnostic.rb#142 - def first_line_only(range); end - - # If necessary, shrink a `Range` so as to include only the last line. - # - # @api public - # @return [Parser::Source::Range] - # - # source://parser//lib/parser/diagnostic.rb#155 - def last_line_only(range); end - - # Renders one source line in clang diagnostic style, with highlights. - # - # @api public - # @return [Array] - # - # source://parser//lib/parser/diagnostic.rb#110 - def render_line(range, ellipsis = T.unsafe(nil), range_end = T.unsafe(nil)); end -end - -# source://parser//lib/parser/diagnostic/engine.rb#36 -class Parser::Diagnostic::Engine - # source://parser//lib/parser/diagnostic/engine.rb#45 - def initialize(consumer = T.unsafe(nil)); end - - # source://parser//lib/parser/diagnostic/engine.rb#39 - def all_errors_are_fatal; end - - # source://parser//lib/parser/diagnostic/engine.rb#39 - def all_errors_are_fatal=(_arg0); end - - # source://parser//lib/parser/diagnostic/engine.rb#37 - def consumer; end - - # source://parser//lib/parser/diagnostic/engine.rb#37 - def consumer=(_arg0); end - - # source://parser//lib/parser/diagnostic/engine.rb#40 - def ignore_warnings; end - - # source://parser//lib/parser/diagnostic/engine.rb#40 - def ignore_warnings=(_arg0); end - - # source://parser//lib/parser/diagnostic/engine.rb#64 - def process(diagnostic); end - - protected - - # source://parser//lib/parser/diagnostic/engine.rb#86 - def ignore?(diagnostic); end - - # source://parser//lib/parser/diagnostic/engine.rb#97 - def raise?(diagnostic); end -end - -# Collection of the available diagnostic levels. -# -# @api public -# @return [Array] -# -# source://parser//lib/parser/diagnostic.rb#37 -Parser::Diagnostic::LEVELS = T.let(T.unsafe(nil), Array) - -# line 3 "lib/parser/lexer.rl" -# -# === BEFORE YOU START === -# -# Read the Ruby Hacking Guide chapter 11, available in English at -# http://whitequark.org/blog/2013/04/01/ruby-hacking-guide-ch-11-finite-state-lexer/ -# -# Remember two things about Ragel scanners: -# -# 1) Longest match wins. -# -# 2) If two matches have the same length, the first -# in source code wins. -# -# General rules of making Ragel and Bison happy: -# -# * `p` (position) and `@te` contain the index of the character -# they're pointing to ("current"), plus one. `@ts` contains the index -# of the corresponding character. The code for extracting matched token is: -# -# @source_buffer.slice(@ts...@te) -# -# * If your input is `foooooooobar` and the rule is: -# -# 'f' 'o'+ -# -# the result will be: -# -# foooooooobar -# ^ ts=0 ^ p=te=9 -# -# * A Ragel lexer action should not emit more than one token, unless -# you know what you are doing. -# -# * All Ragel commands (fnext, fgoto, ...) end with a semicolon. -# -# * If an action emits the token and transitions to another state, use -# these Ragel commands: -# -# emit($whatever) -# fnext $next_state; fbreak; -# -# If you perform `fgoto` in an action which does not emit a token nor -# rewinds the stream pointer, the parser's side-effectful, -# context-sensitive lookahead actions will break in a hard to detect -# and debug way. -# -# * If an action does not emit a token: -# -# fgoto $next_state; -# -# * If an action features lookbehind, i.e. matches characters with the -# intent of passing them to another action: -# -# p = @ts - 1 -# fgoto $next_state; -# -# or, if the lookbehind consists of a single character: -# -# fhold; fgoto $next_state; -# -# * Ragel merges actions. So, if you have `e_lparen = '(' %act` and -# `c_lparen = '('` and a lexer action `e_lparen | c_lparen`, the result -# _will_ invoke the action `act`. -# -# e_something stands for "something with **e**mbedded action". -# -# * EOF is explicit and is matched by `c_eof`. If you want to introspect -# the state of the lexer, add this rule to the state: -# -# c_eof => do_eof; -# -# * If you proceed past EOF, the lexer will complain: -# -# NoMethodError: undefined method `ord' for nil:NilClass -# -# source://parser//lib/parser/lexer-F1.rb#82 -class Parser::Lexer - # @return [Lexer] a new instance of Lexer - # - # source://parser//lib/parser/lexer-F1.rb#8250 - def initialize(version); end - - # Return next token: [type, value]. - # - # source://parser//lib/parser/lexer-F1.rb#8410 - def advance; end - - # Returns the value of attribute cmdarg. - # - # source://parser//lib/parser/lexer-F1.rb#8244 - def cmdarg; end - - # Sets the attribute cmdarg - # - # @param value the value to set the attribute cmdarg to. - # - # source://parser//lib/parser/lexer-F1.rb#8244 - def cmdarg=(_arg0); end - - # Returns the value of attribute cmdarg_stack. - # - # source://parser//lib/parser/lexer-F1.rb#8248 - def cmdarg_stack; end - - # Returns the value of attribute command_start. - # - # source://parser//lib/parser/lexer-F1.rb#8244 - def command_start; end - - # Sets the attribute command_start - # - # @param value the value to set the attribute command_start to. - # - # source://parser//lib/parser/lexer-F1.rb#8244 - def command_start=(_arg0); end - - # Returns the value of attribute comments. - # - # source://parser//lib/parser/lexer-F1.rb#8246 - def comments; end - - # Sets the attribute comments - # - # @param value the value to set the attribute comments to. - # - # source://parser//lib/parser/lexer-F1.rb#8246 - def comments=(_arg0); end - - # Returns the value of attribute cond. - # - # source://parser//lib/parser/lexer-F1.rb#8244 - def cond; end - - # Sets the attribute cond - # - # @param value the value to set the attribute cond to. - # - # source://parser//lib/parser/lexer-F1.rb#8244 - def cond=(_arg0); end - - # Returns the value of attribute cond_stack. - # - # source://parser//lib/parser/lexer-F1.rb#8248 - def cond_stack; end - - # Returns the value of attribute context. - # - # source://parser//lib/parser/lexer-F1.rb#8244 - def context; end - - # Sets the attribute context - # - # @param value the value to set the attribute context to. - # - # source://parser//lib/parser/lexer-F1.rb#8244 - def context=(_arg0); end - - # source://parser//lib/parser/lexer-F1.rb#8405 - def dedent_level; end - - # Returns the value of attribute diagnostics. - # - # source://parser//lib/parser/lexer-F1.rb#8240 - def diagnostics; end - - # Sets the attribute diagnostics - # - # @param value the value to set the attribute diagnostics to. - # - # source://parser//lib/parser/lexer-F1.rb#8240 - def diagnostics=(_arg0); end - - # source://parser//lib/parser/lexer-F1.rb#8358 - def encoding; end - - # Returns the value of attribute force_utf32. - # - # source://parser//lib/parser/lexer-F1.rb#8242 - def force_utf32; end - - # Sets the attribute force_utf32 - # - # @param value the value to set the attribute force_utf32 to. - # - # source://parser//lib/parser/lexer-F1.rb#8242 - def force_utf32=(_arg0); end - - # Returns the value of attribute lambda_stack. - # - # source://parser//lib/parser/lexer-F1.rb#8248 - def lambda_stack; end - - # Returns the value of attribute paren_nest. - # - # source://parser//lib/parser/lexer-F1.rb#8248 - def paren_nest; end - - # source://parser//lib/parser/lexer-F1.rb#8392 - def pop_cmdarg; end - - # source://parser//lib/parser/lexer-F1.rb#8401 - def pop_cond; end - - # source://parser//lib/parser/lexer-F1.rb#8387 - def push_cmdarg; end - - # source://parser//lib/parser/lexer-F1.rb#8396 - def push_cond; end - - # source://parser//lib/parser/lexer-F1.rb#8281 - def reset(reset_state = T.unsafe(nil)); end - - # % - # - # source://parser//lib/parser/lexer-F1.rb#8238 - def source_buffer; end - - # source://parser//lib/parser/lexer-F1.rb#8334 - def source_buffer=(source_buffer); end - - # source://parser//lib/parser/lexer-F1.rb#8379 - def state; end - - # source://parser//lib/parser/lexer-F1.rb#8383 - def state=(state); end - - # Returns the value of attribute static_env. - # - # source://parser//lib/parser/lexer-F1.rb#8241 - def static_env; end - - # Sets the attribute static_env - # - # @param value the value to set the attribute static_env to. - # - # source://parser//lib/parser/lexer-F1.rb#8241 - def static_env=(_arg0); end - - # Returns the value of attribute tokens. - # - # source://parser//lib/parser/lexer-F1.rb#8246 - def tokens; end - - # Sets the attribute tokens - # - # @param value the value to set the attribute tokens to. - # - # source://parser//lib/parser/lexer-F1.rb#8246 - def tokens=(_arg0); end - - # Returns the value of attribute version. - # - # source://parser//lib/parser/lexer-F1.rb#8248 - def version; end - - protected - - # source://parser//lib/parser/lexer-F1.rb#14692 - def arg_or_cmdarg(cmd_state); end - - # source://parser//lib/parser/lexer-F1.rb#14754 - def check_ambiguous_slash(tm); end - - # 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#14722 - def e_lbrace; end - - # 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#14775 - def emit_class_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end - - # 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#14700 - def emit_comment(s = T.unsafe(nil), e = T.unsafe(nil)); end - - # source://parser//lib/parser/lexer-F1.rb#14712 - def emit_comment_from_range(p, pe); end - - # source://parser//lib/parser/lexer-F1.rb#14682 - def emit_do(do_block = T.unsafe(nil)); end - - # 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#14783 - def emit_instance_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end - - # source://parser//lib/parser/lexer-F1.rb#14791 - def emit_rbrace_rparen_rbrack; end - - # source://parser//lib/parser/lexer-F1.rb#14813 - def emit_singleton_class; end - - # 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#14731 - def numeric_literal_int; end - - # source://parser//lib/parser/lexer-F1.rb#14750 - def on_newline(p); end - - # 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#14653 - def stack_pop; end - - # 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#14649 - def version?(*versions); end - - class << self - # Returns the value of attribute lex_en_expr_arg. - # - # source://parser//lib/parser/lexer-F1.rb#8186 - def lex_en_expr_arg; end - - # Sets the attribute lex_en_expr_arg - # - # @param value the value to set the attribute lex_en_expr_arg to. - # - # source://parser//lib/parser/lexer-F1.rb#8186 - def lex_en_expr_arg=(_arg0); end - - # Returns the value of attribute lex_en_expr_beg. - # - # source://parser//lib/parser/lexer-F1.rb#8202 - def lex_en_expr_beg; end - - # Sets the attribute lex_en_expr_beg - # - # @param value the value to set the attribute lex_en_expr_beg to. - # - # source://parser//lib/parser/lexer-F1.rb#8202 - def lex_en_expr_beg=(_arg0); end - - # Returns the value of attribute lex_en_expr_cmdarg. - # - # source://parser//lib/parser/lexer-F1.rb#8190 - def lex_en_expr_cmdarg; end - - # Sets the attribute lex_en_expr_cmdarg - # - # @param value the value to set the attribute lex_en_expr_cmdarg to. - # - # source://parser//lib/parser/lexer-F1.rb#8190 - def lex_en_expr_cmdarg=(_arg0); end - - # Returns the value of attribute lex_en_expr_dot. - # - # source://parser//lib/parser/lexer-F1.rb#8182 - def lex_en_expr_dot; end - - # Sets the attribute lex_en_expr_dot - # - # @param value the value to set the attribute lex_en_expr_dot to. - # - # source://parser//lib/parser/lexer-F1.rb#8182 - def lex_en_expr_dot=(_arg0); end - - # Returns the value of attribute lex_en_expr_end. - # - # source://parser//lib/parser/lexer-F1.rb#8214 - def lex_en_expr_end; end - - # Sets the attribute lex_en_expr_end - # - # @param value the value to set the attribute lex_en_expr_end to. - # - # source://parser//lib/parser/lexer-F1.rb#8214 - def lex_en_expr_end=(_arg0); end - - # Returns the value of attribute lex_en_expr_endarg. - # - # source://parser//lib/parser/lexer-F1.rb#8194 - def lex_en_expr_endarg; end - - # Sets the attribute lex_en_expr_endarg - # - # @param value the value to set the attribute lex_en_expr_endarg to. - # - # source://parser//lib/parser/lexer-F1.rb#8194 - def lex_en_expr_endarg=(_arg0); end - - # Returns the value of attribute lex_en_expr_endfn. - # - # source://parser//lib/parser/lexer-F1.rb#8178 - def lex_en_expr_endfn; end - - # Sets the attribute lex_en_expr_endfn - # - # @param value the value to set the attribute lex_en_expr_endfn to. - # - # source://parser//lib/parser/lexer-F1.rb#8178 - def lex_en_expr_endfn=(_arg0); end - - # Returns the value of attribute lex_en_expr_fname. - # - # source://parser//lib/parser/lexer-F1.rb#8174 - def lex_en_expr_fname; end - - # Sets the attribute lex_en_expr_fname - # - # @param value the value to set the attribute lex_en_expr_fname to. - # - # source://parser//lib/parser/lexer-F1.rb#8174 - def lex_en_expr_fname=(_arg0); end - - # Returns the value of attribute lex_en_expr_labelarg. - # - # source://parser//lib/parser/lexer-F1.rb#8206 - def lex_en_expr_labelarg; end - - # Sets the attribute lex_en_expr_labelarg - # - # @param value the value to set the attribute lex_en_expr_labelarg to. - # - # source://parser//lib/parser/lexer-F1.rb#8206 - def lex_en_expr_labelarg=(_arg0); end - - # Returns the value of attribute lex_en_expr_mid. - # - # source://parser//lib/parser/lexer-F1.rb#8198 - def lex_en_expr_mid; end - - # Sets the attribute lex_en_expr_mid - # - # @param value the value to set the attribute lex_en_expr_mid to. - # - # source://parser//lib/parser/lexer-F1.rb#8198 - def lex_en_expr_mid=(_arg0); end - - # Returns the value of attribute lex_en_expr_value. - # - # source://parser//lib/parser/lexer-F1.rb#8210 - def lex_en_expr_value; end - - # Sets the attribute lex_en_expr_value - # - # @param value the value to set the attribute lex_en_expr_value to. - # - # source://parser//lib/parser/lexer-F1.rb#8210 - def lex_en_expr_value=(_arg0); end - - # Returns the value of attribute lex_en_expr_variable. - # - # source://parser//lib/parser/lexer-F1.rb#8170 - def lex_en_expr_variable; end - - # Sets the attribute lex_en_expr_variable - # - # @param value the value to set the attribute lex_en_expr_variable to. - # - # source://parser//lib/parser/lexer-F1.rb#8170 - def lex_en_expr_variable=(_arg0); end - - # Returns the value of attribute lex_en_inside_string. - # - # source://parser//lib/parser/lexer-F1.rb#8230 - def lex_en_inside_string; end - - # Sets the attribute lex_en_inside_string - # - # @param value the value to set the attribute lex_en_inside_string to. - # - # source://parser//lib/parser/lexer-F1.rb#8230 - def lex_en_inside_string=(_arg0); end - - # Returns the value of attribute lex_en_leading_dot. - # - # source://parser//lib/parser/lexer-F1.rb#8218 - def lex_en_leading_dot; end - - # Sets the attribute lex_en_leading_dot - # - # @param value the value to set the attribute lex_en_leading_dot to. - # - # source://parser//lib/parser/lexer-F1.rb#8218 - def lex_en_leading_dot=(_arg0); end - - # Returns the value of attribute lex_en_line_begin. - # - # source://parser//lib/parser/lexer-F1.rb#8226 - def lex_en_line_begin; end - - # Sets the attribute lex_en_line_begin - # - # @param value the value to set the attribute lex_en_line_begin to. - # - # source://parser//lib/parser/lexer-F1.rb#8226 - def lex_en_line_begin=(_arg0); end - - # Returns the value of attribute lex_en_line_comment. - # - # source://parser//lib/parser/lexer-F1.rb#8222 - def lex_en_line_comment; end - - # Sets the attribute lex_en_line_comment - # - # @param value the value to set the attribute lex_en_line_comment to. - # - # source://parser//lib/parser/lexer-F1.rb#8222 - def lex_en_line_comment=(_arg0); end - - # Returns the value of attribute lex_error. - # - # source://parser//lib/parser/lexer-F1.rb#8165 - def lex_error; end - - # Sets the attribute lex_error - # - # @param value the value to set the attribute lex_error to. - # - # source://parser//lib/parser/lexer-F1.rb#8165 - def lex_error=(_arg0); end - - # Returns the value of attribute lex_start. - # - # source://parser//lib/parser/lexer-F1.rb#8161 - def lex_start; end - - # Sets the attribute lex_start - # - # @param value the value to set the attribute lex_start to. - # - # source://parser//lib/parser/lexer-F1.rb#8161 - def lex_start=(_arg0); end - - private - - # Returns the value of attribute _lex_eof_trans. - # - # source://parser//lib/parser/lexer-F1.rb#8064 - def _lex_eof_trans; end - - # Sets the attribute _lex_eof_trans - # - # @param value the value to set the attribute _lex_eof_trans to. - # - # source://parser//lib/parser/lexer-F1.rb#8064 - def _lex_eof_trans=(_arg0); end - - # Returns the value of attribute _lex_from_state_actions. - # - # source://parser//lib/parser/lexer-F1.rb#7967 - def _lex_from_state_actions; end - - # Sets the attribute _lex_from_state_actions - # - # @param value the value to set the attribute _lex_from_state_actions to. - # - # source://parser//lib/parser/lexer-F1.rb#7967 - def _lex_from_state_actions=(_arg0); end - - # Returns the value of attribute _lex_index_offsets. - # - # source://parser//lib/parser/lexer-F1.rb#461 - def _lex_index_offsets; end - - # Sets the attribute _lex_index_offsets - # - # @param value the value to set the attribute _lex_index_offsets to. - # - # source://parser//lib/parser/lexer-F1.rb#461 - def _lex_index_offsets=(_arg0); end - - # Returns the value of attribute _lex_indicies. - # - # source://parser//lib/parser/lexer-F1.rb#558 - def _lex_indicies; end - - # Sets the attribute _lex_indicies - # - # @param value the value to set the attribute _lex_indicies to. - # - # source://parser//lib/parser/lexer-F1.rb#558 - def _lex_indicies=(_arg0); end - - # Returns the value of attribute _lex_key_spans. - # - # source://parser//lib/parser/lexer-F1.rb#364 - def _lex_key_spans; end - - # Sets the attribute _lex_key_spans - # - # @param value the value to set the attribute _lex_key_spans to. - # - # source://parser//lib/parser/lexer-F1.rb#364 - def _lex_key_spans=(_arg0); end - - # Returns the value of attribute _lex_to_state_actions. - # - # source://parser//lib/parser/lexer-F1.rb#7870 - def _lex_to_state_actions; end - - # Sets the attribute _lex_to_state_actions - # - # @param value the value to set the attribute _lex_to_state_actions to. - # - # source://parser//lib/parser/lexer-F1.rb#7870 - def _lex_to_state_actions=(_arg0); end - - # Returns the value of attribute _lex_trans_actions. - # - # source://parser//lib/parser/lexer-F1.rb#7722 - def _lex_trans_actions; end - - # Sets the attribute _lex_trans_actions - # - # @param value the value to set the attribute _lex_trans_actions to. - # - # source://parser//lib/parser/lexer-F1.rb#7722 - def _lex_trans_actions=(_arg0); end - - # Returns the value of attribute _lex_trans_keys. - # - # source://parser//lib/parser/lexer-F1.rb#87 - def _lex_trans_keys; end - - # Sets the attribute _lex_trans_keys - # - # @param value the value to set the attribute _lex_trans_keys to. - # - # source://parser//lib/parser/lexer-F1.rb#87 - def _lex_trans_keys=(_arg0); end - - # Returns the value of attribute _lex_trans_targs. - # - # source://parser//lib/parser/lexer-F1.rb#7574 - def _lex_trans_targs; end - - # Sets the attribute _lex_trans_targs - # - # @param value the value to set the attribute _lex_trans_targs to. - # - # source://parser//lib/parser/lexer-F1.rb#7574 - def _lex_trans_targs=(_arg0); end - end -end - -# source://parser//lib/parser/lexer/dedenter.rb#5 -class Parser::Lexer::Dedenter - # source://parser//lib/parser/lexer/dedenter.rb#9 - def initialize(dedent_level); end - - # source://parser//lib/parser/lexer/dedenter.rb#36 - def dedent(string); end - - # source://parser//lib/parser/lexer/dedenter.rb#83 - def interrupt; end -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#14860 -Parser::Lexer::ESCAPE_WHITESPACE = T.let(T.unsafe(nil), Hash) - -# source://parser//lib/parser/lexer-F1.rb#14846 -Parser::Lexer::KEYWORDS = T.let(T.unsafe(nil), Hash) - -# 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 -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#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#116 - def backslash_delimited?; end - - # source://parser//lib/parser/lexer/literal.rb#39 - def dedent_level; end - - # source://parser//lib/parser/lexer/literal.rb#191 - def end_interp_brace_and_try_closing; end - - # source://parser//lib/parser/lexer/literal.rb#218 - def extend_content; end - - # source://parser//lib/parser/lexer/literal.rb#222 - def extend_space(ts, te); end - - # source://parser//lib/parser/lexer/literal.rb#197 - def extend_string(string, ts, te); end - - # source://parser//lib/parser/lexer/literal.rb#204 - def flush_string; end - - # source://parser//lib/parser/lexer/literal.rb#104 - def heredoc?; end - - # source://parser//lib/parser/lexer/literal.rb#39 - def heredoc_e; end - - # source://parser//lib/parser/lexer/literal.rb#168 - def infer_indent_level(line); end - - # source://parser//lib/parser/lexer/literal.rb#91 - def interpolate?; end - - # source://parser//lib/parser/lexer/literal.rb#124 - def munge_escape?(character); end - - # 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#108 - def plain_heredoc?; end - - # source://parser//lib/parser/lexer/literal.rb#100 - def regexp?; end - - # source://parser//lib/parser/lexer/literal.rb#40 - def saved_herebody_s; end - - # source://parser//lib/parser/lexer/literal.rb#40 - def saved_herebody_s=(_arg0); end - - # source://parser//lib/parser/lexer/literal.rb#112 - def squiggly_heredoc?; end - - # source://parser//lib/parser/lexer/literal.rb#187 - def start_interp_brace; end - - # source://parser//lib/parser/lexer/literal.rb#39 - def str_s; end - - # source://parser//lib/parser/lexer/literal.rb#232 - def supports_line_continuation_via_slash?; end - - # source://parser//lib/parser/lexer/literal.rb#120 - def type; end - - # source://parser//lib/parser/lexer/literal.rb#95 - def words?; end - - protected - - # source://parser//lib/parser/lexer/literal.rb#263 - def clear_buffer; end - - # source://parser//lib/parser/lexer/literal.rb#259 - def coerce_encoding(string); end - - # source://parser//lib/parser/lexer/literal.rb#238 - def delimiter?(delimiter); end - - # source://parser//lib/parser/lexer/literal.rb#279 - def emit(token, type, s, e); end - - # 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#14820 -Parser::Lexer::PUNCTUATION = T.let(T.unsafe(nil), Hash) - -# 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 -class Parser::Lexer::StackState - # source://parser//lib/parser/lexer/stack_state.rb#6 - def initialize(name); end - - # source://parser//lib/parser/lexer/stack_state.rb#34 - def active?; end - - # source://parser//lib/parser/lexer/stack_state.rb#11 - def clear; end - - # source://parser//lib/parser/lexer/stack_state.rb#38 - def empty?; end - - # source://parser//lib/parser/lexer/stack_state.rb#42 - def inspect; end - - # source://parser//lib/parser/lexer/stack_state.rb#29 - def lexpop; end - - # source://parser//lib/parser/lexer/stack_state.rb#22 - def pop; end - - # source://parser//lib/parser/lexer/stack_state.rb#15 - def push(bit); end - - # source://parser//lib/parser/lexer/stack_state.rb#42 - def to_s; end -end - -# line 3 "lib/parser/lexer-strings.rl" -# -# source://parser//lib/parser/lexer-strings.rb#6 -class Parser::LexerStrings - # @return [LexerStrings] a new instance of LexerStrings - # - # source://parser//lib/parser/lexer-strings.rb#3300 - def initialize(lexer, version); end - - # source://parser//lib/parser/lexer-strings.rb#3339 - def advance(p); end - - # source://parser//lib/parser/lexer-strings.rb#5069 - def close_interp_on_current_literal(p); end - - # source://parser//lib/parser/lexer-strings.rb#5043 - def continue_lexing(current_literal); end - - # source://parser//lib/parser/lexer-strings.rb#5092 - def dedent_level; end - - # Returns the value of attribute herebody_s. - # - # source://parser//lib/parser/lexer-strings.rb#3295 - def herebody_s; end - - # Sets the attribute herebody_s - # - # @param value the value to set the attribute herebody_s to. - # - # source://parser//lib/parser/lexer-strings.rb#3295 - def herebody_s=(_arg0); end - - # source://parser//lib/parser/lexer-strings.rb#5047 - def literal; end - - # source://parser//lib/parser/lexer-strings.rb#5015 - def next_state_for_literal(literal); end - - # This hook is triggered by "main" lexer on every newline character - # - # source://parser//lib/parser/lexer-strings.rb#5100 - def on_newline(p); end - - # source://parser//lib/parser/lexer-strings.rb#5051 - def pop_literal; end - - # === LITERAL STACK === - # - # source://parser//lib/parser/lexer-strings.rb#5009 - def push_literal(*args); end - - # source://parser//lib/parser/lexer-strings.rb#4999 - def read_character_constant(p); end - - # source://parser//lib/parser/lexer-strings.rb#3314 - def reset; end - - # Set by "main" lexer - # - # source://parser//lib/parser/lexer-strings.rb#3298 - def source_buffer; end - - # Set by "main" lexer - # - # source://parser//lib/parser/lexer-strings.rb#3298 - def source_buffer=(_arg0); end - - # Set by "main" lexer - # - # source://parser//lib/parser/lexer-strings.rb#3298 - def source_pts; end - - # Set by "main" lexer - # - # source://parser//lib/parser/lexer-strings.rb#3298 - def source_pts=(_arg0); end - - protected - - # source://parser//lib/parser/lexer-strings.rb#5397 - def check_ambiguous_slash(tm); end - - # source://parser//lib/parser/lexer-strings.rb#5408 - def check_invalid_escapes(p); end - - # source://parser//lib/parser/lexer-strings.rb#5136 - def cond; end - - # source://parser//lib/parser/lexer-strings.rb#5132 - def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)); end - - # source://parser//lib/parser/lexer-strings.rb#5128 - def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end - - # source://parser//lib/parser/lexer-strings.rb#5387 - def emit_character_constant; end - - # source://parser//lib/parser/lexer-strings.rb#5364 - def emit_interp_var(interp_var_kind); end - - # @return [Boolean] - # - # source://parser//lib/parser/lexer-strings.rb#5140 - def emit_invalid_escapes?; end - - # source://parser//lib/parser/lexer-strings.rb#5291 - def encode_escape(ord); end - - # source://parser//lib/parser/lexer-strings.rb#5375 - def encode_escaped_char(p); end - - # @return [Boolean] - # - # source://parser//lib/parser/lexer-strings.rb#5112 - def eof_codepoint?(point); end - - # source://parser//lib/parser/lexer-strings.rb#5210 - def extend_interp_code(current_literal); end - - # source://parser//lib/parser/lexer-strings.rb#5225 - def extend_interp_digit_var; end - - # source://parser//lib/parser/lexer-strings.rb#5355 - def extend_interp_var(current_literal); end - - # source://parser//lib/parser/lexer-strings.rb#5234 - def extend_string_eol_check_eof(current_literal, pe); end - - # source://parser//lib/parser/lexer-strings.rb#5251 - def extend_string_eol_heredoc_intertwined(p); end - - # source://parser//lib/parser/lexer-strings.rb#5241 - def extend_string_eol_heredoc_line; end - - # source://parser//lib/parser/lexer-strings.rb#5267 - def extend_string_eol_words(current_literal, p); end - - # String escaping - # - # source://parser//lib/parser/lexer-strings.rb#5154 - def extend_string_escaped; end - - # source://parser//lib/parser/lexer-strings.rb#5287 - def extend_string_for_token_range(current_literal, string); end - - # source://parser//lib/parser/lexer-strings.rb#5279 - def extend_string_slice_end(lookahead); end - - # source://parser//lib/parser/lexer-strings.rb#5124 - def range(s = T.unsafe(nil), e = T.unsafe(nil)); end - - # source://parser//lib/parser/lexer-strings.rb#5347 - def read_post_meta_or_ctrl_char(p); end - - # source://parser//lib/parser/lexer-strings.rb#5379 - def slash_c_char; end - - # source://parser//lib/parser/lexer-strings.rb#5383 - def slash_m_char; end - - # source://parser//lib/parser/lexer-strings.rb#5120 - def tok(s = T.unsafe(nil), e = T.unsafe(nil)); end - - # source://parser//lib/parser/lexer-strings.rb#5295 - def unescape_char(p); end - - # source://parser//lib/parser/lexer-strings.rb#5307 - def unicode_points(p); end - - # @return [Boolean] - # - # source://parser//lib/parser/lexer-strings.rb#5116 - def version?(*versions); end - - class << self - # Returns the value of attribute lex_en_character. - # - # source://parser//lib/parser/lexer-strings.rb#3275 - def lex_en_character; end - - # Sets the attribute lex_en_character - # - # @param value the value to set the attribute lex_en_character to. - # - # source://parser//lib/parser/lexer-strings.rb#3275 - def lex_en_character=(_arg0); end - - # Returns the value of attribute lex_en_interp_backslash_delimited. - # - # source://parser//lib/parser/lexer-strings.rb#3255 - def lex_en_interp_backslash_delimited; end - - # Sets the attribute lex_en_interp_backslash_delimited - # - # @param value the value to set the attribute lex_en_interp_backslash_delimited to. - # - # source://parser//lib/parser/lexer-strings.rb#3255 - def lex_en_interp_backslash_delimited=(_arg0); end - - # Returns the value of attribute lex_en_interp_backslash_delimited_words. - # - # source://parser//lib/parser/lexer-strings.rb#3263 - def lex_en_interp_backslash_delimited_words; end - - # Sets the attribute lex_en_interp_backslash_delimited_words - # - # @param value the value to set the attribute lex_en_interp_backslash_delimited_words to. - # - # source://parser//lib/parser/lexer-strings.rb#3263 - def lex_en_interp_backslash_delimited_words=(_arg0); end - - # Returns the value of attribute lex_en_interp_string. - # - # source://parser//lib/parser/lexer-strings.rb#3243 - def lex_en_interp_string; end - - # Sets the attribute lex_en_interp_string - # - # @param value the value to set the attribute lex_en_interp_string to. - # - # source://parser//lib/parser/lexer-strings.rb#3243 - def lex_en_interp_string=(_arg0); end - - # Returns the value of attribute lex_en_interp_words. - # - # source://parser//lib/parser/lexer-strings.rb#3239 - def lex_en_interp_words; end - - # Sets the attribute lex_en_interp_words - # - # @param value the value to set the attribute lex_en_interp_words to. - # - # source://parser//lib/parser/lexer-strings.rb#3239 - def lex_en_interp_words=(_arg0); end - - # Returns the value of attribute lex_en_plain_backslash_delimited. - # - # source://parser//lib/parser/lexer-strings.rb#3259 - def lex_en_plain_backslash_delimited; end - - # Sets the attribute lex_en_plain_backslash_delimited - # - # @param value the value to set the attribute lex_en_plain_backslash_delimited to. - # - # source://parser//lib/parser/lexer-strings.rb#3259 - def lex_en_plain_backslash_delimited=(_arg0); end - - # Returns the value of attribute lex_en_plain_backslash_delimited_words. - # - # source://parser//lib/parser/lexer-strings.rb#3267 - def lex_en_plain_backslash_delimited_words; end - - # Sets the attribute lex_en_plain_backslash_delimited_words - # - # @param value the value to set the attribute lex_en_plain_backslash_delimited_words to. - # - # source://parser//lib/parser/lexer-strings.rb#3267 - def lex_en_plain_backslash_delimited_words=(_arg0); end - - # Returns the value of attribute lex_en_plain_string. - # - # source://parser//lib/parser/lexer-strings.rb#3251 - def lex_en_plain_string; end - - # Sets the attribute lex_en_plain_string - # - # @param value the value to set the attribute lex_en_plain_string to. - # - # source://parser//lib/parser/lexer-strings.rb#3251 - def lex_en_plain_string=(_arg0); end - - # Returns the value of attribute lex_en_plain_words. - # - # source://parser//lib/parser/lexer-strings.rb#3247 - def lex_en_plain_words; end - - # Sets the attribute lex_en_plain_words - # - # @param value the value to set the attribute lex_en_plain_words to. - # - # source://parser//lib/parser/lexer-strings.rb#3247 - def lex_en_plain_words=(_arg0); end - - # Returns the value of attribute lex_en_regexp_modifiers. - # - # source://parser//lib/parser/lexer-strings.rb#3271 - def lex_en_regexp_modifiers; end - - # Sets the attribute lex_en_regexp_modifiers - # - # @param value the value to set the attribute lex_en_regexp_modifiers to. - # - # source://parser//lib/parser/lexer-strings.rb#3271 - def lex_en_regexp_modifiers=(_arg0); end - - # Returns the value of attribute lex_en_unknown. - # - # source://parser//lib/parser/lexer-strings.rb#3279 - def lex_en_unknown; end - - # Sets the attribute lex_en_unknown - # - # @param value the value to set the attribute lex_en_unknown to. - # - # source://parser//lib/parser/lexer-strings.rb#3279 - def lex_en_unknown=(_arg0); end - - # Returns the value of attribute lex_error. - # - # source://parser//lib/parser/lexer-strings.rb#3234 - def lex_error; end - - # Sets the attribute lex_error - # - # @param value the value to set the attribute lex_error to. - # - # source://parser//lib/parser/lexer-strings.rb#3234 - def lex_error=(_arg0); end - - # Returns the value of attribute lex_start. - # - # source://parser//lib/parser/lexer-strings.rb#3230 - def lex_start; end - - # Sets the attribute lex_start - # - # @param value the value to set the attribute lex_start to. - # - # source://parser//lib/parser/lexer-strings.rb#3230 - def lex_start=(_arg0); end - - private - - # Returns the value of attribute _lex_actions. - # - # source://parser//lib/parser/lexer-strings.rb#11 - def _lex_actions; end - - # Sets the attribute _lex_actions - # - # @param value the value to set the attribute _lex_actions to. - # - # source://parser//lib/parser/lexer-strings.rb#11 - def _lex_actions=(_arg0); end - - # Returns the value of attribute _lex_eof_trans. - # - # source://parser//lib/parser/lexer-strings.rb#3184 - def _lex_eof_trans; end - - # Sets the attribute _lex_eof_trans - # - # @param value the value to set the attribute _lex_eof_trans to. - # - # source://parser//lib/parser/lexer-strings.rb#3184 - def _lex_eof_trans=(_arg0); end - - # Returns the value of attribute _lex_from_state_actions. - # - # source://parser//lib/parser/lexer-strings.rb#3138 - def _lex_from_state_actions; end - - # Sets the attribute _lex_from_state_actions - # - # @param value the value to set the attribute _lex_from_state_actions to. - # - # source://parser//lib/parser/lexer-strings.rb#3138 - def _lex_from_state_actions=(_arg0); end - - # Returns the value of attribute _lex_index_offsets. - # - # source://parser//lib/parser/lexer-strings.rb#244 - def _lex_index_offsets; end - - # Sets the attribute _lex_index_offsets - # - # @param value the value to set the attribute _lex_index_offsets to. - # - # source://parser//lib/parser/lexer-strings.rb#244 - def _lex_index_offsets=(_arg0); end - - # Returns the value of attribute _lex_indicies. - # - # source://parser//lib/parser/lexer-strings.rb#290 - def _lex_indicies; end - - # Sets the attribute _lex_indicies - # - # @param value the value to set the attribute _lex_indicies to. - # - # source://parser//lib/parser/lexer-strings.rb#290 - def _lex_indicies=(_arg0); end - - # Returns the value of attribute _lex_key_spans. - # - # source://parser//lib/parser/lexer-strings.rb#198 - def _lex_key_spans; end - - # Sets the attribute _lex_key_spans - # - # @param value the value to set the attribute _lex_key_spans to. - # - # source://parser//lib/parser/lexer-strings.rb#198 - def _lex_key_spans=(_arg0); end - - # Returns the value of attribute _lex_to_state_actions. - # - # source://parser//lib/parser/lexer-strings.rb#3092 - def _lex_to_state_actions; end - - # Sets the attribute _lex_to_state_actions - # - # @param value the value to set the attribute _lex_to_state_actions to. - # - # source://parser//lib/parser/lexer-strings.rb#3092 - def _lex_to_state_actions=(_arg0); end - - # Returns the value of attribute _lex_trans_actions. - # - # source://parser//lib/parser/lexer-strings.rb#3029 - def _lex_trans_actions; end - - # Sets the attribute _lex_trans_actions - # - # @param value the value to set the attribute _lex_trans_actions to. - # - # source://parser//lib/parser/lexer-strings.rb#3029 - def _lex_trans_actions=(_arg0); end - - # Returns the value of attribute _lex_trans_keys. - # - # source://parser//lib/parser/lexer-strings.rb#76 - def _lex_trans_keys; end - - # Sets the attribute _lex_trans_keys - # - # @param value the value to set the attribute _lex_trans_keys to. - # - # source://parser//lib/parser/lexer-strings.rb#76 - def _lex_trans_keys=(_arg0); end - - # Returns the value of attribute _lex_trans_targs. - # - # source://parser//lib/parser/lexer-strings.rb#2966 - def _lex_trans_targs; end - - # Sets the attribute _lex_trans_targs - # - # @param value the value to set the attribute _lex_trans_targs to. - # - # source://parser//lib/parser/lexer-strings.rb#2966 - def _lex_trans_targs=(_arg0); end - end -end - -# % -# -# source://parser//lib/parser/lexer-strings.rb#3287 -Parser::LexerStrings::ESCAPES = T.let(T.unsafe(nil), Hash) - -# source://parser//lib/parser/lexer-strings.rb#5414 -Parser::LexerStrings::ESCAPE_WHITESPACE = T.let(T.unsafe(nil), Hash) - -# source://parser//lib/parser/lexer-strings.rb#3332 -Parser::LexerStrings::LEX_STATES = T.let(T.unsafe(nil), Hash) - -# source://parser//lib/parser/lexer-strings.rb#3293 -Parser::LexerStrings::REGEXP_META_CHARACTERS = T.let(T.unsafe(nil), Regexp) - -# Diagnostic messages (errors, warnings and notices) that can be generated. -# -# @api public -# @see Diagnostic -# -# source://parser//lib/parser/messages.rb#11 -Parser::MESSAGES = T.let(T.unsafe(nil), Hash) - -# Holds p->max_numparam from parse.y -# -# @api private -# -# source://parser//lib/parser/max_numparam_stack.rb#8 -class Parser::MaxNumparamStack - # @api private - # @return [MaxNumparamStack] a new instance of MaxNumparamStack - # - # source://parser//lib/parser/max_numparam_stack.rb#13 - def initialize; end - - # @api private - # @return [Boolean] - # - # source://parser//lib/parser/max_numparam_stack.rb#17 - def empty?; end - - # @api private - # @return [Boolean] - # - # source://parser//lib/parser/max_numparam_stack.rb#29 - def has_numparams?; end - - # @api private - # - # source://parser//lib/parser/max_numparam_stack.rb#21 - def has_ordinary_params!; end - - # @api private - # @return [Boolean] - # - # source://parser//lib/parser/max_numparam_stack.rb#25 - def has_ordinary_params?; end - - # @api private - # - # source://parser//lib/parser/max_numparam_stack.rb#45 - def pop; end - - # @api private - # - # source://parser//lib/parser/max_numparam_stack.rb#41 - def push(static:); end - - # @api private - # - # source://parser//lib/parser/max_numparam_stack.rb#33 - def register(numparam); end - - # @api private - # - # source://parser//lib/parser/max_numparam_stack.rb#9 - def stack; end - - # @api private - # - # source://parser//lib/parser/max_numparam_stack.rb#37 - def top; end - - private - - # @api private - # - # source://parser//lib/parser/max_numparam_stack.rb#51 - def set(value); end -end - -# @api private -# -# source://parser//lib/parser/max_numparam_stack.rb#11 -Parser::MaxNumparamStack::ORDINARY_PARAMS = T.let(T.unsafe(nil), Integer) - -# @api private -# -# 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 - # - # Code like `format("", {})` gives a warning, and so this method tries interpolating - # only if `arguments` hash is not empty. - # - # @api private - # - # source://parser//lib/parser/messages.rb#119 - def compile(reason, arguments); end - end -end - -# Parser metadata -# -# source://parser//lib/parser/meta.rb#5 -module Parser::Meta; end - -# All node types that parser can produce. Not all parser versions -# will be able to produce every possible node. -# Includes node types that are only emitted by the prism parser translator. -# -# source://parser//lib/parser/meta.rb#17 -Parser::Meta::NODE_TYPES = T.let(T.unsafe(nil), Set) - -# These are node types required by `Prism::Translation::Parser`, -# which has advanced syntax support ahead of the Parser gem. -# -# source://parser//lib/parser/meta.rb#9 -Parser::Meta::PRISM_TRANSLATION_PARSER_NODE_TYPES = T.let(T.unsafe(nil), Array) - -# {Parser::Rewriter} is deprecated. Use {Parser::TreeRewriter} instead. -# It has a backwards compatible API and uses {Parser::Source::TreeRewriter} -# instead of {Parser::Source::Rewriter}. -# Please check the documentation for {Parser::Source::Rewriter} for details. -# -# @api public -# @deprecated Use {Parser::TreeRewriter} -# -# source://parser//lib/parser/rewriter.rb#14 -class Parser::Rewriter < ::Parser::AST::Processor - extend ::Parser::Deprecation - - # @api public - # @return [Rewriter] a new instance of Rewriter - # - # source://parser//lib/parser/rewriter.rb#98 - def initialize(*_arg0); end - - # Returns `true` if the specified node is an assignment node, returns false - # otherwise. - # - # @api public - # @param node [Parser::AST::Node] - # @return [Boolean] - # - # source://parser//lib/parser/rewriter.rb#38 - def assignment?(node); end - - # Inserts new code after the given source range. - # - # @api public - # @param range [Parser::Source::Range] - # @param content [String] - # - # source://parser//lib/parser/rewriter.rb#77 - def insert_after(range, content); end - - # Inserts new code before the given source range. - # - # @api public - # @param range [Parser::Source::Range] - # @param content [String] - # - # source://parser//lib/parser/rewriter.rb#67 - def insert_before(range, content); end - - # Removes the source range. - # - # @api public - # @param range [Parser::Source::Range] - # - # source://parser//lib/parser/rewriter.rb#47 - def remove(range); end - - # Replaces the code of the source range `range` with `content`. - # - # @api public - # @param range [Parser::Source::Range] - # @param content [String] - # - # source://parser//lib/parser/rewriter.rb#87 - def replace(range, content); end - - # Rewrites the AST/source buffer and returns a String containing the new - # version. - # - # @api public - # @param source_buffer [Parser::Source::Buffer] - # @param ast [Parser::AST::Node] - # @return [String] - # - # source://parser//lib/parser/rewriter.rb#23 - def rewrite(source_buffer, ast); end - - # Wraps the given source range with the given values. - # - # @api public - # @param range [Parser::Source::Range] - # @param content [String] - # - # source://parser//lib/parser/rewriter.rb#57 - def wrap(range, before, after); end -end - -# @api public -# -# source://parser//lib/parser/rewriter.rb#91 -Parser::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) - -# @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#110 - 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#247 - 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#222 - 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#317 - def freeze; end - - # @api public - # - # source://parser//lib/parser/source/buffer.rb#323 - def inspect; end - - # Number of last line in the buffer - # - # @api public - # @return [Integer] - # - # source://parser//lib/parser/source/buffer.rb#312 - 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#236 - 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#289 - 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#185 - 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#136 - def read; end - - # @api public - # - # source://parser//lib/parser/source/buffer.rb#199 - 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#150 - 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#167 - 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#278 - def source_line(lineno); end - - # Return an `Array` of source code lines. - # - # @api public - # @return [Array] - # - # source://parser//lib/parser/source/buffer.rb#257 - def source_lines; end - - # @api public - # @return [Range] A range covering the whole source - # - # source://parser//lib/parser/source/buffer.rb#303 - def source_range; end - - private - - # @api public - # - # source://parser//lib/parser/source/buffer.rb#353 - def bsearch(line_begins, position); end - - # @api public - # - # source://parser//lib/parser/source/buffer.rb#330 - def line_begins; end - - # @api public - # - # source://parser//lib/parser/source/buffer.rb#344 - 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] - # @raise [Parser::UnknownEncodingInMagicComment] if the encoding is not recognized - # @return [String, nil] encoding name, if recognized - # - # source://parser//lib/parser/source/buffer.rb#52 - 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#95 - 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 - - # Compares comments. Two comments are equal if they - # correspond to the same source range. - # - # @api public - # @param other [Object] - # @return [Boolean] - # - # source://parser//lib/parser/source/comment.rb#120 - def ==(other); end - - # @api public - # @return [Boolean] true if this is a block comment. - # @see #type - # - # source://parser//lib/parser/source/comment.rb#109 - def document?; end - - # @api public - # @return [Boolean] true if this is an inline comment. - # @see #type - # - # source://parser//lib/parser/source/comment.rb#101 - def inline?; end - - # @api public - # @return [String] a human-readable representation of this comment - # - # source://parser//lib/parser/source/comment.rb#128 - def inspect; end - - # @api public - # @return [Parser::Source::Range] - # - # source://parser//lib/parser/source/comment.rb#20 - def loc; end - - # @api public - # @return [Parser::Source::Range] - # - # source://parser//lib/parser/source/comment.rb#20 - def location; end - - # @api public - # @return [String] - # - # source://parser//lib/parser/source/comment.rb#18 - def text; end - - # Type of this comment. - # - # * Inline comments correspond to `:inline`: - # - # # whatever - # - # * Block comments correspond to `:document`: - # - # =begin - # hi i am a document - # =end - # - # @api public - # @return [Symbol] - # - # source://parser//lib/parser/source/comment.rb#89 - def type; end - - class << self - # Associate `comments` with `ast` nodes by their corresponding node. - # - # @api public - # @deprecated Use {associate_locations}. - # @param ast [Parser::AST::Node] - # @param comments [Array] - # @return [Hash>] - # @see Parser::Source::Comment::Associator#associate - # - # source://parser//lib/parser/source/comment.rb#32 - def associate(ast, comments); end - - # Associate `comments` with `ast` nodes using identity. - # - # @api public - # @param ast [Parser::AST::Node] - # @param comments [Array] - # @return [Hash>] - # @see Parser::Source::Comment::Associator#associate_by_identity - # - # source://parser//lib/parser/source/comment.rb#59 - def associate_by_identity(ast, comments); end - - # Associate `comments` with `ast` nodes by their location in the - # source. - # - # @api public - # @param ast [Parser::AST::Node] - # @param comments [Array] - # @return [Hash>] - # @see Parser::Source::Comment::Associator#associate_locations - # - # source://parser//lib/parser/source/comment.rb#46 - def associate_locations(ast, comments); end - end -end - -# source://parser//lib/parser/source/comment/associator.rb#45 -class Parser::Source::Comment::Associator - # source://parser//lib/parser/source/comment/associator.rb#51 - def initialize(ast, comments); end - - # source://parser//lib/parser/source/comment/associator.rb#92 - def associate; end - - # source://parser//lib/parser/source/comment/associator.rb#115 - def associate_by_identity; end - - # source://parser//lib/parser/source/comment/associator.rb#104 - def associate_locations; end - - # source://parser//lib/parser/source/comment/associator.rb#46 - def skip_directives; end - - # source://parser//lib/parser/source/comment/associator.rb#46 - def skip_directives=(_arg0); end - - private - - # source://parser//lib/parser/source/comment/associator.rb#182 - def advance_comment; end - - # source://parser//lib/parser/source/comment/associator.rb#214 - def advance_through_directives; end - - # source://parser//lib/parser/source/comment/associator.rb#206 - def associate_and_advance_comment(node); end - - # source://parser//lib/parser/source/comment/associator.rb#123 - def children_in_source_order(node); end - - # source://parser//lib/parser/source/comment/associator.rb#187 - def current_comment_before?(node); end - - # source://parser//lib/parser/source/comment/associator.rb#194 - def current_comment_before_end?(node); end - - # source://parser//lib/parser/source/comment/associator.rb#201 - def current_comment_decorates?(node); end - - # source://parser//lib/parser/source/comment/associator.rb#135 - def do_associate; end - - # source://parser//lib/parser/source/comment/associator.rb#166 - def process_leading_comments(node); end - - # source://parser//lib/parser/source/comment/associator.rb#173 - def process_trailing_comments(node); end - - # source://parser//lib/parser/source/comment/associator.rb#148 - def visit(node); end -end - -# source://parser//lib/parser/source/comment/associator.rb#212 -Parser::Source::Comment::Associator::MAGIC_COMMENT_RE = T.let(T.unsafe(nil), Regexp) - -# source://parser//lib/parser/source/comment/associator.rb#122 -Parser::Source::Comment::Associator::POSTFIX_TYPES = T.let(T.unsafe(nil), Set) - -# {Map} relates AST nodes to the source code they were parsed from. -# More specifically, a {Map} or its subclass contains a set of ranges: -# -# * `expression`: smallest range which includes all source corresponding -# to the node and all `expression` ranges of its children. -# * other ranges (`begin`, `end`, `operator`, ...): node-specific ranges -# pointing to various interesting tokens corresponding to the node. -# -# Note that the {Map::Heredoc} map is the only one whose `expression` does -# not include other ranges. It only covers the heredoc marker (`< 2]').children[0].loc -# # => > -# -# The {file:doc/AST_FORMAT.md} document describes how ranges associated to source -# code tokens. For example, the entry -# -# (array (int 1) (int 2)) -# -# "[1, 2]" -# ^ begin -# ^ end -# ~~~~~~ expression -# -# means that if `node` is an {Parser::AST::Node} `(array (int 1) (int 2))`, -# then `node.loc` responds to `begin`, `end` and `expression`, and -# `node.loc.begin` returns a range pointing at the opening bracket, and so on. -# -# If you want to write code polymorphic by the source map (i.e. accepting -# several subclasses of {Map}), use `respond_to?` instead of `is_a?` to -# check whether the map features the range you need. Concrete {Map} -# subclasses may not be preserved between versions, but their interfaces -# will be kept compatible. -# -# You can visualize the source maps with `ruby-parse -E` command-line tool. -# -# @api public -# @example -# require 'parser/current' -# -# p Parser::CurrentRuby.parse('[1, 2]').loc -# # => #, -# # @begin=#, -# # @expression=#> -# -# source://parser//lib/parser/source/map.rb#70 -class Parser::Source::Map - # @api public - # @param expression [Range] - # @return [Map] a new instance of Map - # - # source://parser//lib/parser/source/map.rb#76 - def initialize(expression); end - - # Compares source maps. - # - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/map.rb#140 - def ==(other); end - - # A shortcut for `self.expression.column`. - # - # @api public - # @return [Integer] - # - # source://parser//lib/parser/source/map.rb#109 - def column; end - - # @api public - # @return [Range] - # - # source://parser//lib/parser/source/map.rb#72 - def expression; end - - # A shortcut for `self.expression.line`. - # - # @api public - # @return [Integer] - # - # source://parser//lib/parser/source/map.rb#99 - def first_line; end - - # A shortcut for `self.expression.last_column`. - # - # @api public - # @return [Integer] - # - # source://parser//lib/parser/source/map.rb#125 - def last_column; end - - # A shortcut for `self.expression.last_line`. - # - # @api public - # @return [Integer] - # - # source://parser//lib/parser/source/map.rb#117 - def last_line; end - - # A shortcut for `self.expression.line`. - # - # @api public - # @return [Integer] - # - # source://parser//lib/parser/source/map.rb#99 - def line; end - - # The node that is described by this map. Nodes and maps have 1:1 correspondence. - # - # @api public - # @return [Parser::AST::Node] - # - # source://parser//lib/parser/source/map.rb#71 - def node; end - - # @api private - # - # source://parser//lib/parser/source/map.rb#89 - def node=(node); end - - # Converts this source map to a hash with keys corresponding to - # ranges. For example, if called on an instance of {Collection}, - # which adds the `begin` and `end` ranges, the resulting hash - # will contain keys `:expression`, `:begin` and `:end`. - # - # @api public - # @example - # require 'parser/current' - # - # p Parser::CurrentRuby.parse('[1, 2]').loc.to_hash - # # => { - # # :begin => #, - # # :end => #, - # # :expression => # - # # } - # @return [Hash] - # - # source://parser//lib/parser/source/map.rb#166 - def to_hash; end - - # @api private - # - # source://parser//lib/parser/source/map.rb#132 - def with_expression(expression_l); end - - protected - - # @api public - # - # source://parser//lib/parser/source/map.rb#180 - def update_expression(expression_l); end - - # @api public - # - # source://parser//lib/parser/source/map.rb#176 - def with(&block); end - - private - - # @api private - # - # source://parser//lib/parser/source/map.rb#82 - def initialize_copy(other); end -end - -# source://parser//lib/parser/source/map/collection.rb#6 -class Parser::Source::Map::Collection < ::Parser::Source::Map - # source://parser//lib/parser/source/map/collection.rb#10 - def initialize(begin_l, end_l, expression_l); end - - # source://parser//lib/parser/source/map/collection.rb#7 - def begin; end - - # source://parser//lib/parser/source/map/collection.rb#8 - def end; end -end - -# source://parser//lib/parser/source/map/condition.rb#6 -class Parser::Source::Map::Condition < ::Parser::Source::Map - # source://parser//lib/parser/source/map/condition.rb#12 - def initialize(keyword_l, begin_l, else_l, end_l, expression_l); end - - # source://parser//lib/parser/source/map/condition.rb#8 - def begin; end - - # source://parser//lib/parser/source/map/condition.rb#9 - def else; end - - # source://parser//lib/parser/source/map/condition.rb#10 - def end; end - - # source://parser//lib/parser/source/map/condition.rb#7 - def keyword; end -end - -# source://parser//lib/parser/source/map/constant.rb#6 -class Parser::Source::Map::Constant < ::Parser::Source::Map - # source://parser//lib/parser/source/map/constant.rb#11 - def initialize(double_colon, name, expression); end - - # source://parser//lib/parser/source/map/constant.rb#7 - def double_colon; end - - # source://parser//lib/parser/source/map/constant.rb#8 - def name; end - - # source://parser//lib/parser/source/map/constant.rb#9 - def operator; end - - # source://parser//lib/parser/source/map/constant.rb#20 - def with_operator(operator_l); end - - protected - - # source://parser//lib/parser/source/map/constant.rb#26 - def update_operator(operator_l); end -end - -# source://parser//lib/parser/source/map/definition.rb#6 -class Parser::Source::Map::Definition < ::Parser::Source::Map - # source://parser//lib/parser/source/map/definition.rb#12 - def initialize(keyword_l, operator_l, name_l, end_l); end - - # source://parser//lib/parser/source/map/definition.rb#10 - def end; end - - # source://parser//lib/parser/source/map/definition.rb#7 - def keyword; end - - # source://parser//lib/parser/source/map/definition.rb#9 - def name; end - - # source://parser//lib/parser/source/map/definition.rb#8 - def operator; end -end - -# source://parser//lib/parser/source/map/for.rb#6 -class Parser::Source::Map::For < ::Parser::Source::Map - # source://parser//lib/parser/source/map/for.rb#10 - def initialize(keyword_l, in_l, begin_l, end_l, expression_l); end - - # source://parser//lib/parser/source/map/for.rb#8 - def begin; end - - # source://parser//lib/parser/source/map/for.rb#8 - def end; end - - # source://parser//lib/parser/source/map/for.rb#7 - def in; end - - # source://parser//lib/parser/source/map/for.rb#7 - def keyword; end -end - -# source://parser//lib/parser/source/map/heredoc.rb#6 -class Parser::Source::Map::Heredoc < ::Parser::Source::Map - # source://parser//lib/parser/source/map/heredoc.rb#10 - def initialize(begin_l, body_l, end_l); end - - # source://parser//lib/parser/source/map/heredoc.rb#7 - def heredoc_body; end - - # source://parser//lib/parser/source/map/heredoc.rb#8 - def heredoc_end; end -end - -# source://parser//lib/parser/source/map/index.rb#6 -class Parser::Source::Map::Index < ::Parser::Source::Map - # source://parser//lib/parser/source/map/index.rb#11 - def initialize(begin_l, end_l, expression_l); end - - # source://parser//lib/parser/source/map/index.rb#7 - def begin; end - - # source://parser//lib/parser/source/map/index.rb#8 - def end; end - - # source://parser//lib/parser/source/map/index.rb#9 - def operator; end - - # source://parser//lib/parser/source/map/index.rb#21 - def with_operator(operator_l); end - - protected - - # source://parser//lib/parser/source/map/index.rb#27 - def update_operator(operator_l); end -end - -# source://parser//lib/parser/source/map/keyword.rb#6 -class Parser::Source::Map::Keyword < ::Parser::Source::Map - # source://parser//lib/parser/source/map/keyword.rb#11 - def initialize(keyword_l, begin_l, end_l, expression_l); end - - # source://parser//lib/parser/source/map/keyword.rb#8 - def begin; end - - # source://parser//lib/parser/source/map/keyword.rb#9 - def end; end - - # source://parser//lib/parser/source/map/keyword.rb#7 - def keyword; end -end - -# source://parser//lib/parser/source/map/method_definition.rb#6 -class Parser::Source::Map::MethodDefinition < ::Parser::Source::Map - # source://parser//lib/parser/source/map/method_definition.rb#13 - def initialize(keyword_l, operator_l, name_l, end_l, assignment_l, body_l); end - - # source://parser//lib/parser/source/map/method_definition.rb#11 - def assignment; end - - # source://parser//lib/parser/source/map/method_definition.rb#10 - def end; end - - # source://parser//lib/parser/source/map/method_definition.rb#7 - def keyword; end - - # source://parser//lib/parser/source/map/method_definition.rb#9 - def name; end - - # source://parser//lib/parser/source/map/method_definition.rb#8 - def operator; end -end - -# source://parser//lib/parser/source/map/objc_kwarg.rb#6 -class Parser::Source::Map::ObjcKwarg < ::Parser::Source::Map - # source://parser//lib/parser/source/map/objc_kwarg.rb#11 - def initialize(keyword_l, operator_l, argument_l, expression_l); end - - # source://parser//lib/parser/source/map/objc_kwarg.rb#9 - def argument; end - - # source://parser//lib/parser/source/map/objc_kwarg.rb#7 - def keyword; end - - # source://parser//lib/parser/source/map/objc_kwarg.rb#8 - def operator; end -end - -# source://parser//lib/parser/source/map/operator.rb#6 -class Parser::Source::Map::Operator < ::Parser::Source::Map - # source://parser//lib/parser/source/map/operator.rb#9 - def initialize(operator, expression); end - - # source://parser//lib/parser/source/map/operator.rb#7 - def operator; end -end - -# source://parser//lib/parser/source/map/rescue_body.rb#6 -class Parser::Source::Map::RescueBody < ::Parser::Source::Map - # source://parser//lib/parser/source/map/rescue_body.rb#11 - def initialize(keyword_l, assoc_l, begin_l, expression_l); end - - # source://parser//lib/parser/source/map/rescue_body.rb#8 - def assoc; end - - # source://parser//lib/parser/source/map/rescue_body.rb#9 - def begin; end - - # source://parser//lib/parser/source/map/rescue_body.rb#7 - def keyword; end -end - -# source://parser//lib/parser/source/map/send.rb#6 -class Parser::Source::Map::Send < ::Parser::Source::Map - # source://parser//lib/parser/source/map/send.rb#13 - def initialize(dot_l, selector_l, begin_l, end_l, expression_l); end - - # source://parser//lib/parser/source/map/send.rb#10 - def begin; end - - # source://parser//lib/parser/source/map/send.rb#7 - def dot; end - - # source://parser//lib/parser/source/map/send.rb#11 - def end; end - - # source://parser//lib/parser/source/map/send.rb#9 - def operator; end - - # source://parser//lib/parser/source/map/send.rb#8 - def selector; end - - # source://parser//lib/parser/source/map/send.rb#24 - def with_operator(operator_l); end - - protected - - # source://parser//lib/parser/source/map/send.rb#30 - def update_operator(operator_l); end -end - -# source://parser//lib/parser/source/map/ternary.rb#6 -class Parser::Source::Map::Ternary < ::Parser::Source::Map - # source://parser//lib/parser/source/map/ternary.rb#10 - def initialize(question_l, colon_l, expression_l); end - - # source://parser//lib/parser/source/map/ternary.rb#8 - def colon; end - - # source://parser//lib/parser/source/map/ternary.rb#7 - def question; end -end - -# source://parser//lib/parser/source/map/variable.rb#6 -class Parser::Source::Map::Variable < ::Parser::Source::Map - # source://parser//lib/parser/source/map/variable.rb#10 - def initialize(name_l, expression_l = T.unsafe(nil)); end - - # source://parser//lib/parser/source/map/variable.rb#7 - def name; end - - # source://parser//lib/parser/source/map/variable.rb#8 - def operator; end - - # source://parser//lib/parser/source/map/variable.rb#19 - def with_operator(operator_l); end - - protected - - # source://parser//lib/parser/source/map/variable.rb#25 - def update_operator(operator_l); end -end - -# A range of characters in a particular source buffer. -# -# The range is always exclusive, i.e. a range with `begin_pos` of 3 and -# `end_pos` of 5 will contain the following characters: -# -# example -# ^^ -# -# @api public -# -# source://parser//lib/parser/source/range.rb#26 -class Parser::Source::Range - include ::Comparable - - # @api public - # @param source_buffer [Buffer] - # @param begin_pos [Integer] - # @param end_pos [Integer] - # @return [Range] a new instance of Range - # - # source://parser//lib/parser/source/range.rb#37 - def initialize(source_buffer, begin_pos, end_pos); end - - # Compare ranges, first by begin_pos, then by end_pos. - # - # @api public - # - # source://parser//lib/parser/source/range.rb#301 - def <=>(other); end - - # by the given amount(s) - # - # @api public - # @param Endpoint(s) [Hash] to change, any combination of :begin_pos or :end_pos - # @return [Range] the same range as this range but with the given end point(s) adjusted - # - # source://parser//lib/parser/source/range.rb#193 - def adjust(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end - - # @api public - # @return [Range] a zero-length range located just before the beginning - # of this range. - # - # source://parser//lib/parser/source/range.rb#55 - def begin; end - - # @api public - # @return [Integer] index of the first character in the range - # - # source://parser//lib/parser/source/range.rb#30 - def begin_pos; end - - # @api public - # @return [Integer] zero-based column number of the beginning of this range. - # - # source://parser//lib/parser/source/range.rb#92 - def column; end - - # @api public - # @raise RangeError - # @return [::Range] a range of columns spanned by this range. - # - # source://parser//lib/parser/source/range.rb#114 - def column_range; end - - # Return `other.contains?(self)` - # - # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? - # - # @api public - # @param other [Range] - # @return [Boolean] - # - # source://parser//lib/parser/source/range.rb#274 - def contained?(other); end - - # Returns true iff this range contains (strictly) `other`. - # - # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? - # - # @api public - # @param other [Range] - # @return [Boolean] - # - # source://parser//lib/parser/source/range.rb#262 - def contains?(other); end - - # Returns true iff both ranges intersect and also have different elements from one another. - # - # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? - # - # @api public - # @param other [Range] - # @return [Boolean] - # - # source://parser//lib/parser/source/range.rb#286 - def crossing?(other); end - - # Return `true` iff this range and `other` are disjoint. - # - # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? - # - # @api public - # @param other [Range] - # @return [Boolean] - # - # source://parser//lib/parser/source/range.rb#236 - def disjoint?(other); end - - # Checks if a range is empty; if it contains no characters - # - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/range.rb#294 - def empty?; end - - # @api public - # @return [Range] a zero-length range located just after the end - # of this range. - # - # source://parser//lib/parser/source/range.rb#63 - def end; end - - # @api public - # @return [Integer] index of the character after the last character in the range - # - # source://parser//lib/parser/source/range.rb#30 - def end_pos; end - - # @api public - def eql?(_arg0); end - - # Line number of the beginning of this range. By default, the first line - # of a buffer is 1; as such, line numbers are most commonly one-based. - # - # @api public - # @return [Integer] line number of the beginning of this range. - # @see Buffer - # - # source://parser//lib/parser/source/range.rb#83 - def first_line; end - - # Support for Ranges be used in as Hash indices and in Sets. - # - # @api public - # - # source://parser//lib/parser/source/range.rb#313 - def hash; end - - # @api public - # @return [String] a human-readable representation of this range. - # - # source://parser//lib/parser/source/range.rb#320 - def inspect; end - - # @api public - # @param other [Range] - # @return [Range] overlapping region of this range and `other`, or `nil` - # if they do not overlap - # - # source://parser//lib/parser/source/range.rb#220 - def intersect(other); end - - # `is?` provides a concise way to compare the source corresponding to this range. - # For example, `r.source == '(' || r.source == 'begin'` is equivalent to - # `r.is?('(', 'begin')`. - # - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/range.rb#141 - def is?(*what); end - - # @api public - # @param other [Range] - # @return [Range] smallest possible range spanning both this range and `other`. - # - # source://parser//lib/parser/source/range.rb#209 - def join(other); end - - # @api public - # @return [Integer] zero-based column number of the end of this range. - # - # source://parser//lib/parser/source/range.rb#106 - def last_column; end - - # @api public - # @return [Integer] line number of the end of this range. - # - # source://parser//lib/parser/source/range.rb#99 - def last_line; end - - # @api public - # @return [Integer] amount of characters included in this range. - # - # source://parser//lib/parser/source/range.rb#70 - def length; end - - # Line number of the beginning of this range. By default, the first line - # of a buffer is 1; as such, line numbers are most commonly one-based. - # - # @api public - # @return [Integer] line number of the beginning of this range. - # @see Buffer - # - # source://parser//lib/parser/source/range.rb#83 - def line; end - - # Return `true` iff this range is not disjoint from `other`. - # - # @api public - # @param other [Range] - # @return [Boolean] `true` if this range and `other` overlap - # - # source://parser//lib/parser/source/range.rb#250 - def overlaps?(other); end - - # @api public - # @param new_size [Integer] - # @return [Range] a range beginning at the same point as this range and length `new_size`. - # - # source://parser//lib/parser/source/range.rb#201 - def resize(new_size); end - - # @api public - # @return [Integer] amount of characters included in this range. - # - # source://parser//lib/parser/source/range.rb#70 - def size; end - - # @api public - # @return [String] all source code covered by this range. - # - # source://parser//lib/parser/source/range.rb#132 - def source; end - - # @api public - # @return [Parser::Source::Buffer] - # - # source://parser//lib/parser/source/range.rb#29 - def source_buffer; end - - # @api public - # @return [String] a line of source code containing the beginning of this range. - # - # source://parser//lib/parser/source/range.rb#125 - def source_line; end - - # @api public - # @return [Array] a set of character indexes contained in this range. - # - # source://parser//lib/parser/source/range.rb#148 - def to_a; end - - # @api public - # @return [Range] a Ruby range with the same `begin_pos` and `end_pos` - # - # source://parser//lib/parser/source/range.rb#155 - def to_range; end - - # Composes a GNU/Clang-style string representation of the beginning of this - # range. - # - # For example, for the following range in file `foo.rb`, - # - # def foo - # ^^^ - # - # `to_s` will return `foo.rb:1:5`. - # Note that the column index is one-based. - # - # @api public - # @return [String] - # - # source://parser//lib/parser/source/range.rb#173 - def to_s; end - - # to the given value(s). - # - # @api public - # @param Endpoint(s) [Hash] to change, any combination of :begin_pos or :end_pos - # @return [Range] the same range as this range but with the given end point(s) changed - # - # source://parser//lib/parser/source/range.rb#184 - def with(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end -end - -# {Rewriter} is deprecated. Use {TreeRewriter} instead. -# -# TreeRewriter has simplified semantics, and customizable policies -# with regards to clobbering. Please read the documentation. -# -# Keep in mind: -# - Rewriter was discarding the `end_pos` of the given range for `insert_before`, -# and the `begin_pos` for `insert_after`. These are meaningful in TreeRewriter. -# - TreeRewriter's wrap/insert_before/insert_after are multiple by default, while -# Rewriter would raise clobbering errors if the non '_multi' version was called. -# - The TreeRewriter policy closest to Rewriter's behavior is: -# different_replacements: :raise, -# swallowed_insertions: :raise, -# crossing_deletions: :accept -# -# @api public -# @deprecated Use {TreeRewriter} -# -# source://parser//lib/parser/source/rewriter.rb#31 -class Parser::Source::Rewriter - extend ::Parser::Deprecation - - # @api public - # @deprecated Use {TreeRewriter} - # @param source_buffer [Source::Buffer] - # @return [Rewriter] a new instance of Rewriter - # - # source://parser//lib/parser/source/rewriter.rb#39 - def initialize(source_buffer); end - - # @api public - # @return [Diagnostic::Engine] - # - # source://parser//lib/parser/source/rewriter.rb#33 - def diagnostics; end - - # Inserts new code after the given source range. - # - # @api public - # @deprecated Use {TreeRewriter#insert_after} - # @param range [Range] - # @param content [String] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/rewriter.rb#131 - def insert_after(range, content); end - - # Inserts new code after the given source range by allowing other - # insertions at the same position. - # Note that an insertion with latter invocation comes _after_ earlier - # insertion at the same position in the rewritten source. - # - # @api public - # @deprecated Use {TreeRewriter#insert_after} - # @example Inserting ')]' - # rewriter. - # insert_after_multi(range, ')'). - # insert_after_multi(range, ']'). - # process - # @param range [Range] - # @param content [String] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/rewriter.rb#153 - def insert_after_multi(range, content); end - - # Inserts new code before the given source range. - # - # @api public - # @deprecated Use {TreeRewriter#insert_before} - # @param range [Range] - # @param content [String] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/rewriter.rb#80 - def insert_before(range, content); end - - # Inserts new code before the given source range by allowing other - # insertions at the same position. - # Note that an insertion with latter invocation comes _before_ earlier - # insertion at the same position in the rewritten source. - # - # @api public - # @deprecated Use {TreeRewriter#insert_before} - # @example Inserting '[(' - # rewriter. - # insert_before_multi(range, '('). - # insert_before_multi(range, '['). - # process - # @param range [Range] - # @param content [String] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/rewriter.rb#117 - def insert_before_multi(range, content); end - - # Applies all scheduled changes to the `source_buffer` and returns - # modified source as a new string. - # - # @api public - # @deprecated Use {TreeRewriter#process} - # @return [String] - # - # source://parser//lib/parser/source/rewriter.rb#178 - def process; end - - # Removes the source range. - # - # @api public - # @deprecated Use {TreeRewriter#remove} - # @param range [Range] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/rewriter.rb#67 - def remove(range); end - - # Replaces the code of the source range `range` with `content`. - # - # @api public - # @deprecated Use {TreeRewriter#replace} - # @param range [Range] - # @param content [String] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/rewriter.rb#167 - def replace(range, content); end - - # @api public - # @return [Source::Buffer] - # - # source://parser//lib/parser/source/rewriter.rb#32 - def source_buffer; end - - # Provides a protected block where a sequence of multiple rewrite actions - # are handled atomically. If any of the actions failed by clobbering, - # all the actions are rolled back. - # - # @api public - # @deprecated Use {TreeRewriter#transaction} - # @example - # begin - # rewriter.transaction do - # rewriter.insert_before(range_of_something, '(') - # rewriter.insert_after(range_of_something, ')') - # end - # rescue Parser::ClobberingError - # end - # @raise [RuntimeError] when no block is passed - # @raise [RuntimeError] when already in a transaction - # - # source://parser//lib/parser/source/rewriter.rb#216 - def transaction; end - - # Inserts new code before and after the given source range. - # - # @api public - # @deprecated Use {TreeRewriter#wrap} - # @param range [Range] - # @param before [String] - # @param after [String] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/rewriter.rb#94 - def wrap(range, before, after); end - - private - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#476 - def active_clobber; end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#484 - def active_clobber=(value); end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#480 - def active_insertions; end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#492 - def active_insertions=(value); end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#472 - def active_queue; end - - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/rewriter.rb#500 - def adjacent?(range1, range2); end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#351 - def adjacent_insertion_mask(range); end - - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/rewriter.rb#366 - def adjacent_insertions?(range); end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#347 - def adjacent_position_mask(range); end - - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/rewriter.rb#377 - def adjacent_updates?(range); end - - # Schedule a code update. If it overlaps with another update, check - # whether they conflict, and raise a clobbering error if they do. - # (As a special case, zero-length ranges at the same position are - # considered to "overlap".) Otherwise, merge them. - # - # Updates which are adjacent to each other, but do not overlap, are also - # merged. - # - # RULES: - # - # - Insertion ("replacing" a zero-length range): - # - Two insertions at the same point conflict. This is true even - # if the earlier insertion has already been merged with an adjacent - # update, and even if they are both inserting the same text. - # - An insertion never conflicts with a replace or remove operation - # on its right or left side, which does not overlap it (in other - # words, which does not update BOTH its right and left sides). - # - An insertion always conflicts with a remove operation which spans - # both its sides. - # - An insertion conflicts with a replace operation which spans both its - # sides, unless the replacement text is longer than the replaced text - # by the size of the insertion (or more), and the portion of - # replacement text immediately after the insertion position is - # identical to the inserted text. - # - # - Removal operations never conflict with each other. - # - # - Replacement operations: - # - Take the portion of each replacement text which falls within: - # - The other operation's replaced region - # - The other operation's replacement text, if it extends past the - # end of its own replaced region (in other words, if the replacement - # text is longer than the text it replaces) - # - If and only if the taken texts are identical for both operations, - # they do not conflict. - # - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#280 - def append(action); end - - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/rewriter.rb#389 - def can_merge?(action, existing); end - - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/rewriter.rb#355 - def clobbered_insertion?(insertion); end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#343 - def clobbered_position_mask(range); end - - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/rewriter.rb#468 - def in_transaction?; end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#410 - def merge_actions(action, existing); end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#419 - def merge_actions!(action, existing); end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#425 - def merge_replacements(actions); end - - # @api public - # @raise [ClobberingError] - # - # source://parser//lib/parser/source/rewriter.rb#450 - def raise_clobber_error(action, existing); end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#335 - def record_insertion(range); end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#339 - def record_replace(range); end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#445 - def replace_actions(old, updated); end - - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/rewriter.rb#383 - def replace_compatible_with_insertion?(replace, insertion); end -end - -# source://parser//lib/parser/source/rewriter/action.rb#9 -class Parser::Source::Rewriter::Action - include ::Comparable - - # source://parser//lib/parser/source/rewriter/action.rb#15 - def initialize(range, replacement = T.unsafe(nil), allow_multiple_insertions = T.unsafe(nil), order = T.unsafe(nil)); end - - # source://parser//lib/parser/source/rewriter/action.rb#24 - def <=>(other); end - - # source://parser//lib/parser/source/rewriter/action.rb#12 - def allow_multiple_insertions; end - - # source://parser//lib/parser/source/rewriter/action.rb#12 - def allow_multiple_insertions?; end - - # source://parser//lib/parser/source/rewriter/action.rb#12 - def order; end - - # source://parser//lib/parser/source/rewriter/action.rb#12 - def range; end - - # source://parser//lib/parser/source/rewriter/action.rb#12 - def replacement; end - - # source://parser//lib/parser/source/rewriter/action.rb#30 - def to_s; end -end - -# @api public -# -# source://parser//lib/parser/source/rewriter.rb#504 -Parser::Source::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) - -# {TreeRewriter} performs the heavy lifting in the source rewriting process. -# It schedules code updates to be performed in the correct order. -# -# For simple cases, the resulting source will be obvious. -# -# Examples for more complex cases follow. Assume these examples are acting on -# the source `'puts(:hello, :world)`. The methods #wrap, #remove, etc. -# receive a Range as first argument; for clarity, examples below use english -# sentences and a string of raw code instead. -# -# ## Overlapping ranges: -# -# Any two rewriting actions on overlapping ranges will fail and raise -# a `ClobberingError`, unless they are both deletions (covered next). -# -# * wrap ':hello, ' with '(' and ')' -# * wrap ', :world' with '(' and ')' -# => CloberringError -# -# ## Overlapping deletions: -# -# * remove ':hello, ' -# * remove ', :world' -# -# The overlapping ranges are merged and `':hello, :world'` will be removed. -# This policy can be changed. `:crossing_deletions` defaults to `:accept` -# but can be set to `:warn` or `:raise`. -# -# ## Multiple actions at the same end points: -# -# Results will always be independent on the order they were given. -# Exception: rewriting actions done on exactly the same range (covered next). -# -# Example: -# * replace ', ' by ' => ' -# * wrap ':hello, :world' with '{' and '}' -# * replace ':world' with ':everybody' -# * wrap ':world' with '[', ']' -# -# The resulting string will be `'puts({:hello => [:everybody]})'` -# and this result is independent on the order the instructions were given in. -# -# Note that if the two "replace" were given as a single replacement of ', :world' -# for ' => :everybody', the result would be a `ClobberingError` because of the wrap -# in square brackets. -# -# ## Multiple wraps on same range: -# * wrap ':hello' with '(' and ')' -# * wrap ':hello' with '[' and ']' -# -# The wraps are combined in order given and results would be `'puts([(:hello)], :world)'`. -# -# ## Multiple replacements on same range: -# * replace ':hello' by ':hi', then -# * replace ':hello' by ':hey' -# -# The replacements are made in the order given, so the latter replacement -# supersedes the former and ':hello' will be replaced by ':hey'. -# -# This policy can be changed. `:different_replacements` defaults to `:accept` -# but can be set to `:warn` or `:raise`. -# -# ## Swallowed insertions: -# wrap 'world' by '__', '__' -# replace ':hello, :world' with ':hi' -# -# A containing replacement will swallow the contained rewriting actions -# and `':hello, :world'` will be replaced by `':hi'`. -# -# This policy can be changed for swallowed insertions. `:swallowed_insertions` -# defaults to `:accept` but can be set to `:warn` or `:raise` -# -# ## Implementation -# The updates are organized in a tree, according to the ranges they act on -# (where children are strictly contained by their parent), hence the name. -# -# @api public -# -# source://parser//lib/parser/source/tree_rewriter.rb#91 -class Parser::Source::TreeRewriter - extend ::Parser::Deprecation - - # @api public - # @param source_buffer [Source::Buffer] - # @return [TreeRewriter] a new instance of TreeRewriter - # - # source://parser//lib/parser/source/tree_rewriter.rb#98 - def initialize(source_buffer, crossing_deletions: T.unsafe(nil), different_replacements: T.unsafe(nil), swallowed_insertions: T.unsafe(nil)); end - - # Returns a representation of the rewriter as nested insertions (:wrap) and replacements. - # - # rewriter.as_actions # =>[ [:wrap, 1...10, '(', ')'], - # [:wrap, 2...6, '', '!'], # aka "insert_after" - # [:replace, 2...4, 'foo'], - # [:replace, 5...6, ''], # aka "removal" - # ], - # - # Contrary to `as_replacements`, this representation is sufficient to recreate exactly - # the rewriter. - # - # @api public - # @return [Array<(Symbol, Range, String{, String})>] - # - # source://parser//lib/parser/source/tree_rewriter.rb#299 - def as_nested_actions; end - - # Returns a representation of the rewriter as an ordered list of replacements. - # - # rewriter.as_replacements # => [ [1...1, '('], - # [2...4, 'foo'], - # [5...6, ''], - # [6...6, '!'], - # [10...10, ')'], - # ] - # - # This representation is sufficient to recreate the result of `process` but it is - # not sufficient to recreate completely the rewriter for further merging/actions. - # See `as_nested_actions` - # - # @api public - # @return [Array] an ordered list of pairs of range & replacement - # - # source://parser//lib/parser/source/tree_rewriter.rb#281 - def as_replacements; end - - # @api public - # @return [Diagnostic::Engine] - # - # source://parser//lib/parser/source/tree_rewriter.rb#93 - def diagnostics; end - - # Returns true iff no (non trivial) update has been recorded - # - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/tree_rewriter.rb#125 - def empty?; end - - # For special cases where one needs to merge a rewriter attached to a different source_buffer - # or that needs to be offset. Policies of the receiver are used. - # - # @api public - # @param rewriter [TreeRewriter] from different source_buffer - # @param offset [Integer] - # @raise [IndexError] if action ranges (once offset) don't fit the current buffer - # @return [Rewriter] self - # - # source://parser//lib/parser/source/tree_rewriter.rb#168 - def import!(foreign_rewriter, offset: T.unsafe(nil)); end - - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/tree_rewriter.rb#329 - def in_transaction?; end - - # Shortcut for `wrap(range, nil, content)` - # - # @api public - # @param range [Range] - # @param content [String] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/tree_rewriter.rb#242 - def insert_after(range, content); end - - # @api private - # @deprecated Use insert_after or wrap - # - # source://parser//lib/parser/source/tree_rewriter.rb#351 - def insert_after_multi(range, text); end - - # Shortcut for `wrap(range, content, nil)` - # - # @api public - # @param range [Range] - # @param content [String] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/tree_rewriter.rb#230 - def insert_before(range, content); end - - # @api private - # @deprecated Use insert_after or wrap - # - # source://parser//lib/parser/source/tree_rewriter.rb#342 - def insert_before_multi(range, text); end - - # @api public - # - # source://parser//lib/parser/source/tree_rewriter.rb#334 - def inspect; end - - # Returns a new rewriter that consists of the updates of the received - # and the given argument. Policies of the receiver are used. - # - # @api public - # @param with [Rewriter] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] merge of receiver and argument - # - # source://parser//lib/parser/source/tree_rewriter.rb#155 - def merge(with); end - - # Merges the updates of argument with the receiver. - # Policies of the receiver are used. - # This action is atomic in that it won't change the receiver - # unless it succeeds. - # - # @api public - # @param with [Rewriter] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/tree_rewriter.rb#139 - def merge!(with); end - - # Applies all scheduled changes to the `source_buffer` and returns - # modified source as a new string. - # - # @api public - # @return [String] - # - # source://parser//lib/parser/source/tree_rewriter.rb#252 - def process; end - - # Shortcut for `replace(range, '')` - # - # @api public - # @param range [Range] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/tree_rewriter.rb#217 - def remove(range); end - - # Replaces the code of the source range `range` with `content`. - # - # @api public - # @param range [Range] - # @param content [String] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/tree_rewriter.rb#193 - def replace(range, content); end - - # @api public - # @return [Source::Buffer] - # - # source://parser//lib/parser/source/tree_rewriter.rb#92 - def source_buffer; end - - # Provides a protected block where a sequence of multiple rewrite actions - # are handled atomically. If any of the actions failed by clobbering, - # all the actions are rolled back. Transactions can be nested. - # - # @api public - # @raise [RuntimeError] when no block is passed - # - # source://parser//lib/parser/source/tree_rewriter.rb#310 - def transaction; end - - # Inserts the given strings before and after the given range. - # - # @api public - # @param range [Range] - # @param insert_before [String, nil] - # @param insert_after [String, nil] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/tree_rewriter.rb#206 - def wrap(range, insert_before, insert_after); end - - protected - - # @api public - # - # source://parser//lib/parser/source/tree_rewriter.rb#365 - def action_root; end - - private - - # @api public - # - # source://parser//lib/parser/source/tree_rewriter.rb#369 - def action_summary; end - - # @api public - # @raise [ArgumentError] - # - # source://parser//lib/parser/source/tree_rewriter.rb#392 - def check_policy_validity; end - - # @api public - # - # source://parser//lib/parser/source/tree_rewriter.rb#404 - def check_range_validity(range); end - - # @api public - # - # source://parser//lib/parser/source/tree_rewriter.rb#397 - def combine(range, attributes); end - - # @api public - # - # source://parser//lib/parser/source/tree_rewriter.rb#411 - def enforce_policy(event); end - - # @api public - # @raise [Parser::ClobberingError] - # - # source://parser//lib/parser/source/tree_rewriter.rb#418 - def trigger_policy(event, range: T.unsafe(nil), conflict: T.unsafe(nil), **arguments); end -end - -# @api public -# -# source://parser//lib/parser/source/tree_rewriter.rb#391 -Parser::Source::TreeRewriter::ACTIONS = T.let(T.unsafe(nil), Array) - -# source://parser//lib/parser/source/tree_rewriter/action.rb#14 -class Parser::Source::TreeRewriter::Action - # source://parser//lib/parser/source/tree_rewriter/action.rb#17 - def initialize(range, enforcer, insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil), children: T.unsafe(nil)); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#29 - def combine(action); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#68 - def contract; end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#34 - def empty?; end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#15 - def insert_after; end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#15 - def insert_before; end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#58 - def insertion?; end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#81 - def moved(source_buffer, offset); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#50 - def nested_actions; end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#41 - def ordered_replacements; end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#15 - def range; end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#15 - def replacement; end - - protected - - # source://parser//lib/parser/source/tree_rewriter/action.rb#159 - def analyse_hierarchy(action); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#146 - def bsearch_child_index(from = T.unsafe(nil)); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#225 - def call_enforcer_for_merge(action); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#205 - def check_fusible(action, *fusible); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#95 - def children; end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#130 - def combine_children(more_children); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#103 - def do_combine(action); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#136 - def fuse_deletions(action, fusible, other_sibblings); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#216 - def merge(action); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#111 - def place_in_hierarchy(action); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#233 - def swallow(children); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#97 - def with(range: T.unsafe(nil), enforcer: T.unsafe(nil), children: T.unsafe(nil), insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil)); end -end - -# @api public -# -# source://parser//lib/parser/source/tree_rewriter.rb#356 -Parser::Source::TreeRewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) - -# @api public -# -# source://parser//lib/parser/source/tree_rewriter.rb#417 -Parser::Source::TreeRewriter::POLICY_TO_LEVEL = T.let(T.unsafe(nil), Hash) - -# source://parser//lib/parser/static_environment.rb#5 -class Parser::StaticEnvironment - # @return [StaticEnvironment] a new instance of StaticEnvironment - # - # source://parser//lib/parser/static_environment.rb#17 - def initialize; end - - # source://parser//lib/parser/static_environment.rb#55 - def declare(name); end - - # Anonymous blockarg - # - # source://parser//lib/parser/static_environment.rb#77 - def declare_anonymous_blockarg; end - - # Anonymous kwresarg - # - # source://parser//lib/parser/static_environment.rb#113 - def declare_anonymous_kwrestarg; end - - # Anonymous restarg - # - # source://parser//lib/parser/static_environment.rb#95 - def declare_anonymous_restarg; end - - # Forward args - # - # source://parser//lib/parser/static_environment.rb#67 - def declare_forward_args; end - - # @return [Boolean] - # - # source://parser//lib/parser/static_environment.rb#61 - def declared?(name); end - - # @return [Boolean] - # - # source://parser//lib/parser/static_environment.rb#81 - def declared_anonymous_blockarg?; end - - # @return [Boolean] - # - # source://parser//lib/parser/static_environment.rb#85 - def declared_anonymous_blockarg_in_current_scpe?; end - - # @return [Boolean] - # - # source://parser//lib/parser/static_environment.rb#117 - def declared_anonymous_kwrestarg?; end - - # @return [Boolean] - # - # source://parser//lib/parser/static_environment.rb#121 - def declared_anonymous_kwrestarg_in_current_scope?; end - - # @return [Boolean] - # - # source://parser//lib/parser/static_environment.rb#99 - def declared_anonymous_restarg?; end - - # @return [Boolean] - # - # source://parser//lib/parser/static_environment.rb#103 - def declared_anonymous_restarg_in_current_scope?; end - - # @return [Boolean] - # - # source://parser//lib/parser/static_environment.rb#71 - def declared_forward_args?; end - - # @return [Boolean] - # - # source://parser//lib/parser/static_environment.rb#129 - def empty?; end - - # source://parser//lib/parser/static_environment.rb#33 - def extend_dynamic; end - - # source://parser//lib/parser/static_environment.rb#26 - def extend_static; end - - # @return [Boolean] - # - # source://parser//lib/parser/static_environment.rb#89 - def parent_has_anonymous_blockarg?; end - - # @return [Boolean] - # - # source://parser//lib/parser/static_environment.rb#125 - def parent_has_anonymous_kwrestarg?; end - - # @return [Boolean] - # - # source://parser//lib/parser/static_environment.rb#107 - def parent_has_anonymous_restarg?; end - - # source://parser//lib/parser/static_environment.rb#21 - def reset; end - - # source://parser//lib/parser/static_environment.rb#49 - def unextend; end -end - -# source://parser//lib/parser/static_environment.rb#15 -Parser::StaticEnvironment::ANONYMOUS_BLOCKARG_INHERITED = T.let(T.unsafe(nil), Symbol) - -# source://parser//lib/parser/static_environment.rb#14 -Parser::StaticEnvironment::ANONYMOUS_BLOCKARG_IN_CURRENT_SCOPE = T.let(T.unsafe(nil), Symbol) - -# source://parser//lib/parser/static_environment.rb#12 -Parser::StaticEnvironment::ANONYMOUS_KWRESTARG_INHERITED = T.let(T.unsafe(nil), Symbol) - -# source://parser//lib/parser/static_environment.rb#11 -Parser::StaticEnvironment::ANONYMOUS_KWRESTARG_IN_CURRENT_SCOPE = T.let(T.unsafe(nil), Symbol) - -# source://parser//lib/parser/static_environment.rb#9 -Parser::StaticEnvironment::ANONYMOUS_RESTARG_INHERITED = T.let(T.unsafe(nil), Symbol) - -# source://parser//lib/parser/static_environment.rb#8 -Parser::StaticEnvironment::ANONYMOUS_RESTARG_IN_CURRENT_SCOPE = T.let(T.unsafe(nil), Symbol) - -# source://parser//lib/parser/static_environment.rb#6 -Parser::StaticEnvironment::FORWARD_ARGS = T.let(T.unsafe(nil), Symbol) - -# {Parser::SyntaxError} is raised whenever parser detects a syntax error, -# similar to the standard SyntaxError class. -# -# @api public -# -# source://parser//lib/parser/syntax_error.rb#13 -class Parser::SyntaxError < ::StandardError - # @api public - # @return [SyntaxError] a new instance of SyntaxError - # - # source://parser//lib/parser/syntax_error.rb#16 - def initialize(diagnostic); end - - # @api public - # @return [Parser::Diagnostic] - # - # source://parser//lib/parser/syntax_error.rb#14 - def diagnostic; end -end - -# {Parser::TreeRewriter} offers a basic API that makes it easy to rewrite -# existing ASTs. It's built on top of {Parser::AST::Processor} and -# {Parser::Source::TreeRewriter} -# -# For example, assume you want to remove `do` tokens from a while statement. -# You can do this as following: -# -# require 'parser/current' -# -# class RemoveDo < Parser::TreeRewriter -# def on_while(node) -# # Check if the statement starts with "do" -# if node.location.begin.is?('do') -# remove(node.location.begin) -# end -# end -# end -# -# code = <<-EOF -# while true do -# puts 'hello' -# end -# EOF -# -# ast = Parser::CurrentRuby.parse code -# buffer = Parser::Source::Buffer.new('(example)', source: code) -# rewriter = RemoveDo.new -# -# # Rewrite the AST, returns a String with the new form. -# puts rewriter.rewrite(buffer, ast) -# -# This would result in the following Ruby code: -# -# while true -# puts 'hello' -# end -# -# Keep in mind that {Parser::TreeRewriter} does not take care of indentation when -# inserting/replacing code so you'll have to do this yourself. -# -# See also [a blog entry](http://whitequark.org/blog/2013/04/26/lets-play-with-ruby-code/) -# describing rewriters in greater detail. -# -# @api public -# -# source://parser//lib/parser/tree_rewriter.rb#51 -class Parser::TreeRewriter < ::Parser::AST::Processor - # Returns `true` if the specified node is an assignment node, returns false - # otherwise. - # - # @api public - # @param node [Parser::AST::Node] - # @return [Boolean] - # - # source://parser//lib/parser/tree_rewriter.rb#79 - def assignment?(node); end - - # Inserts new code after the given source range. - # - # @api public - # @param range [Parser::Source::Range] - # @param content [String] - # - # source://parser//lib/parser/tree_rewriter.rb#118 - def insert_after(range, content); end - - # Inserts new code before the given source range. - # - # @api public - # @param range [Parser::Source::Range] - # @param content [String] - # - # source://parser//lib/parser/tree_rewriter.rb#108 - def insert_before(range, content); end - - # Removes the source range. - # - # @api public - # @param range [Parser::Source::Range] - # - # source://parser//lib/parser/tree_rewriter.rb#88 - def remove(range); end - - # Replaces the code of the source range `range` with `content`. - # - # @api public - # @param range [Parser::Source::Range] - # @param content [String] - # - # source://parser//lib/parser/tree_rewriter.rb#128 - def replace(range, content); end - - # Rewrites the AST/source buffer and returns a String containing the new - # version. - # - # @api public - # @param source_buffer [Parser::Source::Buffer] - # @param ast [Parser::AST::Node] - # @param crossing_deletions:, [Symbol] different_replacements:, swallowed_insertions: - # policy arguments for TreeRewriter (optional) - # @return [String] - # - # source://parser//lib/parser/tree_rewriter.rb#62 - def rewrite(source_buffer, ast, **policy); end - - # Wraps the given source range with the given values. - # - # @api public - # @param range [Parser::Source::Range] - # @param content [String] - # - # source://parser//lib/parser/tree_rewriter.rb#98 - def wrap(range, before, after); end -end - -# {Parser::UnknownEncodingInMagicComment} is raised when a magic encoding -# comment is encountered that the currently running Ruby version doesn't -# recognize. It inherits from {ArgumentError} since that is the exception -# Ruby itself raises when trying to execute a file with an unknown encoding. -# As such, it is also not a {Parser::SyntaxError}. -# -# @api public -# -# source://parser//lib/parser/unknown_encoding_in_magic_comment_error.rb#13 -class Parser::UnknownEncodingInMagicComment < ::ArgumentError; end - -# source://parser//lib/parser/version.rb#4 -Parser::VERSION = T.let(T.unsafe(nil), String) - -# source://parser//lib/parser/variables_stack.rb#5 -class Parser::VariablesStack - # @return [VariablesStack] a new instance of VariablesStack - # - # source://parser//lib/parser/variables_stack.rb#6 - def initialize; end - - # source://parser//lib/parser/variables_stack.rb#27 - def declare(name); end - - # @return [Boolean] - # - # source://parser//lib/parser/variables_stack.rb#31 - def declared?(name); end - - # @return [Boolean] - # - # source://parser//lib/parser/variables_stack.rb#11 - def empty?; end - - # source://parser//lib/parser/variables_stack.rb#19 - def pop; end - - # source://parser//lib/parser/variables_stack.rb#15 - def push; end - - # source://parser//lib/parser/variables_stack.rb#23 - def reset; end -end diff --git a/sorbet/rbi/gems/pp@0.6.2.rbi b/sorbet/rbi/gems/pp@0.6.2.rbi deleted file mode 100644 index 0a82eb8..0000000 --- a/sorbet/rbi/gems/pp@0.6.2.rbi +++ /dev/null @@ -1,368 +0,0 @@ -# typed: false - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `pp` gem. -# Please instead update this file by running `bin/tapioca gem pp`. - - -class Array - include ::Enumerable - - # source://pp//lib/pp.rb#402 - def pretty_print(q); end - - # source://pp//lib/pp.rb#410 - def pretty_print_cycle(q); end -end - -class Data - # source://pp//lib/pp.rb#456 - def pretty_print(q); end - - # source://pp//lib/pp.rb#484 - def pretty_print_cycle(q); end -end - -class File::Stat - include ::Comparable - - # source://pp//lib/pp.rb#518 - def pretty_print(q); end -end - -class Hash - include ::Enumerable - - # source://pp//lib/pp.rb#416 - def pretty_print(q); end - - # source://pp//lib/pp.rb#420 - def pretty_print_cycle(q); end -end - -module Kernel - # Returns a pretty printed object as a string. - # - # See the PP module for more information. - # - # source://pp//lib/pp.rb#685 - def pretty_inspect; end - - private - - # prints arguments in pretty form. - # - # +#pp+ returns argument(s). - # - # source://pp//lib/pp.rb#692 - def pp(*objs); end - - class << self - # prints arguments in pretty form. - # - # +#pp+ returns argument(s). - # - # source://pp//lib/pp.rb#692 - def pp(*objs); end - end -end - -class MatchData - # source://pp//lib/pp.rb#601 - def pretty_print(q); end -end - -# A pretty-printer for Ruby objects. -# -# -# == What PP Does -# -# Standard output by #p returns this: -# #, @group_queue=#], []]>, @buffer=[], @newline="\n", @group_stack=[#], @buffer_width=0, @indent=0, @maxwidth=79, @output_width=2, @output=#> -# -# Pretty-printed output returns this: -# #, -# @group_queue= -# #], -# []]>, -# @group_stack= -# [#], -# @indent=0, -# @maxwidth=79, -# @newline="\n", -# @output=#, -# @output_width=2> -# -# -# == Usage -# -# pp(obj) #=> obj -# pp obj #=> obj -# pp(obj1, obj2, ...) #=> [obj1, obj2, ...] -# pp() #=> nil -# -# Output obj(s) to $> in pretty printed format. -# -# It returns obj(s). -# -# -# == Output Customization -# -# To define a customized pretty printing function for your classes, -# redefine method #pretty_print(pp) in the class. -# Note that require 'pp' is needed before redefining #pretty_print(pp). -# -# #pretty_print takes the +pp+ argument, which is an instance of the PP class. -# The method uses #text, #breakable, #nest, #group and #pp to print the -# object. -# -# -# == Pretty-Print JSON -# -# To pretty-print JSON refer to JSON#pretty_generate. -# -# -# == Author -# Tanaka Akira -class PP < ::PrettyPrint - include ::PP::PPMethods - - class << self - # :stopdoc: - # - # source://pp//lib/pp.rb#116 - def mcall(obj, mod, meth, *args, &block); end - - # Outputs +obj+ to +out+ in pretty printed format of - # +width+ columns in width. - # - # If +out+ is omitted, $> is assumed. - # If +width+ is omitted, the width of +out+ is assumed (see - # width_for). - # - # PP.pp returns +out+. - # - # source://pp//lib/pp.rb#96 - def pp(obj, out = T.unsafe(nil), width = T.unsafe(nil)); end - - # Returns the sharing detection flag as a boolean value. - # It is false by default. - # - # source://pp//lib/pp.rb#125 - def sharing_detection; end - - # Returns the sharing detection flag as a boolean value. - # It is false by default. - # - # source://pp//lib/pp.rb#129 - def sharing_detection=(b); end - - # Outputs +obj+ to +out+ like PP.pp but with no indent and - # newline. - # - # PP.singleline_pp returns +out+. - # - # source://pp//lib/pp.rb#108 - def singleline_pp(obj, out = T.unsafe(nil)); end - - # Returns the usable width for +out+. - # As the width of +out+: - # 1. If +out+ is assigned to a tty device, its width is used. - # 2. Otherwise, or it could not get the value, the +COLUMN+ - # environment variable is assumed to be set to the width. - # 3. If +COLUMN+ is not set to a non-zero number, 80 is assumed. - # - # And finally, returns the above width value - 1. - # * This -1 is for Windows command prompt, which moves the cursor to - # the next line if it reaches the last column. - # - # source://pp//lib/pp.rb#79 - def width_for(out); end - end -end - -module PP::ObjectMixin - # A default pretty printing method for general objects. - # It calls #pretty_print_instance_variables to list instance variables. - # - # If +self+ has a customized (redefined) #inspect method, - # the result of self.inspect is used but it obviously has no - # line break hints. - # - # This module provides predefined #pretty_print methods for some of - # the most commonly used built-in classes for convenience. - # - # source://pp//lib/pp.rb#353 - def pretty_print(q); end - - # A default pretty printing method for general objects that are - # detected as part of a cycle. - # - # source://pp//lib/pp.rb#370 - def pretty_print_cycle(q); end - - # Is #inspect implementation using #pretty_print. - # If you implement #pretty_print, it can be used as follows. - # - # alias inspect pretty_print_inspect - # - # However, doing this requires that every class that #inspect is called on - # implement #pretty_print, or a RuntimeError will be raised. - # - # source://pp//lib/pp.rb#392 - def pretty_print_inspect; end - - # Returns a sorted array of instance variable names. - # - # This method should return an array of names of instance variables as symbols or strings as: - # +[:@a, :@b]+. - # - # source://pp//lib/pp.rb#381 - def pretty_print_instance_variables; end -end - -# Module that defines helper methods for pretty_print. -module PP::PPMethods - # Check whether the object_id +id+ is in the current buffer of objects - # to be pretty printed. Used to break cycles in chains of objects to be - # pretty printed. - # - # source://pp//lib/pp.rb#169 - def check_inspect_key(id); end - - # A convenience method which is same as follows: - # - # text ',' - # breakable - # - # source://pp//lib/pp.rb#232 - def comma_breakable; end - - # Yields to a block - # and preserves the previous set of objects being printed. - # - # source://pp//lib/pp.rb#147 - def guard_inspect_key; end - - # A convenience method, like object_group, but also reformats the Object's - # object_id. - # - # source://pp//lib/pp.rb#222 - def object_address_group(obj, &block); end - - # A convenience method which is same as follows: - # - # group(1, '#<' + obj.class.name, '>') { ... } - # - # source://pp//lib/pp.rb#216 - def object_group(obj, &block); end - - # Removes an object from the set of objects being pretty printed. - # - # source://pp//lib/pp.rb#182 - def pop_inspect_key(id); end - - # Adds +obj+ to the pretty printing buffer - # using Object#pretty_print or Object#pretty_print_cycle. - # - # Object#pretty_print_cycle is used when +obj+ is already - # printed, a.k.a the object reference chain has a cycle. - # - # source://pp//lib/pp.rb#191 - def pp(obj); end - - # A pretty print for a Hash - # - # source://pp//lib/pp.rb#291 - def pp_hash(obj); end - - # A pretty print for a pair of Hash - # - # source://pp//lib/pp.rb#303 - def pp_hash_pair(k, v); end - - # A present standard failsafe for pretty printing any given Object - # - # source://pp//lib/pp.rb#275 - def pp_object(obj); end - - # Adds the object_id +id+ to the set of objects being pretty printed, so - # as to not repeat objects. - # - # source://pp//lib/pp.rb#177 - def push_inspect_key(id); end - - # Adds a separated list. - # The list is separated by comma with breakable space, by default. - # - # #seplist iterates the +list+ using +iter_method+. - # It yields each object to the block given for #seplist. - # The procedure +separator_proc+ is called between each yields. - # - # If the iteration is zero times, +separator_proc+ is not called at all. - # - # If +separator_proc+ is nil or not given, - # +lambda { comma_breakable }+ is used. - # If +iter_method+ is not given, :each is used. - # - # For example, following 3 code fragments has similar effect. - # - # q.seplist([1,2,3]) {|v| xxx v } - # - # q.seplist([1,2,3], lambda { q.comma_breakable }, :each) {|v| xxx v } - # - # xxx 1 - # q.comma_breakable - # xxx 2 - # q.comma_breakable - # xxx 3 - # - # source://pp//lib/pp.rb#261 - def seplist(list, sep = T.unsafe(nil), iter_method = T.unsafe(nil)); end -end - -class PP::SingleLine < ::PrettyPrint::SingleLine - include ::PP::PPMethods -end - -# The version string -# -# source://pp//lib/pp.rb#67 -PP::VERSION = T.let(T.unsafe(nil), String) - -class Range - include ::Enumerable - - # source://pp//lib/pp.rb#490 - def pretty_print(q); end -end - -class RubyVM::AbstractSyntaxTree::Node - # source://pp//lib/pp.rb#640 - def pretty_print(q); end - - # source://pp//lib/pp.rb#627 - def pretty_print_children(q, names = T.unsafe(nil)); end -end - -class String - include ::Comparable - - # source://pp//lib/pp.rb#502 - def pretty_print(q); end -end - -class Struct - include ::Enumerable - - # source://pp//lib/pp.rb#436 - def pretty_print(q); end - - # source://pp//lib/pp.rb#450 - def pretty_print_cycle(q); end -end diff --git a/sorbet/rbi/gems/prettyprint@0.2.0.rbi b/sorbet/rbi/gems/prettyprint@0.2.0.rbi deleted file mode 100644 index af822d8..0000000 --- a/sorbet/rbi/gems/prettyprint@0.2.0.rbi +++ /dev/null @@ -1,477 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `prettyprint` gem. -# Please instead update this file by running `bin/tapioca gem prettyprint`. - - -# This class implements a pretty printing algorithm. It finds line breaks and -# nice indentations for grouped structure. -# -# By default, the class assumes that primitive elements are strings and each -# byte in the strings have single column in width. But it can be used for -# other situations by giving suitable arguments for some methods: -# * newline object and space generation block for PrettyPrint.new -# * optional width argument for PrettyPrint#text -# * PrettyPrint#breakable -# -# There are several candidate uses: -# * text formatting using proportional fonts -# * multibyte characters which has columns different to number of bytes -# * non-string formatting -# -# == Bugs -# * Box based formatting? -# * Other (better) model/algorithm? -# -# Report any bugs at http://bugs.ruby-lang.org -# -# == References -# Christian Lindig, Strictly Pretty, March 2000, -# https://lindig.github.io/papers/strictly-pretty-2000.pdf -# -# Philip Wadler, A prettier printer, March 1998, -# https://homepages.inf.ed.ac.uk/wadler/topics/language-design.html#prettier -# -# == Author -# Tanaka Akira -class PrettyPrint - # Creates a buffer for pretty printing. - # - # +output+ is an output target. If it is not specified, '' is assumed. It - # should have a << method which accepts the first argument +obj+ of - # PrettyPrint#text, the first argument +sep+ of PrettyPrint#breakable, the - # first argument +newline+ of PrettyPrint.new, and the result of a given - # block for PrettyPrint.new. - # - # +maxwidth+ specifies maximum line length. If it is not specified, 79 is - # assumed. However actual outputs may overflow +maxwidth+ if long - # non-breakable texts are provided. - # - # +newline+ is used for line breaks. "\n" is used if it is not specified. - # - # The block is used to generate spaces. {|width| ' ' * width} is used if it - # is not given. - # - # @return [PrettyPrint] a new instance of PrettyPrint - # - # source://prettyprint//lib/prettyprint.rb#84 - def initialize(output = T.unsafe(nil), maxwidth = T.unsafe(nil), newline = T.unsafe(nil), &genspace); end - - # Breaks the buffer into lines that are shorter than #maxwidth - # - # source://prettyprint//lib/prettyprint.rb#162 - def break_outmost_groups; end - - # This says "you can break a line here if necessary", and a +width+\-column - # text +sep+ is inserted if a line is not broken at the point. - # - # If +sep+ is not specified, " " is used. - # - # If +width+ is not specified, +sep.length+ is used. You will have to - # specify this when +sep+ is a multibyte character, for example. - # - # source://prettyprint//lib/prettyprint.rb#226 - def breakable(sep = T.unsafe(nil), width = T.unsafe(nil)); end - - # Returns the group most recently added to the stack. - # - # Contrived example: - # out = "" - # => "" - # q = PrettyPrint.new(out) - # => #, @output_width=0, @buffer_width=0, @buffer=[], @group_stack=[#], @group_queue=#]]>, @indent=0> - # q.group { - # q.text q.current_group.inspect - # q.text q.newline - # q.group(q.current_group.depth + 1) { - # q.text q.current_group.inspect - # q.text q.newline - # q.group(q.current_group.depth + 1) { - # q.text q.current_group.inspect - # q.text q.newline - # q.group(q.current_group.depth + 1) { - # q.text q.current_group.inspect - # q.text q.newline - # } - # } - # } - # } - # => 284 - # puts out - # # - # # - # # - # # - # - # source://prettyprint//lib/prettyprint.rb#157 - def current_group; end - - # This is similar to #breakable except - # the decision to break or not is determined individually. - # - # Two #fill_breakable under a group may cause 4 results: - # (break,break), (break,non-break), (non-break,break), (non-break,non-break). - # This is different to #breakable because two #breakable under a group - # may cause 2 results: - # (break,break), (non-break,non-break). - # - # The text +sep+ is inserted if a line is not broken at this point. - # - # If +sep+ is not specified, " " is used. - # - # If +width+ is not specified, +sep.length+ is used. You will have to - # specify this when +sep+ is a multibyte character, for example. - # - # source://prettyprint//lib/prettyprint.rb#214 - def fill_breakable(sep = T.unsafe(nil), width = T.unsafe(nil)); end - - # outputs buffered data. - # - # source://prettyprint//lib/prettyprint.rb#290 - def flush; end - - # A lambda or Proc, that takes one argument, of an Integer, and returns - # the corresponding number of spaces. - # - # By default this is: - # lambda {|n| ' ' * n} - # - # source://prettyprint//lib/prettyprint.rb#120 - def genspace; end - - # Groups line break hints added in the block. The line break hints are all - # to be used or not. - # - # If +indent+ is specified, the method call is regarded as nested by - # nest(indent) { ... }. - # - # If +open_obj+ is specified, text open_obj, open_width is called - # before grouping. If +close_obj+ is specified, text close_obj, - # close_width is called after grouping. - # - # source://prettyprint//lib/prettyprint.rb#251 - def group(indent = T.unsafe(nil), open_obj = T.unsafe(nil), close_obj = T.unsafe(nil), open_width = T.unsafe(nil), close_width = T.unsafe(nil)); end - - # The PrettyPrint::GroupQueue of groups in stack to be pretty printed - # - # source://prettyprint//lib/prettyprint.rb#126 - def group_queue; end - - # Takes a block and queues a new group that is indented 1 level further. - # - # source://prettyprint//lib/prettyprint.rb#262 - def group_sub; end - - # The number of spaces to be indented - # - # source://prettyprint//lib/prettyprint.rb#123 - def indent; end - - # The maximum width of a line, before it is separated in to a newline - # - # This defaults to 79, and should be an Integer - # - # source://prettyprint//lib/prettyprint.rb#108 - def maxwidth; end - - # Increases left margin after newline with +indent+ for line breaks added in - # the block. - # - # source://prettyprint//lib/prettyprint.rb#279 - def nest(indent); end - - # The value that is appended to +output+ to add a new line. - # - # This defaults to "\n", and should be String - # - # source://prettyprint//lib/prettyprint.rb#113 - def newline; end - - # The output object. - # - # This defaults to '', and should accept the << method - # - # source://prettyprint//lib/prettyprint.rb#103 - def output; end - - # This adds +obj+ as a text of +width+ columns in width. - # - # If +width+ is not specified, obj.length is used. - # - # source://prettyprint//lib/prettyprint.rb#182 - def text(obj, width = T.unsafe(nil)); end - - class << self - # This is a convenience method which is same as follows: - # - # begin - # q = PrettyPrint.new(output, maxwidth, newline, &genspace) - # ... - # q.flush - # output - # end - # - # @yield [q] - # - # source://prettyprint//lib/prettyprint.rb#47 - def format(output = T.unsafe(nil), maxwidth = T.unsafe(nil), newline = T.unsafe(nil), genspace = T.unsafe(nil)); end - - # This is similar to PrettyPrint::format but the result has no breaks. - # - # +maxwidth+, +newline+ and +genspace+ are ignored. - # - # The invocation of +breakable+ in the block doesn't break a line and is - # treated as just an invocation of +text+. - # - # @yield [q] - # - # source://prettyprint//lib/prettyprint.rb#61 - def singleline_format(output = T.unsafe(nil), maxwidth = T.unsafe(nil), newline = T.unsafe(nil), genspace = T.unsafe(nil)); end - end -end - -# The Breakable class is used for breaking up object information -# -# This class is intended for internal use of the PrettyPrint buffers. -class PrettyPrint::Breakable - # Create a new Breakable object. - # - # Arguments: - # * +sep+ String of the separator - # * +width+ Integer width of the +sep+ - # * +q+ parent PrettyPrint object, to base from - # - # @return [Breakable] a new instance of Breakable - # - # source://prettyprint//lib/prettyprint.rb#347 - def initialize(sep, width, q); end - - # The number of spaces to indent. - # - # This is inferred from +q+ within PrettyPrint, passed in ::new - # - # source://prettyprint//lib/prettyprint.rb#367 - def indent; end - - # Holds the separator String - # - # The +sep+ argument from ::new - # - # source://prettyprint//lib/prettyprint.rb#359 - def obj; end - - # Render the String text of the objects that have been added to this - # Breakable object. - # - # Output the text to +out+, and increment the width to +output_width+ - # - # source://prettyprint//lib/prettyprint.rb#373 - def output(out, output_width); end - - # The width of +obj+ / +sep+ - # - # source://prettyprint//lib/prettyprint.rb#362 - def width; end -end - -# The Group class is used for making indentation easier. -# -# While this class does neither the breaking into newlines nor indentation, -# it is used in a stack (as well as a queue) within PrettyPrint, to group -# objects. -# -# For information on using groups, see PrettyPrint#group -# -# This class is intended for internal use of the PrettyPrint buffers. -class PrettyPrint::Group - # Create a Group object - # - # Arguments: - # * +depth+ - this group's relation to previous groups - # - # @return [Group] a new instance of Group - # - # source://prettyprint//lib/prettyprint.rb#401 - def initialize(depth); end - - # Makes a break for this Group, and returns true - # - # source://prettyprint//lib/prettyprint.rb#414 - def break; end - - # Boolean of whether this Group has made a break - # - # @return [Boolean] - # - # source://prettyprint//lib/prettyprint.rb#419 - def break?; end - - # Array to hold the Breakable objects for this Group - # - # source://prettyprint//lib/prettyprint.rb#411 - def breakables; end - - # This group's relation to previous groups - # - # source://prettyprint//lib/prettyprint.rb#408 - def depth; end - - # Boolean of whether this Group has been queried for being first - # - # This is used as a predicate, and ought to be called first. - # - # @return [Boolean] - # - # source://prettyprint//lib/prettyprint.rb#426 - def first?; end -end - -# The GroupQueue class is used for managing the queue of Group to be pretty -# printed. -# -# This queue groups the Group objects, based on their depth. -# -# This class is intended for internal use of the PrettyPrint buffers. -class PrettyPrint::GroupQueue - # Create a GroupQueue object - # - # Arguments: - # * +groups+ - one or more PrettyPrint::Group objects - # - # @return [GroupQueue] a new instance of GroupQueue - # - # source://prettyprint//lib/prettyprint.rb#447 - def initialize(*groups); end - - # Remote +group+ from this queue - # - # source://prettyprint//lib/prettyprint.rb#479 - def delete(group); end - - # Returns the outer group of the queue - # - # source://prettyprint//lib/prettyprint.rb#463 - def deq; end - - # Enqueue +group+ - # - # This does not strictly append the group to the end of the queue, - # but instead adds it in line, base on the +group.depth+ - # - # source://prettyprint//lib/prettyprint.rb#456 - def enq(group); end -end - -# PrettyPrint::SingleLine is used by PrettyPrint.singleline_format -# -# It is passed to be similar to a PrettyPrint object itself, by responding to: -# * #text -# * #breakable -# * #nest -# * #group -# * #flush -# * #first? -# -# but instead, the output has no line breaks -class PrettyPrint::SingleLine - # Create a PrettyPrint::SingleLine object - # - # Arguments: - # * +output+ - String (or similar) to store rendered text. Needs to respond to '<<' - # * +maxwidth+ - Argument position expected to be here for compatibility. - # This argument is a noop. - # * +newline+ - Argument position expected to be here for compatibility. - # This argument is a noop. - # - # @return [SingleLine] a new instance of SingleLine - # - # source://prettyprint//lib/prettyprint.rb#505 - def initialize(output, maxwidth = T.unsafe(nil), newline = T.unsafe(nil)); end - - # Appends +sep+ to the text to be output. By default +sep+ is ' ' - # - # +width+ argument is here for compatibility. It is a noop argument. - # - # source://prettyprint//lib/prettyprint.rb#520 - def breakable(sep = T.unsafe(nil), width = T.unsafe(nil)); end - - # This is used as a predicate, and ought to be called first. - # - # @return [Boolean] - # - # source://prettyprint//lib/prettyprint.rb#552 - def first?; end - - # Method present for compatibility, but is a noop - # - # source://prettyprint//lib/prettyprint.rb#548 - def flush; end - - # Opens a block for grouping objects to be pretty printed. - # - # Arguments: - # * +indent+ - noop argument. Present for compatibility. - # * +open_obj+ - text appended before the &blok. Default is '' - # * +close_obj+ - text appended after the &blok. Default is '' - # * +open_width+ - noop argument. Present for compatibility. - # * +close_width+ - noop argument. Present for compatibility. - # - # source://prettyprint//lib/prettyprint.rb#539 - def group(indent = T.unsafe(nil), open_obj = T.unsafe(nil), close_obj = T.unsafe(nil), open_width = T.unsafe(nil), close_width = T.unsafe(nil)); end - - # Takes +indent+ arg, but does nothing with it. - # - # Yields to a block. - # - # source://prettyprint//lib/prettyprint.rb#527 - def nest(indent); end - - # Add +obj+ to the text to be output. - # - # +width+ argument is here for compatibility. It is a noop argument. - # - # source://prettyprint//lib/prettyprint.rb#513 - def text(obj, width = T.unsafe(nil)); end -end - -# The Text class is the means by which to collect strings from objects. -# -# This class is intended for internal use of the PrettyPrint buffers. -class PrettyPrint::Text - # Creates a new text object. - # - # This constructor takes no arguments. - # - # The workflow is to append a PrettyPrint::Text object to the buffer, and - # being able to call the buffer.last() to reference it. - # - # As there are objects, use PrettyPrint::Text#add to include the objects - # and the width to utilized by the String version of this object. - # - # @return [Text] a new instance of Text - # - # source://prettyprint//lib/prettyprint.rb#312 - def initialize; end - - # Include +obj+ in the objects to be pretty printed, and increment - # this Text object's total width by +width+ - # - # source://prettyprint//lib/prettyprint.rb#330 - def add(obj, width); end - - # Render the String text of the objects that have been added to this Text object. - # - # Output the text to +out+, and increment the width to +output_width+ - # - # source://prettyprint//lib/prettyprint.rb#323 - def output(out, output_width); end - - # The total width of the objects included in this Text object. - # - # source://prettyprint//lib/prettyprint.rb#318 - def width; end -end - -# source://prettyprint//lib/prettyprint.rb#36 -PrettyPrint::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/prism@1.4.0.rbi b/sorbet/rbi/gems/prism@1.9.0.rbi similarity index 69% rename from sorbet/rbi/gems/prism@1.4.0.rbi rename to sorbet/rbi/gems/prism@1.9.0.rbi index 5a92b9d..5b67e31 100644 --- a/sorbet/rbi/gems/prism@1.4.0.rbi +++ b/sorbet/rbi/gems/prism@1.9.0.rbi @@ -29,117 +29,197 @@ module Parser; end class Parser::Base; end +# pkg:gem/prism#lib/prism/translation/parser.rb:30 +class Parser::Diagnostic; end + # The Prism Ruby parser. # # "Parsing Ruby is suddenly manageable!" # - You, hopefully # -# source://prism//lib/prism.rb#8 +# =begin +# -- +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/prism/compiler.rb.erb +# if you are looking to modify the template +# ++ +# =end +# :markup: markdown +# =begin +# -- +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/prism/dispatcher.rb.erb +# if you are looking to modify the template +# ++ +# =end +# =begin +# -- +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/prism/dsl.rb.erb +# if you are looking to modify the template +# ++ +# =end +# =begin +# -- +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/prism/inspect_visitor.rb.erb +# if you are looking to modify the template +# ++ +# =end +# =begin +# -- +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/prism/mutation_compiler.rb.erb +# if you are looking to modify the template +# ++ +# =end +# =begin +# -- +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/prism/node.rb.erb +# if you are looking to modify the template +# ++ +# =end +# -- +# Here we are reopening the prism module to provide methods on nodes that aren't +# templated and are meant as convenience methods. +# ++ +# +# =begin +# -- +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/prism/reflection.rb.erb +# if you are looking to modify the template +# ++ +# =end +# =begin +# -- +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/prism/visitor.rb.erb +# if you are looking to modify the template +# ++ +# =end +# +# pkg:gem/prism#lib/prism.rb:9 module Prism class << self # Mirror the Prism.dump API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 def dump(*_arg0); end # Mirror the Prism.dump_file API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 def dump_file(*_arg0); end # Mirror the Prism.lex API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 def lex(*_arg0); end # :call-seq: # Prism::lex_compat(source, **options) -> LexCompat::Result # # Returns a parse result whose value is an array of tokens that closely - # resembles the return value of Ripper::lex. The main difference is that the - # `:on_sp` token is not emitted. + # resembles the return value of Ripper::lex. # # For supported options, see Prism::parse. # - # source://prism//lib/prism.rb#47 + # pkg:gem/prism#lib/prism.rb:65 sig { params(source: String, options: T::Hash[Symbol, T.untyped]).returns(Prism::LexCompat::Result) } def lex_compat(source, **options); end # Mirror the Prism.lex_file API by using the serialization API. - def lex_file(*_arg0); end - - # :call-seq: - # Prism::lex_ripper(source) -> Array # - # This lexes with the Ripper lex. It drops any space events but otherwise - # returns the same tokens. Raises SyntaxError if the syntax in source is - # invalid. - # - # source://prism//lib/prism.rb#57 - sig { params(source: String).returns(T::Array[T.untyped]) } - def lex_ripper(source); end + # pkg:gem/prism#lib/prism.rb:92 + def lex_file(*_arg0); end # :call-seq: # Prism::load(source, serialized, freeze) -> ParseResult # # Load the serialized AST using the source as a reference into a tree. # - # source://prism//lib/prism.rb#65 + # pkg:gem/prism#lib/prism.rb:73 sig { params(source: String, serialized: String, freeze: T.nilable(T::Boolean)).returns(Prism::ParseResult) } - def load(source, serialized, freeze = T.unsafe(nil)); end + def load(source, serialized, freeze = false); end # Mirror the Prism.parse API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 def parse(*_arg0); end # Mirror the Prism.parse_comments API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 def parse_comments(*_arg0); end # Mirror the Prism.parse_failure? API by using the serialization API. # - # @return [Boolean] + # pkg:gem/prism#lib/prism.rb:92 def parse_failure?(*_arg0); end # Mirror the Prism.parse_file API by using the serialization API. This uses # native strings instead of Ruby strings because it allows us to use mmap # when it is available. + # + # pkg:gem/prism#lib/prism.rb:92 def parse_file(*_arg0); end # Mirror the Prism.parse_file_comments API by using the serialization # API. This uses native strings instead of Ruby strings because it allows us # to use mmap when it is available. + # + # pkg:gem/prism#lib/prism.rb:92 def parse_file_comments(*_arg0); end # Mirror the Prism.parse_file_failure? API by using the serialization API. # - # @return [Boolean] + # pkg:gem/prism#lib/prism.rb:92 def parse_file_failure?(*_arg0); end # Mirror the Prism.parse_file_success? API by using the serialization API. # - # @return [Boolean] + # pkg:gem/prism#lib/prism.rb:92 def parse_file_success?(*_arg0); end # Mirror the Prism.parse_lex API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 def parse_lex(*_arg0); end # Mirror the Prism.parse_lex_file API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 def parse_lex_file(*_arg0); end # Mirror the Prism.parse_stream API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 def parse_stream(*_arg0); end # Mirror the Prism.parse_success? API by using the serialization API. # - # @return [Boolean] + # pkg:gem/prism#lib/prism.rb:92 def parse_success?(*_arg0); end # Mirror the Prism.profile API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 def profile(*_arg0); end # Mirror the Prism.profile_file API by using the serialization API. + # + # pkg:gem/prism#lib/prism.rb:92 def profile_file(*_arg0); end # Create a new scope with the given locals and forwarding options that is # suitable for passing into one of the Prism.* methods that accepts the # `scopes` option. # - # source://prism//lib/prism/parse_result.rb#907 + # pkg:gem/prism#lib/prism/parse_result.rb:904 sig { params(locals: T::Array[Symbol], forwarding: T::Array[Symbol]).returns(Prism::Scope) } - def scope(locals: T.unsafe(nil), forwarding: T.unsafe(nil)); end + def scope(locals: [], forwarding: []); end end end @@ -152,17 +232,17 @@ end # eagerly converted to UTF-8, this class will be used as well. This is because # at that point we will treat everything as single-byte characters. # -# source://prism//lib/prism/parse_result.rb#253 +# pkg:gem/prism#lib/prism/parse_result.rb:250 class Prism::ASCIISource < ::Prism::Source # Return the column number in characters for the given byte offset. # - # source://prism//lib/prism/parse_result.rb#260 + # pkg:gem/prism#lib/prism/parse_result.rb:257 sig { params(byte_offset: Integer).returns(Integer) } def character_column(byte_offset); end # Return the character offset for the given byte offset. # - # source://prism//lib/prism/parse_result.rb#255 + # pkg:gem/prism#lib/prism/parse_result.rb:252 sig { params(byte_offset: Integer).returns(Integer) } def character_offset(byte_offset); end @@ -170,7 +250,7 @@ class Prism::ASCIISource < ::Prism::Source # same interface. We can do this because code units are always equivalent to # byte offsets for ASCII-only sources. # - # source://prism//lib/prism/parse_result.rb#277 + # pkg:gem/prism#lib/prism/parse_result.rb:274 sig do params( encoding: Encoding @@ -182,7 +262,7 @@ class Prism::ASCIISource < ::Prism::Source # `code_units_offset`, which is a more expensive operation. This is # essentially the same as `Prism::Source#column`. # - # source://prism//lib/prism/parse_result.rb#284 + # pkg:gem/prism#lib/prism/parse_result.rb:281 sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } def code_units_column(byte_offset, encoding); end @@ -193,7 +273,7 @@ class Prism::ASCIISource < ::Prism::Source # concept of code units that differs from the number of characters in other # encodings, it is not captured here. # - # source://prism//lib/prism/parse_result.rb#270 + # pkg:gem/prism#lib/prism/parse_result.rb:267 sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } def code_units_offset(byte_offset, encoding); end end @@ -203,13 +283,11 @@ end # alias $foo $bar # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#316 +# pkg:gem/prism#lib/prism/node.rb:334 class Prism::AliasGlobalVariableNode < ::Prism::Node # Initialize a new AliasGlobalVariableNode node. # - # @return [AliasGlobalVariableNode] a new instance of AliasGlobalVariableNode - # - # source://prism//lib/prism/node.rb#318 + # pkg:gem/prism#lib/prism/node.rb:336 sig do params( source: Prism::Source, @@ -226,36 +304,36 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#411 + # pkg:gem/prism#lib/prism/node.rb:437 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#329 + # pkg:gem/prism#lib/prism/node.rb:347 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#334 + # pkg:gem/prism#lib/prism/node.rb:352 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#344 + # pkg:gem/prism#lib/prism/node.rb:370 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#339 + # pkg:gem/prism#lib/prism/node.rb:365 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?new_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode, ?old_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | SymbolNode | MissingNode, ?keyword_loc: Location) -> AliasGlobalVariableNode # - # source://prism//lib/prism/node.rb#349 + # pkg:gem/prism#lib/prism/node.rb:375 sig do params( node_id: Integer, @@ -266,33 +344,37 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node keyword_loc: Prism::Location ).returns(Prism::AliasGlobalVariableNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, new_name: self.new_name, old_name: self.old_name, keyword_loc: self.keyword_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#334 + # pkg:gem/prism#lib/prism/node.rb:380 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, new_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode, old_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | SymbolNode | MissingNode, keyword_loc: Location } # - # source://prism//lib/prism/node.rb#357 + # pkg:gem/prism#lib/prism/node.rb:383 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:357 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#395 + # pkg:gem/prism#lib/prism/node.rb:421 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#390 + # pkg:gem/prism#lib/prism/node.rb:416 sig { returns(String) } def keyword; end @@ -301,7 +383,7 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # alias $foo $bar # ^^^^^ # - # source://prism//lib/prism/node.rb#377 + # pkg:gem/prism#lib/prism/node.rb:403 sig { returns(Prism::Location) } def keyword_loc; end @@ -310,7 +392,7 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # alias $foo $bar # ^^^^ # - # source://prism//lib/prism/node.rb#365 + # pkg:gem/prism#lib/prism/node.rb:391 sig { returns(T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)) } def new_name; end @@ -319,7 +401,7 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # alias $foo $bar # ^^^^ # - # source://prism//lib/prism/node.rb#371 + # pkg:gem/prism#lib/prism/node.rb:397 sig do returns(T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode)) end @@ -328,19 +410,19 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#385 + # pkg:gem/prism#lib/prism/node.rb:411 def save_keyword_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#400 + # pkg:gem/prism#lib/prism/node.rb:426 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#405 + # pkg:gem/prism#lib/prism/node.rb:431 def type; end end end @@ -350,13 +432,11 @@ end # alias foo bar # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#423 +# pkg:gem/prism#lib/prism/node.rb:449 class Prism::AliasMethodNode < ::Prism::Node # Initialize a new AliasMethodNode node. # - # @return [AliasMethodNode] a new instance of AliasMethodNode - # - # source://prism//lib/prism/node.rb#425 + # pkg:gem/prism#lib/prism/node.rb:451 sig do params( source: Prism::Source, @@ -373,36 +453,36 @@ class Prism::AliasMethodNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#530 + # pkg:gem/prism#lib/prism/node.rb:564 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#436 + # pkg:gem/prism#lib/prism/node.rb:462 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#441 + # pkg:gem/prism#lib/prism/node.rb:467 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#451 + # pkg:gem/prism#lib/prism/node.rb:485 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#446 + # pkg:gem/prism#lib/prism/node.rb:480 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?new_name: SymbolNode | InterpolatedSymbolNode, ?old_name: SymbolNode | InterpolatedSymbolNode | GlobalVariableReadNode | MissingNode, ?keyword_loc: Location) -> AliasMethodNode # - # source://prism//lib/prism/node.rb#456 + # pkg:gem/prism#lib/prism/node.rb:490 sig do params( node_id: Integer, @@ -413,33 +493,37 @@ class Prism::AliasMethodNode < ::Prism::Node keyword_loc: Prism::Location ).returns(Prism::AliasMethodNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, new_name: self.new_name, old_name: self.old_name, keyword_loc: self.keyword_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#441 + # pkg:gem/prism#lib/prism/node.rb:495 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, new_name: SymbolNode | InterpolatedSymbolNode, old_name: SymbolNode | InterpolatedSymbolNode | GlobalVariableReadNode | MissingNode, keyword_loc: Location } # - # source://prism//lib/prism/node.rb#464 + # pkg:gem/prism#lib/prism/node.rb:498 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:472 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#514 + # pkg:gem/prism#lib/prism/node.rb:548 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#509 + # pkg:gem/prism#lib/prism/node.rb:543 sig { returns(String) } def keyword; end @@ -448,7 +532,7 @@ class Prism::AliasMethodNode < ::Prism::Node # alias foo bar # ^^^^^ # - # source://prism//lib/prism/node.rb#496 + # pkg:gem/prism#lib/prism/node.rb:530 sig { returns(Prism::Location) } def keyword_loc; end @@ -463,7 +547,7 @@ class Prism::AliasMethodNode < ::Prism::Node # alias :"#{foo}" :"#{bar}" # ^^^^^^^^^ # - # source://prism//lib/prism/node.rb#478 + # pkg:gem/prism#lib/prism/node.rb:512 sig { returns(T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)) } def new_name; end @@ -478,7 +562,7 @@ class Prism::AliasMethodNode < ::Prism::Node # alias :"#{foo}" :"#{bar}" # ^^^^^^^^^ # - # source://prism//lib/prism/node.rb#490 + # pkg:gem/prism#lib/prism/node.rb:524 sig do returns(T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode)) end @@ -487,19 +571,19 @@ class Prism::AliasMethodNode < ::Prism::Node # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#504 + # pkg:gem/prism#lib/prism/node.rb:538 def save_keyword_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#519 + # pkg:gem/prism#lib/prism/node.rb:553 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#524 + # pkg:gem/prism#lib/prism/node.rb:558 def type; end end end @@ -509,13 +593,11 @@ end # foo => bar | baz # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#542 +# pkg:gem/prism#lib/prism/node.rb:576 class Prism::AlternationPatternNode < ::Prism::Node # Initialize a new AlternationPatternNode node. # - # @return [AlternationPatternNode] a new instance of AlternationPatternNode - # - # source://prism//lib/prism/node.rb#544 + # pkg:gem/prism#lib/prism/node.rb:578 sig do params( source: Prism::Source, @@ -532,36 +614,36 @@ class Prism::AlternationPatternNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#637 + # pkg:gem/prism#lib/prism/node.rb:679 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#555 + # pkg:gem/prism#lib/prism/node.rb:589 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#560 + # pkg:gem/prism#lib/prism/node.rb:594 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#570 + # pkg:gem/prism#lib/prism/node.rb:612 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#565 + # pkg:gem/prism#lib/prism/node.rb:607 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node, ?right: Prism::node, ?operator_loc: Location) -> AlternationPatternNode # - # source://prism//lib/prism/node.rb#575 + # pkg:gem/prism#lib/prism/node.rb:617 sig do params( node_id: Integer, @@ -572,27 +654,31 @@ class Prism::AlternationPatternNode < ::Prism::Node operator_loc: Prism::Location ).returns(Prism::AlternationPatternNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, left: self.left, right: self.right, operator_loc: self.operator_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#560 + # pkg:gem/prism#lib/prism/node.rb:622 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#583 + # pkg:gem/prism#lib/prism/node.rb:625 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:599 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#621 + # pkg:gem/prism#lib/prism/node.rb:663 sig { override.returns(String) } def inspect; end @@ -601,13 +687,13 @@ class Prism::AlternationPatternNode < ::Prism::Node # foo => bar | baz # ^^^ # - # source://prism//lib/prism/node.rb#591 + # pkg:gem/prism#lib/prism/node.rb:633 sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#616 + # pkg:gem/prism#lib/prism/node.rb:658 sig { returns(String) } def operator; end @@ -616,7 +702,7 @@ class Prism::AlternationPatternNode < ::Prism::Node # foo => bar | baz # ^ # - # source://prism//lib/prism/node.rb#603 + # pkg:gem/prism#lib/prism/node.rb:645 sig { returns(Prism::Location) } def operator_loc; end @@ -625,26 +711,26 @@ class Prism::AlternationPatternNode < ::Prism::Node # foo => bar | baz # ^^^ # - # source://prism//lib/prism/node.rb#597 + # pkg:gem/prism#lib/prism/node.rb:639 sig { returns(Prism::Node) } def right; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#611 + # pkg:gem/prism#lib/prism/node.rb:653 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#626 + # pkg:gem/prism#lib/prism/node.rb:668 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#631 + # pkg:gem/prism#lib/prism/node.rb:673 def type; end end end @@ -654,13 +740,11 @@ end # left and right # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#649 +# pkg:gem/prism#lib/prism/node.rb:691 class Prism::AndNode < ::Prism::Node # Initialize a new AndNode node. # - # @return [AndNode] a new instance of AndNode - # - # source://prism//lib/prism/node.rb#651 + # pkg:gem/prism#lib/prism/node.rb:693 sig do params( source: Prism::Source, @@ -677,36 +761,36 @@ class Prism::AndNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#750 + # pkg:gem/prism#lib/prism/node.rb:800 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#662 + # pkg:gem/prism#lib/prism/node.rb:704 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#667 + # pkg:gem/prism#lib/prism/node.rb:709 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#677 + # pkg:gem/prism#lib/prism/node.rb:727 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#672 + # pkg:gem/prism#lib/prism/node.rb:722 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node, ?right: Prism::node, ?operator_loc: Location) -> AndNode # - # source://prism//lib/prism/node.rb#682 + # pkg:gem/prism#lib/prism/node.rb:732 sig do params( node_id: Integer, @@ -717,27 +801,31 @@ class Prism::AndNode < ::Prism::Node operator_loc: Prism::Location ).returns(Prism::AndNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, left: self.left, right: self.right, operator_loc: self.operator_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#667 + # pkg:gem/prism#lib/prism/node.rb:737 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#690 + # pkg:gem/prism#lib/prism/node.rb:740 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:714 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#734 + # pkg:gem/prism#lib/prism/node.rb:784 sig { override.returns(String) } def inspect; end @@ -749,13 +837,13 @@ class Prism::AndNode < ::Prism::Node # 1 && 2 # ^ # - # source://prism//lib/prism/node.rb#701 + # pkg:gem/prism#lib/prism/node.rb:751 sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#729 + # pkg:gem/prism#lib/prism/node.rb:779 sig { returns(String) } def operator; end @@ -764,7 +852,7 @@ class Prism::AndNode < ::Prism::Node # left and right # ^^^ # - # source://prism//lib/prism/node.rb#716 + # pkg:gem/prism#lib/prism/node.rb:766 sig { returns(Prism::Location) } def operator_loc; end @@ -776,26 +864,26 @@ class Prism::AndNode < ::Prism::Node # 1 and 2 # ^ # - # source://prism//lib/prism/node.rb#710 + # pkg:gem/prism#lib/prism/node.rb:760 sig { returns(Prism::Node) } def right; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#724 + # pkg:gem/prism#lib/prism/node.rb:774 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#739 + # pkg:gem/prism#lib/prism/node.rb:789 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#744 + # pkg:gem/prism#lib/prism/node.rb:794 def type; end end end @@ -805,13 +893,11 @@ end # return foo, bar, baz # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#762 +# pkg:gem/prism#lib/prism/node.rb:812 class Prism::ArgumentsNode < ::Prism::Node # Initialize a new ArgumentsNode node. # - # @return [ArgumentsNode] a new instance of ArgumentsNode - # - # source://prism//lib/prism/node.rb#764 + # pkg:gem/prism#lib/prism/node.rb:814 sig do params( source: Prism::Source, @@ -826,12 +912,12 @@ class Prism::ArgumentsNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#853 + # pkg:gem/prism#lib/prism/node.rb:910 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#773 + # pkg:gem/prism#lib/prism/node.rb:823 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -840,71 +926,61 @@ class Prism::ArgumentsNode < ::Prism::Node # foo(bar, baz) # ^^^^^^^^ # - # source://prism//lib/prism/node.rb#834 + # pkg:gem/prism#lib/prism/node.rb:891 sig { returns(T::Array[Prism::Node]) } def arguments; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#778 + # pkg:gem/prism#lib/prism/node.rb:828 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#788 + # pkg:gem/prism#lib/prism/node.rb:845 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#783 + # pkg:gem/prism#lib/prism/node.rb:840 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def contains_forwarding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#806 + # pkg:gem/prism#lib/prism/node.rb:863 sig { returns(T::Boolean) } def contains_forwarding?; end # def contains_keyword_splat?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#816 + # pkg:gem/prism#lib/prism/node.rb:873 sig { returns(T::Boolean) } def contains_keyword_splat?; end # def contains_keywords?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#811 + # pkg:gem/prism#lib/prism/node.rb:868 sig { returns(T::Boolean) } def contains_keywords?; end # def contains_multiple_splats?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#826 + # pkg:gem/prism#lib/prism/node.rb:883 sig { returns(T::Boolean) } def contains_multiple_splats?; end # def contains_splat?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#821 + # pkg:gem/prism#lib/prism/node.rb:878 sig { returns(T::Boolean) } def contains_splat?; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?arguments: Array[Prism::node]) -> ArgumentsNode # - # source://prism//lib/prism/node.rb#793 + # pkg:gem/prism#lib/prism/node.rb:850 sig do params( node_id: Integer, @@ -913,72 +989,76 @@ class Prism::ArgumentsNode < ::Prism::Node arguments: T::Array[Prism::Node] ).returns(Prism::ArgumentsNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, arguments: self.arguments); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#778 + # pkg:gem/prism#lib/prism/node.rb:855 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: Array[Prism::node] } # - # source://prism//lib/prism/node.rb#801 + # pkg:gem/prism#lib/prism/node.rb:858 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:833 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#837 + # pkg:gem/prism#lib/prism/node.rb:894 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#842 + # pkg:gem/prism#lib/prism/node.rb:899 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#847 + # pkg:gem/prism#lib/prism/node.rb:904 def type; end end end # Flags for arguments nodes. # -# source://prism//lib/prism/node.rb#18459 +# pkg:gem/prism#lib/prism/node.rb:19780 module Prism::ArgumentsNodeFlags; end # if the arguments contain forwarding # -# source://prism//lib/prism/node.rb#18461 +# pkg:gem/prism#lib/prism/node.rb:19782 Prism::ArgumentsNodeFlags::CONTAINS_FORWARDING = T.let(T.unsafe(nil), Integer) # if the arguments contain keywords # -# source://prism//lib/prism/node.rb#18464 +# pkg:gem/prism#lib/prism/node.rb:19785 Prism::ArgumentsNodeFlags::CONTAINS_KEYWORDS = T.let(T.unsafe(nil), Integer) # if the arguments contain a keyword splat # -# source://prism//lib/prism/node.rb#18467 +# pkg:gem/prism#lib/prism/node.rb:19788 Prism::ArgumentsNodeFlags::CONTAINS_KEYWORD_SPLAT = T.let(T.unsafe(nil), Integer) # if the arguments contain multiple splats # -# source://prism//lib/prism/node.rb#18473 +# pkg:gem/prism#lib/prism/node.rb:19794 Prism::ArgumentsNodeFlags::CONTAINS_MULTIPLE_SPLATS = T.let(T.unsafe(nil), Integer) # if the arguments contain a splat # -# source://prism//lib/prism/node.rb#18470 +# pkg:gem/prism#lib/prism/node.rb:19791 Prism::ArgumentsNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) # Represents an array literal. This can be a regular array using brackets or a special array using % like %w or %i. @@ -986,13 +1066,11 @@ Prism::ArgumentsNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) # [1, 2, 3] # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#865 +# pkg:gem/prism#lib/prism/node.rb:922 class Prism::ArrayNode < ::Prism::Node # Initialize a new ArrayNode node. # - # @return [ArrayNode] a new instance of ArrayNode - # - # source://prism//lib/prism/node.rb#867 + # pkg:gem/prism#lib/prism/node.rb:924 sig do params( source: Prism::Source, @@ -1009,24 +1087,24 @@ class Prism::ArrayNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#993 + # pkg:gem/prism#lib/prism/node.rb:1057 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#878 + # pkg:gem/prism#lib/prism/node.rb:935 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#883 + # pkg:gem/prism#lib/prism/node.rb:940 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#972 + # pkg:gem/prism#lib/prism/node.rb:1036 sig { returns(T.nilable(String)) } def closing; end @@ -1037,33 +1115,31 @@ class Prism::ArrayNode < ::Prism::Node # %I(apple orange banana) # ")" # foo = 1, 2, 3 # nil # - # source://prism//lib/prism/node.rb#948 + # pkg:gem/prism#lib/prism/node.rb:1012 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#893 + # pkg:gem/prism#lib/prism/node.rb:957 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#888 + # pkg:gem/prism#lib/prism/node.rb:952 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def contains_splat?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#911 + # pkg:gem/prism#lib/prism/node.rb:975 sig { returns(T::Boolean) } def contains_splat?; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?elements: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?) -> ArrayNode # - # source://prism//lib/prism/node.rb#898 + # pkg:gem/prism#lib/prism/node.rb:962 sig do params( node_id: Integer, @@ -1074,24 +1150,28 @@ class Prism::ArrayNode < ::Prism::Node closing_loc: T.nilable(Prism::Location) ).returns(Prism::ArrayNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), elements: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, elements: self.elements, opening_loc: self.opening_loc, closing_loc: self.closing_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#883 + # pkg:gem/prism#lib/prism/node.rb:967 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, elements: Array[Prism::node], opening_loc: Location?, closing_loc: Location? } # - # source://prism//lib/prism/node.rb#906 + # pkg:gem/prism#lib/prism/node.rb:970 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:945 + def each_child_node; end + # Represent the list of zero or more [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression) within the array. # - # source://prism//lib/prism/node.rb#916 + # pkg:gem/prism#lib/prism/node.rb:980 sig { returns(T::Array[Prism::Node]) } def elements; end @@ -1100,13 +1180,13 @@ class Prism::ArrayNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#977 + # pkg:gem/prism#lib/prism/node.rb:1041 sig { override.returns(String) } def inspect; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#967 + # pkg:gem/prism#lib/prism/node.rb:1031 sig { returns(T.nilable(String)) } def opening; end @@ -1117,44 +1197,44 @@ class Prism::ArrayNode < ::Prism::Node # %I(apple orange banana) # "%I(" # foo = 1, 2, 3 # nil # - # source://prism//lib/prism/node.rb#924 + # pkg:gem/prism#lib/prism/node.rb:988 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#962 + # pkg:gem/prism#lib/prism/node.rb:1026 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#938 + # pkg:gem/prism#lib/prism/node.rb:1002 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#982 + # pkg:gem/prism#lib/prism/node.rb:1046 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#987 + # pkg:gem/prism#lib/prism/node.rb:1051 def type; end end end # Flags for array nodes. # -# source://prism//lib/prism/node.rb#18477 +# pkg:gem/prism#lib/prism/node.rb:19798 module Prism::ArrayNodeFlags; end # if array contains splat nodes # -# source://prism//lib/prism/node.rb#18479 +# pkg:gem/prism#lib/prism/node.rb:19800 Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) # Represents an array pattern in pattern matching. @@ -1174,20 +1254,18 @@ Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) # foo in Bar[1, 2, 3] # ^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#1019 +# pkg:gem/prism#lib/prism/node.rb:1083 class Prism::ArrayPatternNode < ::Prism::Node # Initialize a new ArrayPatternNode node. # - # @return [ArrayPatternNode] a new instance of ArrayPatternNode - # - # source://prism//lib/prism/node.rb#1021 + # pkg:gem/prism#lib/prism/node.rb:1085 sig do params( source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, - constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + constant: T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode)), requireds: T::Array[Prism::Node], rest: T.nilable(Prism::Node), posts: T::Array[Prism::Node], @@ -1200,24 +1278,24 @@ class Prism::ArrayPatternNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1164 + # pkg:gem/prism#lib/prism/node.rb:1247 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1035 + # pkg:gem/prism#lib/prism/node.rb:1099 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1040 + # pkg:gem/prism#lib/prism/node.rb:1104 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#1143 + # pkg:gem/prism#lib/prism/node.rb:1226 sig { returns(T.nilable(String)) } def closing; end @@ -1226,37 +1304,46 @@ class Prism::ArrayPatternNode < ::Prism::Node # foo in [1, 2] # ^ # - # source://prism//lib/prism/node.rb#1119 + # pkg:gem/prism#lib/prism/node.rb:1202 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1055 + # pkg:gem/prism#lib/prism/node.rb:1129 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1045 + # pkg:gem/prism#lib/prism/node.rb:1119 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader constant: ConstantReadNode | ConstantPathNode | nil + # Represents the optional constant preceding the Array # - # source://prism//lib/prism/node.rb#1073 - sig { returns(T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode))) } + # foo in Bar[] + # ^^^ + # + # foo in Bar[1, 2, 3] + # ^^^ + # + # foo in Bar::Baz[1, 2, 3] + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:1156 + sig { returns(T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode))) } def constant; end - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantReadNode | ConstantPathNode | nil, ?requireds: Array[Prism::node], ?rest: Prism::node?, ?posts: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?) -> ArrayPatternNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantPathNode | ConstantReadNode | nil, ?requireds: Array[Prism::node], ?rest: Prism::node?, ?posts: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?) -> ArrayPatternNode # - # source://prism//lib/prism/node.rb#1060 + # pkg:gem/prism#lib/prism/node.rb:1134 sig do params( node_id: Integer, location: Prism::Location, flags: Integer, - constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + constant: T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode)), requireds: T::Array[Prism::Node], rest: T.nilable(Prism::Node), posts: T::Array[Prism::Node], @@ -1264,33 +1351,37 @@ class Prism::ArrayPatternNode < ::Prism::Node closing_loc: T.nilable(Prism::Location) ).returns(Prism::ArrayPatternNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), requireds: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, constant: self.constant, requireds: self.requireds, rest: self.rest, posts: self.posts, opening_loc: self.opening_loc, closing_loc: self.closing_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1040 + # pkg:gem/prism#lib/prism/node.rb:1139 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantReadNode | ConstantPathNode | nil, requireds: Array[Prism::node], rest: Prism::node?, posts: Array[Prism::node], opening_loc: Location?, closing_loc: Location? } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantPathNode | ConstantReadNode | nil, requireds: Array[Prism::node], rest: Prism::node?, posts: Array[Prism::node], opening_loc: Location?, closing_loc: Location? } # - # source://prism//lib/prism/node.rb#1068 + # pkg:gem/prism#lib/prism/node.rb:1142 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:1109 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#1148 + # pkg:gem/prism#lib/prism/node.rb:1231 sig { override.returns(String) } def inspect; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#1138 + # pkg:gem/prism#lib/prism/node.rb:1221 sig { returns(T.nilable(String)) } def opening; end @@ -1299,7 +1390,7 @@ class Prism::ArrayPatternNode < ::Prism::Node # foo in [1, 2] # ^ # - # source://prism//lib/prism/node.rb#1097 + # pkg:gem/prism#lib/prism/node.rb:1180 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -1308,7 +1399,7 @@ class Prism::ArrayPatternNode < ::Prism::Node # foo in *bar, baz # ^^^ # - # source://prism//lib/prism/node.rb#1091 + # pkg:gem/prism#lib/prism/node.rb:1174 sig { returns(T::Array[Prism::Node]) } def posts; end @@ -1317,7 +1408,7 @@ class Prism::ArrayPatternNode < ::Prism::Node # foo in [1, 2] # ^ ^ # - # source://prism//lib/prism/node.rb#1079 + # pkg:gem/prism#lib/prism/node.rb:1162 sig { returns(T::Array[Prism::Node]) } def requireds; end @@ -1326,32 +1417,32 @@ class Prism::ArrayPatternNode < ::Prism::Node # foo in *bar # ^^^^ # - # source://prism//lib/prism/node.rb#1085 + # pkg:gem/prism#lib/prism/node.rb:1168 sig { returns(T.nilable(Prism::Node)) } def rest; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#1133 + # pkg:gem/prism#lib/prism/node.rb:1216 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#1111 + # pkg:gem/prism#lib/prism/node.rb:1194 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#1153 + # pkg:gem/prism#lib/prism/node.rb:1236 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#1158 + # pkg:gem/prism#lib/prism/node.rb:1241 def type; end end end @@ -1361,13 +1452,11 @@ end # { a => b } # ^^^^^^ # -# source://prism//lib/prism/node.rb#1181 +# pkg:gem/prism#lib/prism/node.rb:1264 class Prism::AssocNode < ::Prism::Node # Initialize a new AssocNode node. # - # @return [AssocNode] a new instance of AssocNode - # - # source://prism//lib/prism/node.rb#1183 + # pkg:gem/prism#lib/prism/node.rb:1266 sig do params( source: Prism::Source, @@ -1384,36 +1473,36 @@ class Prism::AssocNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1291 + # pkg:gem/prism#lib/prism/node.rb:1382 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1194 + # pkg:gem/prism#lib/prism/node.rb:1277 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1199 + # pkg:gem/prism#lib/prism/node.rb:1282 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1209 + # pkg:gem/prism#lib/prism/node.rb:1300 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1204 + # pkg:gem/prism#lib/prism/node.rb:1295 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?key: Prism::node, ?value: Prism::node, ?operator_loc: Location?) -> AssocNode # - # source://prism//lib/prism/node.rb#1214 + # pkg:gem/prism#lib/prism/node.rb:1305 sig do params( node_id: Integer, @@ -1424,27 +1513,31 @@ class Prism::AssocNode < ::Prism::Node operator_loc: T.nilable(Prism::Location) ).returns(Prism::AssocNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), key: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, key: self.key, value: self.value, operator_loc: self.operator_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1199 + # pkg:gem/prism#lib/prism/node.rb:1310 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, key: Prism::node, value: Prism::node, operator_loc: Location? } # - # source://prism//lib/prism/node.rb#1222 + # pkg:gem/prism#lib/prism/node.rb:1313 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:1287 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#1275 + # pkg:gem/prism#lib/prism/node.rb:1366 sig { override.returns(String) } def inspect; end @@ -1459,13 +1552,13 @@ class Prism::AssocNode < ::Prism::Node # { def a; end => 1 } # ^^^^^^^^^^ # - # source://prism//lib/prism/node.rb#1236 + # pkg:gem/prism#lib/prism/node.rb:1327 sig { returns(Prism::Node) } def key; end # def operator: () -> String? # - # source://prism//lib/prism/node.rb#1270 + # pkg:gem/prism#lib/prism/node.rb:1361 sig { returns(T.nilable(String)) } def operator; end @@ -1474,19 +1567,19 @@ class Prism::AssocNode < ::Prism::Node # { foo => bar } # ^^ # - # source://prism//lib/prism/node.rb#1251 + # pkg:gem/prism#lib/prism/node.rb:1342 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#1265 + # pkg:gem/prism#lib/prism/node.rb:1356 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#1280 + # pkg:gem/prism#lib/prism/node.rb:1371 sig { override.returns(Symbol) } def type; end @@ -1498,14 +1591,14 @@ class Prism::AssocNode < ::Prism::Node # { x: 1 } # ^ # - # source://prism//lib/prism/node.rb#1245 + # pkg:gem/prism#lib/prism/node.rb:1336 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#1285 + # pkg:gem/prism#lib/prism/node.rb:1376 def type; end end end @@ -1515,13 +1608,11 @@ end # { **foo } # ^^^^^ # -# source://prism//lib/prism/node.rb#1303 +# pkg:gem/prism#lib/prism/node.rb:1394 class Prism::AssocSplatNode < ::Prism::Node # Initialize a new AssocSplatNode node. # - # @return [AssocSplatNode] a new instance of AssocSplatNode - # - # source://prism//lib/prism/node.rb#1305 + # pkg:gem/prism#lib/prism/node.rb:1396 sig do params( source: Prism::Source, @@ -1537,36 +1628,36 @@ class Prism::AssocSplatNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1393 + # pkg:gem/prism#lib/prism/node.rb:1491 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1315 + # pkg:gem/prism#lib/prism/node.rb:1406 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1320 + # pkg:gem/prism#lib/prism/node.rb:1411 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1332 + # pkg:gem/prism#lib/prism/node.rb:1430 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1325 + # pkg:gem/prism#lib/prism/node.rb:1423 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node?, ?operator_loc: Location) -> AssocSplatNode # - # source://prism//lib/prism/node.rb#1337 + # pkg:gem/prism#lib/prism/node.rb:1435 sig do params( node_id: Integer, @@ -1576,33 +1667,37 @@ class Prism::AssocSplatNode < ::Prism::Node operator_loc: Prism::Location ).returns(Prism::AssocSplatNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, value: self.value, operator_loc: self.operator_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1320 + # pkg:gem/prism#lib/prism/node.rb:1440 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node?, operator_loc: Location } # - # source://prism//lib/prism/node.rb#1345 + # pkg:gem/prism#lib/prism/node.rb:1443 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:1416 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#1377 + # pkg:gem/prism#lib/prism/node.rb:1475 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#1372 + # pkg:gem/prism#lib/prism/node.rb:1470 sig { returns(String) } def operator; end @@ -1611,19 +1706,19 @@ class Prism::AssocSplatNode < ::Prism::Node # { **x } # ^^ # - # source://prism//lib/prism/node.rb#1359 + # pkg:gem/prism#lib/prism/node.rb:1457 sig { returns(Prism::Location) } def operator_loc; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#1367 + # pkg:gem/prism#lib/prism/node.rb:1465 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#1382 + # pkg:gem/prism#lib/prism/node.rb:1480 sig { override.returns(Symbol) } def type; end @@ -1632,21 +1727,19 @@ class Prism::AssocSplatNode < ::Prism::Node # { **foo } # ^^^ # - # source://prism//lib/prism/node.rb#1353 + # pkg:gem/prism#lib/prism/node.rb:1451 sig { returns(T.nilable(Prism::Node)) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#1387 + # pkg:gem/prism#lib/prism/node.rb:1485 def type; end end end -# The FFI backend is used on other Ruby implementations. -# -# source://prism//lib/prism.rb#81 +# pkg:gem/prism#lib/prism.rb:90 Prism::BACKEND = T.let(T.unsafe(nil), Symbol) # Represents reading a reference to a field in the previous match. @@ -1654,49 +1747,47 @@ Prism::BACKEND = T.let(T.unsafe(nil), Symbol) # $' # ^^ # -# source://prism//lib/prism/node.rb#1404 +# pkg:gem/prism#lib/prism/node.rb:1502 class Prism::BackReferenceReadNode < ::Prism::Node # Initialize a new BackReferenceReadNode node. # - # @return [BackReferenceReadNode] a new instance of BackReferenceReadNode - # - # source://prism//lib/prism/node.rb#1406 + # pkg:gem/prism#lib/prism/node.rb:1504 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1471 + # pkg:gem/prism#lib/prism/node.rb:1575 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1415 + # pkg:gem/prism#lib/prism/node.rb:1513 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1420 + # pkg:gem/prism#lib/prism/node.rb:1518 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1430 + # pkg:gem/prism#lib/prism/node.rb:1534 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1425 + # pkg:gem/prism#lib/prism/node.rb:1529 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> BackReferenceReadNode # - # source://prism//lib/prism/node.rb#1435 + # pkg:gem/prism#lib/prism/node.rb:1539 sig do params( node_id: Integer, @@ -1705,27 +1796,31 @@ class Prism::BackReferenceReadNode < ::Prism::Node name: Symbol ).returns(Prism::BackReferenceReadNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1420 + # pkg:gem/prism#lib/prism/node.rb:1544 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#1443 + # pkg:gem/prism#lib/prism/node.rb:1547 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:1523 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#1455 + # pkg:gem/prism#lib/prism/node.rb:1559 sig { override.returns(String) } def inspect; end @@ -1735,20 +1830,20 @@ class Prism::BackReferenceReadNode < ::Prism::Node # # $+ # name `:$+` # - # source://prism//lib/prism/node.rb#1452 + # pkg:gem/prism#lib/prism/node.rb:1556 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#1460 + # pkg:gem/prism#lib/prism/node.rb:1564 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#1465 + # pkg:gem/prism#lib/prism/node.rb:1569 def type; end end end @@ -1758,24 +1853,24 @@ end # implement each one that they need. For a default implementation that # continues walking the tree, see the Visitor class. # -# source://prism//lib/prism/visitor.rb#14 +# pkg:gem/prism#lib/prism/visitor.rb:17 class Prism::BasicVisitor # Calls `accept` on the given node if it is not `nil`, which in turn should # call back into this visitor by calling the appropriate `visit_*` method. # - # source://prism//lib/prism/visitor.rb#17 + # pkg:gem/prism#lib/prism/visitor.rb:20 sig { params(node: T.nilable(Prism::Node)).void } def visit(node); end # Visits each node in `nodes` by calling `accept` on each one. # - # source://prism//lib/prism/visitor.rb#23 + # pkg:gem/prism#lib/prism/visitor.rb:26 sig { params(nodes: T::Array[T.nilable(Prism::Node)]).void } def visit_all(nodes); end # Visits the child nodes of `node` by calling `accept` on each one. # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:32 sig { params(node: Prism::Node).void } def visit_child_nodes(node); end end @@ -1787,13 +1882,11 @@ end # end # ^^^^^ # -# source://prism//lib/prism/node.rb#1483 +# pkg:gem/prism#lib/prism/node.rb:1587 class Prism::BeginNode < ::Prism::Node # Initialize a new BeginNode node. # - # @return [BeginNode] a new instance of BeginNode - # - # source://prism//lib/prism/node.rb#1485 + # pkg:gem/prism#lib/prism/node.rb:1589 sig do params( source: Prism::Source, @@ -1813,18 +1906,18 @@ class Prism::BeginNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1631 + # pkg:gem/prism#lib/prism/node.rb:1745 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1499 + # pkg:gem/prism#lib/prism/node.rb:1603 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def begin_keyword: () -> String? # - # source://prism//lib/prism/node.rb#1605 + # pkg:gem/prism#lib/prism/node.rb:1719 sig { returns(T.nilable(String)) } def begin_keyword; end @@ -1833,31 +1926,31 @@ class Prism::BeginNode < ::Prism::Node # begin x end # ^^^^^ # - # source://prism//lib/prism/node.rb#1540 + # pkg:gem/prism#lib/prism/node.rb:1654 sig { returns(T.nilable(Prism::Location)) } def begin_keyword_loc; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1504 + # pkg:gem/prism#lib/prism/node.rb:1608 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1519 + # pkg:gem/prism#lib/prism/node.rb:1633 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1509 + # pkg:gem/prism#lib/prism/node.rb:1623 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?begin_keyword_loc: Location?, ?statements: StatementsNode?, ?rescue_clause: RescueNode?, ?else_clause: ElseNode?, ?ensure_clause: EnsureNode?, ?end_keyword_loc: Location?) -> BeginNode # - # source://prism//lib/prism/node.rb#1524 + # pkg:gem/prism#lib/prism/node.rb:1638 sig do params( node_id: Integer, @@ -1871,33 +1964,37 @@ class Prism::BeginNode < ::Prism::Node end_keyword_loc: T.nilable(Prism::Location) ).returns(Prism::BeginNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), begin_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), rescue_clause: T.unsafe(nil), else_clause: T.unsafe(nil), ensure_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, begin_keyword_loc: self.begin_keyword_loc, statements: self.statements, rescue_clause: self.rescue_clause, else_clause: self.else_clause, ensure_clause: self.ensure_clause, end_keyword_loc: self.end_keyword_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1504 + # pkg:gem/prism#lib/prism/node.rb:1643 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location? } # - # source://prism//lib/prism/node.rb#1532 + # pkg:gem/prism#lib/prism/node.rb:1646 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:1613 + def each_child_node; end + # Represents the else clause within the begin block. # # begin x; rescue y; else z; end # ^^^^^^ # - # source://prism//lib/prism/node.rb#1574 + # pkg:gem/prism#lib/prism/node.rb:1688 sig { returns(T.nilable(Prism::ElseNode)) } def else_clause; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#1610 + # pkg:gem/prism#lib/prism/node.rb:1724 sig { returns(T.nilable(String)) } def end_keyword; end @@ -1906,7 +2003,7 @@ class Prism::BeginNode < ::Prism::Node # begin x end # ^^^ # - # source://prism//lib/prism/node.rb#1586 + # pkg:gem/prism#lib/prism/node.rb:1700 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end @@ -1915,7 +2012,7 @@ class Prism::BeginNode < ::Prism::Node # begin x; ensure y; end # ^^^^^^^^ # - # source://prism//lib/prism/node.rb#1580 + # pkg:gem/prism#lib/prism/node.rb:1694 sig { returns(T.nilable(Prism::EnsureNode)) } def ensure_clause; end @@ -1924,11 +2021,11 @@ class Prism::BeginNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1615 + # pkg:gem/prism#lib/prism/node.rb:1729 sig { override.returns(String) } def inspect; end - # source://prism//lib/prism/parse_result/newlines.rb#79 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:80 def newline_flag!(lines); end # Represents the rescue clause within the begin block. @@ -1936,20 +2033,20 @@ class Prism::BeginNode < ::Prism::Node # begin x; rescue y; end # ^^^^^^^^ # - # source://prism//lib/prism/node.rb#1568 + # pkg:gem/prism#lib/prism/node.rb:1682 sig { returns(T.nilable(Prism::RescueNode)) } def rescue_clause; end # Save the begin_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#1554 + # pkg:gem/prism#lib/prism/node.rb:1668 def save_begin_keyword_loc(repository); end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#1600 + # pkg:gem/prism#lib/prism/node.rb:1714 def save_end_keyword_loc(repository); end # Represents the statements within the begin block. @@ -1957,20 +2054,20 @@ class Prism::BeginNode < ::Prism::Node # begin x end # ^ # - # source://prism//lib/prism/node.rb#1562 + # pkg:gem/prism#lib/prism/node.rb:1676 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#1620 + # pkg:gem/prism#lib/prism/node.rb:1734 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#1625 + # pkg:gem/prism#lib/prism/node.rb:1739 def type; end end end @@ -1980,13 +2077,11 @@ end # bar(&args) # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#1646 +# pkg:gem/prism#lib/prism/node.rb:1760 class Prism::BlockArgumentNode < ::Prism::Node # Initialize a new BlockArgumentNode node. # - # @return [BlockArgumentNode] a new instance of BlockArgumentNode - # - # source://prism//lib/prism/node.rb#1648 + # pkg:gem/prism#lib/prism/node.rb:1762 sig do params( source: Prism::Source, @@ -2002,36 +2097,36 @@ class Prism::BlockArgumentNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1736 + # pkg:gem/prism#lib/prism/node.rb:1857 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1658 + # pkg:gem/prism#lib/prism/node.rb:1772 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1663 + # pkg:gem/prism#lib/prism/node.rb:1777 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1675 + # pkg:gem/prism#lib/prism/node.rb:1796 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1668 + # pkg:gem/prism#lib/prism/node.rb:1789 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node?, ?operator_loc: Location) -> BlockArgumentNode # - # source://prism//lib/prism/node.rb#1680 + # pkg:gem/prism#lib/prism/node.rb:1801 sig do params( node_id: Integer, @@ -2041,27 +2136,31 @@ class Prism::BlockArgumentNode < ::Prism::Node operator_loc: Prism::Location ).returns(Prism::BlockArgumentNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, expression: self.expression, operator_loc: self.operator_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1663 + # pkg:gem/prism#lib/prism/node.rb:1806 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node?, operator_loc: Location } # - # source://prism//lib/prism/node.rb#1688 + # pkg:gem/prism#lib/prism/node.rb:1809 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:1782 + def each_child_node; end + # The expression that is being passed as a block argument. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). # # foo(&args) # ^^^^^ # - # source://prism//lib/prism/node.rb#1696 + # pkg:gem/prism#lib/prism/node.rb:1817 sig { returns(T.nilable(Prism::Node)) } def expression; end @@ -2070,13 +2169,13 @@ class Prism::BlockArgumentNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1720 + # pkg:gem/prism#lib/prism/node.rb:1841 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#1715 + # pkg:gem/prism#lib/prism/node.rb:1836 sig { returns(String) } def operator; end @@ -2085,26 +2184,26 @@ class Prism::BlockArgumentNode < ::Prism::Node # foo(&args) # ^ # - # source://prism//lib/prism/node.rb#1702 + # pkg:gem/prism#lib/prism/node.rb:1823 sig { returns(Prism::Location) } def operator_loc; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#1710 + # pkg:gem/prism#lib/prism/node.rb:1831 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#1725 + # pkg:gem/prism#lib/prism/node.rb:1846 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#1730 + # pkg:gem/prism#lib/prism/node.rb:1851 def type; end end end @@ -2114,49 +2213,47 @@ end # a { |; b| } # ^ # -# source://prism//lib/prism/node.rb#1747 +# pkg:gem/prism#lib/prism/node.rb:1868 class Prism::BlockLocalVariableNode < ::Prism::Node # Initialize a new BlockLocalVariableNode node. # - # @return [BlockLocalVariableNode] a new instance of BlockLocalVariableNode - # - # source://prism//lib/prism/node.rb#1749 + # pkg:gem/prism#lib/prism/node.rb:1870 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1818 + # pkg:gem/prism#lib/prism/node.rb:1945 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1758 + # pkg:gem/prism#lib/prism/node.rb:1879 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1763 + # pkg:gem/prism#lib/prism/node.rb:1884 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1773 + # pkg:gem/prism#lib/prism/node.rb:1900 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1768 + # pkg:gem/prism#lib/prism/node.rb:1895 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> BlockLocalVariableNode # - # source://prism//lib/prism/node.rb#1778 + # pkg:gem/prism#lib/prism/node.rb:1905 sig do params( node_id: Integer, @@ -2165,27 +2262,31 @@ class Prism::BlockLocalVariableNode < ::Prism::Node name: Symbol ).returns(Prism::BlockLocalVariableNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1763 + # pkg:gem/prism#lib/prism/node.rb:1910 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#1786 + # pkg:gem/prism#lib/prism/node.rb:1913 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:1889 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#1802 + # pkg:gem/prism#lib/prism/node.rb:1929 sig { override.returns(String) } def inspect; end @@ -2194,28 +2295,26 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # a { |; b| } # name `:b` # ^ # - # source://prism//lib/prism/node.rb#1799 + # pkg:gem/prism#lib/prism/node.rb:1926 sig { returns(Symbol) } def name; end # def repeated_parameter?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#1791 + # pkg:gem/prism#lib/prism/node.rb:1918 sig { returns(T::Boolean) } def repeated_parameter?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#1807 + # pkg:gem/prism#lib/prism/node.rb:1934 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#1812 + # pkg:gem/prism#lib/prism/node.rb:1939 def type; end end end @@ -2225,13 +2324,11 @@ end # [1, 2, 3].each { |i| puts x } # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#1829 +# pkg:gem/prism#lib/prism/node.rb:1956 class Prism::BlockNode < ::Prism::Node # Initialize a new BlockNode node. # - # @return [BlockNode] a new instance of BlockNode - # - # source://prism//lib/prism/node.rb#1831 + # pkg:gem/prism#lib/prism/node.rb:1958 sig do params( source: Prism::Source, @@ -2250,12 +2347,12 @@ class Prism::BlockNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1960 + # pkg:gem/prism#lib/prism/node.rb:2095 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1844 + # pkg:gem/prism#lib/prism/node.rb:1971 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -2264,46 +2361,46 @@ class Prism::BlockNode < ::Prism::Node # [1, 2, 3].each { |i| puts x } # ^^^^^^ # - # source://prism//lib/prism/node.rb#1899 + # pkg:gem/prism#lib/prism/node.rb:2034 sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1849 + # pkg:gem/prism#lib/prism/node.rb:1976 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#1939 + # pkg:gem/prism#lib/prism/node.rb:2074 sig { returns(String) } def closing; end - # Represents the location of the closing `|`. + # Represents the location of the closing `}` or `end`. # # [1, 2, 3].each { |i| puts x } - # ^ + # ^ # - # source://prism//lib/prism/node.rb#1921 + # pkg:gem/prism#lib/prism/node.rb:2056 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1862 + # pkg:gem/prism#lib/prism/node.rb:1997 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1854 + # pkg:gem/prism#lib/prism/node.rb:1989 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, ?body: StatementsNode | BeginNode | nil, ?opening_loc: Location, ?closing_loc: Location) -> BlockNode # - # source://prism//lib/prism/node.rb#1867 + # pkg:gem/prism#lib/prism/node.rb:2002 sig do params( node_id: Integer, @@ -2316,27 +2413,31 @@ class Prism::BlockNode < ::Prism::Node closing_loc: Prism::Location ).returns(Prism::BlockNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, locals: self.locals, parameters: self.parameters, body: self.body, opening_loc: self.opening_loc, closing_loc: self.closing_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1849 + # pkg:gem/prism#lib/prism/node.rb:2007 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, body: StatementsNode | BeginNode | nil, opening_loc: Location, closing_loc: Location } # - # source://prism//lib/prism/node.rb#1875 + # pkg:gem/prism#lib/prism/node.rb:2010 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:1981 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#1944 + # pkg:gem/prism#lib/prism/node.rb:2079 sig { override.returns(String) } def inspect; end @@ -2345,22 +2446,22 @@ class Prism::BlockNode < ::Prism::Node # [1, 2, 3].each { |i| puts x } # locals: [:i] # ^ # - # source://prism//lib/prism/node.rb#1883 + # pkg:gem/prism#lib/prism/node.rb:2018 sig { returns(T::Array[Symbol]) } def locals; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#1934 + # pkg:gem/prism#lib/prism/node.rb:2069 sig { returns(String) } def opening; end - # Represents the location of the opening `|`. + # Represents the location of the opening `{` or `do`. # # [1, 2, 3].each { |i| puts x } - # ^ + # ^ # - # source://prism//lib/prism/node.rb#1905 + # pkg:gem/prism#lib/prism/node.rb:2040 sig { returns(Prism::Location) } def opening_loc; end @@ -2373,32 +2474,32 @@ class Prism::BlockNode < ::Prism::Node # [1, 2, 3].each { puts it } # ^^^^^^^^^^^ # - # source://prism//lib/prism/node.rb#1893 + # pkg:gem/prism#lib/prism/node.rb:2028 sig { returns(T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode))) } def parameters; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#1929 + # pkg:gem/prism#lib/prism/node.rb:2064 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#1913 + # pkg:gem/prism#lib/prism/node.rb:2048 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#1949 + # pkg:gem/prism#lib/prism/node.rb:2084 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#1954 + # pkg:gem/prism#lib/prism/node.rb:2089 def type; end end end @@ -2409,13 +2510,11 @@ end # ^^ # end # -# source://prism//lib/prism/node.rb#1976 +# pkg:gem/prism#lib/prism/node.rb:2111 class Prism::BlockParameterNode < ::Prism::Node # Initialize a new BlockParameterNode node. # - # @return [BlockParameterNode] a new instance of BlockParameterNode - # - # source://prism//lib/prism/node.rb#1978 + # pkg:gem/prism#lib/prism/node.rb:2113 sig do params( source: Prism::Source, @@ -2432,36 +2531,36 @@ class Prism::BlockParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#2094 + # pkg:gem/prism#lib/prism/node.rb:2235 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1989 + # pkg:gem/prism#lib/prism/node.rb:2124 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1994 + # pkg:gem/prism#lib/prism/node.rb:2129 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2004 + # pkg:gem/prism#lib/prism/node.rb:2145 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1999 + # pkg:gem/prism#lib/prism/node.rb:2140 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location) -> BlockParameterNode # - # source://prism//lib/prism/node.rb#2009 + # pkg:gem/prism#lib/prism/node.rb:2150 sig do params( node_id: Integer, @@ -2472,27 +2571,31 @@ class Prism::BlockParameterNode < ::Prism::Node operator_loc: Prism::Location ).returns(Prism::BlockParameterNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, operator_loc: self.operator_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#1994 + # pkg:gem/prism#lib/prism/node.rb:2155 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location } # - # source://prism//lib/prism/node.rb#2017 + # pkg:gem/prism#lib/prism/node.rb:2158 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:2134 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#2078 + # pkg:gem/prism#lib/prism/node.rb:2219 sig { override.returns(String) } def inspect; end @@ -2502,7 +2605,7 @@ class Prism::BlockParameterNode < ::Prism::Node # ^ # end # - # source://prism//lib/prism/node.rb#2031 + # pkg:gem/prism#lib/prism/node.rb:2172 sig { returns(T.nilable(Symbol)) } def name; end @@ -2511,13 +2614,13 @@ class Prism::BlockParameterNode < ::Prism::Node # def a(&b) # ^ # - # source://prism//lib/prism/node.rb#2037 + # pkg:gem/prism#lib/prism/node.rb:2178 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#2073 + # pkg:gem/prism#lib/prism/node.rb:2214 sig { returns(String) } def operator; end @@ -2527,40 +2630,38 @@ class Prism::BlockParameterNode < ::Prism::Node # ^ # end # - # source://prism//lib/prism/node.rb#2060 + # pkg:gem/prism#lib/prism/node.rb:2201 sig { returns(Prism::Location) } def operator_loc; end # def repeated_parameter?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2022 + # pkg:gem/prism#lib/prism/node.rb:2163 sig { returns(T::Boolean) } def repeated_parameter?; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2051 + # pkg:gem/prism#lib/prism/node.rb:2192 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2068 + # pkg:gem/prism#lib/prism/node.rb:2209 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#2083 + # pkg:gem/prism#lib/prism/node.rb:2224 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#2088 + # pkg:gem/prism#lib/prism/node.rb:2229 def type; end end end @@ -2574,13 +2675,11 @@ end # ^^^^^^^^^^^^^^^^^ # end # -# source://prism//lib/prism/node.rb#2111 +# pkg:gem/prism#lib/prism/node.rb:2252 class Prism::BlockParametersNode < ::Prism::Node # Initialize a new BlockParametersNode node. # - # @return [BlockParametersNode] a new instance of BlockParametersNode - # - # source://prism//lib/prism/node.rb#2113 + # pkg:gem/prism#lib/prism/node.rb:2254 sig do params( source: Prism::Source, @@ -2598,24 +2697,24 @@ class Prism::BlockParametersNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#2259 + # pkg:gem/prism#lib/prism/node.rb:2408 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2125 + # pkg:gem/prism#lib/prism/node.rb:2266 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#2130 + # pkg:gem/prism#lib/prism/node.rb:2271 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#2238 + # pkg:gem/prism#lib/prism/node.rb:2387 sig { returns(T.nilable(String)) } def closing; end @@ -2628,25 +2727,25 @@ class Prism::BlockParametersNode < ::Prism::Node # ^ # end # - # source://prism//lib/prism/node.rb#2214 + # pkg:gem/prism#lib/prism/node.rb:2363 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2143 + # pkg:gem/prism#lib/prism/node.rb:2292 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2135 + # pkg:gem/prism#lib/prism/node.rb:2284 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?parameters: ParametersNode?, ?locals: Array[BlockLocalVariableNode], ?opening_loc: Location?, ?closing_loc: Location?) -> BlockParametersNode # - # source://prism//lib/prism/node.rb#2148 + # pkg:gem/prism#lib/prism/node.rb:2297 sig do params( node_id: Integer, @@ -2658,27 +2757,31 @@ class Prism::BlockParametersNode < ::Prism::Node closing_loc: T.nilable(Prism::Location) ).returns(Prism::BlockParametersNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parameters: T.unsafe(nil), locals: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, parameters: self.parameters, locals: self.locals, opening_loc: self.opening_loc, closing_loc: self.closing_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#2130 + # pkg:gem/prism#lib/prism/node.rb:2302 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parameters: ParametersNode?, locals: Array[BlockLocalVariableNode], opening_loc: Location?, closing_loc: Location? } # - # source://prism//lib/prism/node.rb#2156 + # pkg:gem/prism#lib/prism/node.rb:2305 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:2276 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#2243 + # pkg:gem/prism#lib/prism/node.rb:2392 sig { override.returns(String) } def inspect; end @@ -2691,13 +2794,13 @@ class Prism::BlockParametersNode < ::Prism::Node # ^^^^^ # end # - # source://prism//lib/prism/node.rb#2178 + # pkg:gem/prism#lib/prism/node.rb:2327 sig { returns(T::Array[Prism::BlockLocalVariableNode]) } def locals; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#2233 + # pkg:gem/prism#lib/prism/node.rb:2382 sig { returns(T.nilable(String)) } def opening; end @@ -2710,7 +2813,7 @@ class Prism::BlockParametersNode < ::Prism::Node # ^ # end # - # source://prism//lib/prism/node.rb#2188 + # pkg:gem/prism#lib/prism/node.rb:2337 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -2723,32 +2826,32 @@ class Prism::BlockParametersNode < ::Prism::Node # ^^^^^^^^ # end # - # source://prism//lib/prism/node.rb#2168 + # pkg:gem/prism#lib/prism/node.rb:2317 sig { returns(T.nilable(Prism::ParametersNode)) } def parameters; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2228 + # pkg:gem/prism#lib/prism/node.rb:2377 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2202 + # pkg:gem/prism#lib/prism/node.rb:2351 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#2248 + # pkg:gem/prism#lib/prism/node.rb:2397 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#2253 + # pkg:gem/prism#lib/prism/node.rb:2402 def type; end end end @@ -2758,13 +2861,11 @@ end # break foo # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2273 +# pkg:gem/prism#lib/prism/node.rb:2422 class Prism::BreakNode < ::Prism::Node # Initialize a new BreakNode node. # - # @return [BreakNode] a new instance of BreakNode - # - # source://prism//lib/prism/node.rb#2275 + # pkg:gem/prism#lib/prism/node.rb:2424 sig do params( source: Prism::Source, @@ -2780,12 +2881,12 @@ class Prism::BreakNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#2363 + # pkg:gem/prism#lib/prism/node.rb:2519 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2285 + # pkg:gem/prism#lib/prism/node.rb:2434 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -2794,31 +2895,31 @@ class Prism::BreakNode < ::Prism::Node # break foo # ^^^ # - # source://prism//lib/prism/node.rb#2323 + # pkg:gem/prism#lib/prism/node.rb:2479 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#2290 + # pkg:gem/prism#lib/prism/node.rb:2439 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2302 + # pkg:gem/prism#lib/prism/node.rb:2458 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2295 + # pkg:gem/prism#lib/prism/node.rb:2451 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?arguments: ArgumentsNode?, ?keyword_loc: Location) -> BreakNode # - # source://prism//lib/prism/node.rb#2307 + # pkg:gem/prism#lib/prism/node.rb:2463 sig do params( node_id: Integer, @@ -2828,33 +2929,37 @@ class Prism::BreakNode < ::Prism::Node keyword_loc: Prism::Location ).returns(Prism::BreakNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, arguments: self.arguments, keyword_loc: self.keyword_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#2290 + # pkg:gem/prism#lib/prism/node.rb:2468 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: ArgumentsNode?, keyword_loc: Location } # - # source://prism//lib/prism/node.rb#2315 + # pkg:gem/prism#lib/prism/node.rb:2471 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:2444 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#2347 + # pkg:gem/prism#lib/prism/node.rb:2503 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#2342 + # pkg:gem/prism#lib/prism/node.rb:2498 sig { returns(String) } def keyword; end @@ -2863,26 +2968,26 @@ class Prism::BreakNode < ::Prism::Node # break foo # ^^^^^ # - # source://prism//lib/prism/node.rb#2329 + # pkg:gem/prism#lib/prism/node.rb:2485 sig { returns(Prism::Location) } def keyword_loc; end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2337 + # pkg:gem/prism#lib/prism/node.rb:2493 def save_keyword_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#2352 + # pkg:gem/prism#lib/prism/node.rb:2508 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#2357 + # pkg:gem/prism#lib/prism/node.rb:2513 def type; end end end @@ -2892,13 +2997,11 @@ end # foo.bar &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2374 +# pkg:gem/prism#lib/prism/node.rb:2530 class Prism::CallAndWriteNode < ::Prism::Node # Initialize a new CallAndWriteNode node. # - # @return [CallAndWriteNode] a new instance of CallAndWriteNode - # - # source://prism//lib/prism/node.rb#2376 + # pkg:gem/prism#lib/prism/node.rb:2532 sig do params( source: Prism::Source, @@ -2919,26 +3022,24 @@ class Prism::CallAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#2562 + # pkg:gem/prism#lib/prism/node.rb:2726 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2391 + # pkg:gem/prism#lib/prism/node.rb:2547 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def attribute_write?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2437 + # pkg:gem/prism#lib/prism/node.rb:2601 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#2531 + # pkg:gem/prism#lib/prism/node.rb:2695 sig { returns(T.nilable(String)) } def call_operator; end @@ -2947,31 +3048,31 @@ class Prism::CallAndWriteNode < ::Prism::Node # foo.bar &&= value # ^ # - # source://prism//lib/prism/node.rb#2456 + # pkg:gem/prism#lib/prism/node.rb:2620 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#2396 + # pkg:gem/prism#lib/prism/node.rb:2552 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2409 + # pkg:gem/prism#lib/prism/node.rb:2573 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2401 + # pkg:gem/prism#lib/prism/node.rb:2565 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node) -> CallAndWriteNode # - # source://prism//lib/prism/node.rb#2414 + # pkg:gem/prism#lib/prism/node.rb:2578 sig do params( node_id: Integer, @@ -2986,41 +3087,43 @@ class Prism::CallAndWriteNode < ::Prism::Node value: Prism::Node ).returns(Prism::CallAndWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, receiver: self.receiver, call_operator_loc: self.call_operator_loc, message_loc: self.message_loc, read_name: self.read_name, write_name: self.write_name, operator_loc: self.operator_loc, value: self.value); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#2396 + # pkg:gem/prism#lib/prism/node.rb:2583 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#2422 + # pkg:gem/prism#lib/prism/node.rb:2586 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:2557 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def ignore_visibility?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2442 + # pkg:gem/prism#lib/prism/node.rb:2606 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#2546 + # pkg:gem/prism#lib/prism/node.rb:2710 sig { override.returns(String) } def inspect; end # def message: () -> String? # - # source://prism//lib/prism/node.rb#2536 + # pkg:gem/prism#lib/prism/node.rb:2700 sig { returns(T.nilable(String)) } def message; end @@ -3029,13 +3132,13 @@ class Prism::CallAndWriteNode < ::Prism::Node # foo.bar &&= value # ^^^ # - # source://prism//lib/prism/node.rb#2478 + # pkg:gem/prism#lib/prism/node.rb:2642 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#2541 + # pkg:gem/prism#lib/prism/node.rb:2705 sig { returns(String) } def operator; end @@ -3044,7 +3147,7 @@ class Prism::CallAndWriteNode < ::Prism::Node # foo.bar &&= value # ^^^ # - # source://prism//lib/prism/node.rb#2512 + # pkg:gem/prism#lib/prism/node.rb:2676 sig { returns(Prism::Location) } def operator_loc; end @@ -3053,7 +3156,7 @@ class Prism::CallAndWriteNode < ::Prism::Node # foo.bar &&= value # read_name `:bar` # ^^^ # - # source://prism//lib/prism/node.rb#2500 + # pkg:gem/prism#lib/prism/node.rb:2664 sig { returns(Symbol) } def read_name; end @@ -3062,39 +3165,37 @@ class Prism::CallAndWriteNode < ::Prism::Node # foo.bar &&= value # ^^^ # - # source://prism//lib/prism/node.rb#2450 + # pkg:gem/prism#lib/prism/node.rb:2614 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def safe_navigation?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2427 + # pkg:gem/prism#lib/prism/node.rb:2591 sig { returns(T::Boolean) } def safe_navigation?; end # Save the call_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2470 + # pkg:gem/prism#lib/prism/node.rb:2634 def save_call_operator_loc(repository); end # Save the message_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2492 + # pkg:gem/prism#lib/prism/node.rb:2656 def save_message_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2520 + # pkg:gem/prism#lib/prism/node.rb:2684 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#2551 + # pkg:gem/prism#lib/prism/node.rb:2715 sig { override.returns(Symbol) } def type; end @@ -3103,15 +3204,13 @@ class Prism::CallAndWriteNode < ::Prism::Node # foo.bar &&= value # ^^^^^ # - # source://prism//lib/prism/node.rb#2528 + # pkg:gem/prism#lib/prism/node.rb:2692 sig { returns(Prism::Node) } def value; end # def variable_call?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2432 + # pkg:gem/prism#lib/prism/node.rb:2596 sig { returns(T::Boolean) } def variable_call?; end @@ -3120,14 +3219,14 @@ class Prism::CallAndWriteNode < ::Prism::Node # foo.bar &&= value # write_name `:bar=` # ^^^ # - # source://prism//lib/prism/node.rb#2506 + # pkg:gem/prism#lib/prism/node.rb:2670 sig { returns(Symbol) } def write_name; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#2556 + # pkg:gem/prism#lib/prism/node.rb:2720 def type; end end end @@ -3152,13 +3251,11 @@ end # foo&.bar # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#2594 +# pkg:gem/prism#lib/prism/node.rb:2758 class Prism::CallNode < ::Prism::Node # Initialize a new CallNode node. # - # @return [CallNode] a new instance of CallNode - # - # source://prism//lib/prism/node.rb#2596 + # pkg:gem/prism#lib/prism/node.rb:2760 sig do params( source: Prism::Source, @@ -3172,20 +3269,21 @@ class Prism::CallNode < ::Prism::Node opening_loc: T.nilable(Prism::Location), arguments: T.nilable(Prism::ArgumentsNode), closing_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) ).void end - def initialize(source, node_id, location, flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block); end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, equal_loc, block); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#2825 + # pkg:gem/prism#lib/prism/node.rb:3029 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2612 + # pkg:gem/prism#lib/prism/node.rb:2777 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -3194,15 +3292,13 @@ class Prism::CallNode < ::Prism::Node # foo(bar) # ^^^ # - # source://prism//lib/prism/node.rb#2758 + # pkg:gem/prism#lib/prism/node.rb:2932 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def attribute_write?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2659 + # pkg:gem/prism#lib/prism/node.rb:2833 sig { returns(T::Boolean) } def attribute_write?; end @@ -3211,13 +3307,13 @@ class Prism::CallNode < ::Prism::Node # foo { |a| a } # ^^^^^^^^^ # - # source://prism//lib/prism/node.rb#2786 + # pkg:gem/prism#lib/prism/node.rb:2985 sig { returns(T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode))) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#2789 + # pkg:gem/prism#lib/prism/node.rb:2988 sig { returns(T.nilable(String)) } def call_operator; end @@ -3229,19 +3325,19 @@ class Prism::CallNode < ::Prism::Node # foo&.bar # ^^ # - # source://prism//lib/prism/node.rb#2687 + # pkg:gem/prism#lib/prism/node.rb:2861 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#2617 + # pkg:gem/prism#lib/prism/node.rb:2782 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#2804 + # pkg:gem/prism#lib/prism/node.rb:3003 sig { returns(T.nilable(String)) } def closing; end @@ -3250,25 +3346,25 @@ class Prism::CallNode < ::Prism::Node # foo(bar) # ^ # - # source://prism//lib/prism/node.rb#2764 + # pkg:gem/prism#lib/prism/node.rb:2938 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2631 + # pkg:gem/prism#lib/prism/node.rb:2805 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2622 + # pkg:gem/prism#lib/prism/node.rb:2796 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?name: Symbol, ?message_loc: Location?, ?opening_loc: Location?, ?arguments: ArgumentsNode?, ?closing_loc: Location?, ?block: BlockNode | BlockArgumentNode | nil) -> CallNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?name: Symbol, ?message_loc: Location?, ?opening_loc: Location?, ?arguments: ArgumentsNode?, ?closing_loc: Location?, ?equal_loc: Location?, ?block: BlockNode | BlockArgumentNode | nil) -> CallNode # - # source://prism//lib/prism/node.rb#2636 + # pkg:gem/prism#lib/prism/node.rb:2810 sig do params( node_id: Integer, @@ -3281,24 +3377,47 @@ class Prism::CallNode < ::Prism::Node opening_loc: T.nilable(Prism::Location), arguments: T.nilable(Prism::ArgumentsNode), closing_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) ).returns(Prism::CallNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, receiver: self.receiver, call_operator_loc: self.call_operator_loc, name: self.name, message_loc: self.message_loc, opening_loc: self.opening_loc, arguments: self.arguments, closing_loc: self.closing_loc, equal_loc: self.equal_loc, block: self.block); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#2617 + # pkg:gem/prism#lib/prism/node.rb:2815 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, name: Symbol, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: BlockNode | BlockArgumentNode | nil } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, name: Symbol, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, equal_loc: Location?, block: BlockNode | BlockArgumentNode | nil } # - # source://prism//lib/prism/node.rb#2644 + # pkg:gem/prism#lib/prism/node.rb:2818 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:2787 + def each_child_node; end + + # def equal: () -> String? + # + # pkg:gem/prism#lib/prism/node.rb:3008 + sig { returns(T.nilable(String)) } + def equal; end + + # Represents the location of the equal sign, in the case that this is an attribute write. + # + # foo.bar = value + # ^ + # + # foo[bar] = value + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:2963 + sig { returns(T.nilable(Prism::Location)) } + def equal_loc; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end @@ -3312,27 +3431,25 @@ class Prism::CallNode < ::Prism::Node # sometimes you want the location of the full message including the inner # space and the = sign. This method provides that. # - # source://prism//lib/prism/node_ext.rb#331 + # pkg:gem/prism#lib/prism/node_ext.rb:334 sig { returns(T.nilable(Prism::Location)) } def full_message_loc; end # def ignore_visibility?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2664 + # pkg:gem/prism#lib/prism/node.rb:2838 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#2809 + # pkg:gem/prism#lib/prism/node.rb:3013 sig { override.returns(String) } def inspect; end # def message: () -> String? # - # source://prism//lib/prism/node.rb#2794 + # pkg:gem/prism#lib/prism/node.rb:2993 sig { returns(T.nilable(String)) } def message; end @@ -3341,7 +3458,7 @@ class Prism::CallNode < ::Prism::Node # foo.bar # ^^^ # - # source://prism//lib/prism/node.rb#2715 + # pkg:gem/prism#lib/prism/node.rb:2889 sig { returns(T.nilable(Prism::Location)) } def message_loc; end @@ -3350,13 +3467,13 @@ class Prism::CallNode < ::Prism::Node # foo.bar # name `:foo` # ^^^ # - # source://prism//lib/prism/node.rb#2709 + # pkg:gem/prism#lib/prism/node.rb:2883 sig { returns(Symbol) } def name; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#2799 + # pkg:gem/prism#lib/prism/node.rb:2998 sig { returns(T.nilable(String)) } def opening; end @@ -3364,7 +3481,7 @@ class Prism::CallNode < ::Prism::Node # foo(bar) # ^ # - # source://prism//lib/prism/node.rb#2736 + # pkg:gem/prism#lib/prism/node.rb:2910 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -3379,87 +3496,89 @@ class Prism::CallNode < ::Prism::Node # foo + bar # ^^^ # - # source://prism//lib/prism/node.rb#2678 + # pkg:gem/prism#lib/prism/node.rb:2852 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def safe_navigation?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2649 + # pkg:gem/prism#lib/prism/node.rb:2823 sig { returns(T::Boolean) } def safe_navigation?; end # Save the call_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2701 + # pkg:gem/prism#lib/prism/node.rb:2875 def save_call_operator_loc(repository); end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2778 + # pkg:gem/prism#lib/prism/node.rb:2952 def save_closing_loc(repository); end + # Save the equal_loc location using the given saved source so that + # it can be retrieved later. + # + # pkg:gem/prism#lib/prism/node.rb:2977 + def save_equal_loc(repository); end + # Save the message_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2729 + # pkg:gem/prism#lib/prism/node.rb:2903 def save_message_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2750 + # pkg:gem/prism#lib/prism/node.rb:2924 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#2814 + # pkg:gem/prism#lib/prism/node.rb:3018 sig { override.returns(Symbol) } def type; end # def variable_call?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2654 + # pkg:gem/prism#lib/prism/node.rb:2828 sig { returns(T::Boolean) } def variable_call?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#2819 + # pkg:gem/prism#lib/prism/node.rb:3023 def type; end end end # Flags for call nodes. # -# source://prism//lib/prism/node.rb#18483 +# pkg:gem/prism#lib/prism/node.rb:19804 module Prism::CallNodeFlags; end # a call that is an attribute write, so the value being written should be returned # -# source://prism//lib/prism/node.rb#18491 +# pkg:gem/prism#lib/prism/node.rb:19812 Prism::CallNodeFlags::ATTRIBUTE_WRITE = T.let(T.unsafe(nil), Integer) # a call that ignores method visibility # -# source://prism//lib/prism/node.rb#18494 +# pkg:gem/prism#lib/prism/node.rb:19815 Prism::CallNodeFlags::IGNORE_VISIBILITY = T.let(T.unsafe(nil), Integer) # &. operator # -# source://prism//lib/prism/node.rb#18485 +# pkg:gem/prism#lib/prism/node.rb:19806 Prism::CallNodeFlags::SAFE_NAVIGATION = T.let(T.unsafe(nil), Integer) # a call that could have been a local variable # -# source://prism//lib/prism/node.rb#18488 +# pkg:gem/prism#lib/prism/node.rb:19809 Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) # Represents the use of an assignment operator on a call. @@ -3467,13 +3586,11 @@ Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) # foo.bar += baz # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2843 +# pkg:gem/prism#lib/prism/node.rb:3048 class Prism::CallOperatorWriteNode < ::Prism::Node # Initialize a new CallOperatorWriteNode node. # - # @return [CallOperatorWriteNode] a new instance of CallOperatorWriteNode - # - # source://prism//lib/prism/node.rb#2845 + # pkg:gem/prism#lib/prism/node.rb:3050 sig do params( source: Prism::Source, @@ -3495,20 +3612,18 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3033 + # pkg:gem/prism#lib/prism/node.rb:3246 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2861 + # pkg:gem/prism#lib/prism/node.rb:3066 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def attribute_write?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2907 + # pkg:gem/prism#lib/prism/node.rb:3120 sig { returns(T::Boolean) } def attribute_write?; end @@ -3517,7 +3632,7 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # foo.bar += value # binary_operator `:+` # ^ # - # source://prism//lib/prism/node.rb#2982 + # pkg:gem/prism#lib/prism/node.rb:3195 sig { returns(Symbol) } def binary_operator; end @@ -3526,13 +3641,13 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # foo.bar += value # ^^ # - # source://prism//lib/prism/node.rb#2988 + # pkg:gem/prism#lib/prism/node.rb:3201 sig { returns(Prism::Location) } def binary_operator_loc; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#3007 + # pkg:gem/prism#lib/prism/node.rb:3220 sig { returns(T.nilable(String)) } def call_operator; end @@ -3541,31 +3656,31 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # foo.bar += value # ^ # - # source://prism//lib/prism/node.rb#2926 + # pkg:gem/prism#lib/prism/node.rb:3139 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#2866 + # pkg:gem/prism#lib/prism/node.rb:3071 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2879 + # pkg:gem/prism#lib/prism/node.rb:3092 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2871 + # pkg:gem/prism#lib/prism/node.rb:3084 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?binary_operator: Symbol, ?binary_operator_loc: Location, ?value: Prism::node) -> CallOperatorWriteNode # - # source://prism//lib/prism/node.rb#2884 + # pkg:gem/prism#lib/prism/node.rb:3097 sig do params( node_id: Integer, @@ -3581,41 +3696,43 @@ class Prism::CallOperatorWriteNode < ::Prism::Node value: Prism::Node ).returns(Prism::CallOperatorWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, receiver: self.receiver, call_operator_loc: self.call_operator_loc, message_loc: self.message_loc, read_name: self.read_name, write_name: self.write_name, binary_operator: self.binary_operator, binary_operator_loc: self.binary_operator_loc, value: self.value); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#2866 + # pkg:gem/prism#lib/prism/node.rb:3102 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, binary_operator: Symbol, binary_operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#2892 + # pkg:gem/prism#lib/prism/node.rb:3105 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:3076 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def ignore_visibility?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2912 + # pkg:gem/prism#lib/prism/node.rb:3125 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#3017 + # pkg:gem/prism#lib/prism/node.rb:3230 sig { override.returns(String) } def inspect; end # def message: () -> String? # - # source://prism//lib/prism/node.rb#3012 + # pkg:gem/prism#lib/prism/node.rb:3225 sig { returns(T.nilable(String)) } def message; end @@ -3624,20 +3741,20 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # foo.bar += value # ^^^ # - # source://prism//lib/prism/node.rb#2948 + # pkg:gem/prism#lib/prism/node.rb:3161 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # Returns the binary operator used to modify the receiver. This method is # deprecated in favor of #binary_operator. # - # source://prism//lib/prism/node_ext.rb#339 + # pkg:gem/prism#lib/prism/node_ext.rb:342 def operator; end # Returns the location of the binary operator used to modify the receiver. # This method is deprecated in favor of #binary_operator_loc. # - # source://prism//lib/prism/node_ext.rb#346 + # pkg:gem/prism#lib/prism/node_ext.rb:349 def operator_loc; end # Represents the name of the method being called. @@ -3645,7 +3762,7 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # foo.bar += value # read_name `:bar` # ^^^ # - # source://prism//lib/prism/node.rb#2970 + # pkg:gem/prism#lib/prism/node.rb:3183 sig { returns(Symbol) } def read_name; end @@ -3654,39 +3771,37 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # foo.bar += value # ^^^ # - # source://prism//lib/prism/node.rb#2920 + # pkg:gem/prism#lib/prism/node.rb:3133 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def safe_navigation?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2897 + # pkg:gem/prism#lib/prism/node.rb:3110 sig { returns(T::Boolean) } def safe_navigation?; end # Save the binary_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2996 + # pkg:gem/prism#lib/prism/node.rb:3209 def save_binary_operator_loc(repository); end # Save the call_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2940 + # pkg:gem/prism#lib/prism/node.rb:3153 def save_call_operator_loc(repository); end # Save the message_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#2962 + # pkg:gem/prism#lib/prism/node.rb:3175 def save_message_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#3022 + # pkg:gem/prism#lib/prism/node.rb:3235 sig { override.returns(Symbol) } def type; end @@ -3695,15 +3810,13 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # foo.bar += value # ^^^^^ # - # source://prism//lib/prism/node.rb#3004 + # pkg:gem/prism#lib/prism/node.rb:3217 sig { returns(Prism::Node) } def value; end # def variable_call?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2902 + # pkg:gem/prism#lib/prism/node.rb:3115 sig { returns(T::Boolean) } def variable_call?; end @@ -3712,14 +3825,14 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # foo.bar += value # write_name `:bar=` # ^^^ # - # source://prism//lib/prism/node.rb#2976 + # pkg:gem/prism#lib/prism/node.rb:3189 sig { returns(Symbol) } def write_name; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#3027 + # pkg:gem/prism#lib/prism/node.rb:3240 def type; end end end @@ -3729,13 +3842,11 @@ end # foo.bar ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3051 +# pkg:gem/prism#lib/prism/node.rb:3264 class Prism::CallOrWriteNode < ::Prism::Node # Initialize a new CallOrWriteNode node. # - # @return [CallOrWriteNode] a new instance of CallOrWriteNode - # - # source://prism//lib/prism/node.rb#3053 + # pkg:gem/prism#lib/prism/node.rb:3266 sig do params( source: Prism::Source, @@ -3756,26 +3867,24 @@ class Prism::CallOrWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3239 + # pkg:gem/prism#lib/prism/node.rb:3460 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3068 + # pkg:gem/prism#lib/prism/node.rb:3281 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def attribute_write?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#3114 + # pkg:gem/prism#lib/prism/node.rb:3335 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#3208 + # pkg:gem/prism#lib/prism/node.rb:3429 sig { returns(T.nilable(String)) } def call_operator; end @@ -3784,31 +3893,31 @@ class Prism::CallOrWriteNode < ::Prism::Node # foo.bar ||= value # ^ # - # source://prism//lib/prism/node.rb#3133 + # pkg:gem/prism#lib/prism/node.rb:3354 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3073 + # pkg:gem/prism#lib/prism/node.rb:3286 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3086 + # pkg:gem/prism#lib/prism/node.rb:3307 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3078 + # pkg:gem/prism#lib/prism/node.rb:3299 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node) -> CallOrWriteNode # - # source://prism//lib/prism/node.rb#3091 + # pkg:gem/prism#lib/prism/node.rb:3312 sig do params( node_id: Integer, @@ -3823,41 +3932,43 @@ class Prism::CallOrWriteNode < ::Prism::Node value: Prism::Node ).returns(Prism::CallOrWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, receiver: self.receiver, call_operator_loc: self.call_operator_loc, message_loc: self.message_loc, read_name: self.read_name, write_name: self.write_name, operator_loc: self.operator_loc, value: self.value); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3073 + # pkg:gem/prism#lib/prism/node.rb:3317 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#3099 + # pkg:gem/prism#lib/prism/node.rb:3320 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:3291 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def ignore_visibility?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#3119 + # pkg:gem/prism#lib/prism/node.rb:3340 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#3223 + # pkg:gem/prism#lib/prism/node.rb:3444 sig { override.returns(String) } def inspect; end # def message: () -> String? # - # source://prism//lib/prism/node.rb#3213 + # pkg:gem/prism#lib/prism/node.rb:3434 sig { returns(T.nilable(String)) } def message; end @@ -3866,13 +3977,13 @@ class Prism::CallOrWriteNode < ::Prism::Node # foo.bar ||= value # ^^^ # - # source://prism//lib/prism/node.rb#3155 + # pkg:gem/prism#lib/prism/node.rb:3376 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#3218 + # pkg:gem/prism#lib/prism/node.rb:3439 sig { returns(String) } def operator; end @@ -3881,7 +3992,7 @@ class Prism::CallOrWriteNode < ::Prism::Node # foo.bar ||= value # ^^^ # - # source://prism//lib/prism/node.rb#3189 + # pkg:gem/prism#lib/prism/node.rb:3410 sig { returns(Prism::Location) } def operator_loc; end @@ -3890,7 +4001,7 @@ class Prism::CallOrWriteNode < ::Prism::Node # foo.bar ||= value # read_name `:bar` # ^^^ # - # source://prism//lib/prism/node.rb#3177 + # pkg:gem/prism#lib/prism/node.rb:3398 sig { returns(Symbol) } def read_name; end @@ -3899,39 +4010,37 @@ class Prism::CallOrWriteNode < ::Prism::Node # foo.bar ||= value # ^^^ # - # source://prism//lib/prism/node.rb#3127 + # pkg:gem/prism#lib/prism/node.rb:3348 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def safe_navigation?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#3104 + # pkg:gem/prism#lib/prism/node.rb:3325 sig { returns(T::Boolean) } def safe_navigation?; end # Save the call_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3147 + # pkg:gem/prism#lib/prism/node.rb:3368 def save_call_operator_loc(repository); end # Save the message_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3169 + # pkg:gem/prism#lib/prism/node.rb:3390 def save_message_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3197 + # pkg:gem/prism#lib/prism/node.rb:3418 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#3228 + # pkg:gem/prism#lib/prism/node.rb:3449 sig { override.returns(Symbol) } def type; end @@ -3940,15 +4049,13 @@ class Prism::CallOrWriteNode < ::Prism::Node # foo.bar ||= value # ^^^^^ # - # source://prism//lib/prism/node.rb#3205 + # pkg:gem/prism#lib/prism/node.rb:3426 sig { returns(Prism::Node) } def value; end # def variable_call?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#3109 + # pkg:gem/prism#lib/prism/node.rb:3330 sig { returns(T::Boolean) } def variable_call?; end @@ -3957,14 +4064,14 @@ class Prism::CallOrWriteNode < ::Prism::Node # foo.bar ||= value # write_name `:bar=` # ^^^ # - # source://prism//lib/prism/node.rb#3183 + # pkg:gem/prism#lib/prism/node.rb:3404 sig { returns(Symbol) } def write_name; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#3233 + # pkg:gem/prism#lib/prism/node.rb:3454 def type; end end end @@ -3982,13 +4089,11 @@ end # for foo.bar in baz do end # ^^^^^^^ # -# source://prism//lib/prism/node.rb#3264 +# pkg:gem/prism#lib/prism/node.rb:3485 class Prism::CallTargetNode < ::Prism::Node # Initialize a new CallTargetNode node. # - # @return [CallTargetNode] a new instance of CallTargetNode - # - # source://prism//lib/prism/node.rb#3266 + # pkg:gem/prism#lib/prism/node.rb:3487 sig do params( source: Prism::Source, @@ -4006,26 +4111,24 @@ class Prism::CallTargetNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3401 + # pkg:gem/prism#lib/prism/node.rb:3629 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3278 + # pkg:gem/prism#lib/prism/node.rb:3499 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def attribute_write?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#3321 + # pkg:gem/prism#lib/prism/node.rb:3549 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String # - # source://prism//lib/prism/node.rb#3375 + # pkg:gem/prism#lib/prism/node.rb:3603 sig { returns(String) } def call_operator; end @@ -4034,31 +4137,31 @@ class Prism::CallTargetNode < ::Prism::Node # foo.bar = 1 # ^ # - # source://prism//lib/prism/node.rb#3340 + # pkg:gem/prism#lib/prism/node.rb:3568 sig { returns(Prism::Location) } def call_operator_loc; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3283 + # pkg:gem/prism#lib/prism/node.rb:3504 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3293 + # pkg:gem/prism#lib/prism/node.rb:3521 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3288 + # pkg:gem/prism#lib/prism/node.rb:3516 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node, ?call_operator_loc: Location, ?name: Symbol, ?message_loc: Location) -> CallTargetNode # - # source://prism//lib/prism/node.rb#3298 + # pkg:gem/prism#lib/prism/node.rb:3526 sig do params( node_id: Integer, @@ -4070,41 +4173,43 @@ class Prism::CallTargetNode < ::Prism::Node message_loc: Prism::Location ).returns(Prism::CallTargetNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, receiver: self.receiver, call_operator_loc: self.call_operator_loc, name: self.name, message_loc: self.message_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3283 + # pkg:gem/prism#lib/prism/node.rb:3531 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node, call_operator_loc: Location, name: Symbol, message_loc: Location } # - # source://prism//lib/prism/node.rb#3306 + # pkg:gem/prism#lib/prism/node.rb:3534 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:3509 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def ignore_visibility?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#3326 + # pkg:gem/prism#lib/prism/node.rb:3554 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#3385 + # pkg:gem/prism#lib/prism/node.rb:3613 sig { override.returns(String) } def inspect; end # def message: () -> String # - # source://prism//lib/prism/node.rb#3380 + # pkg:gem/prism#lib/prism/node.rb:3608 sig { returns(String) } def message; end @@ -4113,7 +4218,7 @@ class Prism::CallTargetNode < ::Prism::Node # foo.bar = 1 # ^^^ # - # source://prism//lib/prism/node.rb#3362 + # pkg:gem/prism#lib/prism/node.rb:3590 sig { returns(Prism::Location) } def message_loc; end @@ -4122,7 +4227,7 @@ class Prism::CallTargetNode < ::Prism::Node # foo.bar = 1 # name `:foo` # ^^^ # - # source://prism//lib/prism/node.rb#3356 + # pkg:gem/prism#lib/prism/node.rb:3584 sig { returns(Symbol) } def name; end @@ -4131,48 +4236,44 @@ class Prism::CallTargetNode < ::Prism::Node # foo.bar = 1 # ^^^ # - # source://prism//lib/prism/node.rb#3334 + # pkg:gem/prism#lib/prism/node.rb:3562 sig { returns(Prism::Node) } def receiver; end # def safe_navigation?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#3311 + # pkg:gem/prism#lib/prism/node.rb:3539 sig { returns(T::Boolean) } def safe_navigation?; end # Save the call_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3348 + # pkg:gem/prism#lib/prism/node.rb:3576 def save_call_operator_loc(repository); end # Save the message_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3370 + # pkg:gem/prism#lib/prism/node.rb:3598 def save_message_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#3390 + # pkg:gem/prism#lib/prism/node.rb:3618 sig { override.returns(Symbol) } def type; end # def variable_call?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#3316 + # pkg:gem/prism#lib/prism/node.rb:3544 sig { returns(T::Boolean) } def variable_call?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#3395 + # pkg:gem/prism#lib/prism/node.rb:3623 def type; end end end @@ -4182,13 +4283,11 @@ end # foo => [bar => baz] # ^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3415 +# pkg:gem/prism#lib/prism/node.rb:3643 class Prism::CapturePatternNode < ::Prism::Node # Initialize a new CapturePatternNode node. # - # @return [CapturePatternNode] a new instance of CapturePatternNode - # - # source://prism//lib/prism/node.rb#3417 + # pkg:gem/prism#lib/prism/node.rb:3645 sig do params( source: Prism::Source, @@ -4205,36 +4304,36 @@ class Prism::CapturePatternNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3510 + # pkg:gem/prism#lib/prism/node.rb:3746 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3428 + # pkg:gem/prism#lib/prism/node.rb:3656 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3433 + # pkg:gem/prism#lib/prism/node.rb:3661 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3443 + # pkg:gem/prism#lib/prism/node.rb:3679 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3438 + # pkg:gem/prism#lib/prism/node.rb:3674 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?target: LocalVariableTargetNode, ?operator_loc: Location) -> CapturePatternNode # - # source://prism//lib/prism/node.rb#3448 + # pkg:gem/prism#lib/prism/node.rb:3684 sig do params( node_id: Integer, @@ -4245,33 +4344,37 @@ class Prism::CapturePatternNode < ::Prism::Node operator_loc: Prism::Location ).returns(Prism::CapturePatternNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, value: self.value, target: self.target, operator_loc: self.operator_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3433 + # pkg:gem/prism#lib/prism/node.rb:3689 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, target: LocalVariableTargetNode, operator_loc: Location } # - # source://prism//lib/prism/node.rb#3456 + # pkg:gem/prism#lib/prism/node.rb:3692 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:3666 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#3494 + # pkg:gem/prism#lib/prism/node.rb:3730 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#3489 + # pkg:gem/prism#lib/prism/node.rb:3725 sig { returns(String) } def operator; end @@ -4280,14 +4383,14 @@ class Prism::CapturePatternNode < ::Prism::Node # foo => bar # ^^ # - # source://prism//lib/prism/node.rb#3476 + # pkg:gem/prism#lib/prism/node.rb:3712 sig { returns(Prism::Location) } def operator_loc; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3484 + # pkg:gem/prism#lib/prism/node.rb:3720 def save_operator_loc(repository); end # Represents the target of the capture. @@ -4295,13 +4398,13 @@ class Prism::CapturePatternNode < ::Prism::Node # foo => bar # ^^^ # - # source://prism//lib/prism/node.rb#3470 + # pkg:gem/prism#lib/prism/node.rb:3706 sig { returns(Prism::LocalVariableTargetNode) } def target; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#3499 + # pkg:gem/prism#lib/prism/node.rb:3735 sig { override.returns(Symbol) } def type; end @@ -4310,14 +4413,14 @@ class Prism::CapturePatternNode < ::Prism::Node # foo => bar # ^^^ # - # source://prism//lib/prism/node.rb#3464 + # pkg:gem/prism#lib/prism/node.rb:3700 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#3504 + # pkg:gem/prism#lib/prism/node.rb:3740 def type; end end end @@ -4329,13 +4432,11 @@ end # end # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3524 +# pkg:gem/prism#lib/prism/node.rb:3760 class Prism::CaseMatchNode < ::Prism::Node # Initialize a new CaseMatchNode node. # - # @return [CaseMatchNode] a new instance of CaseMatchNode - # - # source://prism//lib/prism/node.rb#3526 + # pkg:gem/prism#lib/prism/node.rb:3762 sig do params( source: Prism::Source, @@ -4354,18 +4455,18 @@ class Prism::CaseMatchNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3652 + # pkg:gem/prism#lib/prism/node.rb:3897 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3539 + # pkg:gem/prism#lib/prism/node.rb:3775 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def case_keyword: () -> String # - # source://prism//lib/prism/node.rb#3626 + # pkg:gem/prism#lib/prism/node.rb:3871 sig { returns(String) } def case_keyword; end @@ -4374,25 +4475,25 @@ class Prism::CaseMatchNode < ::Prism::Node # case true; in false; end # ^^^^ # - # source://prism//lib/prism/node.rb#3597 + # pkg:gem/prism#lib/prism/node.rb:3842 sig { returns(Prism::Location) } def case_keyword_loc; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3544 + # pkg:gem/prism#lib/prism/node.rb:3780 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3558 + # pkg:gem/prism#lib/prism/node.rb:3803 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3549 + # pkg:gem/prism#lib/prism/node.rb:3794 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -4401,19 +4502,19 @@ class Prism::CaseMatchNode < ::Prism::Node # case true; in false; end # ^^^^^^^^ # - # source://prism//lib/prism/node.rb#3585 + # pkg:gem/prism#lib/prism/node.rb:3830 sig { returns(T::Array[Prism::InNode]) } def conditions; end # Returns the else clause of the case match node. This method is deprecated # in favor of #else_clause. # - # source://prism//lib/prism/node_ext.rb#467 + # pkg:gem/prism#lib/prism/node_ext.rb:470 def consequent; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?predicate: Prism::node?, ?conditions: Array[InNode], ?else_clause: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location) -> CaseMatchNode # - # source://prism//lib/prism/node.rb#3563 + # pkg:gem/prism#lib/prism/node.rb:3808 sig do params( node_id: Integer, @@ -4426,33 +4527,37 @@ class Prism::CaseMatchNode < ::Prism::Node end_keyword_loc: Prism::Location ).returns(Prism::CaseMatchNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), predicate: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, predicate: self.predicate, conditions: self.conditions, else_clause: self.else_clause, case_keyword_loc: self.case_keyword_loc, end_keyword_loc: self.end_keyword_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3544 + # pkg:gem/prism#lib/prism/node.rb:3813 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, predicate: Prism::node?, conditions: Array[InNode], else_clause: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location } # - # source://prism//lib/prism/node.rb#3571 + # pkg:gem/prism#lib/prism/node.rb:3816 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:3785 + def each_child_node; end + # Represents the else clause of the case match. # # case true; in false; else; end # ^^^^ # - # source://prism//lib/prism/node.rb#3591 + # pkg:gem/prism#lib/prism/node.rb:3836 sig { returns(T.nilable(Prism::ElseNode)) } def else_clause; end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#3631 + # pkg:gem/prism#lib/prism/node.rb:3876 sig { returns(String) } def end_keyword; end @@ -4461,7 +4566,7 @@ class Prism::CaseMatchNode < ::Prism::Node # case true; in false; end # ^^^ # - # source://prism//lib/prism/node.rb#3613 + # pkg:gem/prism#lib/prism/node.rb:3858 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -4470,7 +4575,7 @@ class Prism::CaseMatchNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#3636 + # pkg:gem/prism#lib/prism/node.rb:3881 sig { override.returns(String) } def inspect; end @@ -4479,32 +4584,32 @@ class Prism::CaseMatchNode < ::Prism::Node # case true; in false; end # ^^^^ # - # source://prism//lib/prism/node.rb#3579 + # pkg:gem/prism#lib/prism/node.rb:3824 sig { returns(T.nilable(Prism::Node)) } def predicate; end # Save the case_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3605 + # pkg:gem/prism#lib/prism/node.rb:3850 def save_case_keyword_loc(repository); end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3621 + # pkg:gem/prism#lib/prism/node.rb:3866 def save_end_keyword_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#3641 + # pkg:gem/prism#lib/prism/node.rb:3886 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#3646 + # pkg:gem/prism#lib/prism/node.rb:3891 def type; end end end @@ -4516,13 +4621,11 @@ end # end # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3669 +# pkg:gem/prism#lib/prism/node.rb:3914 class Prism::CaseNode < ::Prism::Node # Initialize a new CaseNode node. # - # @return [CaseNode] a new instance of CaseNode - # - # source://prism//lib/prism/node.rb#3671 + # pkg:gem/prism#lib/prism/node.rb:3916 sig do params( source: Prism::Source, @@ -4541,18 +4644,18 @@ class Prism::CaseNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3797 + # pkg:gem/prism#lib/prism/node.rb:4051 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3684 + # pkg:gem/prism#lib/prism/node.rb:3929 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def case_keyword: () -> String # - # source://prism//lib/prism/node.rb#3771 + # pkg:gem/prism#lib/prism/node.rb:4025 sig { returns(String) } def case_keyword; end @@ -4561,25 +4664,25 @@ class Prism::CaseNode < ::Prism::Node # case true; when false; end # ^^^^ # - # source://prism//lib/prism/node.rb#3742 + # pkg:gem/prism#lib/prism/node.rb:3996 sig { returns(Prism::Location) } def case_keyword_loc; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3689 + # pkg:gem/prism#lib/prism/node.rb:3934 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3703 + # pkg:gem/prism#lib/prism/node.rb:3957 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3694 + # pkg:gem/prism#lib/prism/node.rb:3948 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -4588,19 +4691,19 @@ class Prism::CaseNode < ::Prism::Node # case true; when false; end # ^^^^^^^^^^ # - # source://prism//lib/prism/node.rb#3730 + # pkg:gem/prism#lib/prism/node.rb:3984 sig { returns(T::Array[Prism::WhenNode]) } def conditions; end # Returns the else clause of the case node. This method is deprecated in # favor of #else_clause. # - # source://prism//lib/prism/node_ext.rb#476 + # pkg:gem/prism#lib/prism/node_ext.rb:479 def consequent; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?predicate: Prism::node?, ?conditions: Array[WhenNode], ?else_clause: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location) -> CaseNode # - # source://prism//lib/prism/node.rb#3708 + # pkg:gem/prism#lib/prism/node.rb:3962 sig do params( node_id: Integer, @@ -4613,33 +4716,37 @@ class Prism::CaseNode < ::Prism::Node end_keyword_loc: Prism::Location ).returns(Prism::CaseNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), predicate: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, predicate: self.predicate, conditions: self.conditions, else_clause: self.else_clause, case_keyword_loc: self.case_keyword_loc, end_keyword_loc: self.end_keyword_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3689 + # pkg:gem/prism#lib/prism/node.rb:3967 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, predicate: Prism::node?, conditions: Array[WhenNode], else_clause: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location } # - # source://prism//lib/prism/node.rb#3716 + # pkg:gem/prism#lib/prism/node.rb:3970 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:3939 + def each_child_node; end + # Represents the else clause of the case statement. # # case true; when false; else; end # ^^^^ # - # source://prism//lib/prism/node.rb#3736 + # pkg:gem/prism#lib/prism/node.rb:3990 sig { returns(T.nilable(Prism::ElseNode)) } def else_clause; end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#3776 + # pkg:gem/prism#lib/prism/node.rb:4030 sig { returns(String) } def end_keyword; end @@ -4648,7 +4755,7 @@ class Prism::CaseNode < ::Prism::Node # case true; when false; end # ^^^ # - # source://prism//lib/prism/node.rb#3758 + # pkg:gem/prism#lib/prism/node.rb:4012 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -4657,41 +4764,41 @@ class Prism::CaseNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#3781 + # pkg:gem/prism#lib/prism/node.rb:4035 sig { override.returns(String) } def inspect; end # Represents the predicate of the case statement. This can be either `nil` or any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). # # case true; when false; end - # ^^^^ + # ^^^^ # - # source://prism//lib/prism/node.rb#3724 + # pkg:gem/prism#lib/prism/node.rb:3978 sig { returns(T.nilable(Prism::Node)) } def predicate; end # Save the case_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3750 + # pkg:gem/prism#lib/prism/node.rb:4004 def save_case_keyword_loc(repository); end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3766 + # pkg:gem/prism#lib/prism/node.rb:4020 def save_end_keyword_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#3786 + # pkg:gem/prism#lib/prism/node.rb:4040 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#3791 + # pkg:gem/prism#lib/prism/node.rb:4045 def type; end end end @@ -4701,13 +4808,11 @@ end # class Foo end # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3812 +# pkg:gem/prism#lib/prism/node.rb:4066 class Prism::ClassNode < ::Prism::Node # Initialize a new ClassNode node. # - # @return [ClassNode] a new instance of ClassNode - # - # source://prism//lib/prism/node.rb#3814 + # pkg:gem/prism#lib/prism/node.rb:4068 sig do params( source: Prism::Source, @@ -4729,60 +4834,67 @@ class Prism::ClassNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3958 + # pkg:gem/prism#lib/prism/node.rb:4239 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3830 + # pkg:gem/prism#lib/prism/node.rb:4084 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: StatementsNode | BeginNode | nil + # Represents the body of the class. # - # source://prism//lib/prism/node.rb#3908 + # class Foo + # foo + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:4184 sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3835 + # pkg:gem/prism#lib/prism/node.rb:4089 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def class_keyword: () -> String # - # source://prism//lib/prism/node.rb#3927 + # pkg:gem/prism#lib/prism/node.rb:4208 sig { returns(String) } def class_keyword; end - # attr_reader class_keyword_loc: Location + # Represents the location of the `class` keyword. + # + # class Foo end + # ^^^^^ # - # source://prism//lib/prism/node.rb#3870 + # pkg:gem/prism#lib/prism/node.rb:4136 sig { returns(Prism::Location) } def class_keyword_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3849 + # pkg:gem/prism#lib/prism/node.rb:4112 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3840 + # pkg:gem/prism#lib/prism/node.rb:4103 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader constant_path: ConstantReadNode | ConstantPathNode | CallNode # - # source://prism//lib/prism/node.rb#3883 + # pkg:gem/prism#lib/prism/node.rb:4149 sig { returns(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode)) } def constant_path; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?class_keyword_loc: Location, ?constant_path: ConstantReadNode | ConstantPathNode | CallNode, ?inheritance_operator_loc: Location?, ?superclass: Prism::node?, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location, ?name: Symbol) -> ClassNode # - # source://prism//lib/prism/node.rb#3854 + # pkg:gem/prism#lib/prism/node.rb:4117 sig do params( node_id: Integer, @@ -4798,30 +4910,37 @@ class Prism::ClassNode < ::Prism::Node name: Symbol ).returns(Prism::ClassNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), inheritance_operator_loc: T.unsafe(nil), superclass: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, locals: self.locals, class_keyword_loc: self.class_keyword_loc, constant_path: self.constant_path, inheritance_operator_loc: self.inheritance_operator_loc, superclass: self.superclass, body: self.body, end_keyword_loc: self.end_keyword_loc, name: self.name); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3835 + # pkg:gem/prism#lib/prism/node.rb:4122 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], class_keyword_loc: Location, constant_path: ConstantReadNode | ConstantPathNode | CallNode, inheritance_operator_loc: Location?, superclass: Prism::node?, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#3862 + # pkg:gem/prism#lib/prism/node.rb:4125 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:4094 + def each_child_node; end + # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#3937 + # pkg:gem/prism#lib/prism/node.rb:4218 sig { returns(String) } def end_keyword; end - # attr_reader end_keyword_loc: Location + # Represents the location of the `end` keyword. + # + # class Foo end + # ^^^ # - # source://prism//lib/prism/node.rb#3911 + # pkg:gem/prism#lib/prism/node.rb:4190 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -4830,68 +4949,76 @@ class Prism::ClassNode < ::Prism::Node # def inheritance_operator: () -> String? # - # source://prism//lib/prism/node.rb#3932 + # pkg:gem/prism#lib/prism/node.rb:4213 sig { returns(T.nilable(String)) } def inheritance_operator; end - # attr_reader inheritance_operator_loc: Location? + # Represents the location of the `<` operator. + # + # class Foo < Bar + # ^ # - # source://prism//lib/prism/node.rb#3886 + # pkg:gem/prism#lib/prism/node.rb:4155 sig { returns(T.nilable(Prism::Location)) } def inheritance_operator_loc; end # def inspect -> String # - # source://prism//lib/prism/node.rb#3942 + # pkg:gem/prism#lib/prism/node.rb:4223 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#3867 + # pkg:gem/prism#lib/prism/node.rb:4130 sig { returns(T::Array[Symbol]) } def locals; end - # attr_reader name: Symbol + # The name of the class. + # + # class Foo end # name `:Foo` # - # source://prism//lib/prism/node.rb#3924 + # pkg:gem/prism#lib/prism/node.rb:4205 sig { returns(Symbol) } def name; end # Save the class_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3878 + # pkg:gem/prism#lib/prism/node.rb:4144 def save_class_keyword_loc(repository); end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3919 + # pkg:gem/prism#lib/prism/node.rb:4198 def save_end_keyword_loc(repository); end # Save the inheritance_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#3900 + # pkg:gem/prism#lib/prism/node.rb:4169 def save_inheritance_operator_loc(repository); end - # attr_reader superclass: Prism::node? + # Represents the superclass of the class. # - # source://prism//lib/prism/node.rb#3905 + # class Foo < Bar + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:4177 sig { returns(T.nilable(Prism::Node)) } def superclass; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#3947 + # pkg:gem/prism#lib/prism/node.rb:4228 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#3952 + # pkg:gem/prism#lib/prism/node.rb:4233 def type; end end end @@ -4901,13 +5028,11 @@ end # @@target &&= value # ^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3976 +# pkg:gem/prism#lib/prism/node.rb:4257 class Prism::ClassVariableAndWriteNode < ::Prism::Node # Initialize a new ClassVariableAndWriteNode node. # - # @return [ClassVariableAndWriteNode] a new instance of ClassVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#3978 + # pkg:gem/prism#lib/prism/node.rb:4259 sig do params( source: Prism::Source, @@ -4925,36 +5050,36 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4088 + # pkg:gem/prism#lib/prism/node.rb:4376 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3990 + # pkg:gem/prism#lib/prism/node.rb:4271 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3995 + # pkg:gem/prism#lib/prism/node.rb:4276 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4005 + # pkg:gem/prism#lib/prism/node.rb:4293 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4000 + # pkg:gem/prism#lib/prism/node.rb:4288 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ClassVariableAndWriteNode # - # source://prism//lib/prism/node.rb#4010 + # pkg:gem/prism#lib/prism/node.rb:4298 sig do params( node_id: Integer, @@ -4966,30 +5091,34 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node value: Prism::Node ).returns(Prism::ClassVariableAndWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, operator_loc: self.operator_loc, value: self.value); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#3995 + # pkg:gem/prism#lib/prism/node.rb:4303 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#4018 + # pkg:gem/prism#lib/prism/node.rb:4306 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#164 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:165 def desugar; end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:4281 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#4072 + # pkg:gem/prism#lib/prism/node.rb:4360 sig { override.returns(String) } def inspect; end @@ -4998,7 +5127,7 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # @@target &&= value # name `:@@target` # ^^^^^^^^ # - # source://prism//lib/prism/node.rb#4026 + # pkg:gem/prism#lib/prism/node.rb:4314 sig { returns(Symbol) } def name; end @@ -5007,13 +5136,13 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # @@target &&= value # ^^^^^^^^ # - # source://prism//lib/prism/node.rb#4032 + # pkg:gem/prism#lib/prism/node.rb:4320 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4067 + # pkg:gem/prism#lib/prism/node.rb:4355 sig { returns(String) } def operator; end @@ -5022,25 +5151,25 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # @@target &&= value # ^^^ # - # source://prism//lib/prism/node.rb#4048 + # pkg:gem/prism#lib/prism/node.rb:4336 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4040 + # pkg:gem/prism#lib/prism/node.rb:4328 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4056 + # pkg:gem/prism#lib/prism/node.rb:4344 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#4077 + # pkg:gem/prism#lib/prism/node.rb:4365 sig { override.returns(Symbol) } def type; end @@ -5049,14 +5178,14 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # @@target &&= value # ^^^^^ # - # source://prism//lib/prism/node.rb#4064 + # pkg:gem/prism#lib/prism/node.rb:4352 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#4082 + # pkg:gem/prism#lib/prism/node.rb:4370 def type; end end end @@ -5066,13 +5195,11 @@ end # @@target += value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4101 +# pkg:gem/prism#lib/prism/node.rb:4389 class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # Initialize a new ClassVariableOperatorWriteNode node. # - # @return [ClassVariableOperatorWriteNode] a new instance of ClassVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#4103 + # pkg:gem/prism#lib/prism/node.rb:4391 sig do params( source: Prism::Source, @@ -5091,48 +5218,48 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4200 + # pkg:gem/prism#lib/prism/node.rb:4495 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4116 + # pkg:gem/prism#lib/prism/node.rb:4404 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#4181 + # pkg:gem/prism#lib/prism/node.rb:4476 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#4165 + # pkg:gem/prism#lib/prism/node.rb:4460 sig { returns(Prism::Location) } def binary_operator_loc; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4121 + # pkg:gem/prism#lib/prism/node.rb:4409 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4131 + # pkg:gem/prism#lib/prism/node.rb:4426 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4126 + # pkg:gem/prism#lib/prism/node.rb:4421 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ClassVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#4136 + # pkg:gem/prism#lib/prism/node.rb:4431 sig do params( node_id: Integer, @@ -5145,85 +5272,89 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node binary_operator: Symbol ).returns(Prism::ClassVariableOperatorWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, binary_operator_loc: self.binary_operator_loc, value: self.value, binary_operator: self.binary_operator); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4121 + # pkg:gem/prism#lib/prism/node.rb:4436 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } # - # source://prism//lib/prism/node.rb#4144 + # pkg:gem/prism#lib/prism/node.rb:4439 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#176 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:177 def desugar; end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:4414 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#4184 + # pkg:gem/prism#lib/prism/node.rb:4479 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4149 + # pkg:gem/prism#lib/prism/node.rb:4444 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4152 + # pkg:gem/prism#lib/prism/node.rb:4447 sig { returns(Prism::Location) } def name_loc; end # Returns the binary operator used to modify the receiver. This method is # deprecated in favor of #binary_operator. # - # source://prism//lib/prism/node_ext.rb#355 + # pkg:gem/prism#lib/prism/node_ext.rb:358 def operator; end # Returns the location of the binary operator used to modify the receiver. # This method is deprecated in favor of #binary_operator_loc. # - # source://prism//lib/prism/node_ext.rb#362 + # pkg:gem/prism#lib/prism/node_ext.rb:365 def operator_loc; end # Save the binary_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4173 + # pkg:gem/prism#lib/prism/node.rb:4468 def save_binary_operator_loc(repository); end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4160 + # pkg:gem/prism#lib/prism/node.rb:4455 def save_name_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#4189 + # pkg:gem/prism#lib/prism/node.rb:4484 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4178 + # pkg:gem/prism#lib/prism/node.rb:4473 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#4194 + # pkg:gem/prism#lib/prism/node.rb:4489 def type; end end end @@ -5233,13 +5364,11 @@ end # @@target ||= value # ^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4214 +# pkg:gem/prism#lib/prism/node.rb:4509 class Prism::ClassVariableOrWriteNode < ::Prism::Node # Initialize a new ClassVariableOrWriteNode node. # - # @return [ClassVariableOrWriteNode] a new instance of ClassVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#4216 + # pkg:gem/prism#lib/prism/node.rb:4511 sig do params( source: Prism::Source, @@ -5257,36 +5386,36 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4314 + # pkg:gem/prism#lib/prism/node.rb:4616 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4228 + # pkg:gem/prism#lib/prism/node.rb:4523 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4233 + # pkg:gem/prism#lib/prism/node.rb:4528 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4243 + # pkg:gem/prism#lib/prism/node.rb:4545 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4238 + # pkg:gem/prism#lib/prism/node.rb:4540 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ClassVariableOrWriteNode # - # source://prism//lib/prism/node.rb#4248 + # pkg:gem/prism#lib/prism/node.rb:4550 sig do params( node_id: Integer, @@ -5298,85 +5427,89 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node value: Prism::Node ).returns(Prism::ClassVariableOrWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, operator_loc: self.operator_loc, value: self.value); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4233 + # pkg:gem/prism#lib/prism/node.rb:4555 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#4256 + # pkg:gem/prism#lib/prism/node.rb:4558 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#170 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:171 def desugar; end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:4533 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#4298 + # pkg:gem/prism#lib/prism/node.rb:4600 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4261 + # pkg:gem/prism#lib/prism/node.rb:4563 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4264 + # pkg:gem/prism#lib/prism/node.rb:4566 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4293 + # pkg:gem/prism#lib/prism/node.rb:4595 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4277 + # pkg:gem/prism#lib/prism/node.rb:4579 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4272 + # pkg:gem/prism#lib/prism/node.rb:4574 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4285 + # pkg:gem/prism#lib/prism/node.rb:4587 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#4303 + # pkg:gem/prism#lib/prism/node.rb:4605 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4290 + # pkg:gem/prism#lib/prism/node.rb:4592 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#4308 + # pkg:gem/prism#lib/prism/node.rb:4610 def type; end end end @@ -5386,49 +5519,47 @@ end # @@foo # ^^^^^ # -# source://prism//lib/prism/node.rb#4327 +# pkg:gem/prism#lib/prism/node.rb:4629 class Prism::ClassVariableReadNode < ::Prism::Node # Initialize a new ClassVariableReadNode node. # - # @return [ClassVariableReadNode] a new instance of ClassVariableReadNode - # - # source://prism//lib/prism/node.rb#4329 + # pkg:gem/prism#lib/prism/node.rb:4631 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4394 + # pkg:gem/prism#lib/prism/node.rb:4702 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4338 + # pkg:gem/prism#lib/prism/node.rb:4640 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4343 + # pkg:gem/prism#lib/prism/node.rb:4645 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4353 + # pkg:gem/prism#lib/prism/node.rb:4661 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4348 + # pkg:gem/prism#lib/prism/node.rb:4656 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ClassVariableReadNode # - # source://prism//lib/prism/node.rb#4358 + # pkg:gem/prism#lib/prism/node.rb:4666 sig do params( node_id: Integer, @@ -5437,27 +5568,31 @@ class Prism::ClassVariableReadNode < ::Prism::Node name: Symbol ).returns(Prism::ClassVariableReadNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4343 + # pkg:gem/prism#lib/prism/node.rb:4671 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#4366 + # pkg:gem/prism#lib/prism/node.rb:4674 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:4650 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#4378 + # pkg:gem/prism#lib/prism/node.rb:4686 sig { override.returns(String) } def inspect; end @@ -5467,20 +5602,20 @@ class Prism::ClassVariableReadNode < ::Prism::Node # # @@_test # name `:@@_test` # - # source://prism//lib/prism/node.rb#4375 + # pkg:gem/prism#lib/prism/node.rb:4683 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#4383 + # pkg:gem/prism#lib/prism/node.rb:4691 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#4388 + # pkg:gem/prism#lib/prism/node.rb:4696 def type; end end end @@ -5490,49 +5625,47 @@ end # @@foo, @@bar = baz # ^^^^^ ^^^^^ # -# source://prism//lib/prism/node.rb#4404 +# pkg:gem/prism#lib/prism/node.rb:4712 class Prism::ClassVariableTargetNode < ::Prism::Node # Initialize a new ClassVariableTargetNode node. # - # @return [ClassVariableTargetNode] a new instance of ClassVariableTargetNode - # - # source://prism//lib/prism/node.rb#4406 + # pkg:gem/prism#lib/prism/node.rb:4714 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4467 + # pkg:gem/prism#lib/prism/node.rb:4781 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4415 + # pkg:gem/prism#lib/prism/node.rb:4723 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4420 + # pkg:gem/prism#lib/prism/node.rb:4728 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4430 + # pkg:gem/prism#lib/prism/node.rb:4744 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4425 + # pkg:gem/prism#lib/prism/node.rb:4739 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ClassVariableTargetNode # - # source://prism//lib/prism/node.rb#4435 + # pkg:gem/prism#lib/prism/node.rb:4749 sig do params( node_id: Integer, @@ -5541,46 +5674,50 @@ class Prism::ClassVariableTargetNode < ::Prism::Node name: Symbol ).returns(Prism::ClassVariableTargetNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4420 + # pkg:gem/prism#lib/prism/node.rb:4754 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#4443 + # pkg:gem/prism#lib/prism/node.rb:4757 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:4733 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#4451 + # pkg:gem/prism#lib/prism/node.rb:4765 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4448 + # pkg:gem/prism#lib/prism/node.rb:4762 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#4456 + # pkg:gem/prism#lib/prism/node.rb:4770 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#4461 + # pkg:gem/prism#lib/prism/node.rb:4775 def type; end end end @@ -5590,13 +5727,11 @@ end # @@foo = 1 # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4477 +# pkg:gem/prism#lib/prism/node.rb:4791 class Prism::ClassVariableWriteNode < ::Prism::Node # Initialize a new ClassVariableWriteNode node. # - # @return [ClassVariableWriteNode] a new instance of ClassVariableWriteNode - # - # source://prism//lib/prism/node.rb#4479 + # pkg:gem/prism#lib/prism/node.rb:4793 sig do params( source: Prism::Source, @@ -5614,36 +5749,36 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4593 + # pkg:gem/prism#lib/prism/node.rb:4914 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4491 + # pkg:gem/prism#lib/prism/node.rb:4805 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4496 + # pkg:gem/prism#lib/prism/node.rb:4810 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4506 + # pkg:gem/prism#lib/prism/node.rb:4827 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4501 + # pkg:gem/prism#lib/prism/node.rb:4822 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> ClassVariableWriteNode # - # source://prism//lib/prism/node.rb#4511 + # pkg:gem/prism#lib/prism/node.rb:4832 sig do params( node_id: Integer, @@ -5655,27 +5790,31 @@ class Prism::ClassVariableWriteNode < ::Prism::Node operator_loc: Prism::Location ).returns(Prism::ClassVariableWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, value: self.value, operator_loc: self.operator_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4496 + # pkg:gem/prism#lib/prism/node.rb:4837 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#4519 + # pkg:gem/prism#lib/prism/node.rb:4840 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:4815 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#4577 + # pkg:gem/prism#lib/prism/node.rb:4898 sig { override.returns(String) } def inspect; end @@ -5685,7 +5824,7 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # # @@_test = :test # name `@@_test` # - # source://prism//lib/prism/node.rb#4528 + # pkg:gem/prism#lib/prism/node.rb:4849 sig { returns(Symbol) } def name; end @@ -5694,13 +5833,13 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # @@foo = :bar # ^^^^^ # - # source://prism//lib/prism/node.rb#4534 + # pkg:gem/prism#lib/prism/node.rb:4855 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4572 + # pkg:gem/prism#lib/prism/node.rb:4893 sig { returns(String) } def operator; end @@ -5709,25 +5848,25 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # @@foo = :bar # ^ # - # source://prism//lib/prism/node.rb#4559 + # pkg:gem/prism#lib/prism/node.rb:4880 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4542 + # pkg:gem/prism#lib/prism/node.rb:4863 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4567 + # pkg:gem/prism#lib/prism/node.rb:4888 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#4582 + # pkg:gem/prism#lib/prism/node.rb:4903 sig { override.returns(Symbol) } def type; end @@ -5739,14 +5878,14 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # @@_xyz = 123 # ^^^ # - # source://prism//lib/prism/node.rb#4553 + # pkg:gem/prism#lib/prism/node.rb:4874 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#4587 + # pkg:gem/prism#lib/prism/node.rb:4908 def type; end end end @@ -5765,75 +5904,67 @@ end # introduce some kind of LRU cache to limit the number of entries, but this # has not yet been implemented. # -# source://prism//lib/prism/parse_result.rb#189 +# pkg:gem/prism#lib/prism/parse_result.rb:186 class Prism::CodeUnitsCache # Initialize a new cache with the given source and encoding. # - # @return [CodeUnitsCache] a new instance of CodeUnitsCache - # - # source://prism//lib/prism/parse_result.rb#215 + # pkg:gem/prism#lib/prism/parse_result.rb:212 sig { params(source: String, encoding: Encoding).void } def initialize(source, encoding); end # Retrieve the code units offset from the given byte offset. # - # source://prism//lib/prism/parse_result.rb#229 + # pkg:gem/prism#lib/prism/parse_result.rb:226 sig { params(byte_offset: Integer).returns(Integer) } def [](byte_offset); end end -# source://prism//lib/prism/parse_result.rb#201 +# pkg:gem/prism#lib/prism/parse_result.rb:198 class Prism::CodeUnitsCache::LengthCounter - # @return [LengthCounter] a new instance of LengthCounter - # - # source://prism//lib/prism/parse_result.rb#202 + # pkg:gem/prism#lib/prism/parse_result.rb:199 def initialize(source, encoding); end - # source://prism//lib/prism/parse_result.rb#207 + # pkg:gem/prism#lib/prism/parse_result.rb:204 def count(byte_offset, byte_length); end end -# source://prism//lib/prism/parse_result.rb#190 +# pkg:gem/prism#lib/prism/parse_result.rb:187 class Prism::CodeUnitsCache::UTF16Counter - # @return [UTF16Counter] a new instance of UTF16Counter - # - # source://prism//lib/prism/parse_result.rb#191 + # pkg:gem/prism#lib/prism/parse_result.rb:188 def initialize(source, encoding); end - # source://prism//lib/prism/parse_result.rb#196 + # pkg:gem/prism#lib/prism/parse_result.rb:193 def count(byte_offset, byte_length); end end # This represents a comment that was encountered during parsing. It is the # base class for all comment types. # -# source://prism//lib/prism/parse_result.rb#524 +# pkg:gem/prism#lib/prism/parse_result.rb:521 class Prism::Comment abstract! # Create a new comment object with the given location. # - # @return [Comment] a new instance of Comment - # - # source://prism//lib/prism/parse_result.rb#529 + # pkg:gem/prism#lib/prism/parse_result.rb:526 sig { params(location: Prism::Location).void } def initialize(location); end # Implement the hash pattern matching interface for Comment. # - # source://prism//lib/prism/parse_result.rb#534 + # pkg:gem/prism#lib/prism/parse_result.rb:531 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # The location of this comment in the source. # - # source://prism//lib/prism/parse_result.rb#526 + # pkg:gem/prism#lib/prism/parse_result.rb:523 sig { returns(Prism::Location) } def location; end # Returns the content of the comment by slicing it from the source code. # - # source://prism//lib/prism/parse_result.rb#539 + # pkg:gem/prism#lib/prism/parse_result.rb:536 sig { returns(String) } def slice; end @@ -5858,930 +5989,779 @@ end # Prism.parse("1 + 2").value.accept(SExpressions.new) # # => [:program, [[[:call, [[:integer], [:arguments, [[:integer]]]]]]]] # -# source://prism//lib/prism/compiler.rb#27 +# pkg:gem/prism#lib/prism/compiler.rb:30 class Prism::Compiler < ::Prism::Visitor # Visit an individual node. # - # source://prism//lib/prism/compiler.rb#29 + # pkg:gem/prism#lib/prism/compiler.rb:32 sig { params(node: T.nilable(Prism::Node)).returns(T.untyped) } def visit(node); end - # Visit the child nodes of the given node. # Compile a AliasGlobalVariableNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:47 def visit_alias_global_variable_node(node); end - # Visit the child nodes of the given node. # Compile a AliasMethodNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:52 def visit_alias_method_node(node); end # Visit a list of nodes. # - # source://prism//lib/prism/compiler.rb#34 + # pkg:gem/prism#lib/prism/compiler.rb:37 sig { params(nodes: T::Array[T.nilable(Prism::Node)]).returns(T::Array[T.untyped]) } def visit_all(nodes); end - # Visit the child nodes of the given node. # Compile a AlternationPatternNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:57 def visit_alternation_pattern_node(node); end - # Visit the child nodes of the given node. # Compile a AndNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:62 def visit_and_node(node); end - # Visit the child nodes of the given node. # Compile a ArgumentsNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:67 def visit_arguments_node(node); end - # Visit the child nodes of the given node. # Compile a ArrayNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:72 def visit_array_node(node); end - # Visit the child nodes of the given node. # Compile a ArrayPatternNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:77 def visit_array_pattern_node(node); end - # Visit the child nodes of the given node. # Compile a AssocNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:82 def visit_assoc_node(node); end - # Visit the child nodes of the given node. # Compile a AssocSplatNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:87 def visit_assoc_splat_node(node); end - # Visit the child nodes of the given node. # Compile a BackReferenceReadNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:92 def visit_back_reference_read_node(node); end - # Visit the child nodes of the given node. # Compile a BeginNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:97 def visit_begin_node(node); end - # Visit the child nodes of the given node. # Compile a BlockArgumentNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:102 def visit_block_argument_node(node); end - # Visit the child nodes of the given node. # Compile a BlockLocalVariableNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:107 def visit_block_local_variable_node(node); end - # Visit the child nodes of the given node. # Compile a BlockNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:112 def visit_block_node(node); end - # Visit the child nodes of the given node. # Compile a BlockParameterNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:117 def visit_block_parameter_node(node); end - # Visit the child nodes of the given node. # Compile a BlockParametersNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:122 def visit_block_parameters_node(node); end - # Visit the child nodes of the given node. # Compile a BreakNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:127 def visit_break_node(node); end - # Visit the child nodes of the given node. # Compile a CallAndWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:132 def visit_call_and_write_node(node); end - # Visit the child nodes of the given node. # Compile a CallNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:137 def visit_call_node(node); end - # Visit the child nodes of the given node. # Compile a CallOperatorWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:142 def visit_call_operator_write_node(node); end - # Visit the child nodes of the given node. # Compile a CallOrWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:147 def visit_call_or_write_node(node); end - # Visit the child nodes of the given node. # Compile a CallTargetNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:152 def visit_call_target_node(node); end - # Visit the child nodes of the given node. # Compile a CapturePatternNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:157 def visit_capture_pattern_node(node); end - # Visit the child nodes of the given node. # Compile a CaseMatchNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:162 def visit_case_match_node(node); end - # Visit the child nodes of the given node. # Compile a CaseNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:167 def visit_case_node(node); end # Visit the child nodes of the given node. # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:42 sig { params(node: Prism::Node).returns(T::Array[T.untyped]) } def visit_child_nodes(node); end - # Visit the child nodes of the given node. # Compile a ClassNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:172 def visit_class_node(node); end - # Visit the child nodes of the given node. # Compile a ClassVariableAndWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:177 def visit_class_variable_and_write_node(node); end - # Visit the child nodes of the given node. # Compile a ClassVariableOperatorWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:182 def visit_class_variable_operator_write_node(node); end - # Visit the child nodes of the given node. # Compile a ClassVariableOrWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:187 def visit_class_variable_or_write_node(node); end - # Visit the child nodes of the given node. # Compile a ClassVariableReadNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:192 def visit_class_variable_read_node(node); end - # Visit the child nodes of the given node. # Compile a ClassVariableTargetNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:197 def visit_class_variable_target_node(node); end - # Visit the child nodes of the given node. # Compile a ClassVariableWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:202 def visit_class_variable_write_node(node); end - # Visit the child nodes of the given node. # Compile a ConstantAndWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:207 def visit_constant_and_write_node(node); end - # Visit the child nodes of the given node. # Compile a ConstantOperatorWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:212 def visit_constant_operator_write_node(node); end - # Visit the child nodes of the given node. # Compile a ConstantOrWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:217 def visit_constant_or_write_node(node); end - # Visit the child nodes of the given node. # Compile a ConstantPathAndWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:222 def visit_constant_path_and_write_node(node); end - # Visit the child nodes of the given node. # Compile a ConstantPathNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:227 def visit_constant_path_node(node); end - # Visit the child nodes of the given node. # Compile a ConstantPathOperatorWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:232 def visit_constant_path_operator_write_node(node); end - # Visit the child nodes of the given node. # Compile a ConstantPathOrWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:237 def visit_constant_path_or_write_node(node); end - # Visit the child nodes of the given node. # Compile a ConstantPathTargetNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:242 def visit_constant_path_target_node(node); end - # Visit the child nodes of the given node. # Compile a ConstantPathWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:247 def visit_constant_path_write_node(node); end - # Visit the child nodes of the given node. # Compile a ConstantReadNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:252 def visit_constant_read_node(node); end - # Visit the child nodes of the given node. # Compile a ConstantTargetNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:257 def visit_constant_target_node(node); end - # Visit the child nodes of the given node. # Compile a ConstantWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:262 def visit_constant_write_node(node); end - # Visit the child nodes of the given node. # Compile a DefNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:267 def visit_def_node(node); end - # Visit the child nodes of the given node. # Compile a DefinedNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:272 def visit_defined_node(node); end - # Visit the child nodes of the given node. # Compile a ElseNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:277 def visit_else_node(node); end - # Visit the child nodes of the given node. # Compile a EmbeddedStatementsNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:282 def visit_embedded_statements_node(node); end - # Visit the child nodes of the given node. # Compile a EmbeddedVariableNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:287 def visit_embedded_variable_node(node); end - # Visit the child nodes of the given node. # Compile a EnsureNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:292 def visit_ensure_node(node); end - # Visit the child nodes of the given node. # Compile a FalseNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:297 def visit_false_node(node); end - # Visit the child nodes of the given node. # Compile a FindPatternNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:302 def visit_find_pattern_node(node); end - # Visit the child nodes of the given node. # Compile a FlipFlopNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:307 def visit_flip_flop_node(node); end - # Visit the child nodes of the given node. # Compile a FloatNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:312 def visit_float_node(node); end - # Visit the child nodes of the given node. # Compile a ForNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:317 def visit_for_node(node); end - # Visit the child nodes of the given node. # Compile a ForwardingArgumentsNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:322 def visit_forwarding_arguments_node(node); end - # Visit the child nodes of the given node. # Compile a ForwardingParameterNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:327 def visit_forwarding_parameter_node(node); end - # Visit the child nodes of the given node. # Compile a ForwardingSuperNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:332 def visit_forwarding_super_node(node); end - # Visit the child nodes of the given node. # Compile a GlobalVariableAndWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:337 def visit_global_variable_and_write_node(node); end - # Visit the child nodes of the given node. # Compile a GlobalVariableOperatorWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:342 def visit_global_variable_operator_write_node(node); end - # Visit the child nodes of the given node. # Compile a GlobalVariableOrWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:347 def visit_global_variable_or_write_node(node); end - # Visit the child nodes of the given node. # Compile a GlobalVariableReadNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:352 def visit_global_variable_read_node(node); end - # Visit the child nodes of the given node. # Compile a GlobalVariableTargetNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:357 def visit_global_variable_target_node(node); end - # Visit the child nodes of the given node. # Compile a GlobalVariableWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:362 def visit_global_variable_write_node(node); end - # Visit the child nodes of the given node. # Compile a HashNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:367 def visit_hash_node(node); end - # Visit the child nodes of the given node. # Compile a HashPatternNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:372 def visit_hash_pattern_node(node); end - # Visit the child nodes of the given node. # Compile a IfNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:377 def visit_if_node(node); end - # Visit the child nodes of the given node. # Compile a ImaginaryNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:382 def visit_imaginary_node(node); end - # Visit the child nodes of the given node. # Compile a ImplicitNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:387 def visit_implicit_node(node); end - # Visit the child nodes of the given node. # Compile a ImplicitRestNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:392 def visit_implicit_rest_node(node); end - # Visit the child nodes of the given node. # Compile a InNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:397 def visit_in_node(node); end - # Visit the child nodes of the given node. # Compile a IndexAndWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:402 def visit_index_and_write_node(node); end - # Visit the child nodes of the given node. # Compile a IndexOperatorWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:407 def visit_index_operator_write_node(node); end - # Visit the child nodes of the given node. # Compile a IndexOrWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:412 def visit_index_or_write_node(node); end - # Visit the child nodes of the given node. # Compile a IndexTargetNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:417 def visit_index_target_node(node); end - # Visit the child nodes of the given node. # Compile a InstanceVariableAndWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:422 def visit_instance_variable_and_write_node(node); end - # Visit the child nodes of the given node. # Compile a InstanceVariableOperatorWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:427 def visit_instance_variable_operator_write_node(node); end - # Visit the child nodes of the given node. # Compile a InstanceVariableOrWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:432 def visit_instance_variable_or_write_node(node); end - # Visit the child nodes of the given node. # Compile a InstanceVariableReadNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:437 def visit_instance_variable_read_node(node); end - # Visit the child nodes of the given node. # Compile a InstanceVariableTargetNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:442 def visit_instance_variable_target_node(node); end - # Visit the child nodes of the given node. # Compile a InstanceVariableWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:447 def visit_instance_variable_write_node(node); end - # Visit the child nodes of the given node. # Compile a IntegerNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:452 def visit_integer_node(node); end - # Visit the child nodes of the given node. # Compile a InterpolatedMatchLastLineNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:457 def visit_interpolated_match_last_line_node(node); end - # Visit the child nodes of the given node. # Compile a InterpolatedRegularExpressionNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:462 def visit_interpolated_regular_expression_node(node); end - # Visit the child nodes of the given node. # Compile a InterpolatedStringNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:467 def visit_interpolated_string_node(node); end - # Visit the child nodes of the given node. # Compile a InterpolatedSymbolNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:472 def visit_interpolated_symbol_node(node); end - # Visit the child nodes of the given node. # Compile a InterpolatedXStringNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:477 def visit_interpolated_x_string_node(node); end - # Visit the child nodes of the given node. # Compile a ItLocalVariableReadNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:482 def visit_it_local_variable_read_node(node); end - # Visit the child nodes of the given node. # Compile a ItParametersNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:487 def visit_it_parameters_node(node); end - # Visit the child nodes of the given node. # Compile a KeywordHashNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:492 def visit_keyword_hash_node(node); end - # Visit the child nodes of the given node. # Compile a KeywordRestParameterNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:497 def visit_keyword_rest_parameter_node(node); end - # Visit the child nodes of the given node. # Compile a LambdaNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:502 def visit_lambda_node(node); end - # Visit the child nodes of the given node. # Compile a LocalVariableAndWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:507 def visit_local_variable_and_write_node(node); end - # Visit the child nodes of the given node. # Compile a LocalVariableOperatorWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:512 def visit_local_variable_operator_write_node(node); end - # Visit the child nodes of the given node. # Compile a LocalVariableOrWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:517 def visit_local_variable_or_write_node(node); end - # Visit the child nodes of the given node. # Compile a LocalVariableReadNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:522 def visit_local_variable_read_node(node); end - # Visit the child nodes of the given node. # Compile a LocalVariableTargetNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:527 def visit_local_variable_target_node(node); end - # Visit the child nodes of the given node. # Compile a LocalVariableWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:532 def visit_local_variable_write_node(node); end - # Visit the child nodes of the given node. # Compile a MatchLastLineNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:537 def visit_match_last_line_node(node); end - # Visit the child nodes of the given node. # Compile a MatchPredicateNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:542 def visit_match_predicate_node(node); end - # Visit the child nodes of the given node. # Compile a MatchRequiredNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:547 def visit_match_required_node(node); end - # Visit the child nodes of the given node. # Compile a MatchWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:552 def visit_match_write_node(node); end - # Visit the child nodes of the given node. # Compile a MissingNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:557 def visit_missing_node(node); end - # Visit the child nodes of the given node. # Compile a ModuleNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:562 def visit_module_node(node); end - # Visit the child nodes of the given node. # Compile a MultiTargetNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:567 def visit_multi_target_node(node); end - # Visit the child nodes of the given node. # Compile a MultiWriteNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:572 def visit_multi_write_node(node); end - # Visit the child nodes of the given node. # Compile a NextNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:577 def visit_next_node(node); end - # Visit the child nodes of the given node. # Compile a NilNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:582 def visit_nil_node(node); end - # Visit the child nodes of the given node. # Compile a NoKeywordsParameterNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:587 def visit_no_keywords_parameter_node(node); end - # Visit the child nodes of the given node. # Compile a NumberedParametersNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:592 def visit_numbered_parameters_node(node); end - # Visit the child nodes of the given node. # Compile a NumberedReferenceReadNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:597 def visit_numbered_reference_read_node(node); end - # Visit the child nodes of the given node. # Compile a OptionalKeywordParameterNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:602 def visit_optional_keyword_parameter_node(node); end - # Visit the child nodes of the given node. # Compile a OptionalParameterNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:607 def visit_optional_parameter_node(node); end - # Visit the child nodes of the given node. # Compile a OrNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:612 def visit_or_node(node); end - # Visit the child nodes of the given node. # Compile a ParametersNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:617 def visit_parameters_node(node); end - # Visit the child nodes of the given node. # Compile a ParenthesesNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:622 def visit_parentheses_node(node); end - # Visit the child nodes of the given node. # Compile a PinnedExpressionNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:627 def visit_pinned_expression_node(node); end - # Visit the child nodes of the given node. # Compile a PinnedVariableNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:632 def visit_pinned_variable_node(node); end - # Visit the child nodes of the given node. # Compile a PostExecutionNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:637 def visit_post_execution_node(node); end - # Visit the child nodes of the given node. # Compile a PreExecutionNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:642 def visit_pre_execution_node(node); end - # Visit the child nodes of the given node. # Compile a ProgramNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:647 def visit_program_node(node); end - # Visit the child nodes of the given node. # Compile a RangeNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:652 def visit_range_node(node); end - # Visit the child nodes of the given node. # Compile a RationalNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:657 def visit_rational_node(node); end - # Visit the child nodes of the given node. # Compile a RedoNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:662 def visit_redo_node(node); end - # Visit the child nodes of the given node. # Compile a RegularExpressionNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:667 def visit_regular_expression_node(node); end - # Visit the child nodes of the given node. # Compile a RequiredKeywordParameterNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:672 def visit_required_keyword_parameter_node(node); end - # Visit the child nodes of the given node. # Compile a RequiredParameterNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:677 def visit_required_parameter_node(node); end - # Visit the child nodes of the given node. # Compile a RescueModifierNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:682 def visit_rescue_modifier_node(node); end - # Visit the child nodes of the given node. # Compile a RescueNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:687 def visit_rescue_node(node); end - # Visit the child nodes of the given node. # Compile a RestParameterNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:692 def visit_rest_parameter_node(node); end - # Visit the child nodes of the given node. # Compile a RetryNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:697 def visit_retry_node(node); end - # Visit the child nodes of the given node. # Compile a ReturnNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:702 def visit_return_node(node); end - # Visit the child nodes of the given node. # Compile a SelfNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:707 def visit_self_node(node); end - # Visit the child nodes of the given node. # Compile a ShareableConstantNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:712 def visit_shareable_constant_node(node); end - # Visit the child nodes of the given node. # Compile a SingletonClassNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:717 def visit_singleton_class_node(node); end - # Visit the child nodes of the given node. # Compile a SourceEncodingNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:722 def visit_source_encoding_node(node); end - # Visit the child nodes of the given node. # Compile a SourceFileNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:727 def visit_source_file_node(node); end - # Visit the child nodes of the given node. # Compile a SourceLineNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:732 def visit_source_line_node(node); end - # Visit the child nodes of the given node. # Compile a SplatNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:737 def visit_splat_node(node); end - # Visit the child nodes of the given node. # Compile a StatementsNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:742 def visit_statements_node(node); end - # Visit the child nodes of the given node. # Compile a StringNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:747 def visit_string_node(node); end - # Visit the child nodes of the given node. # Compile a SuperNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:752 def visit_super_node(node); end - # Visit the child nodes of the given node. # Compile a SymbolNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:757 def visit_symbol_node(node); end - # Visit the child nodes of the given node. # Compile a TrueNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:762 def visit_true_node(node); end - # Visit the child nodes of the given node. # Compile a UndefNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:767 def visit_undef_node(node); end - # Visit the child nodes of the given node. # Compile a UnlessNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:772 def visit_unless_node(node); end - # Visit the child nodes of the given node. # Compile a UntilNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:777 def visit_until_node(node); end - # Visit the child nodes of the given node. # Compile a WhenNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:782 def visit_when_node(node); end - # Visit the child nodes of the given node. # Compile a WhileNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:787 def visit_while_node(node); end - # Visit the child nodes of the given node. # Compile a XStringNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:792 def visit_x_string_node(node); end - # Visit the child nodes of the given node. # Compile a YieldNode node # - # source://prism//lib/prism/compiler.rb#39 + # pkg:gem/prism#lib/prism/compiler.rb:797 def visit_yield_node(node); end end @@ -6790,13 +6770,11 @@ end # Target &&= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4606 +# pkg:gem/prism#lib/prism/node.rb:4927 class Prism::ConstantAndWriteNode < ::Prism::Node # Initialize a new ConstantAndWriteNode node. # - # @return [ConstantAndWriteNode] a new instance of ConstantAndWriteNode - # - # source://prism//lib/prism/node.rb#4608 + # pkg:gem/prism#lib/prism/node.rb:4929 sig do params( source: Prism::Source, @@ -6814,36 +6792,36 @@ class Prism::ConstantAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4706 + # pkg:gem/prism#lib/prism/node.rb:5034 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4620 + # pkg:gem/prism#lib/prism/node.rb:4941 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4625 + # pkg:gem/prism#lib/prism/node.rb:4946 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4635 + # pkg:gem/prism#lib/prism/node.rb:4963 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4630 + # pkg:gem/prism#lib/prism/node.rb:4958 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ConstantAndWriteNode # - # source://prism//lib/prism/node.rb#4640 + # pkg:gem/prism#lib/prism/node.rb:4968 sig do params( node_id: Integer, @@ -6855,85 +6833,89 @@ class Prism::ConstantAndWriteNode < ::Prism::Node value: Prism::Node ).returns(Prism::ConstantAndWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, operator_loc: self.operator_loc, value: self.value); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4625 + # pkg:gem/prism#lib/prism/node.rb:4973 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#4648 + # pkg:gem/prism#lib/prism/node.rb:4976 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#182 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:183 def desugar; end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:4951 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#4690 + # pkg:gem/prism#lib/prism/node.rb:5018 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4653 + # pkg:gem/prism#lib/prism/node.rb:4981 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4656 + # pkg:gem/prism#lib/prism/node.rb:4984 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4685 + # pkg:gem/prism#lib/prism/node.rb:5013 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4669 + # pkg:gem/prism#lib/prism/node.rb:4997 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4664 + # pkg:gem/prism#lib/prism/node.rb:4992 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4677 + # pkg:gem/prism#lib/prism/node.rb:5005 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#4695 + # pkg:gem/prism#lib/prism/node.rb:5023 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4682 + # pkg:gem/prism#lib/prism/node.rb:5010 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#4700 + # pkg:gem/prism#lib/prism/node.rb:5028 def type; end end end @@ -6943,13 +6925,11 @@ end # Target += value # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4719 +# pkg:gem/prism#lib/prism/node.rb:5047 class Prism::ConstantOperatorWriteNode < ::Prism::Node # Initialize a new ConstantOperatorWriteNode node. # - # @return [ConstantOperatorWriteNode] a new instance of ConstantOperatorWriteNode - # - # source://prism//lib/prism/node.rb#4721 + # pkg:gem/prism#lib/prism/node.rb:5049 sig do params( source: Prism::Source, @@ -6968,48 +6948,48 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4818 + # pkg:gem/prism#lib/prism/node.rb:5153 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4734 + # pkg:gem/prism#lib/prism/node.rb:5062 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#4799 + # pkg:gem/prism#lib/prism/node.rb:5134 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#4783 + # pkg:gem/prism#lib/prism/node.rb:5118 sig { returns(Prism::Location) } def binary_operator_loc; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4739 + # pkg:gem/prism#lib/prism/node.rb:5067 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4749 + # pkg:gem/prism#lib/prism/node.rb:5084 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4744 + # pkg:gem/prism#lib/prism/node.rb:5079 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ConstantOperatorWriteNode # - # source://prism//lib/prism/node.rb#4754 + # pkg:gem/prism#lib/prism/node.rb:5089 sig do params( node_id: Integer, @@ -7022,85 +7002,89 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node binary_operator: Symbol ).returns(Prism::ConstantOperatorWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, binary_operator_loc: self.binary_operator_loc, value: self.value, binary_operator: self.binary_operator); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4739 + # pkg:gem/prism#lib/prism/node.rb:5094 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } # - # source://prism//lib/prism/node.rb#4762 + # pkg:gem/prism#lib/prism/node.rb:5097 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#194 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:195 def desugar; end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:5072 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#4802 + # pkg:gem/prism#lib/prism/node.rb:5137 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4767 + # pkg:gem/prism#lib/prism/node.rb:5102 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4770 + # pkg:gem/prism#lib/prism/node.rb:5105 sig { returns(Prism::Location) } def name_loc; end # Returns the binary operator used to modify the receiver. This method is # deprecated in favor of #binary_operator. # - # source://prism//lib/prism/node_ext.rb#371 + # pkg:gem/prism#lib/prism/node_ext.rb:374 def operator; end # Returns the location of the binary operator used to modify the receiver. # This method is deprecated in favor of #binary_operator_loc. # - # source://prism//lib/prism/node_ext.rb#378 + # pkg:gem/prism#lib/prism/node_ext.rb:381 def operator_loc; end # Save the binary_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4791 + # pkg:gem/prism#lib/prism/node.rb:5126 def save_binary_operator_loc(repository); end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4778 + # pkg:gem/prism#lib/prism/node.rb:5113 def save_name_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#4807 + # pkg:gem/prism#lib/prism/node.rb:5142 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4796 + # pkg:gem/prism#lib/prism/node.rb:5131 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#4812 + # pkg:gem/prism#lib/prism/node.rb:5147 def type; end end end @@ -7110,13 +7094,11 @@ end # Target ||= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4832 +# pkg:gem/prism#lib/prism/node.rb:5167 class Prism::ConstantOrWriteNode < ::Prism::Node # Initialize a new ConstantOrWriteNode node. # - # @return [ConstantOrWriteNode] a new instance of ConstantOrWriteNode - # - # source://prism//lib/prism/node.rb#4834 + # pkg:gem/prism#lib/prism/node.rb:5169 sig do params( source: Prism::Source, @@ -7134,36 +7116,36 @@ class Prism::ConstantOrWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4932 + # pkg:gem/prism#lib/prism/node.rb:5274 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4846 + # pkg:gem/prism#lib/prism/node.rb:5181 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4851 + # pkg:gem/prism#lib/prism/node.rb:5186 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4861 + # pkg:gem/prism#lib/prism/node.rb:5203 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4856 + # pkg:gem/prism#lib/prism/node.rb:5198 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ConstantOrWriteNode # - # source://prism//lib/prism/node.rb#4866 + # pkg:gem/prism#lib/prism/node.rb:5208 sig do params( node_id: Integer, @@ -7175,85 +7157,89 @@ class Prism::ConstantOrWriteNode < ::Prism::Node value: Prism::Node ).returns(Prism::ConstantOrWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, operator_loc: self.operator_loc, value: self.value); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4851 + # pkg:gem/prism#lib/prism/node.rb:5213 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#4874 + # pkg:gem/prism#lib/prism/node.rb:5216 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#188 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:189 def desugar; end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:5191 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#4916 + # pkg:gem/prism#lib/prism/node.rb:5258 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4879 + # pkg:gem/prism#lib/prism/node.rb:5221 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4882 + # pkg:gem/prism#lib/prism/node.rb:5224 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4911 + # pkg:gem/prism#lib/prism/node.rb:5253 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4895 + # pkg:gem/prism#lib/prism/node.rb:5237 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4890 + # pkg:gem/prism#lib/prism/node.rb:5232 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#4903 + # pkg:gem/prism#lib/prism/node.rb:5245 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#4921 + # pkg:gem/prism#lib/prism/node.rb:5263 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4908 + # pkg:gem/prism#lib/prism/node.rb:5250 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#4926 + # pkg:gem/prism#lib/prism/node.rb:5268 def type; end end end @@ -7263,13 +7249,11 @@ end # Parent::Child &&= value # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4945 +# pkg:gem/prism#lib/prism/node.rb:5287 class Prism::ConstantPathAndWriteNode < ::Prism::Node # Initialize a new ConstantPathAndWriteNode node. # - # @return [ConstantPathAndWriteNode] a new instance of ConstantPathAndWriteNode - # - # source://prism//lib/prism/node.rb#4947 + # pkg:gem/prism#lib/prism/node.rb:5289 sig do params( source: Prism::Source, @@ -7286,36 +7270,36 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5031 + # pkg:gem/prism#lib/prism/node.rb:5381 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4958 + # pkg:gem/prism#lib/prism/node.rb:5300 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4963 + # pkg:gem/prism#lib/prism/node.rb:5305 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4973 + # pkg:gem/prism#lib/prism/node.rb:5323 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4968 + # pkg:gem/prism#lib/prism/node.rb:5318 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathAndWriteNode # - # source://prism//lib/prism/node.rb#4978 + # pkg:gem/prism#lib/prism/node.rb:5328 sig do params( node_id: Integer, @@ -7326,70 +7310,74 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node value: Prism::Node ).returns(Prism::ConstantPathAndWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, target: self.target, operator_loc: self.operator_loc, value: self.value); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#4963 + # pkg:gem/prism#lib/prism/node.rb:5333 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#4986 + # pkg:gem/prism#lib/prism/node.rb:5336 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:5310 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#5015 + # pkg:gem/prism#lib/prism/node.rb:5365 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5010 + # pkg:gem/prism#lib/prism/node.rb:5360 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4994 + # pkg:gem/prism#lib/prism/node.rb:5344 sig { returns(Prism::Location) } def operator_loc; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5002 + # pkg:gem/prism#lib/prism/node.rb:5352 def save_operator_loc(repository); end # attr_reader target: ConstantPathNode # - # source://prism//lib/prism/node.rb#4991 + # pkg:gem/prism#lib/prism/node.rb:5341 sig { returns(Prism::ConstantPathNode) } def target; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#5020 + # pkg:gem/prism#lib/prism/node.rb:5370 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5007 + # pkg:gem/prism#lib/prism/node.rb:5357 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5025 + # pkg:gem/prism#lib/prism/node.rb:5375 def type; end end end @@ -7399,13 +7387,11 @@ end # Foo::Bar # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#5043 +# pkg:gem/prism#lib/prism/node.rb:5393 class Prism::ConstantPathNode < ::Prism::Node # Initialize a new ConstantPathNode node. # - # @return [ConstantPathNode] a new instance of ConstantPathNode - # - # source://prism//lib/prism/node.rb#5045 + # pkg:gem/prism#lib/prism/node.rb:5395 sig do params( source: Prism::Source, @@ -7423,12 +7409,12 @@ class Prism::ConstantPathNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5166 + # pkg:gem/prism#lib/prism/node.rb:5523 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5057 + # pkg:gem/prism#lib/prism/node.rb:5407 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -7436,30 +7422,30 @@ class Prism::ConstantPathNode < ::Prism::Node # constant read or a missing node. To not cause a breaking change, we # continue to supply that API. # - # source://prism//lib/prism/node_ext.rb#202 + # pkg:gem/prism#lib/prism/node_ext.rb:205 def child; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5062 + # pkg:gem/prism#lib/prism/node.rb:5412 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5074 + # pkg:gem/prism#lib/prism/node.rb:5431 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5067 + # pkg:gem/prism#lib/prism/node.rb:5424 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location) -> ConstantPathNode # - # source://prism//lib/prism/node.rb#5079 + # pkg:gem/prism#lib/prism/node.rb:5436 sig do params( node_id: Integer, @@ -7471,24 +7457,23 @@ class Prism::ConstantPathNode < ::Prism::Node name_loc: Prism::Location ).returns(Prism::ConstantPathNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, parent: self.parent, name: self.name, delimiter_loc: self.delimiter_loc, name_loc: self.name_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5062 + # pkg:gem/prism#lib/prism/node.rb:5441 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location } # - # source://prism//lib/prism/node.rb#5087 + # pkg:gem/prism#lib/prism/node.rb:5444 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def delimiter: () -> String # - # source://prism//lib/prism/node.rb#5145 + # pkg:gem/prism#lib/prism/node.rb:5502 sig { returns(String) } def delimiter; end @@ -7500,35 +7485,40 @@ class Prism::ConstantPathNode < ::Prism::Node # One::Two # ^^ # - # source://prism//lib/prism/node.rb#5113 + # pkg:gem/prism#lib/prism/node.rb:5470 sig { returns(Prism::Location) } def delimiter_loc; end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:5417 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # Returns the full name of this constant path. For example: "Foo::Bar" # - # source://prism//lib/prism/node_ext.rb#195 + # pkg:gem/prism#lib/prism/node_ext.rb:198 sig { returns(String) } def full_name; end # Returns the list of parts for the full name of this constant path. # For example: [:Foo, :Bar] # - # source://prism//lib/prism/node_ext.rb#173 + # pkg:gem/prism#lib/prism/node_ext.rb:176 sig { returns(T::Array[Symbol]) } def full_name_parts; end # def inspect -> String # - # source://prism//lib/prism/node.rb#5150 + # pkg:gem/prism#lib/prism/node.rb:5507 sig { override.returns(String) } def inspect; end # The name of the constant being accessed. This could be `nil` in the event of a syntax error. # - # source://prism//lib/prism/node.rb#5104 + # pkg:gem/prism#lib/prism/node.rb:5461 sig { returns(T.nilable(Symbol)) } def name; end @@ -7540,7 +7530,7 @@ class Prism::ConstantPathNode < ::Prism::Node # One::Two # ^^^ # - # source://prism//lib/prism/node.rb#5132 + # pkg:gem/prism#lib/prism/node.rb:5489 sig { returns(Prism::Location) } def name_loc; end @@ -7555,32 +7545,32 @@ class Prism::ConstantPathNode < ::Prism::Node # a.b::C # ^^^ # - # source://prism//lib/prism/node.rb#5101 + # pkg:gem/prism#lib/prism/node.rb:5458 sig { returns(T.nilable(Prism::Node)) } def parent; end # Save the delimiter_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5121 + # pkg:gem/prism#lib/prism/node.rb:5478 def save_delimiter_loc(repository); end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5140 + # pkg:gem/prism#lib/prism/node.rb:5497 def save_name_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#5155 + # pkg:gem/prism#lib/prism/node.rb:5512 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5160 + # pkg:gem/prism#lib/prism/node.rb:5517 def type; end end end @@ -7592,14 +7582,14 @@ end # var::Bar::Baz -> raises because the first part of the constant path is a # local variable # -# source://prism//lib/prism/node_ext.rb#164 +# pkg:gem/prism#lib/prism/node_ext.rb:167 class Prism::ConstantPathNode::DynamicPartsInConstantPathError < ::StandardError; end # An error class raised when missing nodes are found while computing a # constant path's full name. For example: # Foo:: -> raises because the constant path is missing the last part # -# source://prism//lib/prism/node_ext.rb#169 +# pkg:gem/prism#lib/prism/node_ext.rb:172 class Prism::ConstantPathNode::MissingNodesInConstantPathError < ::StandardError; end # Represents assigning to a constant path using an operator that isn't `=`. @@ -7607,13 +7597,11 @@ class Prism::ConstantPathNode::MissingNodesInConstantPathError < ::StandardError # Parent::Child += value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5179 +# pkg:gem/prism#lib/prism/node.rb:5536 class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # Initialize a new ConstantPathOperatorWriteNode node. # - # @return [ConstantPathOperatorWriteNode] a new instance of ConstantPathOperatorWriteNode - # - # source://prism//lib/prism/node.rb#5181 + # pkg:gem/prism#lib/prism/node.rb:5538 sig do params( source: Prism::Source, @@ -7631,48 +7619,48 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5264 + # pkg:gem/prism#lib/prism/node.rb:5629 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5193 + # pkg:gem/prism#lib/prism/node.rb:5550 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#5245 + # pkg:gem/prism#lib/prism/node.rb:5610 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#5229 + # pkg:gem/prism#lib/prism/node.rb:5594 sig { returns(Prism::Location) } def binary_operator_loc; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5198 + # pkg:gem/prism#lib/prism/node.rb:5555 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5208 + # pkg:gem/prism#lib/prism/node.rb:5573 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5203 + # pkg:gem/prism#lib/prism/node.rb:5568 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ConstantPathOperatorWriteNode # - # source://prism//lib/prism/node.rb#5213 + # pkg:gem/prism#lib/prism/node.rb:5578 sig do params( node_id: Integer, @@ -7684,70 +7672,74 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node binary_operator: Symbol ).returns(Prism::ConstantPathOperatorWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, target: self.target, binary_operator_loc: self.binary_operator_loc, value: self.value, binary_operator: self.binary_operator); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5198 + # pkg:gem/prism#lib/prism/node.rb:5583 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } # - # source://prism//lib/prism/node.rb#5221 + # pkg:gem/prism#lib/prism/node.rb:5586 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:5560 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#5248 + # pkg:gem/prism#lib/prism/node.rb:5613 sig { override.returns(String) } def inspect; end # Returns the binary operator used to modify the receiver. This method is # deprecated in favor of #binary_operator. # - # source://prism//lib/prism/node_ext.rb#387 + # pkg:gem/prism#lib/prism/node_ext.rb:390 def operator; end # Returns the location of the binary operator used to modify the receiver. # This method is deprecated in favor of #binary_operator_loc. # - # source://prism//lib/prism/node_ext.rb#394 + # pkg:gem/prism#lib/prism/node_ext.rb:397 def operator_loc; end # Save the binary_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5237 + # pkg:gem/prism#lib/prism/node.rb:5602 def save_binary_operator_loc(repository); end # attr_reader target: ConstantPathNode # - # source://prism//lib/prism/node.rb#5226 + # pkg:gem/prism#lib/prism/node.rb:5591 sig { returns(Prism::ConstantPathNode) } def target; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#5253 + # pkg:gem/prism#lib/prism/node.rb:5618 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5242 + # pkg:gem/prism#lib/prism/node.rb:5607 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5258 + # pkg:gem/prism#lib/prism/node.rb:5623 def type; end end end @@ -7757,13 +7749,11 @@ end # Parent::Child ||= value # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5277 +# pkg:gem/prism#lib/prism/node.rb:5642 class Prism::ConstantPathOrWriteNode < ::Prism::Node # Initialize a new ConstantPathOrWriteNode node. # - # @return [ConstantPathOrWriteNode] a new instance of ConstantPathOrWriteNode - # - # source://prism//lib/prism/node.rb#5279 + # pkg:gem/prism#lib/prism/node.rb:5644 sig do params( source: Prism::Source, @@ -7780,36 +7770,36 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5363 + # pkg:gem/prism#lib/prism/node.rb:5736 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5290 + # pkg:gem/prism#lib/prism/node.rb:5655 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5295 + # pkg:gem/prism#lib/prism/node.rb:5660 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5305 + # pkg:gem/prism#lib/prism/node.rb:5678 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5300 + # pkg:gem/prism#lib/prism/node.rb:5673 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathOrWriteNode # - # source://prism//lib/prism/node.rb#5310 + # pkg:gem/prism#lib/prism/node.rb:5683 sig do params( node_id: Integer, @@ -7820,70 +7810,74 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node value: Prism::Node ).returns(Prism::ConstantPathOrWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, target: self.target, operator_loc: self.operator_loc, value: self.value); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5295 + # pkg:gem/prism#lib/prism/node.rb:5688 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#5318 + # pkg:gem/prism#lib/prism/node.rb:5691 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:5665 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#5347 + # pkg:gem/prism#lib/prism/node.rb:5720 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5342 + # pkg:gem/prism#lib/prism/node.rb:5715 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#5326 + # pkg:gem/prism#lib/prism/node.rb:5699 sig { returns(Prism::Location) } def operator_loc; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5334 + # pkg:gem/prism#lib/prism/node.rb:5707 def save_operator_loc(repository); end # attr_reader target: ConstantPathNode # - # source://prism//lib/prism/node.rb#5323 + # pkg:gem/prism#lib/prism/node.rb:5696 sig { returns(Prism::ConstantPathNode) } def target; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#5352 + # pkg:gem/prism#lib/prism/node.rb:5725 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5339 + # pkg:gem/prism#lib/prism/node.rb:5712 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5357 + # pkg:gem/prism#lib/prism/node.rb:5730 def type; end end end @@ -7893,13 +7887,11 @@ end # Foo::Foo, Bar::Bar = baz # ^^^^^^^^ ^^^^^^^^ # -# source://prism//lib/prism/node.rb#5375 +# pkg:gem/prism#lib/prism/node.rb:5748 class Prism::ConstantPathTargetNode < ::Prism::Node # Initialize a new ConstantPathTargetNode node. # - # @return [ConstantPathTargetNode] a new instance of ConstantPathTargetNode - # - # source://prism//lib/prism/node.rb#5377 + # pkg:gem/prism#lib/prism/node.rb:5750 sig do params( source: Prism::Source, @@ -7917,12 +7909,12 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5477 + # pkg:gem/prism#lib/prism/node.rb:5857 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5389 + # pkg:gem/prism#lib/prism/node.rb:5762 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -7930,30 +7922,30 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # constant read or a missing node. To not cause a breaking change, we # continue to supply that API. # - # source://prism//lib/prism/node_ext.rb#243 + # pkg:gem/prism#lib/prism/node_ext.rb:246 def child; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5394 + # pkg:gem/prism#lib/prism/node.rb:5767 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5406 + # pkg:gem/prism#lib/prism/node.rb:5786 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5399 + # pkg:gem/prism#lib/prism/node.rb:5779 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location) -> ConstantPathTargetNode # - # source://prism//lib/prism/node.rb#5411 + # pkg:gem/prism#lib/prism/node.rb:5791 sig do params( node_id: Integer, @@ -7965,95 +7957,99 @@ class Prism::ConstantPathTargetNode < ::Prism::Node name_loc: Prism::Location ).returns(Prism::ConstantPathTargetNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, parent: self.parent, name: self.name, delimiter_loc: self.delimiter_loc, name_loc: self.name_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5394 + # pkg:gem/prism#lib/prism/node.rb:5796 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location } # - # source://prism//lib/prism/node.rb#5419 + # pkg:gem/prism#lib/prism/node.rb:5799 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def delimiter: () -> String # - # source://prism//lib/prism/node.rb#5456 + # pkg:gem/prism#lib/prism/node.rb:5836 sig { returns(String) } def delimiter; end # attr_reader delimiter_loc: Location # - # source://prism//lib/prism/node.rb#5430 + # pkg:gem/prism#lib/prism/node.rb:5810 sig { returns(Prism::Location) } def delimiter_loc; end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:5772 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # Returns the full name of this constant path. For example: "Foo::Bar" # - # source://prism//lib/prism/node_ext.rb#236 + # pkg:gem/prism#lib/prism/node_ext.rb:239 sig { returns(String) } def full_name; end # Returns the list of parts for the full name of this constant path. # For example: [:Foo, :Bar] # - # source://prism//lib/prism/node_ext.rb#216 + # pkg:gem/prism#lib/prism/node_ext.rb:219 sig { returns(T::Array[Symbol]) } def full_name_parts; end # def inspect -> String # - # source://prism//lib/prism/node.rb#5461 + # pkg:gem/prism#lib/prism/node.rb:5841 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#5427 + # pkg:gem/prism#lib/prism/node.rb:5807 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#5443 + # pkg:gem/prism#lib/prism/node.rb:5823 sig { returns(Prism::Location) } def name_loc; end # attr_reader parent: Prism::node? # - # source://prism//lib/prism/node.rb#5424 + # pkg:gem/prism#lib/prism/node.rb:5804 sig { returns(T.nilable(Prism::Node)) } def parent; end # Save the delimiter_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5438 + # pkg:gem/prism#lib/prism/node.rb:5818 def save_delimiter_loc(repository); end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5451 + # pkg:gem/prism#lib/prism/node.rb:5831 def save_name_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#5466 + # pkg:gem/prism#lib/prism/node.rb:5846 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5471 + # pkg:gem/prism#lib/prism/node.rb:5851 def type; end end end @@ -8069,13 +8065,11 @@ end # ::Foo::Bar = 1 # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5496 +# pkg:gem/prism#lib/prism/node.rb:5876 class Prism::ConstantPathWriteNode < ::Prism::Node # Initialize a new ConstantPathWriteNode node. # - # @return [ConstantPathWriteNode] a new instance of ConstantPathWriteNode - # - # source://prism//lib/prism/node.rb#5498 + # pkg:gem/prism#lib/prism/node.rb:5878 sig do params( source: Prism::Source, @@ -8092,36 +8086,36 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5594 + # pkg:gem/prism#lib/prism/node.rb:5982 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5509 + # pkg:gem/prism#lib/prism/node.rb:5889 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5514 + # pkg:gem/prism#lib/prism/node.rb:5894 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5524 + # pkg:gem/prism#lib/prism/node.rb:5912 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5519 + # pkg:gem/prism#lib/prism/node.rb:5907 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathWriteNode # - # source://prism//lib/prism/node.rb#5529 + # pkg:gem/prism#lib/prism/node.rb:5917 sig do params( node_id: Integer, @@ -8132,33 +8126,37 @@ class Prism::ConstantPathWriteNode < ::Prism::Node value: Prism::Node ).returns(Prism::ConstantPathWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, target: self.target, operator_loc: self.operator_loc, value: self.value); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5514 + # pkg:gem/prism#lib/prism/node.rb:5922 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#5537 + # pkg:gem/prism#lib/prism/node.rb:5925 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:5899 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#5578 + # pkg:gem/prism#lib/prism/node.rb:5966 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5573 + # pkg:gem/prism#lib/prism/node.rb:5961 sig { returns(String) } def operator; end @@ -8167,14 +8165,14 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # ::ABC = 123 # ^ # - # source://prism//lib/prism/node.rb#5554 + # pkg:gem/prism#lib/prism/node.rb:5942 sig { returns(Prism::Location) } def operator_loc; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5562 + # pkg:gem/prism#lib/prism/node.rb:5950 def save_operator_loc(repository); end # A node representing the constant path being written to. @@ -8185,13 +8183,13 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # ::Foo = :abc # ^^^^^ # - # source://prism//lib/prism/node.rb#5548 + # pkg:gem/prism#lib/prism/node.rb:5936 sig { returns(Prism::ConstantPathNode) } def target; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#5583 + # pkg:gem/prism#lib/prism/node.rb:5971 sig { override.returns(Symbol) } def type; end @@ -8200,14 +8198,14 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # FOO::BAR = :abc # ^^^^ # - # source://prism//lib/prism/node.rb#5570 + # pkg:gem/prism#lib/prism/node.rb:5958 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5588 + # pkg:gem/prism#lib/prism/node.rb:5976 def type; end end end @@ -8217,49 +8215,47 @@ end # Foo # ^^^ # -# source://prism//lib/prism/node.rb#5606 +# pkg:gem/prism#lib/prism/node.rb:5994 class Prism::ConstantReadNode < ::Prism::Node # Initialize a new ConstantReadNode node. # - # @return [ConstantReadNode] a new instance of ConstantReadNode - # - # source://prism//lib/prism/node.rb#5608 + # pkg:gem/prism#lib/prism/node.rb:5996 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5673 + # pkg:gem/prism#lib/prism/node.rb:6067 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5617 + # pkg:gem/prism#lib/prism/node.rb:6005 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5622 + # pkg:gem/prism#lib/prism/node.rb:6010 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5632 + # pkg:gem/prism#lib/prism/node.rb:6026 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5627 + # pkg:gem/prism#lib/prism/node.rb:6021 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ConstantReadNode # - # source://prism//lib/prism/node.rb#5637 + # pkg:gem/prism#lib/prism/node.rb:6031 sig do params( node_id: Integer, @@ -8268,40 +8264,44 @@ class Prism::ConstantReadNode < ::Prism::Node name: Symbol ).returns(Prism::ConstantReadNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5622 + # pkg:gem/prism#lib/prism/node.rb:6036 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#5645 + # pkg:gem/prism#lib/prism/node.rb:6039 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:6015 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # Returns the full name of this constant. For example: "Foo" # - # source://prism//lib/prism/node_ext.rb#139 + # pkg:gem/prism#lib/prism/node_ext.rb:142 sig { returns(String) } def full_name; end # Returns the list of parts for the full name of this constant. # For example: [:Foo] # - # source://prism//lib/prism/node_ext.rb#134 + # pkg:gem/prism#lib/prism/node_ext.rb:137 sig { returns(T::Array[Symbol]) } def full_name_parts; end # def inspect -> String # - # source://prism//lib/prism/node.rb#5657 + # pkg:gem/prism#lib/prism/node.rb:6051 sig { override.returns(String) } def inspect; end @@ -8311,20 +8311,20 @@ class Prism::ConstantReadNode < ::Prism::Node # # SOME_CONSTANT # name `:SOME_CONSTANT` # - # source://prism//lib/prism/node.rb#5654 + # pkg:gem/prism#lib/prism/node.rb:6048 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#5662 + # pkg:gem/prism#lib/prism/node.rb:6056 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5667 + # pkg:gem/prism#lib/prism/node.rb:6061 def type; end end end @@ -8334,49 +8334,47 @@ end # Foo, Bar = baz # ^^^ ^^^ # -# source://prism//lib/prism/node.rb#5683 +# pkg:gem/prism#lib/prism/node.rb:6077 class Prism::ConstantTargetNode < ::Prism::Node # Initialize a new ConstantTargetNode node. # - # @return [ConstantTargetNode] a new instance of ConstantTargetNode - # - # source://prism//lib/prism/node.rb#5685 + # pkg:gem/prism#lib/prism/node.rb:6079 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5746 + # pkg:gem/prism#lib/prism/node.rb:6146 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5694 + # pkg:gem/prism#lib/prism/node.rb:6088 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5699 + # pkg:gem/prism#lib/prism/node.rb:6093 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5709 + # pkg:gem/prism#lib/prism/node.rb:6109 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5704 + # pkg:gem/prism#lib/prism/node.rb:6104 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ConstantTargetNode # - # source://prism//lib/prism/node.rb#5714 + # pkg:gem/prism#lib/prism/node.rb:6114 sig do params( node_id: Integer, @@ -8385,59 +8383,63 @@ class Prism::ConstantTargetNode < ::Prism::Node name: Symbol ).returns(Prism::ConstantTargetNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5699 + # pkg:gem/prism#lib/prism/node.rb:6119 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#5722 + # pkg:gem/prism#lib/prism/node.rb:6122 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:6098 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # Returns the full name of this constant. For example: "Foo" # - # source://prism//lib/prism/node_ext.rb#262 + # pkg:gem/prism#lib/prism/node_ext.rb:265 sig { returns(String) } def full_name; end # Returns the list of parts for the full name of this constant. # For example: [:Foo] # - # source://prism//lib/prism/node_ext.rb#257 + # pkg:gem/prism#lib/prism/node_ext.rb:260 sig { returns(T::Array[Symbol]) } def full_name_parts; end # def inspect -> String # - # source://prism//lib/prism/node.rb#5730 + # pkg:gem/prism#lib/prism/node.rb:6130 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#5727 + # pkg:gem/prism#lib/prism/node.rb:6127 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#5735 + # pkg:gem/prism#lib/prism/node.rb:6135 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5740 + # pkg:gem/prism#lib/prism/node.rb:6140 def type; end end end @@ -8447,13 +8449,11 @@ end # Foo = 1 # ^^^^^^^ # -# source://prism//lib/prism/node.rb#5756 +# pkg:gem/prism#lib/prism/node.rb:6156 class Prism::ConstantWriteNode < ::Prism::Node # Initialize a new ConstantWriteNode node. # - # @return [ConstantWriteNode] a new instance of ConstantWriteNode - # - # source://prism//lib/prism/node.rb#5758 + # pkg:gem/prism#lib/prism/node.rb:6158 sig do params( source: Prism::Source, @@ -8471,36 +8471,36 @@ class Prism::ConstantWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5872 + # pkg:gem/prism#lib/prism/node.rb:6279 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5770 + # pkg:gem/prism#lib/prism/node.rb:6170 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5775 + # pkg:gem/prism#lib/prism/node.rb:6175 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5785 + # pkg:gem/prism#lib/prism/node.rb:6192 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5780 + # pkg:gem/prism#lib/prism/node.rb:6187 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> ConstantWriteNode # - # source://prism//lib/prism/node.rb#5790 + # pkg:gem/prism#lib/prism/node.rb:6197 sig do params( node_id: Integer, @@ -8512,40 +8512,44 @@ class Prism::ConstantWriteNode < ::Prism::Node operator_loc: Prism::Location ).returns(Prism::ConstantWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, value: self.value, operator_loc: self.operator_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5775 + # pkg:gem/prism#lib/prism/node.rb:6202 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#5798 + # pkg:gem/prism#lib/prism/node.rb:6205 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:6180 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # Returns the full name of this constant. For example: "Foo" # - # source://prism//lib/prism/node_ext.rb#152 + # pkg:gem/prism#lib/prism/node_ext.rb:155 sig { returns(String) } def full_name; end # Returns the list of parts for the full name of this constant. # For example: [:Foo] # - # source://prism//lib/prism/node_ext.rb#147 + # pkg:gem/prism#lib/prism/node_ext.rb:150 sig { returns(T::Array[Symbol]) } def full_name_parts; end # def inspect -> String # - # source://prism//lib/prism/node.rb#5856 + # pkg:gem/prism#lib/prism/node.rb:6263 sig { override.returns(String) } def inspect; end @@ -8555,7 +8559,7 @@ class Prism::ConstantWriteNode < ::Prism::Node # # XYZ = 1 # name `:XYZ` # - # source://prism//lib/prism/node.rb#5807 + # pkg:gem/prism#lib/prism/node.rb:6214 sig { returns(Symbol) } def name; end @@ -8564,13 +8568,13 @@ class Prism::ConstantWriteNode < ::Prism::Node # FOO = 1 # ^^^ # - # source://prism//lib/prism/node.rb#5813 + # pkg:gem/prism#lib/prism/node.rb:6220 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5851 + # pkg:gem/prism#lib/prism/node.rb:6258 sig { returns(String) } def operator; end @@ -8579,25 +8583,25 @@ class Prism::ConstantWriteNode < ::Prism::Node # FOO = :bar # ^ # - # source://prism//lib/prism/node.rb#5838 + # pkg:gem/prism#lib/prism/node.rb:6245 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5821 + # pkg:gem/prism#lib/prism/node.rb:6228 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5846 + # pkg:gem/prism#lib/prism/node.rb:6253 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#5861 + # pkg:gem/prism#lib/prism/node.rb:6268 sig { override.returns(Symbol) } def type; end @@ -8609,18 +8613,28 @@ class Prism::ConstantWriteNode < ::Prism::Node # MyClass = Class.new # ^^^^^^^^^ # - # source://prism//lib/prism/node.rb#5832 + # pkg:gem/prism#lib/prism/node.rb:6239 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5866 + # pkg:gem/prism#lib/prism/node.rb:6273 def type; end end end +# Raised when requested to parse as the currently running Ruby version but Prism has no support for it. +# +# pkg:gem/prism#lib/prism.rb:39 +class Prism::CurrentVersionError < ::ArgumentError + # Initialize a new exception for the given ruby version string. + # + # pkg:gem/prism#lib/prism.rb:41 + def initialize(version); end +end + # The DSL module provides a set of methods that can be used to create prism # nodes in a more concise manner. For example, instead of writing: # @@ -8673,13 +8687,13 @@ end # # This is mostly helpful in the context of generating trees programmatically. # -# source://prism//lib/prism/dsl.rb#61 +# pkg:gem/prism#lib/prism/dsl.rb:64 module Prism::DSL extend ::Prism::DSL # Create a new AliasGlobalVariableNode node. # - # source://prism//lib/prism/dsl.rb#77 + # pkg:gem/prism#lib/prism/dsl.rb:80 sig do params( source: Prism::Source, @@ -8691,11 +8705,11 @@ module Prism::DSL keyword_loc: Prism::Location ).returns(Prism::AliasGlobalVariableNode) end - def alias_global_variable_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + def alias_global_variable_node(source: default_source, node_id: 0, location: default_location, flags: 0, new_name: global_variable_read_node(source: source), old_name: global_variable_read_node(source: source), keyword_loc: location); end # Create a new AliasMethodNode node. # - # source://prism//lib/prism/dsl.rb#82 + # pkg:gem/prism#lib/prism/dsl.rb:85 sig do params( source: Prism::Source, @@ -8707,11 +8721,11 @@ module Prism::DSL keyword_loc: Prism::Location ).returns(Prism::AliasMethodNode) end - def alias_method_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + def alias_method_node(source: default_source, node_id: 0, location: default_location, flags: 0, new_name: symbol_node(source: source), old_name: symbol_node(source: source), keyword_loc: location); end # Create a new AlternationPatternNode node. # - # source://prism//lib/prism/dsl.rb#87 + # pkg:gem/prism#lib/prism/dsl.rb:90 sig do params( source: Prism::Source, @@ -8723,11 +8737,11 @@ module Prism::DSL operator_loc: Prism::Location ).returns(Prism::AlternationPatternNode) end - def alternation_pattern_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def alternation_pattern_node(source: default_source, node_id: 0, location: default_location, flags: 0, left: default_node(source, location), right: default_node(source, location), operator_loc: location); end # Create a new AndNode node. # - # source://prism//lib/prism/dsl.rb#92 + # pkg:gem/prism#lib/prism/dsl.rb:95 sig do params( source: Prism::Source, @@ -8739,11 +8753,11 @@ module Prism::DSL operator_loc: Prism::Location ).returns(Prism::AndNode) end - def and_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def and_node(source: default_source, node_id: 0, location: default_location, flags: 0, left: default_node(source, location), right: default_node(source, location), operator_loc: location); end # Create a new ArgumentsNode node. # - # source://prism//lib/prism/dsl.rb#97 + # pkg:gem/prism#lib/prism/dsl.rb:100 sig do params( source: Prism::Source, @@ -8753,17 +8767,17 @@ module Prism::DSL arguments: T::Array[Prism::Node] ).returns(Prism::ArgumentsNode) end - def arguments_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil)); end + def arguments_node(source: default_source, node_id: 0, location: default_location, flags: 0, arguments: []); end # Retrieve the value of one of the ArgumentsNodeFlags flags. # - # source://prism//lib/prism/dsl.rb#832 + # pkg:gem/prism#lib/prism/dsl.rb:835 sig { params(name: Symbol).returns(Integer) } def arguments_node_flag(name); end # Create a new ArrayNode node. # - # source://prism//lib/prism/dsl.rb#102 + # pkg:gem/prism#lib/prism/dsl.rb:105 sig do params( source: Prism::Source, @@ -8775,24 +8789,24 @@ module Prism::DSL closing_loc: T.nilable(Prism::Location) ).returns(Prism::ArrayNode) end - def array_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), elements: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def array_node(source: default_source, node_id: 0, location: default_location, flags: 0, elements: [], opening_loc: nil, closing_loc: nil); end # Retrieve the value of one of the ArrayNodeFlags flags. # - # source://prism//lib/prism/dsl.rb#844 + # pkg:gem/prism#lib/prism/dsl.rb:847 sig { params(name: Symbol).returns(Integer) } def array_node_flag(name); end # Create a new ArrayPatternNode node. # - # source://prism//lib/prism/dsl.rb#107 + # pkg:gem/prism#lib/prism/dsl.rb:110 sig do params( source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, - constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + constant: T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode)), requireds: T::Array[Prism::Node], rest: T.nilable(Prism::Node), posts: T::Array[Prism::Node], @@ -8800,11 +8814,11 @@ module Prism::DSL closing_loc: T.nilable(Prism::Location) ).returns(Prism::ArrayPatternNode) end - def array_pattern_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), requireds: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def array_pattern_node(source: default_source, node_id: 0, location: default_location, flags: 0, constant: nil, requireds: [], rest: nil, posts: [], opening_loc: nil, closing_loc: nil); end # Create a new AssocNode node. # - # source://prism//lib/prism/dsl.rb#112 + # pkg:gem/prism#lib/prism/dsl.rb:115 sig do params( source: Prism::Source, @@ -8816,11 +8830,11 @@ module Prism::DSL operator_loc: T.nilable(Prism::Location) ).returns(Prism::AssocNode) end - def assoc_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), key: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def assoc_node(source: default_source, node_id: 0, location: default_location, flags: 0, key: default_node(source, location), value: default_node(source, location), operator_loc: nil); end # Create a new AssocSplatNode node. # - # source://prism//lib/prism/dsl.rb#117 + # pkg:gem/prism#lib/prism/dsl.rb:120 sig do params( source: Prism::Source, @@ -8831,11 +8845,11 @@ module Prism::DSL operator_loc: Prism::Location ).returns(Prism::AssocSplatNode) end - def assoc_splat_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def assoc_splat_node(source: default_source, node_id: 0, location: default_location, flags: 0, value: nil, operator_loc: location); end # Create a new BackReferenceReadNode node. # - # source://prism//lib/prism/dsl.rb#122 + # pkg:gem/prism#lib/prism/dsl.rb:125 sig do params( source: Prism::Source, @@ -8845,11 +8859,11 @@ module Prism::DSL name: Symbol ).returns(Prism::BackReferenceReadNode) end - def back_reference_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + def back_reference_read_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :""); end # Create a new BeginNode node. # - # source://prism//lib/prism/dsl.rb#127 + # pkg:gem/prism#lib/prism/dsl.rb:130 sig do params( source: Prism::Source, @@ -8864,11 +8878,11 @@ module Prism::DSL end_keyword_loc: T.nilable(Prism::Location) ).returns(Prism::BeginNode) end - def begin_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), begin_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), rescue_clause: T.unsafe(nil), else_clause: T.unsafe(nil), ensure_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + def begin_node(source: default_source, node_id: 0, location: default_location, flags: 0, begin_keyword_loc: nil, statements: nil, rescue_clause: nil, else_clause: nil, ensure_clause: nil, end_keyword_loc: nil); end # Create a new BlockArgumentNode node. # - # source://prism//lib/prism/dsl.rb#132 + # pkg:gem/prism#lib/prism/dsl.rb:135 sig do params( source: Prism::Source, @@ -8879,11 +8893,11 @@ module Prism::DSL operator_loc: Prism::Location ).returns(Prism::BlockArgumentNode) end - def block_argument_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def block_argument_node(source: default_source, node_id: 0, location: default_location, flags: 0, expression: nil, operator_loc: location); end # Create a new BlockLocalVariableNode node. # - # source://prism//lib/prism/dsl.rb#137 + # pkg:gem/prism#lib/prism/dsl.rb:140 sig do params( source: Prism::Source, @@ -8893,11 +8907,11 @@ module Prism::DSL name: Symbol ).returns(Prism::BlockLocalVariableNode) end - def block_local_variable_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + def block_local_variable_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :""); end # Create a new BlockNode node. # - # source://prism//lib/prism/dsl.rb#142 + # pkg:gem/prism#lib/prism/dsl.rb:145 sig do params( source: Prism::Source, @@ -8911,11 +8925,11 @@ module Prism::DSL closing_loc: Prism::Location ).returns(Prism::BlockNode) end - def block_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def block_node(source: default_source, node_id: 0, location: default_location, flags: 0, locals: [], parameters: nil, body: nil, opening_loc: location, closing_loc: location); end # Create a new BlockParameterNode node. # - # source://prism//lib/prism/dsl.rb#147 + # pkg:gem/prism#lib/prism/dsl.rb:150 sig do params( source: Prism::Source, @@ -8927,11 +8941,11 @@ module Prism::DSL operator_loc: Prism::Location ).returns(Prism::BlockParameterNode) end - def block_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def block_parameter_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: nil, name_loc: nil, operator_loc: location); end # Create a new BlockParametersNode node. # - # source://prism//lib/prism/dsl.rb#152 + # pkg:gem/prism#lib/prism/dsl.rb:155 sig do params( source: Prism::Source, @@ -8944,11 +8958,11 @@ module Prism::DSL closing_loc: T.nilable(Prism::Location) ).returns(Prism::BlockParametersNode) end - def block_parameters_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parameters: T.unsafe(nil), locals: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def block_parameters_node(source: default_source, node_id: 0, location: default_location, flags: 0, parameters: nil, locals: [], opening_loc: nil, closing_loc: nil); end # Create a new BreakNode node. # - # source://prism//lib/prism/dsl.rb#157 + # pkg:gem/prism#lib/prism/dsl.rb:160 sig do params( source: Prism::Source, @@ -8959,11 +8973,11 @@ module Prism::DSL keyword_loc: Prism::Location ).returns(Prism::BreakNode) end - def break_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + def break_node(source: default_source, node_id: 0, location: default_location, flags: 0, arguments: nil, keyword_loc: location); end # Create a new CallAndWriteNode node. # - # source://prism//lib/prism/dsl.rb#162 + # pkg:gem/prism#lib/prism/dsl.rb:165 sig do params( source: Prism::Source, @@ -8979,11 +8993,11 @@ module Prism::DSL value: Prism::Node ).returns(Prism::CallAndWriteNode) end - def call_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def call_and_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, receiver: nil, call_operator_loc: nil, message_loc: nil, read_name: :"", write_name: :"", operator_loc: location, value: default_node(source, location)); end # Create a new CallNode node. # - # source://prism//lib/prism/dsl.rb#167 + # pkg:gem/prism#lib/prism/dsl.rb:170 sig do params( source: Prism::Source, @@ -8997,20 +9011,21 @@ module Prism::DSL opening_loc: T.nilable(Prism::Location), arguments: T.nilable(Prism::ArgumentsNode), closing_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) ).returns(Prism::CallNode) end - def call_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil)); end + def call_node(source: default_source, node_id: 0, location: default_location, flags: 0, receiver: nil, call_operator_loc: nil, name: :"", message_loc: nil, opening_loc: nil, arguments: nil, closing_loc: nil, equal_loc: nil, block: nil); end # Retrieve the value of one of the CallNodeFlags flags. # - # source://prism//lib/prism/dsl.rb#852 + # pkg:gem/prism#lib/prism/dsl.rb:855 sig { params(name: Symbol).returns(Integer) } def call_node_flag(name); end # Create a new CallOperatorWriteNode node. # - # source://prism//lib/prism/dsl.rb#172 + # pkg:gem/prism#lib/prism/dsl.rb:175 sig do params( source: Prism::Source, @@ -9027,11 +9042,11 @@ module Prism::DSL value: Prism::Node ).returns(Prism::CallOperatorWriteNode) end - def call_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def call_operator_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, receiver: nil, call_operator_loc: nil, message_loc: nil, read_name: :"", write_name: :"", binary_operator: :"", binary_operator_loc: location, value: default_node(source, location)); end # Create a new CallOrWriteNode node. # - # source://prism//lib/prism/dsl.rb#177 + # pkg:gem/prism#lib/prism/dsl.rb:180 sig do params( source: Prism::Source, @@ -9047,11 +9062,11 @@ module Prism::DSL value: Prism::Node ).returns(Prism::CallOrWriteNode) end - def call_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def call_or_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, receiver: nil, call_operator_loc: nil, message_loc: nil, read_name: :"", write_name: :"", operator_loc: location, value: default_node(source, location)); end # Create a new CallTargetNode node. # - # source://prism//lib/prism/dsl.rb#182 + # pkg:gem/prism#lib/prism/dsl.rb:185 sig do params( source: Prism::Source, @@ -9064,11 +9079,11 @@ module Prism::DSL message_loc: Prism::Location ).returns(Prism::CallTargetNode) end - def call_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil)); end + def call_target_node(source: default_source, node_id: 0, location: default_location, flags: 0, receiver: default_node(source, location), call_operator_loc: location, name: :"", message_loc: location); end # Create a new CapturePatternNode node. # - # source://prism//lib/prism/dsl.rb#187 + # pkg:gem/prism#lib/prism/dsl.rb:190 sig do params( source: Prism::Source, @@ -9080,11 +9095,11 @@ module Prism::DSL operator_loc: Prism::Location ).returns(Prism::CapturePatternNode) end - def capture_pattern_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def capture_pattern_node(source: default_source, node_id: 0, location: default_location, flags: 0, value: default_node(source, location), target: local_variable_target_node(source: source), operator_loc: location); end # Create a new CaseMatchNode node. # - # source://prism//lib/prism/dsl.rb#192 + # pkg:gem/prism#lib/prism/dsl.rb:195 sig do params( source: Prism::Source, @@ -9098,11 +9113,11 @@ module Prism::DSL end_keyword_loc: Prism::Location ).returns(Prism::CaseMatchNode) end - def case_match_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), predicate: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + def case_match_node(source: default_source, node_id: 0, location: default_location, flags: 0, predicate: nil, conditions: [], else_clause: nil, case_keyword_loc: location, end_keyword_loc: location); end # Create a new CaseNode node. # - # source://prism//lib/prism/dsl.rb#197 + # pkg:gem/prism#lib/prism/dsl.rb:200 sig do params( source: Prism::Source, @@ -9116,11 +9131,11 @@ module Prism::DSL end_keyword_loc: Prism::Location ).returns(Prism::CaseNode) end - def case_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), predicate: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + def case_node(source: default_source, node_id: 0, location: default_location, flags: 0, predicate: nil, conditions: [], else_clause: nil, case_keyword_loc: location, end_keyword_loc: location); end # Create a new ClassNode node. # - # source://prism//lib/prism/dsl.rb#202 + # pkg:gem/prism#lib/prism/dsl.rb:205 sig do params( source: Prism::Source, @@ -9137,11 +9152,11 @@ module Prism::DSL name: Symbol ).returns(Prism::ClassNode) end - def class_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), inheritance_operator_loc: T.unsafe(nil), superclass: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil)); end + def class_node(source: default_source, node_id: 0, location: default_location, flags: 0, locals: [], class_keyword_loc: location, constant_path: constant_read_node(source: source), inheritance_operator_loc: nil, superclass: nil, body: nil, end_keyword_loc: location, name: :""); end # Create a new ClassVariableAndWriteNode node. # - # source://prism//lib/prism/dsl.rb#207 + # pkg:gem/prism#lib/prism/dsl.rb:210 sig do params( source: Prism::Source, @@ -9154,11 +9169,11 @@ module Prism::DSL value: Prism::Node ).returns(Prism::ClassVariableAndWriteNode) end - def class_variable_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def class_variable_and_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, operator_loc: location, value: default_node(source, location)); end # Create a new ClassVariableOperatorWriteNode node. # - # source://prism//lib/prism/dsl.rb#212 + # pkg:gem/prism#lib/prism/dsl.rb:215 sig do params( source: Prism::Source, @@ -9172,11 +9187,11 @@ module Prism::DSL binary_operator: Symbol ).returns(Prism::ClassVariableOperatorWriteNode) end - def class_variable_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + def class_variable_operator_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, binary_operator_loc: location, value: default_node(source, location), binary_operator: :""); end # Create a new ClassVariableOrWriteNode node. # - # source://prism//lib/prism/dsl.rb#217 + # pkg:gem/prism#lib/prism/dsl.rb:220 sig do params( source: Prism::Source, @@ -9189,11 +9204,11 @@ module Prism::DSL value: Prism::Node ).returns(Prism::ClassVariableOrWriteNode) end - def class_variable_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def class_variable_or_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, operator_loc: location, value: default_node(source, location)); end # Create a new ClassVariableReadNode node. # - # source://prism//lib/prism/dsl.rb#222 + # pkg:gem/prism#lib/prism/dsl.rb:225 sig do params( source: Prism::Source, @@ -9203,11 +9218,11 @@ module Prism::DSL name: Symbol ).returns(Prism::ClassVariableReadNode) end - def class_variable_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + def class_variable_read_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :""); end # Create a new ClassVariableTargetNode node. # - # source://prism//lib/prism/dsl.rb#227 + # pkg:gem/prism#lib/prism/dsl.rb:230 sig do params( source: Prism::Source, @@ -9217,11 +9232,11 @@ module Prism::DSL name: Symbol ).returns(Prism::ClassVariableTargetNode) end - def class_variable_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + def class_variable_target_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :""); end # Create a new ClassVariableWriteNode node. # - # source://prism//lib/prism/dsl.rb#232 + # pkg:gem/prism#lib/prism/dsl.rb:235 sig do params( source: Prism::Source, @@ -9234,11 +9249,11 @@ module Prism::DSL operator_loc: Prism::Location ).returns(Prism::ClassVariableWriteNode) end - def class_variable_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def class_variable_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, value: default_node(source, location), operator_loc: location); end # Create a new ConstantAndWriteNode node. # - # source://prism//lib/prism/dsl.rb#237 + # pkg:gem/prism#lib/prism/dsl.rb:240 sig do params( source: Prism::Source, @@ -9251,11 +9266,11 @@ module Prism::DSL value: Prism::Node ).returns(Prism::ConstantAndWriteNode) end - def constant_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def constant_and_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, operator_loc: location, value: default_node(source, location)); end # Create a new ConstantOperatorWriteNode node. # - # source://prism//lib/prism/dsl.rb#242 + # pkg:gem/prism#lib/prism/dsl.rb:245 sig do params( source: Prism::Source, @@ -9269,11 +9284,11 @@ module Prism::DSL binary_operator: Symbol ).returns(Prism::ConstantOperatorWriteNode) end - def constant_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + def constant_operator_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, binary_operator_loc: location, value: default_node(source, location), binary_operator: :""); end # Create a new ConstantOrWriteNode node. # - # source://prism//lib/prism/dsl.rb#247 + # pkg:gem/prism#lib/prism/dsl.rb:250 sig do params( source: Prism::Source, @@ -9286,11 +9301,11 @@ module Prism::DSL value: Prism::Node ).returns(Prism::ConstantOrWriteNode) end - def constant_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def constant_or_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, operator_loc: location, value: default_node(source, location)); end # Create a new ConstantPathAndWriteNode node. # - # source://prism//lib/prism/dsl.rb#252 + # pkg:gem/prism#lib/prism/dsl.rb:255 sig do params( source: Prism::Source, @@ -9302,11 +9317,11 @@ module Prism::DSL value: Prism::Node ).returns(Prism::ConstantPathAndWriteNode) end - def constant_path_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def constant_path_and_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, target: constant_path_node(source: source), operator_loc: location, value: default_node(source, location)); end # Create a new ConstantPathNode node. # - # source://prism//lib/prism/dsl.rb#257 + # pkg:gem/prism#lib/prism/dsl.rb:260 sig do params( source: Prism::Source, @@ -9319,11 +9334,11 @@ module Prism::DSL name_loc: Prism::Location ).returns(Prism::ConstantPathNode) end - def constant_path_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil)); end + def constant_path_node(source: default_source, node_id: 0, location: default_location, flags: 0, parent: nil, name: nil, delimiter_loc: location, name_loc: location); end # Create a new ConstantPathOperatorWriteNode node. # - # source://prism//lib/prism/dsl.rb#262 + # pkg:gem/prism#lib/prism/dsl.rb:265 sig do params( source: Prism::Source, @@ -9336,11 +9351,11 @@ module Prism::DSL binary_operator: Symbol ).returns(Prism::ConstantPathOperatorWriteNode) end - def constant_path_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + def constant_path_operator_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, target: constant_path_node(source: source), binary_operator_loc: location, value: default_node(source, location), binary_operator: :""); end # Create a new ConstantPathOrWriteNode node. # - # source://prism//lib/prism/dsl.rb#267 + # pkg:gem/prism#lib/prism/dsl.rb:270 sig do params( source: Prism::Source, @@ -9352,11 +9367,11 @@ module Prism::DSL value: Prism::Node ).returns(Prism::ConstantPathOrWriteNode) end - def constant_path_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def constant_path_or_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, target: constant_path_node(source: source), operator_loc: location, value: default_node(source, location)); end # Create a new ConstantPathTargetNode node. # - # source://prism//lib/prism/dsl.rb#272 + # pkg:gem/prism#lib/prism/dsl.rb:275 sig do params( source: Prism::Source, @@ -9369,11 +9384,11 @@ module Prism::DSL name_loc: Prism::Location ).returns(Prism::ConstantPathTargetNode) end - def constant_path_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil)); end + def constant_path_target_node(source: default_source, node_id: 0, location: default_location, flags: 0, parent: nil, name: nil, delimiter_loc: location, name_loc: location); end # Create a new ConstantPathWriteNode node. # - # source://prism//lib/prism/dsl.rb#277 + # pkg:gem/prism#lib/prism/dsl.rb:280 sig do params( source: Prism::Source, @@ -9385,11 +9400,11 @@ module Prism::DSL value: Prism::Node ).returns(Prism::ConstantPathWriteNode) end - def constant_path_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def constant_path_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, target: constant_path_node(source: source), operator_loc: location, value: default_node(source, location)); end # Create a new ConstantReadNode node. # - # source://prism//lib/prism/dsl.rb#282 + # pkg:gem/prism#lib/prism/dsl.rb:285 sig do params( source: Prism::Source, @@ -9399,11 +9414,11 @@ module Prism::DSL name: Symbol ).returns(Prism::ConstantReadNode) end - def constant_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + def constant_read_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :""); end # Create a new ConstantTargetNode node. # - # source://prism//lib/prism/dsl.rb#287 + # pkg:gem/prism#lib/prism/dsl.rb:290 sig do params( source: Prism::Source, @@ -9413,11 +9428,11 @@ module Prism::DSL name: Symbol ).returns(Prism::ConstantTargetNode) end - def constant_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + def constant_target_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :""); end # Create a new ConstantWriteNode node. # - # source://prism//lib/prism/dsl.rb#292 + # pkg:gem/prism#lib/prism/dsl.rb:295 sig do params( source: Prism::Source, @@ -9430,11 +9445,11 @@ module Prism::DSL operator_loc: Prism::Location ).returns(Prism::ConstantWriteNode) end - def constant_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def constant_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, value: default_node(source, location), operator_loc: location); end # Create a new DefNode node. # - # source://prism//lib/prism/dsl.rb#297 + # pkg:gem/prism#lib/prism/dsl.rb:300 sig do params( source: Prism::Source, @@ -9455,11 +9470,11 @@ module Prism::DSL end_keyword_loc: T.nilable(Prism::Location) ).returns(Prism::DefNode) end - def def_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), receiver: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), locals: T.unsafe(nil), def_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), equal_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + def def_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, receiver: nil, parameters: nil, body: nil, locals: [], def_keyword_loc: location, operator_loc: nil, lparen_loc: nil, rparen_loc: nil, equal_loc: nil, end_keyword_loc: nil); end # Create a new DefinedNode node. # - # source://prism//lib/prism/dsl.rb#302 + # pkg:gem/prism#lib/prism/dsl.rb:305 sig do params( source: Prism::Source, @@ -9472,11 +9487,11 @@ module Prism::DSL keyword_loc: Prism::Location ).returns(Prism::DefinedNode) end - def defined_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lparen_loc: T.unsafe(nil), value: T.unsafe(nil), rparen_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + def defined_node(source: default_source, node_id: 0, location: default_location, flags: 0, lparen_loc: nil, value: default_node(source, location), rparen_loc: nil, keyword_loc: location); end # Create a new ElseNode node. # - # source://prism//lib/prism/dsl.rb#307 + # pkg:gem/prism#lib/prism/dsl.rb:310 sig do params( source: Prism::Source, @@ -9488,11 +9503,11 @@ module Prism::DSL end_keyword_loc: T.nilable(Prism::Location) ).returns(Prism::ElseNode) end - def else_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), else_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + def else_node(source: default_source, node_id: 0, location: default_location, flags: 0, else_keyword_loc: location, statements: nil, end_keyword_loc: nil); end # Create a new EmbeddedStatementsNode node. # - # source://prism//lib/prism/dsl.rb#312 + # pkg:gem/prism#lib/prism/dsl.rb:315 sig do params( source: Prism::Source, @@ -9504,11 +9519,11 @@ module Prism::DSL closing_loc: Prism::Location ).returns(Prism::EmbeddedStatementsNode) end - def embedded_statements_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), statements: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def embedded_statements_node(source: default_source, node_id: 0, location: default_location, flags: 0, opening_loc: location, statements: nil, closing_loc: location); end # Create a new EmbeddedVariableNode node. # - # source://prism//lib/prism/dsl.rb#317 + # pkg:gem/prism#lib/prism/dsl.rb:320 sig do params( source: Prism::Source, @@ -9519,17 +9534,17 @@ module Prism::DSL variable: T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode) ).returns(Prism::EmbeddedVariableNode) end - def embedded_variable_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), variable: T.unsafe(nil)); end + def embedded_variable_node(source: default_source, node_id: 0, location: default_location, flags: 0, operator_loc: location, variable: instance_variable_read_node(source: source)); end # Retrieve the value of one of the EncodingFlags flags. # - # source://prism//lib/prism/dsl.rb#863 + # pkg:gem/prism#lib/prism/dsl.rb:866 sig { params(name: Symbol).returns(Integer) } def encoding_flag(name); end # Create a new EnsureNode node. # - # source://prism//lib/prism/dsl.rb#322 + # pkg:gem/prism#lib/prism/dsl.rb:325 sig do params( source: Prism::Source, @@ -9541,11 +9556,11 @@ module Prism::DSL end_keyword_loc: Prism::Location ).returns(Prism::EnsureNode) end - def ensure_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), ensure_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + def ensure_node(source: default_source, node_id: 0, location: default_location, flags: 0, ensure_keyword_loc: location, statements: nil, end_keyword_loc: location); end # Create a new FalseNode node. # - # source://prism//lib/prism/dsl.rb#327 + # pkg:gem/prism#lib/prism/dsl.rb:330 sig do params( source: Prism::Source, @@ -9554,18 +9569,18 @@ module Prism::DSL flags: Integer ).returns(Prism::FalseNode) end - def false_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + def false_node(source: default_source, node_id: 0, location: default_location, flags: 0); end # Create a new FindPatternNode node. # - # source://prism//lib/prism/dsl.rb#332 + # pkg:gem/prism#lib/prism/dsl.rb:335 sig do params( source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, - constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + constant: T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode)), left: Prism::SplatNode, requireds: T::Array[Prism::Node], right: T.any(Prism::SplatNode, Prism::MissingNode), @@ -9573,11 +9588,11 @@ module Prism::DSL closing_loc: T.nilable(Prism::Location) ).returns(Prism::FindPatternNode) end - def find_pattern_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), left: T.unsafe(nil), requireds: T.unsafe(nil), right: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def find_pattern_node(source: default_source, node_id: 0, location: default_location, flags: 0, constant: nil, left: splat_node(source: source), requireds: [], right: splat_node(source: source), opening_loc: nil, closing_loc: nil); end # Create a new FlipFlopNode node. # - # source://prism//lib/prism/dsl.rb#337 + # pkg:gem/prism#lib/prism/dsl.rb:340 sig do params( source: Prism::Source, @@ -9589,11 +9604,11 @@ module Prism::DSL operator_loc: Prism::Location ).returns(Prism::FlipFlopNode) end - def flip_flop_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def flip_flop_node(source: default_source, node_id: 0, location: default_location, flags: 0, left: nil, right: nil, operator_loc: location); end # Create a new FloatNode node. # - # source://prism//lib/prism/dsl.rb#342 + # pkg:gem/prism#lib/prism/dsl.rb:345 sig do params( source: Prism::Source, @@ -9603,11 +9618,11 @@ module Prism::DSL value: Float ).returns(Prism::FloatNode) end - def float_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end + def float_node(source: default_source, node_id: 0, location: default_location, flags: 0, value: 0.0); end # Create a new ForNode node. # - # source://prism//lib/prism/dsl.rb#347 + # pkg:gem/prism#lib/prism/dsl.rb:350 sig do params( source: Prism::Source, @@ -9623,11 +9638,11 @@ module Prism::DSL end_keyword_loc: Prism::Location ).returns(Prism::ForNode) end - def for_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), index: T.unsafe(nil), collection: T.unsafe(nil), statements: T.unsafe(nil), for_keyword_loc: T.unsafe(nil), in_keyword_loc: T.unsafe(nil), do_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + def for_node(source: default_source, node_id: 0, location: default_location, flags: 0, index: local_variable_target_node(source: source), collection: default_node(source, location), statements: nil, for_keyword_loc: location, in_keyword_loc: location, do_keyword_loc: nil, end_keyword_loc: location); end # Create a new ForwardingArgumentsNode node. # - # source://prism//lib/prism/dsl.rb#352 + # pkg:gem/prism#lib/prism/dsl.rb:355 sig do params( source: Prism::Source, @@ -9636,11 +9651,11 @@ module Prism::DSL flags: Integer ).returns(Prism::ForwardingArgumentsNode) end - def forwarding_arguments_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + def forwarding_arguments_node(source: default_source, node_id: 0, location: default_location, flags: 0); end # Create a new ForwardingParameterNode node. # - # source://prism//lib/prism/dsl.rb#357 + # pkg:gem/prism#lib/prism/dsl.rb:360 sig do params( source: Prism::Source, @@ -9649,11 +9664,11 @@ module Prism::DSL flags: Integer ).returns(Prism::ForwardingParameterNode) end - def forwarding_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + def forwarding_parameter_node(source: default_source, node_id: 0, location: default_location, flags: 0); end # Create a new ForwardingSuperNode node. # - # source://prism//lib/prism/dsl.rb#362 + # pkg:gem/prism#lib/prism/dsl.rb:365 sig do params( source: Prism::Source, @@ -9663,11 +9678,11 @@ module Prism::DSL block: T.nilable(Prism::BlockNode) ).returns(Prism::ForwardingSuperNode) end - def forwarding_super_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), block: T.unsafe(nil)); end + def forwarding_super_node(source: default_source, node_id: 0, location: default_location, flags: 0, block: nil); end # Create a new GlobalVariableAndWriteNode node. # - # source://prism//lib/prism/dsl.rb#367 + # pkg:gem/prism#lib/prism/dsl.rb:370 sig do params( source: Prism::Source, @@ -9680,11 +9695,11 @@ module Prism::DSL value: Prism::Node ).returns(Prism::GlobalVariableAndWriteNode) end - def global_variable_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def global_variable_and_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, operator_loc: location, value: default_node(source, location)); end # Create a new GlobalVariableOperatorWriteNode node. # - # source://prism//lib/prism/dsl.rb#372 + # pkg:gem/prism#lib/prism/dsl.rb:375 sig do params( source: Prism::Source, @@ -9698,11 +9713,11 @@ module Prism::DSL binary_operator: Symbol ).returns(Prism::GlobalVariableOperatorWriteNode) end - def global_variable_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + def global_variable_operator_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, binary_operator_loc: location, value: default_node(source, location), binary_operator: :""); end # Create a new GlobalVariableOrWriteNode node. # - # source://prism//lib/prism/dsl.rb#377 + # pkg:gem/prism#lib/prism/dsl.rb:380 sig do params( source: Prism::Source, @@ -9715,11 +9730,11 @@ module Prism::DSL value: Prism::Node ).returns(Prism::GlobalVariableOrWriteNode) end - def global_variable_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def global_variable_or_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, operator_loc: location, value: default_node(source, location)); end # Create a new GlobalVariableReadNode node. # - # source://prism//lib/prism/dsl.rb#382 + # pkg:gem/prism#lib/prism/dsl.rb:385 sig do params( source: Prism::Source, @@ -9729,11 +9744,11 @@ module Prism::DSL name: Symbol ).returns(Prism::GlobalVariableReadNode) end - def global_variable_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + def global_variable_read_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :""); end # Create a new GlobalVariableTargetNode node. # - # source://prism//lib/prism/dsl.rb#387 + # pkg:gem/prism#lib/prism/dsl.rb:390 sig do params( source: Prism::Source, @@ -9743,11 +9758,11 @@ module Prism::DSL name: Symbol ).returns(Prism::GlobalVariableTargetNode) end - def global_variable_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + def global_variable_target_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :""); end # Create a new GlobalVariableWriteNode node. # - # source://prism//lib/prism/dsl.rb#392 + # pkg:gem/prism#lib/prism/dsl.rb:395 sig do params( source: Prism::Source, @@ -9760,11 +9775,11 @@ module Prism::DSL operator_loc: Prism::Location ).returns(Prism::GlobalVariableWriteNode) end - def global_variable_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def global_variable_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, value: default_node(source, location), operator_loc: location); end # Create a new HashNode node. # - # source://prism//lib/prism/dsl.rb#397 + # pkg:gem/prism#lib/prism/dsl.rb:400 sig do params( source: Prism::Source, @@ -9776,29 +9791,29 @@ module Prism::DSL closing_loc: Prism::Location ).returns(Prism::HashNode) end - def hash_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), elements: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def hash_node(source: default_source, node_id: 0, location: default_location, flags: 0, opening_loc: location, elements: [], closing_loc: location); end # Create a new HashPatternNode node. # - # source://prism//lib/prism/dsl.rb#402 + # pkg:gem/prism#lib/prism/dsl.rb:405 sig do params( source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, - constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + constant: T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode)), elements: T::Array[Prism::AssocNode], rest: T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode)), opening_loc: T.nilable(Prism::Location), closing_loc: T.nilable(Prism::Location) ).returns(Prism::HashPatternNode) end - def hash_pattern_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), elements: T.unsafe(nil), rest: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def hash_pattern_node(source: default_source, node_id: 0, location: default_location, flags: 0, constant: nil, elements: [], rest: nil, opening_loc: nil, closing_loc: nil); end # Create a new IfNode node. # - # source://prism//lib/prism/dsl.rb#407 + # pkg:gem/prism#lib/prism/dsl.rb:410 sig do params( source: Prism::Source, @@ -9813,11 +9828,11 @@ module Prism::DSL end_keyword_loc: T.nilable(Prism::Location) ).returns(Prism::IfNode) end - def if_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), if_keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + def if_node(source: default_source, node_id: 0, location: default_location, flags: 0, if_keyword_loc: nil, predicate: default_node(source, location), then_keyword_loc: nil, statements: nil, subsequent: nil, end_keyword_loc: nil); end # Create a new ImaginaryNode node. # - # source://prism//lib/prism/dsl.rb#412 + # pkg:gem/prism#lib/prism/dsl.rb:415 sig do params( source: Prism::Source, @@ -9827,11 +9842,11 @@ module Prism::DSL numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode) ).returns(Prism::ImaginaryNode) end - def imaginary_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), numeric: T.unsafe(nil)); end + def imaginary_node(source: default_source, node_id: 0, location: default_location, flags: 0, numeric: float_node(source: source)); end # Create a new ImplicitNode node. # - # source://prism//lib/prism/dsl.rb#417 + # pkg:gem/prism#lib/prism/dsl.rb:420 sig do params( source: Prism::Source, @@ -9841,11 +9856,11 @@ module Prism::DSL value: T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode) ).returns(Prism::ImplicitNode) end - def implicit_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end + def implicit_node(source: default_source, node_id: 0, location: default_location, flags: 0, value: local_variable_read_node(source: source)); end # Create a new ImplicitRestNode node. # - # source://prism//lib/prism/dsl.rb#422 + # pkg:gem/prism#lib/prism/dsl.rb:425 sig do params( source: Prism::Source, @@ -9854,11 +9869,11 @@ module Prism::DSL flags: Integer ).returns(Prism::ImplicitRestNode) end - def implicit_rest_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + def implicit_rest_node(source: default_source, node_id: 0, location: default_location, flags: 0); end # Create a new InNode node. # - # source://prism//lib/prism/dsl.rb#427 + # pkg:gem/prism#lib/prism/dsl.rb:430 sig do params( source: Prism::Source, @@ -9871,11 +9886,11 @@ module Prism::DSL then_loc: T.nilable(Prism::Location) ).returns(Prism::InNode) end - def in_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), pattern: T.unsafe(nil), statements: T.unsafe(nil), in_loc: T.unsafe(nil), then_loc: T.unsafe(nil)); end + def in_node(source: default_source, node_id: 0, location: default_location, flags: 0, pattern: default_node(source, location), statements: nil, in_loc: location, then_loc: nil); end # Create a new IndexAndWriteNode node. # - # source://prism//lib/prism/dsl.rb#432 + # pkg:gem/prism#lib/prism/dsl.rb:435 sig do params( source: Prism::Source, @@ -9892,11 +9907,11 @@ module Prism::DSL value: Prism::Node ).returns(Prism::IndexAndWriteNode) end - def index_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def index_and_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, receiver: nil, call_operator_loc: nil, opening_loc: location, arguments: nil, closing_loc: location, block: nil, operator_loc: location, value: default_node(source, location)); end # Create a new IndexOperatorWriteNode node. # - # source://prism//lib/prism/dsl.rb#437 + # pkg:gem/prism#lib/prism/dsl.rb:440 sig do params( source: Prism::Source, @@ -9914,11 +9929,11 @@ module Prism::DSL value: Prism::Node ).returns(Prism::IndexOperatorWriteNode) end - def index_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def index_operator_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, receiver: nil, call_operator_loc: nil, opening_loc: location, arguments: nil, closing_loc: location, block: nil, binary_operator: :"", binary_operator_loc: location, value: default_node(source, location)); end # Create a new IndexOrWriteNode node. # - # source://prism//lib/prism/dsl.rb#442 + # pkg:gem/prism#lib/prism/dsl.rb:445 sig do params( source: Prism::Source, @@ -9935,11 +9950,11 @@ module Prism::DSL value: Prism::Node ).returns(Prism::IndexOrWriteNode) end - def index_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def index_or_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, receiver: nil, call_operator_loc: nil, opening_loc: location, arguments: nil, closing_loc: location, block: nil, operator_loc: location, value: default_node(source, location)); end # Create a new IndexTargetNode node. # - # source://prism//lib/prism/dsl.rb#447 + # pkg:gem/prism#lib/prism/dsl.rb:450 sig do params( source: Prism::Source, @@ -9953,11 +9968,11 @@ module Prism::DSL block: T.nilable(Prism::BlockArgumentNode) ).returns(Prism::IndexTargetNode) end - def index_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil)); end + def index_target_node(source: default_source, node_id: 0, location: default_location, flags: 0, receiver: default_node(source, location), opening_loc: location, arguments: nil, closing_loc: location, block: nil); end # Create a new InstanceVariableAndWriteNode node. # - # source://prism//lib/prism/dsl.rb#452 + # pkg:gem/prism#lib/prism/dsl.rb:455 sig do params( source: Prism::Source, @@ -9970,11 +9985,11 @@ module Prism::DSL value: Prism::Node ).returns(Prism::InstanceVariableAndWriteNode) end - def instance_variable_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def instance_variable_and_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, operator_loc: location, value: default_node(source, location)); end # Create a new InstanceVariableOperatorWriteNode node. # - # source://prism//lib/prism/dsl.rb#457 + # pkg:gem/prism#lib/prism/dsl.rb:460 sig do params( source: Prism::Source, @@ -9988,11 +10003,11 @@ module Prism::DSL binary_operator: Symbol ).returns(Prism::InstanceVariableOperatorWriteNode) end - def instance_variable_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + def instance_variable_operator_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, binary_operator_loc: location, value: default_node(source, location), binary_operator: :""); end # Create a new InstanceVariableOrWriteNode node. # - # source://prism//lib/prism/dsl.rb#462 + # pkg:gem/prism#lib/prism/dsl.rb:465 sig do params( source: Prism::Source, @@ -10005,11 +10020,11 @@ module Prism::DSL value: Prism::Node ).returns(Prism::InstanceVariableOrWriteNode) end - def instance_variable_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def instance_variable_or_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, operator_loc: location, value: default_node(source, location)); end # Create a new InstanceVariableReadNode node. # - # source://prism//lib/prism/dsl.rb#467 + # pkg:gem/prism#lib/prism/dsl.rb:470 sig do params( source: Prism::Source, @@ -10019,11 +10034,11 @@ module Prism::DSL name: Symbol ).returns(Prism::InstanceVariableReadNode) end - def instance_variable_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + def instance_variable_read_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :""); end # Create a new InstanceVariableTargetNode node. # - # source://prism//lib/prism/dsl.rb#472 + # pkg:gem/prism#lib/prism/dsl.rb:475 sig do params( source: Prism::Source, @@ -10033,11 +10048,11 @@ module Prism::DSL name: Symbol ).returns(Prism::InstanceVariableTargetNode) end - def instance_variable_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + def instance_variable_target_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :""); end # Create a new InstanceVariableWriteNode node. # - # source://prism//lib/prism/dsl.rb#477 + # pkg:gem/prism#lib/prism/dsl.rb:480 sig do params( source: Prism::Source, @@ -10050,17 +10065,17 @@ module Prism::DSL operator_loc: Prism::Location ).returns(Prism::InstanceVariableWriteNode) end - def instance_variable_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def instance_variable_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, value: default_node(source, location), operator_loc: location); end # Retrieve the value of one of the IntegerBaseFlags flags. # - # source://prism//lib/prism/dsl.rb#872 + # pkg:gem/prism#lib/prism/dsl.rb:875 sig { params(name: Symbol).returns(Integer) } def integer_base_flag(name); end # Create a new IntegerNode node. # - # source://prism//lib/prism/dsl.rb#482 + # pkg:gem/prism#lib/prism/dsl.rb:485 sig do params( source: Prism::Source, @@ -10070,11 +10085,11 @@ module Prism::DSL value: Integer ).returns(Prism::IntegerNode) end - def integer_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end + def integer_node(source: default_source, node_id: 0, location: default_location, flags: 0, value: 0); end # Create a new InterpolatedMatchLastLineNode node. # - # source://prism//lib/prism/dsl.rb#487 + # pkg:gem/prism#lib/prism/dsl.rb:490 sig do params( source: Prism::Source, @@ -10086,11 +10101,11 @@ module Prism::DSL closing_loc: Prism::Location ).returns(Prism::InterpolatedMatchLastLineNode) end - def interpolated_match_last_line_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def interpolated_match_last_line_node(source: default_source, node_id: 0, location: default_location, flags: 0, opening_loc: location, parts: [], closing_loc: location); end # Create a new InterpolatedRegularExpressionNode node. # - # source://prism//lib/prism/dsl.rb#492 + # pkg:gem/prism#lib/prism/dsl.rb:495 sig do params( source: Prism::Source, @@ -10102,11 +10117,11 @@ module Prism::DSL closing_loc: Prism::Location ).returns(Prism::InterpolatedRegularExpressionNode) end - def interpolated_regular_expression_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def interpolated_regular_expression_node(source: default_source, node_id: 0, location: default_location, flags: 0, opening_loc: location, parts: [], closing_loc: location); end # Create a new InterpolatedStringNode node. # - # source://prism//lib/prism/dsl.rb#497 + # pkg:gem/prism#lib/prism/dsl.rb:500 sig do params( source: Prism::Source, @@ -10114,21 +10129,21 @@ module Prism::DSL location: Prism::Location, flags: Integer, opening_loc: T.nilable(Prism::Location), - parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode, Prism::XStringNode)], + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode, Prism::XStringNode, Prism::InterpolatedXStringNode, Prism::SymbolNode, Prism::InterpolatedSymbolNode)], closing_loc: T.nilable(Prism::Location) ).returns(Prism::InterpolatedStringNode) end - def interpolated_string_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def interpolated_string_node(source: default_source, node_id: 0, location: default_location, flags: 0, opening_loc: nil, parts: [], closing_loc: nil); end # Retrieve the value of one of the InterpolatedStringNodeFlags flags. # - # source://prism//lib/prism/dsl.rb#883 + # pkg:gem/prism#lib/prism/dsl.rb:886 sig { params(name: Symbol).returns(Integer) } def interpolated_string_node_flag(name); end # Create a new InterpolatedSymbolNode node. # - # source://prism//lib/prism/dsl.rb#502 + # pkg:gem/prism#lib/prism/dsl.rb:505 sig do params( source: Prism::Source, @@ -10140,11 +10155,11 @@ module Prism::DSL closing_loc: T.nilable(Prism::Location) ).returns(Prism::InterpolatedSymbolNode) end - def interpolated_symbol_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def interpolated_symbol_node(source: default_source, node_id: 0, location: default_location, flags: 0, opening_loc: nil, parts: [], closing_loc: nil); end # Create a new InterpolatedXStringNode node. # - # source://prism//lib/prism/dsl.rb#507 + # pkg:gem/prism#lib/prism/dsl.rb:510 sig do params( source: Prism::Source, @@ -10156,11 +10171,11 @@ module Prism::DSL closing_loc: Prism::Location ).returns(Prism::InterpolatedXStringNode) end - def interpolated_x_string_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def interpolated_x_string_node(source: default_source, node_id: 0, location: default_location, flags: 0, opening_loc: location, parts: [], closing_loc: location); end # Create a new ItLocalVariableReadNode node. # - # source://prism//lib/prism/dsl.rb#512 + # pkg:gem/prism#lib/prism/dsl.rb:515 sig do params( source: Prism::Source, @@ -10169,11 +10184,11 @@ module Prism::DSL flags: Integer ).returns(Prism::ItLocalVariableReadNode) end - def it_local_variable_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + def it_local_variable_read_node(source: default_source, node_id: 0, location: default_location, flags: 0); end # Create a new ItParametersNode node. # - # source://prism//lib/prism/dsl.rb#517 + # pkg:gem/prism#lib/prism/dsl.rb:520 sig do params( source: Prism::Source, @@ -10182,11 +10197,11 @@ module Prism::DSL flags: Integer ).returns(Prism::ItParametersNode) end - def it_parameters_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + def it_parameters_node(source: default_source, node_id: 0, location: default_location, flags: 0); end # Create a new KeywordHashNode node. # - # source://prism//lib/prism/dsl.rb#522 + # pkg:gem/prism#lib/prism/dsl.rb:525 sig do params( source: Prism::Source, @@ -10196,17 +10211,17 @@ module Prism::DSL elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)] ).returns(Prism::KeywordHashNode) end - def keyword_hash_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), elements: T.unsafe(nil)); end + def keyword_hash_node(source: default_source, node_id: 0, location: default_location, flags: 0, elements: []); end # Retrieve the value of one of the KeywordHashNodeFlags flags. # - # source://prism//lib/prism/dsl.rb#892 + # pkg:gem/prism#lib/prism/dsl.rb:895 sig { params(name: Symbol).returns(Integer) } def keyword_hash_node_flag(name); end # Create a new KeywordRestParameterNode node. # - # source://prism//lib/prism/dsl.rb#527 + # pkg:gem/prism#lib/prism/dsl.rb:530 sig do params( source: Prism::Source, @@ -10218,11 +10233,11 @@ module Prism::DSL operator_loc: Prism::Location ).returns(Prism::KeywordRestParameterNode) end - def keyword_rest_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def keyword_rest_parameter_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: nil, name_loc: nil, operator_loc: location); end # Create a new LambdaNode node. # - # source://prism//lib/prism/dsl.rb#532 + # pkg:gem/prism#lib/prism/dsl.rb:535 sig do params( source: Prism::Source, @@ -10237,11 +10252,11 @@ module Prism::DSL body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)) ).returns(Prism::LambdaNode) end - def lambda_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil)); end + def lambda_node(source: default_source, node_id: 0, location: default_location, flags: 0, locals: [], operator_loc: location, opening_loc: location, closing_loc: location, parameters: nil, body: nil); end # Create a new LocalVariableAndWriteNode node. # - # source://prism//lib/prism/dsl.rb#537 + # pkg:gem/prism#lib/prism/dsl.rb:540 sig do params( source: Prism::Source, @@ -10255,11 +10270,11 @@ module Prism::DSL depth: Integer ).returns(Prism::LocalVariableAndWriteNode) end - def local_variable_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end + def local_variable_and_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name_loc: location, operator_loc: location, value: default_node(source, location), name: :"", depth: 0); end # Create a new LocalVariableOperatorWriteNode node. # - # source://prism//lib/prism/dsl.rb#542 + # pkg:gem/prism#lib/prism/dsl.rb:545 sig do params( source: Prism::Source, @@ -10274,11 +10289,11 @@ module Prism::DSL depth: Integer ).returns(Prism::LocalVariableOperatorWriteNode) end - def local_variable_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), binary_operator: T.unsafe(nil), depth: T.unsafe(nil)); end + def local_variable_operator_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name_loc: location, binary_operator_loc: location, value: default_node(source, location), name: :"", binary_operator: :"", depth: 0); end # Create a new LocalVariableOrWriteNode node. # - # source://prism//lib/prism/dsl.rb#547 + # pkg:gem/prism#lib/prism/dsl.rb:550 sig do params( source: Prism::Source, @@ -10292,11 +10307,11 @@ module Prism::DSL depth: Integer ).returns(Prism::LocalVariableOrWriteNode) end - def local_variable_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end + def local_variable_or_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name_loc: location, operator_loc: location, value: default_node(source, location), name: :"", depth: 0); end # Create a new LocalVariableReadNode node. # - # source://prism//lib/prism/dsl.rb#552 + # pkg:gem/prism#lib/prism/dsl.rb:555 sig do params( source: Prism::Source, @@ -10307,11 +10322,11 @@ module Prism::DSL depth: Integer ).returns(Prism::LocalVariableReadNode) end - def local_variable_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end + def local_variable_read_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", depth: 0); end # Create a new LocalVariableTargetNode node. # - # source://prism//lib/prism/dsl.rb#557 + # pkg:gem/prism#lib/prism/dsl.rb:560 sig do params( source: Prism::Source, @@ -10322,11 +10337,11 @@ module Prism::DSL depth: Integer ).returns(Prism::LocalVariableTargetNode) end - def local_variable_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end + def local_variable_target_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", depth: 0); end # Create a new LocalVariableWriteNode node. # - # source://prism//lib/prism/dsl.rb#562 + # pkg:gem/prism#lib/prism/dsl.rb:565 sig do params( source: Prism::Source, @@ -10340,23 +10355,23 @@ module Prism::DSL operator_loc: Prism::Location ).returns(Prism::LocalVariableWriteNode) end - def local_variable_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def local_variable_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", depth: 0, name_loc: location, value: default_node(source, location), operator_loc: location); end # Create a new Location object. # - # source://prism//lib/prism/dsl.rb#72 + # pkg:gem/prism#lib/prism/dsl.rb:75 sig { params(source: Prism::Source, start_offset: Integer, length: Integer).returns(Prism::Location) } - def location(source: T.unsafe(nil), start_offset: T.unsafe(nil), length: T.unsafe(nil)); end + def location(source: default_source, start_offset: 0, length: 0); end # Retrieve the value of one of the LoopFlags flags. # - # source://prism//lib/prism/dsl.rb#900 + # pkg:gem/prism#lib/prism/dsl.rb:903 sig { params(name: Symbol).returns(Integer) } def loop_flag(name); end # Create a new MatchLastLineNode node. # - # source://prism//lib/prism/dsl.rb#567 + # pkg:gem/prism#lib/prism/dsl.rb:570 sig do params( source: Prism::Source, @@ -10369,11 +10384,11 @@ module Prism::DSL unescaped: String ).returns(Prism::MatchLastLineNode) end - def match_last_line_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + def match_last_line_node(source: default_source, node_id: 0, location: default_location, flags: 0, opening_loc: location, content_loc: location, closing_loc: location, unescaped: ""); end # Create a new MatchPredicateNode node. # - # source://prism//lib/prism/dsl.rb#572 + # pkg:gem/prism#lib/prism/dsl.rb:575 sig do params( source: Prism::Source, @@ -10385,11 +10400,11 @@ module Prism::DSL operator_loc: Prism::Location ).returns(Prism::MatchPredicateNode) end - def match_predicate_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def match_predicate_node(source: default_source, node_id: 0, location: default_location, flags: 0, value: default_node(source, location), pattern: default_node(source, location), operator_loc: location); end # Create a new MatchRequiredNode node. # - # source://prism//lib/prism/dsl.rb#577 + # pkg:gem/prism#lib/prism/dsl.rb:580 sig do params( source: Prism::Source, @@ -10401,11 +10416,11 @@ module Prism::DSL operator_loc: Prism::Location ).returns(Prism::MatchRequiredNode) end - def match_required_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def match_required_node(source: default_source, node_id: 0, location: default_location, flags: 0, value: default_node(source, location), pattern: default_node(source, location), operator_loc: location); end # Create a new MatchWriteNode node. # - # source://prism//lib/prism/dsl.rb#582 + # pkg:gem/prism#lib/prism/dsl.rb:585 sig do params( source: Prism::Source, @@ -10416,11 +10431,11 @@ module Prism::DSL targets: T::Array[Prism::LocalVariableTargetNode] ).returns(Prism::MatchWriteNode) end - def match_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), call: T.unsafe(nil), targets: T.unsafe(nil)); end + def match_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, call: call_node(source: source), targets: []); end # Create a new MissingNode node. # - # source://prism//lib/prism/dsl.rb#587 + # pkg:gem/prism#lib/prism/dsl.rb:590 sig do params( source: Prism::Source, @@ -10429,11 +10444,11 @@ module Prism::DSL flags: Integer ).returns(Prism::MissingNode) end - def missing_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + def missing_node(source: default_source, node_id: 0, location: default_location, flags: 0); end # Create a new ModuleNode node. # - # source://prism//lib/prism/dsl.rb#592 + # pkg:gem/prism#lib/prism/dsl.rb:595 sig do params( source: Prism::Source, @@ -10448,11 +10463,11 @@ module Prism::DSL name: Symbol ).returns(Prism::ModuleNode) end - def module_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), module_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil)); end + def module_node(source: default_source, node_id: 0, location: default_location, flags: 0, locals: [], module_keyword_loc: location, constant_path: constant_read_node(source: source), body: nil, end_keyword_loc: location, name: :""); end # Create a new MultiTargetNode node. # - # source://prism//lib/prism/dsl.rb#597 + # pkg:gem/prism#lib/prism/dsl.rb:600 sig do params( source: Prism::Source, @@ -10466,11 +10481,11 @@ module Prism::DSL rparen_loc: T.nilable(Prism::Location) ).returns(Prism::MultiTargetNode) end - def multi_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end + def multi_target_node(source: default_source, node_id: 0, location: default_location, flags: 0, lefts: [], rest: nil, rights: [], lparen_loc: nil, rparen_loc: nil); end # Create a new MultiWriteNode node. # - # source://prism//lib/prism/dsl.rb#602 + # pkg:gem/prism#lib/prism/dsl.rb:605 sig do params( source: Prism::Source, @@ -10486,11 +10501,11 @@ module Prism::DSL value: Prism::Node ).returns(Prism::MultiWriteNode) end - def multi_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def multi_write_node(source: default_source, node_id: 0, location: default_location, flags: 0, lefts: [], rest: nil, rights: [], lparen_loc: nil, rparen_loc: nil, operator_loc: location, value: default_node(source, location)); end # Create a new NextNode node. # - # source://prism//lib/prism/dsl.rb#607 + # pkg:gem/prism#lib/prism/dsl.rb:610 sig do params( source: Prism::Source, @@ -10501,11 +10516,11 @@ module Prism::DSL keyword_loc: Prism::Location ).returns(Prism::NextNode) end - def next_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + def next_node(source: default_source, node_id: 0, location: default_location, flags: 0, arguments: nil, keyword_loc: location); end # Create a new NilNode node. # - # source://prism//lib/prism/dsl.rb#612 + # pkg:gem/prism#lib/prism/dsl.rb:615 sig do params( source: Prism::Source, @@ -10514,11 +10529,11 @@ module Prism::DSL flags: Integer ).returns(Prism::NilNode) end - def nil_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + def nil_node(source: default_source, node_id: 0, location: default_location, flags: 0); end # Create a new NoKeywordsParameterNode node. # - # source://prism//lib/prism/dsl.rb#617 + # pkg:gem/prism#lib/prism/dsl.rb:620 sig do params( source: Prism::Source, @@ -10529,11 +10544,11 @@ module Prism::DSL keyword_loc: Prism::Location ).returns(Prism::NoKeywordsParameterNode) end - def no_keywords_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + def no_keywords_parameter_node(source: default_source, node_id: 0, location: default_location, flags: 0, operator_loc: location, keyword_loc: location); end # Create a new NumberedParametersNode node. # - # source://prism//lib/prism/dsl.rb#622 + # pkg:gem/prism#lib/prism/dsl.rb:625 sig do params( source: Prism::Source, @@ -10543,11 +10558,11 @@ module Prism::DSL maximum: Integer ).returns(Prism::NumberedParametersNode) end - def numbered_parameters_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), maximum: T.unsafe(nil)); end + def numbered_parameters_node(source: default_source, node_id: 0, location: default_location, flags: 0, maximum: 0); end # Create a new NumberedReferenceReadNode node. # - # source://prism//lib/prism/dsl.rb#627 + # pkg:gem/prism#lib/prism/dsl.rb:630 sig do params( source: Prism::Source, @@ -10557,11 +10572,11 @@ module Prism::DSL number: Integer ).returns(Prism::NumberedReferenceReadNode) end - def numbered_reference_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), number: T.unsafe(nil)); end + def numbered_reference_read_node(source: default_source, node_id: 0, location: default_location, flags: 0, number: 0); end # Create a new OptionalKeywordParameterNode node. # - # source://prism//lib/prism/dsl.rb#632 + # pkg:gem/prism#lib/prism/dsl.rb:635 sig do params( source: Prism::Source, @@ -10573,11 +10588,11 @@ module Prism::DSL value: Prism::Node ).returns(Prism::OptionalKeywordParameterNode) end - def optional_keyword_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def optional_keyword_parameter_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, value: default_node(source, location)); end # Create a new OptionalParameterNode node. # - # source://prism//lib/prism/dsl.rb#637 + # pkg:gem/prism#lib/prism/dsl.rb:640 sig do params( source: Prism::Source, @@ -10590,11 +10605,11 @@ module Prism::DSL value: Prism::Node ).returns(Prism::OptionalParameterNode) end - def optional_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def optional_parameter_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location, operator_loc: location, value: default_node(source, location)); end # Create a new OrNode node. # - # source://prism//lib/prism/dsl.rb#642 + # pkg:gem/prism#lib/prism/dsl.rb:645 sig do params( source: Prism::Source, @@ -10606,17 +10621,17 @@ module Prism::DSL operator_loc: Prism::Location ).returns(Prism::OrNode) end - def or_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def or_node(source: default_source, node_id: 0, location: default_location, flags: 0, left: default_node(source, location), right: default_node(source, location), operator_loc: location); end # Retrieve the value of one of the ParameterFlags flags. # - # source://prism//lib/prism/dsl.rb#908 + # pkg:gem/prism#lib/prism/dsl.rb:911 sig { params(name: Symbol).returns(Integer) } def parameter_flag(name); end # Create a new ParametersNode node. # - # source://prism//lib/prism/dsl.rb#647 + # pkg:gem/prism#lib/prism/dsl.rb:650 sig do params( source: Prism::Source, @@ -10632,11 +10647,11 @@ module Prism::DSL block: T.nilable(Prism::BlockParameterNode) ).returns(Prism::ParametersNode) end - def parameters_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), requireds: T.unsafe(nil), optionals: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), block: T.unsafe(nil)); end + def parameters_node(source: default_source, node_id: 0, location: default_location, flags: 0, requireds: [], optionals: [], rest: nil, posts: [], keywords: [], keyword_rest: nil, block: nil); end # Create a new ParenthesesNode node. # - # source://prism//lib/prism/dsl.rb#652 + # pkg:gem/prism#lib/prism/dsl.rb:655 sig do params( source: Prism::Source, @@ -10648,17 +10663,17 @@ module Prism::DSL closing_loc: Prism::Location ).returns(Prism::ParenthesesNode) end - def parentheses_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def parentheses_node(source: default_source, node_id: 0, location: default_location, flags: 0, body: nil, opening_loc: location, closing_loc: location); end # Retrieve the value of one of the ParenthesesNodeFlags flags. # - # source://prism//lib/prism/dsl.rb#916 + # pkg:gem/prism#lib/prism/dsl.rb:919 sig { params(name: Symbol).returns(Integer) } def parentheses_node_flag(name); end # Create a new PinnedExpressionNode node. # - # source://prism//lib/prism/dsl.rb#657 + # pkg:gem/prism#lib/prism/dsl.rb:660 sig do params( source: Prism::Source, @@ -10671,11 +10686,11 @@ module Prism::DSL rparen_loc: Prism::Location ).returns(Prism::PinnedExpressionNode) end - def pinned_expression_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end + def pinned_expression_node(source: default_source, node_id: 0, location: default_location, flags: 0, expression: default_node(source, location), operator_loc: location, lparen_loc: location, rparen_loc: location); end # Create a new PinnedVariableNode node. # - # source://prism//lib/prism/dsl.rb#662 + # pkg:gem/prism#lib/prism/dsl.rb:665 sig do params( source: Prism::Source, @@ -10686,11 +10701,11 @@ module Prism::DSL operator_loc: Prism::Location ).returns(Prism::PinnedVariableNode) end - def pinned_variable_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), variable: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def pinned_variable_node(source: default_source, node_id: 0, location: default_location, flags: 0, variable: local_variable_read_node(source: source), operator_loc: location); end # Create a new PostExecutionNode node. # - # source://prism//lib/prism/dsl.rb#667 + # pkg:gem/prism#lib/prism/dsl.rb:670 sig do params( source: Prism::Source, @@ -10703,11 +10718,11 @@ module Prism::DSL closing_loc: Prism::Location ).returns(Prism::PostExecutionNode) end - def post_execution_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def post_execution_node(source: default_source, node_id: 0, location: default_location, flags: 0, statements: nil, keyword_loc: location, opening_loc: location, closing_loc: location); end # Create a new PreExecutionNode node. # - # source://prism//lib/prism/dsl.rb#672 + # pkg:gem/prism#lib/prism/dsl.rb:675 sig do params( source: Prism::Source, @@ -10720,11 +10735,11 @@ module Prism::DSL closing_loc: Prism::Location ).returns(Prism::PreExecutionNode) end - def pre_execution_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def pre_execution_node(source: default_source, node_id: 0, location: default_location, flags: 0, statements: nil, keyword_loc: location, opening_loc: location, closing_loc: location); end # Create a new ProgramNode node. # - # source://prism//lib/prism/dsl.rb#677 + # pkg:gem/prism#lib/prism/dsl.rb:680 sig do params( source: Prism::Source, @@ -10735,17 +10750,17 @@ module Prism::DSL statements: Prism::StatementsNode ).returns(Prism::ProgramNode) end - def program_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), statements: T.unsafe(nil)); end + def program_node(source: default_source, node_id: 0, location: default_location, flags: 0, locals: [], statements: statements_node(source: source)); end # Retrieve the value of one of the RangeFlags flags. # - # source://prism//lib/prism/dsl.rb#924 + # pkg:gem/prism#lib/prism/dsl.rb:927 sig { params(name: Symbol).returns(Integer) } def range_flag(name); end # Create a new RangeNode node. # - # source://prism//lib/prism/dsl.rb#682 + # pkg:gem/prism#lib/prism/dsl.rb:685 sig do params( source: Prism::Source, @@ -10757,11 +10772,11 @@ module Prism::DSL operator_loc: Prism::Location ).returns(Prism::RangeNode) end - def range_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def range_node(source: default_source, node_id: 0, location: default_location, flags: 0, left: nil, right: nil, operator_loc: location); end # Create a new RationalNode node. # - # source://prism//lib/prism/dsl.rb#687 + # pkg:gem/prism#lib/prism/dsl.rb:690 sig do params( source: Prism::Source, @@ -10772,11 +10787,11 @@ module Prism::DSL denominator: Integer ).returns(Prism::RationalNode) end - def rational_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), numerator: T.unsafe(nil), denominator: T.unsafe(nil)); end + def rational_node(source: default_source, node_id: 0, location: default_location, flags: 0, numerator: 0, denominator: 0); end # Create a new RedoNode node. # - # source://prism//lib/prism/dsl.rb#692 + # pkg:gem/prism#lib/prism/dsl.rb:695 sig do params( source: Prism::Source, @@ -10785,17 +10800,17 @@ module Prism::DSL flags: Integer ).returns(Prism::RedoNode) end - def redo_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + def redo_node(source: default_source, node_id: 0, location: default_location, flags: 0); end # Retrieve the value of one of the RegularExpressionFlags flags. # - # source://prism//lib/prism/dsl.rb#932 + # pkg:gem/prism#lib/prism/dsl.rb:935 sig { params(name: Symbol).returns(Integer) } def regular_expression_flag(name); end # Create a new RegularExpressionNode node. # - # source://prism//lib/prism/dsl.rb#697 + # pkg:gem/prism#lib/prism/dsl.rb:700 sig do params( source: Prism::Source, @@ -10808,11 +10823,11 @@ module Prism::DSL unescaped: String ).returns(Prism::RegularExpressionNode) end - def regular_expression_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + def regular_expression_node(source: default_source, node_id: 0, location: default_location, flags: 0, opening_loc: location, content_loc: location, closing_loc: location, unescaped: ""); end # Create a new RequiredKeywordParameterNode node. # - # source://prism//lib/prism/dsl.rb#702 + # pkg:gem/prism#lib/prism/dsl.rb:705 sig do params( source: Prism::Source, @@ -10823,11 +10838,11 @@ module Prism::DSL name_loc: Prism::Location ).returns(Prism::RequiredKeywordParameterNode) end - def required_keyword_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil)); end + def required_keyword_parameter_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :"", name_loc: location); end # Create a new RequiredParameterNode node. # - # source://prism//lib/prism/dsl.rb#707 + # pkg:gem/prism#lib/prism/dsl.rb:710 sig do params( source: Prism::Source, @@ -10837,11 +10852,11 @@ module Prism::DSL name: Symbol ).returns(Prism::RequiredParameterNode) end - def required_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + def required_parameter_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: :""); end # Create a new RescueModifierNode node. # - # source://prism//lib/prism/dsl.rb#712 + # pkg:gem/prism#lib/prism/dsl.rb:715 sig do params( source: Prism::Source, @@ -10853,11 +10868,11 @@ module Prism::DSL rescue_expression: Prism::Node ).returns(Prism::RescueModifierNode) end - def rescue_modifier_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), keyword_loc: T.unsafe(nil), rescue_expression: T.unsafe(nil)); end + def rescue_modifier_node(source: default_source, node_id: 0, location: default_location, flags: 0, expression: default_node(source, location), keyword_loc: location, rescue_expression: default_node(source, location)); end # Create a new RescueNode node. # - # source://prism//lib/prism/dsl.rb#717 + # pkg:gem/prism#lib/prism/dsl.rb:720 sig do params( source: Prism::Source, @@ -10873,11 +10888,11 @@ module Prism::DSL subsequent: T.nilable(Prism::RescueNode) ).returns(Prism::RescueNode) end - def rescue_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), exceptions: T.unsafe(nil), operator_loc: T.unsafe(nil), reference: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil)); end + def rescue_node(source: default_source, node_id: 0, location: default_location, flags: 0, keyword_loc: location, exceptions: [], operator_loc: nil, reference: nil, then_keyword_loc: nil, statements: nil, subsequent: nil); end # Create a new RestParameterNode node. # - # source://prism//lib/prism/dsl.rb#722 + # pkg:gem/prism#lib/prism/dsl.rb:725 sig do params( source: Prism::Source, @@ -10889,11 +10904,11 @@ module Prism::DSL operator_loc: Prism::Location ).returns(Prism::RestParameterNode) end - def rest_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def rest_parameter_node(source: default_source, node_id: 0, location: default_location, flags: 0, name: nil, name_loc: nil, operator_loc: location); end # Create a new RetryNode node. # - # source://prism//lib/prism/dsl.rb#727 + # pkg:gem/prism#lib/prism/dsl.rb:730 sig do params( source: Prism::Source, @@ -10902,11 +10917,11 @@ module Prism::DSL flags: Integer ).returns(Prism::RetryNode) end - def retry_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + def retry_node(source: default_source, node_id: 0, location: default_location, flags: 0); end # Create a new ReturnNode node. # - # source://prism//lib/prism/dsl.rb#732 + # pkg:gem/prism#lib/prism/dsl.rb:735 sig do params( source: Prism::Source, @@ -10917,11 +10932,11 @@ module Prism::DSL arguments: T.nilable(Prism::ArgumentsNode) ).returns(Prism::ReturnNode) end - def return_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), arguments: T.unsafe(nil)); end + def return_node(source: default_source, node_id: 0, location: default_location, flags: 0, keyword_loc: location, arguments: nil); end # Create a new SelfNode node. # - # source://prism//lib/prism/dsl.rb#737 + # pkg:gem/prism#lib/prism/dsl.rb:740 sig do params( source: Prism::Source, @@ -10930,11 +10945,11 @@ module Prism::DSL flags: Integer ).returns(Prism::SelfNode) end - def self_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + def self_node(source: default_source, node_id: 0, location: default_location, flags: 0); end # Create a new ShareableConstantNode node. # - # source://prism//lib/prism/dsl.rb#742 + # pkg:gem/prism#lib/prism/dsl.rb:745 sig do params( source: Prism::Source, @@ -10944,17 +10959,17 @@ module Prism::DSL write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode) ).returns(Prism::ShareableConstantNode) end - def shareable_constant_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), write: T.unsafe(nil)); end + def shareable_constant_node(source: default_source, node_id: 0, location: default_location, flags: 0, write: constant_write_node(source: source)); end # Retrieve the value of one of the ShareableConstantNodeFlags flags. # - # source://prism//lib/prism/dsl.rb#950 + # pkg:gem/prism#lib/prism/dsl.rb:953 sig { params(name: Symbol).returns(Integer) } def shareable_constant_node_flag(name); end # Create a new SingletonClassNode node. # - # source://prism//lib/prism/dsl.rb#747 + # pkg:gem/prism#lib/prism/dsl.rb:750 sig do params( source: Prism::Source, @@ -10969,17 +10984,17 @@ module Prism::DSL end_keyword_loc: Prism::Location ).returns(Prism::SingletonClassNode) end - def singleton_class_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + def singleton_class_node(source: default_source, node_id: 0, location: default_location, flags: 0, locals: [], class_keyword_loc: location, operator_loc: location, expression: default_node(source, location), body: nil, end_keyword_loc: location); end # Create a new Source object. # - # source://prism//lib/prism/dsl.rb#67 + # pkg:gem/prism#lib/prism/dsl.rb:70 sig { params(string: String).returns(Prism::Source) } def source(string); end # Create a new SourceEncodingNode node. # - # source://prism//lib/prism/dsl.rb#752 + # pkg:gem/prism#lib/prism/dsl.rb:755 sig do params( source: Prism::Source, @@ -10988,11 +11003,11 @@ module Prism::DSL flags: Integer ).returns(Prism::SourceEncodingNode) end - def source_encoding_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + def source_encoding_node(source: default_source, node_id: 0, location: default_location, flags: 0); end # Create a new SourceFileNode node. # - # source://prism//lib/prism/dsl.rb#757 + # pkg:gem/prism#lib/prism/dsl.rb:760 sig do params( source: Prism::Source, @@ -11002,11 +11017,11 @@ module Prism::DSL filepath: String ).returns(Prism::SourceFileNode) end - def source_file_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), filepath: T.unsafe(nil)); end + def source_file_node(source: default_source, node_id: 0, location: default_location, flags: 0, filepath: ""); end # Create a new SourceLineNode node. # - # source://prism//lib/prism/dsl.rb#762 + # pkg:gem/prism#lib/prism/dsl.rb:765 sig do params( source: Prism::Source, @@ -11015,11 +11030,11 @@ module Prism::DSL flags: Integer ).returns(Prism::SourceLineNode) end - def source_line_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + def source_line_node(source: default_source, node_id: 0, location: default_location, flags: 0); end # Create a new SplatNode node. # - # source://prism//lib/prism/dsl.rb#767 + # pkg:gem/prism#lib/prism/dsl.rb:770 sig do params( source: Prism::Source, @@ -11030,11 +11045,11 @@ module Prism::DSL expression: T.nilable(Prism::Node) ).returns(Prism::SplatNode) end - def splat_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil)); end + def splat_node(source: default_source, node_id: 0, location: default_location, flags: 0, operator_loc: location, expression: nil); end # Create a new StatementsNode node. # - # source://prism//lib/prism/dsl.rb#772 + # pkg:gem/prism#lib/prism/dsl.rb:775 sig do params( source: Prism::Source, @@ -11044,17 +11059,17 @@ module Prism::DSL body: T::Array[Prism::Node] ).returns(Prism::StatementsNode) end - def statements_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), body: T.unsafe(nil)); end + def statements_node(source: default_source, node_id: 0, location: default_location, flags: 0, body: []); end # Retrieve the value of one of the StringFlags flags. # - # source://prism//lib/prism/dsl.rb#960 + # pkg:gem/prism#lib/prism/dsl.rb:963 sig { params(name: Symbol).returns(Integer) } def string_flag(name); end # Create a new StringNode node. # - # source://prism//lib/prism/dsl.rb#777 + # pkg:gem/prism#lib/prism/dsl.rb:780 sig do params( source: Prism::Source, @@ -11067,11 +11082,11 @@ module Prism::DSL unescaped: String ).returns(Prism::StringNode) end - def string_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + def string_node(source: default_source, node_id: 0, location: default_location, flags: 0, opening_loc: nil, content_loc: location, closing_loc: nil, unescaped: ""); end # Create a new SuperNode node. # - # source://prism//lib/prism/dsl.rb#782 + # pkg:gem/prism#lib/prism/dsl.rb:785 sig do params( source: Prism::Source, @@ -11085,17 +11100,17 @@ module Prism::DSL block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) ).returns(Prism::SuperNode) end - def super_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil), block: T.unsafe(nil)); end + def super_node(source: default_source, node_id: 0, location: default_location, flags: 0, keyword_loc: location, lparen_loc: nil, arguments: nil, rparen_loc: nil, block: nil); end # Retrieve the value of one of the SymbolFlags flags. # - # source://prism//lib/prism/dsl.rb#971 + # pkg:gem/prism#lib/prism/dsl.rb:974 sig { params(name: Symbol).returns(Integer) } def symbol_flag(name); end # Create a new SymbolNode node. # - # source://prism//lib/prism/dsl.rb#787 + # pkg:gem/prism#lib/prism/dsl.rb:790 sig do params( source: Prism::Source, @@ -11108,11 +11123,11 @@ module Prism::DSL unescaped: String ).returns(Prism::SymbolNode) end - def symbol_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), value_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + def symbol_node(source: default_source, node_id: 0, location: default_location, flags: 0, opening_loc: nil, value_loc: nil, closing_loc: nil, unescaped: ""); end # Create a new TrueNode node. # - # source://prism//lib/prism/dsl.rb#792 + # pkg:gem/prism#lib/prism/dsl.rb:795 sig do params( source: Prism::Source, @@ -11121,11 +11136,11 @@ module Prism::DSL flags: Integer ).returns(Prism::TrueNode) end - def true_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + def true_node(source: default_source, node_id: 0, location: default_location, flags: 0); end # Create a new UndefNode node. # - # source://prism//lib/prism/dsl.rb#797 + # pkg:gem/prism#lib/prism/dsl.rb:800 sig do params( source: Prism::Source, @@ -11136,11 +11151,11 @@ module Prism::DSL keyword_loc: Prism::Location ).returns(Prism::UndefNode) end - def undef_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), names: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + def undef_node(source: default_source, node_id: 0, location: default_location, flags: 0, names: [], keyword_loc: location); end # Create a new UnlessNode node. # - # source://prism//lib/prism/dsl.rb#802 + # pkg:gem/prism#lib/prism/dsl.rb:805 sig do params( source: Prism::Source, @@ -11155,11 +11170,11 @@ module Prism::DSL end_keyword_loc: T.nilable(Prism::Location) ).returns(Prism::UnlessNode) end - def unless_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), else_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + def unless_node(source: default_source, node_id: 0, location: default_location, flags: 0, keyword_loc: location, predicate: default_node(source, location), then_keyword_loc: nil, statements: nil, else_clause: nil, end_keyword_loc: nil); end # Create a new UntilNode node. # - # source://prism//lib/prism/dsl.rb#807 + # pkg:gem/prism#lib/prism/dsl.rb:810 sig do params( source: Prism::Source, @@ -11173,11 +11188,11 @@ module Prism::DSL statements: T.nilable(Prism::StatementsNode) ).returns(Prism::UntilNode) end - def until_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), do_keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil)); end + def until_node(source: default_source, node_id: 0, location: default_location, flags: 0, keyword_loc: location, do_keyword_loc: nil, closing_loc: nil, predicate: default_node(source, location), statements: nil); end # Create a new WhenNode node. # - # source://prism//lib/prism/dsl.rb#812 + # pkg:gem/prism#lib/prism/dsl.rb:815 sig do params( source: Prism::Source, @@ -11190,11 +11205,11 @@ module Prism::DSL statements: T.nilable(Prism::StatementsNode) ).returns(Prism::WhenNode) end - def when_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), conditions: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil)); end + def when_node(source: default_source, node_id: 0, location: default_location, flags: 0, keyword_loc: location, conditions: [], then_keyword_loc: nil, statements: nil); end # Create a new WhileNode node. # - # source://prism//lib/prism/dsl.rb#817 + # pkg:gem/prism#lib/prism/dsl.rb:820 sig do params( source: Prism::Source, @@ -11208,11 +11223,11 @@ module Prism::DSL statements: T.nilable(Prism::StatementsNode) ).returns(Prism::WhileNode) end - def while_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), do_keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil)); end + def while_node(source: default_source, node_id: 0, location: default_location, flags: 0, keyword_loc: location, do_keyword_loc: nil, closing_loc: nil, predicate: default_node(source, location), statements: nil); end # Create a new XStringNode node. # - # source://prism//lib/prism/dsl.rb#822 + # pkg:gem/prism#lib/prism/dsl.rb:825 sig do params( source: Prism::Source, @@ -11225,11 +11240,11 @@ module Prism::DSL unescaped: String ).returns(Prism::XStringNode) end - def x_string_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + def x_string_node(source: default_source, node_id: 0, location: default_location, flags: 0, opening_loc: location, content_loc: location, closing_loc: location, unescaped: ""); end # Create a new YieldNode node. # - # source://prism//lib/prism/dsl.rb#827 + # pkg:gem/prism#lib/prism/dsl.rb:830 sig do params( source: Prism::Source, @@ -11242,28 +11257,28 @@ module Prism::DSL rparen_loc: T.nilable(Prism::Location) ).returns(Prism::YieldNode) end - def yield_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end + def yield_node(source: default_source, node_id: 0, location: default_location, flags: 0, keyword_loc: location, lparen_loc: nil, arguments: nil, rparen_loc: nil); end private # The default location object that gets attached to nodes if no location is # specified, which uses the given source. # - # source://prism//lib/prism/dsl.rb#990 + # pkg:gem/prism#lib/prism/dsl.rb:993 sig { returns(Prism::Location) } def default_location; end # The default node that gets attached to nodes if no node is specified for a # required node field. # - # source://prism//lib/prism/dsl.rb#996 + # pkg:gem/prism#lib/prism/dsl.rb:999 sig { params(source: Prism::Source, location: Prism::Location).returns(Prism::Node) } def default_node(source, location); end # The default source object that gets attached to nodes and locations if no # source is specified. # - # source://prism//lib/prism/dsl.rb#984 + # pkg:gem/prism#lib/prism/dsl.rb:987 sig { returns(Prism::Source) } def default_source; end end @@ -11274,13 +11289,11 @@ end # end # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5886 +# pkg:gem/prism#lib/prism/node.rb:6293 class Prism::DefNode < ::Prism::Node # Initialize a new DefNode node. # - # @return [DefNode] a new instance of DefNode - # - # source://prism//lib/prism/node.rb#5888 + # pkg:gem/prism#lib/prism/node.rb:6295 sig do params( source: Prism::Source, @@ -11306,42 +11319,42 @@ class Prism::DefNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6127 + # pkg:gem/prism#lib/prism/node.rb:6543 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5908 + # pkg:gem/prism#lib/prism/node.rb:6315 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: StatementsNode | BeginNode | nil # - # source://prism//lib/prism/node.rb#5967 + # pkg:gem/prism#lib/prism/node.rb:6383 sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5913 + # pkg:gem/prism#lib/prism/node.rb:6320 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5927 + # pkg:gem/prism#lib/prism/node.rb:6343 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5918 + # pkg:gem/prism#lib/prism/node.rb:6334 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?receiver: Prism::node?, ?parameters: ParametersNode?, ?body: StatementsNode | BeginNode | nil, ?locals: Array[Symbol], ?def_keyword_loc: Location, ?operator_loc: Location?, ?lparen_loc: Location?, ?rparen_loc: Location?, ?equal_loc: Location?, ?end_keyword_loc: Location?) -> DefNode # - # source://prism//lib/prism/node.rb#5932 + # pkg:gem/prism#lib/prism/node.rb:6348 sig do params( node_id: Integer, @@ -11361,54 +11374,58 @@ class Prism::DefNode < ::Prism::Node end_keyword_loc: T.nilable(Prism::Location) ).returns(Prism::DefNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), receiver: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), locals: T.unsafe(nil), def_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), equal_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, receiver: self.receiver, parameters: self.parameters, body: self.body, locals: self.locals, def_keyword_loc: self.def_keyword_loc, operator_loc: self.operator_loc, lparen_loc: self.lparen_loc, rparen_loc: self.rparen_loc, equal_loc: self.equal_loc, end_keyword_loc: self.end_keyword_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#5913 + # pkg:gem/prism#lib/prism/node.rb:6353 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, receiver: Prism::node?, parameters: ParametersNode?, body: StatementsNode | BeginNode | nil, locals: Array[Symbol], def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location? } # - # source://prism//lib/prism/node.rb#5940 + # pkg:gem/prism#lib/prism/node.rb:6356 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def def_keyword: () -> String # - # source://prism//lib/prism/node.rb#6081 + # pkg:gem/prism#lib/prism/node.rb:6497 sig { returns(String) } def def_keyword; end # attr_reader def_keyword_loc: Location # - # source://prism//lib/prism/node.rb#5973 + # pkg:gem/prism#lib/prism/node.rb:6389 sig { returns(Prism::Location) } def def_keyword_loc; end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:6325 + def each_child_node; end + # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#6106 + # pkg:gem/prism#lib/prism/node.rb:6522 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#6062 + # pkg:gem/prism#lib/prism/node.rb:6478 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end # def equal: () -> String? # - # source://prism//lib/prism/node.rb#6101 + # pkg:gem/prism#lib/prism/node.rb:6517 sig { returns(T.nilable(String)) } def equal; end # attr_reader equal_loc: Location? # - # source://prism//lib/prism/node.rb#6043 + # pkg:gem/prism#lib/prism/node.rb:6459 sig { returns(T.nilable(Prism::Location)) } def equal_loc; end @@ -11417,128 +11434,128 @@ class Prism::DefNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#6111 + # pkg:gem/prism#lib/prism/node.rb:6527 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#5970 + # pkg:gem/prism#lib/prism/node.rb:6386 sig { returns(T::Array[Symbol]) } def locals; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#6091 + # pkg:gem/prism#lib/prism/node.rb:6507 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#6005 + # pkg:gem/prism#lib/prism/node.rb:6421 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#5945 + # pkg:gem/prism#lib/prism/node.rb:6361 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#5948 + # pkg:gem/prism#lib/prism/node.rb:6364 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String? # - # source://prism//lib/prism/node.rb#6086 + # pkg:gem/prism#lib/prism/node.rb:6502 sig { returns(T.nilable(String)) } def operator; end # attr_reader operator_loc: Location? # - # source://prism//lib/prism/node.rb#5986 + # pkg:gem/prism#lib/prism/node.rb:6402 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end # attr_reader parameters: ParametersNode? # - # source://prism//lib/prism/node.rb#5964 + # pkg:gem/prism#lib/prism/node.rb:6380 sig { returns(T.nilable(Prism::ParametersNode)) } def parameters; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#5961 + # pkg:gem/prism#lib/prism/node.rb:6377 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#6096 + # pkg:gem/prism#lib/prism/node.rb:6512 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#6024 + # pkg:gem/prism#lib/prism/node.rb:6440 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Save the def_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5981 + # pkg:gem/prism#lib/prism/node.rb:6397 def save_def_keyword_loc(repository); end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6076 + # pkg:gem/prism#lib/prism/node.rb:6492 def save_end_keyword_loc(repository); end # Save the equal_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6057 + # pkg:gem/prism#lib/prism/node.rb:6473 def save_equal_loc(repository); end # Save the lparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6019 + # pkg:gem/prism#lib/prism/node.rb:6435 def save_lparen_loc(repository); end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#5956 + # pkg:gem/prism#lib/prism/node.rb:6372 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6000 + # pkg:gem/prism#lib/prism/node.rb:6416 def save_operator_loc(repository); end # Save the rparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6038 + # pkg:gem/prism#lib/prism/node.rb:6454 def save_rparen_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#6116 + # pkg:gem/prism#lib/prism/node.rb:6532 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#6121 + # pkg:gem/prism#lib/prism/node.rb:6537 def type; end end end @@ -11548,13 +11565,11 @@ end # defined?(a) # ^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6149 +# pkg:gem/prism#lib/prism/node.rb:6565 class Prism::DefinedNode < ::Prism::Node # Initialize a new DefinedNode node. # - # @return [DefinedNode] a new instance of DefinedNode - # - # source://prism//lib/prism/node.rb#6151 + # pkg:gem/prism#lib/prism/node.rb:6567 sig do params( source: Prism::Source, @@ -11572,36 +11587,36 @@ class Prism::DefinedNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6281 + # pkg:gem/prism#lib/prism/node.rb:6704 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6163 + # pkg:gem/prism#lib/prism/node.rb:6579 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6168 + # pkg:gem/prism#lib/prism/node.rb:6584 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6178 + # pkg:gem/prism#lib/prism/node.rb:6601 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6173 + # pkg:gem/prism#lib/prism/node.rb:6596 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lparen_loc: Location?, ?value: Prism::node, ?rparen_loc: Location?, ?keyword_loc: Location) -> DefinedNode # - # source://prism//lib/prism/node.rb#6183 + # pkg:gem/prism#lib/prism/node.rb:6606 sig do params( node_id: Integer, @@ -11613,148 +11628,140 @@ class Prism::DefinedNode < ::Prism::Node keyword_loc: Prism::Location ).returns(Prism::DefinedNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lparen_loc: T.unsafe(nil), value: T.unsafe(nil), rparen_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, lparen_loc: self.lparen_loc, value: self.value, rparen_loc: self.rparen_loc, keyword_loc: self.keyword_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6168 + # pkg:gem/prism#lib/prism/node.rb:6611 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lparen_loc: Location?, value: Prism::node, rparen_loc: Location?, keyword_loc: Location } # - # source://prism//lib/prism/node.rb#6191 + # pkg:gem/prism#lib/prism/node.rb:6614 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:6589 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#6265 + # pkg:gem/prism#lib/prism/node.rb:6688 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#6260 + # pkg:gem/prism#lib/prism/node.rb:6683 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#6237 + # pkg:gem/prism#lib/prism/node.rb:6660 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#6250 + # pkg:gem/prism#lib/prism/node.rb:6673 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#6196 + # pkg:gem/prism#lib/prism/node.rb:6619 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#6255 + # pkg:gem/prism#lib/prism/node.rb:6678 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#6218 + # pkg:gem/prism#lib/prism/node.rb:6641 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6245 + # pkg:gem/prism#lib/prism/node.rb:6668 def save_keyword_loc(repository); end # Save the lparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6210 + # pkg:gem/prism#lib/prism/node.rb:6633 def save_lparen_loc(repository); end # Save the rparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6232 + # pkg:gem/prism#lib/prism/node.rb:6655 def save_rparen_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#6270 + # pkg:gem/prism#lib/prism/node.rb:6693 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#6215 + # pkg:gem/prism#lib/prism/node.rb:6638 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#6275 + # pkg:gem/prism#lib/prism/node.rb:6698 def type; end end end -# source://prism//lib/prism/desugar_compiler.rb#4 +# pkg:gem/prism#lib/prism/desugar_compiler.rb:5 class Prism::DesugarAndWriteNode include ::Prism::DSL - # @return [DesugarAndWriteNode] a new instance of DesugarAndWriteNode - # - # source://prism//lib/prism/desugar_compiler.rb#9 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:10 def initialize(node, default_source, read_class, write_class, **arguments); end - # Returns the value of attribute arguments. - # - # source://prism//lib/prism/desugar_compiler.rb#7 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:8 def arguments; end # Desugar `x &&= y` to `x && x = y` # - # source://prism//lib/prism/desugar_compiler.rb#18 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:19 def compile; end - # Returns the value of attribute default_source. - # - # source://prism//lib/prism/desugar_compiler.rb#7 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:8 def default_source; end - # Returns the value of attribute node. - # - # source://prism//lib/prism/desugar_compiler.rb#7 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:8 def node; end - # Returns the value of attribute read_class. - # - # source://prism//lib/prism/desugar_compiler.rb#7 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:8 def read_class; end - # Returns the value of attribute write_class. - # - # source://prism//lib/prism/desugar_compiler.rb#7 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:8 def write_class; end end # DesugarCompiler is a compiler that desugars Ruby code into a more primitive # form. This is useful for consumers that want to deal with fewer node types. # -# source://prism//lib/prism/desugar_compiler.rb#255 +# pkg:gem/prism#lib/prism/desugar_compiler.rb:256 class Prism::DesugarCompiler < ::Prism::MutationCompiler # @@foo &&= bar # @@ -11762,7 +11769,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # @@foo && @@foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#261 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:262 def visit_class_variable_and_write_node(node); end # @@foo += bar @@ -11771,7 +11778,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # @@foo = @@foo + bar # - # source://prism//lib/prism/desugar_compiler.rb#279 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:280 def visit_class_variable_operator_write_node(node); end # @@foo ||= bar @@ -11780,7 +11787,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # defined?(@@foo) ? @@foo : @@foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#270 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:271 def visit_class_variable_or_write_node(node); end # Foo &&= bar @@ -11789,7 +11796,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # Foo && Foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#288 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:289 def visit_constant_and_write_node(node); end # Foo += bar @@ -11798,7 +11805,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # Foo = Foo + bar # - # source://prism//lib/prism/desugar_compiler.rb#306 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:307 def visit_constant_operator_write_node(node); end # Foo ||= bar @@ -11807,7 +11814,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # defined?(Foo) ? Foo : Foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#297 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:298 def visit_constant_or_write_node(node); end # $foo &&= bar @@ -11816,7 +11823,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # $foo && $foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#315 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:316 def visit_global_variable_and_write_node(node); end # $foo += bar @@ -11825,7 +11832,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # $foo = $foo + bar # - # source://prism//lib/prism/desugar_compiler.rb#333 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:334 def visit_global_variable_operator_write_node(node); end # $foo ||= bar @@ -11834,22 +11841,34 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # defined?($foo) ? $foo : $foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#324 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:325 def visit_global_variable_or_write_node(node); end + # @foo &&= bar + # # becomes # - # source://prism//lib/prism/desugar_compiler.rb#342 + # @foo && @foo = bar + # + # pkg:gem/prism#lib/prism/desugar_compiler.rb:343 def visit_instance_variable_and_write_node(node); end + # @foo += bar + # # becomes # - # source://prism//lib/prism/desugar_compiler.rb#360 + # @foo = @foo + bar + # + # pkg:gem/prism#lib/prism/desugar_compiler.rb:361 def visit_instance_variable_operator_write_node(node); end + # @foo ||= bar + # # becomes # - # source://prism//lib/prism/desugar_compiler.rb#351 + # @foo || @foo = bar + # + # pkg:gem/prism#lib/prism/desugar_compiler.rb:352 def visit_instance_variable_or_write_node(node); end # foo &&= bar @@ -11858,7 +11877,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # foo && foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#369 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:370 def visit_local_variable_and_write_node(node); end # foo += bar @@ -11867,7 +11886,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # foo = foo + bar # - # source://prism//lib/prism/desugar_compiler.rb#387 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:388 def visit_local_variable_operator_write_node(node); end # foo ||= bar @@ -11876,127 +11895,91 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # foo || foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#378 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:379 def visit_local_variable_or_write_node(node); end end -# source://prism//lib/prism/desugar_compiler.rb#86 +# pkg:gem/prism#lib/prism/desugar_compiler.rb:87 class Prism::DesugarOperatorWriteNode include ::Prism::DSL - # @return [DesugarOperatorWriteNode] a new instance of DesugarOperatorWriteNode - # - # source://prism//lib/prism/desugar_compiler.rb#91 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:92 def initialize(node, default_source, read_class, write_class, **arguments); end - # Returns the value of attribute arguments. - # - # source://prism//lib/prism/desugar_compiler.rb#89 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:90 def arguments; end # Desugar `x += y` to `x = x + y` # - # source://prism//lib/prism/desugar_compiler.rb#100 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:101 def compile; end - # Returns the value of attribute default_source. - # - # source://prism//lib/prism/desugar_compiler.rb#89 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:90 def default_source; end - # Returns the value of attribute node. - # - # source://prism//lib/prism/desugar_compiler.rb#89 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:90 def node; end - # Returns the value of attribute read_class. - # - # source://prism//lib/prism/desugar_compiler.rb#89 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:90 def read_class; end - # Returns the value of attribute write_class. - # - # source://prism//lib/prism/desugar_compiler.rb#89 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:90 def write_class; end end -# source://prism//lib/prism/desugar_compiler.rb#35 +# pkg:gem/prism#lib/prism/desugar_compiler.rb:36 class Prism::DesugarOrWriteDefinedNode include ::Prism::DSL - # @return [DesugarOrWriteDefinedNode] a new instance of DesugarOrWriteDefinedNode - # - # source://prism//lib/prism/desugar_compiler.rb#40 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:41 def initialize(node, default_source, read_class, write_class, **arguments); end - # Returns the value of attribute arguments. - # - # source://prism//lib/prism/desugar_compiler.rb#38 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:39 def arguments; end # Desugar `x ||= y` to `defined?(x) ? x : x = y` # - # source://prism//lib/prism/desugar_compiler.rb#49 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:50 def compile; end - # Returns the value of attribute default_source. - # - # source://prism//lib/prism/desugar_compiler.rb#38 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:39 def default_source; end - # Returns the value of attribute node. - # - # source://prism//lib/prism/desugar_compiler.rb#38 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:39 def node; end - # Returns the value of attribute read_class. - # - # source://prism//lib/prism/desugar_compiler.rb#38 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:39 def read_class; end - # Returns the value of attribute write_class. - # - # source://prism//lib/prism/desugar_compiler.rb#38 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:39 def write_class; end end -# source://prism//lib/prism/desugar_compiler.rb#130 +# pkg:gem/prism#lib/prism/desugar_compiler.rb:131 class Prism::DesugarOrWriteNode include ::Prism::DSL - # @return [DesugarOrWriteNode] a new instance of DesugarOrWriteNode - # - # source://prism//lib/prism/desugar_compiler.rb#135 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:136 def initialize(node, default_source, read_class, write_class, **arguments); end - # Returns the value of attribute arguments. - # - # source://prism//lib/prism/desugar_compiler.rb#133 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:134 def arguments; end # Desugar `x ||= y` to `x || x = y` # - # source://prism//lib/prism/desugar_compiler.rb#144 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:145 def compile; end - # Returns the value of attribute default_source. - # - # source://prism//lib/prism/desugar_compiler.rb#133 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:134 def default_source; end - # Returns the value of attribute node. - # - # source://prism//lib/prism/desugar_compiler.rb#133 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:134 def node; end - # Returns the value of attribute read_class. - # - # source://prism//lib/prism/desugar_compiler.rb#133 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:134 def read_class; end - # Returns the value of attribute write_class. - # - # source://prism//lib/prism/desugar_compiler.rb#133 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:134 def write_class; end end @@ -12032,2491 +12015,2498 @@ end # integer = result.value.statements.body.first.receiver.receiver # dispatcher.dispatch_once(integer) # -# source://prism//lib/prism/dispatcher.rb#42 +# pkg:gem/prism#lib/prism/dispatcher.rb:45 class Prism::Dispatcher < ::Prism::Visitor # Initialize a new dispatcher. # - # @return [Dispatcher] a new instance of Dispatcher - # - # source://prism//lib/prism/dispatcher.rb#47 + # pkg:gem/prism#lib/prism/dispatcher.rb:50 def initialize; end # Walks `root` dispatching events to all registered listeners. # # def dispatch: (Node) -> void # - # source://prism//lib/prism/visitor.rb#17 + # pkg:gem/prism#lib/prism/dispatcher.rb:77 def dispatch(node); end # Dispatches a single event for `node` to all registered listeners. # # def dispatch_once: (Node) -> void # - # source://prism//lib/prism/dispatcher.rb#66 + # pkg:gem/prism#lib/prism/dispatcher.rb:82 def dispatch_once(node); end # attr_reader listeners: Hash[Symbol, Array[Listener]] # - # source://prism//lib/prism/dispatcher.rb#44 + # pkg:gem/prism#lib/prism/dispatcher.rb:47 def listeners; end # Register a listener for one or more events. # # def register: (Listener, *Symbol) -> void # - # source://prism//lib/prism/dispatcher.rb#54 + # pkg:gem/prism#lib/prism/dispatcher.rb:57 def register(listener, *events); end + # Register all public methods of a listener that match the pattern + # `on__(enter|leave)`. + # + # def register_public_methods: (Listener) -> void + # + # pkg:gem/prism#lib/prism/dispatcher.rb:65 + def register_public_methods(listener); end + # Dispatch enter and leave events for AliasGlobalVariableNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#72 + # pkg:gem/prism#lib/prism/dispatcher.rb:88 def visit_alias_global_variable_node(node); end # Dispatch enter and leave events for AliasMethodNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#80 + # pkg:gem/prism#lib/prism/dispatcher.rb:96 def visit_alias_method_node(node); end # Dispatch enter and leave events for AlternationPatternNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#88 + # pkg:gem/prism#lib/prism/dispatcher.rb:104 def visit_alternation_pattern_node(node); end # Dispatch enter and leave events for AndNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#96 + # pkg:gem/prism#lib/prism/dispatcher.rb:112 def visit_and_node(node); end # Dispatch enter and leave events for ArgumentsNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#104 + # pkg:gem/prism#lib/prism/dispatcher.rb:120 def visit_arguments_node(node); end # Dispatch enter and leave events for ArrayNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#112 + # pkg:gem/prism#lib/prism/dispatcher.rb:128 def visit_array_node(node); end # Dispatch enter and leave events for ArrayPatternNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#120 + # pkg:gem/prism#lib/prism/dispatcher.rb:136 def visit_array_pattern_node(node); end # Dispatch enter and leave events for AssocNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#128 + # pkg:gem/prism#lib/prism/dispatcher.rb:144 def visit_assoc_node(node); end # Dispatch enter and leave events for AssocSplatNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#136 + # pkg:gem/prism#lib/prism/dispatcher.rb:152 def visit_assoc_splat_node(node); end # Dispatch enter and leave events for BackReferenceReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#144 + # pkg:gem/prism#lib/prism/dispatcher.rb:160 def visit_back_reference_read_node(node); end # Dispatch enter and leave events for BeginNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#152 + # pkg:gem/prism#lib/prism/dispatcher.rb:168 def visit_begin_node(node); end # Dispatch enter and leave events for BlockArgumentNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#160 + # pkg:gem/prism#lib/prism/dispatcher.rb:176 def visit_block_argument_node(node); end # Dispatch enter and leave events for BlockLocalVariableNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#168 + # pkg:gem/prism#lib/prism/dispatcher.rb:184 def visit_block_local_variable_node(node); end # Dispatch enter and leave events for BlockNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#176 + # pkg:gem/prism#lib/prism/dispatcher.rb:192 def visit_block_node(node); end # Dispatch enter and leave events for BlockParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#184 + # pkg:gem/prism#lib/prism/dispatcher.rb:200 def visit_block_parameter_node(node); end # Dispatch enter and leave events for BlockParametersNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#192 + # pkg:gem/prism#lib/prism/dispatcher.rb:208 def visit_block_parameters_node(node); end # Dispatch enter and leave events for BreakNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#200 + # pkg:gem/prism#lib/prism/dispatcher.rb:216 def visit_break_node(node); end # Dispatch enter and leave events for CallAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#208 + # pkg:gem/prism#lib/prism/dispatcher.rb:224 def visit_call_and_write_node(node); end # Dispatch enter and leave events for CallNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#216 + # pkg:gem/prism#lib/prism/dispatcher.rb:232 def visit_call_node(node); end # Dispatch enter and leave events for CallOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#224 + # pkg:gem/prism#lib/prism/dispatcher.rb:240 def visit_call_operator_write_node(node); end # Dispatch enter and leave events for CallOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#232 + # pkg:gem/prism#lib/prism/dispatcher.rb:248 def visit_call_or_write_node(node); end # Dispatch enter and leave events for CallTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#240 + # pkg:gem/prism#lib/prism/dispatcher.rb:256 def visit_call_target_node(node); end # Dispatch enter and leave events for CapturePatternNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#248 + # pkg:gem/prism#lib/prism/dispatcher.rb:264 def visit_capture_pattern_node(node); end # Dispatch enter and leave events for CaseMatchNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#256 + # pkg:gem/prism#lib/prism/dispatcher.rb:272 def visit_case_match_node(node); end # Dispatch enter and leave events for CaseNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#264 + # pkg:gem/prism#lib/prism/dispatcher.rb:280 def visit_case_node(node); end # Dispatch enter and leave events for ClassNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#272 + # pkg:gem/prism#lib/prism/dispatcher.rb:288 def visit_class_node(node); end # Dispatch enter and leave events for ClassVariableAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#280 + # pkg:gem/prism#lib/prism/dispatcher.rb:296 def visit_class_variable_and_write_node(node); end # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#288 + # pkg:gem/prism#lib/prism/dispatcher.rb:304 def visit_class_variable_operator_write_node(node); end # Dispatch enter and leave events for ClassVariableOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#296 + # pkg:gem/prism#lib/prism/dispatcher.rb:312 def visit_class_variable_or_write_node(node); end # Dispatch enter and leave events for ClassVariableReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#304 + # pkg:gem/prism#lib/prism/dispatcher.rb:320 def visit_class_variable_read_node(node); end # Dispatch enter and leave events for ClassVariableTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#312 + # pkg:gem/prism#lib/prism/dispatcher.rb:328 def visit_class_variable_target_node(node); end # Dispatch enter and leave events for ClassVariableWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#320 + # pkg:gem/prism#lib/prism/dispatcher.rb:336 def visit_class_variable_write_node(node); end # Dispatch enter and leave events for ConstantAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#328 + # pkg:gem/prism#lib/prism/dispatcher.rb:344 def visit_constant_and_write_node(node); end # Dispatch enter and leave events for ConstantOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#336 + # pkg:gem/prism#lib/prism/dispatcher.rb:352 def visit_constant_operator_write_node(node); end # Dispatch enter and leave events for ConstantOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#344 + # pkg:gem/prism#lib/prism/dispatcher.rb:360 def visit_constant_or_write_node(node); end # Dispatch enter and leave events for ConstantPathAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#352 + # pkg:gem/prism#lib/prism/dispatcher.rb:368 def visit_constant_path_and_write_node(node); end # Dispatch enter and leave events for ConstantPathNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#360 + # pkg:gem/prism#lib/prism/dispatcher.rb:376 def visit_constant_path_node(node); end # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#368 + # pkg:gem/prism#lib/prism/dispatcher.rb:384 def visit_constant_path_operator_write_node(node); end # Dispatch enter and leave events for ConstantPathOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#376 + # pkg:gem/prism#lib/prism/dispatcher.rb:392 def visit_constant_path_or_write_node(node); end # Dispatch enter and leave events for ConstantPathTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#384 + # pkg:gem/prism#lib/prism/dispatcher.rb:400 def visit_constant_path_target_node(node); end # Dispatch enter and leave events for ConstantPathWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#392 + # pkg:gem/prism#lib/prism/dispatcher.rb:408 def visit_constant_path_write_node(node); end # Dispatch enter and leave events for ConstantReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#400 + # pkg:gem/prism#lib/prism/dispatcher.rb:416 def visit_constant_read_node(node); end # Dispatch enter and leave events for ConstantTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#408 + # pkg:gem/prism#lib/prism/dispatcher.rb:424 def visit_constant_target_node(node); end # Dispatch enter and leave events for ConstantWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#416 + # pkg:gem/prism#lib/prism/dispatcher.rb:432 def visit_constant_write_node(node); end # Dispatch enter and leave events for DefNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#424 + # pkg:gem/prism#lib/prism/dispatcher.rb:440 def visit_def_node(node); end # Dispatch enter and leave events for DefinedNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#432 + # pkg:gem/prism#lib/prism/dispatcher.rb:448 def visit_defined_node(node); end # Dispatch enter and leave events for ElseNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#440 + # pkg:gem/prism#lib/prism/dispatcher.rb:456 def visit_else_node(node); end # Dispatch enter and leave events for EmbeddedStatementsNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#448 + # pkg:gem/prism#lib/prism/dispatcher.rb:464 def visit_embedded_statements_node(node); end # Dispatch enter and leave events for EmbeddedVariableNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#456 + # pkg:gem/prism#lib/prism/dispatcher.rb:472 def visit_embedded_variable_node(node); end # Dispatch enter and leave events for EnsureNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#464 + # pkg:gem/prism#lib/prism/dispatcher.rb:480 def visit_ensure_node(node); end # Dispatch enter and leave events for FalseNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#472 + # pkg:gem/prism#lib/prism/dispatcher.rb:488 def visit_false_node(node); end # Dispatch enter and leave events for FindPatternNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#480 + # pkg:gem/prism#lib/prism/dispatcher.rb:496 def visit_find_pattern_node(node); end # Dispatch enter and leave events for FlipFlopNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#488 + # pkg:gem/prism#lib/prism/dispatcher.rb:504 def visit_flip_flop_node(node); end # Dispatch enter and leave events for FloatNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#496 + # pkg:gem/prism#lib/prism/dispatcher.rb:512 def visit_float_node(node); end # Dispatch enter and leave events for ForNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#504 + # pkg:gem/prism#lib/prism/dispatcher.rb:520 def visit_for_node(node); end # Dispatch enter and leave events for ForwardingArgumentsNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#512 + # pkg:gem/prism#lib/prism/dispatcher.rb:528 def visit_forwarding_arguments_node(node); end # Dispatch enter and leave events for ForwardingParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#520 + # pkg:gem/prism#lib/prism/dispatcher.rb:536 def visit_forwarding_parameter_node(node); end # Dispatch enter and leave events for ForwardingSuperNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#528 + # pkg:gem/prism#lib/prism/dispatcher.rb:544 def visit_forwarding_super_node(node); end # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#536 + # pkg:gem/prism#lib/prism/dispatcher.rb:552 def visit_global_variable_and_write_node(node); end # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#544 + # pkg:gem/prism#lib/prism/dispatcher.rb:560 def visit_global_variable_operator_write_node(node); end # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#552 + # pkg:gem/prism#lib/prism/dispatcher.rb:568 def visit_global_variable_or_write_node(node); end # Dispatch enter and leave events for GlobalVariableReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#560 + # pkg:gem/prism#lib/prism/dispatcher.rb:576 def visit_global_variable_read_node(node); end # Dispatch enter and leave events for GlobalVariableTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#568 + # pkg:gem/prism#lib/prism/dispatcher.rb:584 def visit_global_variable_target_node(node); end # Dispatch enter and leave events for GlobalVariableWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#576 + # pkg:gem/prism#lib/prism/dispatcher.rb:592 def visit_global_variable_write_node(node); end # Dispatch enter and leave events for HashNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#584 + # pkg:gem/prism#lib/prism/dispatcher.rb:600 def visit_hash_node(node); end # Dispatch enter and leave events for HashPatternNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#592 + # pkg:gem/prism#lib/prism/dispatcher.rb:608 def visit_hash_pattern_node(node); end # Dispatch enter and leave events for IfNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#600 + # pkg:gem/prism#lib/prism/dispatcher.rb:616 def visit_if_node(node); end # Dispatch enter and leave events for ImaginaryNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#608 + # pkg:gem/prism#lib/prism/dispatcher.rb:624 def visit_imaginary_node(node); end # Dispatch enter and leave events for ImplicitNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#616 + # pkg:gem/prism#lib/prism/dispatcher.rb:632 def visit_implicit_node(node); end # Dispatch enter and leave events for ImplicitRestNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#624 + # pkg:gem/prism#lib/prism/dispatcher.rb:640 def visit_implicit_rest_node(node); end # Dispatch enter and leave events for InNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#632 + # pkg:gem/prism#lib/prism/dispatcher.rb:648 def visit_in_node(node); end # Dispatch enter and leave events for IndexAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#640 + # pkg:gem/prism#lib/prism/dispatcher.rb:656 def visit_index_and_write_node(node); end # Dispatch enter and leave events for IndexOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#648 + # pkg:gem/prism#lib/prism/dispatcher.rb:664 def visit_index_operator_write_node(node); end # Dispatch enter and leave events for IndexOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#656 + # pkg:gem/prism#lib/prism/dispatcher.rb:672 def visit_index_or_write_node(node); end # Dispatch enter and leave events for IndexTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#664 + # pkg:gem/prism#lib/prism/dispatcher.rb:680 def visit_index_target_node(node); end # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#672 + # pkg:gem/prism#lib/prism/dispatcher.rb:688 def visit_instance_variable_and_write_node(node); end # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#680 + # pkg:gem/prism#lib/prism/dispatcher.rb:696 def visit_instance_variable_operator_write_node(node); end # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#688 + # pkg:gem/prism#lib/prism/dispatcher.rb:704 def visit_instance_variable_or_write_node(node); end # Dispatch enter and leave events for InstanceVariableReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#696 + # pkg:gem/prism#lib/prism/dispatcher.rb:712 def visit_instance_variable_read_node(node); end # Dispatch enter and leave events for InstanceVariableTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#704 + # pkg:gem/prism#lib/prism/dispatcher.rb:720 def visit_instance_variable_target_node(node); end # Dispatch enter and leave events for InstanceVariableWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#712 + # pkg:gem/prism#lib/prism/dispatcher.rb:728 def visit_instance_variable_write_node(node); end # Dispatch enter and leave events for IntegerNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#720 + # pkg:gem/prism#lib/prism/dispatcher.rb:736 def visit_integer_node(node); end # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#728 + # pkg:gem/prism#lib/prism/dispatcher.rb:744 def visit_interpolated_match_last_line_node(node); end # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#736 + # pkg:gem/prism#lib/prism/dispatcher.rb:752 def visit_interpolated_regular_expression_node(node); end # Dispatch enter and leave events for InterpolatedStringNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#744 + # pkg:gem/prism#lib/prism/dispatcher.rb:760 def visit_interpolated_string_node(node); end # Dispatch enter and leave events for InterpolatedSymbolNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#752 + # pkg:gem/prism#lib/prism/dispatcher.rb:768 def visit_interpolated_symbol_node(node); end # Dispatch enter and leave events for InterpolatedXStringNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#760 + # pkg:gem/prism#lib/prism/dispatcher.rb:776 def visit_interpolated_x_string_node(node); end # Dispatch enter and leave events for ItLocalVariableReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#768 + # pkg:gem/prism#lib/prism/dispatcher.rb:784 def visit_it_local_variable_read_node(node); end # Dispatch enter and leave events for ItParametersNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#776 + # pkg:gem/prism#lib/prism/dispatcher.rb:792 def visit_it_parameters_node(node); end # Dispatch enter and leave events for KeywordHashNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#784 + # pkg:gem/prism#lib/prism/dispatcher.rb:800 def visit_keyword_hash_node(node); end # Dispatch enter and leave events for KeywordRestParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#792 + # pkg:gem/prism#lib/prism/dispatcher.rb:808 def visit_keyword_rest_parameter_node(node); end # Dispatch enter and leave events for LambdaNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#800 + # pkg:gem/prism#lib/prism/dispatcher.rb:816 def visit_lambda_node(node); end # Dispatch enter and leave events for LocalVariableAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#808 + # pkg:gem/prism#lib/prism/dispatcher.rb:824 def visit_local_variable_and_write_node(node); end # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#816 + # pkg:gem/prism#lib/prism/dispatcher.rb:832 def visit_local_variable_operator_write_node(node); end # Dispatch enter and leave events for LocalVariableOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#824 + # pkg:gem/prism#lib/prism/dispatcher.rb:840 def visit_local_variable_or_write_node(node); end # Dispatch enter and leave events for LocalVariableReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#832 + # pkg:gem/prism#lib/prism/dispatcher.rb:848 def visit_local_variable_read_node(node); end # Dispatch enter and leave events for LocalVariableTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#840 + # pkg:gem/prism#lib/prism/dispatcher.rb:856 def visit_local_variable_target_node(node); end # Dispatch enter and leave events for LocalVariableWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#848 + # pkg:gem/prism#lib/prism/dispatcher.rb:864 def visit_local_variable_write_node(node); end # Dispatch enter and leave events for MatchLastLineNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#856 + # pkg:gem/prism#lib/prism/dispatcher.rb:872 def visit_match_last_line_node(node); end # Dispatch enter and leave events for MatchPredicateNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#864 + # pkg:gem/prism#lib/prism/dispatcher.rb:880 def visit_match_predicate_node(node); end # Dispatch enter and leave events for MatchRequiredNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#872 + # pkg:gem/prism#lib/prism/dispatcher.rb:888 def visit_match_required_node(node); end # Dispatch enter and leave events for MatchWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#880 + # pkg:gem/prism#lib/prism/dispatcher.rb:896 def visit_match_write_node(node); end # Dispatch enter and leave events for MissingNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#888 + # pkg:gem/prism#lib/prism/dispatcher.rb:904 def visit_missing_node(node); end # Dispatch enter and leave events for ModuleNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#896 + # pkg:gem/prism#lib/prism/dispatcher.rb:912 def visit_module_node(node); end # Dispatch enter and leave events for MultiTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#904 + # pkg:gem/prism#lib/prism/dispatcher.rb:920 def visit_multi_target_node(node); end # Dispatch enter and leave events for MultiWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#912 + # pkg:gem/prism#lib/prism/dispatcher.rb:928 def visit_multi_write_node(node); end # Dispatch enter and leave events for NextNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#920 + # pkg:gem/prism#lib/prism/dispatcher.rb:936 def visit_next_node(node); end # Dispatch enter and leave events for NilNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#928 + # pkg:gem/prism#lib/prism/dispatcher.rb:944 def visit_nil_node(node); end # Dispatch enter and leave events for NoKeywordsParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#936 + # pkg:gem/prism#lib/prism/dispatcher.rb:952 def visit_no_keywords_parameter_node(node); end # Dispatch enter and leave events for NumberedParametersNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#944 + # pkg:gem/prism#lib/prism/dispatcher.rb:960 def visit_numbered_parameters_node(node); end # Dispatch enter and leave events for NumberedReferenceReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#952 + # pkg:gem/prism#lib/prism/dispatcher.rb:968 def visit_numbered_reference_read_node(node); end # Dispatch enter and leave events for OptionalKeywordParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#960 + # pkg:gem/prism#lib/prism/dispatcher.rb:976 def visit_optional_keyword_parameter_node(node); end # Dispatch enter and leave events for OptionalParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#968 + # pkg:gem/prism#lib/prism/dispatcher.rb:984 def visit_optional_parameter_node(node); end # Dispatch enter and leave events for OrNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#976 + # pkg:gem/prism#lib/prism/dispatcher.rb:992 def visit_or_node(node); end # Dispatch enter and leave events for ParametersNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#984 + # pkg:gem/prism#lib/prism/dispatcher.rb:1000 def visit_parameters_node(node); end # Dispatch enter and leave events for ParenthesesNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#992 + # pkg:gem/prism#lib/prism/dispatcher.rb:1008 def visit_parentheses_node(node); end # Dispatch enter and leave events for PinnedExpressionNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1000 + # pkg:gem/prism#lib/prism/dispatcher.rb:1016 def visit_pinned_expression_node(node); end # Dispatch enter and leave events for PinnedVariableNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1008 + # pkg:gem/prism#lib/prism/dispatcher.rb:1024 def visit_pinned_variable_node(node); end # Dispatch enter and leave events for PostExecutionNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1016 + # pkg:gem/prism#lib/prism/dispatcher.rb:1032 def visit_post_execution_node(node); end # Dispatch enter and leave events for PreExecutionNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1024 + # pkg:gem/prism#lib/prism/dispatcher.rb:1040 def visit_pre_execution_node(node); end # Dispatch enter and leave events for ProgramNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1032 + # pkg:gem/prism#lib/prism/dispatcher.rb:1048 def visit_program_node(node); end # Dispatch enter and leave events for RangeNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1040 + # pkg:gem/prism#lib/prism/dispatcher.rb:1056 def visit_range_node(node); end # Dispatch enter and leave events for RationalNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1048 + # pkg:gem/prism#lib/prism/dispatcher.rb:1064 def visit_rational_node(node); end # Dispatch enter and leave events for RedoNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1056 + # pkg:gem/prism#lib/prism/dispatcher.rb:1072 def visit_redo_node(node); end # Dispatch enter and leave events for RegularExpressionNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1064 + # pkg:gem/prism#lib/prism/dispatcher.rb:1080 def visit_regular_expression_node(node); end # Dispatch enter and leave events for RequiredKeywordParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1072 + # pkg:gem/prism#lib/prism/dispatcher.rb:1088 def visit_required_keyword_parameter_node(node); end # Dispatch enter and leave events for RequiredParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1080 + # pkg:gem/prism#lib/prism/dispatcher.rb:1096 def visit_required_parameter_node(node); end # Dispatch enter and leave events for RescueModifierNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1088 + # pkg:gem/prism#lib/prism/dispatcher.rb:1104 def visit_rescue_modifier_node(node); end # Dispatch enter and leave events for RescueNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1096 + # pkg:gem/prism#lib/prism/dispatcher.rb:1112 def visit_rescue_node(node); end # Dispatch enter and leave events for RestParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1104 + # pkg:gem/prism#lib/prism/dispatcher.rb:1120 def visit_rest_parameter_node(node); end # Dispatch enter and leave events for RetryNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1112 + # pkg:gem/prism#lib/prism/dispatcher.rb:1128 def visit_retry_node(node); end # Dispatch enter and leave events for ReturnNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1120 + # pkg:gem/prism#lib/prism/dispatcher.rb:1136 def visit_return_node(node); end # Dispatch enter and leave events for SelfNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1128 + # pkg:gem/prism#lib/prism/dispatcher.rb:1144 def visit_self_node(node); end # Dispatch enter and leave events for ShareableConstantNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1136 + # pkg:gem/prism#lib/prism/dispatcher.rb:1152 def visit_shareable_constant_node(node); end # Dispatch enter and leave events for SingletonClassNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1144 + # pkg:gem/prism#lib/prism/dispatcher.rb:1160 def visit_singleton_class_node(node); end # Dispatch enter and leave events for SourceEncodingNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1152 + # pkg:gem/prism#lib/prism/dispatcher.rb:1168 def visit_source_encoding_node(node); end # Dispatch enter and leave events for SourceFileNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1160 + # pkg:gem/prism#lib/prism/dispatcher.rb:1176 def visit_source_file_node(node); end # Dispatch enter and leave events for SourceLineNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1168 + # pkg:gem/prism#lib/prism/dispatcher.rb:1184 def visit_source_line_node(node); end # Dispatch enter and leave events for SplatNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1176 + # pkg:gem/prism#lib/prism/dispatcher.rb:1192 def visit_splat_node(node); end # Dispatch enter and leave events for StatementsNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1184 + # pkg:gem/prism#lib/prism/dispatcher.rb:1200 def visit_statements_node(node); end # Dispatch enter and leave events for StringNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1192 + # pkg:gem/prism#lib/prism/dispatcher.rb:1208 def visit_string_node(node); end # Dispatch enter and leave events for SuperNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1200 + # pkg:gem/prism#lib/prism/dispatcher.rb:1216 def visit_super_node(node); end # Dispatch enter and leave events for SymbolNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1208 + # pkg:gem/prism#lib/prism/dispatcher.rb:1224 def visit_symbol_node(node); end # Dispatch enter and leave events for TrueNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1216 + # pkg:gem/prism#lib/prism/dispatcher.rb:1232 def visit_true_node(node); end # Dispatch enter and leave events for UndefNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1224 + # pkg:gem/prism#lib/prism/dispatcher.rb:1240 def visit_undef_node(node); end # Dispatch enter and leave events for UnlessNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1232 + # pkg:gem/prism#lib/prism/dispatcher.rb:1248 def visit_unless_node(node); end # Dispatch enter and leave events for UntilNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1240 + # pkg:gem/prism#lib/prism/dispatcher.rb:1256 def visit_until_node(node); end # Dispatch enter and leave events for WhenNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1248 + # pkg:gem/prism#lib/prism/dispatcher.rb:1264 def visit_when_node(node); end # Dispatch enter and leave events for WhileNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1256 + # pkg:gem/prism#lib/prism/dispatcher.rb:1272 def visit_while_node(node); end # Dispatch enter and leave events for XStringNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1264 + # pkg:gem/prism#lib/prism/dispatcher.rb:1280 def visit_x_string_node(node); end # Dispatch enter and leave events for YieldNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1272 + # pkg:gem/prism#lib/prism/dispatcher.rb:1288 def visit_yield_node(node); end + + private + + # Register a listener for the given events. + # + # pkg:gem/prism#lib/prism/dispatcher.rb:70 + def register_events(listener, events); end end -# source://prism//lib/prism/dispatcher.rb#1278 +# pkg:gem/prism#lib/prism/dispatcher.rb:1294 class Prism::Dispatcher::DispatchOnce < ::Prism::Visitor - # @return [DispatchOnce] a new instance of DispatchOnce - # - # source://prism//lib/prism/dispatcher.rb#1281 + # pkg:gem/prism#lib/prism/dispatcher.rb:1297 def initialize(listeners); end - # Returns the value of attribute listeners. - # - # source://prism//lib/prism/dispatcher.rb#1279 + # pkg:gem/prism#lib/prism/dispatcher.rb:1295 def listeners; end # Dispatch enter and leave events for AliasGlobalVariableNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1286 + # pkg:gem/prism#lib/prism/dispatcher.rb:1302 def visit_alias_global_variable_node(node); end # Dispatch enter and leave events for AliasMethodNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1292 + # pkg:gem/prism#lib/prism/dispatcher.rb:1308 def visit_alias_method_node(node); end # Dispatch enter and leave events for AlternationPatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1298 + # pkg:gem/prism#lib/prism/dispatcher.rb:1314 def visit_alternation_pattern_node(node); end # Dispatch enter and leave events for AndNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1304 + # pkg:gem/prism#lib/prism/dispatcher.rb:1320 def visit_and_node(node); end # Dispatch enter and leave events for ArgumentsNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1310 + # pkg:gem/prism#lib/prism/dispatcher.rb:1326 def visit_arguments_node(node); end # Dispatch enter and leave events for ArrayNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1316 + # pkg:gem/prism#lib/prism/dispatcher.rb:1332 def visit_array_node(node); end # Dispatch enter and leave events for ArrayPatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1322 + # pkg:gem/prism#lib/prism/dispatcher.rb:1338 def visit_array_pattern_node(node); end # Dispatch enter and leave events for AssocNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1328 + # pkg:gem/prism#lib/prism/dispatcher.rb:1344 def visit_assoc_node(node); end # Dispatch enter and leave events for AssocSplatNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1334 + # pkg:gem/prism#lib/prism/dispatcher.rb:1350 def visit_assoc_splat_node(node); end # Dispatch enter and leave events for BackReferenceReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1340 + # pkg:gem/prism#lib/prism/dispatcher.rb:1356 def visit_back_reference_read_node(node); end # Dispatch enter and leave events for BeginNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1346 + # pkg:gem/prism#lib/prism/dispatcher.rb:1362 def visit_begin_node(node); end # Dispatch enter and leave events for BlockArgumentNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1352 + # pkg:gem/prism#lib/prism/dispatcher.rb:1368 def visit_block_argument_node(node); end # Dispatch enter and leave events for BlockLocalVariableNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1358 + # pkg:gem/prism#lib/prism/dispatcher.rb:1374 def visit_block_local_variable_node(node); end # Dispatch enter and leave events for BlockNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1364 + # pkg:gem/prism#lib/prism/dispatcher.rb:1380 def visit_block_node(node); end # Dispatch enter and leave events for BlockParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1370 + # pkg:gem/prism#lib/prism/dispatcher.rb:1386 def visit_block_parameter_node(node); end # Dispatch enter and leave events for BlockParametersNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1376 + # pkg:gem/prism#lib/prism/dispatcher.rb:1392 def visit_block_parameters_node(node); end # Dispatch enter and leave events for BreakNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1382 + # pkg:gem/prism#lib/prism/dispatcher.rb:1398 def visit_break_node(node); end # Dispatch enter and leave events for CallAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1388 + # pkg:gem/prism#lib/prism/dispatcher.rb:1404 def visit_call_and_write_node(node); end # Dispatch enter and leave events for CallNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1394 + # pkg:gem/prism#lib/prism/dispatcher.rb:1410 def visit_call_node(node); end # Dispatch enter and leave events for CallOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1400 + # pkg:gem/prism#lib/prism/dispatcher.rb:1416 def visit_call_operator_write_node(node); end # Dispatch enter and leave events for CallOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1406 + # pkg:gem/prism#lib/prism/dispatcher.rb:1422 def visit_call_or_write_node(node); end # Dispatch enter and leave events for CallTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1412 + # pkg:gem/prism#lib/prism/dispatcher.rb:1428 def visit_call_target_node(node); end # Dispatch enter and leave events for CapturePatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1418 + # pkg:gem/prism#lib/prism/dispatcher.rb:1434 def visit_capture_pattern_node(node); end # Dispatch enter and leave events for CaseMatchNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1424 + # pkg:gem/prism#lib/prism/dispatcher.rb:1440 def visit_case_match_node(node); end # Dispatch enter and leave events for CaseNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1430 + # pkg:gem/prism#lib/prism/dispatcher.rb:1446 def visit_case_node(node); end # Dispatch enter and leave events for ClassNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1436 + # pkg:gem/prism#lib/prism/dispatcher.rb:1452 def visit_class_node(node); end # Dispatch enter and leave events for ClassVariableAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1442 + # pkg:gem/prism#lib/prism/dispatcher.rb:1458 def visit_class_variable_and_write_node(node); end # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1448 + # pkg:gem/prism#lib/prism/dispatcher.rb:1464 def visit_class_variable_operator_write_node(node); end # Dispatch enter and leave events for ClassVariableOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1454 + # pkg:gem/prism#lib/prism/dispatcher.rb:1470 def visit_class_variable_or_write_node(node); end # Dispatch enter and leave events for ClassVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1460 + # pkg:gem/prism#lib/prism/dispatcher.rb:1476 def visit_class_variable_read_node(node); end # Dispatch enter and leave events for ClassVariableTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1466 + # pkg:gem/prism#lib/prism/dispatcher.rb:1482 def visit_class_variable_target_node(node); end # Dispatch enter and leave events for ClassVariableWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1472 + # pkg:gem/prism#lib/prism/dispatcher.rb:1488 def visit_class_variable_write_node(node); end # Dispatch enter and leave events for ConstantAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1478 + # pkg:gem/prism#lib/prism/dispatcher.rb:1494 def visit_constant_and_write_node(node); end # Dispatch enter and leave events for ConstantOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1484 + # pkg:gem/prism#lib/prism/dispatcher.rb:1500 def visit_constant_operator_write_node(node); end # Dispatch enter and leave events for ConstantOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1490 + # pkg:gem/prism#lib/prism/dispatcher.rb:1506 def visit_constant_or_write_node(node); end # Dispatch enter and leave events for ConstantPathAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1496 + # pkg:gem/prism#lib/prism/dispatcher.rb:1512 def visit_constant_path_and_write_node(node); end # Dispatch enter and leave events for ConstantPathNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1502 + # pkg:gem/prism#lib/prism/dispatcher.rb:1518 def visit_constant_path_node(node); end # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1508 + # pkg:gem/prism#lib/prism/dispatcher.rb:1524 def visit_constant_path_operator_write_node(node); end # Dispatch enter and leave events for ConstantPathOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1514 + # pkg:gem/prism#lib/prism/dispatcher.rb:1530 def visit_constant_path_or_write_node(node); end # Dispatch enter and leave events for ConstantPathTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1520 + # pkg:gem/prism#lib/prism/dispatcher.rb:1536 def visit_constant_path_target_node(node); end # Dispatch enter and leave events for ConstantPathWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1526 + # pkg:gem/prism#lib/prism/dispatcher.rb:1542 def visit_constant_path_write_node(node); end # Dispatch enter and leave events for ConstantReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1532 + # pkg:gem/prism#lib/prism/dispatcher.rb:1548 def visit_constant_read_node(node); end # Dispatch enter and leave events for ConstantTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1538 + # pkg:gem/prism#lib/prism/dispatcher.rb:1554 def visit_constant_target_node(node); end # Dispatch enter and leave events for ConstantWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1544 + # pkg:gem/prism#lib/prism/dispatcher.rb:1560 def visit_constant_write_node(node); end # Dispatch enter and leave events for DefNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1550 + # pkg:gem/prism#lib/prism/dispatcher.rb:1566 def visit_def_node(node); end # Dispatch enter and leave events for DefinedNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1556 + # pkg:gem/prism#lib/prism/dispatcher.rb:1572 def visit_defined_node(node); end # Dispatch enter and leave events for ElseNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1562 + # pkg:gem/prism#lib/prism/dispatcher.rb:1578 def visit_else_node(node); end # Dispatch enter and leave events for EmbeddedStatementsNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1568 + # pkg:gem/prism#lib/prism/dispatcher.rb:1584 def visit_embedded_statements_node(node); end # Dispatch enter and leave events for EmbeddedVariableNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1574 + # pkg:gem/prism#lib/prism/dispatcher.rb:1590 def visit_embedded_variable_node(node); end # Dispatch enter and leave events for EnsureNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1580 + # pkg:gem/prism#lib/prism/dispatcher.rb:1596 def visit_ensure_node(node); end # Dispatch enter and leave events for FalseNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1586 + # pkg:gem/prism#lib/prism/dispatcher.rb:1602 def visit_false_node(node); end # Dispatch enter and leave events for FindPatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1592 + # pkg:gem/prism#lib/prism/dispatcher.rb:1608 def visit_find_pattern_node(node); end # Dispatch enter and leave events for FlipFlopNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1598 + # pkg:gem/prism#lib/prism/dispatcher.rb:1614 def visit_flip_flop_node(node); end # Dispatch enter and leave events for FloatNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1604 + # pkg:gem/prism#lib/prism/dispatcher.rb:1620 def visit_float_node(node); end # Dispatch enter and leave events for ForNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1610 + # pkg:gem/prism#lib/prism/dispatcher.rb:1626 def visit_for_node(node); end # Dispatch enter and leave events for ForwardingArgumentsNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1616 + # pkg:gem/prism#lib/prism/dispatcher.rb:1632 def visit_forwarding_arguments_node(node); end # Dispatch enter and leave events for ForwardingParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1622 + # pkg:gem/prism#lib/prism/dispatcher.rb:1638 def visit_forwarding_parameter_node(node); end # Dispatch enter and leave events for ForwardingSuperNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1628 + # pkg:gem/prism#lib/prism/dispatcher.rb:1644 def visit_forwarding_super_node(node); end # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1634 + # pkg:gem/prism#lib/prism/dispatcher.rb:1650 def visit_global_variable_and_write_node(node); end # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1640 + # pkg:gem/prism#lib/prism/dispatcher.rb:1656 def visit_global_variable_operator_write_node(node); end # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1646 + # pkg:gem/prism#lib/prism/dispatcher.rb:1662 def visit_global_variable_or_write_node(node); end # Dispatch enter and leave events for GlobalVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1652 + # pkg:gem/prism#lib/prism/dispatcher.rb:1668 def visit_global_variable_read_node(node); end # Dispatch enter and leave events for GlobalVariableTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1658 + # pkg:gem/prism#lib/prism/dispatcher.rb:1674 def visit_global_variable_target_node(node); end # Dispatch enter and leave events for GlobalVariableWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1664 + # pkg:gem/prism#lib/prism/dispatcher.rb:1680 def visit_global_variable_write_node(node); end # Dispatch enter and leave events for HashNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1670 + # pkg:gem/prism#lib/prism/dispatcher.rb:1686 def visit_hash_node(node); end # Dispatch enter and leave events for HashPatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1676 + # pkg:gem/prism#lib/prism/dispatcher.rb:1692 def visit_hash_pattern_node(node); end # Dispatch enter and leave events for IfNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1682 + # pkg:gem/prism#lib/prism/dispatcher.rb:1698 def visit_if_node(node); end # Dispatch enter and leave events for ImaginaryNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1688 + # pkg:gem/prism#lib/prism/dispatcher.rb:1704 def visit_imaginary_node(node); end # Dispatch enter and leave events for ImplicitNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1694 + # pkg:gem/prism#lib/prism/dispatcher.rb:1710 def visit_implicit_node(node); end # Dispatch enter and leave events for ImplicitRestNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1700 + # pkg:gem/prism#lib/prism/dispatcher.rb:1716 def visit_implicit_rest_node(node); end # Dispatch enter and leave events for InNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1706 + # pkg:gem/prism#lib/prism/dispatcher.rb:1722 def visit_in_node(node); end # Dispatch enter and leave events for IndexAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1712 + # pkg:gem/prism#lib/prism/dispatcher.rb:1728 def visit_index_and_write_node(node); end # Dispatch enter and leave events for IndexOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1718 + # pkg:gem/prism#lib/prism/dispatcher.rb:1734 def visit_index_operator_write_node(node); end # Dispatch enter and leave events for IndexOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1724 + # pkg:gem/prism#lib/prism/dispatcher.rb:1740 def visit_index_or_write_node(node); end # Dispatch enter and leave events for IndexTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1730 + # pkg:gem/prism#lib/prism/dispatcher.rb:1746 def visit_index_target_node(node); end # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1736 + # pkg:gem/prism#lib/prism/dispatcher.rb:1752 def visit_instance_variable_and_write_node(node); end # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1742 + # pkg:gem/prism#lib/prism/dispatcher.rb:1758 def visit_instance_variable_operator_write_node(node); end # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1748 + # pkg:gem/prism#lib/prism/dispatcher.rb:1764 def visit_instance_variable_or_write_node(node); end # Dispatch enter and leave events for InstanceVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1754 + # pkg:gem/prism#lib/prism/dispatcher.rb:1770 def visit_instance_variable_read_node(node); end # Dispatch enter and leave events for InstanceVariableTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1760 + # pkg:gem/prism#lib/prism/dispatcher.rb:1776 def visit_instance_variable_target_node(node); end # Dispatch enter and leave events for InstanceVariableWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1766 + # pkg:gem/prism#lib/prism/dispatcher.rb:1782 def visit_instance_variable_write_node(node); end # Dispatch enter and leave events for IntegerNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1772 + # pkg:gem/prism#lib/prism/dispatcher.rb:1788 def visit_integer_node(node); end # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1778 + # pkg:gem/prism#lib/prism/dispatcher.rb:1794 def visit_interpolated_match_last_line_node(node); end # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1784 + # pkg:gem/prism#lib/prism/dispatcher.rb:1800 def visit_interpolated_regular_expression_node(node); end # Dispatch enter and leave events for InterpolatedStringNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1790 + # pkg:gem/prism#lib/prism/dispatcher.rb:1806 def visit_interpolated_string_node(node); end # Dispatch enter and leave events for InterpolatedSymbolNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1796 + # pkg:gem/prism#lib/prism/dispatcher.rb:1812 def visit_interpolated_symbol_node(node); end # Dispatch enter and leave events for InterpolatedXStringNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1802 + # pkg:gem/prism#lib/prism/dispatcher.rb:1818 def visit_interpolated_x_string_node(node); end # Dispatch enter and leave events for ItLocalVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1808 + # pkg:gem/prism#lib/prism/dispatcher.rb:1824 def visit_it_local_variable_read_node(node); end # Dispatch enter and leave events for ItParametersNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1814 + # pkg:gem/prism#lib/prism/dispatcher.rb:1830 def visit_it_parameters_node(node); end # Dispatch enter and leave events for KeywordHashNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1820 + # pkg:gem/prism#lib/prism/dispatcher.rb:1836 def visit_keyword_hash_node(node); end # Dispatch enter and leave events for KeywordRestParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1826 + # pkg:gem/prism#lib/prism/dispatcher.rb:1842 def visit_keyword_rest_parameter_node(node); end # Dispatch enter and leave events for LambdaNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1832 + # pkg:gem/prism#lib/prism/dispatcher.rb:1848 def visit_lambda_node(node); end # Dispatch enter and leave events for LocalVariableAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1838 + # pkg:gem/prism#lib/prism/dispatcher.rb:1854 def visit_local_variable_and_write_node(node); end # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1844 + # pkg:gem/prism#lib/prism/dispatcher.rb:1860 def visit_local_variable_operator_write_node(node); end # Dispatch enter and leave events for LocalVariableOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1850 + # pkg:gem/prism#lib/prism/dispatcher.rb:1866 def visit_local_variable_or_write_node(node); end # Dispatch enter and leave events for LocalVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1856 + # pkg:gem/prism#lib/prism/dispatcher.rb:1872 def visit_local_variable_read_node(node); end # Dispatch enter and leave events for LocalVariableTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1862 + # pkg:gem/prism#lib/prism/dispatcher.rb:1878 def visit_local_variable_target_node(node); end # Dispatch enter and leave events for LocalVariableWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1868 + # pkg:gem/prism#lib/prism/dispatcher.rb:1884 def visit_local_variable_write_node(node); end # Dispatch enter and leave events for MatchLastLineNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1874 + # pkg:gem/prism#lib/prism/dispatcher.rb:1890 def visit_match_last_line_node(node); end # Dispatch enter and leave events for MatchPredicateNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1880 + # pkg:gem/prism#lib/prism/dispatcher.rb:1896 def visit_match_predicate_node(node); end # Dispatch enter and leave events for MatchRequiredNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1886 + # pkg:gem/prism#lib/prism/dispatcher.rb:1902 def visit_match_required_node(node); end # Dispatch enter and leave events for MatchWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1892 + # pkg:gem/prism#lib/prism/dispatcher.rb:1908 def visit_match_write_node(node); end # Dispatch enter and leave events for MissingNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1898 + # pkg:gem/prism#lib/prism/dispatcher.rb:1914 def visit_missing_node(node); end # Dispatch enter and leave events for ModuleNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1904 + # pkg:gem/prism#lib/prism/dispatcher.rb:1920 def visit_module_node(node); end # Dispatch enter and leave events for MultiTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1910 + # pkg:gem/prism#lib/prism/dispatcher.rb:1926 def visit_multi_target_node(node); end # Dispatch enter and leave events for MultiWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1916 + # pkg:gem/prism#lib/prism/dispatcher.rb:1932 def visit_multi_write_node(node); end # Dispatch enter and leave events for NextNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1922 + # pkg:gem/prism#lib/prism/dispatcher.rb:1938 def visit_next_node(node); end # Dispatch enter and leave events for NilNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1928 + # pkg:gem/prism#lib/prism/dispatcher.rb:1944 def visit_nil_node(node); end # Dispatch enter and leave events for NoKeywordsParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1934 + # pkg:gem/prism#lib/prism/dispatcher.rb:1950 def visit_no_keywords_parameter_node(node); end # Dispatch enter and leave events for NumberedParametersNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1940 + # pkg:gem/prism#lib/prism/dispatcher.rb:1956 def visit_numbered_parameters_node(node); end # Dispatch enter and leave events for NumberedReferenceReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1946 + # pkg:gem/prism#lib/prism/dispatcher.rb:1962 def visit_numbered_reference_read_node(node); end # Dispatch enter and leave events for OptionalKeywordParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1952 + # pkg:gem/prism#lib/prism/dispatcher.rb:1968 def visit_optional_keyword_parameter_node(node); end # Dispatch enter and leave events for OptionalParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1958 + # pkg:gem/prism#lib/prism/dispatcher.rb:1974 def visit_optional_parameter_node(node); end # Dispatch enter and leave events for OrNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1964 + # pkg:gem/prism#lib/prism/dispatcher.rb:1980 def visit_or_node(node); end # Dispatch enter and leave events for ParametersNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1970 + # pkg:gem/prism#lib/prism/dispatcher.rb:1986 def visit_parameters_node(node); end # Dispatch enter and leave events for ParenthesesNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1976 + # pkg:gem/prism#lib/prism/dispatcher.rb:1992 def visit_parentheses_node(node); end # Dispatch enter and leave events for PinnedExpressionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1982 + # pkg:gem/prism#lib/prism/dispatcher.rb:1998 def visit_pinned_expression_node(node); end # Dispatch enter and leave events for PinnedVariableNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1988 + # pkg:gem/prism#lib/prism/dispatcher.rb:2004 def visit_pinned_variable_node(node); end # Dispatch enter and leave events for PostExecutionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1994 + # pkg:gem/prism#lib/prism/dispatcher.rb:2010 def visit_post_execution_node(node); end # Dispatch enter and leave events for PreExecutionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2000 + # pkg:gem/prism#lib/prism/dispatcher.rb:2016 def visit_pre_execution_node(node); end # Dispatch enter and leave events for ProgramNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2006 + # pkg:gem/prism#lib/prism/dispatcher.rb:2022 def visit_program_node(node); end # Dispatch enter and leave events for RangeNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2012 + # pkg:gem/prism#lib/prism/dispatcher.rb:2028 def visit_range_node(node); end # Dispatch enter and leave events for RationalNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2018 + # pkg:gem/prism#lib/prism/dispatcher.rb:2034 def visit_rational_node(node); end # Dispatch enter and leave events for RedoNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2024 + # pkg:gem/prism#lib/prism/dispatcher.rb:2040 def visit_redo_node(node); end # Dispatch enter and leave events for RegularExpressionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2030 + # pkg:gem/prism#lib/prism/dispatcher.rb:2046 def visit_regular_expression_node(node); end # Dispatch enter and leave events for RequiredKeywordParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2036 + # pkg:gem/prism#lib/prism/dispatcher.rb:2052 def visit_required_keyword_parameter_node(node); end # Dispatch enter and leave events for RequiredParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2042 + # pkg:gem/prism#lib/prism/dispatcher.rb:2058 def visit_required_parameter_node(node); end # Dispatch enter and leave events for RescueModifierNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2048 + # pkg:gem/prism#lib/prism/dispatcher.rb:2064 def visit_rescue_modifier_node(node); end # Dispatch enter and leave events for RescueNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2054 + # pkg:gem/prism#lib/prism/dispatcher.rb:2070 def visit_rescue_node(node); end # Dispatch enter and leave events for RestParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2060 + # pkg:gem/prism#lib/prism/dispatcher.rb:2076 def visit_rest_parameter_node(node); end # Dispatch enter and leave events for RetryNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2066 + # pkg:gem/prism#lib/prism/dispatcher.rb:2082 def visit_retry_node(node); end # Dispatch enter and leave events for ReturnNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2072 + # pkg:gem/prism#lib/prism/dispatcher.rb:2088 def visit_return_node(node); end # Dispatch enter and leave events for SelfNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2078 + # pkg:gem/prism#lib/prism/dispatcher.rb:2094 def visit_self_node(node); end # Dispatch enter and leave events for ShareableConstantNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2084 + # pkg:gem/prism#lib/prism/dispatcher.rb:2100 def visit_shareable_constant_node(node); end # Dispatch enter and leave events for SingletonClassNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2090 + # pkg:gem/prism#lib/prism/dispatcher.rb:2106 def visit_singleton_class_node(node); end # Dispatch enter and leave events for SourceEncodingNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2096 + # pkg:gem/prism#lib/prism/dispatcher.rb:2112 def visit_source_encoding_node(node); end # Dispatch enter and leave events for SourceFileNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2102 + # pkg:gem/prism#lib/prism/dispatcher.rb:2118 def visit_source_file_node(node); end # Dispatch enter and leave events for SourceLineNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2108 + # pkg:gem/prism#lib/prism/dispatcher.rb:2124 def visit_source_line_node(node); end # Dispatch enter and leave events for SplatNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2114 + # pkg:gem/prism#lib/prism/dispatcher.rb:2130 def visit_splat_node(node); end # Dispatch enter and leave events for StatementsNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2120 + # pkg:gem/prism#lib/prism/dispatcher.rb:2136 def visit_statements_node(node); end # Dispatch enter and leave events for StringNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2126 + # pkg:gem/prism#lib/prism/dispatcher.rb:2142 def visit_string_node(node); end # Dispatch enter and leave events for SuperNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2132 + # pkg:gem/prism#lib/prism/dispatcher.rb:2148 def visit_super_node(node); end # Dispatch enter and leave events for SymbolNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2138 + # pkg:gem/prism#lib/prism/dispatcher.rb:2154 def visit_symbol_node(node); end # Dispatch enter and leave events for TrueNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2144 + # pkg:gem/prism#lib/prism/dispatcher.rb:2160 def visit_true_node(node); end # Dispatch enter and leave events for UndefNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2150 + # pkg:gem/prism#lib/prism/dispatcher.rb:2166 def visit_undef_node(node); end # Dispatch enter and leave events for UnlessNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2156 + # pkg:gem/prism#lib/prism/dispatcher.rb:2172 def visit_unless_node(node); end # Dispatch enter and leave events for UntilNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2162 + # pkg:gem/prism#lib/prism/dispatcher.rb:2178 def visit_until_node(node); end # Dispatch enter and leave events for WhenNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2168 + # pkg:gem/prism#lib/prism/dispatcher.rb:2184 def visit_when_node(node); end # Dispatch enter and leave events for WhileNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2174 + # pkg:gem/prism#lib/prism/dispatcher.rb:2190 def visit_while_node(node); end # Dispatch enter and leave events for XStringNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2180 + # pkg:gem/prism#lib/prism/dispatcher.rb:2196 def visit_x_string_node(node); end # Dispatch enter and leave events for YieldNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2186 + # pkg:gem/prism#lib/prism/dispatcher.rb:2202 def visit_yield_node(node); end end # This visitor provides the ability to call Node#to_dot, which converts a # subtree into a graphviz dot graph. # -# source://prism//lib/prism/dot_visitor.rb#14 +# pkg:gem/prism#lib/prism/dot_visitor.rb:18 class Prism::DotVisitor < ::Prism::Visitor # Initialize a new dot visitor. # - # @return [DotVisitor] a new instance of DotVisitor - # - # source://prism//lib/prism/dot_visitor.rb#106 + # pkg:gem/prism#lib/prism/dot_visitor.rb:110 def initialize; end # The digraph that is being built. # - # source://prism//lib/prism/dot_visitor.rb#103 + # pkg:gem/prism#lib/prism/dot_visitor.rb:107 def digraph; end # Convert this visitor into a graphviz dot graph string. # - # source://prism//lib/prism/dot_visitor.rb#111 + # pkg:gem/prism#lib/prism/dot_visitor.rb:115 def to_dot; end # Visit a AliasGlobalVariableNode node. # - # source://prism//lib/prism/dot_visitor.rb#116 + # pkg:gem/prism#lib/prism/dot_visitor.rb:120 def visit_alias_global_variable_node(node); end # Visit a AliasMethodNode node. # - # source://prism//lib/prism/dot_visitor.rb#141 + # pkg:gem/prism#lib/prism/dot_visitor.rb:145 def visit_alias_method_node(node); end # Visit a AlternationPatternNode node. # - # source://prism//lib/prism/dot_visitor.rb#166 + # pkg:gem/prism#lib/prism/dot_visitor.rb:170 def visit_alternation_pattern_node(node); end # Visit a AndNode node. # - # source://prism//lib/prism/dot_visitor.rb#191 + # pkg:gem/prism#lib/prism/dot_visitor.rb:195 def visit_and_node(node); end # Visit a ArgumentsNode node. # - # source://prism//lib/prism/dot_visitor.rb#216 + # pkg:gem/prism#lib/prism/dot_visitor.rb:220 def visit_arguments_node(node); end # Visit a ArrayNode node. # - # source://prism//lib/prism/dot_visitor.rb#246 + # pkg:gem/prism#lib/prism/dot_visitor.rb:250 def visit_array_node(node); end # Visit a ArrayPatternNode node. # - # source://prism//lib/prism/dot_visitor.rb#286 + # pkg:gem/prism#lib/prism/dot_visitor.rb:290 def visit_array_pattern_node(node); end # Visit a AssocNode node. # - # source://prism//lib/prism/dot_visitor.rb#348 + # pkg:gem/prism#lib/prism/dot_visitor.rb:352 def visit_assoc_node(node); end # Visit a AssocSplatNode node. # - # source://prism//lib/prism/dot_visitor.rb#375 + # pkg:gem/prism#lib/prism/dot_visitor.rb:379 def visit_assoc_splat_node(node); end # Visit a BackReferenceReadNode node. # - # source://prism//lib/prism/dot_visitor.rb#398 + # pkg:gem/prism#lib/prism/dot_visitor.rb:402 def visit_back_reference_read_node(node); end # Visit a BeginNode node. # - # source://prism//lib/prism/dot_visitor.rb#415 + # pkg:gem/prism#lib/prism/dot_visitor.rb:419 def visit_begin_node(node); end # Visit a BlockArgumentNode node. # - # source://prism//lib/prism/dot_visitor.rb#463 + # pkg:gem/prism#lib/prism/dot_visitor.rb:467 def visit_block_argument_node(node); end # Visit a BlockLocalVariableNode node. # - # source://prism//lib/prism/dot_visitor.rb#486 + # pkg:gem/prism#lib/prism/dot_visitor.rb:490 def visit_block_local_variable_node(node); end # Visit a BlockNode node. # - # source://prism//lib/prism/dot_visitor.rb#506 + # pkg:gem/prism#lib/prism/dot_visitor.rb:510 def visit_block_node(node); end # Visit a BlockParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#541 + # pkg:gem/prism#lib/prism/dot_visitor.rb:545 def visit_block_parameter_node(node); end # Visit a BlockParametersNode node. # - # source://prism//lib/prism/dot_visitor.rb#569 + # pkg:gem/prism#lib/prism/dot_visitor.rb:573 def visit_block_parameters_node(node); end # Visit a BreakNode node. # - # source://prism//lib/prism/dot_visitor.rb#612 + # pkg:gem/prism#lib/prism/dot_visitor.rb:616 def visit_break_node(node); end # Visit a CallAndWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#635 + # pkg:gem/prism#lib/prism/dot_visitor.rb:639 def visit_call_and_write_node(node); end # Visit a CallNode node. # - # source://prism//lib/prism/dot_visitor.rb#681 + # pkg:gem/prism#lib/prism/dot_visitor.rb:685 def visit_call_node(node); end # Visit a CallOperatorWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#739 + # pkg:gem/prism#lib/prism/dot_visitor.rb:748 def visit_call_operator_write_node(node); end # Visit a CallOrWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#788 + # pkg:gem/prism#lib/prism/dot_visitor.rb:797 def visit_call_or_write_node(node); end # Visit a CallTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#834 + # pkg:gem/prism#lib/prism/dot_visitor.rb:843 def visit_call_target_node(node); end # Visit a CapturePatternNode node. # - # source://prism//lib/prism/dot_visitor.rb#864 + # pkg:gem/prism#lib/prism/dot_visitor.rb:873 def visit_capture_pattern_node(node); end # Visit a CaseMatchNode node. # - # source://prism//lib/prism/dot_visitor.rb#889 + # pkg:gem/prism#lib/prism/dot_visitor.rb:898 def visit_case_match_node(node); end # Visit a CaseNode node. # - # source://prism//lib/prism/dot_visitor.rb#934 + # pkg:gem/prism#lib/prism/dot_visitor.rb:943 def visit_case_node(node); end # Visit a ClassNode node. # - # source://prism//lib/prism/dot_visitor.rb#979 + # pkg:gem/prism#lib/prism/dot_visitor.rb:988 def visit_class_node(node); end # Visit a ClassVariableAndWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1026 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1035 def visit_class_variable_and_write_node(node); end # Visit a ClassVariableOperatorWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1053 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1062 def visit_class_variable_operator_write_node(node); end # Visit a ClassVariableOrWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1083 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1092 def visit_class_variable_or_write_node(node); end # Visit a ClassVariableReadNode node. # - # source://prism//lib/prism/dot_visitor.rb#1110 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1119 def visit_class_variable_read_node(node); end # Visit a ClassVariableTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#1127 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1136 def visit_class_variable_target_node(node); end # Visit a ClassVariableWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1144 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1153 def visit_class_variable_write_node(node); end # Visit a ConstantAndWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1171 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1180 def visit_constant_and_write_node(node); end # Visit a ConstantOperatorWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1198 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1207 def visit_constant_operator_write_node(node); end # Visit a ConstantOrWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1228 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1237 def visit_constant_or_write_node(node); end # Visit a ConstantPathAndWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1255 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1264 def visit_constant_path_and_write_node(node); end # Visit a ConstantPathNode node. # - # source://prism//lib/prism/dot_visitor.rb#1280 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1289 def visit_constant_path_node(node); end # Visit a ConstantPathOperatorWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1309 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1318 def visit_constant_path_operator_write_node(node); end # Visit a ConstantPathOrWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1337 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1346 def visit_constant_path_or_write_node(node); end # Visit a ConstantPathTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#1362 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1371 def visit_constant_path_target_node(node); end # Visit a ConstantPathWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1391 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1400 def visit_constant_path_write_node(node); end # Visit a ConstantReadNode node. # - # source://prism//lib/prism/dot_visitor.rb#1416 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1425 def visit_constant_read_node(node); end # Visit a ConstantTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#1433 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1442 def visit_constant_target_node(node); end # Visit a ConstantWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1450 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1459 def visit_constant_write_node(node); end # Visit a DefNode node. # - # source://prism//lib/prism/dot_visitor.rb#1477 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1486 def visit_def_node(node); end # Visit a DefinedNode node. # - # source://prism//lib/prism/dot_visitor.rb#1546 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1555 def visit_defined_node(node); end # Visit a ElseNode node. # - # source://prism//lib/prism/dot_visitor.rb#1577 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1586 def visit_else_node(node); end # Visit a EmbeddedStatementsNode node. # - # source://prism//lib/prism/dot_visitor.rb#1605 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1614 def visit_embedded_statements_node(node); end # Visit a EmbeddedVariableNode node. # - # source://prism//lib/prism/dot_visitor.rb#1631 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1640 def visit_embedded_variable_node(node); end # Visit a EnsureNode node. # - # source://prism//lib/prism/dot_visitor.rb#1652 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1661 def visit_ensure_node(node); end # Visit a FalseNode node. # - # source://prism//lib/prism/dot_visitor.rb#1678 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1687 def visit_false_node(node); end # Visit a FindPatternNode node. # - # source://prism//lib/prism/dot_visitor.rb#1692 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1701 def visit_find_pattern_node(node); end # Visit a FlipFlopNode node. # - # source://prism//lib/prism/dot_visitor.rb#1743 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1752 def visit_flip_flop_node(node); end # Visit a FloatNode node. # - # source://prism//lib/prism/dot_visitor.rb#1775 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1784 def visit_float_node(node); end # Visit a ForNode node. # - # source://prism//lib/prism/dot_visitor.rb#1792 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1801 def visit_for_node(node); end # Visit a ForwardingArgumentsNode node. # - # source://prism//lib/prism/dot_visitor.rb#1834 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1843 def visit_forwarding_arguments_node(node); end # Visit a ForwardingParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#1848 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1857 def visit_forwarding_parameter_node(node); end # Visit a ForwardingSuperNode node. # - # source://prism//lib/prism/dot_visitor.rb#1862 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1871 def visit_forwarding_super_node(node); end # Visit a GlobalVariableAndWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1882 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1891 def visit_global_variable_and_write_node(node); end # Visit a GlobalVariableOperatorWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1909 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1918 def visit_global_variable_operator_write_node(node); end # Visit a GlobalVariableOrWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1939 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1948 def visit_global_variable_or_write_node(node); end # Visit a GlobalVariableReadNode node. # - # source://prism//lib/prism/dot_visitor.rb#1966 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1975 def visit_global_variable_read_node(node); end # Visit a GlobalVariableTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#1983 + # pkg:gem/prism#lib/prism/dot_visitor.rb:1992 def visit_global_variable_target_node(node); end # Visit a GlobalVariableWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2000 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2009 def visit_global_variable_write_node(node); end # Visit a HashNode node. # - # source://prism//lib/prism/dot_visitor.rb#2027 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2036 def visit_hash_node(node); end # Visit a HashPatternNode node. # - # source://prism//lib/prism/dot_visitor.rb#2060 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2069 def visit_hash_pattern_node(node); end # Visit a IfNode node. # - # source://prism//lib/prism/dot_visitor.rb#2109 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2118 def visit_if_node(node); end # Visit a ImaginaryNode node. # - # source://prism//lib/prism/dot_visitor.rb#2154 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2163 def visit_imaginary_node(node); end # Visit a ImplicitNode node. # - # source://prism//lib/prism/dot_visitor.rb#2172 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2181 def visit_implicit_node(node); end # Visit a ImplicitRestNode node. # - # source://prism//lib/prism/dot_visitor.rb#2190 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2199 def visit_implicit_rest_node(node); end # Visit a InNode node. # - # source://prism//lib/prism/dot_visitor.rb#2204 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2213 def visit_in_node(node); end # Visit a IndexAndWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2236 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2245 def visit_index_and_write_node(node); end # Visit a IndexOperatorWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2289 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2298 def visit_index_operator_write_node(node); end # Visit a IndexOrWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2345 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2354 def visit_index_or_write_node(node); end # Visit a IndexTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#2398 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2407 def visit_index_target_node(node); end # Visit a InstanceVariableAndWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2437 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2446 def visit_instance_variable_and_write_node(node); end # Visit a InstanceVariableOperatorWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2464 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2473 def visit_instance_variable_operator_write_node(node); end # Visit a InstanceVariableOrWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2494 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2503 def visit_instance_variable_or_write_node(node); end # Visit a InstanceVariableReadNode node. # - # source://prism//lib/prism/dot_visitor.rb#2521 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2530 def visit_instance_variable_read_node(node); end # Visit a InstanceVariableTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#2538 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2547 def visit_instance_variable_target_node(node); end # Visit a InstanceVariableWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2555 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2564 def visit_instance_variable_write_node(node); end # Visit a IntegerNode node. # - # source://prism//lib/prism/dot_visitor.rb#2582 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2591 def visit_integer_node(node); end # Visit a InterpolatedMatchLastLineNode node. # - # source://prism//lib/prism/dot_visitor.rb#2602 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2611 def visit_interpolated_match_last_line_node(node); end # Visit a InterpolatedRegularExpressionNode node. # - # source://prism//lib/prism/dot_visitor.rb#2638 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2647 def visit_interpolated_regular_expression_node(node); end # Visit a InterpolatedStringNode node. # - # source://prism//lib/prism/dot_visitor.rb#2674 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2683 def visit_interpolated_string_node(node); end # Visit a InterpolatedSymbolNode node. # - # source://prism//lib/prism/dot_visitor.rb#2714 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2723 def visit_interpolated_symbol_node(node); end # Visit a InterpolatedXStringNode node. # - # source://prism//lib/prism/dot_visitor.rb#2751 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2760 def visit_interpolated_x_string_node(node); end # Visit a ItLocalVariableReadNode node. # - # source://prism//lib/prism/dot_visitor.rb#2784 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2793 def visit_it_local_variable_read_node(node); end # Visit a ItParametersNode node. # - # source://prism//lib/prism/dot_visitor.rb#2798 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2807 def visit_it_parameters_node(node); end # Visit a KeywordHashNode node. # - # source://prism//lib/prism/dot_visitor.rb#2812 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2821 def visit_keyword_hash_node(node); end # Visit a KeywordRestParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#2842 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2851 def visit_keyword_rest_parameter_node(node); end # Visit a LambdaNode node. # - # source://prism//lib/prism/dot_visitor.rb#2870 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2879 def visit_lambda_node(node); end # Visit a LocalVariableAndWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2908 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2917 def visit_local_variable_and_write_node(node); end # Visit a LocalVariableOperatorWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2938 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2947 def visit_local_variable_operator_write_node(node); end # Visit a LocalVariableOrWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2971 + # pkg:gem/prism#lib/prism/dot_visitor.rb:2980 def visit_local_variable_or_write_node(node); end # Visit a LocalVariableReadNode node. # - # source://prism//lib/prism/dot_visitor.rb#3001 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3010 def visit_local_variable_read_node(node); end # Visit a LocalVariableTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#3021 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3030 def visit_local_variable_target_node(node); end # Visit a LocalVariableWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#3041 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3050 def visit_local_variable_write_node(node); end # Visit a MatchLastLineNode node. # - # source://prism//lib/prism/dot_visitor.rb#3071 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3080 def visit_match_last_line_node(node); end # Visit a MatchPredicateNode node. # - # source://prism//lib/prism/dot_visitor.rb#3100 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3109 def visit_match_predicate_node(node); end # Visit a MatchRequiredNode node. # - # source://prism//lib/prism/dot_visitor.rb#3125 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3134 def visit_match_required_node(node); end # Visit a MatchWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#3150 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3159 def visit_match_write_node(node); end # Visit a MissingNode node. # - # source://prism//lib/prism/dot_visitor.rb#3181 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3190 def visit_missing_node(node); end # Visit a ModuleNode node. # - # source://prism//lib/prism/dot_visitor.rb#3195 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3204 def visit_module_node(node); end # Visit a MultiTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#3231 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3240 def visit_multi_target_node(node); end # Visit a MultiWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#3287 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3296 def visit_multi_write_node(node); end # Visit a NextNode node. # - # source://prism//lib/prism/dot_visitor.rb#3350 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3359 def visit_next_node(node); end # Visit a NilNode node. # - # source://prism//lib/prism/dot_visitor.rb#3373 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3382 def visit_nil_node(node); end # Visit a NoKeywordsParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#3387 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3396 def visit_no_keywords_parameter_node(node); end # Visit a NumberedParametersNode node. # - # source://prism//lib/prism/dot_visitor.rb#3407 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3416 def visit_numbered_parameters_node(node); end # Visit a NumberedReferenceReadNode node. # - # source://prism//lib/prism/dot_visitor.rb#3424 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3433 def visit_numbered_reference_read_node(node); end # Visit a OptionalKeywordParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#3441 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3450 def visit_optional_keyword_parameter_node(node); end # Visit a OptionalParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#3468 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3477 def visit_optional_parameter_node(node); end # Visit a OrNode node. # - # source://prism//lib/prism/dot_visitor.rb#3498 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3507 def visit_or_node(node); end # Visit a ParametersNode node. # - # source://prism//lib/prism/dot_visitor.rb#3523 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3532 def visit_parameters_node(node); end # Visit a ParenthesesNode node. # - # source://prism//lib/prism/dot_visitor.rb#3607 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3616 def visit_parentheses_node(node); end # Visit a PinnedExpressionNode node. # - # source://prism//lib/prism/dot_visitor.rb#3636 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3645 def visit_pinned_expression_node(node); end # Visit a PinnedVariableNode node. # - # source://prism//lib/prism/dot_visitor.rb#3663 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3672 def visit_pinned_variable_node(node); end # Visit a PostExecutionNode node. # - # source://prism//lib/prism/dot_visitor.rb#3684 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3693 def visit_post_execution_node(node); end # Visit a PreExecutionNode node. # - # source://prism//lib/prism/dot_visitor.rb#3713 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3722 def visit_pre_execution_node(node); end # Visit a ProgramNode node. # - # source://prism//lib/prism/dot_visitor.rb#3742 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3751 def visit_program_node(node); end # Visit a RangeNode node. # - # source://prism//lib/prism/dot_visitor.rb#3763 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3772 def visit_range_node(node); end # Visit a RationalNode node. # - # source://prism//lib/prism/dot_visitor.rb#3795 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3804 def visit_rational_node(node); end # Visit a RedoNode node. # - # source://prism//lib/prism/dot_visitor.rb#3818 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3827 def visit_redo_node(node); end # Visit a RegularExpressionNode node. # - # source://prism//lib/prism/dot_visitor.rb#3832 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3841 def visit_regular_expression_node(node); end # Visit a RequiredKeywordParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#3861 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3870 def visit_required_keyword_parameter_node(node); end # Visit a RequiredParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#3884 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3893 def visit_required_parameter_node(node); end # Visit a RescueModifierNode node. # - # source://prism//lib/prism/dot_visitor.rb#3904 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3913 def visit_rescue_modifier_node(node); end # Visit a RescueNode node. # - # source://prism//lib/prism/dot_visitor.rb#3929 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3938 def visit_rescue_node(node); end # Visit a RestParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#3987 + # pkg:gem/prism#lib/prism/dot_visitor.rb:3996 def visit_rest_parameter_node(node); end # Visit a RetryNode node. # - # source://prism//lib/prism/dot_visitor.rb#4015 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4024 def visit_retry_node(node); end # Visit a ReturnNode node. # - # source://prism//lib/prism/dot_visitor.rb#4029 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4038 def visit_return_node(node); end # Visit a SelfNode node. # - # source://prism//lib/prism/dot_visitor.rb#4052 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4061 def visit_self_node(node); end # Visit a ShareableConstantNode node. # - # source://prism//lib/prism/dot_visitor.rb#4066 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4075 def visit_shareable_constant_node(node); end # Visit a SingletonClassNode node. # - # source://prism//lib/prism/dot_visitor.rb#4087 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4096 def visit_singleton_class_node(node); end # Visit a SourceEncodingNode node. # - # source://prism//lib/prism/dot_visitor.rb#4123 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4132 def visit_source_encoding_node(node); end # Visit a SourceFileNode node. # - # source://prism//lib/prism/dot_visitor.rb#4137 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4146 def visit_source_file_node(node); end # Visit a SourceLineNode node. # - # source://prism//lib/prism/dot_visitor.rb#4157 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4166 def visit_source_line_node(node); end # Visit a SplatNode node. # - # source://prism//lib/prism/dot_visitor.rb#4171 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4180 def visit_splat_node(node); end # Visit a StatementsNode node. # - # source://prism//lib/prism/dot_visitor.rb#4194 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4203 def visit_statements_node(node); end # Visit a StringNode node. # - # source://prism//lib/prism/dot_visitor.rb#4221 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4230 def visit_string_node(node); end # Visit a SuperNode node. # - # source://prism//lib/prism/dot_visitor.rb#4254 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4263 def visit_super_node(node); end # Visit a SymbolNode node. # - # source://prism//lib/prism/dot_visitor.rb#4293 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4302 def visit_symbol_node(node); end # Visit a TrueNode node. # - # source://prism//lib/prism/dot_visitor.rb#4328 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4337 def visit_true_node(node); end # Visit a UndefNode node. # - # source://prism//lib/prism/dot_visitor.rb#4342 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4351 def visit_undef_node(node); end # Visit a UnlessNode node. # - # source://prism//lib/prism/dot_visitor.rb#4372 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4381 def visit_unless_node(node); end # Visit a UntilNode node. # - # source://prism//lib/prism/dot_visitor.rb#4415 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4424 def visit_until_node(node); end # Visit a WhenNode node. # - # source://prism//lib/prism/dot_visitor.rb#4455 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4464 def visit_when_node(node); end # Visit a WhileNode node. # - # source://prism//lib/prism/dot_visitor.rb#4496 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4505 def visit_while_node(node); end # Visit a XStringNode node. # - # source://prism//lib/prism/dot_visitor.rb#4536 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4545 def visit_x_string_node(node); end # Visit a YieldNode node. # - # source://prism//lib/prism/dot_visitor.rb#4565 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4574 def visit_yield_node(node); end private @@ -14524,186 +14514,164 @@ class Prism::DotVisitor < ::Prism::Visitor # Inspect a node that has arguments_node_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4611 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4620 def arguments_node_flags_inspect(node); end # Inspect a node that has array_node_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4623 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4632 def array_node_flags_inspect(node); end # Inspect a node that has call_node_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4631 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4640 def call_node_flags_inspect(node); end # Inspect a node that has encoding_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4642 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4651 def encoding_flags_inspect(node); end # Inspect a node that has integer_base_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4651 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4660 def integer_base_flags_inspect(node); end # Inspect a node that has interpolated_string_node_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4662 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4671 def interpolated_string_node_flags_inspect(node); end # Inspect a node that has keyword_hash_node_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4671 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4680 def keyword_hash_node_flags_inspect(node); end # Inspect a location to display the start and end line and column numbers. # - # source://prism//lib/prism/dot_visitor.rb#4605 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4614 def location_inspect(location); end # Inspect a node that has loop_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4679 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4688 def loop_flags_inspect(node); end # Generate a unique node ID for a node throughout the digraph. # - # source://prism//lib/prism/dot_visitor.rb#4600 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4609 def node_id(node); end # Inspect a node that has parameter_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4687 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4696 def parameter_flags_inspect(node); end # Inspect a node that has parentheses_node_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4695 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4704 def parentheses_node_flags_inspect(node); end # Inspect a node that has range_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4703 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4712 def range_flags_inspect(node); end # Inspect a node that has regular_expression_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4711 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4720 def regular_expression_flags_inspect(node); end # Inspect a node that has shareable_constant_node_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4729 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4738 def shareable_constant_node_flags_inspect(node); end # Inspect a node that has string_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4739 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4748 def string_flags_inspect(node); end # Inspect a node that has symbol_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4750 + # pkg:gem/prism#lib/prism/dot_visitor.rb:4759 def symbol_flags_inspect(node); end end -# source://prism//lib/prism/dot_visitor.rb#59 +# pkg:gem/prism#lib/prism/dot_visitor.rb:63 class Prism::DotVisitor::Digraph - # @return [Digraph] a new instance of Digraph - # - # source://prism//lib/prism/dot_visitor.rb#62 + # pkg:gem/prism#lib/prism/dot_visitor.rb:66 def initialize; end - # source://prism//lib/prism/dot_visitor.rb#76 + # pkg:gem/prism#lib/prism/dot_visitor.rb:80 def edge(value); end - # Returns the value of attribute edges. - # - # source://prism//lib/prism/dot_visitor.rb#60 + # pkg:gem/prism#lib/prism/dot_visitor.rb:64 def edges; end - # source://prism//lib/prism/dot_visitor.rb#68 + # pkg:gem/prism#lib/prism/dot_visitor.rb:72 def node(value); end - # Returns the value of attribute nodes. - # - # source://prism//lib/prism/dot_visitor.rb#60 + # pkg:gem/prism#lib/prism/dot_visitor.rb:64 def nodes; end - # source://prism//lib/prism/dot_visitor.rb#80 + # pkg:gem/prism#lib/prism/dot_visitor.rb:84 def to_dot; end - # source://prism//lib/prism/dot_visitor.rb#72 + # pkg:gem/prism#lib/prism/dot_visitor.rb:76 def waypoint(value); end - # Returns the value of attribute waypoints. - # - # source://prism//lib/prism/dot_visitor.rb#60 + # pkg:gem/prism#lib/prism/dot_visitor.rb:64 def waypoints; end end -# source://prism//lib/prism/dot_visitor.rb#15 +# pkg:gem/prism#lib/prism/dot_visitor.rb:19 class Prism::DotVisitor::Field - # @return [Field] a new instance of Field - # - # source://prism//lib/prism/dot_visitor.rb#18 + # pkg:gem/prism#lib/prism/dot_visitor.rb:22 def initialize(name, value, port); end - # Returns the value of attribute name. - # - # source://prism//lib/prism/dot_visitor.rb#16 + # pkg:gem/prism#lib/prism/dot_visitor.rb:20 def name; end - # Returns the value of attribute port. - # - # source://prism//lib/prism/dot_visitor.rb#16 + # pkg:gem/prism#lib/prism/dot_visitor.rb:20 def port; end - # source://prism//lib/prism/dot_visitor.rb#24 + # pkg:gem/prism#lib/prism/dot_visitor.rb:28 def to_dot; end - # Returns the value of attribute value. - # - # source://prism//lib/prism/dot_visitor.rb#16 + # pkg:gem/prism#lib/prism/dot_visitor.rb:20 def value; end end -# source://prism//lib/prism/dot_visitor.rb#33 +# pkg:gem/prism#lib/prism/dot_visitor.rb:37 class Prism::DotVisitor::Table - # @return [Table] a new instance of Table - # - # source://prism//lib/prism/dot_visitor.rb#36 + # pkg:gem/prism#lib/prism/dot_visitor.rb:40 def initialize(name); end - # source://prism//lib/prism/dot_visitor.rb#41 + # pkg:gem/prism#lib/prism/dot_visitor.rb:45 def field(name, value = T.unsafe(nil), port: T.unsafe(nil)); end - # Returns the value of attribute fields. - # - # source://prism//lib/prism/dot_visitor.rb#34 + # pkg:gem/prism#lib/prism/dot_visitor.rb:38 def fields; end - # Returns the value of attribute name. - # - # source://prism//lib/prism/dot_visitor.rb#34 + # pkg:gem/prism#lib/prism/dot_visitor.rb:38 def name; end - # source://prism//lib/prism/dot_visitor.rb#45 + # pkg:gem/prism#lib/prism/dot_visitor.rb:49 def to_dot; end end @@ -14712,13 +14680,11 @@ end # if a then b else c end # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6294 +# pkg:gem/prism#lib/prism/node.rb:6717 class Prism::ElseNode < ::Prism::Node # Initialize a new ElseNode node. # - # @return [ElseNode] a new instance of ElseNode - # - # source://prism//lib/prism/node.rb#6296 + # pkg:gem/prism#lib/prism/node.rb:6719 sig do params( source: Prism::Source, @@ -14735,36 +14701,36 @@ class Prism::ElseNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6403 + # pkg:gem/prism#lib/prism/node.rb:6833 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6307 + # pkg:gem/prism#lib/prism/node.rb:6730 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6312 + # pkg:gem/prism#lib/prism/node.rb:6735 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6324 + # pkg:gem/prism#lib/prism/node.rb:6754 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6317 + # pkg:gem/prism#lib/prism/node.rb:6747 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?else_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location?) -> ElseNode # - # source://prism//lib/prism/node.rb#6329 + # pkg:gem/prism#lib/prism/node.rb:6759 sig do params( node_id: Integer, @@ -14775,42 +14741,46 @@ class Prism::ElseNode < ::Prism::Node end_keyword_loc: T.nilable(Prism::Location) ).returns(Prism::ElseNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), else_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, else_keyword_loc: self.else_keyword_loc, statements: self.statements, end_keyword_loc: self.end_keyword_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6312 + # pkg:gem/prism#lib/prism/node.rb:6764 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location? } # - # source://prism//lib/prism/node.rb#6337 + # pkg:gem/prism#lib/prism/node.rb:6767 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:6740 + def each_child_node; end + # def else_keyword: () -> String # - # source://prism//lib/prism/node.rb#6377 + # pkg:gem/prism#lib/prism/node.rb:6807 sig { returns(String) } def else_keyword; end # attr_reader else_keyword_loc: Location # - # source://prism//lib/prism/node.rb#6342 + # pkg:gem/prism#lib/prism/node.rb:6772 sig { returns(Prism::Location) } def else_keyword_loc; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#6382 + # pkg:gem/prism#lib/prism/node.rb:6812 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#6358 + # pkg:gem/prism#lib/prism/node.rb:6788 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end @@ -14819,38 +14789,38 @@ class Prism::ElseNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#6387 + # pkg:gem/prism#lib/prism/node.rb:6817 sig { override.returns(String) } def inspect; end # Save the else_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6350 + # pkg:gem/prism#lib/prism/node.rb:6780 def save_else_keyword_loc(repository); end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6372 + # pkg:gem/prism#lib/prism/node.rb:6802 def save_end_keyword_loc(repository); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#6355 + # pkg:gem/prism#lib/prism/node.rb:6785 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#6392 + # pkg:gem/prism#lib/prism/node.rb:6822 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#6397 + # pkg:gem/prism#lib/prism/node.rb:6827 def type; end end end @@ -14858,19 +14828,17 @@ end # EmbDocComment objects correspond to comments that are surrounded by =begin # and =end. # -# source://prism//lib/prism/parse_result.rb#561 +# pkg:gem/prism#lib/prism/parse_result.rb:558 class Prism::EmbDocComment < ::Prism::Comment # Returns a string representation of this comment. # - # source://prism//lib/prism/parse_result.rb#568 + # pkg:gem/prism#lib/prism/parse_result.rb:565 sig { returns(String) } def inspect; end # This can only be true for inline comments. # - # @return [Boolean] - # - # source://prism//lib/prism/parse_result.rb#563 + # pkg:gem/prism#lib/prism/parse_result.rb:560 sig { override.returns(T::Boolean) } def trailing?; end end @@ -14880,13 +14848,11 @@ end # "foo #{bar}" # ^^^^^^ # -# source://prism//lib/prism/node.rb#6415 +# pkg:gem/prism#lib/prism/node.rb:6845 class Prism::EmbeddedStatementsNode < ::Prism::Node # Initialize a new EmbeddedStatementsNode node. # - # @return [EmbeddedStatementsNode] a new instance of EmbeddedStatementsNode - # - # source://prism//lib/prism/node.rb#6417 + # pkg:gem/prism#lib/prism/node.rb:6847 sig do params( source: Prism::Source, @@ -14903,48 +14869,48 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6518 + # pkg:gem/prism#lib/prism/node.rb:6955 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6428 + # pkg:gem/prism#lib/prism/node.rb:6858 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6433 + # pkg:gem/prism#lib/prism/node.rb:6863 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#6497 + # pkg:gem/prism#lib/prism/node.rb:6934 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#6479 + # pkg:gem/prism#lib/prism/node.rb:6916 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6445 + # pkg:gem/prism#lib/prism/node.rb:6882 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6438 + # pkg:gem/prism#lib/prism/node.rb:6875 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?statements: StatementsNode?, ?closing_loc: Location) -> EmbeddedStatementsNode # - # source://prism//lib/prism/node.rb#6450 + # pkg:gem/prism#lib/prism/node.rb:6887 sig do params( node_id: Integer, @@ -14955,70 +14921,74 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node closing_loc: Prism::Location ).returns(Prism::EmbeddedStatementsNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), statements: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, opening_loc: self.opening_loc, statements: self.statements, closing_loc: self.closing_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6433 + # pkg:gem/prism#lib/prism/node.rb:6892 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, statements: StatementsNode?, closing_loc: Location } # - # source://prism//lib/prism/node.rb#6458 + # pkg:gem/prism#lib/prism/node.rb:6895 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:6868 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#6502 + # pkg:gem/prism#lib/prism/node.rb:6939 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#6492 + # pkg:gem/prism#lib/prism/node.rb:6929 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#6463 + # pkg:gem/prism#lib/prism/node.rb:6900 sig { returns(Prism::Location) } def opening_loc; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6487 + # pkg:gem/prism#lib/prism/node.rb:6924 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6471 + # pkg:gem/prism#lib/prism/node.rb:6908 def save_opening_loc(repository); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#6476 + # pkg:gem/prism#lib/prism/node.rb:6913 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#6507 + # pkg:gem/prism#lib/prism/node.rb:6944 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#6512 + # pkg:gem/prism#lib/prism/node.rb:6949 def type; end end end @@ -15028,13 +14998,11 @@ end # "foo #@bar" # ^^^^^ # -# source://prism//lib/prism/node.rb#6530 +# pkg:gem/prism#lib/prism/node.rb:6967 class Prism::EmbeddedVariableNode < ::Prism::Node # Initialize a new EmbeddedVariableNode node. # - # @return [EmbeddedVariableNode] a new instance of EmbeddedVariableNode - # - # source://prism//lib/prism/node.rb#6532 + # pkg:gem/prism#lib/prism/node.rb:6969 sig do params( source: Prism::Source, @@ -15050,36 +15018,36 @@ class Prism::EmbeddedVariableNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6612 + # pkg:gem/prism#lib/prism/node.rb:7056 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6542 + # pkg:gem/prism#lib/prism/node.rb:6979 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6547 + # pkg:gem/prism#lib/prism/node.rb:6984 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6557 + # pkg:gem/prism#lib/prism/node.rb:7001 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6552 + # pkg:gem/prism#lib/prism/node.rb:6996 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode) -> EmbeddedVariableNode # - # source://prism//lib/prism/node.rb#6562 + # pkg:gem/prism#lib/prism/node.rb:7006 sig do params( node_id: Integer, @@ -15089,57 +15057,61 @@ class Prism::EmbeddedVariableNode < ::Prism::Node variable: T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode) ).returns(Prism::EmbeddedVariableNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), variable: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, operator_loc: self.operator_loc, variable: self.variable); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6547 + # pkg:gem/prism#lib/prism/node.rb:7011 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode } # - # source://prism//lib/prism/node.rb#6570 + # pkg:gem/prism#lib/prism/node.rb:7014 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:6989 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#6596 + # pkg:gem/prism#lib/prism/node.rb:7040 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#6591 + # pkg:gem/prism#lib/prism/node.rb:7035 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#6575 + # pkg:gem/prism#lib/prism/node.rb:7019 sig { returns(Prism::Location) } def operator_loc; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6583 + # pkg:gem/prism#lib/prism/node.rb:7027 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#6601 + # pkg:gem/prism#lib/prism/node.rb:7045 sig { override.returns(Symbol) } def type; end # attr_reader variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode # - # source://prism//lib/prism/node.rb#6588 + # pkg:gem/prism#lib/prism/node.rb:7032 sig do returns(T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)) end @@ -15148,24 +15120,24 @@ class Prism::EmbeddedVariableNode < ::Prism::Node class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#6606 + # pkg:gem/prism#lib/prism/node.rb:7050 def type; end end end # Flags for nodes that have unescaped content. # -# source://prism//lib/prism/node.rb#18498 +# pkg:gem/prism#lib/prism/node.rb:19819 module Prism::EncodingFlags; end # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#18503 +# pkg:gem/prism#lib/prism/node.rb:19824 Prism::EncodingFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to UTF-8 # -# source://prism//lib/prism/node.rb#18500 +# pkg:gem/prism#lib/prism/node.rb:19821 Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # Represents an `ensure` clause in a `begin` statement. @@ -15177,13 +15149,11 @@ Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # bar # end # -# source://prism//lib/prism/node.rb#6627 +# pkg:gem/prism#lib/prism/node.rb:7071 class Prism::EnsureNode < ::Prism::Node # Initialize a new EnsureNode node. # - # @return [EnsureNode] a new instance of EnsureNode - # - # source://prism//lib/prism/node.rb#6629 + # pkg:gem/prism#lib/prism/node.rb:7073 sig do params( source: Prism::Source, @@ -15200,36 +15170,36 @@ class Prism::EnsureNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6730 + # pkg:gem/prism#lib/prism/node.rb:7181 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6640 + # pkg:gem/prism#lib/prism/node.rb:7084 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6645 + # pkg:gem/prism#lib/prism/node.rb:7089 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6657 + # pkg:gem/prism#lib/prism/node.rb:7108 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6650 + # pkg:gem/prism#lib/prism/node.rb:7101 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?ensure_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location) -> EnsureNode # - # source://prism//lib/prism/node.rb#6662 + # pkg:gem/prism#lib/prism/node.rb:7113 sig do params( node_id: Integer, @@ -15240,42 +15210,46 @@ class Prism::EnsureNode < ::Prism::Node end_keyword_loc: Prism::Location ).returns(Prism::EnsureNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), ensure_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, ensure_keyword_loc: self.ensure_keyword_loc, statements: self.statements, end_keyword_loc: self.end_keyword_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6645 + # pkg:gem/prism#lib/prism/node.rb:7118 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location } # - # source://prism//lib/prism/node.rb#6670 + # pkg:gem/prism#lib/prism/node.rb:7121 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:7094 + def each_child_node; end + # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#6709 + # pkg:gem/prism#lib/prism/node.rb:7160 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#6691 + # pkg:gem/prism#lib/prism/node.rb:7142 sig { returns(Prism::Location) } def end_keyword_loc; end # def ensure_keyword: () -> String # - # source://prism//lib/prism/node.rb#6704 + # pkg:gem/prism#lib/prism/node.rb:7155 sig { returns(String) } def ensure_keyword; end # attr_reader ensure_keyword_loc: Location # - # source://prism//lib/prism/node.rb#6675 + # pkg:gem/prism#lib/prism/node.rb:7126 sig { returns(Prism::Location) } def ensure_keyword_loc; end @@ -15284,38 +15258,38 @@ class Prism::EnsureNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#6714 + # pkg:gem/prism#lib/prism/node.rb:7165 sig { override.returns(String) } def inspect; end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6699 + # pkg:gem/prism#lib/prism/node.rb:7150 def save_end_keyword_loc(repository); end # Save the ensure_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6683 + # pkg:gem/prism#lib/prism/node.rb:7134 def save_ensure_keyword_loc(repository); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#6688 + # pkg:gem/prism#lib/prism/node.rb:7139 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#6719 + # pkg:gem/prism#lib/prism/node.rb:7170 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#6724 + # pkg:gem/prism#lib/prism/node.rb:7175 def type; end end end @@ -15325,84 +15299,86 @@ end # false # ^^^^^ # -# source://prism//lib/prism/node.rb#6742 +# pkg:gem/prism#lib/prism/node.rb:7193 class Prism::FalseNode < ::Prism::Node # Initialize a new FalseNode node. # - # @return [FalseNode] a new instance of FalseNode - # - # source://prism//lib/prism/node.rb#6744 + # pkg:gem/prism#lib/prism/node.rb:7195 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6801 + # pkg:gem/prism#lib/prism/node.rb:7258 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6752 + # pkg:gem/prism#lib/prism/node.rb:7203 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6757 + # pkg:gem/prism#lib/prism/node.rb:7208 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6767 + # pkg:gem/prism#lib/prism/node.rb:7224 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6762 + # pkg:gem/prism#lib/prism/node.rb:7219 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> FalseNode # - # source://prism//lib/prism/node.rb#6772 + # pkg:gem/prism#lib/prism/node.rb:7229 sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::FalseNode) } - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6757 + # pkg:gem/prism#lib/prism/node.rb:7234 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#6780 + # pkg:gem/prism#lib/prism/node.rb:7237 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:7213 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#6785 + # pkg:gem/prism#lib/prism/node.rb:7242 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#6790 + # pkg:gem/prism#lib/prism/node.rb:7247 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#6795 + # pkg:gem/prism#lib/prism/node.rb:7252 def type; end end end @@ -15418,20 +15394,21 @@ end # foo in Foo(*bar, baz, *qux) # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6816 +# foo => *bar, baz, *qux +# ^^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:7276 class Prism::FindPatternNode < ::Prism::Node # Initialize a new FindPatternNode node. # - # @return [FindPatternNode] a new instance of FindPatternNode - # - # source://prism//lib/prism/node.rb#6818 + # pkg:gem/prism#lib/prism/node.rb:7278 sig do params( source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, - constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + constant: T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode)), left: Prism::SplatNode, requireds: T::Array[Prism::Node], right: T.any(Prism::SplatNode, Prism::MissingNode), @@ -15444,60 +15421,69 @@ class Prism::FindPatternNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6946 + # pkg:gem/prism#lib/prism/node.rb:7449 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6832 + # pkg:gem/prism#lib/prism/node.rb:7292 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6837 + # pkg:gem/prism#lib/prism/node.rb:7297 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#6925 + # pkg:gem/prism#lib/prism/node.rb:7428 sig { returns(T.nilable(String)) } def closing; end - # attr_reader closing_loc: Location? + # The location of the closing brace. + # + # foo in [*bar, baz, *qux] + # ^ + # + # foo in Foo(*bar, baz, *qux) + # ^ # - # source://prism//lib/prism/node.rb#6901 + # pkg:gem/prism#lib/prism/node.rb:7404 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6852 + # pkg:gem/prism#lib/prism/node.rb:7322 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6842 + # pkg:gem/prism#lib/prism/node.rb:7312 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader constant: ConstantReadNode | ConstantPathNode | nil + # Represents the optional constant preceding the pattern # - # source://prism//lib/prism/node.rb#6870 - sig { returns(T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode))) } + # foo in Foo(*bar, baz, *qux) + # ^^^ + # + # pkg:gem/prism#lib/prism/node.rb:7343 + sig { returns(T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode))) } def constant; end - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantReadNode | ConstantPathNode | nil, ?left: SplatNode, ?requireds: Array[Prism::node], ?right: SplatNode | MissingNode, ?opening_loc: Location?, ?closing_loc: Location?) -> FindPatternNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantPathNode | ConstantReadNode | nil, ?left: SplatNode, ?requireds: Array[Prism::node], ?right: SplatNode | MissingNode, ?opening_loc: Location?, ?closing_loc: Location?) -> FindPatternNode # - # source://prism//lib/prism/node.rb#6857 + # pkg:gem/prism#lib/prism/node.rb:7327 sig do params( node_id: Integer, location: Prism::Location, flags: Integer, - constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + constant: T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode)), left: Prism::SplatNode, requireds: T::Array[Prism::Node], right: T.any(Prism::SplatNode, Prism::MissingNode), @@ -15505,82 +15491,110 @@ class Prism::FindPatternNode < ::Prism::Node closing_loc: T.nilable(Prism::Location) ).returns(Prism::FindPatternNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), left: T.unsafe(nil), requireds: T.unsafe(nil), right: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, constant: self.constant, left: self.left, requireds: self.requireds, right: self.right, opening_loc: self.opening_loc, closing_loc: self.closing_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6837 + # pkg:gem/prism#lib/prism/node.rb:7332 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantReadNode | ConstantPathNode | nil, left: SplatNode, requireds: Array[Prism::node], right: SplatNode | MissingNode, opening_loc: Location?, closing_loc: Location? } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantPathNode | ConstantReadNode | nil, left: SplatNode, requireds: Array[Prism::node], right: SplatNode | MissingNode, opening_loc: Location?, closing_loc: Location? } # - # source://prism//lib/prism/node.rb#6865 + # pkg:gem/prism#lib/prism/node.rb:7335 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:7302 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#6930 + # pkg:gem/prism#lib/prism/node.rb:7433 sig { override.returns(String) } def inspect; end - # attr_reader left: SplatNode + # Represents the first wildcard node in the pattern. # - # source://prism//lib/prism/node.rb#6873 + # foo in *bar, baz, *qux + # ^^^^ + # + # foo in Foo(*bar, baz, *qux) + # ^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:7352 sig { returns(Prism::SplatNode) } def left; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#6920 + # pkg:gem/prism#lib/prism/node.rb:7423 sig { returns(T.nilable(String)) } def opening; end - # attr_reader opening_loc: Location? + # The location of the opening brace. + # + # foo in [*bar, baz, *qux] + # ^ # - # source://prism//lib/prism/node.rb#6882 + # foo in Foo(*bar, baz, *qux) + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:7379 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end - # attr_reader requireds: Array[Prism::node] + # Represents the nodes in between the wildcards. + # + # foo in *bar, baz, *qux + # ^^^ + # + # foo in Foo(*bar, baz, 1, *qux) + # ^^^^^^ # - # source://prism//lib/prism/node.rb#6876 + # pkg:gem/prism#lib/prism/node.rb:7361 sig { returns(T::Array[Prism::Node]) } def requireds; end - # attr_reader right: SplatNode | MissingNode + # Represents the second wildcard node in the pattern. # - # source://prism//lib/prism/node.rb#6879 + # foo in *bar, baz, *qux + # ^^^^ + # + # foo in Foo(*bar, baz, *qux) + # ^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:7370 sig { returns(T.any(Prism::SplatNode, Prism::MissingNode)) } def right; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6915 + # pkg:gem/prism#lib/prism/node.rb:7418 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#6896 + # pkg:gem/prism#lib/prism/node.rb:7393 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#6935 + # pkg:gem/prism#lib/prism/node.rb:7438 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#6940 + # pkg:gem/prism#lib/prism/node.rb:7443 def type; end end end @@ -15590,13 +15604,11 @@ end # baz if foo .. bar # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6962 +# pkg:gem/prism#lib/prism/node.rb:7465 class Prism::FlipFlopNode < ::Prism::Node # Initialize a new FlipFlopNode node. # - # @return [FlipFlopNode] a new instance of FlipFlopNode - # - # source://prism//lib/prism/node.rb#6964 + # pkg:gem/prism#lib/prism/node.rb:7467 sig do params( source: Prism::Source, @@ -15613,36 +15625,36 @@ class Prism::FlipFlopNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7056 + # pkg:gem/prism#lib/prism/node.rb:7567 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6975 + # pkg:gem/prism#lib/prism/node.rb:7478 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6980 + # pkg:gem/prism#lib/prism/node.rb:7483 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6993 + # pkg:gem/prism#lib/prism/node.rb:7504 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6985 + # pkg:gem/prism#lib/prism/node.rb:7496 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location) -> FlipFlopNode # - # source://prism//lib/prism/node.rb#6998 + # pkg:gem/prism#lib/prism/node.rb:7509 sig do params( node_id: Integer, @@ -15653,26 +15665,28 @@ class Prism::FlipFlopNode < ::Prism::Node operator_loc: Prism::Location ).returns(Prism::FlipFlopNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, left: self.left, right: self.right, operator_loc: self.operator_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#6980 + # pkg:gem/prism#lib/prism/node.rb:7514 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node?, right: Prism::node?, operator_loc: Location } # - # source://prism//lib/prism/node.rb#7006 + # pkg:gem/prism#lib/prism/node.rb:7517 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # def exclude_end?: () -> bool + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @return [Boolean] + # pkg:gem/prism#lib/prism/node.rb:7488 + def each_child_node; end + + # def exclude_end?: () -> bool # - # source://prism//lib/prism/node.rb#7011 + # pkg:gem/prism#lib/prism/node.rb:7522 sig { returns(T::Boolean) } def exclude_end?; end @@ -15681,50 +15695,50 @@ class Prism::FlipFlopNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7040 + # pkg:gem/prism#lib/prism/node.rb:7551 sig { override.returns(String) } def inspect; end # attr_reader left: Prism::node? # - # source://prism//lib/prism/node.rb#7016 + # pkg:gem/prism#lib/prism/node.rb:7527 sig { returns(T.nilable(Prism::Node)) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#7035 + # pkg:gem/prism#lib/prism/node.rb:7546 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#7022 + # pkg:gem/prism#lib/prism/node.rb:7533 sig { returns(Prism::Location) } def operator_loc; end # attr_reader right: Prism::node? # - # source://prism//lib/prism/node.rb#7019 + # pkg:gem/prism#lib/prism/node.rb:7530 sig { returns(T.nilable(Prism::Node)) } def right; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#7030 + # pkg:gem/prism#lib/prism/node.rb:7541 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7045 + # pkg:gem/prism#lib/prism/node.rb:7556 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#7050 + # pkg:gem/prism#lib/prism/node.rb:7561 def type; end end end @@ -15734,90 +15748,92 @@ end # 1.0 # ^^^ # -# source://prism//lib/prism/node.rb#7069 +# pkg:gem/prism#lib/prism/node.rb:7580 class Prism::FloatNode < ::Prism::Node # Initialize a new FloatNode node. # - # @return [FloatNode] a new instance of FloatNode - # - # source://prism//lib/prism/node.rb#7071 + # pkg:gem/prism#lib/prism/node.rb:7582 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, value: Float).void } def initialize(source, node_id, location, flags, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7132 + # pkg:gem/prism#lib/prism/node.rb:7649 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7080 + # pkg:gem/prism#lib/prism/node.rb:7591 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7085 + # pkg:gem/prism#lib/prism/node.rb:7596 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7095 + # pkg:gem/prism#lib/prism/node.rb:7612 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7090 + # pkg:gem/prism#lib/prism/node.rb:7607 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Float) -> FloatNode # - # source://prism//lib/prism/node.rb#7100 + # pkg:gem/prism#lib/prism/node.rb:7617 sig { params(node_id: Integer, location: Prism::Location, flags: Integer, value: Float).returns(Prism::FloatNode) } - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, value: self.value); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7085 + # pkg:gem/prism#lib/prism/node.rb:7622 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Float } # - # source://prism//lib/prism/node.rb#7108 + # pkg:gem/prism#lib/prism/node.rb:7625 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:7601 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#7116 + # pkg:gem/prism#lib/prism/node.rb:7633 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7121 + # pkg:gem/prism#lib/prism/node.rb:7638 sig { override.returns(Symbol) } def type; end # The value of the floating point number as a Float. # - # source://prism//lib/prism/node.rb#7113 + # pkg:gem/prism#lib/prism/node.rb:7630 sig { returns(Float) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#7126 + # pkg:gem/prism#lib/prism/node.rb:7643 def type; end end end @@ -15827,13 +15843,11 @@ end # for i in a end # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7142 +# pkg:gem/prism#lib/prism/node.rb:7659 class Prism::ForNode < ::Prism::Node # Initialize a new ForNode node. # - # @return [ForNode] a new instance of ForNode - # - # source://prism//lib/prism/node.rb#7144 + # pkg:gem/prism#lib/prism/node.rb:7661 sig do params( source: Prism::Source, @@ -15854,18 +15868,18 @@ class Prism::ForNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7322 + # pkg:gem/prism#lib/prism/node.rb:7848 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7159 + # pkg:gem/prism#lib/prism/node.rb:7676 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7164 + # pkg:gem/prism#lib/prism/node.rb:7681 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end @@ -15874,25 +15888,25 @@ class Prism::ForNode < ::Prism::Node # for i in a end # ^ # - # source://prism//lib/prism/node.rb#7205 + # pkg:gem/prism#lib/prism/node.rb:7731 sig { returns(Prism::Node) } def collection; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7178 + # pkg:gem/prism#lib/prism/node.rb:7704 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7169 + # pkg:gem/prism#lib/prism/node.rb:7695 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?index: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode, ?collection: Prism::node, ?statements: StatementsNode?, ?for_keyword_loc: Location, ?in_keyword_loc: Location, ?do_keyword_loc: Location?, ?end_keyword_loc: Location) -> ForNode # - # source://prism//lib/prism/node.rb#7183 + # pkg:gem/prism#lib/prism/node.rb:7709 sig do params( node_id: Integer, @@ -15907,24 +15921,23 @@ class Prism::ForNode < ::Prism::Node end_keyword_loc: Prism::Location ).returns(Prism::ForNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), index: T.unsafe(nil), collection: T.unsafe(nil), statements: T.unsafe(nil), for_keyword_loc: T.unsafe(nil), in_keyword_loc: T.unsafe(nil), do_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, index: self.index, collection: self.collection, statements: self.statements, for_keyword_loc: self.for_keyword_loc, in_keyword_loc: self.in_keyword_loc, do_keyword_loc: self.do_keyword_loc, end_keyword_loc: self.end_keyword_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7164 + # pkg:gem/prism#lib/prism/node.rb:7714 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, index: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode, collection: Prism::node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location } # - # source://prism//lib/prism/node.rb#7191 + # pkg:gem/prism#lib/prism/node.rb:7717 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def do_keyword: () -> String? # - # source://prism//lib/prism/node.rb#7296 + # pkg:gem/prism#lib/prism/node.rb:7822 sig { returns(T.nilable(String)) } def do_keyword; end @@ -15933,13 +15946,18 @@ class Prism::ForNode < ::Prism::Node # for i in a do end # ^^ # - # source://prism//lib/prism/node.rb#7251 + # pkg:gem/prism#lib/prism/node.rb:7777 sig { returns(T.nilable(Prism::Location)) } def do_keyword_loc; end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:7686 + def each_child_node; end + # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#7301 + # pkg:gem/prism#lib/prism/node.rb:7827 sig { returns(String) } def end_keyword; end @@ -15948,7 +15966,7 @@ class Prism::ForNode < ::Prism::Node # for i in a end # ^^^ # - # source://prism//lib/prism/node.rb#7273 + # pkg:gem/prism#lib/prism/node.rb:7799 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -15957,7 +15975,7 @@ class Prism::ForNode < ::Prism::Node # def for_keyword: () -> String # - # source://prism//lib/prism/node.rb#7286 + # pkg:gem/prism#lib/prism/node.rb:7812 sig { returns(String) } def for_keyword; end @@ -15966,13 +15984,13 @@ class Prism::ForNode < ::Prism::Node # for i in a end # ^^^ # - # source://prism//lib/prism/node.rb#7219 + # pkg:gem/prism#lib/prism/node.rb:7745 sig { returns(Prism::Location) } def for_keyword_loc; end # def in_keyword: () -> String # - # source://prism//lib/prism/node.rb#7291 + # pkg:gem/prism#lib/prism/node.rb:7817 sig { returns(String) } def in_keyword; end @@ -15981,7 +15999,7 @@ class Prism::ForNode < ::Prism::Node # for i in a end # ^^ # - # source://prism//lib/prism/node.rb#7235 + # pkg:gem/prism#lib/prism/node.rb:7761 sig { returns(Prism::Location) } def in_keyword_loc; end @@ -15990,7 +16008,7 @@ class Prism::ForNode < ::Prism::Node # for i in a end # ^ # - # source://prism//lib/prism/node.rb#7199 + # pkg:gem/prism#lib/prism/node.rb:7725 sig do returns(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)) end @@ -15998,32 +16016,32 @@ class Prism::ForNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7306 + # pkg:gem/prism#lib/prism/node.rb:7832 sig { override.returns(String) } def inspect; end # Save the do_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#7265 + # pkg:gem/prism#lib/prism/node.rb:7791 def save_do_keyword_loc(repository); end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#7281 + # pkg:gem/prism#lib/prism/node.rb:7807 def save_end_keyword_loc(repository); end # Save the for_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#7227 + # pkg:gem/prism#lib/prism/node.rb:7753 def save_for_keyword_loc(repository); end # Save the in_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#7243 + # pkg:gem/prism#lib/prism/node.rb:7769 def save_in_keyword_loc(repository); end # Represents the body of statements to execute for each iteration of the loop. @@ -16033,20 +16051,20 @@ class Prism::ForNode < ::Prism::Node # ^^^^^^ # end # - # source://prism//lib/prism/node.rb#7213 + # pkg:gem/prism#lib/prism/node.rb:7739 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7311 + # pkg:gem/prism#lib/prism/node.rb:7837 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#7316 + # pkg:gem/prism#lib/prism/node.rb:7842 def type; end end end @@ -16058,84 +16076,86 @@ end # ^^^ # end # -# source://prism//lib/prism/node.rb#7340 +# pkg:gem/prism#lib/prism/node.rb:7866 class Prism::ForwardingArgumentsNode < ::Prism::Node # Initialize a new ForwardingArgumentsNode node. # - # @return [ForwardingArgumentsNode] a new instance of ForwardingArgumentsNode - # - # source://prism//lib/prism/node.rb#7342 + # pkg:gem/prism#lib/prism/node.rb:7868 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7399 + # pkg:gem/prism#lib/prism/node.rb:7931 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7350 + # pkg:gem/prism#lib/prism/node.rb:7876 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7355 + # pkg:gem/prism#lib/prism/node.rb:7881 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7365 + # pkg:gem/prism#lib/prism/node.rb:7897 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7360 + # pkg:gem/prism#lib/prism/node.rb:7892 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ForwardingArgumentsNode # - # source://prism//lib/prism/node.rb#7370 + # pkg:gem/prism#lib/prism/node.rb:7902 sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ForwardingArgumentsNode) } - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7355 + # pkg:gem/prism#lib/prism/node.rb:7907 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#7378 + # pkg:gem/prism#lib/prism/node.rb:7910 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:7886 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#7383 + # pkg:gem/prism#lib/prism/node.rb:7915 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7388 + # pkg:gem/prism#lib/prism/node.rb:7920 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#7393 + # pkg:gem/prism#lib/prism/node.rb:7925 def type; end end end @@ -16146,100 +16166,105 @@ end # ^^^ # end # -# source://prism//lib/prism/node.rb#7409 +# pkg:gem/prism#lib/prism/node.rb:7941 class Prism::ForwardingParameterNode < ::Prism::Node # Initialize a new ForwardingParameterNode node. # - # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode - # - # source://prism//lib/prism/node.rb#7411 + # pkg:gem/prism#lib/prism/node.rb:7943 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7468 + # pkg:gem/prism#lib/prism/node.rb:8006 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7419 + # pkg:gem/prism#lib/prism/node.rb:7951 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7424 + # pkg:gem/prism#lib/prism/node.rb:7956 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7434 + # pkg:gem/prism#lib/prism/node.rb:7972 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7429 + # pkg:gem/prism#lib/prism/node.rb:7967 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ForwardingParameterNode # - # source://prism//lib/prism/node.rb#7439 + # pkg:gem/prism#lib/prism/node.rb:7977 sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ForwardingParameterNode) } - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7424 + # pkg:gem/prism#lib/prism/node.rb:7982 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#7447 + # pkg:gem/prism#lib/prism/node.rb:7985 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:7961 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#7452 + # pkg:gem/prism#lib/prism/node.rb:7990 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7457 + # pkg:gem/prism#lib/prism/node.rb:7995 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#7462 + # pkg:gem/prism#lib/prism/node.rb:8000 def type; end end end -# Represents the use of the `super` keyword without parentheses or arguments. +# Represents the use of the `super` keyword without parentheses or arguments, but which might have a block. # # super # ^^^^^ # -# source://prism//lib/prism/node.rb#7477 +# super { 123 } +# ^^^^^^^^^^^^^ +# +# If it has any other arguments, it would be a `SuperNode` instead. +# +# pkg:gem/prism#lib/prism/node.rb:8020 class Prism::ForwardingSuperNode < ::Prism::Node # Initialize a new ForwardingSuperNode node. # - # @return [ForwardingSuperNode] a new instance of ForwardingSuperNode - # - # source://prism//lib/prism/node.rb#7479 + # pkg:gem/prism#lib/prism/node.rb:8022 sig do params( source: Prism::Source, @@ -16254,42 +16279,42 @@ class Prism::ForwardingSuperNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7542 + # pkg:gem/prism#lib/prism/node.rb:8092 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7488 + # pkg:gem/prism#lib/prism/node.rb:8031 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader block: BlockNode? + # All other arguments are forwarded as normal, except the original block is replaced with the new block. # - # source://prism//lib/prism/node.rb#7523 + # pkg:gem/prism#lib/prism/node.rb:8073 sig { returns(T.nilable(Prism::BlockNode)) } def block; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7493 + # pkg:gem/prism#lib/prism/node.rb:8036 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7505 + # pkg:gem/prism#lib/prism/node.rb:8055 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7498 + # pkg:gem/prism#lib/prism/node.rb:8048 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?block: BlockNode?) -> ForwardingSuperNode # - # source://prism//lib/prism/node.rb#7510 + # pkg:gem/prism#lib/prism/node.rb:8060 sig do params( node_id: Integer, @@ -16298,40 +16323,44 @@ class Prism::ForwardingSuperNode < ::Prism::Node block: T.nilable(Prism::BlockNode) ).returns(Prism::ForwardingSuperNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), block: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, block: self.block); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7493 + # pkg:gem/prism#lib/prism/node.rb:8065 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, block: BlockNode? } # - # source://prism//lib/prism/node.rb#7518 + # pkg:gem/prism#lib/prism/node.rb:8068 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:8041 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#7526 + # pkg:gem/prism#lib/prism/node.rb:8076 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7531 + # pkg:gem/prism#lib/prism/node.rb:8081 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#7536 + # pkg:gem/prism#lib/prism/node.rb:8086 def type; end end end @@ -16341,13 +16370,11 @@ end # $target &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7552 +# pkg:gem/prism#lib/prism/node.rb:8102 class Prism::GlobalVariableAndWriteNode < ::Prism::Node # Initialize a new GlobalVariableAndWriteNode node. # - # @return [GlobalVariableAndWriteNode] a new instance of GlobalVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#7554 + # pkg:gem/prism#lib/prism/node.rb:8104 sig do params( source: Prism::Source, @@ -16365,36 +16392,36 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7652 + # pkg:gem/prism#lib/prism/node.rb:8209 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7566 + # pkg:gem/prism#lib/prism/node.rb:8116 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7571 + # pkg:gem/prism#lib/prism/node.rb:8121 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7581 + # pkg:gem/prism#lib/prism/node.rb:8138 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7576 + # pkg:gem/prism#lib/prism/node.rb:8133 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> GlobalVariableAndWriteNode # - # source://prism//lib/prism/node.rb#7586 + # pkg:gem/prism#lib/prism/node.rb:8143 sig do params( node_id: Integer, @@ -16406,85 +16433,89 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node value: Prism::Node ).returns(Prism::GlobalVariableAndWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, operator_loc: self.operator_loc, value: self.value); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7571 + # pkg:gem/prism#lib/prism/node.rb:8148 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#7594 + # pkg:gem/prism#lib/prism/node.rb:8151 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#200 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:201 def desugar; end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:8126 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#7636 + # pkg:gem/prism#lib/prism/node.rb:8193 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#7599 + # pkg:gem/prism#lib/prism/node.rb:8156 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#7602 + # pkg:gem/prism#lib/prism/node.rb:8159 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#7631 + # pkg:gem/prism#lib/prism/node.rb:8188 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#7615 + # pkg:gem/prism#lib/prism/node.rb:8172 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#7610 + # pkg:gem/prism#lib/prism/node.rb:8167 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#7623 + # pkg:gem/prism#lib/prism/node.rb:8180 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7641 + # pkg:gem/prism#lib/prism/node.rb:8198 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#7628 + # pkg:gem/prism#lib/prism/node.rb:8185 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#7646 + # pkg:gem/prism#lib/prism/node.rb:8203 def type; end end end @@ -16494,13 +16525,11 @@ end # $target += value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7665 +# pkg:gem/prism#lib/prism/node.rb:8222 class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # Initialize a new GlobalVariableOperatorWriteNode node. # - # @return [GlobalVariableOperatorWriteNode] a new instance of GlobalVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#7667 + # pkg:gem/prism#lib/prism/node.rb:8224 sig do params( source: Prism::Source, @@ -16519,48 +16548,48 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7764 + # pkg:gem/prism#lib/prism/node.rb:8328 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7680 + # pkg:gem/prism#lib/prism/node.rb:8237 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#7745 + # pkg:gem/prism#lib/prism/node.rb:8309 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#7729 + # pkg:gem/prism#lib/prism/node.rb:8293 sig { returns(Prism::Location) } def binary_operator_loc; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7685 + # pkg:gem/prism#lib/prism/node.rb:8242 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7695 + # pkg:gem/prism#lib/prism/node.rb:8259 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7690 + # pkg:gem/prism#lib/prism/node.rb:8254 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> GlobalVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#7700 + # pkg:gem/prism#lib/prism/node.rb:8264 sig do params( node_id: Integer, @@ -16573,85 +16602,89 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node binary_operator: Symbol ).returns(Prism::GlobalVariableOperatorWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, binary_operator_loc: self.binary_operator_loc, value: self.value, binary_operator: self.binary_operator); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7685 + # pkg:gem/prism#lib/prism/node.rb:8269 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } # - # source://prism//lib/prism/node.rb#7708 + # pkg:gem/prism#lib/prism/node.rb:8272 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#212 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:213 def desugar; end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:8247 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#7748 + # pkg:gem/prism#lib/prism/node.rb:8312 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#7713 + # pkg:gem/prism#lib/prism/node.rb:8277 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#7716 + # pkg:gem/prism#lib/prism/node.rb:8280 sig { returns(Prism::Location) } def name_loc; end # Returns the binary operator used to modify the receiver. This method is # deprecated in favor of #binary_operator. # - # source://prism//lib/prism/node_ext.rb#403 + # pkg:gem/prism#lib/prism/node_ext.rb:406 def operator; end # Returns the location of the binary operator used to modify the receiver. # This method is deprecated in favor of #binary_operator_loc. # - # source://prism//lib/prism/node_ext.rb#410 + # pkg:gem/prism#lib/prism/node_ext.rb:413 def operator_loc; end # Save the binary_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#7737 + # pkg:gem/prism#lib/prism/node.rb:8301 def save_binary_operator_loc(repository); end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#7724 + # pkg:gem/prism#lib/prism/node.rb:8288 def save_name_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7753 + # pkg:gem/prism#lib/prism/node.rb:8317 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#7742 + # pkg:gem/prism#lib/prism/node.rb:8306 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#7758 + # pkg:gem/prism#lib/prism/node.rb:8322 def type; end end end @@ -16661,13 +16694,11 @@ end # $target ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7778 +# pkg:gem/prism#lib/prism/node.rb:8342 class Prism::GlobalVariableOrWriteNode < ::Prism::Node # Initialize a new GlobalVariableOrWriteNode node. # - # @return [GlobalVariableOrWriteNode] a new instance of GlobalVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#7780 + # pkg:gem/prism#lib/prism/node.rb:8344 sig do params( source: Prism::Source, @@ -16685,36 +16716,36 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7878 + # pkg:gem/prism#lib/prism/node.rb:8449 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7792 + # pkg:gem/prism#lib/prism/node.rb:8356 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7797 + # pkg:gem/prism#lib/prism/node.rb:8361 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7807 + # pkg:gem/prism#lib/prism/node.rb:8378 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7802 + # pkg:gem/prism#lib/prism/node.rb:8373 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> GlobalVariableOrWriteNode # - # source://prism//lib/prism/node.rb#7812 + # pkg:gem/prism#lib/prism/node.rb:8383 sig do params( node_id: Integer, @@ -16726,85 +16757,89 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node value: Prism::Node ).returns(Prism::GlobalVariableOrWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, operator_loc: self.operator_loc, value: self.value); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7797 + # pkg:gem/prism#lib/prism/node.rb:8388 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#7820 + # pkg:gem/prism#lib/prism/node.rb:8391 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#206 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:207 def desugar; end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:8366 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#7862 + # pkg:gem/prism#lib/prism/node.rb:8433 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#7825 + # pkg:gem/prism#lib/prism/node.rb:8396 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#7828 + # pkg:gem/prism#lib/prism/node.rb:8399 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#7857 + # pkg:gem/prism#lib/prism/node.rb:8428 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#7841 + # pkg:gem/prism#lib/prism/node.rb:8412 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#7836 + # pkg:gem/prism#lib/prism/node.rb:8407 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#7849 + # pkg:gem/prism#lib/prism/node.rb:8420 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7867 + # pkg:gem/prism#lib/prism/node.rb:8438 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#7854 + # pkg:gem/prism#lib/prism/node.rb:8425 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#7872 + # pkg:gem/prism#lib/prism/node.rb:8443 def type; end end end @@ -16814,49 +16849,47 @@ end # $foo # ^^^^ # -# source://prism//lib/prism/node.rb#7891 +# pkg:gem/prism#lib/prism/node.rb:8462 class Prism::GlobalVariableReadNode < ::Prism::Node # Initialize a new GlobalVariableReadNode node. # - # @return [GlobalVariableReadNode] a new instance of GlobalVariableReadNode - # - # source://prism//lib/prism/node.rb#7893 + # pkg:gem/prism#lib/prism/node.rb:8464 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7958 + # pkg:gem/prism#lib/prism/node.rb:8535 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7902 + # pkg:gem/prism#lib/prism/node.rb:8473 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7907 + # pkg:gem/prism#lib/prism/node.rb:8478 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7917 + # pkg:gem/prism#lib/prism/node.rb:8494 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7912 + # pkg:gem/prism#lib/prism/node.rb:8489 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> GlobalVariableReadNode # - # source://prism//lib/prism/node.rb#7922 + # pkg:gem/prism#lib/prism/node.rb:8499 sig do params( node_id: Integer, @@ -16865,27 +16898,31 @@ class Prism::GlobalVariableReadNode < ::Prism::Node name: Symbol ).returns(Prism::GlobalVariableReadNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7907 + # pkg:gem/prism#lib/prism/node.rb:8504 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#7930 + # pkg:gem/prism#lib/prism/node.rb:8507 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:8483 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#7942 + # pkg:gem/prism#lib/prism/node.rb:8519 sig { override.returns(String) } def inspect; end @@ -16895,20 +16932,20 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # # $_Test # name `:$_Test` # - # source://prism//lib/prism/node.rb#7939 + # pkg:gem/prism#lib/prism/node.rb:8516 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7947 + # pkg:gem/prism#lib/prism/node.rb:8524 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#7952 + # pkg:gem/prism#lib/prism/node.rb:8529 def type; end end end @@ -16918,49 +16955,47 @@ end # $foo, $bar = baz # ^^^^ ^^^^ # -# source://prism//lib/prism/node.rb#7968 +# pkg:gem/prism#lib/prism/node.rb:8545 class Prism::GlobalVariableTargetNode < ::Prism::Node # Initialize a new GlobalVariableTargetNode node. # - # @return [GlobalVariableTargetNode] a new instance of GlobalVariableTargetNode - # - # source://prism//lib/prism/node.rb#7970 + # pkg:gem/prism#lib/prism/node.rb:8547 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8031 + # pkg:gem/prism#lib/prism/node.rb:8614 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7979 + # pkg:gem/prism#lib/prism/node.rb:8556 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7984 + # pkg:gem/prism#lib/prism/node.rb:8561 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7994 + # pkg:gem/prism#lib/prism/node.rb:8577 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7989 + # pkg:gem/prism#lib/prism/node.rb:8572 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> GlobalVariableTargetNode # - # source://prism//lib/prism/node.rb#7999 + # pkg:gem/prism#lib/prism/node.rb:8582 sig do params( node_id: Integer, @@ -16969,46 +17004,50 @@ class Prism::GlobalVariableTargetNode < ::Prism::Node name: Symbol ).returns(Prism::GlobalVariableTargetNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#7984 + # pkg:gem/prism#lib/prism/node.rb:8587 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#8007 + # pkg:gem/prism#lib/prism/node.rb:8590 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:8566 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#8015 + # pkg:gem/prism#lib/prism/node.rb:8598 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#8012 + # pkg:gem/prism#lib/prism/node.rb:8595 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#8020 + # pkg:gem/prism#lib/prism/node.rb:8603 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8025 + # pkg:gem/prism#lib/prism/node.rb:8608 def type; end end end @@ -17018,13 +17057,11 @@ end # $foo = 1 # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#8041 +# pkg:gem/prism#lib/prism/node.rb:8624 class Prism::GlobalVariableWriteNode < ::Prism::Node # Initialize a new GlobalVariableWriteNode node. # - # @return [GlobalVariableWriteNode] a new instance of GlobalVariableWriteNode - # - # source://prism//lib/prism/node.rb#8043 + # pkg:gem/prism#lib/prism/node.rb:8626 sig do params( source: Prism::Source, @@ -17042,36 +17079,36 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8157 + # pkg:gem/prism#lib/prism/node.rb:8747 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8055 + # pkg:gem/prism#lib/prism/node.rb:8638 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8060 + # pkg:gem/prism#lib/prism/node.rb:8643 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8070 + # pkg:gem/prism#lib/prism/node.rb:8660 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8065 + # pkg:gem/prism#lib/prism/node.rb:8655 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> GlobalVariableWriteNode # - # source://prism//lib/prism/node.rb#8075 + # pkg:gem/prism#lib/prism/node.rb:8665 sig do params( node_id: Integer, @@ -17083,27 +17120,31 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node operator_loc: Prism::Location ).returns(Prism::GlobalVariableWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, value: self.value, operator_loc: self.operator_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8060 + # pkg:gem/prism#lib/prism/node.rb:8670 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#8083 + # pkg:gem/prism#lib/prism/node.rb:8673 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:8648 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#8141 + # pkg:gem/prism#lib/prism/node.rb:8731 sig { override.returns(String) } def inspect; end @@ -17113,7 +17154,7 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # # $_Test = 123 # name `:$_Test` # - # source://prism//lib/prism/node.rb#8092 + # pkg:gem/prism#lib/prism/node.rb:8682 sig { returns(Symbol) } def name; end @@ -17122,13 +17163,13 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # $foo = :bar # ^^^^ # - # source://prism//lib/prism/node.rb#8098 + # pkg:gem/prism#lib/prism/node.rb:8688 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#8136 + # pkg:gem/prism#lib/prism/node.rb:8726 sig { returns(String) } def operator; end @@ -17137,25 +17178,25 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # $foo = :bar # ^ # - # source://prism//lib/prism/node.rb#8123 + # pkg:gem/prism#lib/prism/node.rb:8713 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#8106 + # pkg:gem/prism#lib/prism/node.rb:8696 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#8131 + # pkg:gem/prism#lib/prism/node.rb:8721 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#8146 + # pkg:gem/prism#lib/prism/node.rb:8736 sig { override.returns(Symbol) } def type; end @@ -17167,14 +17208,14 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # $-xyz = 123 # ^^^ # - # source://prism//lib/prism/node.rb#8117 + # pkg:gem/prism#lib/prism/node.rb:8707 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8151 + # pkg:gem/prism#lib/prism/node.rb:8741 def type; end end end @@ -17184,13 +17225,11 @@ end # { a => b } # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8170 +# pkg:gem/prism#lib/prism/node.rb:8760 class Prism::HashNode < ::Prism::Node # Initialize a new HashNode node. # - # @return [HashNode] a new instance of HashNode - # - # source://prism//lib/prism/node.rb#8172 + # pkg:gem/prism#lib/prism/node.rb:8762 sig do params( source: Prism::Source, @@ -17207,24 +17246,24 @@ class Prism::HashNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8283 + # pkg:gem/prism#lib/prism/node.rb:8880 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8183 + # pkg:gem/prism#lib/prism/node.rb:8773 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8188 + # pkg:gem/prism#lib/prism/node.rb:8778 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#8262 + # pkg:gem/prism#lib/prism/node.rb:8859 sig { returns(String) } def closing; end @@ -17233,25 +17272,25 @@ class Prism::HashNode < ::Prism::Node # { a => b } # ^ # - # source://prism//lib/prism/node.rb#8244 + # pkg:gem/prism#lib/prism/node.rb:8841 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8198 + # pkg:gem/prism#lib/prism/node.rb:8795 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8193 + # pkg:gem/prism#lib/prism/node.rb:8790 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?elements: Array[AssocNode | AssocSplatNode], ?closing_loc: Location) -> HashNode # - # source://prism//lib/prism/node.rb#8203 + # pkg:gem/prism#lib/prism/node.rb:8800 sig do params( node_id: Integer, @@ -17262,21 +17301,25 @@ class Prism::HashNode < ::Prism::Node closing_loc: Prism::Location ).returns(Prism::HashNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), elements: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, opening_loc: self.opening_loc, elements: self.elements, closing_loc: self.closing_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8188 + # pkg:gem/prism#lib/prism/node.rb:8805 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, elements: Array[AssocNode | AssocSplatNode], closing_loc: Location } # - # source://prism//lib/prism/node.rb#8211 + # pkg:gem/prism#lib/prism/node.rb:8808 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:8783 + def each_child_node; end + # The elements of the hash. These can be either `AssocNode`s or `AssocSplatNode`s. # # { a: b } @@ -17285,7 +17328,7 @@ class Prism::HashNode < ::Prism::Node # { **foo } # ^^^^^ # - # source://prism//lib/prism/node.rb#8238 + # pkg:gem/prism#lib/prism/node.rb:8835 sig { returns(T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)]) } def elements; end @@ -17294,13 +17337,13 @@ class Prism::HashNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8267 + # pkg:gem/prism#lib/prism/node.rb:8864 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#8257 + # pkg:gem/prism#lib/prism/node.rb:8854 sig { returns(String) } def opening; end @@ -17309,32 +17352,32 @@ class Prism::HashNode < ::Prism::Node # { a => b } # ^ # - # source://prism//lib/prism/node.rb#8219 + # pkg:gem/prism#lib/prism/node.rb:8816 sig { returns(Prism::Location) } def opening_loc; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#8252 + # pkg:gem/prism#lib/prism/node.rb:8849 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#8227 + # pkg:gem/prism#lib/prism/node.rb:8824 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#8272 + # pkg:gem/prism#lib/prism/node.rb:8869 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8277 + # pkg:gem/prism#lib/prism/node.rb:8874 def type; end end end @@ -17347,20 +17390,24 @@ end # foo => { a: 1, b: 2, **c } # ^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8299 +# foo => Bar[a: 1, b: 2] +# ^^^^^^^^^^^^^^^ +# +# foo in { a: 1, b: 2 } +# ^^^^^^^^^^^^^^ +# +# pkg:gem/prism#lib/prism/node.rb:8902 class Prism::HashPatternNode < ::Prism::Node # Initialize a new HashPatternNode node. # - # @return [HashPatternNode] a new instance of HashPatternNode - # - # source://prism//lib/prism/node.rb#8301 + # pkg:gem/prism#lib/prism/node.rb:8904 sig do params( source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, - constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + constant: T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode)), elements: T::Array[Prism::AssocNode], rest: T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode)), opening_loc: T.nilable(Prism::Location), @@ -17372,84 +17419,103 @@ class Prism::HashPatternNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8424 + # pkg:gem/prism#lib/prism/node.rb:9066 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8314 + # pkg:gem/prism#lib/prism/node.rb:8917 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8319 + # pkg:gem/prism#lib/prism/node.rb:8922 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#8403 + # pkg:gem/prism#lib/prism/node.rb:9045 sig { returns(T.nilable(String)) } def closing; end - # attr_reader closing_loc: Location? + # The location of the closing brace. # - # source://prism//lib/prism/node.rb#8379 + # foo => { a: 1 } + # ^ + # + # foo => Bar[a: 1] + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:9021 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8333 + # pkg:gem/prism#lib/prism/node.rb:8945 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8324 + # pkg:gem/prism#lib/prism/node.rb:8936 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader constant: ConstantReadNode | ConstantPathNode | nil + # Represents the optional constant preceding the Hash. + # + # foo => Bar[a: 1, b: 2] + # ^^^ # - # source://prism//lib/prism/node.rb#8351 - sig { returns(T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode))) } + # foo => Bar::Baz[a: 1, b: 2] + # ^^^^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:8969 + sig { returns(T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode))) } def constant; end - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantReadNode | ConstantPathNode | nil, ?elements: Array[AssocNode], ?rest: AssocSplatNode | NoKeywordsParameterNode | nil, ?opening_loc: Location?, ?closing_loc: Location?) -> HashPatternNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantPathNode | ConstantReadNode | nil, ?elements: Array[AssocNode], ?rest: AssocSplatNode | NoKeywordsParameterNode | nil, ?opening_loc: Location?, ?closing_loc: Location?) -> HashPatternNode # - # source://prism//lib/prism/node.rb#8338 + # pkg:gem/prism#lib/prism/node.rb:8950 sig do params( node_id: Integer, location: Prism::Location, flags: Integer, - constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + constant: T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode)), elements: T::Array[Prism::AssocNode], rest: T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode)), opening_loc: T.nilable(Prism::Location), closing_loc: T.nilable(Prism::Location) ).returns(Prism::HashPatternNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), elements: T.unsafe(nil), rest: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, constant: self.constant, elements: self.elements, rest: self.rest, opening_loc: self.opening_loc, closing_loc: self.closing_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8319 + # pkg:gem/prism#lib/prism/node.rb:8955 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantReadNode | ConstantPathNode | nil, elements: Array[AssocNode], rest: AssocSplatNode | NoKeywordsParameterNode | nil, opening_loc: Location?, closing_loc: Location? } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantPathNode | ConstantReadNode | nil, elements: Array[AssocNode], rest: AssocSplatNode | NoKeywordsParameterNode | nil, opening_loc: Location?, closing_loc: Location? } # - # source://prism//lib/prism/node.rb#8346 + # pkg:gem/prism#lib/prism/node.rb:8958 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # attr_reader elements: Array[AssocNode] + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:8927 + def each_child_node; end + + # Represents the explicit named hash keys and values. + # + # foo => { a: 1, b:, ** } + # ^^^^^^^^ # - # source://prism//lib/prism/node.rb#8354 + # pkg:gem/prism#lib/prism/node.rb:8975 sig { returns(T::Array[Prism::AssocNode]) } def elements; end @@ -17458,61 +17524,74 @@ class Prism::HashPatternNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8408 + # pkg:gem/prism#lib/prism/node.rb:9050 sig { override.returns(String) } def inspect; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#8398 + # pkg:gem/prism#lib/prism/node.rb:9040 sig { returns(T.nilable(String)) } def opening; end - # attr_reader opening_loc: Location? + # The location of the opening brace. + # + # foo => { a: 1 } + # ^ + # + # foo => Bar[a: 1] + # ^ # - # source://prism//lib/prism/node.rb#8360 + # pkg:gem/prism#lib/prism/node.rb:8996 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end - # attr_reader rest: AssocSplatNode | NoKeywordsParameterNode | nil + # Represents the rest of the Hash keys and values. This can be named, unnamed, or explicitly forbidden via `**nil`, this last one results in a `NoKeywordsParameterNode`. + # + # foo => { a: 1, b:, **c } + # ^^^ + # + # foo => { a: 1, b:, ** } + # ^^ # - # source://prism//lib/prism/node.rb#8357 + # foo => { a: 1, b:, **nil } + # ^^^^^ + # + # pkg:gem/prism#lib/prism/node.rb:8987 sig { returns(T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode))) } def rest; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#8393 + # pkg:gem/prism#lib/prism/node.rb:9035 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#8374 + # pkg:gem/prism#lib/prism/node.rb:9010 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#8413 + # pkg:gem/prism#lib/prism/node.rb:9055 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8418 + # pkg:gem/prism#lib/prism/node.rb:9060 def type; end end end -# source://prism//lib/prism/node_ext.rb#52 +# pkg:gem/prism#lib/prism/node_ext.rb:55 module Prism::HeredocQuery # Returns true if this node was represented as a heredoc in the source code. # - # @return [Boolean] - # - # source://prism//lib/prism/node_ext.rb#54 + # pkg:gem/prism#lib/prism/node_ext.rb:57 def heredoc?; end end @@ -17527,13 +17606,11 @@ end # foo ? bar : baz # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8445 +# pkg:gem/prism#lib/prism/node.rb:9087 class Prism::IfNode < ::Prism::Node # Initialize a new IfNode node. # - # @return [IfNode] a new instance of IfNode - # - # source://prism//lib/prism/node.rb#8447 + # pkg:gem/prism#lib/prism/node.rb:9089 sig do params( source: Prism::Source, @@ -17553,42 +17630,42 @@ class Prism::IfNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8641 + # pkg:gem/prism#lib/prism/node.rb:9292 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8461 + # pkg:gem/prism#lib/prism/node.rb:9103 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8466 + # pkg:gem/prism#lib/prism/node.rb:9108 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8480 + # pkg:gem/prism#lib/prism/node.rb:9131 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8471 + # pkg:gem/prism#lib/prism/node.rb:9122 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # Returns the subsequent if/elsif/else clause of the if node. This method is # deprecated in favor of #subsequent. # - # source://prism//lib/prism/node_ext.rb#485 + # pkg:gem/prism#lib/prism/node_ext.rb:488 def consequent; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?if_keyword_loc: Location?, ?predicate: Prism::node, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?subsequent: ElseNode | IfNode | nil, ?end_keyword_loc: Location?) -> IfNode # - # source://prism//lib/prism/node.rb#8485 + # pkg:gem/prism#lib/prism/node.rb:9136 sig do params( node_id: Integer, @@ -17602,24 +17679,28 @@ class Prism::IfNode < ::Prism::Node end_keyword_loc: T.nilable(Prism::Location) ).returns(Prism::IfNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), if_keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, if_keyword_loc: self.if_keyword_loc, predicate: self.predicate, then_keyword_loc: self.then_keyword_loc, statements: self.statements, subsequent: self.subsequent, end_keyword_loc: self.end_keyword_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8466 + # pkg:gem/prism#lib/prism/node.rb:9141 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, if_keyword_loc: Location?, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, subsequent: ElseNode | IfNode | nil, end_keyword_loc: Location? } # - # source://prism//lib/prism/node.rb#8493 + # pkg:gem/prism#lib/prism/node.rb:9144 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:9113 + def each_child_node; end + # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#8620 + # pkg:gem/prism#lib/prism/node.rb:9271 sig { returns(T.nilable(String)) } def end_keyword; end @@ -17630,7 +17711,7 @@ class Prism::IfNode < ::Prism::Node # end # ^^^ # - # source://prism//lib/prism/node.rb#8591 + # pkg:gem/prism#lib/prism/node.rb:9242 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end @@ -17639,7 +17720,7 @@ class Prism::IfNode < ::Prism::Node # def if_keyword: () -> String? # - # source://prism//lib/prism/node.rb#8610 + # pkg:gem/prism#lib/prism/node.rb:9261 sig { returns(T.nilable(String)) } def if_keyword; end @@ -17650,17 +17731,17 @@ class Prism::IfNode < ::Prism::Node # # The `if_keyword_loc` field will be `nil` when the `IfNode` represents a ternary expression. # - # source://prism//lib/prism/node.rb#8503 + # pkg:gem/prism#lib/prism/node.rb:9154 sig { returns(T.nilable(Prism::Location)) } def if_keyword_loc; end # def inspect -> String # - # source://prism//lib/prism/node.rb#8625 + # pkg:gem/prism#lib/prism/node.rb:9276 sig { override.returns(String) } def inspect; end - # source://prism//lib/prism/parse_result/newlines.rb#91 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:92 def newline_flag!(lines); end # The node for the condition the `IfNode` is testing. @@ -17676,26 +17757,26 @@ class Prism::IfNode < ::Prism::Node # foo ? bar : baz # ^^^ # - # source://prism//lib/prism/node.rb#8533 + # pkg:gem/prism#lib/prism/node.rb:9184 sig { returns(Prism::Node) } def predicate; end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#8605 + # pkg:gem/prism#lib/prism/node.rb:9256 def save_end_keyword_loc(repository); end # Save the if_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#8517 + # pkg:gem/prism#lib/prism/node.rb:9168 def save_if_keyword_loc(repository); end # Save the then_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#8556 + # pkg:gem/prism#lib/prism/node.rb:9207 def save_then_keyword_loc(repository); end # Represents the body of statements that will be executed when the predicate is evaluated as truthy. Will be `nil` when no body is provided. @@ -17707,7 +17788,7 @@ class Prism::IfNode < ::Prism::Node # ^^^ # end # - # source://prism//lib/prism/node.rb#8568 + # pkg:gem/prism#lib/prism/node.rb:9219 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -17725,13 +17806,13 @@ class Prism::IfNode < ::Prism::Node # if foo then bar else baz end # ^^^^^^^^^^^^ # - # source://prism//lib/prism/node.rb#8583 + # pkg:gem/prism#lib/prism/node.rb:9234 sig { returns(T.nilable(T.any(Prism::ElseNode, Prism::IfNode))) } def subsequent; end # def then_keyword: () -> String? # - # source://prism//lib/prism/node.rb#8615 + # pkg:gem/prism#lib/prism/node.rb:9266 sig { returns(T.nilable(String)) } def then_keyword; end @@ -17743,20 +17824,20 @@ class Prism::IfNode < ::Prism::Node # a ? b : c # ^ # - # source://prism//lib/prism/node.rb#8542 + # pkg:gem/prism#lib/prism/node.rb:9193 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#8630 + # pkg:gem/prism#lib/prism/node.rb:9281 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8635 + # pkg:gem/prism#lib/prism/node.rb:9286 def type; end end end @@ -17766,13 +17847,11 @@ end # 1.0i # ^^^^ # -# source://prism//lib/prism/node.rb#8656 +# pkg:gem/prism#lib/prism/node.rb:9307 class Prism::ImaginaryNode < ::Prism::Node # Initialize a new ImaginaryNode node. # - # @return [ImaginaryNode] a new instance of ImaginaryNode - # - # source://prism//lib/prism/node.rb#8658 + # pkg:gem/prism#lib/prism/node.rb:9309 sig do params( source: Prism::Source, @@ -17787,36 +17866,36 @@ class Prism::ImaginaryNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8719 + # pkg:gem/prism#lib/prism/node.rb:9377 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8667 + # pkg:gem/prism#lib/prism/node.rb:9318 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8672 + # pkg:gem/prism#lib/prism/node.rb:9323 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8682 + # pkg:gem/prism#lib/prism/node.rb:9340 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8677 + # pkg:gem/prism#lib/prism/node.rb:9335 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?numeric: FloatNode | IntegerNode | RationalNode) -> ImaginaryNode # - # source://prism//lib/prism/node.rb#8687 + # pkg:gem/prism#lib/prism/node.rb:9345 sig do params( node_id: Integer, @@ -17825,52 +17904,56 @@ class Prism::ImaginaryNode < ::Prism::Node numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode) ).returns(Prism::ImaginaryNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), numeric: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, numeric: self.numeric); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8672 + # pkg:gem/prism#lib/prism/node.rb:9350 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, numeric: FloatNode | IntegerNode | RationalNode } # - # source://prism//lib/prism/node.rb#8695 + # pkg:gem/prism#lib/prism/node.rb:9353 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:9328 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#8703 + # pkg:gem/prism#lib/prism/node.rb:9361 sig { override.returns(String) } def inspect; end # attr_reader numeric: FloatNode | IntegerNode | RationalNode # - # source://prism//lib/prism/node.rb#8700 + # pkg:gem/prism#lib/prism/node.rb:9358 sig { returns(T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode)) } def numeric; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#8708 + # pkg:gem/prism#lib/prism/node.rb:9366 sig { override.returns(Symbol) } def type; end # Returns the value of the node as a Ruby Complex. # - # source://prism//lib/prism/node_ext.rb#107 + # pkg:gem/prism#lib/prism/node_ext.rb:110 sig { returns(Complex) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8713 + # pkg:gem/prism#lib/prism/node.rb:9371 def type; end end end @@ -17886,13 +17969,11 @@ end # foo in { bar: } # ^^^^ # -# source://prism//lib/prism/node.rb#8735 +# pkg:gem/prism#lib/prism/node.rb:9393 class Prism::ImplicitNode < ::Prism::Node # Initialize a new ImplicitNode node. # - # @return [ImplicitNode] a new instance of ImplicitNode - # - # source://prism//lib/prism/node.rb#8737 + # pkg:gem/prism#lib/prism/node.rb:9395 sig do params( source: Prism::Source, @@ -17907,36 +17988,36 @@ class Prism::ImplicitNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8798 + # pkg:gem/prism#lib/prism/node.rb:9463 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8746 + # pkg:gem/prism#lib/prism/node.rb:9404 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8751 + # pkg:gem/prism#lib/prism/node.rb:9409 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8761 + # pkg:gem/prism#lib/prism/node.rb:9426 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8756 + # pkg:gem/prism#lib/prism/node.rb:9421 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode) -> ImplicitNode # - # source://prism//lib/prism/node.rb#8766 + # pkg:gem/prism#lib/prism/node.rb:9431 sig do params( node_id: Integer, @@ -17945,39 +18026,43 @@ class Prism::ImplicitNode < ::Prism::Node value: T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode) ).returns(Prism::ImplicitNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, value: self.value); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8751 + # pkg:gem/prism#lib/prism/node.rb:9436 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode } # - # source://prism//lib/prism/node.rb#8774 + # pkg:gem/prism#lib/prism/node.rb:9439 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:9414 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#8782 + # pkg:gem/prism#lib/prism/node.rb:9447 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#8787 + # pkg:gem/prism#lib/prism/node.rb:9452 sig { override.returns(Symbol) } def type; end # attr_reader value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode # - # source://prism//lib/prism/node.rb#8779 + # pkg:gem/prism#lib/prism/node.rb:9444 sig do returns(T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode)) end @@ -17986,7 +18071,7 @@ class Prism::ImplicitNode < ::Prism::Node class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8792 + # pkg:gem/prism#lib/prism/node.rb:9457 def type; end end end @@ -18005,84 +18090,86 @@ end # foo, = bar # ^ # -# source://prism//lib/prism/node.rb#8817 +# pkg:gem/prism#lib/prism/node.rb:9482 class Prism::ImplicitRestNode < ::Prism::Node # Initialize a new ImplicitRestNode node. # - # @return [ImplicitRestNode] a new instance of ImplicitRestNode - # - # source://prism//lib/prism/node.rb#8819 + # pkg:gem/prism#lib/prism/node.rb:9484 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8876 + # pkg:gem/prism#lib/prism/node.rb:9547 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8827 + # pkg:gem/prism#lib/prism/node.rb:9492 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8832 + # pkg:gem/prism#lib/prism/node.rb:9497 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8842 + # pkg:gem/prism#lib/prism/node.rb:9513 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8837 + # pkg:gem/prism#lib/prism/node.rb:9508 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ImplicitRestNode # - # source://prism//lib/prism/node.rb#8847 + # pkg:gem/prism#lib/prism/node.rb:9518 sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ImplicitRestNode) } - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8832 + # pkg:gem/prism#lib/prism/node.rb:9523 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#8855 + # pkg:gem/prism#lib/prism/node.rb:9526 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:9502 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#8860 + # pkg:gem/prism#lib/prism/node.rb:9531 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#8865 + # pkg:gem/prism#lib/prism/node.rb:9536 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8870 + # pkg:gem/prism#lib/prism/node.rb:9541 def type; end end end @@ -18092,13 +18179,11 @@ end # case a; in b then c end # ^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8885 +# pkg:gem/prism#lib/prism/node.rb:9556 class Prism::InNode < ::Prism::Node # Initialize a new InNode node. # - # @return [InNode] a new instance of InNode - # - # source://prism//lib/prism/node.rb#8887 + # pkg:gem/prism#lib/prism/node.rb:9558 sig do params( source: Prism::Source, @@ -18116,36 +18201,36 @@ class Prism::InNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8999 + # pkg:gem/prism#lib/prism/node.rb:9678 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8899 + # pkg:gem/prism#lib/prism/node.rb:9570 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8904 + # pkg:gem/prism#lib/prism/node.rb:9575 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8917 + # pkg:gem/prism#lib/prism/node.rb:9596 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8909 + # pkg:gem/prism#lib/prism/node.rb:9588 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?pattern: Prism::node, ?statements: StatementsNode?, ?in_loc: Location, ?then_loc: Location?) -> InNode # - # source://prism//lib/prism/node.rb#8922 + # pkg:gem/prism#lib/prism/node.rb:9601 sig do params( node_id: Integer, @@ -18157,88 +18242,92 @@ class Prism::InNode < ::Prism::Node then_loc: T.nilable(Prism::Location) ).returns(Prism::InNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), pattern: T.unsafe(nil), statements: T.unsafe(nil), in_loc: T.unsafe(nil), then_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, pattern: self.pattern, statements: self.statements, in_loc: self.in_loc, then_loc: self.then_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#8904 + # pkg:gem/prism#lib/prism/node.rb:9606 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, pattern: Prism::node, statements: StatementsNode?, in_loc: Location, then_loc: Location? } # - # source://prism//lib/prism/node.rb#8930 + # pkg:gem/prism#lib/prism/node.rb:9609 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:9580 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def in: () -> String # - # source://prism//lib/prism/node.rb#8973 + # pkg:gem/prism#lib/prism/node.rb:9652 sig { returns(String) } def in; end # attr_reader in_loc: Location # - # source://prism//lib/prism/node.rb#8941 + # pkg:gem/prism#lib/prism/node.rb:9620 sig { returns(Prism::Location) } def in_loc; end # def inspect -> String # - # source://prism//lib/prism/node.rb#8983 + # pkg:gem/prism#lib/prism/node.rb:9662 sig { override.returns(String) } def inspect; end # attr_reader pattern: Prism::node # - # source://prism//lib/prism/node.rb#8935 + # pkg:gem/prism#lib/prism/node.rb:9614 sig { returns(Prism::Node) } def pattern; end # Save the in_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#8949 + # pkg:gem/prism#lib/prism/node.rb:9628 def save_in_loc(repository); end # Save the then_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#8968 + # pkg:gem/prism#lib/prism/node.rb:9647 def save_then_loc(repository); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#8938 + # pkg:gem/prism#lib/prism/node.rb:9617 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then: () -> String? # - # source://prism//lib/prism/node.rb#8978 + # pkg:gem/prism#lib/prism/node.rb:9657 sig { returns(T.nilable(String)) } def then; end # attr_reader then_loc: Location? # - # source://prism//lib/prism/node.rb#8954 + # pkg:gem/prism#lib/prism/node.rb:9633 sig { returns(T.nilable(Prism::Location)) } def then_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#8988 + # pkg:gem/prism#lib/prism/node.rb:9667 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8993 + # pkg:gem/prism#lib/prism/node.rb:9672 def type; end end end @@ -18248,13 +18337,11 @@ end # foo.bar[baz] &&= value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9012 +# pkg:gem/prism#lib/prism/node.rb:9691 class Prism::IndexAndWriteNode < ::Prism::Node # Initialize a new IndexAndWriteNode node. # - # @return [IndexAndWriteNode] a new instance of IndexAndWriteNode - # - # source://prism//lib/prism/node.rb#9014 + # pkg:gem/prism#lib/prism/node.rb:9693 sig do params( source: Prism::Source, @@ -18276,80 +18363,78 @@ class Prism::IndexAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9194 + # pkg:gem/prism#lib/prism/node.rb:9883 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9030 + # pkg:gem/prism#lib/prism/node.rb:9709 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#9123 + # pkg:gem/prism#lib/prism/node.rb:9812 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def attribute_write?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9078 + # pkg:gem/prism#lib/prism/node.rb:9767 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader block: BlockArgumentNode? # - # source://prism//lib/prism/node.rb#9139 + # pkg:gem/prism#lib/prism/node.rb:9828 sig { returns(T.nilable(Prism::BlockArgumentNode)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#9158 + # pkg:gem/prism#lib/prism/node.rb:9847 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#9091 + # pkg:gem/prism#lib/prism/node.rb:9780 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9035 + # pkg:gem/prism#lib/prism/node.rb:9714 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#9168 + # pkg:gem/prism#lib/prism/node.rb:9857 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#9126 + # pkg:gem/prism#lib/prism/node.rb:9815 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9050 + # pkg:gem/prism#lib/prism/node.rb:9739 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9040 + # pkg:gem/prism#lib/prism/node.rb:9729 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?, ?operator_loc: Location, ?value: Prism::node) -> IndexAndWriteNode # - # source://prism//lib/prism/node.rb#9055 + # pkg:gem/prism#lib/prism/node.rb:9744 sig do params( node_id: Integer, @@ -18365,124 +18450,122 @@ class Prism::IndexAndWriteNode < ::Prism::Node value: Prism::Node ).returns(Prism::IndexAndWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, receiver: self.receiver, call_operator_loc: self.call_operator_loc, opening_loc: self.opening_loc, arguments: self.arguments, closing_loc: self.closing_loc, block: self.block, operator_loc: self.operator_loc, value: self.value); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9035 + # pkg:gem/prism#lib/prism/node.rb:9749 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode?, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#9063 + # pkg:gem/prism#lib/prism/node.rb:9752 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:9719 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def ignore_visibility?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9083 + # pkg:gem/prism#lib/prism/node.rb:9772 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#9178 + # pkg:gem/prism#lib/prism/node.rb:9867 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#9163 + # pkg:gem/prism#lib/prism/node.rb:9852 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#9110 + # pkg:gem/prism#lib/prism/node.rb:9799 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#9173 + # pkg:gem/prism#lib/prism/node.rb:9862 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#9142 + # pkg:gem/prism#lib/prism/node.rb:9831 sig { returns(Prism::Location) } def operator_loc; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#9088 + # pkg:gem/prism#lib/prism/node.rb:9777 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def safe_navigation?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9068 + # pkg:gem/prism#lib/prism/node.rb:9757 sig { returns(T::Boolean) } def safe_navigation?; end # Save the call_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9105 + # pkg:gem/prism#lib/prism/node.rb:9794 def save_call_operator_loc(repository); end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9134 + # pkg:gem/prism#lib/prism/node.rb:9823 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9118 + # pkg:gem/prism#lib/prism/node.rb:9807 def save_opening_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9150 + # pkg:gem/prism#lib/prism/node.rb:9839 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#9183 + # pkg:gem/prism#lib/prism/node.rb:9872 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#9155 + # pkg:gem/prism#lib/prism/node.rb:9844 sig { returns(Prism::Node) } def value; end # def variable_call?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9073 + # pkg:gem/prism#lib/prism/node.rb:9762 sig { returns(T::Boolean) } def variable_call?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#9188 + # pkg:gem/prism#lib/prism/node.rb:9877 def type; end end end @@ -18492,13 +18575,11 @@ end # foo.bar[baz] += value # ^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9212 +# pkg:gem/prism#lib/prism/node.rb:9901 class Prism::IndexOperatorWriteNode < ::Prism::Node # Initialize a new IndexOperatorWriteNode node. # - # @return [IndexOperatorWriteNode] a new instance of IndexOperatorWriteNode - # - # source://prism//lib/prism/node.rb#9214 + # pkg:gem/prism#lib/prism/node.rb:9903 sig do params( source: Prism::Source, @@ -18521,92 +18602,90 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9393 + # pkg:gem/prism#lib/prism/node.rb:10092 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9231 + # pkg:gem/prism#lib/prism/node.rb:9920 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#9324 + # pkg:gem/prism#lib/prism/node.rb:10023 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def attribute_write?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9279 + # pkg:gem/prism#lib/prism/node.rb:9978 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#9343 + # pkg:gem/prism#lib/prism/node.rb:10042 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#9346 + # pkg:gem/prism#lib/prism/node.rb:10045 sig { returns(Prism::Location) } def binary_operator_loc; end # attr_reader block: BlockArgumentNode? # - # source://prism//lib/prism/node.rb#9340 + # pkg:gem/prism#lib/prism/node.rb:10039 sig { returns(T.nilable(Prism::BlockArgumentNode)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#9362 + # pkg:gem/prism#lib/prism/node.rb:10061 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#9292 + # pkg:gem/prism#lib/prism/node.rb:9991 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9236 + # pkg:gem/prism#lib/prism/node.rb:9925 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#9372 + # pkg:gem/prism#lib/prism/node.rb:10071 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#9327 + # pkg:gem/prism#lib/prism/node.rb:10026 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9251 + # pkg:gem/prism#lib/prism/node.rb:9950 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9241 + # pkg:gem/prism#lib/prism/node.rb:9940 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?, ?binary_operator: Symbol, ?binary_operator_loc: Location, ?value: Prism::node) -> IndexOperatorWriteNode # - # source://prism//lib/prism/node.rb#9256 + # pkg:gem/prism#lib/prism/node.rb:9955 sig do params( node_id: Integer, @@ -18623,124 +18702,122 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node value: Prism::Node ).returns(Prism::IndexOperatorWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, receiver: self.receiver, call_operator_loc: self.call_operator_loc, opening_loc: self.opening_loc, arguments: self.arguments, closing_loc: self.closing_loc, block: self.block, binary_operator: self.binary_operator, binary_operator_loc: self.binary_operator_loc, value: self.value); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9236 + # pkg:gem/prism#lib/prism/node.rb:9960 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode?, binary_operator: Symbol, binary_operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#9264 + # pkg:gem/prism#lib/prism/node.rb:9963 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:9930 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def ignore_visibility?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9284 + # pkg:gem/prism#lib/prism/node.rb:9983 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#9377 + # pkg:gem/prism#lib/prism/node.rb:10076 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#9367 + # pkg:gem/prism#lib/prism/node.rb:10066 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#9311 + # pkg:gem/prism#lib/prism/node.rb:10010 sig { returns(Prism::Location) } def opening_loc; end # Returns the binary operator used to modify the receiver. This method is # deprecated in favor of #binary_operator. # - # source://prism//lib/prism/node_ext.rb#419 + # pkg:gem/prism#lib/prism/node_ext.rb:422 def operator; end # Returns the location of the binary operator used to modify the receiver. # This method is deprecated in favor of #binary_operator_loc. # - # source://prism//lib/prism/node_ext.rb#426 + # pkg:gem/prism#lib/prism/node_ext.rb:429 def operator_loc; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#9289 + # pkg:gem/prism#lib/prism/node.rb:9988 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def safe_navigation?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9269 + # pkg:gem/prism#lib/prism/node.rb:9968 sig { returns(T::Boolean) } def safe_navigation?; end # Save the binary_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9354 + # pkg:gem/prism#lib/prism/node.rb:10053 def save_binary_operator_loc(repository); end # Save the call_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9306 + # pkg:gem/prism#lib/prism/node.rb:10005 def save_call_operator_loc(repository); end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9335 + # pkg:gem/prism#lib/prism/node.rb:10034 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9319 + # pkg:gem/prism#lib/prism/node.rb:10018 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#9382 + # pkg:gem/prism#lib/prism/node.rb:10081 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#9359 + # pkg:gem/prism#lib/prism/node.rb:10058 sig { returns(Prism::Node) } def value; end # def variable_call?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9274 + # pkg:gem/prism#lib/prism/node.rb:9973 sig { returns(T::Boolean) } def variable_call?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#9387 + # pkg:gem/prism#lib/prism/node.rb:10086 def type; end end end @@ -18750,13 +18827,11 @@ end # foo.bar[baz] ||= value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9412 +# pkg:gem/prism#lib/prism/node.rb:10111 class Prism::IndexOrWriteNode < ::Prism::Node # Initialize a new IndexOrWriteNode node. # - # @return [IndexOrWriteNode] a new instance of IndexOrWriteNode - # - # source://prism//lib/prism/node.rb#9414 + # pkg:gem/prism#lib/prism/node.rb:10113 sig do params( source: Prism::Source, @@ -18778,80 +18853,78 @@ class Prism::IndexOrWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9594 + # pkg:gem/prism#lib/prism/node.rb:10303 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9430 + # pkg:gem/prism#lib/prism/node.rb:10129 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#9523 + # pkg:gem/prism#lib/prism/node.rb:10232 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def attribute_write?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9478 + # pkg:gem/prism#lib/prism/node.rb:10187 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader block: BlockArgumentNode? # - # source://prism//lib/prism/node.rb#9539 + # pkg:gem/prism#lib/prism/node.rb:10248 sig { returns(T.nilable(Prism::BlockArgumentNode)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#9558 + # pkg:gem/prism#lib/prism/node.rb:10267 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#9491 + # pkg:gem/prism#lib/prism/node.rb:10200 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9435 + # pkg:gem/prism#lib/prism/node.rb:10134 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#9568 + # pkg:gem/prism#lib/prism/node.rb:10277 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#9526 + # pkg:gem/prism#lib/prism/node.rb:10235 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9450 + # pkg:gem/prism#lib/prism/node.rb:10159 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9440 + # pkg:gem/prism#lib/prism/node.rb:10149 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?, ?operator_loc: Location, ?value: Prism::node) -> IndexOrWriteNode # - # source://prism//lib/prism/node.rb#9455 + # pkg:gem/prism#lib/prism/node.rb:10164 sig do params( node_id: Integer, @@ -18867,124 +18940,122 @@ class Prism::IndexOrWriteNode < ::Prism::Node value: Prism::Node ).returns(Prism::IndexOrWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, receiver: self.receiver, call_operator_loc: self.call_operator_loc, opening_loc: self.opening_loc, arguments: self.arguments, closing_loc: self.closing_loc, block: self.block, operator_loc: self.operator_loc, value: self.value); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9435 + # pkg:gem/prism#lib/prism/node.rb:10169 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode?, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#9463 + # pkg:gem/prism#lib/prism/node.rb:10172 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:10139 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def ignore_visibility?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9483 + # pkg:gem/prism#lib/prism/node.rb:10192 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#9578 + # pkg:gem/prism#lib/prism/node.rb:10287 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#9563 + # pkg:gem/prism#lib/prism/node.rb:10272 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#9510 + # pkg:gem/prism#lib/prism/node.rb:10219 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#9573 + # pkg:gem/prism#lib/prism/node.rb:10282 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#9542 + # pkg:gem/prism#lib/prism/node.rb:10251 sig { returns(Prism::Location) } def operator_loc; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#9488 + # pkg:gem/prism#lib/prism/node.rb:10197 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def safe_navigation?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9468 + # pkg:gem/prism#lib/prism/node.rb:10177 sig { returns(T::Boolean) } def safe_navigation?; end # Save the call_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9505 + # pkg:gem/prism#lib/prism/node.rb:10214 def save_call_operator_loc(repository); end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9534 + # pkg:gem/prism#lib/prism/node.rb:10243 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9518 + # pkg:gem/prism#lib/prism/node.rb:10227 def save_opening_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9550 + # pkg:gem/prism#lib/prism/node.rb:10259 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#9583 + # pkg:gem/prism#lib/prism/node.rb:10292 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#9555 + # pkg:gem/prism#lib/prism/node.rb:10264 sig { returns(Prism::Node) } def value; end # def variable_call?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9473 + # pkg:gem/prism#lib/prism/node.rb:10182 sig { returns(T::Boolean) } def variable_call?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#9588 + # pkg:gem/prism#lib/prism/node.rb:10297 def type; end end end @@ -19002,13 +19073,11 @@ end # for foo[bar] in baz do end # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#9620 +# pkg:gem/prism#lib/prism/node.rb:10329 class Prism::IndexTargetNode < ::Prism::Node # Initialize a new IndexTargetNode node. # - # @return [IndexTargetNode] a new instance of IndexTargetNode - # - # source://prism//lib/prism/node.rb#9622 + # pkg:gem/prism#lib/prism/node.rb:10331 sig do params( source: Prism::Source, @@ -19027,68 +19096,66 @@ class Prism::IndexTargetNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9753 + # pkg:gem/prism#lib/prism/node.rb:10471 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9635 + # pkg:gem/prism#lib/prism/node.rb:10344 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#9708 + # pkg:gem/prism#lib/prism/node.rb:10426 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def attribute_write?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9682 + # pkg:gem/prism#lib/prism/node.rb:10400 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader block: BlockArgumentNode? # - # source://prism//lib/prism/node.rb#9724 + # pkg:gem/prism#lib/prism/node.rb:10442 sig { returns(T.nilable(Prism::BlockArgumentNode)) } def block; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9640 + # pkg:gem/prism#lib/prism/node.rb:10349 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#9732 + # pkg:gem/prism#lib/prism/node.rb:10450 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#9711 + # pkg:gem/prism#lib/prism/node.rb:10429 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9654 + # pkg:gem/prism#lib/prism/node.rb:10372 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9645 + # pkg:gem/prism#lib/prism/node.rb:10363 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?) -> IndexTargetNode # - # source://prism//lib/prism/node.rb#9659 + # pkg:gem/prism#lib/prism/node.rb:10377 sig do params( node_id: Integer, @@ -19101,94 +19168,92 @@ class Prism::IndexTargetNode < ::Prism::Node block: T.nilable(Prism::BlockArgumentNode) ).returns(Prism::IndexTargetNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, receiver: self.receiver, opening_loc: self.opening_loc, arguments: self.arguments, closing_loc: self.closing_loc, block: self.block); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9640 + # pkg:gem/prism#lib/prism/node.rb:10382 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode? } # - # source://prism//lib/prism/node.rb#9667 + # pkg:gem/prism#lib/prism/node.rb:10385 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:10354 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def ignore_visibility?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9687 + # pkg:gem/prism#lib/prism/node.rb:10405 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#9737 + # pkg:gem/prism#lib/prism/node.rb:10455 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#9727 + # pkg:gem/prism#lib/prism/node.rb:10445 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#9695 + # pkg:gem/prism#lib/prism/node.rb:10413 sig { returns(Prism::Location) } def opening_loc; end # attr_reader receiver: Prism::node # - # source://prism//lib/prism/node.rb#9692 + # pkg:gem/prism#lib/prism/node.rb:10410 sig { returns(Prism::Node) } def receiver; end # def safe_navigation?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9672 + # pkg:gem/prism#lib/prism/node.rb:10390 sig { returns(T::Boolean) } def safe_navigation?; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9719 + # pkg:gem/prism#lib/prism/node.rb:10437 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9703 + # pkg:gem/prism#lib/prism/node.rb:10421 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#9742 + # pkg:gem/prism#lib/prism/node.rb:10460 sig { override.returns(Symbol) } def type; end # def variable_call?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9677 + # pkg:gem/prism#lib/prism/node.rb:10395 sig { returns(T::Boolean) } def variable_call?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#9747 + # pkg:gem/prism#lib/prism/node.rb:10465 def type; end end end @@ -19196,20 +19261,18 @@ end # InlineComment objects are the most common. They correspond to comments in # the source file like this one that start with #. # -# source://prism//lib/prism/parse_result.rb#546 +# pkg:gem/prism#lib/prism/parse_result.rb:543 class Prism::InlineComment < ::Prism::Comment # Returns a string representation of this comment. # - # source://prism//lib/prism/parse_result.rb#554 + # pkg:gem/prism#lib/prism/parse_result.rb:551 sig { returns(String) } def inspect; end # Returns true if this comment happens on the same line as other code and # false if the comment is by itself. # - # @return [Boolean] - # - # source://prism//lib/prism/parse_result.rb#549 + # pkg:gem/prism#lib/prism/parse_result.rb:546 sig { override.returns(T::Boolean) } def trailing?; end end @@ -19217,804 +19280,802 @@ end # This visitor is responsible for composing the strings that get returned by # the various #inspect methods defined on each of the nodes. # -# source://prism//lib/prism/inspect_visitor.rb#12 +# pkg:gem/prism#lib/prism/inspect_visitor.rb:15 class Prism::InspectVisitor < ::Prism::Visitor # Initializes a new instance of the InspectVisitor. # - # @return [InspectVisitor] a new instance of InspectVisitor - # - # source://prism//lib/prism/inspect_visitor.rb#35 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:38 sig { params(indent: String).void } - def initialize(indent = T.unsafe(nil)); end + def initialize(indent = ""); end # The list of commands that we need to execute in order to compose the # final string. # - # source://prism//lib/prism/inspect_visitor.rb#32 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:35 def commands; end # Compose the final string. # - # source://prism//lib/prism/inspect_visitor.rb#48 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:51 sig { returns(String) } def compose; end # The current prefix string. # - # source://prism//lib/prism/inspect_visitor.rb#28 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:31 def indent; end # Inspect a AliasGlobalVariableNode node. # - # source://prism//lib/prism/inspect_visitor.rb#77 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:80 def visit_alias_global_variable_node(node); end # Inspect a AliasMethodNode node. # - # source://prism//lib/prism/inspect_visitor.rb#89 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:92 def visit_alias_method_node(node); end # Inspect a AlternationPatternNode node. # - # source://prism//lib/prism/inspect_visitor.rb#101 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:104 def visit_alternation_pattern_node(node); end # Inspect a AndNode node. # - # source://prism//lib/prism/inspect_visitor.rb#113 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:116 def visit_and_node(node); end # Inspect a ArgumentsNode node. # - # source://prism//lib/prism/inspect_visitor.rb#125 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:128 def visit_arguments_node(node); end # Inspect a ArrayNode node. # - # source://prism//lib/prism/inspect_visitor.rb#141 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:144 def visit_array_node(node); end # Inspect a ArrayPatternNode node. # - # source://prism//lib/prism/inspect_visitor.rb#159 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:162 def visit_array_pattern_node(node); end # Inspect a AssocNode node. # - # source://prism//lib/prism/inspect_visitor.rb#198 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:201 def visit_assoc_node(node); end # Inspect a AssocSplatNode node. # - # source://prism//lib/prism/inspect_visitor.rb#210 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:213 def visit_assoc_splat_node(node); end # Inspect a BackReferenceReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#224 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:227 def visit_back_reference_read_node(node); end # Inspect a BeginNode node. # - # source://prism//lib/prism/inspect_visitor.rb#232 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:235 def visit_begin_node(node); end # Inspect a BlockArgumentNode node. # - # source://prism//lib/prism/inspect_visitor.rb#265 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:268 def visit_block_argument_node(node); end # Inspect a BlockLocalVariableNode node. # - # source://prism//lib/prism/inspect_visitor.rb#279 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:282 def visit_block_local_variable_node(node); end # Inspect a BlockNode node. # - # source://prism//lib/prism/inspect_visitor.rb#287 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:290 def visit_block_node(node); end # Inspect a BlockParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#309 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:312 def visit_block_parameter_node(node); end # Inspect a BlockParametersNode node. # - # source://prism//lib/prism/inspect_visitor.rb#323 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:326 def visit_block_parameters_node(node); end # Inspect a BreakNode node. # - # source://prism//lib/prism/inspect_visitor.rb#347 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:350 def visit_break_node(node); end # Inspect a CallAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#361 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:364 def visit_call_and_write_node(node); end # Inspect a CallNode node. # - # source://prism//lib/prism/inspect_visitor.rb#381 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:384 def visit_call_node(node); end # Inspect a CallOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#411 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:415 def visit_call_operator_write_node(node); end # Inspect a CallOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#432 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:436 def visit_call_or_write_node(node); end # Inspect a CallTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#452 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:456 def visit_call_target_node(node); end # Inspect a CapturePatternNode node. # - # source://prism//lib/prism/inspect_visitor.rb#464 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:468 def visit_capture_pattern_node(node); end # Inspect a CaseMatchNode node. # - # source://prism//lib/prism/inspect_visitor.rb#476 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:480 def visit_case_match_node(node); end # Inspect a CaseNode node. # - # source://prism//lib/prism/inspect_visitor.rb#506 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:510 def visit_case_node(node); end # Inspect a ClassNode node. # - # source://prism//lib/prism/inspect_visitor.rb#536 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:540 def visit_class_node(node); end # Inspect a ClassVariableAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#562 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:566 def visit_class_variable_and_write_node(node); end # Inspect a ClassVariableOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#574 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:578 def visit_class_variable_operator_write_node(node); end # Inspect a ClassVariableOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#587 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:591 def visit_class_variable_or_write_node(node); end # Inspect a ClassVariableReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#599 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:603 def visit_class_variable_read_node(node); end # Inspect a ClassVariableTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#607 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:611 def visit_class_variable_target_node(node); end # Inspect a ClassVariableWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#615 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:619 def visit_class_variable_write_node(node); end # Inspect a ConstantAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#627 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:631 def visit_constant_and_write_node(node); end # Inspect a ConstantOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#639 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:643 def visit_constant_operator_write_node(node); end # Inspect a ConstantOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#652 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:656 def visit_constant_or_write_node(node); end # Inspect a ConstantPathAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#664 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:668 def visit_constant_path_and_write_node(node); end # Inspect a ConstantPathNode node. # - # source://prism//lib/prism/inspect_visitor.rb#676 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:680 def visit_constant_path_node(node); end # Inspect a ConstantPathOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#696 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:700 def visit_constant_path_operator_write_node(node); end # Inspect a ConstantPathOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#709 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:713 def visit_constant_path_or_write_node(node); end # Inspect a ConstantPathTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#721 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:725 def visit_constant_path_target_node(node); end # Inspect a ConstantPathWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#741 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:745 def visit_constant_path_write_node(node); end # Inspect a ConstantReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#753 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:757 def visit_constant_read_node(node); end # Inspect a ConstantTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#761 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:765 def visit_constant_target_node(node); end # Inspect a ConstantWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#769 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:773 def visit_constant_write_node(node); end # Inspect a DefNode node. # - # source://prism//lib/prism/inspect_visitor.rb#781 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:785 def visit_def_node(node); end # Inspect a DefinedNode node. # - # source://prism//lib/prism/inspect_visitor.rb#815 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:819 def visit_defined_node(node); end # Inspect a ElseNode node. # - # source://prism//lib/prism/inspect_visitor.rb#827 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:831 def visit_else_node(node); end # Inspect a EmbeddedStatementsNode node. # - # source://prism//lib/prism/inspect_visitor.rb#842 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:846 def visit_embedded_statements_node(node); end # Inspect a EmbeddedVariableNode node. # - # source://prism//lib/prism/inspect_visitor.rb#857 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:861 def visit_embedded_variable_node(node); end # Inspect a EnsureNode node. # - # source://prism//lib/prism/inspect_visitor.rb#867 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:871 def visit_ensure_node(node); end # Inspect a FalseNode node. # - # source://prism//lib/prism/inspect_visitor.rb#882 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:886 def visit_false_node(node); end # Inspect a FindPatternNode node. # - # source://prism//lib/prism/inspect_visitor.rb#889 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:893 def visit_find_pattern_node(node); end # Inspect a FlipFlopNode node. # - # source://prism//lib/prism/inspect_visitor.rb#917 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:921 def visit_flip_flop_node(node); end # Inspect a FloatNode node. # - # source://prism//lib/prism/inspect_visitor.rb#937 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:941 def visit_float_node(node); end # Inspect a ForNode node. # - # source://prism//lib/prism/inspect_visitor.rb#945 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:949 def visit_for_node(node); end # Inspect a ForwardingArgumentsNode node. # - # source://prism//lib/prism/inspect_visitor.rb#966 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:970 def visit_forwarding_arguments_node(node); end # Inspect a ForwardingParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#973 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:977 def visit_forwarding_parameter_node(node); end # Inspect a ForwardingSuperNode node. # - # source://prism//lib/prism/inspect_visitor.rb#980 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:984 def visit_forwarding_super_node(node); end # Inspect a GlobalVariableAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#993 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:997 def visit_global_variable_and_write_node(node); end # Inspect a GlobalVariableOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1005 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1009 def visit_global_variable_operator_write_node(node); end # Inspect a GlobalVariableOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1018 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1022 def visit_global_variable_or_write_node(node); end # Inspect a GlobalVariableReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1030 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1034 def visit_global_variable_read_node(node); end # Inspect a GlobalVariableTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1038 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1042 def visit_global_variable_target_node(node); end # Inspect a GlobalVariableWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1046 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1050 def visit_global_variable_write_node(node); end # Inspect a HashNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1058 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1062 def visit_hash_node(node); end # Inspect a HashPatternNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1076 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1080 def visit_hash_pattern_node(node); end # Inspect a IfNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1106 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1110 def visit_if_node(node); end # Inspect a ImaginaryNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1130 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1134 def visit_imaginary_node(node); end # Inspect a ImplicitNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1139 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1143 def visit_implicit_node(node); end # Inspect a ImplicitRestNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1148 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1152 def visit_implicit_rest_node(node); end # Inspect a InNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1155 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1159 def visit_in_node(node); end # Inspect a IndexAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1172 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1176 def visit_index_and_write_node(node); end # Inspect a IndexOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1203 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1207 def visit_index_operator_write_node(node); end # Inspect a IndexOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1235 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1239 def visit_index_or_write_node(node); end # Inspect a IndexTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1266 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1270 def visit_index_target_node(node); end # Inspect a InstanceVariableAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1289 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1293 def visit_instance_variable_and_write_node(node); end # Inspect a InstanceVariableOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1301 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1305 def visit_instance_variable_operator_write_node(node); end # Inspect a InstanceVariableOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1314 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1318 def visit_instance_variable_or_write_node(node); end # Inspect a InstanceVariableReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1326 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1330 def visit_instance_variable_read_node(node); end # Inspect a InstanceVariableTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1334 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1338 def visit_instance_variable_target_node(node); end # Inspect a InstanceVariableWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1342 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1346 def visit_instance_variable_write_node(node); end # Inspect a IntegerNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1354 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1358 def visit_integer_node(node); end # Inspect a InterpolatedMatchLastLineNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1362 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1366 def visit_interpolated_match_last_line_node(node); end # Inspect a InterpolatedRegularExpressionNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1380 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1384 def visit_interpolated_regular_expression_node(node); end # Inspect a InterpolatedStringNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1398 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1402 def visit_interpolated_string_node(node); end # Inspect a InterpolatedSymbolNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1416 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1420 def visit_interpolated_symbol_node(node); end # Inspect a InterpolatedXStringNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1434 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1438 def visit_interpolated_x_string_node(node); end # Inspect a ItLocalVariableReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1452 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1456 def visit_it_local_variable_read_node(node); end # Inspect a ItParametersNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1459 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1463 def visit_it_parameters_node(node); end # Inspect a KeywordHashNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1466 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1470 def visit_keyword_hash_node(node); end # Inspect a KeywordRestParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1482 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1486 def visit_keyword_rest_parameter_node(node); end # Inspect a LambdaNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1496 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1500 def visit_lambda_node(node); end # Inspect a LocalVariableAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1519 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1523 def visit_local_variable_and_write_node(node); end # Inspect a LocalVariableOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1532 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1536 def visit_local_variable_operator_write_node(node); end # Inspect a LocalVariableOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1546 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1550 def visit_local_variable_or_write_node(node); end # Inspect a LocalVariableReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1559 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1563 def visit_local_variable_read_node(node); end # Inspect a LocalVariableTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1568 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1572 def visit_local_variable_target_node(node); end # Inspect a LocalVariableWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1577 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1581 def visit_local_variable_write_node(node); end # Inspect a MatchLastLineNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1590 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1594 def visit_match_last_line_node(node); end # Inspect a MatchPredicateNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1601 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1605 def visit_match_predicate_node(node); end # Inspect a MatchRequiredNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1613 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1617 def visit_match_required_node(node); end # Inspect a MatchWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1625 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1629 def visit_match_write_node(node); end # Inspect a MissingNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1643 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1647 def visit_missing_node(node); end # Inspect a ModuleNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1650 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1654 def visit_module_node(node); end # Inspect a MultiTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1669 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1673 def visit_multi_target_node(node); end # Inspect a MultiWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1702 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1706 def visit_multi_write_node(node); end # Inspect a NextNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1738 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1742 def visit_next_node(node); end # Inspect a NilNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1752 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1756 def visit_nil_node(node); end # Inspect a NoKeywordsParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1759 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1763 def visit_no_keywords_parameter_node(node); end # Inspect a NumberedParametersNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1768 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1772 def visit_numbered_parameters_node(node); end # Inspect a NumberedReferenceReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1776 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1780 def visit_numbered_reference_read_node(node); end # Inspect a OptionalKeywordParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1784 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1788 def visit_optional_keyword_parameter_node(node); end # Inspect a OptionalParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1795 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1799 def visit_optional_parameter_node(node); end # Inspect a OrNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1807 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1811 def visit_or_node(node); end # Inspect a ParametersNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1819 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1823 def visit_parameters_node(node); end # Inspect a ParenthesesNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1880 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1884 def visit_parentheses_node(node); end # Inspect a PinnedExpressionNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1895 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1899 def visit_pinned_expression_node(node); end # Inspect a PinnedVariableNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1907 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1911 def visit_pinned_variable_node(node); end # Inspect a PostExecutionNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1917 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1921 def visit_post_execution_node(node); end # Inspect a PreExecutionNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1933 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1937 def visit_pre_execution_node(node); end # Inspect a ProgramNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1949 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1953 def visit_program_node(node); end # Inspect a RangeNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1959 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1963 def visit_range_node(node); end # Inspect a RationalNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1979 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1983 def visit_rational_node(node); end # Inspect a RedoNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1988 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1992 def visit_redo_node(node); end # Inspect a RegularExpressionNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1995 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:1999 def visit_regular_expression_node(node); end # Inspect a RequiredKeywordParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2006 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2010 def visit_required_keyword_parameter_node(node); end # Inspect a RequiredParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2015 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2019 def visit_required_parameter_node(node); end # Inspect a RescueModifierNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2023 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2027 def visit_rescue_modifier_node(node); end # Inspect a RescueNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2035 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2039 def visit_rescue_node(node); end # Inspect a RestParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2072 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2076 def visit_rest_parameter_node(node); end # Inspect a RetryNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2086 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2090 def visit_retry_node(node); end # Inspect a ReturnNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2093 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2097 def visit_return_node(node); end # Inspect a SelfNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2107 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2111 def visit_self_node(node); end # Inspect a ShareableConstantNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2114 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2118 def visit_shareable_constant_node(node); end # Inspect a SingletonClassNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2123 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2127 def visit_singleton_class_node(node); end # Inspect a SourceEncodingNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2142 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2146 def visit_source_encoding_node(node); end # Inspect a SourceFileNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2149 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2153 def visit_source_file_node(node); end # Inspect a SourceLineNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2157 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2161 def visit_source_line_node(node); end # Inspect a SplatNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2164 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2168 def visit_splat_node(node); end # Inspect a StatementsNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2178 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2182 def visit_statements_node(node); end # Inspect a StringNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2194 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2198 def visit_string_node(node); end # Inspect a SuperNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2205 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2209 def visit_super_node(node); end # Inspect a SymbolNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2227 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2231 def visit_symbol_node(node); end # Inspect a TrueNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2238 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2242 def visit_true_node(node); end # Inspect a UndefNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2245 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2249 def visit_undef_node(node); end # Inspect a UnlessNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2262 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2266 def visit_unless_node(node); end # Inspect a UntilNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2286 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2290 def visit_until_node(node); end # Inspect a WhenNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2304 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2308 def visit_when_node(node); end # Inspect a WhileNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2328 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2332 def visit_while_node(node); end # Inspect a XStringNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2346 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2350 def visit_x_string_node(node); end # Inspect a YieldNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2357 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2361 def visit_yield_node(node); end private # Compose a string representing the given inner location field. # - # source://prism//lib/prism/inspect_visitor.rb#2381 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2385 def inspect_location(location); end # Compose a header for the given node. # - # source://prism//lib/prism/inspect_visitor.rb#2375 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:2379 def inspect_node(name, node); end class << self # Compose an inspect string for the given node. # - # source://prism//lib/prism/inspect_visitor.rb#41 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:44 sig { params(node: Prism::Node).returns(String) } def compose(node); end end @@ -20025,14 +20086,12 @@ end # when we hit an element in that list. In this case, we have a special # command that replaces the subsequent indent with the given value. # -# source://prism//lib/prism/inspect_visitor.rb#17 +# pkg:gem/prism#lib/prism/inspect_visitor.rb:20 class Prism::InspectVisitor::Replace - # @return [Replace] a new instance of Replace - # - # source://prism//lib/prism/inspect_visitor.rb#20 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:23 def initialize(value); end - # source://prism//lib/prism/inspect_visitor.rb#18 + # pkg:gem/prism#lib/prism/inspect_visitor.rb:21 def value; end end @@ -20041,13 +20100,11 @@ end # @target &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9768 +# pkg:gem/prism#lib/prism/node.rb:10486 class Prism::InstanceVariableAndWriteNode < ::Prism::Node # Initialize a new InstanceVariableAndWriteNode node. # - # @return [InstanceVariableAndWriteNode] a new instance of InstanceVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#9770 + # pkg:gem/prism#lib/prism/node.rb:10488 sig do params( source: Prism::Source, @@ -20065,36 +20122,36 @@ class Prism::InstanceVariableAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9868 + # pkg:gem/prism#lib/prism/node.rb:10593 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9782 + # pkg:gem/prism#lib/prism/node.rb:10500 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9787 + # pkg:gem/prism#lib/prism/node.rb:10505 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9797 + # pkg:gem/prism#lib/prism/node.rb:10522 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9792 + # pkg:gem/prism#lib/prism/node.rb:10517 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> InstanceVariableAndWriteNode # - # source://prism//lib/prism/node.rb#9802 + # pkg:gem/prism#lib/prism/node.rb:10527 sig do params( node_id: Integer, @@ -20106,85 +20163,89 @@ class Prism::InstanceVariableAndWriteNode < ::Prism::Node value: Prism::Node ).returns(Prism::InstanceVariableAndWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, operator_loc: self.operator_loc, value: self.value); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9787 + # pkg:gem/prism#lib/prism/node.rb:10532 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#9810 + # pkg:gem/prism#lib/prism/node.rb:10535 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#218 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:219 def desugar; end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:10510 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#9852 + # pkg:gem/prism#lib/prism/node.rb:10577 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#9815 + # pkg:gem/prism#lib/prism/node.rb:10540 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#9818 + # pkg:gem/prism#lib/prism/node.rb:10543 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#9847 + # pkg:gem/prism#lib/prism/node.rb:10572 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#9831 + # pkg:gem/prism#lib/prism/node.rb:10556 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9826 + # pkg:gem/prism#lib/prism/node.rb:10551 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9839 + # pkg:gem/prism#lib/prism/node.rb:10564 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#9857 + # pkg:gem/prism#lib/prism/node.rb:10582 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#9844 + # pkg:gem/prism#lib/prism/node.rb:10569 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#9862 + # pkg:gem/prism#lib/prism/node.rb:10587 def type; end end end @@ -20194,13 +20255,11 @@ end # @target += value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9881 +# pkg:gem/prism#lib/prism/node.rb:10606 class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # Initialize a new InstanceVariableOperatorWriteNode node. # - # @return [InstanceVariableOperatorWriteNode] a new instance of InstanceVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#9883 + # pkg:gem/prism#lib/prism/node.rb:10608 sig do params( source: Prism::Source, @@ -20219,48 +20278,48 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9980 + # pkg:gem/prism#lib/prism/node.rb:10712 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9896 + # pkg:gem/prism#lib/prism/node.rb:10621 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#9961 + # pkg:gem/prism#lib/prism/node.rb:10693 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#9945 + # pkg:gem/prism#lib/prism/node.rb:10677 sig { returns(Prism::Location) } def binary_operator_loc; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9901 + # pkg:gem/prism#lib/prism/node.rb:10626 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9911 + # pkg:gem/prism#lib/prism/node.rb:10643 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9906 + # pkg:gem/prism#lib/prism/node.rb:10638 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> InstanceVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#9916 + # pkg:gem/prism#lib/prism/node.rb:10648 sig do params( node_id: Integer, @@ -20273,85 +20332,89 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node binary_operator: Symbol ).returns(Prism::InstanceVariableOperatorWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, binary_operator_loc: self.binary_operator_loc, value: self.value, binary_operator: self.binary_operator); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#9901 + # pkg:gem/prism#lib/prism/node.rb:10653 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } # - # source://prism//lib/prism/node.rb#9924 + # pkg:gem/prism#lib/prism/node.rb:10656 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#230 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:231 def desugar; end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:10631 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#9964 + # pkg:gem/prism#lib/prism/node.rb:10696 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#9929 + # pkg:gem/prism#lib/prism/node.rb:10661 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#9932 + # pkg:gem/prism#lib/prism/node.rb:10664 sig { returns(Prism::Location) } def name_loc; end # Returns the binary operator used to modify the receiver. This method is # deprecated in favor of #binary_operator. # - # source://prism//lib/prism/node_ext.rb#435 + # pkg:gem/prism#lib/prism/node_ext.rb:438 def operator; end # Returns the location of the binary operator used to modify the receiver. # This method is deprecated in favor of #binary_operator_loc. # - # source://prism//lib/prism/node_ext.rb#442 + # pkg:gem/prism#lib/prism/node_ext.rb:445 def operator_loc; end # Save the binary_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9953 + # pkg:gem/prism#lib/prism/node.rb:10685 def save_binary_operator_loc(repository); end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#9940 + # pkg:gem/prism#lib/prism/node.rb:10672 def save_name_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#9969 + # pkg:gem/prism#lib/prism/node.rb:10701 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#9958 + # pkg:gem/prism#lib/prism/node.rb:10690 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#9974 + # pkg:gem/prism#lib/prism/node.rb:10706 def type; end end end @@ -20361,13 +20424,11 @@ end # @target ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9994 +# pkg:gem/prism#lib/prism/node.rb:10726 class Prism::InstanceVariableOrWriteNode < ::Prism::Node # Initialize a new InstanceVariableOrWriteNode node. # - # @return [InstanceVariableOrWriteNode] a new instance of InstanceVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#9996 + # pkg:gem/prism#lib/prism/node.rb:10728 sig do params( source: Prism::Source, @@ -20385,36 +20446,36 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10094 + # pkg:gem/prism#lib/prism/node.rb:10833 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10008 + # pkg:gem/prism#lib/prism/node.rb:10740 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10013 + # pkg:gem/prism#lib/prism/node.rb:10745 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10023 + # pkg:gem/prism#lib/prism/node.rb:10762 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10018 + # pkg:gem/prism#lib/prism/node.rb:10757 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> InstanceVariableOrWriteNode # - # source://prism//lib/prism/node.rb#10028 + # pkg:gem/prism#lib/prism/node.rb:10767 sig do params( node_id: Integer, @@ -20426,85 +20487,89 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node value: Prism::Node ).returns(Prism::InstanceVariableOrWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, operator_loc: self.operator_loc, value: self.value); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10013 + # pkg:gem/prism#lib/prism/node.rb:10772 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#10036 + # pkg:gem/prism#lib/prism/node.rb:10775 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#224 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:225 def desugar; end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:10750 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#10078 + # pkg:gem/prism#lib/prism/node.rb:10817 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#10041 + # pkg:gem/prism#lib/prism/node.rb:10780 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#10044 + # pkg:gem/prism#lib/prism/node.rb:10783 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#10073 + # pkg:gem/prism#lib/prism/node.rb:10812 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#10057 + # pkg:gem/prism#lib/prism/node.rb:10796 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10052 + # pkg:gem/prism#lib/prism/node.rb:10791 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10065 + # pkg:gem/prism#lib/prism/node.rb:10804 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#10083 + # pkg:gem/prism#lib/prism/node.rb:10822 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#10070 + # pkg:gem/prism#lib/prism/node.rb:10809 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10088 + # pkg:gem/prism#lib/prism/node.rb:10827 def type; end end end @@ -20514,49 +20579,47 @@ end # @foo # ^^^^ # -# source://prism//lib/prism/node.rb#10107 +# pkg:gem/prism#lib/prism/node.rb:10846 class Prism::InstanceVariableReadNode < ::Prism::Node # Initialize a new InstanceVariableReadNode node. # - # @return [InstanceVariableReadNode] a new instance of InstanceVariableReadNode - # - # source://prism//lib/prism/node.rb#10109 + # pkg:gem/prism#lib/prism/node.rb:10848 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10174 + # pkg:gem/prism#lib/prism/node.rb:10919 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10118 + # pkg:gem/prism#lib/prism/node.rb:10857 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10123 + # pkg:gem/prism#lib/prism/node.rb:10862 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10133 + # pkg:gem/prism#lib/prism/node.rb:10878 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10128 + # pkg:gem/prism#lib/prism/node.rb:10873 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> InstanceVariableReadNode # - # source://prism//lib/prism/node.rb#10138 + # pkg:gem/prism#lib/prism/node.rb:10883 sig do params( node_id: Integer, @@ -20565,27 +20628,31 @@ class Prism::InstanceVariableReadNode < ::Prism::Node name: Symbol ).returns(Prism::InstanceVariableReadNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10123 + # pkg:gem/prism#lib/prism/node.rb:10888 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#10146 + # pkg:gem/prism#lib/prism/node.rb:10891 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:10867 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#10158 + # pkg:gem/prism#lib/prism/node.rb:10903 sig { override.returns(String) } def inspect; end @@ -20595,20 +20662,20 @@ class Prism::InstanceVariableReadNode < ::Prism::Node # # @_test # name `:@_test` # - # source://prism//lib/prism/node.rb#10155 + # pkg:gem/prism#lib/prism/node.rb:10900 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#10163 + # pkg:gem/prism#lib/prism/node.rb:10908 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10168 + # pkg:gem/prism#lib/prism/node.rb:10913 def type; end end end @@ -20618,49 +20685,47 @@ end # @foo, @bar = baz # ^^^^ ^^^^ # -# source://prism//lib/prism/node.rb#10184 +# pkg:gem/prism#lib/prism/node.rb:10929 class Prism::InstanceVariableTargetNode < ::Prism::Node # Initialize a new InstanceVariableTargetNode node. # - # @return [InstanceVariableTargetNode] a new instance of InstanceVariableTargetNode - # - # source://prism//lib/prism/node.rb#10186 + # pkg:gem/prism#lib/prism/node.rb:10931 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10247 + # pkg:gem/prism#lib/prism/node.rb:10998 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10195 + # pkg:gem/prism#lib/prism/node.rb:10940 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10200 + # pkg:gem/prism#lib/prism/node.rb:10945 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10210 + # pkg:gem/prism#lib/prism/node.rb:10961 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10205 + # pkg:gem/prism#lib/prism/node.rb:10956 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> InstanceVariableTargetNode # - # source://prism//lib/prism/node.rb#10215 + # pkg:gem/prism#lib/prism/node.rb:10966 sig do params( node_id: Integer, @@ -20669,46 +20734,50 @@ class Prism::InstanceVariableTargetNode < ::Prism::Node name: Symbol ).returns(Prism::InstanceVariableTargetNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10200 + # pkg:gem/prism#lib/prism/node.rb:10971 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#10223 + # pkg:gem/prism#lib/prism/node.rb:10974 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:10950 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#10231 + # pkg:gem/prism#lib/prism/node.rb:10982 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#10228 + # pkg:gem/prism#lib/prism/node.rb:10979 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#10236 + # pkg:gem/prism#lib/prism/node.rb:10987 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10241 + # pkg:gem/prism#lib/prism/node.rb:10992 def type; end end end @@ -20718,13 +20787,11 @@ end # @foo = 1 # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#10257 +# pkg:gem/prism#lib/prism/node.rb:11008 class Prism::InstanceVariableWriteNode < ::Prism::Node # Initialize a new InstanceVariableWriteNode node. # - # @return [InstanceVariableWriteNode] a new instance of InstanceVariableWriteNode - # - # source://prism//lib/prism/node.rb#10259 + # pkg:gem/prism#lib/prism/node.rb:11010 sig do params( source: Prism::Source, @@ -20742,36 +20809,36 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10373 + # pkg:gem/prism#lib/prism/node.rb:11131 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10271 + # pkg:gem/prism#lib/prism/node.rb:11022 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10276 + # pkg:gem/prism#lib/prism/node.rb:11027 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10286 + # pkg:gem/prism#lib/prism/node.rb:11044 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10281 + # pkg:gem/prism#lib/prism/node.rb:11039 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> InstanceVariableWriteNode # - # source://prism//lib/prism/node.rb#10291 + # pkg:gem/prism#lib/prism/node.rb:11049 sig do params( node_id: Integer, @@ -20783,27 +20850,31 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node operator_loc: Prism::Location ).returns(Prism::InstanceVariableWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, value: self.value, operator_loc: self.operator_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10276 + # pkg:gem/prism#lib/prism/node.rb:11054 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#10299 + # pkg:gem/prism#lib/prism/node.rb:11057 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:11032 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#10357 + # pkg:gem/prism#lib/prism/node.rb:11115 sig { override.returns(String) } def inspect; end @@ -20813,7 +20884,7 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # # @_foo = "bar" # name `@_foo` # - # source://prism//lib/prism/node.rb#10308 + # pkg:gem/prism#lib/prism/node.rb:11066 sig { returns(Symbol) } def name; end @@ -20822,13 +20893,13 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # @_x = 1 # ^^^ # - # source://prism//lib/prism/node.rb#10314 + # pkg:gem/prism#lib/prism/node.rb:11072 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#10352 + # pkg:gem/prism#lib/prism/node.rb:11110 sig { returns(String) } def operator; end @@ -20837,25 +20908,25 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # @x = y # ^ # - # source://prism//lib/prism/node.rb#10339 + # pkg:gem/prism#lib/prism/node.rb:11097 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10322 + # pkg:gem/prism#lib/prism/node.rb:11080 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10347 + # pkg:gem/prism#lib/prism/node.rb:11105 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#10362 + # pkg:gem/prism#lib/prism/node.rb:11120 sig { override.returns(Symbol) } def type; end @@ -20867,41 +20938,41 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # @_x = 1234 # ^^^^ # - # source://prism//lib/prism/node.rb#10333 + # pkg:gem/prism#lib/prism/node.rb:11091 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10367 + # pkg:gem/prism#lib/prism/node.rb:11125 def type; end end end # Flags for integer nodes that correspond to the base of the integer. # -# source://prism//lib/prism/node.rb#18507 +# pkg:gem/prism#lib/prism/node.rb:19828 module Prism::IntegerBaseFlags; end # 0b prefix # -# source://prism//lib/prism/node.rb#18509 +# pkg:gem/prism#lib/prism/node.rb:19830 Prism::IntegerBaseFlags::BINARY = T.let(T.unsafe(nil), Integer) # 0d or no prefix # -# source://prism//lib/prism/node.rb#18512 +# pkg:gem/prism#lib/prism/node.rb:19833 Prism::IntegerBaseFlags::DECIMAL = T.let(T.unsafe(nil), Integer) # 0x prefix # -# source://prism//lib/prism/node.rb#18518 +# pkg:gem/prism#lib/prism/node.rb:19839 Prism::IntegerBaseFlags::HEXADECIMAL = T.let(T.unsafe(nil), Integer) # 0o or 0 prefix # -# source://prism//lib/prism/node.rb#18515 +# pkg:gem/prism#lib/prism/node.rb:19836 Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) # Represents an integer number literal. @@ -20909,13 +20980,11 @@ Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) # 1 # ^ # -# source://prism//lib/prism/node.rb#10386 +# pkg:gem/prism#lib/prism/node.rb:11144 class Prism::IntegerNode < ::Prism::Node # Initialize a new IntegerNode node. # - # @return [IntegerNode] a new instance of IntegerNode - # - # source://prism//lib/prism/node.rb#10388 + # pkg:gem/prism#lib/prism/node.rb:11146 sig do params( source: Prism::Source, @@ -20930,44 +20999,42 @@ class Prism::IntegerNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10469 + # pkg:gem/prism#lib/prism/node.rb:11233 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10397 + # pkg:gem/prism#lib/prism/node.rb:11155 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def binary?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10430 + # pkg:gem/prism#lib/prism/node.rb:11194 sig { returns(T::Boolean) } def binary?; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10402 + # pkg:gem/prism#lib/prism/node.rb:11160 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10412 + # pkg:gem/prism#lib/prism/node.rb:11176 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10407 + # pkg:gem/prism#lib/prism/node.rb:11171 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Integer) -> IntegerNode # - # source://prism//lib/prism/node.rb#10417 + # pkg:gem/prism#lib/prism/node.rb:11181 sig do params( node_id: Integer, @@ -20976,70 +21043,68 @@ class Prism::IntegerNode < ::Prism::Node value: Integer ).returns(Prism::IntegerNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, value: self.value); end # def decimal?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10435 + # pkg:gem/prism#lib/prism/node.rb:11199 sig { returns(T::Boolean) } def decimal?; end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10402 + # pkg:gem/prism#lib/prism/node.rb:11186 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Integer } # - # source://prism//lib/prism/node.rb#10425 + # pkg:gem/prism#lib/prism/node.rb:11189 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:11165 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def hexadecimal?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10445 + # pkg:gem/prism#lib/prism/node.rb:11209 sig { returns(T::Boolean) } def hexadecimal?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#10453 + # pkg:gem/prism#lib/prism/node.rb:11217 sig { override.returns(String) } def inspect; end # def octal?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10440 + # pkg:gem/prism#lib/prism/node.rb:11204 sig { returns(T::Boolean) } def octal?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#10458 + # pkg:gem/prism#lib/prism/node.rb:11222 sig { override.returns(Symbol) } def type; end # The value of the integer literal as a number. # - # source://prism//lib/prism/node.rb#10450 + # pkg:gem/prism#lib/prism/node.rb:11214 sig { returns(Integer) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10463 + # pkg:gem/prism#lib/prism/node.rb:11227 def type; end end end @@ -21049,15 +21114,13 @@ end # if /foo #{bar} baz/ then end # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10480 +# pkg:gem/prism#lib/prism/node.rb:11244 class Prism::InterpolatedMatchLastLineNode < ::Prism::Node include ::Prism::RegularExpressionOptions # Initialize a new InterpolatedMatchLastLineNode node. # - # @return [InterpolatedMatchLastLineNode] a new instance of InterpolatedMatchLastLineNode - # - # source://prism//lib/prism/node.rb#10482 + # pkg:gem/prism#lib/prism/node.rb:11246 sig do params( source: Prism::Source, @@ -21074,56 +21137,54 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10636 + # pkg:gem/prism#lib/prism/node.rb:11407 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10493 + # pkg:gem/prism#lib/prism/node.rb:11257 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def ascii_8bit?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10551 + # pkg:gem/prism#lib/prism/node.rb:11322 sig { returns(T::Boolean) } def ascii_8bit?; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10498 + # pkg:gem/prism#lib/prism/node.rb:11262 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#10615 + # pkg:gem/prism#lib/prism/node.rb:11386 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#10597 + # pkg:gem/prism#lib/prism/node.rb:11368 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10508 + # pkg:gem/prism#lib/prism/node.rb:11279 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10503 + # pkg:gem/prism#lib/prism/node.rb:11274 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location) -> InterpolatedMatchLastLineNode # - # source://prism//lib/prism/node.rb#10513 + # pkg:gem/prism#lib/prism/node.rb:11284 sig do params( node_id: Integer, @@ -21134,34 +21195,34 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node closing_loc: Prism::Location ).returns(Prism::InterpolatedMatchLastLineNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, opening_loc: self.opening_loc, parts: self.parts, closing_loc: self.closing_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10498 + # pkg:gem/prism#lib/prism/node.rb:11289 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location } # - # source://prism//lib/prism/node.rb#10521 + # pkg:gem/prism#lib/prism/node.rb:11292 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # def euc_jp?: () -> bool + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @return [Boolean] + # pkg:gem/prism#lib/prism/node.rb:11267 + def each_child_node; end + + # def euc_jp?: () -> bool # - # source://prism//lib/prism/node.rb#10546 + # pkg:gem/prism#lib/prism/node.rb:11317 sig { returns(T::Boolean) } def euc_jp?; end # def extended?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10531 + # pkg:gem/prism#lib/prism/node.rb:11302 sig { returns(T::Boolean) } def extended?; end @@ -21170,70 +21231,58 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # def forced_binary_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10571 + # pkg:gem/prism#lib/prism/node.rb:11342 sig { returns(T::Boolean) } def forced_binary_encoding?; end # def forced_us_ascii_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10576 + # pkg:gem/prism#lib/prism/node.rb:11347 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end # def forced_utf8_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10566 + # pkg:gem/prism#lib/prism/node.rb:11337 sig { returns(T::Boolean) } def forced_utf8_encoding?; end # def ignore_case?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10526 + # pkg:gem/prism#lib/prism/node.rb:11297 sig { returns(T::Boolean) } def ignore_case?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#10620 + # pkg:gem/prism#lib/prism/node.rb:11391 sig { override.returns(String) } def inspect; end # def multi_line?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10536 + # pkg:gem/prism#lib/prism/node.rb:11307 sig { returns(T::Boolean) } def multi_line?; end - # source://prism//lib/prism/parse_result/newlines.rb#121 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:122 def newline_flag!(lines); end # def once?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10541 + # pkg:gem/prism#lib/prism/node.rb:11312 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#10610 + # pkg:gem/prism#lib/prism/node.rb:11381 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#10581 + # pkg:gem/prism#lib/prism/node.rb:11352 sig { returns(Prism::Location) } def opening_loc; end @@ -21242,48 +21291,44 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#10594 + # pkg:gem/prism#lib/prism/node.rb:11365 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10605 + # pkg:gem/prism#lib/prism/node.rb:11376 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10589 + # pkg:gem/prism#lib/prism/node.rb:11360 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#10625 + # pkg:gem/prism#lib/prism/node.rb:11396 sig { override.returns(Symbol) } def type; end # def utf_8?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10561 + # pkg:gem/prism#lib/prism/node.rb:11332 sig { returns(T::Boolean) } def utf_8?; end # def windows_31j?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10556 + # pkg:gem/prism#lib/prism/node.rb:11327 sig { returns(T::Boolean) } def windows_31j?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10630 + # pkg:gem/prism#lib/prism/node.rb:11401 def type; end end end @@ -21293,15 +21338,13 @@ end # /foo #{bar} baz/ # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10650 +# pkg:gem/prism#lib/prism/node.rb:11421 class Prism::InterpolatedRegularExpressionNode < ::Prism::Node include ::Prism::RegularExpressionOptions # Initialize a new InterpolatedRegularExpressionNode node. # - # @return [InterpolatedRegularExpressionNode] a new instance of InterpolatedRegularExpressionNode - # - # source://prism//lib/prism/node.rb#10652 + # pkg:gem/prism#lib/prism/node.rb:11423 sig do params( source: Prism::Source, @@ -21318,56 +21361,54 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10806 + # pkg:gem/prism#lib/prism/node.rb:11584 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10663 + # pkg:gem/prism#lib/prism/node.rb:11434 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def ascii_8bit?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10721 + # pkg:gem/prism#lib/prism/node.rb:11499 sig { returns(T::Boolean) } def ascii_8bit?; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10668 + # pkg:gem/prism#lib/prism/node.rb:11439 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#10785 + # pkg:gem/prism#lib/prism/node.rb:11563 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#10767 + # pkg:gem/prism#lib/prism/node.rb:11545 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10678 + # pkg:gem/prism#lib/prism/node.rb:11456 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10673 + # pkg:gem/prism#lib/prism/node.rb:11451 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location) -> InterpolatedRegularExpressionNode # - # source://prism//lib/prism/node.rb#10683 + # pkg:gem/prism#lib/prism/node.rb:11461 sig do params( node_id: Integer, @@ -21378,34 +21419,34 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node closing_loc: Prism::Location ).returns(Prism::InterpolatedRegularExpressionNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, opening_loc: self.opening_loc, parts: self.parts, closing_loc: self.closing_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10668 + # pkg:gem/prism#lib/prism/node.rb:11466 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location } # - # source://prism//lib/prism/node.rb#10691 + # pkg:gem/prism#lib/prism/node.rb:11469 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # def euc_jp?: () -> bool + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @return [Boolean] + # pkg:gem/prism#lib/prism/node.rb:11444 + def each_child_node; end + + # def euc_jp?: () -> bool # - # source://prism//lib/prism/node.rb#10716 + # pkg:gem/prism#lib/prism/node.rb:11494 sig { returns(T::Boolean) } def euc_jp?; end # def extended?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10701 + # pkg:gem/prism#lib/prism/node.rb:11479 sig { returns(T::Boolean) } def extended?; end @@ -21414,70 +21455,58 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # def forced_binary_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10741 + # pkg:gem/prism#lib/prism/node.rb:11519 sig { returns(T::Boolean) } def forced_binary_encoding?; end # def forced_us_ascii_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10746 + # pkg:gem/prism#lib/prism/node.rb:11524 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end # def forced_utf8_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10736 + # pkg:gem/prism#lib/prism/node.rb:11514 sig { returns(T::Boolean) } def forced_utf8_encoding?; end # def ignore_case?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10696 + # pkg:gem/prism#lib/prism/node.rb:11474 sig { returns(T::Boolean) } def ignore_case?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#10790 + # pkg:gem/prism#lib/prism/node.rb:11568 sig { override.returns(String) } def inspect; end # def multi_line?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10706 + # pkg:gem/prism#lib/prism/node.rb:11484 sig { returns(T::Boolean) } def multi_line?; end - # source://prism//lib/prism/parse_result/newlines.rb#128 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:129 def newline_flag!(lines); end # def once?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10711 + # pkg:gem/prism#lib/prism/node.rb:11489 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#10780 + # pkg:gem/prism#lib/prism/node.rb:11558 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#10751 + # pkg:gem/prism#lib/prism/node.rb:11529 sig { returns(Prism::Location) } def opening_loc; end @@ -21486,48 +21515,44 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#10764 + # pkg:gem/prism#lib/prism/node.rb:11542 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10775 + # pkg:gem/prism#lib/prism/node.rb:11553 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10759 + # pkg:gem/prism#lib/prism/node.rb:11537 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#10795 + # pkg:gem/prism#lib/prism/node.rb:11573 sig { override.returns(Symbol) } def type; end # def utf_8?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10731 + # pkg:gem/prism#lib/prism/node.rb:11509 sig { returns(T::Boolean) } def utf_8?; end # def windows_31j?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10726 + # pkg:gem/prism#lib/prism/node.rb:11504 sig { returns(T::Boolean) } def windows_31j?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10800 + # pkg:gem/prism#lib/prism/node.rb:11578 def type; end end end @@ -21537,15 +21562,13 @@ end # "foo #{bar} baz" # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10820 +# pkg:gem/prism#lib/prism/node.rb:11598 class Prism::InterpolatedStringNode < ::Prism::Node include ::Prism::HeredocQuery # Initialize a new InterpolatedStringNode node. # - # @return [InterpolatedStringNode] a new instance of InterpolatedStringNode - # - # source://prism//lib/prism/node.rb#10822 + # pkg:gem/prism#lib/prism/node.rb:11600 sig do params( source: Prism::Source, @@ -21553,7 +21576,7 @@ class Prism::InterpolatedStringNode < ::Prism::Node location: Prism::Location, flags: Integer, opening_loc: T.nilable(Prism::Location), - parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode, Prism::XStringNode)], + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode, Prism::XStringNode, Prism::InterpolatedXStringNode, Prism::SymbolNode, Prism::InterpolatedSymbolNode)], closing_loc: T.nilable(Prism::Location) ).void end @@ -21562,81 +21585,83 @@ class Prism::InterpolatedStringNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10943 + # pkg:gem/prism#lib/prism/node.rb:11728 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10833 + # pkg:gem/prism#lib/prism/node.rb:11611 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10838 + # pkg:gem/prism#lib/prism/node.rb:11616 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#10922 + # pkg:gem/prism#lib/prism/node.rb:11707 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#10898 + # pkg:gem/prism#lib/prism/node.rb:11683 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10848 + # pkg:gem/prism#lib/prism/node.rb:11633 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10843 + # pkg:gem/prism#lib/prism/node.rb:11628 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode | XStringNode], ?closing_loc: Location?) -> InterpolatedStringNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode | XStringNode | InterpolatedXStringNode | SymbolNode | InterpolatedSymbolNode], ?closing_loc: Location?) -> InterpolatedStringNode # - # source://prism//lib/prism/node.rb#10853 + # pkg:gem/prism#lib/prism/node.rb:11638 sig do params( node_id: Integer, location: Prism::Location, flags: Integer, opening_loc: T.nilable(Prism::Location), - parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode, Prism::XStringNode)], + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode, Prism::XStringNode, Prism::InterpolatedXStringNode, Prism::SymbolNode, Prism::InterpolatedSymbolNode)], closing_loc: T.nilable(Prism::Location) ).returns(Prism::InterpolatedStringNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, opening_loc: self.opening_loc, parts: self.parts, closing_loc: self.closing_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10838 + # pkg:gem/prism#lib/prism/node.rb:11643 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode | XStringNode], closing_loc: Location? } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode | XStringNode | InterpolatedXStringNode | SymbolNode | InterpolatedSymbolNode], closing_loc: Location? } # - # source://prism//lib/prism/node.rb#10861 + # pkg:gem/prism#lib/prism/node.rb:11646 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:11621 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def frozen?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10866 + # pkg:gem/prism#lib/prism/node.rb:11651 sig { returns(T::Boolean) } def frozen?; end @@ -21645,76 +21670,74 @@ class Prism::InterpolatedStringNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#10927 + # pkg:gem/prism#lib/prism/node.rb:11712 sig { override.returns(String) } def inspect; end # def mutable?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10871 + # pkg:gem/prism#lib/prism/node.rb:11656 sig { returns(T::Boolean) } def mutable?; end - # source://prism//lib/prism/parse_result/newlines.rb#135 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:136 def newline_flag!(lines); end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#10917 + # pkg:gem/prism#lib/prism/node.rb:11702 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#10876 + # pkg:gem/prism#lib/prism/node.rb:11661 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end - # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode | XStringNode] + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode | XStringNode | InterpolatedXStringNode | SymbolNode | InterpolatedSymbolNode] # - # source://prism//lib/prism/node.rb#10895 + # pkg:gem/prism#lib/prism/node.rb:11680 sig do - returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode, Prism::XStringNode)]) + returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode, Prism::XStringNode, Prism::InterpolatedXStringNode, Prism::SymbolNode, Prism::InterpolatedSymbolNode)]) end def parts; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10912 + # pkg:gem/prism#lib/prism/node.rb:11697 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#10890 + # pkg:gem/prism#lib/prism/node.rb:11675 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#10932 + # pkg:gem/prism#lib/prism/node.rb:11717 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10937 + # pkg:gem/prism#lib/prism/node.rb:11722 def type; end end end # Flags for interpolated string nodes that indicated mutability if they are also marked as literals. # -# source://prism//lib/prism/node.rb#18522 +# pkg:gem/prism#lib/prism/node.rb:19843 module Prism::InterpolatedStringNodeFlags; end -# source://prism//lib/prism/node.rb#18524 +# pkg:gem/prism#lib/prism/node.rb:19845 Prism::InterpolatedStringNodeFlags::FROZEN = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/node.rb#18527 +# pkg:gem/prism#lib/prism/node.rb:19848 Prism::InterpolatedStringNodeFlags::MUTABLE = T.let(T.unsafe(nil), Integer) # Represents a symbol literal that contains interpolation. @@ -21722,13 +21745,11 @@ Prism::InterpolatedStringNodeFlags::MUTABLE = T.let(T.unsafe(nil), Integer) # :"foo #{bar} baz" # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10957 +# pkg:gem/prism#lib/prism/node.rb:11742 class Prism::InterpolatedSymbolNode < ::Prism::Node # Initialize a new InterpolatedSymbolNode node. # - # @return [InterpolatedSymbolNode] a new instance of InterpolatedSymbolNode - # - # source://prism//lib/prism/node.rb#10959 + # pkg:gem/prism#lib/prism/node.rb:11744 sig do params( source: Prism::Source, @@ -21745,48 +21766,48 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11070 + # pkg:gem/prism#lib/prism/node.rb:11862 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10970 + # pkg:gem/prism#lib/prism/node.rb:11755 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10975 + # pkg:gem/prism#lib/prism/node.rb:11760 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#11049 + # pkg:gem/prism#lib/prism/node.rb:11841 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#11025 + # pkg:gem/prism#lib/prism/node.rb:11817 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10985 + # pkg:gem/prism#lib/prism/node.rb:11777 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10980 + # pkg:gem/prism#lib/prism/node.rb:11772 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location?) -> InterpolatedSymbolNode # - # source://prism//lib/prism/node.rb#10990 + # pkg:gem/prism#lib/prism/node.rb:11782 sig do params( node_id: Integer, @@ -21797,73 +21818,77 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node closing_loc: T.nilable(Prism::Location) ).returns(Prism::InterpolatedSymbolNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, opening_loc: self.opening_loc, parts: self.parts, closing_loc: self.closing_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#10975 + # pkg:gem/prism#lib/prism/node.rb:11787 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location? } # - # source://prism//lib/prism/node.rb#10998 + # pkg:gem/prism#lib/prism/node.rb:11790 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:11765 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#11054 + # pkg:gem/prism#lib/prism/node.rb:11846 sig { override.returns(String) } def inspect; end - # source://prism//lib/prism/parse_result/newlines.rb#142 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:143 def newline_flag!(lines); end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#11044 + # pkg:gem/prism#lib/prism/node.rb:11836 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#11003 + # pkg:gem/prism#lib/prism/node.rb:11795 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#11022 + # pkg:gem/prism#lib/prism/node.rb:11814 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11039 + # pkg:gem/prism#lib/prism/node.rb:11831 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11017 + # pkg:gem/prism#lib/prism/node.rb:11809 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#11059 + # pkg:gem/prism#lib/prism/node.rb:11851 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#11064 + # pkg:gem/prism#lib/prism/node.rb:11856 def type; end end end @@ -21873,15 +21898,13 @@ end # `foo #{bar} baz` # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11083 +# pkg:gem/prism#lib/prism/node.rb:11875 class Prism::InterpolatedXStringNode < ::Prism::Node include ::Prism::HeredocQuery # Initialize a new InterpolatedXStringNode node. # - # @return [InterpolatedXStringNode] a new instance of InterpolatedXStringNode - # - # source://prism//lib/prism/node.rb#11085 + # pkg:gem/prism#lib/prism/node.rb:11877 sig do params( source: Prism::Source, @@ -21898,48 +21921,48 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11184 + # pkg:gem/prism#lib/prism/node.rb:11983 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11096 + # pkg:gem/prism#lib/prism/node.rb:11888 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11101 + # pkg:gem/prism#lib/prism/node.rb:11893 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#11163 + # pkg:gem/prism#lib/prism/node.rb:11962 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#11145 + # pkg:gem/prism#lib/prism/node.rb:11944 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11111 + # pkg:gem/prism#lib/prism/node.rb:11910 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11106 + # pkg:gem/prism#lib/prism/node.rb:11905 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location) -> InterpolatedXStringNode # - # source://prism//lib/prism/node.rb#11116 + # pkg:gem/prism#lib/prism/node.rb:11915 sig do params( node_id: Integer, @@ -21950,21 +21973,25 @@ class Prism::InterpolatedXStringNode < ::Prism::Node closing_loc: Prism::Location ).returns(Prism::InterpolatedXStringNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, opening_loc: self.opening_loc, parts: self.parts, closing_loc: self.closing_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11101 + # pkg:gem/prism#lib/prism/node.rb:11920 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location } # - # source://prism//lib/prism/node.rb#11124 + # pkg:gem/prism#lib/prism/node.rb:11923 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:11898 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end @@ -21973,53 +22000,53 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#11168 + # pkg:gem/prism#lib/prism/node.rb:11967 sig { override.returns(String) } def inspect; end - # source://prism//lib/prism/parse_result/newlines.rb#149 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:150 def newline_flag!(lines); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#11158 + # pkg:gem/prism#lib/prism/node.rb:11957 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#11129 + # pkg:gem/prism#lib/prism/node.rb:11928 sig { returns(Prism::Location) } def opening_loc; end # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#11142 + # pkg:gem/prism#lib/prism/node.rb:11941 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11153 + # pkg:gem/prism#lib/prism/node.rb:11952 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11137 + # pkg:gem/prism#lib/prism/node.rb:11936 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#11173 + # pkg:gem/prism#lib/prism/node.rb:11972 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#11178 + # pkg:gem/prism#lib/prism/node.rb:11977 def type; end end end @@ -22029,84 +22056,86 @@ end # -> { it } # ^^ # -# source://prism//lib/prism/node.rb#11197 +# pkg:gem/prism#lib/prism/node.rb:11996 class Prism::ItLocalVariableReadNode < ::Prism::Node # Initialize a new ItLocalVariableReadNode node. # - # @return [ItLocalVariableReadNode] a new instance of ItLocalVariableReadNode - # - # source://prism//lib/prism/node.rb#11199 + # pkg:gem/prism#lib/prism/node.rb:11998 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11256 + # pkg:gem/prism#lib/prism/node.rb:12061 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11207 + # pkg:gem/prism#lib/prism/node.rb:12006 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11212 + # pkg:gem/prism#lib/prism/node.rb:12011 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11222 + # pkg:gem/prism#lib/prism/node.rb:12027 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11217 + # pkg:gem/prism#lib/prism/node.rb:12022 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ItLocalVariableReadNode # - # source://prism//lib/prism/node.rb#11227 + # pkg:gem/prism#lib/prism/node.rb:12032 sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ItLocalVariableReadNode) } - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11212 + # pkg:gem/prism#lib/prism/node.rb:12037 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#11235 + # pkg:gem/prism#lib/prism/node.rb:12040 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:12016 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#11240 + # pkg:gem/prism#lib/prism/node.rb:12045 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#11245 + # pkg:gem/prism#lib/prism/node.rb:12050 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#11250 + # pkg:gem/prism#lib/prism/node.rb:12055 def type; end end end @@ -22116,84 +22145,86 @@ end # -> { it + it } # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11265 +# pkg:gem/prism#lib/prism/node.rb:12070 class Prism::ItParametersNode < ::Prism::Node # Initialize a new ItParametersNode node. # - # @return [ItParametersNode] a new instance of ItParametersNode - # - # source://prism//lib/prism/node.rb#11267 + # pkg:gem/prism#lib/prism/node.rb:12072 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11324 + # pkg:gem/prism#lib/prism/node.rb:12135 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11275 + # pkg:gem/prism#lib/prism/node.rb:12080 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11280 + # pkg:gem/prism#lib/prism/node.rb:12085 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11290 + # pkg:gem/prism#lib/prism/node.rb:12101 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11285 + # pkg:gem/prism#lib/prism/node.rb:12096 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ItParametersNode # - # source://prism//lib/prism/node.rb#11295 + # pkg:gem/prism#lib/prism/node.rb:12106 sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ItParametersNode) } - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11280 + # pkg:gem/prism#lib/prism/node.rb:12111 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#11303 + # pkg:gem/prism#lib/prism/node.rb:12114 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:12090 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#11308 + # pkg:gem/prism#lib/prism/node.rb:12119 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#11313 + # pkg:gem/prism#lib/prism/node.rb:12124 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#11318 + # pkg:gem/prism#lib/prism/node.rb:12129 def type; end end end @@ -22203,13 +22234,11 @@ end # foo(a: b) # ^^^^ # -# source://prism//lib/prism/node.rb#11333 +# pkg:gem/prism#lib/prism/node.rb:12144 class Prism::KeywordHashNode < ::Prism::Node # Initialize a new KeywordHashNode node. # - # @return [KeywordHashNode] a new instance of KeywordHashNode - # - # source://prism//lib/prism/node.rb#11335 + # pkg:gem/prism#lib/prism/node.rb:12146 sig do params( source: Prism::Source, @@ -22224,36 +22253,36 @@ class Prism::KeywordHashNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11401 + # pkg:gem/prism#lib/prism/node.rb:12219 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11344 + # pkg:gem/prism#lib/prism/node.rb:12155 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11349 + # pkg:gem/prism#lib/prism/node.rb:12160 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11359 + # pkg:gem/prism#lib/prism/node.rb:12177 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11354 + # pkg:gem/prism#lib/prism/node.rb:12172 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?elements: Array[AssocNode | AssocSplatNode]) -> KeywordHashNode # - # source://prism//lib/prism/node.rb#11364 + # pkg:gem/prism#lib/prism/node.rb:12182 sig do params( node_id: Integer, @@ -22262,24 +22291,28 @@ class Prism::KeywordHashNode < ::Prism::Node elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)] ).returns(Prism::KeywordHashNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), elements: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, elements: self.elements); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11349 + # pkg:gem/prism#lib/prism/node.rb:12187 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, elements: Array[AssocNode | AssocSplatNode] } # - # source://prism//lib/prism/node.rb#11372 + # pkg:gem/prism#lib/prism/node.rb:12190 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:12165 + def each_child_node; end + # attr_reader elements: Array[AssocNode | AssocSplatNode] # - # source://prism//lib/prism/node.rb#11382 + # pkg:gem/prism#lib/prism/node.rb:12200 sig { returns(T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)]) } def elements; end @@ -22288,40 +22321,38 @@ class Prism::KeywordHashNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#11385 + # pkg:gem/prism#lib/prism/node.rb:12203 sig { override.returns(String) } def inspect; end # def symbol_keys?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11377 + # pkg:gem/prism#lib/prism/node.rb:12195 sig { returns(T::Boolean) } def symbol_keys?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#11390 + # pkg:gem/prism#lib/prism/node.rb:12208 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#11395 + # pkg:gem/prism#lib/prism/node.rb:12213 def type; end end end # Flags for keyword hash nodes. # -# source://prism//lib/prism/node.rb#18531 +# pkg:gem/prism#lib/prism/node.rb:19852 module Prism::KeywordHashNodeFlags; end # a keyword hash which only has `AssocNode` elements all with symbol keys, which means the elements can be treated as keyword arguments # -# source://prism//lib/prism/node.rb#18533 +# pkg:gem/prism#lib/prism/node.rb:19854 Prism::KeywordHashNodeFlags::SYMBOL_KEYS = T.let(T.unsafe(nil), Integer) # Represents a keyword rest parameter to a method, block, or lambda definition. @@ -22330,13 +22361,11 @@ Prism::KeywordHashNodeFlags::SYMBOL_KEYS = T.let(T.unsafe(nil), Integer) # ^^^ # end # -# source://prism//lib/prism/node.rb#11414 +# pkg:gem/prism#lib/prism/node.rb:12232 class Prism::KeywordRestParameterNode < ::Prism::Node # Initialize a new KeywordRestParameterNode node. # - # @return [KeywordRestParameterNode] a new instance of KeywordRestParameterNode - # - # source://prism//lib/prism/node.rb#11416 + # pkg:gem/prism#lib/prism/node.rb:12234 sig do params( source: Prism::Source, @@ -22353,36 +22382,36 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11521 + # pkg:gem/prism#lib/prism/node.rb:12345 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11427 + # pkg:gem/prism#lib/prism/node.rb:12245 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11432 + # pkg:gem/prism#lib/prism/node.rb:12250 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11442 + # pkg:gem/prism#lib/prism/node.rb:12266 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11437 + # pkg:gem/prism#lib/prism/node.rb:12261 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location) -> KeywordRestParameterNode # - # source://prism//lib/prism/node.rb#11447 + # pkg:gem/prism#lib/prism/node.rb:12271 sig do params( node_id: Integer, @@ -22393,84 +22422,86 @@ class Prism::KeywordRestParameterNode < ::Prism::Node operator_loc: Prism::Location ).returns(Prism::KeywordRestParameterNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, operator_loc: self.operator_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11432 + # pkg:gem/prism#lib/prism/node.rb:12276 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location } # - # source://prism//lib/prism/node.rb#11455 + # pkg:gem/prism#lib/prism/node.rb:12279 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:12255 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#11505 + # pkg:gem/prism#lib/prism/node.rb:12329 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#11465 + # pkg:gem/prism#lib/prism/node.rb:12289 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://prism//lib/prism/node.rb#11468 + # pkg:gem/prism#lib/prism/node.rb:12292 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#11500 + # pkg:gem/prism#lib/prism/node.rb:12324 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#11487 + # pkg:gem/prism#lib/prism/node.rb:12311 sig { returns(Prism::Location) } def operator_loc; end # def repeated_parameter?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11460 + # pkg:gem/prism#lib/prism/node.rb:12284 sig { returns(T::Boolean) } def repeated_parameter?; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11482 + # pkg:gem/prism#lib/prism/node.rb:12306 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11495 + # pkg:gem/prism#lib/prism/node.rb:12319 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#11510 + # pkg:gem/prism#lib/prism/node.rb:12334 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#11515 + # pkg:gem/prism#lib/prism/node.rb:12339 def type; end end end @@ -22480,13 +22511,11 @@ end # ->(value) { value * 2 } # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11534 +# pkg:gem/prism#lib/prism/node.rb:12358 class Prism::LambdaNode < ::Prism::Node # Initialize a new LambdaNode node. # - # @return [LambdaNode] a new instance of LambdaNode - # - # source://prism//lib/prism/node.rb#11536 + # pkg:gem/prism#lib/prism/node.rb:12360 sig do params( source: Prism::Source, @@ -22506,54 +22535,54 @@ class Prism::LambdaNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11665 + # pkg:gem/prism#lib/prism/node.rb:12497 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11550 + # pkg:gem/prism#lib/prism/node.rb:12374 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: StatementsNode | BeginNode | nil # - # source://prism//lib/prism/node.rb#11631 + # pkg:gem/prism#lib/prism/node.rb:12463 sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11555 + # pkg:gem/prism#lib/prism/node.rb:12379 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#11644 + # pkg:gem/prism#lib/prism/node.rb:12476 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#11615 + # pkg:gem/prism#lib/prism/node.rb:12447 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11568 + # pkg:gem/prism#lib/prism/node.rb:12400 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11560 + # pkg:gem/prism#lib/prism/node.rb:12392 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?operator_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, ?body: StatementsNode | BeginNode | nil) -> LambdaNode # - # source://prism//lib/prism/node.rb#11573 + # pkg:gem/prism#lib/prism/node.rb:12405 sig do params( node_id: Integer, @@ -22567,94 +22596,98 @@ class Prism::LambdaNode < ::Prism::Node body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)) ).returns(Prism::LambdaNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, locals: self.locals, operator_loc: self.operator_loc, opening_loc: self.opening_loc, closing_loc: self.closing_loc, parameters: self.parameters, body: self.body); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11555 + # pkg:gem/prism#lib/prism/node.rb:12410 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, body: StatementsNode | BeginNode | nil } # - # source://prism//lib/prism/node.rb#11581 + # pkg:gem/prism#lib/prism/node.rb:12413 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:12384 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#11649 + # pkg:gem/prism#lib/prism/node.rb:12481 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#11586 + # pkg:gem/prism#lib/prism/node.rb:12418 sig { returns(T::Array[Symbol]) } def locals; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#11639 + # pkg:gem/prism#lib/prism/node.rb:12471 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#11602 + # pkg:gem/prism#lib/prism/node.rb:12434 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#11634 + # pkg:gem/prism#lib/prism/node.rb:12466 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#11589 + # pkg:gem/prism#lib/prism/node.rb:12421 sig { returns(Prism::Location) } def operator_loc; end # attr_reader parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil # - # source://prism//lib/prism/node.rb#11628 + # pkg:gem/prism#lib/prism/node.rb:12460 sig { returns(T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode))) } def parameters; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11623 + # pkg:gem/prism#lib/prism/node.rb:12455 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11610 + # pkg:gem/prism#lib/prism/node.rb:12442 def save_opening_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11597 + # pkg:gem/prism#lib/prism/node.rb:12429 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#11654 + # pkg:gem/prism#lib/prism/node.rb:12486 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#11659 + # pkg:gem/prism#lib/prism/node.rb:12491 def type; end end end @@ -22665,47 +22698,38 @@ end # generally lines up. However, there are a few cases that require special # handling. # -# source://prism//lib/prism/lex_compat.rb#12 +# pkg:gem/prism#lib/prism/lex_compat.rb:10 class Prism::LexCompat - # @return [LexCompat] a new instance of LexCompat - # - # source://prism//lib/prism/lex_compat.rb#619 - def initialize(source, **options); end + # pkg:gem/prism#lib/prism/lex_compat.rb:586 + def initialize(code, **options); end - # Returns the value of attribute options. - # - # source://prism//lib/prism/lex_compat.rb#617 + # pkg:gem/prism#lib/prism/lex_compat.rb:828 + def add_on_sp_tokens(tokens, source, data_loc, bom, eof_token); end + + # pkg:gem/prism#lib/prism/lex_compat.rb:584 def options; end - # source://prism//lib/prism/lex_compat.rb#624 + # pkg:gem/prism#lib/prism/lex_compat.rb:591 def result; end - - # Returns the value of attribute source. - # - # source://prism//lib/prism/lex_compat.rb#617 - def source; end end -# Ripper doesn't include the rest of the token in the event, so we need to -# trim it down to just the content on the first line when comparing. +# In previous versions of Ruby, Ripper wouldn't flush the bom before the +# first token, so we had to have a hack in place to account for that. # -# source://prism//lib/prism/lex_compat.rb#230 -class Prism::LexCompat::EndContentToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#231 - def ==(other); end -end +# pkg:gem/prism#lib/prism/lex_compat.rb:581 +Prism::LexCompat::BOM_FLUSHED = T.let(T.unsafe(nil), TrueClass) # A heredoc in this case is a list of tokens that belong to the body of the # heredoc that should be appended onto the list of tokens when the heredoc # closes. # -# source://prism//lib/prism/lex_compat.rb#291 +# pkg:gem/prism#lib/prism/lex_compat.rb:253 module Prism::LexCompat::Heredoc class << self # Here we will split between the two types of heredocs and return the # object that will store their tokens. # - # source://prism//lib/prism/lex_compat.rb#603 + # pkg:gem/prism#lib/prism/lex_compat.rb:565 def build(opening); end end end @@ -22714,23 +22738,21 @@ end # that need to be split on "\\\n" to mimic Ripper's behavior. We also need # to keep track of the state that the heredoc was opened in. # -# source://prism//lib/prism/lex_compat.rb#315 +# pkg:gem/prism#lib/prism/lex_compat.rb:277 class Prism::LexCompat::Heredoc::DashHeredoc - # @return [DashHeredoc] a new instance of DashHeredoc - # - # source://prism//lib/prism/lex_compat.rb#318 + # pkg:gem/prism#lib/prism/lex_compat.rb:280 def initialize(split); end - # source://prism//lib/prism/lex_compat.rb#323 + # pkg:gem/prism#lib/prism/lex_compat.rb:285 def <<(token); end - # source://prism//lib/prism/lex_compat.rb#316 + # pkg:gem/prism#lib/prism/lex_compat.rb:278 def split; end - # source://prism//lib/prism/lex_compat.rb#327 + # pkg:gem/prism#lib/prism/lex_compat.rb:289 def to_a; end - # source://prism//lib/prism/lex_compat.rb#316 + # pkg:gem/prism#lib/prism/lex_compat.rb:278 def tokens; end end @@ -22745,45 +22767,35 @@ end # some extra manipulation on the tokens to make them match Ripper's # output by mirroring the dedent logic that Ripper uses. # -# source://prism//lib/prism/lex_compat.rb#374 +# pkg:gem/prism#lib/prism/lex_compat.rb:336 class Prism::LexCompat::Heredoc::DedentingHeredoc - # @return [DedentingHeredoc] a new instance of DedentingHeredoc - # - # source://prism//lib/prism/lex_compat.rb#379 + # pkg:gem/prism#lib/prism/lex_compat.rb:341 def initialize; end # As tokens are coming in, we track the minimum amount of common leading # whitespace on plain string content tokens. This allows us to later # remove that amount of whitespace from the beginning of each line. # - # source://prism//lib/prism/lex_compat.rb#390 + # pkg:gem/prism#lib/prism/lex_compat.rb:352 def <<(token); end - # Returns the value of attribute dedent. - # - # source://prism//lib/prism/lex_compat.rb#377 + # pkg:gem/prism#lib/prism/lex_compat.rb:339 def dedent; end - # Returns the value of attribute dedent_next. - # - # source://prism//lib/prism/lex_compat.rb#377 + # pkg:gem/prism#lib/prism/lex_compat.rb:339 def dedent_next; end - # Returns the value of attribute embexpr_balance. - # - # source://prism//lib/prism/lex_compat.rb#377 + # pkg:gem/prism#lib/prism/lex_compat.rb:339 def embexpr_balance; end - # source://prism//lib/prism/lex_compat.rb#427 + # pkg:gem/prism#lib/prism/lex_compat.rb:389 def to_a; end - # Returns the value of attribute tokens. - # - # source://prism//lib/prism/lex_compat.rb#377 + # pkg:gem/prism#lib/prism/lex_compat.rb:339 def tokens; end end -# source://prism//lib/prism/lex_compat.rb#375 +# pkg:gem/prism#lib/prism/lex_compat.rb:337 Prism::LexCompat::Heredoc::DedentingHeredoc::TAB_WIDTH = T.let(T.unsafe(nil), Integer) # Heredocs that are no dash or tilde heredocs are just a list of tokens. @@ -22791,64 +22803,27 @@ Prism::LexCompat::Heredoc::DedentingHeredoc::TAB_WIDTH = T.let(T.unsafe(nil), In # order back into the token stream and set the state of the last token to # the state that the heredoc was opened in. # -# source://prism//lib/prism/lex_compat.rb#296 +# pkg:gem/prism#lib/prism/lex_compat.rb:258 class Prism::LexCompat::Heredoc::PlainHeredoc - # @return [PlainHeredoc] a new instance of PlainHeredoc - # - # source://prism//lib/prism/lex_compat.rb#299 + # pkg:gem/prism#lib/prism/lex_compat.rb:261 def initialize; end - # source://prism//lib/prism/lex_compat.rb#303 + # pkg:gem/prism#lib/prism/lex_compat.rb:265 def <<(token); end - # source://prism//lib/prism/lex_compat.rb#307 + # pkg:gem/prism#lib/prism/lex_compat.rb:269 def to_a; end - # source://prism//lib/prism/lex_compat.rb#297 + # pkg:gem/prism#lib/prism/lex_compat.rb:259 def tokens; end end -# Ident tokens for the most part are exactly the same, except sometimes we -# know an ident is a local when ripper doesn't (when they are introduced -# through named captures in regular expressions). In that case we don't -# compare the state. -# -# source://prism//lib/prism/lex_compat.rb#248 -class Prism::LexCompat::IdentToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#249 - def ==(other); end -end - # Tokens where state should be ignored -# used for :on_comment, :on_heredoc_end, :on_embexpr_end +# used for :on_sp, :on_comment, :on_heredoc_end, :on_embexpr_end # -# source://prism//lib/prism/lex_compat.rb#238 +# pkg:gem/prism#lib/prism/lex_compat.rb:244 class Prism::LexCompat::IgnoreStateToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#239 - def ==(other); end -end - -# Ignored newlines can occasionally have a LABEL state attached to them, so -# we compare the state differently here. -# -# source://prism//lib/prism/lex_compat.rb#259 -class Prism::LexCompat::IgnoredNewlineToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#260 - def ==(other); end -end - -# If we have an identifier that follows a method name like: -# -# def foo bar -# -# then Ripper will mark bar as END|LABEL if there is a local in a parent -# scope named bar because it hasn't pushed the local table yet. We do this -# more accurately, so we need to allow comparing against both END and -# END|LABEL. -# -# source://prism//lib/prism/lex_compat.rb#279 -class Prism::LexCompat::ParamToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#280 + # pkg:gem/prism#lib/prism/lex_compat.rb:245 def ==(other); end end @@ -22856,28 +22831,26 @@ end # many-to-one mapping because we split up our token types, whereas Ripper # tends to group them. # -# source://prism//lib/prism/lex_compat.rb#33 +# pkg:gem/prism#lib/prism/lex_compat.rb:31 Prism::LexCompat::RIPPER = T.let(T.unsafe(nil), Hash) # A result class specialized for holding tokens produced by the lexer. # -# source://prism//lib/prism/lex_compat.rb#14 +# pkg:gem/prism#lib/prism/lex_compat.rb:12 class Prism::LexCompat::Result < ::Prism::Result # Create a new lex compat result object with the given values. # - # @return [Result] a new instance of Result - # - # source://prism//lib/prism/lex_compat.rb#19 + # pkg:gem/prism#lib/prism/lex_compat.rb:17 def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end # Implement the hash pattern matching interface for Result. # - # source://prism//lib/prism/lex_compat.rb#25 + # pkg:gem/prism#lib/prism/lex_compat.rb:23 def deconstruct_keys(keys); end # The list of tokens that were produced by the lexer. # - # source://prism//lib/prism/lex_compat.rb#16 + # pkg:gem/prism#lib/prism/lex_compat.rb:14 def value; end end @@ -22885,38 +22858,54 @@ end # However, we add a couple of convenience methods onto them to make them a # little easier to work with. We delegate all other methods to the array. # -# source://prism//lib/prism/lex_compat.rb#204 -class Prism::LexCompat::Token < ::SimpleDelegator +# pkg:gem/prism#lib/prism/lex_compat.rb:202 +class Prism::LexCompat::Token < ::BasicObject + # Create a new token object with the given ripper-compatible array. + # + # pkg:gem/prism#lib/prism/lex_compat.rb:204 + def initialize(array); end + + # We want to pretend that this is just an Array. + # + # pkg:gem/prism#lib/prism/lex_compat.rb:229 + def ==(other); end + # The type of the token. # - # source://prism//lib/prism/lex_compat.rb#213 + # pkg:gem/prism#lib/prism/lex_compat.rb:214 def event; end # The location of the token in the source. # - # source://prism//lib/prism/lex_compat.rb#208 + # pkg:gem/prism#lib/prism/lex_compat.rb:209 def location; end + # pkg:gem/prism#lib/prism/lex_compat.rb:237 + def method_missing(name, *, **, &); end + # The state of the lexer when this token was produced. # - # source://prism//lib/prism/lex_compat.rb#223 + # pkg:gem/prism#lib/prism/lex_compat.rb:224 def state; end # The slice of the source that this token represents. # - # source://prism//lib/prism/lex_compat.rb#218 + # pkg:gem/prism#lib/prism/lex_compat.rb:219 def value; end + + private + + # pkg:gem/prism#lib/prism/lex_compat.rb:233 + def respond_to_missing?(name, include_private = T.unsafe(nil)); end end # This is a result specific to the `lex` and `lex_file` methods. # -# source://prism//lib/prism/parse_result.rb#781 +# pkg:gem/prism#lib/prism/parse_result.rb:778 class Prism::LexResult < ::Prism::Result # Create a new lex result object with the given values. # - # @return [LexResult] a new instance of LexResult - # - # source://prism//lib/prism/parse_result.rb#786 + # pkg:gem/prism#lib/prism/parse_result.rb:783 sig do params( value: T::Array[T.untyped], @@ -22932,51 +22921,27 @@ class Prism::LexResult < ::Prism::Result # Implement the hash pattern matching interface for LexResult. # - # source://prism//lib/prism/parse_result.rb#792 + # pkg:gem/prism#lib/prism/parse_result.rb:789 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # The list of tokens that were parsed from the source code. # - # source://prism//lib/prism/parse_result.rb#783 + # pkg:gem/prism#lib/prism/parse_result.rb:780 sig { returns(T::Array[T.untyped]) } def value; end end -# This is a class that wraps the Ripper lexer to produce almost exactly the -# same tokens. -# -# source://prism//lib/prism/lex_compat.rb#872 -class Prism::LexRipper - # @return [LexRipper] a new instance of LexRipper - # - # source://prism//lib/prism/lex_compat.rb#875 - def initialize(source); end - - # source://prism//lib/prism/lex_compat.rb#879 - def result; end - - # source://prism//lib/prism/lex_compat.rb#873 - def source; end - - private - - # source://prism//lib/prism/lex_compat.rb#913 - def lex(source); end -end - # Represents the use of the `&&=` operator for assignment to a local variable. # # target &&= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11681 +# pkg:gem/prism#lib/prism/node.rb:12513 class Prism::LocalVariableAndWriteNode < ::Prism::Node # Initialize a new LocalVariableAndWriteNode node. # - # @return [LocalVariableAndWriteNode] a new instance of LocalVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#11683 + # pkg:gem/prism#lib/prism/node.rb:12515 sig do params( source: Prism::Source, @@ -22995,36 +22960,36 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11785 + # pkg:gem/prism#lib/prism/node.rb:12624 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11696 + # pkg:gem/prism#lib/prism/node.rb:12528 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11701 + # pkg:gem/prism#lib/prism/node.rb:12533 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11711 + # pkg:gem/prism#lib/prism/node.rb:12550 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11706 + # pkg:gem/prism#lib/prism/node.rb:12545 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer) -> LocalVariableAndWriteNode # - # source://prism//lib/prism/node.rb#11716 + # pkg:gem/prism#lib/prism/node.rb:12555 sig do params( node_id: Integer, @@ -23037,91 +23002,95 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node depth: Integer ).returns(Prism::LocalVariableAndWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name_loc: self.name_loc, operator_loc: self.operator_loc, value: self.value, name: self.name, depth: self.depth); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11701 + # pkg:gem/prism#lib/prism/node.rb:12560 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer } # - # source://prism//lib/prism/node.rb#11724 + # pkg:gem/prism#lib/prism/node.rb:12563 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader depth: Integer # - # source://prism//lib/prism/node.rb#11761 + # pkg:gem/prism#lib/prism/node.rb:12600 sig { returns(Integer) } def depth; end - # source://prism//lib/prism/desugar_compiler.rb#236 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:237 def desugar; end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:12538 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#11769 + # pkg:gem/prism#lib/prism/node.rb:12608 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#11758 + # pkg:gem/prism#lib/prism/node.rb:12597 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#11729 + # pkg:gem/prism#lib/prism/node.rb:12568 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#11764 + # pkg:gem/prism#lib/prism/node.rb:12603 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#11742 + # pkg:gem/prism#lib/prism/node.rb:12581 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11737 + # pkg:gem/prism#lib/prism/node.rb:12576 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11750 + # pkg:gem/prism#lib/prism/node.rb:12589 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#11774 + # pkg:gem/prism#lib/prism/node.rb:12613 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#11755 + # pkg:gem/prism#lib/prism/node.rb:12594 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#11779 + # pkg:gem/prism#lib/prism/node.rb:12618 def type; end end end @@ -23131,13 +23100,11 @@ end # target += value # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11799 +# pkg:gem/prism#lib/prism/node.rb:12638 class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # Initialize a new LocalVariableOperatorWriteNode node. # - # @return [LocalVariableOperatorWriteNode] a new instance of LocalVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#11801 + # pkg:gem/prism#lib/prism/node.rb:12640 sig do params( source: Prism::Source, @@ -23157,48 +23124,48 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11902 + # pkg:gem/prism#lib/prism/node.rb:12748 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11815 + # pkg:gem/prism#lib/prism/node.rb:12654 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#11880 + # pkg:gem/prism#lib/prism/node.rb:12726 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#11861 + # pkg:gem/prism#lib/prism/node.rb:12707 sig { returns(Prism::Location) } def binary_operator_loc; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11820 + # pkg:gem/prism#lib/prism/node.rb:12659 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11830 + # pkg:gem/prism#lib/prism/node.rb:12676 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11825 + # pkg:gem/prism#lib/prism/node.rb:12671 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?binary_operator: Symbol, ?depth: Integer) -> LocalVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#11835 + # pkg:gem/prism#lib/prism/node.rb:12681 sig do params( node_id: Integer, @@ -23212,91 +23179,95 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node depth: Integer ).returns(Prism::LocalVariableOperatorWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), binary_operator: T.unsafe(nil), depth: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name_loc: self.name_loc, binary_operator_loc: self.binary_operator_loc, value: self.value, name: self.name, binary_operator: self.binary_operator, depth: self.depth); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11820 + # pkg:gem/prism#lib/prism/node.rb:12686 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, binary_operator_loc: Location, value: Prism::node, name: Symbol, binary_operator: Symbol, depth: Integer } # - # source://prism//lib/prism/node.rb#11843 + # pkg:gem/prism#lib/prism/node.rb:12689 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader depth: Integer # - # source://prism//lib/prism/node.rb#11883 + # pkg:gem/prism#lib/prism/node.rb:12729 sig { returns(Integer) } def depth; end - # source://prism//lib/prism/desugar_compiler.rb#248 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:249 def desugar; end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:12664 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#11886 + # pkg:gem/prism#lib/prism/node.rb:12732 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#11877 + # pkg:gem/prism#lib/prism/node.rb:12723 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#11848 + # pkg:gem/prism#lib/prism/node.rb:12694 sig { returns(Prism::Location) } def name_loc; end # Returns the binary operator used to modify the receiver. This method is # deprecated in favor of #binary_operator. # - # source://prism//lib/prism/node_ext.rb#451 + # pkg:gem/prism#lib/prism/node_ext.rb:454 def operator; end # Returns the location of the binary operator used to modify the receiver. # This method is deprecated in favor of #binary_operator_loc. # - # source://prism//lib/prism/node_ext.rb#458 + # pkg:gem/prism#lib/prism/node_ext.rb:461 def operator_loc; end # Save the binary_operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11869 + # pkg:gem/prism#lib/prism/node.rb:12715 def save_binary_operator_loc(repository); end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11856 + # pkg:gem/prism#lib/prism/node.rb:12702 def save_name_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#11891 + # pkg:gem/prism#lib/prism/node.rb:12737 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#11874 + # pkg:gem/prism#lib/prism/node.rb:12720 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#11896 + # pkg:gem/prism#lib/prism/node.rb:12742 def type; end end end @@ -23306,13 +23277,11 @@ end # target ||= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11917 +# pkg:gem/prism#lib/prism/node.rb:12763 class Prism::LocalVariableOrWriteNode < ::Prism::Node # Initialize a new LocalVariableOrWriteNode node. # - # @return [LocalVariableOrWriteNode] a new instance of LocalVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#11919 + # pkg:gem/prism#lib/prism/node.rb:12765 sig do params( source: Prism::Source, @@ -23331,36 +23300,36 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12021 + # pkg:gem/prism#lib/prism/node.rb:12874 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11932 + # pkg:gem/prism#lib/prism/node.rb:12778 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11937 + # pkg:gem/prism#lib/prism/node.rb:12783 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11947 + # pkg:gem/prism#lib/prism/node.rb:12800 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11942 + # pkg:gem/prism#lib/prism/node.rb:12795 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer) -> LocalVariableOrWriteNode # - # source://prism//lib/prism/node.rb#11952 + # pkg:gem/prism#lib/prism/node.rb:12805 sig do params( node_id: Integer, @@ -23373,91 +23342,95 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node depth: Integer ).returns(Prism::LocalVariableOrWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name_loc: self.name_loc, operator_loc: self.operator_loc, value: self.value, name: self.name, depth: self.depth); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#11937 + # pkg:gem/prism#lib/prism/node.rb:12810 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer } # - # source://prism//lib/prism/node.rb#11960 + # pkg:gem/prism#lib/prism/node.rb:12813 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader depth: Integer # - # source://prism//lib/prism/node.rb#11997 + # pkg:gem/prism#lib/prism/node.rb:12850 sig { returns(Integer) } def depth; end - # source://prism//lib/prism/desugar_compiler.rb#242 + # pkg:gem/prism#lib/prism/desugar_compiler.rb:243 def desugar; end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:12788 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#12005 + # pkg:gem/prism#lib/prism/node.rb:12858 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#11994 + # pkg:gem/prism#lib/prism/node.rb:12847 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#11965 + # pkg:gem/prism#lib/prism/node.rb:12818 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12000 + # pkg:gem/prism#lib/prism/node.rb:12853 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#11978 + # pkg:gem/prism#lib/prism/node.rb:12831 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11973 + # pkg:gem/prism#lib/prism/node.rb:12826 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#11986 + # pkg:gem/prism#lib/prism/node.rb:12839 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12010 + # pkg:gem/prism#lib/prism/node.rb:12863 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#11991 + # pkg:gem/prism#lib/prism/node.rb:12844 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#12015 + # pkg:gem/prism#lib/prism/node.rb:12868 def type; end end end @@ -23467,13 +23440,11 @@ end # foo # ^^^ # -# source://prism//lib/prism/node.rb#12035 +# pkg:gem/prism#lib/prism/node.rb:12888 class Prism::LocalVariableReadNode < ::Prism::Node # Initialize a new LocalVariableReadNode node. # - # @return [LocalVariableReadNode] a new instance of LocalVariableReadNode - # - # source://prism//lib/prism/node.rb#12037 + # pkg:gem/prism#lib/prism/node.rb:12890 sig do params( source: Prism::Source, @@ -23489,36 +23460,36 @@ class Prism::LocalVariableReadNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12116 + # pkg:gem/prism#lib/prism/node.rb:12975 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12047 + # pkg:gem/prism#lib/prism/node.rb:12900 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12052 + # pkg:gem/prism#lib/prism/node.rb:12905 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12062 + # pkg:gem/prism#lib/prism/node.rb:12921 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12057 + # pkg:gem/prism#lib/prism/node.rb:12916 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer) -> LocalVariableReadNode # - # source://prism//lib/prism/node.rb#12067 + # pkg:gem/prism#lib/prism/node.rb:12926 sig do params( node_id: Integer, @@ -23528,18 +23499,17 @@ class Prism::LocalVariableReadNode < ::Prism::Node depth: Integer ).returns(Prism::LocalVariableReadNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, depth: self.depth); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12052 + # pkg:gem/prism#lib/prism/node.rb:12931 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer } # - # source://prism//lib/prism/node.rb#12075 + # pkg:gem/prism#lib/prism/node.rb:12934 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -23551,16 +23521,21 @@ class Prism::LocalVariableReadNode < ::Prism::Node # # The specific rules for calculating the depth may differ from individual Ruby implementations, as they are not specified by the language. For more information, see [the Prism documentation](https://github.com/ruby/prism/blob/main/docs/local_variable_depth.md). # - # source://prism//lib/prism/node.rb#12097 + # pkg:gem/prism#lib/prism/node.rb:12956 sig { returns(Integer) } def depth; end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:12910 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#12100 + # pkg:gem/prism#lib/prism/node.rb:12959 sig { override.returns(String) } def inspect; end @@ -23574,20 +23549,20 @@ class Prism::LocalVariableReadNode < ::Prism::Node # # _1 # name `:_1` # - # source://prism//lib/prism/node.rb#12088 + # pkg:gem/prism#lib/prism/node.rb:12947 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12105 + # pkg:gem/prism#lib/prism/node.rb:12964 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#12110 + # pkg:gem/prism#lib/prism/node.rb:12969 def type; end end end @@ -23597,13 +23572,14 @@ end # foo, bar = baz # ^^^ ^^^ # -# source://prism//lib/prism/node.rb#12127 +# foo => baz +# ^^^ +# +# pkg:gem/prism#lib/prism/node.rb:12989 class Prism::LocalVariableTargetNode < ::Prism::Node # Initialize a new LocalVariableTargetNode node. # - # @return [LocalVariableTargetNode] a new instance of LocalVariableTargetNode - # - # source://prism//lib/prism/node.rb#12129 + # pkg:gem/prism#lib/prism/node.rb:12991 sig do params( source: Prism::Source, @@ -23619,36 +23595,36 @@ class Prism::LocalVariableTargetNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12194 + # pkg:gem/prism#lib/prism/node.rb:13062 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12139 + # pkg:gem/prism#lib/prism/node.rb:13001 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12144 + # pkg:gem/prism#lib/prism/node.rb:13006 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12154 + # pkg:gem/prism#lib/prism/node.rb:13022 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12149 + # pkg:gem/prism#lib/prism/node.rb:13017 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer) -> LocalVariableTargetNode # - # source://prism//lib/prism/node.rb#12159 + # pkg:gem/prism#lib/prism/node.rb:13027 sig do params( node_id: Integer, @@ -23658,52 +23634,56 @@ class Prism::LocalVariableTargetNode < ::Prism::Node depth: Integer ).returns(Prism::LocalVariableTargetNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, depth: self.depth); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12144 + # pkg:gem/prism#lib/prism/node.rb:13032 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer } # - # source://prism//lib/prism/node.rb#12167 + # pkg:gem/prism#lib/prism/node.rb:13035 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader depth: Integer # - # source://prism//lib/prism/node.rb#12175 + # pkg:gem/prism#lib/prism/node.rb:13043 sig { returns(Integer) } def depth; end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:13011 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#12178 + # pkg:gem/prism#lib/prism/node.rb:13046 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#12172 + # pkg:gem/prism#lib/prism/node.rb:13040 sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12183 + # pkg:gem/prism#lib/prism/node.rb:13051 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#12188 + # pkg:gem/prism#lib/prism/node.rb:13056 def type; end end end @@ -23713,13 +23693,11 @@ end # foo = 1 # ^^^^^^^ # -# source://prism//lib/prism/node.rb#12205 +# pkg:gem/prism#lib/prism/node.rb:13073 class Prism::LocalVariableWriteNode < ::Prism::Node # Initialize a new LocalVariableWriteNode node. # - # @return [LocalVariableWriteNode] a new instance of LocalVariableWriteNode - # - # source://prism//lib/prism/node.rb#12207 + # pkg:gem/prism#lib/prism/node.rb:13075 sig do params( source: Prism::Source, @@ -23738,36 +23716,36 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12335 + # pkg:gem/prism#lib/prism/node.rb:13210 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12220 + # pkg:gem/prism#lib/prism/node.rb:13088 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12225 + # pkg:gem/prism#lib/prism/node.rb:13093 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12235 + # pkg:gem/prism#lib/prism/node.rb:13110 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12230 + # pkg:gem/prism#lib/prism/node.rb:13105 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> LocalVariableWriteNode # - # source://prism//lib/prism/node.rb#12240 + # pkg:gem/prism#lib/prism/node.rb:13115 sig do params( node_id: Integer, @@ -23780,18 +23758,17 @@ class Prism::LocalVariableWriteNode < ::Prism::Node operator_loc: Prism::Location ).returns(Prism::LocalVariableWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, depth: self.depth, name_loc: self.name_loc, value: self.value, operator_loc: self.operator_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12225 + # pkg:gem/prism#lib/prism/node.rb:13120 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer, name_loc: Location, value: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#12248 + # pkg:gem/prism#lib/prism/node.rb:13123 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -23803,16 +23780,21 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # The specific rules for calculating the depth may differ from individual Ruby implementations, as they are not specified by the language. For more information, see [the Prism documentation](https://github.com/ruby/prism/blob/main/docs/local_variable_depth.md). # - # source://prism//lib/prism/node.rb#12266 + # pkg:gem/prism#lib/prism/node.rb:13141 sig { returns(Integer) } def depth; end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:13098 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#12319 + # pkg:gem/prism#lib/prism/node.rb:13194 sig { override.returns(String) } def inspect; end @@ -23822,7 +23804,7 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # abc = 123 # name `:abc` # - # source://prism//lib/prism/node.rb#12257 + # pkg:gem/prism#lib/prism/node.rb:13132 sig { returns(Symbol) } def name; end @@ -23831,13 +23813,13 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # foo = :bar # ^^^ # - # source://prism//lib/prism/node.rb#12272 + # pkg:gem/prism#lib/prism/node.rb:13147 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12314 + # pkg:gem/prism#lib/prism/node.rb:13189 sig { returns(String) } def operator; end @@ -23846,25 +23828,25 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # x = :y # ^ # - # source://prism//lib/prism/node.rb#12301 + # pkg:gem/prism#lib/prism/node.rb:13176 sig { returns(Prism::Location) } def operator_loc; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#12280 + # pkg:gem/prism#lib/prism/node.rb:13155 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#12309 + # pkg:gem/prism#lib/prism/node.rb:13184 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12324 + # pkg:gem/prism#lib/prism/node.rb:13199 sig { override.returns(Symbol) } def type; end @@ -23880,34 +23862,32 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # foo = foo # - # source://prism//lib/prism/node.rb#12295 + # pkg:gem/prism#lib/prism/node.rb:13170 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#12329 + # pkg:gem/prism#lib/prism/node.rb:13204 def type; end end end # This represents a location in the source. # -# source://prism//lib/prism/parse_result.rb#290 +# pkg:gem/prism#lib/prism/parse_result.rb:287 class Prism::Location # Create a new location object with the given source, start byte offset, and # byte length. # - # @return [Location] a new instance of Location - # - # source://prism//lib/prism/parse_result.rb#305 + # pkg:gem/prism#lib/prism/parse_result.rb:302 sig { params(source: Prism::Source, start_offset: Integer, length: Integer).void } def initialize(source, start_offset, length); end # Returns true if the given other location is equal to this location. # - # source://prism//lib/prism/parse_result.rb#493 + # pkg:gem/prism#lib/prism/parse_result.rb:490 sig { params(other: T.untyped).returns(T::Boolean) } def ==(other); end @@ -23915,14 +23895,14 @@ class Prism::Location # that occurs after this location on the same line, and return the new # location. This will raise an error if the string does not exist. # - # source://prism//lib/prism/parse_result.rb#512 + # pkg:gem/prism#lib/prism/parse_result.rb:509 sig { params(string: String).returns(Prism::Location) } def adjoin(string); end # The end column in code units using the given cache to fetch or calculate # the value. # - # source://prism//lib/prism/parse_result.rb#478 + # pkg:gem/prism#lib/prism/parse_result.rb:475 sig do params( cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) @@ -23933,7 +23913,7 @@ class Prism::Location # The end offset from the start of the file in code units using the given # cache to fetch or calculate the value. # - # source://prism//lib/prism/parse_result.rb#414 + # pkg:gem/prism#lib/prism/parse_result.rb:411 sig do params( cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) @@ -23944,7 +23924,7 @@ class Prism::Location # The start column in code units using the given cache to fetch or calculate # the value. # - # source://prism//lib/prism/parse_result.rb#454 + # pkg:gem/prism#lib/prism/parse_result.rb:451 sig do params( cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) @@ -23955,7 +23935,7 @@ class Prism::Location # The start offset from the start of the file in code units using the given # cache to fetch or calculate the value. # - # source://prism//lib/prism/parse_result.rb#392 + # pkg:gem/prism#lib/prism/parse_result.rb:389 sig do params( cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) @@ -23965,78 +23945,78 @@ class Prism::Location # Returns a new location that is the result of chopping off the last byte. # - # source://prism//lib/prism/parse_result.rb#351 + # pkg:gem/prism#lib/prism/parse_result.rb:348 sig { returns(Prism::Location) } def chop; end # Returns all comments that are associated with this location (both leading # and trailing comments). # - # source://prism//lib/prism/parse_result.rb#341 + # pkg:gem/prism#lib/prism/parse_result.rb:338 sig { returns(T::Array[Prism::Comment]) } def comments; end # Create a new location object with the given options. # - # source://prism//lib/prism/parse_result.rb#346 + # pkg:gem/prism#lib/prism/parse_result.rb:343 sig { params(source: Prism::Source, start_offset: Integer, length: Integer).returns(Prism::Location) } - def copy(source: T.unsafe(nil), start_offset: T.unsafe(nil), length: T.unsafe(nil)); end + def copy(source: self.source, start_offset: self.start_offset, length: self.length); end # Implement the hash pattern matching interface for Location. # - # source://prism//lib/prism/parse_result.rb#483 + # pkg:gem/prism#lib/prism/parse_result.rb:480 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # The column number in characters where this location ends from the start of # the line. # - # source://prism//lib/prism/parse_result.rb#466 + # pkg:gem/prism#lib/prism/parse_result.rb:463 sig { returns(Integer) } def end_character_column; end # The character offset from the beginning of the source where this location # ends. # - # source://prism//lib/prism/parse_result.rb#403 + # pkg:gem/prism#lib/prism/parse_result.rb:400 sig { returns(Integer) } def end_character_offset; end # The column number in code units of the given encoding where this location # ends from the start of the line. # - # source://prism//lib/prism/parse_result.rb#472 + # pkg:gem/prism#lib/prism/parse_result.rb:469 sig { params(encoding: Encoding).returns(Integer) } - def end_code_units_column(encoding = T.unsafe(nil)); end + def end_code_units_column(encoding = Encoding::UTF_16LE); end # The offset from the start of the file in code units of the given encoding. # - # source://prism//lib/prism/parse_result.rb#408 + # pkg:gem/prism#lib/prism/parse_result.rb:405 sig { params(encoding: Encoding).returns(Integer) } - def end_code_units_offset(encoding = T.unsafe(nil)); end + def end_code_units_offset(encoding = Encoding::UTF_16LE); end # The column number in bytes where this location ends from the start of the # line. # - # source://prism//lib/prism/parse_result.rb#460 + # pkg:gem/prism#lib/prism/parse_result.rb:457 sig { returns(Integer) } def end_column; end # The line number where this location ends. # - # source://prism//lib/prism/parse_result.rb#430 + # pkg:gem/prism#lib/prism/parse_result.rb:427 sig { returns(Integer) } def end_line; end # The byte offset from the beginning of the source where this location ends. # - # source://prism//lib/prism/parse_result.rb#397 + # pkg:gem/prism#lib/prism/parse_result.rb:394 sig { returns(Integer) } def end_offset; end # Returns a string representation of this location. # - # source://prism//lib/prism/parse_result.rb#356 + # pkg:gem/prism#lib/prism/parse_result.rb:353 sig { returns(String) } def inspect; end @@ -24044,38 +24024,38 @@ class Prism::Location # other location. Raises an error if this location is not before the other # location or if they don't share the same source. # - # source://prism//lib/prism/parse_result.rb#502 + # pkg:gem/prism#lib/prism/parse_result.rb:499 sig { params(other: Prism::Location).returns(Prism::Location) } def join(other); end # Attach a comment to the leading comments of this location. # - # source://prism//lib/prism/parse_result.rb#324 + # pkg:gem/prism#lib/prism/parse_result.rb:321 sig { params(comment: Prism::Comment).void } def leading_comment(comment); end # These are the comments that are associated with this location that exist # before the start of this location. # - # source://prism//lib/prism/parse_result.rb#319 + # pkg:gem/prism#lib/prism/parse_result.rb:316 sig { returns(T::Array[Prism::Comment]) } def leading_comments; end # The length of this location in bytes. # - # source://prism//lib/prism/parse_result.rb#301 + # pkg:gem/prism#lib/prism/parse_result.rb:298 sig { returns(Integer) } def length; end # Implement the pretty print interface for Location. # - # source://prism//lib/prism/parse_result.rb#488 + # pkg:gem/prism#lib/prism/parse_result.rb:485 sig { params(q: T.untyped).void } def pretty_print(q); end # The source code that this location represents. # - # source://prism//lib/prism/parse_result.rb#366 + # pkg:gem/prism#lib/prism/parse_result.rb:363 sig { returns(String) } def slice; end @@ -24083,78 +24063,78 @@ class Prism::Location # of the line that this location starts on to the end of the line that this # location ends on. # - # source://prism//lib/prism/parse_result.rb#373 + # pkg:gem/prism#lib/prism/parse_result.rb:370 def slice_lines; end # Returns all of the lines of the source code associated with this location. # - # source://prism//lib/prism/parse_result.rb#361 + # pkg:gem/prism#lib/prism/parse_result.rb:358 sig { returns(T::Array[String]) } def source_lines; end # The column number in characters where this location ends from the start of # the line. # - # source://prism//lib/prism/parse_result.rb#442 + # pkg:gem/prism#lib/prism/parse_result.rb:439 sig { returns(Integer) } def start_character_column; end # The character offset from the beginning of the source where this location # starts. # - # source://prism//lib/prism/parse_result.rb#381 + # pkg:gem/prism#lib/prism/parse_result.rb:378 sig { returns(Integer) } def start_character_offset; end # The column number in code units of the given encoding where this location # starts from the start of the line. # - # source://prism//lib/prism/parse_result.rb#448 + # pkg:gem/prism#lib/prism/parse_result.rb:445 sig { params(encoding: Encoding).returns(Integer) } - def start_code_units_column(encoding = T.unsafe(nil)); end + def start_code_units_column(encoding = Encoding::UTF_16LE); end # The offset from the start of the file in code units of the given encoding. # - # source://prism//lib/prism/parse_result.rb#386 + # pkg:gem/prism#lib/prism/parse_result.rb:383 sig { params(encoding: Encoding).returns(Integer) } - def start_code_units_offset(encoding = T.unsafe(nil)); end + def start_code_units_offset(encoding = Encoding::UTF_16LE); end # The column number in bytes where this location starts from the start of # the line. # - # source://prism//lib/prism/parse_result.rb#436 + # pkg:gem/prism#lib/prism/parse_result.rb:433 sig { returns(Integer) } def start_column; end # The line number where this location starts. # - # source://prism//lib/prism/parse_result.rb#419 + # pkg:gem/prism#lib/prism/parse_result.rb:416 sig { returns(Integer) } def start_line; end # The content of the line where this location starts before this location. # - # source://prism//lib/prism/parse_result.rb#424 + # pkg:gem/prism#lib/prism/parse_result.rb:421 sig { returns(String) } def start_line_slice; end # The byte offset from the beginning of the source where this location # starts. # - # source://prism//lib/prism/parse_result.rb#298 + # pkg:gem/prism#lib/prism/parse_result.rb:295 sig { returns(Integer) } def start_offset; end # Attach a comment to the trailing comments of this location. # - # source://prism//lib/prism/parse_result.rb#335 + # pkg:gem/prism#lib/prism/parse_result.rb:332 sig { params(comment: Prism::Comment).void } def trailing_comment(comment); end # These are the comments that are associated with this location that exist # after the end of this location. # - # source://prism//lib/prism/parse_result.rb#330 + # pkg:gem/prism#lib/prism/parse_result.rb:327 sig { returns(T::Array[Prism::Comment]) } def trailing_comments; end @@ -24163,66 +24143,64 @@ class Prism::Location # A Source object that is used to determine more information from the given # offset and length. # - # source://prism//lib/prism/parse_result.rb#293 + # pkg:gem/prism#lib/prism/parse_result.rb:290 sig { returns(Prism::Source) } def source; end end # Flags for while and until loop nodes. # -# source://prism//lib/prism/node.rb#18537 +# pkg:gem/prism#lib/prism/node.rb:19858 module Prism::LoopFlags; end # a loop after a begin statement, so the body is executed first before the condition # -# source://prism//lib/prism/node.rb#18539 +# pkg:gem/prism#lib/prism/node.rb:19860 Prism::LoopFlags::BEGIN_MODIFIER = T.let(T.unsafe(nil), Integer) # This represents a magic comment that was encountered during parsing. # -# source://prism//lib/prism/parse_result.rb#574 +# pkg:gem/prism#lib/prism/parse_result.rb:571 class Prism::MagicComment # Create a new magic comment object with the given key and value locations. # - # @return [MagicComment] a new instance of MagicComment - # - # source://prism//lib/prism/parse_result.rb#582 + # pkg:gem/prism#lib/prism/parse_result.rb:579 sig { params(key_loc: Prism::Location, value_loc: Prism::Location).void } def initialize(key_loc, value_loc); end # Implement the hash pattern matching interface for MagicComment. # - # source://prism//lib/prism/parse_result.rb#598 + # pkg:gem/prism#lib/prism/parse_result.rb:595 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # Returns a string representation of this magic comment. # - # source://prism//lib/prism/parse_result.rb#603 + # pkg:gem/prism#lib/prism/parse_result.rb:600 sig { returns(String) } def inspect; end # Returns the key of the magic comment by slicing it from the source code. # - # source://prism//lib/prism/parse_result.rb#588 + # pkg:gem/prism#lib/prism/parse_result.rb:585 sig { returns(String) } def key; end # A Location object representing the location of the key in the source. # - # source://prism//lib/prism/parse_result.rb#576 + # pkg:gem/prism#lib/prism/parse_result.rb:573 sig { returns(Prism::Location) } def key_loc; end # Returns the value of the magic comment by slicing it from the source code. # - # source://prism//lib/prism/parse_result.rb#593 + # pkg:gem/prism#lib/prism/parse_result.rb:590 sig { returns(String) } def value; end # A Location object representing the location of the value in the source. # - # source://prism//lib/prism/parse_result.rb#579 + # pkg:gem/prism#lib/prism/parse_result.rb:576 sig { returns(Prism::Location) } def value_loc; end end @@ -24232,15 +24210,13 @@ end # if /foo/i then end # ^^^^^^ # -# source://prism//lib/prism/node.rb#12349 +# pkg:gem/prism#lib/prism/node.rb:13224 class Prism::MatchLastLineNode < ::Prism::Node include ::Prism::RegularExpressionOptions # Initialize a new MatchLastLineNode node. # - # @return [MatchLastLineNode] a new instance of MatchLastLineNode - # - # source://prism//lib/prism/node.rb#12351 + # pkg:gem/prism#lib/prism/node.rb:13226 sig do params( source: Prism::Source, @@ -24258,68 +24234,66 @@ class Prism::MatchLastLineNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12524 + # pkg:gem/prism#lib/prism/node.rb:13405 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12363 + # pkg:gem/prism#lib/prism/node.rb:13238 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def ascii_8bit?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#12421 + # pkg:gem/prism#lib/prism/node.rb:13302 sig { returns(T::Boolean) } def ascii_8bit?; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12368 + # pkg:gem/prism#lib/prism/node.rb:13243 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#12503 + # pkg:gem/prism#lib/prism/node.rb:13384 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#12477 + # pkg:gem/prism#lib/prism/node.rb:13358 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12378 + # pkg:gem/prism#lib/prism/node.rb:13259 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12373 + # pkg:gem/prism#lib/prism/node.rb:13254 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#12498 + # pkg:gem/prism#lib/prism/node.rb:13379 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#12464 + # pkg:gem/prism#lib/prism/node.rb:13345 sig { returns(Prism::Location) } def content_loc; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> MatchLastLineNode # - # source://prism//lib/prism/node.rb#12383 + # pkg:gem/prism#lib/prism/node.rb:13264 sig do params( node_id: Integer, @@ -24331,34 +24305,34 @@ class Prism::MatchLastLineNode < ::Prism::Node unescaped: String ).returns(Prism::MatchLastLineNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, opening_loc: self.opening_loc, content_loc: self.content_loc, closing_loc: self.closing_loc, unescaped: self.unescaped); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12368 + # pkg:gem/prism#lib/prism/node.rb:13269 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String } # - # source://prism//lib/prism/node.rb#12391 + # pkg:gem/prism#lib/prism/node.rb:13272 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # def euc_jp?: () -> bool + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @return [Boolean] + # pkg:gem/prism#lib/prism/node.rb:13248 + def each_child_node; end + + # def euc_jp?: () -> bool # - # source://prism//lib/prism/node.rb#12416 + # pkg:gem/prism#lib/prism/node.rb:13297 sig { returns(T::Boolean) } def euc_jp?; end # def extended?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#12401 + # pkg:gem/prism#lib/prism/node.rb:13282 sig { returns(T::Boolean) } def extended?; end @@ -24367,67 +24341,55 @@ class Prism::MatchLastLineNode < ::Prism::Node # def forced_binary_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#12441 + # pkg:gem/prism#lib/prism/node.rb:13322 sig { returns(T::Boolean) } def forced_binary_encoding?; end # def forced_us_ascii_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#12446 + # pkg:gem/prism#lib/prism/node.rb:13327 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end # def forced_utf8_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#12436 + # pkg:gem/prism#lib/prism/node.rb:13317 sig { returns(T::Boolean) } def forced_utf8_encoding?; end # def ignore_case?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#12396 + # pkg:gem/prism#lib/prism/node.rb:13277 sig { returns(T::Boolean) } def ignore_case?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#12508 + # pkg:gem/prism#lib/prism/node.rb:13389 sig { override.returns(String) } def inspect; end # def multi_line?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#12406 + # pkg:gem/prism#lib/prism/node.rb:13287 sig { returns(T::Boolean) } def multi_line?; end # def once?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#12411 + # pkg:gem/prism#lib/prism/node.rb:13292 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#12493 + # pkg:gem/prism#lib/prism/node.rb:13374 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#12451 + # pkg:gem/prism#lib/prism/node.rb:13332 sig { returns(Prism::Location) } def opening_loc; end @@ -24437,53 +24399,49 @@ class Prism::MatchLastLineNode < ::Prism::Node # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#12485 + # pkg:gem/prism#lib/prism/node.rb:13366 def save_closing_loc(repository); end # Save the content_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#12472 + # pkg:gem/prism#lib/prism/node.rb:13353 def save_content_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#12459 + # pkg:gem/prism#lib/prism/node.rb:13340 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12513 + # pkg:gem/prism#lib/prism/node.rb:13394 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#12490 + # pkg:gem/prism#lib/prism/node.rb:13371 sig { returns(String) } def unescaped; end # def utf_8?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#12431 + # pkg:gem/prism#lib/prism/node.rb:13312 sig { returns(T::Boolean) } def utf_8?; end # def windows_31j?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#12426 + # pkg:gem/prism#lib/prism/node.rb:13307 sig { returns(T::Boolean) } def windows_31j?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#12518 + # pkg:gem/prism#lib/prism/node.rb:13399 def type; end end end @@ -24493,13 +24451,11 @@ end # foo in bar # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12538 +# pkg:gem/prism#lib/prism/node.rb:13419 class Prism::MatchPredicateNode < ::Prism::Node # Initialize a new MatchPredicateNode node. # - # @return [MatchPredicateNode] a new instance of MatchPredicateNode - # - # source://prism//lib/prism/node.rb#12540 + # pkg:gem/prism#lib/prism/node.rb:13421 sig do params( source: Prism::Source, @@ -24516,36 +24472,36 @@ class Prism::MatchPredicateNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12624 + # pkg:gem/prism#lib/prism/node.rb:13513 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12551 + # pkg:gem/prism#lib/prism/node.rb:13432 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12556 + # pkg:gem/prism#lib/prism/node.rb:13437 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12566 + # pkg:gem/prism#lib/prism/node.rb:13455 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12561 + # pkg:gem/prism#lib/prism/node.rb:13450 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location) -> MatchPredicateNode # - # source://prism//lib/prism/node.rb#12571 + # pkg:gem/prism#lib/prism/node.rb:13460 sig do params( node_id: Integer, @@ -24556,70 +24512,74 @@ class Prism::MatchPredicateNode < ::Prism::Node operator_loc: Prism::Location ).returns(Prism::MatchPredicateNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, value: self.value, pattern: self.pattern, operator_loc: self.operator_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12556 + # pkg:gem/prism#lib/prism/node.rb:13465 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, pattern: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#12579 + # pkg:gem/prism#lib/prism/node.rb:13468 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:13442 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#12608 + # pkg:gem/prism#lib/prism/node.rb:13497 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12603 + # pkg:gem/prism#lib/prism/node.rb:13492 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12590 + # pkg:gem/prism#lib/prism/node.rb:13479 sig { returns(Prism::Location) } def operator_loc; end # attr_reader pattern: Prism::node # - # source://prism//lib/prism/node.rb#12587 + # pkg:gem/prism#lib/prism/node.rb:13476 sig { returns(Prism::Node) } def pattern; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#12598 + # pkg:gem/prism#lib/prism/node.rb:13487 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12613 + # pkg:gem/prism#lib/prism/node.rb:13502 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#12584 + # pkg:gem/prism#lib/prism/node.rb:13473 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#12618 + # pkg:gem/prism#lib/prism/node.rb:13507 def type; end end end @@ -24629,13 +24589,11 @@ end # foo => bar # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12636 +# pkg:gem/prism#lib/prism/node.rb:13525 class Prism::MatchRequiredNode < ::Prism::Node # Initialize a new MatchRequiredNode node. # - # @return [MatchRequiredNode] a new instance of MatchRequiredNode - # - # source://prism//lib/prism/node.rb#12638 + # pkg:gem/prism#lib/prism/node.rb:13527 sig do params( source: Prism::Source, @@ -24652,36 +24610,36 @@ class Prism::MatchRequiredNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12722 + # pkg:gem/prism#lib/prism/node.rb:13667 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12649 + # pkg:gem/prism#lib/prism/node.rb:13538 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12654 + # pkg:gem/prism#lib/prism/node.rb:13543 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12664 + # pkg:gem/prism#lib/prism/node.rb:13561 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12659 + # pkg:gem/prism#lib/prism/node.rb:13556 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location) -> MatchRequiredNode # - # source://prism//lib/prism/node.rb#12669 + # pkg:gem/prism#lib/prism/node.rb:13566 sig do params( node_id: Integer, @@ -24692,70 +24650,122 @@ class Prism::MatchRequiredNode < ::Prism::Node operator_loc: Prism::Location ).returns(Prism::MatchRequiredNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, value: self.value, pattern: self.pattern, operator_loc: self.operator_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12654 + # pkg:gem/prism#lib/prism/node.rb:13571 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, pattern: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#12677 + # pkg:gem/prism#lib/prism/node.rb:13574 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:13548 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#12706 + # pkg:gem/prism#lib/prism/node.rb:13651 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12701 + # pkg:gem/prism#lib/prism/node.rb:13646 sig { returns(String) } def operator; end - # attr_reader operator_loc: Location + # The location of the operator. # - # source://prism//lib/prism/node.rb#12688 + # foo => bar + # ^^ + # + # pkg:gem/prism#lib/prism/node.rb:13633 sig { returns(Prism::Location) } def operator_loc; end - # attr_reader pattern: Prism::node + # Represents the right-hand side of the operator. The type of the node depends on the expression. + # + # Anything that looks like a local variable name (including `_`) will result in a `LocalVariableTargetNode`. + # + # foo => a # This is equivalent to writing `a = foo` + # ^ + # + # Using an explicit `Array` or combining expressions with `,` will result in a `ArrayPatternNode`. This can be preceded by a constant. + # + # foo => [a] + # ^^^ + # + # foo => a, b + # ^^^^ # - # source://prism//lib/prism/node.rb#12685 + # foo => Bar[a, b] + # ^^^^^^^^^ + # + # If the array pattern contains at least two wildcard matches, a `FindPatternNode` is created instead. + # + # foo => *, 1, *a + # ^^^^^ + # + # Using an explicit `Hash` or a constant with square brackets and hash keys in the square brackets will result in a `HashPatternNode`. + # + # foo => { a: 1, b: } + # + # foo => Bar[a: 1, b:] + # + # foo => Bar[**] + # + # To use any variable that needs run time evaluation, pinning is required. This results in a `PinnedVariableNode` + # + # foo => ^a + # ^^ + # + # Similar, any expression can be used with pinning. This results in a `PinnedExpressionNode`. + # + # foo => ^(a + 1) + # + # Anything else will result in the regular node for that expression, for example a `ConstantReadNode`. + # + # foo => CONST + # + # pkg:gem/prism#lib/prism/node.rb:13627 sig { returns(Prism::Node) } def pattern; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#12696 + # pkg:gem/prism#lib/prism/node.rb:13641 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12711 + # pkg:gem/prism#lib/prism/node.rb:13656 sig { override.returns(Symbol) } def type; end - # attr_reader value: Prism::node + # Represents the left-hand side of the operator. + # + # foo => bar + # ^^^ # - # source://prism//lib/prism/node.rb#12682 + # pkg:gem/prism#lib/prism/node.rb:13582 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#12716 + # pkg:gem/prism#lib/prism/node.rb:13661 def type; end end end @@ -24765,13 +24775,11 @@ end # /(?bar)/ =~ baz # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12734 +# pkg:gem/prism#lib/prism/node.rb:13679 class Prism::MatchWriteNode < ::Prism::Node # Initialize a new MatchWriteNode node. # - # @return [MatchWriteNode] a new instance of MatchWriteNode - # - # source://prism//lib/prism/node.rb#12736 + # pkg:gem/prism#lib/prism/node.rb:13681 sig do params( source: Prism::Source, @@ -24787,42 +24795,42 @@ class Prism::MatchWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12801 + # pkg:gem/prism#lib/prism/node.rb:13754 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12746 + # pkg:gem/prism#lib/prism/node.rb:13691 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader call: CallNode # - # source://prism//lib/prism/node.rb#12779 + # pkg:gem/prism#lib/prism/node.rb:13732 sig { returns(Prism::CallNode) } def call; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12751 + # pkg:gem/prism#lib/prism/node.rb:13696 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12761 + # pkg:gem/prism#lib/prism/node.rb:13714 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12756 + # pkg:gem/prism#lib/prism/node.rb:13709 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?call: CallNode, ?targets: Array[LocalVariableTargetNode]) -> MatchWriteNode # - # source://prism//lib/prism/node.rb#12766 + # pkg:gem/prism#lib/prism/node.rb:13719 sig do params( node_id: Integer, @@ -24832,130 +24840,136 @@ class Prism::MatchWriteNode < ::Prism::Node targets: T::Array[Prism::LocalVariableTargetNode] ).returns(Prism::MatchWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), call: T.unsafe(nil), targets: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, call: self.call, targets: self.targets); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12751 + # pkg:gem/prism#lib/prism/node.rb:13724 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, call: CallNode, targets: Array[LocalVariableTargetNode] } # - # source://prism//lib/prism/node.rb#12774 + # pkg:gem/prism#lib/prism/node.rb:13727 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:13701 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#12785 + # pkg:gem/prism#lib/prism/node.rb:13738 sig { override.returns(String) } def inspect; end # attr_reader targets: Array[LocalVariableTargetNode] # - # source://prism//lib/prism/node.rb#12782 + # pkg:gem/prism#lib/prism/node.rb:13735 sig { returns(T::Array[Prism::LocalVariableTargetNode]) } def targets; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12790 + # pkg:gem/prism#lib/prism/node.rb:13743 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#12795 + # pkg:gem/prism#lib/prism/node.rb:13748 def type; end end end # Represents a node that is missing from the source and results in a syntax error. # -# source://prism//lib/prism/node.rb#12810 +# pkg:gem/prism#lib/prism/node.rb:13763 class Prism::MissingNode < ::Prism::Node # Initialize a new MissingNode node. # - # @return [MissingNode] a new instance of MissingNode - # - # source://prism//lib/prism/node.rb#12812 + # pkg:gem/prism#lib/prism/node.rb:13765 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12869 + # pkg:gem/prism#lib/prism/node.rb:13828 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12820 + # pkg:gem/prism#lib/prism/node.rb:13773 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12825 + # pkg:gem/prism#lib/prism/node.rb:13778 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12835 + # pkg:gem/prism#lib/prism/node.rb:13794 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12830 + # pkg:gem/prism#lib/prism/node.rb:13789 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> MissingNode # - # source://prism//lib/prism/node.rb#12840 + # pkg:gem/prism#lib/prism/node.rb:13799 sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::MissingNode) } - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12825 + # pkg:gem/prism#lib/prism/node.rb:13804 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#12848 + # pkg:gem/prism#lib/prism/node.rb:13807 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:13783 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#12853 + # pkg:gem/prism#lib/prism/node.rb:13812 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12858 + # pkg:gem/prism#lib/prism/node.rb:13817 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#12863 + # pkg:gem/prism#lib/prism/node.rb:13822 def type; end end end @@ -24965,13 +24979,11 @@ end # module Foo end # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12878 +# pkg:gem/prism#lib/prism/node.rb:13837 class Prism::ModuleNode < ::Prism::Node # Initialize a new ModuleNode node. # - # @return [ModuleNode] a new instance of ModuleNode - # - # source://prism//lib/prism/node.rb#12880 + # pkg:gem/prism#lib/prism/node.rb:13839 sig do params( source: Prism::Source, @@ -24991,48 +25003,48 @@ class Prism::ModuleNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12994 + # pkg:gem/prism#lib/prism/node.rb:13961 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12894 + # pkg:gem/prism#lib/prism/node.rb:13853 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: StatementsNode | BeginNode | nil # - # source://prism//lib/prism/node.rb#12949 + # pkg:gem/prism#lib/prism/node.rb:13916 sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12899 + # pkg:gem/prism#lib/prism/node.rb:13858 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12912 + # pkg:gem/prism#lib/prism/node.rb:13879 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12904 + # pkg:gem/prism#lib/prism/node.rb:13871 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader constant_path: ConstantReadNode | ConstantPathNode | MissingNode # - # source://prism//lib/prism/node.rb#12946 + # pkg:gem/prism#lib/prism/node.rb:13913 sig { returns(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode)) } def constant_path; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?module_keyword_loc: Location, ?constant_path: ConstantReadNode | ConstantPathNode | MissingNode, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location, ?name: Symbol) -> ModuleNode # - # source://prism//lib/prism/node.rb#12917 + # pkg:gem/prism#lib/prism/node.rb:13884 sig do params( node_id: Integer, @@ -25046,30 +25058,34 @@ class Prism::ModuleNode < ::Prism::Node name: Symbol ).returns(Prism::ModuleNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), module_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, locals: self.locals, module_keyword_loc: self.module_keyword_loc, constant_path: self.constant_path, body: self.body, end_keyword_loc: self.end_keyword_loc, name: self.name); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#12899 + # pkg:gem/prism#lib/prism/node.rb:13889 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], module_keyword_loc: Location, constant_path: ConstantReadNode | ConstantPathNode | MissingNode, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#12925 + # pkg:gem/prism#lib/prism/node.rb:13892 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:13863 + def each_child_node; end + # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#12973 + # pkg:gem/prism#lib/prism/node.rb:13940 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#12952 + # pkg:gem/prism#lib/prism/node.rb:13919 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -25078,56 +25094,56 @@ class Prism::ModuleNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12978 + # pkg:gem/prism#lib/prism/node.rb:13945 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#12930 + # pkg:gem/prism#lib/prism/node.rb:13897 sig { returns(T::Array[Symbol]) } def locals; end # def module_keyword: () -> String # - # source://prism//lib/prism/node.rb#12968 + # pkg:gem/prism#lib/prism/node.rb:13935 sig { returns(String) } def module_keyword; end # attr_reader module_keyword_loc: Location # - # source://prism//lib/prism/node.rb#12933 + # pkg:gem/prism#lib/prism/node.rb:13900 sig { returns(Prism::Location) } def module_keyword_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#12965 + # pkg:gem/prism#lib/prism/node.rb:13932 sig { returns(Symbol) } def name; end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#12960 + # pkg:gem/prism#lib/prism/node.rb:13927 def save_end_keyword_loc(repository); end # Save the module_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#12941 + # pkg:gem/prism#lib/prism/node.rb:13908 def save_module_keyword_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12983 + # pkg:gem/prism#lib/prism/node.rb:13950 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#12988 + # pkg:gem/prism#lib/prism/node.rb:13955 def type; end end end @@ -25142,13 +25158,11 @@ end # for a, b in [[1, 2], [3, 4]] # ^^^^ # -# source://prism//lib/prism/node.rb#13015 +# pkg:gem/prism#lib/prism/node.rb:13982 class Prism::MultiTargetNode < ::Prism::Node # Initialize a new MultiTargetNode node. # - # @return [MultiTargetNode] a new instance of MultiTargetNode - # - # source://prism//lib/prism/node.rb#13017 + # pkg:gem/prism#lib/prism/node.rb:13984 sig do params( source: Prism::Source, @@ -25167,36 +25181,36 @@ class Prism::MultiTargetNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13170 + # pkg:gem/prism#lib/prism/node.rb:14146 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13030 + # pkg:gem/prism#lib/prism/node.rb:13997 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13035 + # pkg:gem/prism#lib/prism/node.rb:14002 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13049 + # pkg:gem/prism#lib/prism/node.rb:14025 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13040 + # pkg:gem/prism#lib/prism/node.rb:14016 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], ?rest: ImplicitRestNode | SplatNode | nil, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], ?lparen_loc: Location?, ?rparen_loc: Location?) -> MultiTargetNode # - # source://prism//lib/prism/node.rb#13054 + # pkg:gem/prism#lib/prism/node.rb:14030 sig do params( node_id: Integer, @@ -25209,27 +25223,31 @@ class Prism::MultiTargetNode < ::Prism::Node rparen_loc: T.nilable(Prism::Location) ).returns(Prism::MultiTargetNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, lefts: self.lefts, rest: self.rest, rights: self.rights, lparen_loc: self.lparen_loc, rparen_loc: self.rparen_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13035 + # pkg:gem/prism#lib/prism/node.rb:14035 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], rest: ImplicitRestNode | SplatNode | nil, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], lparen_loc: Location?, rparen_loc: Location? } # - # source://prism//lib/prism/node.rb#13062 + # pkg:gem/prism#lib/prism/node.rb:14038 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:14007 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#13154 + # pkg:gem/prism#lib/prism/node.rb:14130 sig { override.returns(String) } def inspect; end @@ -25243,7 +25261,7 @@ class Prism::MultiTargetNode < ::Prism::Node # a, (b, c) = 1, 2, 3, 4, 5 # ^^^^ # - # source://prism//lib/prism/node.rb#13075 + # pkg:gem/prism#lib/prism/node.rb:14051 sig do returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) end @@ -25251,7 +25269,7 @@ class Prism::MultiTargetNode < ::Prism::Node # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#13144 + # pkg:gem/prism#lib/prism/node.rb:14120 sig { returns(T.nilable(String)) } def lparen; end @@ -25260,7 +25278,7 @@ class Prism::MultiTargetNode < ::Prism::Node # a, (b, c) = 1, 2, 3 # ^ # - # source://prism//lib/prism/node.rb#13103 + # pkg:gem/prism#lib/prism/node.rb:14079 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end @@ -25279,7 +25297,7 @@ class Prism::MultiTargetNode < ::Prism::Node # a, (b,) = 1, 2, 3, 4 # ^ # - # source://prism//lib/prism/node.rb#13091 + # pkg:gem/prism#lib/prism/node.rb:14067 sig { returns(T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode))) } def rest; end @@ -25288,7 +25306,7 @@ class Prism::MultiTargetNode < ::Prism::Node # a, (*, b, c) = 1, 2, 3, 4, 5 # ^^^^ # - # source://prism//lib/prism/node.rb#13097 + # pkg:gem/prism#lib/prism/node.rb:14073 sig do returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) end @@ -25296,7 +25314,7 @@ class Prism::MultiTargetNode < ::Prism::Node # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#13149 + # pkg:gem/prism#lib/prism/node.rb:14125 sig { returns(T.nilable(String)) } def rparen; end @@ -25305,32 +25323,32 @@ class Prism::MultiTargetNode < ::Prism::Node # a, (b, c) = 1, 2, 3 # ^ # - # source://prism//lib/prism/node.rb#13125 + # pkg:gem/prism#lib/prism/node.rb:14101 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Save the lparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#13117 + # pkg:gem/prism#lib/prism/node.rb:14093 def save_lparen_loc(repository); end # Save the rparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#13139 + # pkg:gem/prism#lib/prism/node.rb:14115 def save_rparen_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#13159 + # pkg:gem/prism#lib/prism/node.rb:14135 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#13164 + # pkg:gem/prism#lib/prism/node.rb:14140 def type; end end end @@ -25340,13 +25358,11 @@ end # a, b, c = 1, 2, 3 # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13186 +# pkg:gem/prism#lib/prism/node.rb:14162 class Prism::MultiWriteNode < ::Prism::Node # Initialize a new MultiWriteNode node. # - # @return [MultiWriteNode] a new instance of MultiWriteNode - # - # source://prism//lib/prism/node.rb#13188 + # pkg:gem/prism#lib/prism/node.rb:14164 sig do params( source: Prism::Source, @@ -25367,36 +25383,36 @@ class Prism::MultiWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13371 + # pkg:gem/prism#lib/prism/node.rb:14357 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13203 + # pkg:gem/prism#lib/prism/node.rb:14179 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13208 + # pkg:gem/prism#lib/prism/node.rb:14184 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13223 + # pkg:gem/prism#lib/prism/node.rb:14209 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13213 + # pkg:gem/prism#lib/prism/node.rb:14199 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], ?rest: ImplicitRestNode | SplatNode | nil, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], ?lparen_loc: Location?, ?rparen_loc: Location?, ?operator_loc: Location, ?value: Prism::node) -> MultiWriteNode # - # source://prism//lib/prism/node.rb#13228 + # pkg:gem/prism#lib/prism/node.rb:14214 sig do params( node_id: Integer, @@ -25411,27 +25427,31 @@ class Prism::MultiWriteNode < ::Prism::Node value: Prism::Node ).returns(Prism::MultiWriteNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, lefts: self.lefts, rest: self.rest, rights: self.rights, lparen_loc: self.lparen_loc, rparen_loc: self.rparen_loc, operator_loc: self.operator_loc, value: self.value); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13208 + # pkg:gem/prism#lib/prism/node.rb:14219 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], rest: ImplicitRestNode | SplatNode | nil, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#13236 + # pkg:gem/prism#lib/prism/node.rb:14222 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:14189 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#13355 + # pkg:gem/prism#lib/prism/node.rb:14341 sig { override.returns(String) } def inspect; end @@ -25445,7 +25465,7 @@ class Prism::MultiWriteNode < ::Prism::Node # a, b, c = 1, 2, 3, 4, 5 # ^^^^^^^ # - # source://prism//lib/prism/node.rb#13249 + # pkg:gem/prism#lib/prism/node.rb:14235 sig do returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) end @@ -25453,7 +25473,7 @@ class Prism::MultiWriteNode < ::Prism::Node # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#13340 + # pkg:gem/prism#lib/prism/node.rb:14326 sig { returns(T.nilable(String)) } def lparen; end @@ -25462,13 +25482,13 @@ class Prism::MultiWriteNode < ::Prism::Node # (a, b, c) = 1, 2, 3 # ^ # - # source://prism//lib/prism/node.rb#13277 + # pkg:gem/prism#lib/prism/node.rb:14263 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#13350 + # pkg:gem/prism#lib/prism/node.rb:14336 sig { returns(String) } def operator; end @@ -25477,7 +25497,7 @@ class Prism::MultiWriteNode < ::Prism::Node # a, b, c = 1, 2, 3 # ^ # - # source://prism//lib/prism/node.rb#13321 + # pkg:gem/prism#lib/prism/node.rb:14307 sig { returns(Prism::Location) } def operator_loc; end @@ -25496,7 +25516,7 @@ class Prism::MultiWriteNode < ::Prism::Node # a, b, = 1, 2, 3, 4 # ^ # - # source://prism//lib/prism/node.rb#13265 + # pkg:gem/prism#lib/prism/node.rb:14251 sig { returns(T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode))) } def rest; end @@ -25505,7 +25525,7 @@ class Prism::MultiWriteNode < ::Prism::Node # a, *, b, c = 1, 2, 3, 4, 5 # ^^^^ # - # source://prism//lib/prism/node.rb#13271 + # pkg:gem/prism#lib/prism/node.rb:14257 sig do returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) end @@ -25513,7 +25533,7 @@ class Prism::MultiWriteNode < ::Prism::Node # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#13345 + # pkg:gem/prism#lib/prism/node.rb:14331 sig { returns(T.nilable(String)) } def rparen; end @@ -25522,31 +25542,31 @@ class Prism::MultiWriteNode < ::Prism::Node # (a, b, c) = 1, 2, 3 # ^ # - # source://prism//lib/prism/node.rb#13299 + # pkg:gem/prism#lib/prism/node.rb:14285 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Save the lparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#13291 + # pkg:gem/prism#lib/prism/node.rb:14277 def save_lparen_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#13329 + # pkg:gem/prism#lib/prism/node.rb:14315 def save_operator_loc(repository); end # Save the rparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#13313 + # pkg:gem/prism#lib/prism/node.rb:14299 def save_rparen_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#13360 + # pkg:gem/prism#lib/prism/node.rb:14346 sig { override.returns(Symbol) } def type; end @@ -25555,14 +25575,14 @@ class Prism::MultiWriteNode < ::Prism::Node # a, b, c = 1, 2, 3 # ^^^^^^^ # - # source://prism//lib/prism/node.rb#13337 + # pkg:gem/prism#lib/prism/node.rb:14323 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#13365 + # pkg:gem/prism#lib/prism/node.rb:14351 def type; end end end @@ -25571,761 +25591,761 @@ end # visited. This is useful for consumers that want to mutate the tree, as you # can change subtrees in place without effecting the rest of the tree. # -# source://prism//lib/prism/mutation_compiler.rb#13 +# pkg:gem/prism#lib/prism/mutation_compiler.rb:16 class Prism::MutationCompiler < ::Prism::Compiler # Copy a AliasGlobalVariableNode node # - # source://prism//lib/prism/mutation_compiler.rb#15 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:18 def visit_alias_global_variable_node(node); end # Copy a AliasMethodNode node # - # source://prism//lib/prism/mutation_compiler.rb#20 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:23 def visit_alias_method_node(node); end # Copy a AlternationPatternNode node # - # source://prism//lib/prism/mutation_compiler.rb#25 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:28 def visit_alternation_pattern_node(node); end # Copy a AndNode node # - # source://prism//lib/prism/mutation_compiler.rb#30 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:33 def visit_and_node(node); end # Copy a ArgumentsNode node # - # source://prism//lib/prism/mutation_compiler.rb#35 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:38 def visit_arguments_node(node); end # Copy a ArrayNode node # - # source://prism//lib/prism/mutation_compiler.rb#40 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:43 def visit_array_node(node); end # Copy a ArrayPatternNode node # - # source://prism//lib/prism/mutation_compiler.rb#45 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:48 def visit_array_pattern_node(node); end # Copy a AssocNode node # - # source://prism//lib/prism/mutation_compiler.rb#50 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:53 def visit_assoc_node(node); end # Copy a AssocSplatNode node # - # source://prism//lib/prism/mutation_compiler.rb#55 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:58 def visit_assoc_splat_node(node); end # Copy a BackReferenceReadNode node # - # source://prism//lib/prism/mutation_compiler.rb#60 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:63 def visit_back_reference_read_node(node); end # Copy a BeginNode node # - # source://prism//lib/prism/mutation_compiler.rb#65 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:68 def visit_begin_node(node); end # Copy a BlockArgumentNode node # - # source://prism//lib/prism/mutation_compiler.rb#70 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:73 def visit_block_argument_node(node); end # Copy a BlockLocalVariableNode node # - # source://prism//lib/prism/mutation_compiler.rb#75 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:78 def visit_block_local_variable_node(node); end # Copy a BlockNode node # - # source://prism//lib/prism/mutation_compiler.rb#80 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:83 def visit_block_node(node); end # Copy a BlockParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#85 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:88 def visit_block_parameter_node(node); end # Copy a BlockParametersNode node # - # source://prism//lib/prism/mutation_compiler.rb#90 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:93 def visit_block_parameters_node(node); end # Copy a BreakNode node # - # source://prism//lib/prism/mutation_compiler.rb#95 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:98 def visit_break_node(node); end # Copy a CallAndWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#100 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:103 def visit_call_and_write_node(node); end # Copy a CallNode node # - # source://prism//lib/prism/mutation_compiler.rb#105 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:108 def visit_call_node(node); end # Copy a CallOperatorWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#110 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:113 def visit_call_operator_write_node(node); end # Copy a CallOrWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#115 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:118 def visit_call_or_write_node(node); end # Copy a CallTargetNode node # - # source://prism//lib/prism/mutation_compiler.rb#120 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:123 def visit_call_target_node(node); end # Copy a CapturePatternNode node # - # source://prism//lib/prism/mutation_compiler.rb#125 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:128 def visit_capture_pattern_node(node); end # Copy a CaseMatchNode node # - # source://prism//lib/prism/mutation_compiler.rb#130 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:133 def visit_case_match_node(node); end # Copy a CaseNode node # - # source://prism//lib/prism/mutation_compiler.rb#135 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:138 def visit_case_node(node); end # Copy a ClassNode node # - # source://prism//lib/prism/mutation_compiler.rb#140 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:143 def visit_class_node(node); end # Copy a ClassVariableAndWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#145 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:148 def visit_class_variable_and_write_node(node); end # Copy a ClassVariableOperatorWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#150 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:153 def visit_class_variable_operator_write_node(node); end # Copy a ClassVariableOrWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#155 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:158 def visit_class_variable_or_write_node(node); end # Copy a ClassVariableReadNode node # - # source://prism//lib/prism/mutation_compiler.rb#160 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:163 def visit_class_variable_read_node(node); end # Copy a ClassVariableTargetNode node # - # source://prism//lib/prism/mutation_compiler.rb#165 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:168 def visit_class_variable_target_node(node); end # Copy a ClassVariableWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#170 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:173 def visit_class_variable_write_node(node); end # Copy a ConstantAndWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#175 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:178 def visit_constant_and_write_node(node); end # Copy a ConstantOperatorWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#180 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:183 def visit_constant_operator_write_node(node); end # Copy a ConstantOrWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#185 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:188 def visit_constant_or_write_node(node); end # Copy a ConstantPathAndWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#190 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:193 def visit_constant_path_and_write_node(node); end # Copy a ConstantPathNode node # - # source://prism//lib/prism/mutation_compiler.rb#195 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:198 def visit_constant_path_node(node); end # Copy a ConstantPathOperatorWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#200 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:203 def visit_constant_path_operator_write_node(node); end # Copy a ConstantPathOrWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#205 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:208 def visit_constant_path_or_write_node(node); end # Copy a ConstantPathTargetNode node # - # source://prism//lib/prism/mutation_compiler.rb#210 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:213 def visit_constant_path_target_node(node); end # Copy a ConstantPathWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#215 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:218 def visit_constant_path_write_node(node); end # Copy a ConstantReadNode node # - # source://prism//lib/prism/mutation_compiler.rb#220 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:223 def visit_constant_read_node(node); end # Copy a ConstantTargetNode node # - # source://prism//lib/prism/mutation_compiler.rb#225 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:228 def visit_constant_target_node(node); end # Copy a ConstantWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#230 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:233 def visit_constant_write_node(node); end # Copy a DefNode node # - # source://prism//lib/prism/mutation_compiler.rb#235 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:238 def visit_def_node(node); end # Copy a DefinedNode node # - # source://prism//lib/prism/mutation_compiler.rb#240 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:243 def visit_defined_node(node); end # Copy a ElseNode node # - # source://prism//lib/prism/mutation_compiler.rb#245 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:248 def visit_else_node(node); end # Copy a EmbeddedStatementsNode node # - # source://prism//lib/prism/mutation_compiler.rb#250 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:253 def visit_embedded_statements_node(node); end # Copy a EmbeddedVariableNode node # - # source://prism//lib/prism/mutation_compiler.rb#255 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:258 def visit_embedded_variable_node(node); end # Copy a EnsureNode node # - # source://prism//lib/prism/mutation_compiler.rb#260 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:263 def visit_ensure_node(node); end # Copy a FalseNode node # - # source://prism//lib/prism/mutation_compiler.rb#265 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:268 def visit_false_node(node); end # Copy a FindPatternNode node # - # source://prism//lib/prism/mutation_compiler.rb#270 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:273 def visit_find_pattern_node(node); end # Copy a FlipFlopNode node # - # source://prism//lib/prism/mutation_compiler.rb#275 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:278 def visit_flip_flop_node(node); end # Copy a FloatNode node # - # source://prism//lib/prism/mutation_compiler.rb#280 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:283 def visit_float_node(node); end # Copy a ForNode node # - # source://prism//lib/prism/mutation_compiler.rb#285 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:288 def visit_for_node(node); end # Copy a ForwardingArgumentsNode node # - # source://prism//lib/prism/mutation_compiler.rb#290 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:293 def visit_forwarding_arguments_node(node); end # Copy a ForwardingParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#295 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:298 def visit_forwarding_parameter_node(node); end # Copy a ForwardingSuperNode node # - # source://prism//lib/prism/mutation_compiler.rb#300 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:303 def visit_forwarding_super_node(node); end # Copy a GlobalVariableAndWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#305 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:308 def visit_global_variable_and_write_node(node); end # Copy a GlobalVariableOperatorWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#310 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:313 def visit_global_variable_operator_write_node(node); end # Copy a GlobalVariableOrWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#315 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:318 def visit_global_variable_or_write_node(node); end # Copy a GlobalVariableReadNode node # - # source://prism//lib/prism/mutation_compiler.rb#320 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:323 def visit_global_variable_read_node(node); end # Copy a GlobalVariableTargetNode node # - # source://prism//lib/prism/mutation_compiler.rb#325 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:328 def visit_global_variable_target_node(node); end # Copy a GlobalVariableWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#330 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:333 def visit_global_variable_write_node(node); end # Copy a HashNode node # - # source://prism//lib/prism/mutation_compiler.rb#335 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:338 def visit_hash_node(node); end # Copy a HashPatternNode node # - # source://prism//lib/prism/mutation_compiler.rb#340 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:343 def visit_hash_pattern_node(node); end # Copy a IfNode node # - # source://prism//lib/prism/mutation_compiler.rb#345 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:348 def visit_if_node(node); end # Copy a ImaginaryNode node # - # source://prism//lib/prism/mutation_compiler.rb#350 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:353 def visit_imaginary_node(node); end # Copy a ImplicitNode node # - # source://prism//lib/prism/mutation_compiler.rb#355 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:358 def visit_implicit_node(node); end # Copy a ImplicitRestNode node # - # source://prism//lib/prism/mutation_compiler.rb#360 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:363 def visit_implicit_rest_node(node); end # Copy a InNode node # - # source://prism//lib/prism/mutation_compiler.rb#365 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:368 def visit_in_node(node); end # Copy a IndexAndWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#370 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:373 def visit_index_and_write_node(node); end # Copy a IndexOperatorWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#375 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:378 def visit_index_operator_write_node(node); end # Copy a IndexOrWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#380 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:383 def visit_index_or_write_node(node); end # Copy a IndexTargetNode node # - # source://prism//lib/prism/mutation_compiler.rb#385 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:388 def visit_index_target_node(node); end # Copy a InstanceVariableAndWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#390 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:393 def visit_instance_variable_and_write_node(node); end # Copy a InstanceVariableOperatorWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#395 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:398 def visit_instance_variable_operator_write_node(node); end # Copy a InstanceVariableOrWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#400 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:403 def visit_instance_variable_or_write_node(node); end # Copy a InstanceVariableReadNode node # - # source://prism//lib/prism/mutation_compiler.rb#405 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:408 def visit_instance_variable_read_node(node); end # Copy a InstanceVariableTargetNode node # - # source://prism//lib/prism/mutation_compiler.rb#410 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:413 def visit_instance_variable_target_node(node); end # Copy a InstanceVariableWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#415 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:418 def visit_instance_variable_write_node(node); end # Copy a IntegerNode node # - # source://prism//lib/prism/mutation_compiler.rb#420 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:423 def visit_integer_node(node); end # Copy a InterpolatedMatchLastLineNode node # - # source://prism//lib/prism/mutation_compiler.rb#425 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:428 def visit_interpolated_match_last_line_node(node); end # Copy a InterpolatedRegularExpressionNode node # - # source://prism//lib/prism/mutation_compiler.rb#430 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:433 def visit_interpolated_regular_expression_node(node); end # Copy a InterpolatedStringNode node # - # source://prism//lib/prism/mutation_compiler.rb#435 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:438 def visit_interpolated_string_node(node); end # Copy a InterpolatedSymbolNode node # - # source://prism//lib/prism/mutation_compiler.rb#440 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:443 def visit_interpolated_symbol_node(node); end # Copy a InterpolatedXStringNode node # - # source://prism//lib/prism/mutation_compiler.rb#445 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:448 def visit_interpolated_x_string_node(node); end # Copy a ItLocalVariableReadNode node # - # source://prism//lib/prism/mutation_compiler.rb#450 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:453 def visit_it_local_variable_read_node(node); end # Copy a ItParametersNode node # - # source://prism//lib/prism/mutation_compiler.rb#455 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:458 def visit_it_parameters_node(node); end # Copy a KeywordHashNode node # - # source://prism//lib/prism/mutation_compiler.rb#460 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:463 def visit_keyword_hash_node(node); end # Copy a KeywordRestParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#465 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:468 def visit_keyword_rest_parameter_node(node); end # Copy a LambdaNode node # - # source://prism//lib/prism/mutation_compiler.rb#470 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:473 def visit_lambda_node(node); end # Copy a LocalVariableAndWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#475 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:478 def visit_local_variable_and_write_node(node); end # Copy a LocalVariableOperatorWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#480 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:483 def visit_local_variable_operator_write_node(node); end # Copy a LocalVariableOrWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#485 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:488 def visit_local_variable_or_write_node(node); end # Copy a LocalVariableReadNode node # - # source://prism//lib/prism/mutation_compiler.rb#490 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:493 def visit_local_variable_read_node(node); end # Copy a LocalVariableTargetNode node # - # source://prism//lib/prism/mutation_compiler.rb#495 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:498 def visit_local_variable_target_node(node); end # Copy a LocalVariableWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#500 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:503 def visit_local_variable_write_node(node); end # Copy a MatchLastLineNode node # - # source://prism//lib/prism/mutation_compiler.rb#505 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:508 def visit_match_last_line_node(node); end # Copy a MatchPredicateNode node # - # source://prism//lib/prism/mutation_compiler.rb#510 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:513 def visit_match_predicate_node(node); end # Copy a MatchRequiredNode node # - # source://prism//lib/prism/mutation_compiler.rb#515 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:518 def visit_match_required_node(node); end # Copy a MatchWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#520 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:523 def visit_match_write_node(node); end # Copy a MissingNode node # - # source://prism//lib/prism/mutation_compiler.rb#525 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:528 def visit_missing_node(node); end # Copy a ModuleNode node # - # source://prism//lib/prism/mutation_compiler.rb#530 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:533 def visit_module_node(node); end # Copy a MultiTargetNode node # - # source://prism//lib/prism/mutation_compiler.rb#535 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:538 def visit_multi_target_node(node); end # Copy a MultiWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#540 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:543 def visit_multi_write_node(node); end # Copy a NextNode node # - # source://prism//lib/prism/mutation_compiler.rb#545 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:548 def visit_next_node(node); end # Copy a NilNode node # - # source://prism//lib/prism/mutation_compiler.rb#550 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:553 def visit_nil_node(node); end # Copy a NoKeywordsParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#555 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:558 def visit_no_keywords_parameter_node(node); end # Copy a NumberedParametersNode node # - # source://prism//lib/prism/mutation_compiler.rb#560 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:563 def visit_numbered_parameters_node(node); end # Copy a NumberedReferenceReadNode node # - # source://prism//lib/prism/mutation_compiler.rb#565 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:568 def visit_numbered_reference_read_node(node); end # Copy a OptionalKeywordParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#570 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:573 def visit_optional_keyword_parameter_node(node); end # Copy a OptionalParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#575 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:578 def visit_optional_parameter_node(node); end # Copy a OrNode node # - # source://prism//lib/prism/mutation_compiler.rb#580 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:583 def visit_or_node(node); end # Copy a ParametersNode node # - # source://prism//lib/prism/mutation_compiler.rb#585 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:588 def visit_parameters_node(node); end # Copy a ParenthesesNode node # - # source://prism//lib/prism/mutation_compiler.rb#590 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:593 def visit_parentheses_node(node); end # Copy a PinnedExpressionNode node # - # source://prism//lib/prism/mutation_compiler.rb#595 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:598 def visit_pinned_expression_node(node); end # Copy a PinnedVariableNode node # - # source://prism//lib/prism/mutation_compiler.rb#600 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:603 def visit_pinned_variable_node(node); end # Copy a PostExecutionNode node # - # source://prism//lib/prism/mutation_compiler.rb#605 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:608 def visit_post_execution_node(node); end # Copy a PreExecutionNode node # - # source://prism//lib/prism/mutation_compiler.rb#610 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:613 def visit_pre_execution_node(node); end # Copy a ProgramNode node # - # source://prism//lib/prism/mutation_compiler.rb#615 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:618 def visit_program_node(node); end # Copy a RangeNode node # - # source://prism//lib/prism/mutation_compiler.rb#620 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:623 def visit_range_node(node); end # Copy a RationalNode node # - # source://prism//lib/prism/mutation_compiler.rb#625 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:628 def visit_rational_node(node); end # Copy a RedoNode node # - # source://prism//lib/prism/mutation_compiler.rb#630 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:633 def visit_redo_node(node); end # Copy a RegularExpressionNode node # - # source://prism//lib/prism/mutation_compiler.rb#635 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:638 def visit_regular_expression_node(node); end # Copy a RequiredKeywordParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#640 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:643 def visit_required_keyword_parameter_node(node); end # Copy a RequiredParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#645 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:648 def visit_required_parameter_node(node); end # Copy a RescueModifierNode node # - # source://prism//lib/prism/mutation_compiler.rb#650 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:653 def visit_rescue_modifier_node(node); end # Copy a RescueNode node # - # source://prism//lib/prism/mutation_compiler.rb#655 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:658 def visit_rescue_node(node); end # Copy a RestParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#660 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:663 def visit_rest_parameter_node(node); end # Copy a RetryNode node # - # source://prism//lib/prism/mutation_compiler.rb#665 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:668 def visit_retry_node(node); end # Copy a ReturnNode node # - # source://prism//lib/prism/mutation_compiler.rb#670 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:673 def visit_return_node(node); end # Copy a SelfNode node # - # source://prism//lib/prism/mutation_compiler.rb#675 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:678 def visit_self_node(node); end # Copy a ShareableConstantNode node # - # source://prism//lib/prism/mutation_compiler.rb#680 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:683 def visit_shareable_constant_node(node); end # Copy a SingletonClassNode node # - # source://prism//lib/prism/mutation_compiler.rb#685 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:688 def visit_singleton_class_node(node); end # Copy a SourceEncodingNode node # - # source://prism//lib/prism/mutation_compiler.rb#690 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:693 def visit_source_encoding_node(node); end # Copy a SourceFileNode node # - # source://prism//lib/prism/mutation_compiler.rb#695 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:698 def visit_source_file_node(node); end # Copy a SourceLineNode node # - # source://prism//lib/prism/mutation_compiler.rb#700 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:703 def visit_source_line_node(node); end # Copy a SplatNode node # - # source://prism//lib/prism/mutation_compiler.rb#705 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:708 def visit_splat_node(node); end # Copy a StatementsNode node # - # source://prism//lib/prism/mutation_compiler.rb#710 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:713 def visit_statements_node(node); end # Copy a StringNode node # - # source://prism//lib/prism/mutation_compiler.rb#715 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:718 def visit_string_node(node); end # Copy a SuperNode node # - # source://prism//lib/prism/mutation_compiler.rb#720 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:723 def visit_super_node(node); end # Copy a SymbolNode node # - # source://prism//lib/prism/mutation_compiler.rb#725 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:728 def visit_symbol_node(node); end # Copy a TrueNode node # - # source://prism//lib/prism/mutation_compiler.rb#730 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:733 def visit_true_node(node); end # Copy a UndefNode node # - # source://prism//lib/prism/mutation_compiler.rb#735 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:738 def visit_undef_node(node); end # Copy a UnlessNode node # - # source://prism//lib/prism/mutation_compiler.rb#740 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:743 def visit_unless_node(node); end # Copy a UntilNode node # - # source://prism//lib/prism/mutation_compiler.rb#745 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:748 def visit_until_node(node); end # Copy a WhenNode node # - # source://prism//lib/prism/mutation_compiler.rb#750 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:753 def visit_when_node(node); end # Copy a WhileNode node # - # source://prism//lib/prism/mutation_compiler.rb#755 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:758 def visit_while_node(node); end # Copy a XStringNode node # - # source://prism//lib/prism/mutation_compiler.rb#760 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:763 def visit_x_string_node(node); end # Copy a YieldNode node # - # source://prism//lib/prism/mutation_compiler.rb#765 + # pkg:gem/prism#lib/prism/mutation_compiler.rb:768 def visit_yield_node(node); end end @@ -26334,13 +26354,11 @@ end # next 1 # ^^^^^^ # -# source://prism//lib/prism/node.rb#13389 +# pkg:gem/prism#lib/prism/node.rb:14375 class Prism::NextNode < ::Prism::Node # Initialize a new NextNode node. # - # @return [NextNode] a new instance of NextNode - # - # source://prism//lib/prism/node.rb#13391 + # pkg:gem/prism#lib/prism/node.rb:14377 sig do params( source: Prism::Source, @@ -26356,42 +26374,42 @@ class Prism::NextNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13473 + # pkg:gem/prism#lib/prism/node.rb:14466 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13401 + # pkg:gem/prism#lib/prism/node.rb:14387 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#13436 + # pkg:gem/prism#lib/prism/node.rb:14429 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13406 + # pkg:gem/prism#lib/prism/node.rb:14392 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13418 + # pkg:gem/prism#lib/prism/node.rb:14411 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13411 + # pkg:gem/prism#lib/prism/node.rb:14404 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?arguments: ArgumentsNode?, ?keyword_loc: Location) -> NextNode # - # source://prism//lib/prism/node.rb#13423 + # pkg:gem/prism#lib/prism/node.rb:14416 sig do params( node_id: Integer, @@ -26401,58 +26419,62 @@ class Prism::NextNode < ::Prism::Node keyword_loc: Prism::Location ).returns(Prism::NextNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, arguments: self.arguments, keyword_loc: self.keyword_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13406 + # pkg:gem/prism#lib/prism/node.rb:14421 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: ArgumentsNode?, keyword_loc: Location } # - # source://prism//lib/prism/node.rb#13431 + # pkg:gem/prism#lib/prism/node.rb:14424 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:14397 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#13457 + # pkg:gem/prism#lib/prism/node.rb:14450 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#13452 + # pkg:gem/prism#lib/prism/node.rb:14445 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#13439 + # pkg:gem/prism#lib/prism/node.rb:14432 sig { returns(Prism::Location) } def keyword_loc; end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#13447 + # pkg:gem/prism#lib/prism/node.rb:14440 def save_keyword_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#13462 + # pkg:gem/prism#lib/prism/node.rb:14455 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#13467 + # pkg:gem/prism#lib/prism/node.rb:14460 def type; end end end @@ -26462,84 +26484,86 @@ end # nil # ^^^ # -# source://prism//lib/prism/node.rb#13484 +# pkg:gem/prism#lib/prism/node.rb:14477 class Prism::NilNode < ::Prism::Node # Initialize a new NilNode node. # - # @return [NilNode] a new instance of NilNode - # - # source://prism//lib/prism/node.rb#13486 + # pkg:gem/prism#lib/prism/node.rb:14479 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13543 + # pkg:gem/prism#lib/prism/node.rb:14542 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13494 + # pkg:gem/prism#lib/prism/node.rb:14487 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13499 + # pkg:gem/prism#lib/prism/node.rb:14492 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13509 + # pkg:gem/prism#lib/prism/node.rb:14508 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13504 + # pkg:gem/prism#lib/prism/node.rb:14503 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> NilNode # - # source://prism//lib/prism/node.rb#13514 + # pkg:gem/prism#lib/prism/node.rb:14513 sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::NilNode) } - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13499 + # pkg:gem/prism#lib/prism/node.rb:14518 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#13522 + # pkg:gem/prism#lib/prism/node.rb:14521 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:14497 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#13527 + # pkg:gem/prism#lib/prism/node.rb:14526 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#13532 + # pkg:gem/prism#lib/prism/node.rb:14531 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#13537 + # pkg:gem/prism#lib/prism/node.rb:14536 def type; end end end @@ -26550,13 +26574,11 @@ end # ^^^^^ # end # -# source://prism//lib/prism/node.rb#13553 +# pkg:gem/prism#lib/prism/node.rb:14552 class Prism::NoKeywordsParameterNode < ::Prism::Node # Initialize a new NoKeywordsParameterNode node. # - # @return [NoKeywordsParameterNode] a new instance of NoKeywordsParameterNode - # - # source://prism//lib/prism/node.rb#13555 + # pkg:gem/prism#lib/prism/node.rb:14554 sig do params( source: Prism::Source, @@ -26572,36 +26594,36 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13650 + # pkg:gem/prism#lib/prism/node.rb:14655 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13565 + # pkg:gem/prism#lib/prism/node.rb:14564 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13570 + # pkg:gem/prism#lib/prism/node.rb:14569 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13580 + # pkg:gem/prism#lib/prism/node.rb:14585 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13575 + # pkg:gem/prism#lib/prism/node.rb:14580 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?keyword_loc: Location) -> NoKeywordsParameterNode # - # source://prism//lib/prism/node.rb#13585 + # pkg:gem/prism#lib/prism/node.rb:14590 sig do params( node_id: Integer, @@ -26611,76 +26633,80 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node keyword_loc: Prism::Location ).returns(Prism::NoKeywordsParameterNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, operator_loc: self.operator_loc, keyword_loc: self.keyword_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13570 + # pkg:gem/prism#lib/prism/node.rb:14595 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, keyword_loc: Location } # - # source://prism//lib/prism/node.rb#13593 + # pkg:gem/prism#lib/prism/node.rb:14598 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:14574 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#13634 + # pkg:gem/prism#lib/prism/node.rb:14639 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#13629 + # pkg:gem/prism#lib/prism/node.rb:14634 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#13611 + # pkg:gem/prism#lib/prism/node.rb:14616 sig { returns(Prism::Location) } def keyword_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#13624 + # pkg:gem/prism#lib/prism/node.rb:14629 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#13598 + # pkg:gem/prism#lib/prism/node.rb:14603 sig { returns(Prism::Location) } def operator_loc; end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#13619 + # pkg:gem/prism#lib/prism/node.rb:14624 def save_keyword_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#13606 + # pkg:gem/prism#lib/prism/node.rb:14611 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#13639 + # pkg:gem/prism#lib/prism/node.rb:14644 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#13644 + # pkg:gem/prism#lib/prism/node.rb:14649 def type; end end end @@ -26688,160 +26714,164 @@ end # This represents a node in the tree. It is the parent class of all of the # various node types. # -# source://prism//lib/prism/node.rb#12 +# pkg:gem/prism#lib/prism/node.rb:15 class Prism::Node abstract! # Accepts a visitor and calls back into the specialized visit function. # - # @raise [NoMethodError] - # - # source://prism//lib/prism/node.rb#258 + # pkg:gem/prism#lib/prism/node.rb:269 sig { abstract.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # Returns the first node that matches the given block when visited in a - # depth-first search. This is useful for finding a node that matches a + # breadth-first search. This is useful for finding a node that matches a # particular condition. # # node.breadth_first_search { |node| node.node_id == node_id } # - # source://prism//lib/prism/node.rb#228 + # pkg:gem/prism#lib/prism/node.rb:219 sig { params(block: T.proc.params(node: Prism::Node).returns(T::Boolean)).returns(T.nilable(Prism::Node)) } def breadth_first_search(&block); end + # Returns all of the nodes that match the given block when visited in a + # breadth-first search. This is useful for finding all nodes that match a + # particular condition. + # + # node.breadth_first_search_all { |node| node.is_a?(Prism::CallNode) } + # + # pkg:gem/prism#lib/prism/node.rb:237 + sig { params(block: T.proc.params(node: Prism::Node).returns(T::Boolean)).returns(T::Array[Prism::Node]) } + def breadth_first_search_all(&block); end + # Delegates to the cached_end_code_units_column of the associated location # object. # - # source://prism//lib/prism/node.rb#115 + # pkg:gem/prism#lib/prism/node.rb:118 def cached_end_code_units_column(cache); end # Delegates to the cached_end_code_units_offset of the associated location # object. # - # source://prism//lib/prism/node.rb#83 + # pkg:gem/prism#lib/prism/node.rb:86 def cached_end_code_units_offset(cache); end # Delegates to the cached_start_code_units_column of the associated location # object. # - # source://prism//lib/prism/node.rb#109 + # pkg:gem/prism#lib/prism/node.rb:112 def cached_start_code_units_column(cache); end # Delegates to the cached_start_code_units_offset of the associated location # object. # - # source://prism//lib/prism/node.rb#77 + # pkg:gem/prism#lib/prism/node.rb:80 def cached_start_code_units_offset(cache); end # Returns an array of child nodes, including `nil`s in the place of optional # nodes that were not present. # - # @raise [NoMethodError] - # - # source://prism//lib/prism/node.rb#264 + # pkg:gem/prism#lib/prism/node.rb:275 sig { abstract.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # Returns an array of child nodes and locations that could potentially have # comments attached to them. # - # @raise [NoMethodError] - # - # source://prism//lib/prism/node.rb#278 + # pkg:gem/prism#lib/prism/node.rb:296 sig { abstract.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # Delegates to the comments of the associated location object. # - # source://prism//lib/prism/node.rb#130 + # pkg:gem/prism#lib/prism/node.rb:133 def comments; end # Returns an array of child nodes, excluding any `nil`s in the place of # optional nodes that were not present. # - # @raise [NoMethodError] - # - # source://prism//lib/prism/node.rb#272 + # pkg:gem/prism#lib/prism/node.rb:290 sig { abstract.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # Returns an array of child nodes, including `nil`s in the place of optional - # nodes that were not present. - # - # @raise [NoMethodError] - # - # source://prism//lib/prism/node.rb#264 + # pkg:gem/prism#lib/prism/node.rb:279 sig { abstract.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # source://prism//lib/prism/node_ext.rb#7 + # pkg:gem/prism#lib/prism/node_ext.rb:10 def deprecated(*replacements); end + # With a block given, yields each child node. Without a block, returns + # an enumerator that contains each child node. Excludes any `nil`s in + # the place of optional nodes that were not present. + # + # pkg:gem/prism#lib/prism/node.rb:284 + def each_child_node; end + # Delegates to the end_character_column of the associated location object. # - # source://prism//lib/prism/node.rb#103 + # pkg:gem/prism#lib/prism/node.rb:106 def end_character_column; end # Delegates to the end_character_offset of the associated location object. # - # source://prism//lib/prism/node.rb#71 + # pkg:gem/prism#lib/prism/node.rb:74 def end_character_offset; end # Delegates to the end_column of the associated location object. # - # source://prism//lib/prism/node.rb#93 + # pkg:gem/prism#lib/prism/node.rb:96 def end_column; end # Delegates to the end_line of the associated location object. # - # source://prism//lib/prism/node.rb#47 + # pkg:gem/prism#lib/prism/node.rb:50 def end_line; end # The end offset of the node in the source. This method is effectively a # delegate method to the location object. # - # source://prism//lib/prism/node.rb#60 + # pkg:gem/prism#lib/prism/node.rb:63 sig { returns(Integer) } def end_offset; end sig { abstract.returns(T::Array[Prism::Reflection::Field]) } def fields; end + # pkg:gem/prism#lib/prism/node.rb:229 + def find(&block); end + + # pkg:gem/prism#lib/prism/node.rb:248 + def find_all(&block); end + # Returns a string representation of the node. # - # @raise [NoMethodError] - # - # source://prism//lib/prism/node.rb#283 + # pkg:gem/prism#lib/prism/node.rb:301 sig { abstract.returns(String) } def inspect; end # Delegates to the leading_comments of the associated location object. # - # source://prism//lib/prism/node.rb#120 + # pkg:gem/prism#lib/prism/node.rb:123 def leading_comments; end # A Location instance that represents the location of this node in the # source. # - # source://prism//lib/prism/node.rb#30 + # pkg:gem/prism#lib/prism/node.rb:33 sig { returns(Prism::Location) } def location; end # Returns true if the node has the newline flag set. # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#161 + # pkg:gem/prism#lib/prism/node.rb:164 sig { returns(T::Boolean) } def newline?; end - # source://prism//lib/prism/parse_result/newlines.rb#69 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:70 def newline_flag!(lines); end - # @return [Boolean] - # - # source://prism//lib/prism/parse_result/newlines.rb#65 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:66 def newline_flag?; end # A unique identifier for this node. This is used in a very specific @@ -26849,38 +26879,37 @@ class Prism::Node # having to keep around the syntax tree in memory. This unique identifier # will be consistent across multiple parses of the same source code. # - # source://prism//lib/prism/node.rb#21 + # pkg:gem/prism#lib/prism/node.rb:24 sig { returns(Integer) } def node_id; end # Similar to inspect, but respects the current level of indentation given by # the pretty print object. # - # source://prism//lib/prism/node.rb#172 + # pkg:gem/prism#lib/prism/node.rb:175 sig { params(q: T.untyped).void } def pretty_print(q); end # Save this node using a saved source so that it can be retrieved later. # - # source://prism//lib/prism/node.rb#24 + # pkg:gem/prism#lib/prism/node.rb:27 def save(repository); end # Save the location using a saved source so that it can be retrieved later. # - # source://prism//lib/prism/node.rb#37 + # pkg:gem/prism#lib/prism/node.rb:40 def save_location(repository); end - # Returns all of the lines of the source code associated with this node. # An alias for source_lines, used to mimic the API from # RubyVM::AbstractSyntaxTree to make it easier to migrate. # - # source://prism//lib/prism/node.rb#135 + # pkg:gem/prism#lib/prism/node.rb:144 sig { returns(T::Array[String]) } def script_lines; end # Slice the location of the node from the source. # - # source://prism//lib/prism/node.rb#144 + # pkg:gem/prism#lib/prism/node.rb:147 sig { returns(String) } def slice; end @@ -26888,60 +26917,58 @@ class Prism::Node # of the line that the location starts on, ending at the end of the line # that the location ends on. # - # source://prism//lib/prism/node.rb#151 + # pkg:gem/prism#lib/prism/node.rb:154 sig { returns(String) } def slice_lines; end # Returns all of the lines of the source code associated with this node. # - # source://prism//lib/prism/node.rb#135 + # pkg:gem/prism#lib/prism/node.rb:138 sig { returns(T::Array[String]) } def source_lines; end # Delegates to the start_character_column of the associated location object. # - # source://prism//lib/prism/node.rb#98 + # pkg:gem/prism#lib/prism/node.rb:101 def start_character_column; end # Delegates to the start_character_offset of the associated location object. # - # source://prism//lib/prism/node.rb#66 + # pkg:gem/prism#lib/prism/node.rb:69 def start_character_offset; end # Delegates to the start_column of the associated location object. # - # source://prism//lib/prism/node.rb#88 + # pkg:gem/prism#lib/prism/node.rb:91 def start_column; end # Delegates to the start_line of the associated location object. # - # source://prism//lib/prism/node.rb#42 + # pkg:gem/prism#lib/prism/node.rb:45 def start_line; end # The start offset of the node in the source. This method is effectively a # delegate method to the location object. # - # source://prism//lib/prism/node.rb#53 + # pkg:gem/prism#lib/prism/node.rb:56 sig { returns(Integer) } def start_offset; end # Returns true if the node has the static literal flag set. # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#166 + # pkg:gem/prism#lib/prism/node.rb:169 sig { returns(T::Boolean) } def static_literal?; end # Convert this node into a graphviz dot graph string. # - # source://prism//lib/prism/node.rb#180 + # pkg:gem/prism#lib/prism/node.rb:183 sig { returns(String) } def to_dot; end # Delegates to the trailing_comments of the associated location object. # - # source://prism//lib/prism/node.rb#125 + # pkg:gem/prism#lib/prism/node.rb:128 def trailing_comments; end # Returns a list of nodes that are descendants of this node that contain the @@ -26951,7 +26978,7 @@ class Prism::Node # Important to note is that the column given to this method should be in # bytes, as opposed to characters or code units. # - # source://prism//lib/prism/node.rb#191 + # pkg:gem/prism#lib/prism/node.rb:194 sig { params(line: Integer, column: Integer).returns(T::Array[Prism::Node]) } def tunnel(line, column); end @@ -26968,9 +26995,7 @@ class Prism::Node # you can take advantage of the fact that case statements with all symbol # keys will use a jump table. # - # @raise [NoMethodError] - # - # source://prism//lib/prism/node.rb#299 + # pkg:gem/prism#lib/prism/node.rb:317 sig { abstract.returns(Symbol) } def type; end @@ -26979,7 +27004,7 @@ class Prism::Node # An bitset of flags for this node. There are certain flags that are common # for all nodes, and then some nodes have specific flags. # - # source://prism//lib/prism/node.rb#157 + # pkg:gem/prism#lib/prism/node.rb:160 sig { returns(Integer) } def flags; end @@ -26987,7 +27012,7 @@ class Prism::Node # A pointer to the source that this node was created from. # - # source://prism//lib/prism/node.rb#14 + # pkg:gem/prism#lib/prism/node.rb:17 sig { returns(Prism::Source) } def source; end @@ -26996,9 +27021,7 @@ class Prism::Node # describe the structure of the node. This kind of reflection is useful for # things like recursively visiting each node _and_ field in the tree. # - # @raise [NoMethodError] - # - # source://prism//lib/prism/node.rb#242 + # pkg:gem/prism#lib/prism/node.rb:253 def fields; end # Similar to #type, this method returns a symbol that you can use for @@ -27006,28 +27029,26 @@ class Prism::Node # Note that like #type, it will still be slower than using == for a single # class, but should be faster in a case statement or an array comparison. # - # @raise [NoMethodError] - # - # source://prism//lib/prism/node.rb#307 + # pkg:gem/prism#lib/prism/node.rb:325 def type; end end end # The flags that are common to all nodes. # -# source://prism//lib/prism/node.rb#18636 +# pkg:gem/prism#lib/prism/node.rb:19957 module Prism::NodeFlags; end # A flag to indicate that the node is a candidate to emit a :line event # through tracepoint when compiled. # -# source://prism//lib/prism/node.rb#18639 +# pkg:gem/prism#lib/prism/node.rb:19960 Prism::NodeFlags::NEWLINE = T.let(T.unsafe(nil), Integer) # A flag to indicate that the value that the node represents is a value that # can be determined at parse-time. # -# source://prism//lib/prism/node.rb#18643 +# pkg:gem/prism#lib/prism/node.rb:19964 Prism::NodeFlags::STATIC_LITERAL = T.let(T.unsafe(nil), Integer) # Represents an implicit set of parameters through the use of numbered parameters within a block or lambda. @@ -27035,13 +27056,11 @@ Prism::NodeFlags::STATIC_LITERAL = T.let(T.unsafe(nil), Integer) # -> { _1 + _2 } # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13661 +# pkg:gem/prism#lib/prism/node.rb:14666 class Prism::NumberedParametersNode < ::Prism::Node # Initialize a new NumberedParametersNode node. # - # @return [NumberedParametersNode] a new instance of NumberedParametersNode - # - # source://prism//lib/prism/node.rb#13663 + # pkg:gem/prism#lib/prism/node.rb:14668 sig do params( source: Prism::Source, @@ -27056,36 +27075,36 @@ class Prism::NumberedParametersNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13724 + # pkg:gem/prism#lib/prism/node.rb:14735 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13672 + # pkg:gem/prism#lib/prism/node.rb:14677 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13677 + # pkg:gem/prism#lib/prism/node.rb:14682 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13687 + # pkg:gem/prism#lib/prism/node.rb:14698 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13682 + # pkg:gem/prism#lib/prism/node.rb:14693 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?maximum: Integer) -> NumberedParametersNode # - # source://prism//lib/prism/node.rb#13692 + # pkg:gem/prism#lib/prism/node.rb:14703 sig do params( node_id: Integer, @@ -27094,46 +27113,50 @@ class Prism::NumberedParametersNode < ::Prism::Node maximum: Integer ).returns(Prism::NumberedParametersNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), maximum: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, maximum: self.maximum); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13677 + # pkg:gem/prism#lib/prism/node.rb:14708 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, maximum: Integer } # - # source://prism//lib/prism/node.rb#13700 + # pkg:gem/prism#lib/prism/node.rb:14711 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:14687 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#13708 + # pkg:gem/prism#lib/prism/node.rb:14719 sig { override.returns(String) } def inspect; end # attr_reader maximum: Integer # - # source://prism//lib/prism/node.rb#13705 + # pkg:gem/prism#lib/prism/node.rb:14716 sig { returns(Integer) } def maximum; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#13713 + # pkg:gem/prism#lib/prism/node.rb:14724 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#13718 + # pkg:gem/prism#lib/prism/node.rb:14729 def type; end end end @@ -27143,13 +27166,11 @@ end # $1 # ^^ # -# source://prism//lib/prism/node.rb#13734 +# pkg:gem/prism#lib/prism/node.rb:14745 class Prism::NumberedReferenceReadNode < ::Prism::Node # Initialize a new NumberedReferenceReadNode node. # - # @return [NumberedReferenceReadNode] a new instance of NumberedReferenceReadNode - # - # source://prism//lib/prism/node.rb#13736 + # pkg:gem/prism#lib/prism/node.rb:14747 sig do params( source: Prism::Source, @@ -27164,36 +27185,36 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13803 + # pkg:gem/prism#lib/prism/node.rb:14820 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13745 + # pkg:gem/prism#lib/prism/node.rb:14756 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13750 + # pkg:gem/prism#lib/prism/node.rb:14761 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13760 + # pkg:gem/prism#lib/prism/node.rb:14777 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13755 + # pkg:gem/prism#lib/prism/node.rb:14772 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?number: Integer) -> NumberedReferenceReadNode # - # source://prism//lib/prism/node.rb#13765 + # pkg:gem/prism#lib/prism/node.rb:14782 sig do params( node_id: Integer, @@ -27202,27 +27223,31 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node number: Integer ).returns(Prism::NumberedReferenceReadNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), number: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, number: self.number); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13750 + # pkg:gem/prism#lib/prism/node.rb:14787 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, number: Integer } # - # source://prism//lib/prism/node.rb#13773 + # pkg:gem/prism#lib/prism/node.rb:14790 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:14766 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#13787 + # pkg:gem/prism#lib/prism/node.rb:14804 sig { override.returns(String) } def inspect; end @@ -27234,20 +27259,20 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # # $4294967296 # number `0` # - # source://prism//lib/prism/node.rb#13784 + # pkg:gem/prism#lib/prism/node.rb:14801 sig { returns(Integer) } def number; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#13792 + # pkg:gem/prism#lib/prism/node.rb:14809 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#13797 + # pkg:gem/prism#lib/prism/node.rb:14814 def type; end end end @@ -27258,13 +27283,11 @@ end # ^^^^ # end # -# source://prism//lib/prism/node.rb#13814 +# pkg:gem/prism#lib/prism/node.rb:14831 class Prism::OptionalKeywordParameterNode < ::Prism::Node # Initialize a new OptionalKeywordParameterNode node. # - # @return [OptionalKeywordParameterNode] a new instance of OptionalKeywordParameterNode - # - # source://prism//lib/prism/node.rb#13816 + # pkg:gem/prism#lib/prism/node.rb:14833 sig do params( source: Prism::Source, @@ -27281,36 +27304,36 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13900 + # pkg:gem/prism#lib/prism/node.rb:14924 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13827 + # pkg:gem/prism#lib/prism/node.rb:14844 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13832 + # pkg:gem/prism#lib/prism/node.rb:14849 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13842 + # pkg:gem/prism#lib/prism/node.rb:14866 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13837 + # pkg:gem/prism#lib/prism/node.rb:14861 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node) -> OptionalKeywordParameterNode # - # source://prism//lib/prism/node.rb#13847 + # pkg:gem/prism#lib/prism/node.rb:14871 sig do params( node_id: Integer, @@ -27321,72 +27344,74 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node value: Prism::Node ).returns(Prism::OptionalKeywordParameterNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, value: self.value); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13832 + # pkg:gem/prism#lib/prism/node.rb:14876 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#13855 + # pkg:gem/prism#lib/prism/node.rb:14879 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:14854 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#13884 + # pkg:gem/prism#lib/prism/node.rb:14908 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#13865 + # pkg:gem/prism#lib/prism/node.rb:14889 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#13868 + # pkg:gem/prism#lib/prism/node.rb:14892 sig { returns(Prism::Location) } def name_loc; end # def repeated_parameter?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#13860 + # pkg:gem/prism#lib/prism/node.rb:14884 sig { returns(T::Boolean) } def repeated_parameter?; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#13876 + # pkg:gem/prism#lib/prism/node.rb:14900 def save_name_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#13889 + # pkg:gem/prism#lib/prism/node.rb:14913 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#13881 + # pkg:gem/prism#lib/prism/node.rb:14905 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#13894 + # pkg:gem/prism#lib/prism/node.rb:14918 def type; end end end @@ -27397,13 +27422,11 @@ end # ^^^^^ # end # -# source://prism//lib/prism/node.rb#13914 +# pkg:gem/prism#lib/prism/node.rb:14938 class Prism::OptionalParameterNode < ::Prism::Node # Initialize a new OptionalParameterNode node. # - # @return [OptionalParameterNode] a new instance of OptionalParameterNode - # - # source://prism//lib/prism/node.rb#13916 + # pkg:gem/prism#lib/prism/node.rb:14940 sig do params( source: Prism::Source, @@ -27421,36 +27444,36 @@ class Prism::OptionalParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14019 + # pkg:gem/prism#lib/prism/node.rb:15050 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13928 + # pkg:gem/prism#lib/prism/node.rb:14952 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13933 + # pkg:gem/prism#lib/prism/node.rb:14957 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13943 + # pkg:gem/prism#lib/prism/node.rb:14974 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13938 + # pkg:gem/prism#lib/prism/node.rb:14969 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> OptionalParameterNode # - # source://prism//lib/prism/node.rb#13948 + # pkg:gem/prism#lib/prism/node.rb:14979 sig do params( node_id: Integer, @@ -27462,90 +27485,92 @@ class Prism::OptionalParameterNode < ::Prism::Node value: Prism::Node ).returns(Prism::OptionalParameterNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, operator_loc: self.operator_loc, value: self.value); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#13933 + # pkg:gem/prism#lib/prism/node.rb:14984 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#13956 + # pkg:gem/prism#lib/prism/node.rb:14987 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:14962 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#14003 + # pkg:gem/prism#lib/prism/node.rb:15034 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#13966 + # pkg:gem/prism#lib/prism/node.rb:14997 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#13969 + # pkg:gem/prism#lib/prism/node.rb:15000 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#13998 + # pkg:gem/prism#lib/prism/node.rb:15029 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#13982 + # pkg:gem/prism#lib/prism/node.rb:15013 sig { returns(Prism::Location) } def operator_loc; end # def repeated_parameter?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#13961 + # pkg:gem/prism#lib/prism/node.rb:14992 sig { returns(T::Boolean) } def repeated_parameter?; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#13977 + # pkg:gem/prism#lib/prism/node.rb:15008 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#13990 + # pkg:gem/prism#lib/prism/node.rb:15021 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#14008 + # pkg:gem/prism#lib/prism/node.rb:15039 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#13995 + # pkg:gem/prism#lib/prism/node.rb:15026 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#14013 + # pkg:gem/prism#lib/prism/node.rb:15044 def type; end end end @@ -27555,13 +27580,11 @@ end # left or right # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#14033 +# pkg:gem/prism#lib/prism/node.rb:15064 class Prism::OrNode < ::Prism::Node # Initialize a new OrNode node. # - # @return [OrNode] a new instance of OrNode - # - # source://prism//lib/prism/node.rb#14035 + # pkg:gem/prism#lib/prism/node.rb:15066 sig do params( source: Prism::Source, @@ -27578,36 +27601,36 @@ class Prism::OrNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14134 + # pkg:gem/prism#lib/prism/node.rb:15173 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14046 + # pkg:gem/prism#lib/prism/node.rb:15077 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14051 + # pkg:gem/prism#lib/prism/node.rb:15082 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14061 + # pkg:gem/prism#lib/prism/node.rb:15100 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14056 + # pkg:gem/prism#lib/prism/node.rb:15095 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node, ?right: Prism::node, ?operator_loc: Location) -> OrNode # - # source://prism//lib/prism/node.rb#14066 + # pkg:gem/prism#lib/prism/node.rb:15105 sig do params( node_id: Integer, @@ -27618,27 +27641,31 @@ class Prism::OrNode < ::Prism::Node operator_loc: Prism::Location ).returns(Prism::OrNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, left: self.left, right: self.right, operator_loc: self.operator_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14051 + # pkg:gem/prism#lib/prism/node.rb:15110 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#14074 + # pkg:gem/prism#lib/prism/node.rb:15113 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:15087 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#14118 + # pkg:gem/prism#lib/prism/node.rb:15157 sig { override.returns(String) } def inspect; end @@ -27650,13 +27677,13 @@ class Prism::OrNode < ::Prism::Node # 1 || 2 # ^ # - # source://prism//lib/prism/node.rb#14085 + # pkg:gem/prism#lib/prism/node.rb:15124 sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#14113 + # pkg:gem/prism#lib/prism/node.rb:15152 sig { returns(String) } def operator; end @@ -27665,7 +27692,7 @@ class Prism::OrNode < ::Prism::Node # left or right # ^^ # - # source://prism//lib/prism/node.rb#14100 + # pkg:gem/prism#lib/prism/node.rb:15139 sig { returns(Prism::Location) } def operator_loc; end @@ -27677,280 +27704,277 @@ class Prism::OrNode < ::Prism::Node # 1 or 2 # ^ # - # source://prism//lib/prism/node.rb#14094 + # pkg:gem/prism#lib/prism/node.rb:15133 sig { returns(Prism::Node) } def right; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#14108 + # pkg:gem/prism#lib/prism/node.rb:15147 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#14123 + # pkg:gem/prism#lib/prism/node.rb:15162 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#14128 + # pkg:gem/prism#lib/prism/node.rb:15167 def type; end end end # A parser for the pack template language. # -# source://prism//lib/prism/pack.rb#6 +# pkg:gem/prism#lib/prism/pack.rb:8 module Prism::Pack class << self + # pkg:gem/prism#lib/prism.rb:92 def parse(_arg0, _arg1, _arg2); end end end -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::AGNOSTIC_ENDIAN = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::BACK = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::BER = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::BIG_ENDIAN = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::COMMENT = T.let(T.unsafe(nil), Symbol) # A directive in the pack template language. # -# source://prism//lib/prism/pack.rb#60 +# pkg:gem/prism#lib/prism/pack.rb:62 class Prism::Pack::Directive # Initialize a new directive with the given values. # - # @return [Directive] a new instance of Directive - # - # source://prism//lib/prism/pack.rb#89 + # pkg:gem/prism#lib/prism/pack.rb:91 def initialize(version, variant, source, type, signed, endian, size, length_type, length); end # Provide a human-readable description of the directive. # - # source://prism//lib/prism/pack.rb#131 + # pkg:gem/prism#lib/prism/pack.rb:133 def describe; end # The type of endianness of the directive. # - # source://prism//lib/prism/pack.rb#77 + # pkg:gem/prism#lib/prism/pack.rb:79 def endian; end # The length of this directive (used for integers). # - # source://prism//lib/prism/pack.rb#86 + # pkg:gem/prism#lib/prism/pack.rb:88 def length; end # The length type of this directive (used for integers). # - # source://prism//lib/prism/pack.rb#83 + # pkg:gem/prism#lib/prism/pack.rb:85 def length_type; end # The type of signedness of the directive. # - # source://prism//lib/prism/pack.rb#74 + # pkg:gem/prism#lib/prism/pack.rb:76 def signed; end # The size of the directive. # - # source://prism//lib/prism/pack.rb#80 + # pkg:gem/prism#lib/prism/pack.rb:82 def size; end # A byteslice of the source string that this directive represents. # - # source://prism//lib/prism/pack.rb#68 + # pkg:gem/prism#lib/prism/pack.rb:70 def source; end # The type of the directive. # - # source://prism//lib/prism/pack.rb#71 + # pkg:gem/prism#lib/prism/pack.rb:73 def type; end # A symbol representing whether or not we are packing or unpacking. # - # source://prism//lib/prism/pack.rb#65 + # pkg:gem/prism#lib/prism/pack.rb:67 def variant; end # A symbol representing the version of Ruby. # - # source://prism//lib/prism/pack.rb#62 + # pkg:gem/prism#lib/prism/pack.rb:64 def version; end end # The descriptions of the various types of endianness. # -# source://prism//lib/prism/pack.rb#102 +# pkg:gem/prism#lib/prism/pack.rb:104 Prism::Pack::Directive::ENDIAN_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) # The descriptions of the various types of signedness. # -# source://prism//lib/prism/pack.rb#111 +# pkg:gem/prism#lib/prism/pack.rb:113 Prism::Pack::Directive::SIGNED_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) # The descriptions of the various types of sizes. # -# source://prism//lib/prism/pack.rb#118 +# pkg:gem/prism#lib/prism/pack.rb:120 Prism::Pack::Directive::SIZE_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::ENDIAN_NA = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::FLOAT = T.let(T.unsafe(nil), Symbol) # The result of parsing a pack template. # -# source://prism//lib/prism/pack.rb#198 +# pkg:gem/prism#lib/prism/pack.rb:200 class Prism::Pack::Format # Create a new Format with the given directives and encoding. # - # @return [Format] a new instance of Format - # - # source://prism//lib/prism/pack.rb#206 + # pkg:gem/prism#lib/prism/pack.rb:208 def initialize(directives, encoding); end # Provide a human-readable description of the format. # - # source://prism//lib/prism/pack.rb#212 + # pkg:gem/prism#lib/prism/pack.rb:214 def describe; end # A list of the directives in the template. # - # source://prism//lib/prism/pack.rb#200 + # pkg:gem/prism#lib/prism/pack.rb:202 def directives; end # The encoding of the template. # - # source://prism//lib/prism/pack.rb#203 + # pkg:gem/prism#lib/prism/pack.rb:205 def encoding; end end -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::INTEGER = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::LENGTH_FIXED = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::LENGTH_MAX = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::LENGTH_NA = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::LENGTH_RELATIVE = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::LITTLE_ENDIAN = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::MOVE = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::NATIVE_ENDIAN = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::NULL = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::SIGNED = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::SIGNED_NA = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::SIZE_16 = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::SIZE_32 = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::SIZE_64 = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::SIZE_8 = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::SIZE_INT = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::SIZE_LONG = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::SIZE_LONG_LONG = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::SIZE_NA = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::SIZE_P = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::SIZE_SHORT = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::SPACE = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::STRING_BASE64 = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::STRING_FIXED = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::STRING_HEX_HIGH = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::STRING_HEX_LOW = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::STRING_LSB = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::STRING_MIME = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::STRING_MSB = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::STRING_NULL_PADDED = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::STRING_NULL_TERMINATED = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::STRING_POINTER = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::STRING_SPACE_PADDED = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::STRING_UU = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::UNSIGNED = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#56 +# pkg:gem/prism#lib/prism/pack.rb:58 Prism::Pack::UTF8 = T.let(T.unsafe(nil), Symbol) # Flags for parameter nodes. # -# source://prism//lib/prism/node.rb#18543 +# pkg:gem/prism#lib/prism/node.rb:19864 module Prism::ParameterFlags; end # a parameter name that has been repeated in the method signature # -# source://prism//lib/prism/node.rb#18545 +# pkg:gem/prism#lib/prism/node.rb:19866 Prism::ParameterFlags::REPEATED_PARAMETER = T.let(T.unsafe(nil), Integer) # Represents the list of parameters on a method, block, or lambda definition. @@ -27959,13 +27983,11 @@ Prism::ParameterFlags::REPEATED_PARAMETER = T.let(T.unsafe(nil), Integer) # ^^^^^^^ # end # -# source://prism//lib/prism/node.rb#14147 +# pkg:gem/prism#lib/prism/node.rb:15186 class Prism::ParametersNode < ::Prism::Node # Initialize a new ParametersNode node. # - # @return [ParametersNode] a new instance of ParametersNode - # - # source://prism//lib/prism/node.rb#14149 + # pkg:gem/prism#lib/prism/node.rb:15188 sig do params( source: Prism::Source, @@ -27986,42 +28008,42 @@ class Prism::ParametersNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14242 + # pkg:gem/prism#lib/prism/node.rb:15294 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14164 + # pkg:gem/prism#lib/prism/node.rb:15203 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader block: BlockParameterNode? # - # source://prism//lib/prism/node.rb#14223 + # pkg:gem/prism#lib/prism/node.rb:15275 sig { returns(T.nilable(Prism::BlockParameterNode)) } def block; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14169 + # pkg:gem/prism#lib/prism/node.rb:15208 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14187 + # pkg:gem/prism#lib/prism/node.rb:15239 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14174 + # pkg:gem/prism#lib/prism/node.rb:15226 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?requireds: Array[RequiredParameterNode | MultiTargetNode], ?optionals: Array[OptionalParameterNode], ?rest: RestParameterNode | ImplicitRestNode | nil, ?posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode], ?keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], ?keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, ?block: BlockParameterNode?) -> ParametersNode # - # source://prism//lib/prism/node.rb#14192 + # pkg:gem/prism#lib/prism/node.rb:15244 sig do params( node_id: Integer, @@ -28036,33 +28058,37 @@ class Prism::ParametersNode < ::Prism::Node block: T.nilable(Prism::BlockParameterNode) ).returns(Prism::ParametersNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), requireds: T.unsafe(nil), optionals: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), block: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, requireds: self.requireds, optionals: self.optionals, rest: self.rest, posts: self.posts, keywords: self.keywords, keyword_rest: self.keyword_rest, block: self.block); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14169 + # pkg:gem/prism#lib/prism/node.rb:15249 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, requireds: Array[RequiredParameterNode | MultiTargetNode], optionals: Array[OptionalParameterNode], rest: RestParameterNode | ImplicitRestNode | nil, posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode], keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, block: BlockParameterNode? } # - # source://prism//lib/prism/node.rb#14200 + # pkg:gem/prism#lib/prism/node.rb:15252 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:15213 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#14226 + # pkg:gem/prism#lib/prism/node.rb:15278 sig { override.returns(String) } def inspect; end # attr_reader keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil # - # source://prism//lib/prism/node.rb#14220 + # pkg:gem/prism#lib/prism/node.rb:15272 sig do returns(T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode))) end @@ -28070,19 +28096,19 @@ class Prism::ParametersNode < ::Prism::Node # attr_reader keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode] # - # source://prism//lib/prism/node.rb#14217 + # pkg:gem/prism#lib/prism/node.rb:15269 sig { returns(T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)]) } def keywords; end # attr_reader optionals: Array[OptionalParameterNode] # - # source://prism//lib/prism/node.rb#14208 + # pkg:gem/prism#lib/prism/node.rb:15260 sig { returns(T::Array[Prism::OptionalParameterNode]) } def optionals; end # attr_reader posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode] # - # source://prism//lib/prism/node.rb#14214 + # pkg:gem/prism#lib/prism/node.rb:15266 sig do returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)]) end @@ -28090,32 +28116,32 @@ class Prism::ParametersNode < ::Prism::Node # attr_reader requireds: Array[RequiredParameterNode | MultiTargetNode] # - # source://prism//lib/prism/node.rb#14205 + # pkg:gem/prism#lib/prism/node.rb:15257 sig { returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)]) } def requireds; end # attr_reader rest: RestParameterNode | ImplicitRestNode | nil # - # source://prism//lib/prism/node.rb#14211 + # pkg:gem/prism#lib/prism/node.rb:15263 sig { returns(T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode))) } def rest; end # Mirrors the Method#parameters method. # - # source://prism//lib/prism/node_ext.rb#269 + # pkg:gem/prism#lib/prism/node_ext.rb:272 sig { returns(T::Array[T.any([Symbol, Symbol], [Symbol])]) } def signature; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#14231 + # pkg:gem/prism#lib/prism/node.rb:15283 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#14236 + # pkg:gem/prism#lib/prism/node.rb:15288 def type; end end end @@ -28125,13 +28151,11 @@ end # (10 + 34) # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#14262 +# pkg:gem/prism#lib/prism/node.rb:15314 class Prism::ParenthesesNode < ::Prism::Node # Initialize a new ParenthesesNode node. # - # @return [ParenthesesNode] a new instance of ParenthesesNode - # - # source://prism//lib/prism/node.rb#14264 + # pkg:gem/prism#lib/prism/node.rb:15316 sig do params( source: Prism::Source, @@ -28148,54 +28172,54 @@ class Prism::ParenthesesNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14370 + # pkg:gem/prism#lib/prism/node.rb:15429 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14275 + # pkg:gem/prism#lib/prism/node.rb:15327 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#14315 + # pkg:gem/prism#lib/prism/node.rb:15374 sig { returns(T.nilable(Prism::Node)) } def body; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14280 + # pkg:gem/prism#lib/prism/node.rb:15332 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#14349 + # pkg:gem/prism#lib/prism/node.rb:15408 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#14331 + # pkg:gem/prism#lib/prism/node.rb:15390 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14292 + # pkg:gem/prism#lib/prism/node.rb:15351 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14285 + # pkg:gem/prism#lib/prism/node.rb:15344 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?body: Prism::node?, ?opening_loc: Location, ?closing_loc: Location) -> ParenthesesNode # - # source://prism//lib/prism/node.rb#14297 + # pkg:gem/prism#lib/prism/node.rb:15356 sig do params( node_id: Integer, @@ -28206,148 +28230,146 @@ class Prism::ParenthesesNode < ::Prism::Node closing_loc: Prism::Location ).returns(Prism::ParenthesesNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, body: self.body, opening_loc: self.opening_loc, closing_loc: self.closing_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14280 + # pkg:gem/prism#lib/prism/node.rb:15361 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, body: Prism::node?, opening_loc: Location, closing_loc: Location } # - # source://prism//lib/prism/node.rb#14305 + # pkg:gem/prism#lib/prism/node.rb:15364 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:15337 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#14354 + # pkg:gem/prism#lib/prism/node.rb:15413 sig { override.returns(String) } def inspect; end # def multiple_statements?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#14310 + # pkg:gem/prism#lib/prism/node.rb:15369 sig { returns(T::Boolean) } def multiple_statements?; end - # source://prism//lib/prism/parse_result/newlines.rb#85 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:86 def newline_flag!(lines); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#14344 + # pkg:gem/prism#lib/prism/node.rb:15403 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#14318 + # pkg:gem/prism#lib/prism/node.rb:15377 sig { returns(Prism::Location) } def opening_loc; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#14339 + # pkg:gem/prism#lib/prism/node.rb:15398 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#14326 + # pkg:gem/prism#lib/prism/node.rb:15385 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#14359 + # pkg:gem/prism#lib/prism/node.rb:15418 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#14364 + # pkg:gem/prism#lib/prism/node.rb:15423 def type; end end end # Flags for parentheses nodes. # -# source://prism//lib/prism/node.rb#18549 +# pkg:gem/prism#lib/prism/node.rb:19870 module Prism::ParenthesesNodeFlags; end # parentheses that contain multiple potentially void statements # -# source://prism//lib/prism/node.rb#18551 +# pkg:gem/prism#lib/prism/node.rb:19872 Prism::ParenthesesNodeFlags::MULTIPLE_STATEMENTS = T.let(T.unsafe(nil), Integer) # This represents an error that was encountered during parsing. # -# source://prism//lib/prism/parse_result.rb#609 +# pkg:gem/prism#lib/prism/parse_result.rb:606 class Prism::ParseError # Create a new error object with the given message and location. # - # @return [ParseError] a new instance of ParseError - # - # source://prism//lib/prism/parse_result.rb#624 + # pkg:gem/prism#lib/prism/parse_result.rb:621 sig { params(type: Symbol, message: String, location: Prism::Location, level: Symbol).void } def initialize(type, message, location, level); end # Implement the hash pattern matching interface for ParseError. # - # source://prism//lib/prism/parse_result.rb#632 + # pkg:gem/prism#lib/prism/parse_result.rb:629 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # Returns a string representation of this error. # - # source://prism//lib/prism/parse_result.rb#637 + # pkg:gem/prism#lib/prism/parse_result.rb:634 sig { returns(String) } def inspect; end # The level of this error. # - # source://prism//lib/prism/parse_result.rb#621 + # pkg:gem/prism#lib/prism/parse_result.rb:618 sig { returns(Symbol) } def level; end # A Location object representing the location of this error in the source. # - # source://prism//lib/prism/parse_result.rb#618 + # pkg:gem/prism#lib/prism/parse_result.rb:615 sig { returns(Prism::Location) } def location; end # The message associated with this error. # - # source://prism//lib/prism/parse_result.rb#615 + # pkg:gem/prism#lib/prism/parse_result.rb:612 sig { returns(String) } def message; end # The type of error. This is an _internal_ symbol that is used for # communicating with translation layers. It is not meant to be public API. # - # source://prism//lib/prism/parse_result.rb#612 + # pkg:gem/prism#lib/prism/parse_result.rb:609 sig { returns(Symbol) } def type; end end # This is a result specific to the `parse_lex` and `parse_lex_file` methods. # -# source://prism//lib/prism/parse_result.rb#798 +# pkg:gem/prism#lib/prism/parse_result.rb:795 class Prism::ParseLexResult < ::Prism::Result # Create a new parse lex result object with the given values. # - # @return [ParseLexResult] a new instance of ParseLexResult - # - # source://prism//lib/prism/parse_result.rb#804 + # pkg:gem/prism#lib/prism/parse_result.rb:801 sig do params( value: [Prism::ProgramNode, T::Array[T.untyped]], @@ -28363,27 +28385,25 @@ class Prism::ParseLexResult < ::Prism::Result # Implement the hash pattern matching interface for ParseLexResult. # - # source://prism//lib/prism/parse_result.rb#810 + # pkg:gem/prism#lib/prism/parse_result.rb:807 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # A tuple of the syntax tree and the list of tokens that were parsed from # the source code. # - # source://prism//lib/prism/parse_result.rb#801 + # pkg:gem/prism#lib/prism/parse_result.rb:798 sig { returns([Prism::ProgramNode, T::Array[T.untyped]]) } def value; end end # This is a result specific to the `parse` and `parse_file` methods. # -# source://prism//lib/prism/parse_result.rb#739 +# pkg:gem/prism#lib/prism/parse_result.rb:736 class Prism::ParseResult < ::Prism::Result # Create a new parse result object with the given values. # - # @return [ParseResult] a new instance of ParseResult - # - # source://prism//lib/prism/parse_result.rb#752 + # pkg:gem/prism#lib/prism/parse_result.rb:749 sig do params( value: Prism::ProgramNode, @@ -28399,30 +28419,30 @@ class Prism::ParseResult < ::Prism::Result # Attach the list of comments to their respective locations in the tree. # - # source://prism//lib/prism/parse_result.rb#763 + # pkg:gem/prism#lib/prism/parse_result.rb:760 def attach_comments!; end # Implement the hash pattern matching interface for ParseResult. # - # source://prism//lib/prism/parse_result.rb#758 + # pkg:gem/prism#lib/prism/parse_result.rb:755 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # Returns a string representation of the syntax tree with the errors # displayed inline. # - # source://prism//lib/prism/parse_result.rb#775 + # pkg:gem/prism#lib/prism/parse_result.rb:772 def errors_format; end # Walk the tree and mark nodes that are on a new line, loosely emulating # the behavior of CRuby's `:line` tracepoint event. # - # source://prism//lib/prism/parse_result.rb#769 + # pkg:gem/prism#lib/prism/parse_result.rb:766 def mark_newlines!; end # The syntax tree that was parsed from the source code. # - # source://prism//lib/prism/parse_result.rb#749 + # pkg:gem/prism#lib/prism/parse_result.rb:746 sig { returns(Prism::ProgramNode) } def value; end end @@ -28442,25 +28462,23 @@ end # the comment. Otherwise it will favor attaching to the nearest location # that is after the comment. # -# source://prism//lib/prism/parse_result/comments.rb#19 +# pkg:gem/prism#lib/prism/parse_result/comments.rb:20 class Prism::ParseResult::Comments # Create a new Comments object that will attach comments to the given # parse result. # - # @return [Comments] a new instance of Comments - # - # source://prism//lib/prism/parse_result/comments.rb#86 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:87 def initialize(parse_result); end # Attach the comments to their respective locations in the tree by # mutating the parse result. # - # source://prism//lib/prism/parse_result/comments.rb#92 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:93 def attach!; end # The parse result that we are attaching comments to. # - # source://prism//lib/prism/parse_result/comments.rb#82 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:83 def parse_result; end private @@ -28468,92 +28486,82 @@ class Prism::ParseResult::Comments # Responsible for finding the nearest targets to the given comment within # the context of the given encapsulating node. # - # source://prism//lib/prism/parse_result/comments.rb#119 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:120 def nearest_targets(node, comment); end end # A target for attaching comments that is based on a location field on a # node. For example, the `end` token of a ClassNode. # -# source://prism//lib/prism/parse_result/comments.rb#53 +# pkg:gem/prism#lib/prism/parse_result/comments.rb:54 class Prism::ParseResult::Comments::LocationTarget - # @return [LocationTarget] a new instance of LocationTarget - # - # source://prism//lib/prism/parse_result/comments.rb#56 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:57 def initialize(location); end - # @return [Boolean] - # - # source://prism//lib/prism/parse_result/comments.rb#68 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:69 def encloses?(comment); end - # source://prism//lib/prism/parse_result/comments.rb#64 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:65 def end_offset; end - # source://prism//lib/prism/parse_result/comments.rb#72 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:73 def leading_comment(comment); end - # source://prism//lib/prism/parse_result/comments.rb#54 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:55 def location; end - # source://prism//lib/prism/parse_result/comments.rb#60 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:61 def start_offset; end - # source://prism//lib/prism/parse_result/comments.rb#76 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:77 def trailing_comment(comment); end end # A target for attaching comments that is based on a specific node's # location. # -# source://prism//lib/prism/parse_result/comments.rb#22 +# pkg:gem/prism#lib/prism/parse_result/comments.rb:23 class Prism::ParseResult::Comments::NodeTarget - # @return [NodeTarget] a new instance of NodeTarget - # - # source://prism//lib/prism/parse_result/comments.rb#25 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:26 def initialize(node); end - # @return [Boolean] - # - # source://prism//lib/prism/parse_result/comments.rb#37 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:38 def encloses?(comment); end - # source://prism//lib/prism/parse_result/comments.rb#33 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:34 def end_offset; end - # source://prism//lib/prism/parse_result/comments.rb#42 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:43 def leading_comment(comment); end - # source://prism//lib/prism/parse_result/comments.rb#23 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:24 def node; end - # source://prism//lib/prism/parse_result/comments.rb#29 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:30 def start_offset; end - # source://prism//lib/prism/parse_result/comments.rb#46 + # pkg:gem/prism#lib/prism/parse_result/comments.rb:47 def trailing_comment(comment); end end # An object to represent the set of errors on a parse result. This object # can be used to format the errors in a human-readable way. # -# source://prism//lib/prism/parse_result/errors.rb#9 +# pkg:gem/prism#lib/prism/parse_result/errors.rb:10 class Prism::ParseResult::Errors # Initialize a new set of errors from the given parse result. # - # @return [Errors] a new instance of Errors - # - # source://prism//lib/prism/parse_result/errors.rb#14 + # pkg:gem/prism#lib/prism/parse_result/errors.rb:15 def initialize(parse_result); end # Formats the errors in a human-readable way and return them as a string. # - # source://prism//lib/prism/parse_result/errors.rb#19 + # pkg:gem/prism#lib/prism/parse_result/errors.rb:20 def format; end # The parse result that contains the errors. # - # source://prism//lib/prism/parse_result/errors.rb#11 + # pkg:gem/prism#lib/prism/parse_result/errors.rb:12 def parse_result; end end @@ -28578,87 +28586,79 @@ end # that case. We do that to avoid storing the extra `@newline` instance # variable on every node if we don't need it. # -# source://prism//lib/prism/parse_result/newlines.rb#25 +# pkg:gem/prism#lib/prism/parse_result/newlines.rb:26 class Prism::ParseResult::Newlines < ::Prism::Visitor # Create a new Newlines visitor with the given newline offsets. # - # @return [Newlines] a new instance of Newlines - # - # source://prism//lib/prism/parse_result/newlines.rb#27 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:28 def initialize(lines); end # Permit block/lambda nodes to mark newlines within themselves. # - # source://prism//lib/prism/parse_result/newlines.rb#33 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:34 def visit_block_node(node); end # Mark if/unless nodes as newlines. # - # source://prism//lib/prism/parse_result/newlines.rb#47 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:48 def visit_if_node(node); end - # Permit block/lambda nodes to mark newlines within themselves. - # - # source://prism//lib/prism/parse_result/newlines.rb#33 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:45 def visit_lambda_node(node); end # Permit statements lists to mark newlines within themselves. # - # source://prism//lib/prism/parse_result/newlines.rb#55 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:56 def visit_statements_node(node); end - # Mark if/unless nodes as newlines. - # - # source://prism//lib/prism/parse_result/newlines.rb#47 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:53 def visit_unless_node(node); end end # This represents a warning that was encountered during parsing. # -# source://prism//lib/prism/parse_result.rb#643 +# pkg:gem/prism#lib/prism/parse_result.rb:640 class Prism::ParseWarning # Create a new warning object with the given message and location. # - # @return [ParseWarning] a new instance of ParseWarning - # - # source://prism//lib/prism/parse_result.rb#658 + # pkg:gem/prism#lib/prism/parse_result.rb:655 sig { params(type: Symbol, message: String, location: Prism::Location, level: Symbol).void } def initialize(type, message, location, level); end # Implement the hash pattern matching interface for ParseWarning. # - # source://prism//lib/prism/parse_result.rb#666 + # pkg:gem/prism#lib/prism/parse_result.rb:663 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # Returns a string representation of this warning. # - # source://prism//lib/prism/parse_result.rb#671 + # pkg:gem/prism#lib/prism/parse_result.rb:668 sig { returns(String) } def inspect; end # The level of this warning. # - # source://prism//lib/prism/parse_result.rb#655 + # pkg:gem/prism#lib/prism/parse_result.rb:652 sig { returns(Symbol) } def level; end # A Location object representing the location of this warning in the source. # - # source://prism//lib/prism/parse_result.rb#652 + # pkg:gem/prism#lib/prism/parse_result.rb:649 sig { returns(Prism::Location) } def location; end # The message associated with this warning. # - # source://prism//lib/prism/parse_result.rb#649 + # pkg:gem/prism#lib/prism/parse_result.rb:646 sig { returns(String) } def message; end # The type of warning. This is an _internal_ symbol that is used for # communicating with translation layers. It is not meant to be public API. # - # source://prism//lib/prism/parse_result.rb#646 + # pkg:gem/prism#lib/prism/parse_result.rb:643 sig { returns(Symbol) } def type; end end @@ -28697,27 +28697,23 @@ end # do not yet support) then a Prism::Pattern::CompilationError will be # raised. # -# source://prism//lib/prism/pattern.rb#37 +# pkg:gem/prism#lib/prism/pattern.rb:38 class Prism::Pattern # Create a new pattern with the given query. The query should be a string # containing a Ruby pattern matching expression. # - # @return [Pattern] a new instance of Pattern - # - # source://prism//lib/prism/pattern.rb#63 + # pkg:gem/prism#lib/prism/pattern.rb:64 def initialize(query); end # Compile the query into a callable object that can be used to match against # nodes. # - # @raise [CompilationError] - # - # source://prism//lib/prism/pattern.rb#70 + # pkg:gem/prism#lib/prism/pattern.rb:71 def compile; end # The query that this pattern was initialized with. # - # source://prism//lib/prism/pattern.rb#59 + # pkg:gem/prism#lib/prism/pattern.rb:60 def query; end # Scan the given node and all of its children for nodes that match the @@ -28725,7 +28721,7 @@ class Prism::Pattern # matches the pattern. If no block is given, an enumerator will be returned # that will yield each node that matches the pattern. # - # source://prism//lib/prism/pattern.rb#86 + # pkg:gem/prism#lib/prism/pattern.rb:87 def scan(root); end private @@ -28733,94 +28729,90 @@ class Prism::Pattern # Shortcut for combining two procs into one that returns true if both return # true. # - # source://prism//lib/prism/pattern.rb#102 + # pkg:gem/prism#lib/prism/pattern.rb:103 def combine_and(left, right); end # Shortcut for combining two procs into one that returns true if either # returns true. # - # source://prism//lib/prism/pattern.rb#108 + # pkg:gem/prism#lib/prism/pattern.rb:109 def combine_or(left, right); end # in foo | bar # - # source://prism//lib/prism/pattern.rb#143 + # pkg:gem/prism#lib/prism/pattern.rb:144 def compile_alternation_pattern_node(node); end # in [foo, bar, baz] # - # source://prism//lib/prism/pattern.rb#118 + # pkg:gem/prism#lib/prism/pattern.rb:119 def compile_array_pattern_node(node); end # Compile a name associated with a constant. # - # source://prism//lib/prism/pattern.rb#168 + # pkg:gem/prism#lib/prism/pattern.rb:169 def compile_constant_name(node, name); end # in Prism::ConstantReadNode # - # source://prism//lib/prism/pattern.rb#148 + # pkg:gem/prism#lib/prism/pattern.rb:149 def compile_constant_path_node(node); end # in ConstantReadNode # in String # - # source://prism//lib/prism/pattern.rb#163 + # pkg:gem/prism#lib/prism/pattern.rb:164 def compile_constant_read_node(node); end # Raise an error because the given node is not supported. # - # @raise [CompilationError] - # - # source://prism//lib/prism/pattern.rb#113 + # pkg:gem/prism#lib/prism/pattern.rb:114 def compile_error(node); end # in InstanceVariableReadNode[name: Symbol] # in { name: Symbol } # - # source://prism//lib/prism/pattern.rb#184 + # pkg:gem/prism#lib/prism/pattern.rb:185 def compile_hash_pattern_node(node); end # in nil # - # source://prism//lib/prism/pattern.rb#214 + # pkg:gem/prism#lib/prism/pattern.rb:215 def compile_nil_node(node); end # Compile any kind of node. Dispatch out to the individual compilation # methods based on the type of node. # - # source://prism//lib/prism/pattern.rb#243 + # pkg:gem/prism#lib/prism/pattern.rb:244 def compile_node(node); end # in /foo/ # - # source://prism//lib/prism/pattern.rb#219 + # pkg:gem/prism#lib/prism/pattern.rb:220 def compile_regular_expression_node(node); end # in "" # in "foo" # - # source://prism//lib/prism/pattern.rb#227 + # pkg:gem/prism#lib/prism/pattern.rb:228 def compile_string_node(node); end # in :+ # in :foo # - # source://prism//lib/prism/pattern.rb#235 + # pkg:gem/prism#lib/prism/pattern.rb:236 def compile_symbol_node(node); end end # Raised when the query given to a pattern is either invalid Ruby syntax or # is using syntax that we don't yet support. # -# source://prism//lib/prism/pattern.rb#40 +# pkg:gem/prism#lib/prism/pattern.rb:41 class Prism::Pattern::CompilationError < ::StandardError # Create a new CompilationError with the given representation of the node # that caused the error. # - # @return [CompilationError] a new instance of CompilationError - # - # source://prism//lib/prism/pattern.rb#43 + # pkg:gem/prism#lib/prism/pattern.rb:44 def initialize(repr); end end @@ -28829,13 +28821,11 @@ end # foo in ^(bar) # ^^^^^^ # -# source://prism//lib/prism/node.rb#14383 +# pkg:gem/prism#lib/prism/node.rb:15442 class Prism::PinnedExpressionNode < ::Prism::Node # Initialize a new PinnedExpressionNode node. # - # @return [PinnedExpressionNode] a new instance of PinnedExpressionNode - # - # source://prism//lib/prism/node.rb#14385 + # pkg:gem/prism#lib/prism/node.rb:15444 sig do params( source: Prism::Source, @@ -28853,36 +28843,36 @@ class Prism::PinnedExpressionNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14503 + # pkg:gem/prism#lib/prism/node.rb:15581 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14397 + # pkg:gem/prism#lib/prism/node.rb:15456 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14402 + # pkg:gem/prism#lib/prism/node.rb:15461 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14412 + # pkg:gem/prism#lib/prism/node.rb:15478 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14407 + # pkg:gem/prism#lib/prism/node.rb:15473 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node, ?operator_loc: Location, ?lparen_loc: Location, ?rparen_loc: Location) -> PinnedExpressionNode # - # source://prism//lib/prism/node.rb#14417 + # pkg:gem/prism#lib/prism/node.rb:15483 sig do params( node_id: Integer, @@ -28894,24 +28884,31 @@ class Prism::PinnedExpressionNode < ::Prism::Node rparen_loc: Prism::Location ).returns(Prism::PinnedExpressionNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, expression: self.expression, operator_loc: self.operator_loc, lparen_loc: self.lparen_loc, rparen_loc: self.rparen_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14402 + # pkg:gem/prism#lib/prism/node.rb:15488 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location } # - # source://prism//lib/prism/node.rb#14425 + # pkg:gem/prism#lib/prism/node.rb:15491 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # attr_reader expression: Prism::node + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:15466 + def each_child_node; end + + # The expression used in the pinned expression + # + # foo in ^(bar) + # ^^^ # - # source://prism//lib/prism/node.rb#14430 + # pkg:gem/prism#lib/prism/node.rb:15499 sig { returns(Prism::Node) } def expression; end @@ -28920,74 +28917,83 @@ class Prism::PinnedExpressionNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14487 + # pkg:gem/prism#lib/prism/node.rb:15565 sig { override.returns(String) } def inspect; end # def lparen: () -> String # - # source://prism//lib/prism/node.rb#14477 + # pkg:gem/prism#lib/prism/node.rb:15555 sig { returns(String) } def lparen; end - # attr_reader lparen_loc: Location + # The location of the opening parenthesis. # - # source://prism//lib/prism/node.rb#14446 + # foo in ^(bar) + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:15521 sig { returns(Prism::Location) } def lparen_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#14472 + # pkg:gem/prism#lib/prism/node.rb:15550 sig { returns(String) } def operator; end - # attr_reader operator_loc: Location + # The location of the `^` operator + # + # foo in ^(bar) + # ^ # - # source://prism//lib/prism/node.rb#14433 + # pkg:gem/prism#lib/prism/node.rb:15505 sig { returns(Prism::Location) } def operator_loc; end # def rparen: () -> String # - # source://prism//lib/prism/node.rb#14482 + # pkg:gem/prism#lib/prism/node.rb:15560 sig { returns(String) } def rparen; end - # attr_reader rparen_loc: Location + # The location of the closing parenthesis. + # + # foo in ^(bar) + # ^ # - # source://prism//lib/prism/node.rb#14459 + # pkg:gem/prism#lib/prism/node.rb:15537 sig { returns(Prism::Location) } def rparen_loc; end # Save the lparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#14454 + # pkg:gem/prism#lib/prism/node.rb:15529 def save_lparen_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#14441 + # pkg:gem/prism#lib/prism/node.rb:15513 def save_operator_loc(repository); end # Save the rparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#14467 + # pkg:gem/prism#lib/prism/node.rb:15545 def save_rparen_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#14492 + # pkg:gem/prism#lib/prism/node.rb:15570 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#14497 + # pkg:gem/prism#lib/prism/node.rb:15575 def type; end end end @@ -28997,13 +29003,11 @@ end # foo in ^bar # ^^^^ # -# source://prism//lib/prism/node.rb#14516 +# pkg:gem/prism#lib/prism/node.rb:15594 class Prism::PinnedVariableNode < ::Prism::Node # Initialize a new PinnedVariableNode node. # - # @return [PinnedVariableNode] a new instance of PinnedVariableNode - # - # source://prism//lib/prism/node.rb#14518 + # pkg:gem/prism#lib/prism/node.rb:15596 sig do params( source: Prism::Source, @@ -29019,36 +29023,36 @@ class Prism::PinnedVariableNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14598 + # pkg:gem/prism#lib/prism/node.rb:15689 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14528 + # pkg:gem/prism#lib/prism/node.rb:15606 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14533 + # pkg:gem/prism#lib/prism/node.rb:15611 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14543 + # pkg:gem/prism#lib/prism/node.rb:15628 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14538 + # pkg:gem/prism#lib/prism/node.rb:15623 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode, ?operator_loc: Location) -> PinnedVariableNode # - # source://prism//lib/prism/node.rb#14548 + # pkg:gem/prism#lib/prism/node.rb:15633 sig do params( node_id: Integer, @@ -29058,57 +29062,67 @@ class Prism::PinnedVariableNode < ::Prism::Node operator_loc: Prism::Location ).returns(Prism::PinnedVariableNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), variable: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, variable: self.variable, operator_loc: self.operator_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14533 + # pkg:gem/prism#lib/prism/node.rb:15638 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode, operator_loc: Location } # - # source://prism//lib/prism/node.rb#14556 + # pkg:gem/prism#lib/prism/node.rb:15641 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:15616 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#14582 + # pkg:gem/prism#lib/prism/node.rb:15673 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#14577 + # pkg:gem/prism#lib/prism/node.rb:15668 sig { returns(String) } def operator; end - # attr_reader operator_loc: Location + # The location of the `^` operator # - # source://prism//lib/prism/node.rb#14564 + # foo in ^bar + # ^ + # + # pkg:gem/prism#lib/prism/node.rb:15655 sig { returns(Prism::Location) } def operator_loc; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#14572 + # pkg:gem/prism#lib/prism/node.rb:15663 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#14587 + # pkg:gem/prism#lib/prism/node.rb:15678 sig { override.returns(Symbol) } def type; end - # attr_reader variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode + # The variable used in the pinned expression + # + # foo in ^bar + # ^^^ # - # source://prism//lib/prism/node.rb#14561 + # pkg:gem/prism#lib/prism/node.rb:15649 sig do returns(T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode)) end @@ -29117,7 +29131,7 @@ class Prism::PinnedVariableNode < ::Prism::Node class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#14592 + # pkg:gem/prism#lib/prism/node.rb:15683 def type; end end end @@ -29127,13 +29141,11 @@ end # END { foo } # ^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#14609 +# pkg:gem/prism#lib/prism/node.rb:15700 class Prism::PostExecutionNode < ::Prism::Node # Initialize a new PostExecutionNode node. # - # @return [PostExecutionNode] a new instance of PostExecutionNode - # - # source://prism//lib/prism/node.rb#14611 + # pkg:gem/prism#lib/prism/node.rb:15702 sig do params( source: Prism::Source, @@ -29151,48 +29163,48 @@ class Prism::PostExecutionNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14731 + # pkg:gem/prism#lib/prism/node.rb:15829 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14623 + # pkg:gem/prism#lib/prism/node.rb:15714 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14628 + # pkg:gem/prism#lib/prism/node.rb:15719 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#14710 + # pkg:gem/prism#lib/prism/node.rb:15808 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#14687 + # pkg:gem/prism#lib/prism/node.rb:15785 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14640 + # pkg:gem/prism#lib/prism/node.rb:15738 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14633 + # pkg:gem/prism#lib/prism/node.rb:15731 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location) -> PostExecutionNode # - # source://prism//lib/prism/node.rb#14645 + # pkg:gem/prism#lib/prism/node.rb:15743 sig do params( node_id: Integer, @@ -29204,88 +29216,92 @@ class Prism::PostExecutionNode < ::Prism::Node closing_loc: Prism::Location ).returns(Prism::PostExecutionNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, statements: self.statements, keyword_loc: self.keyword_loc, opening_loc: self.opening_loc, closing_loc: self.closing_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14628 + # pkg:gem/prism#lib/prism/node.rb:15748 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location } # - # source://prism//lib/prism/node.rb#14653 + # pkg:gem/prism#lib/prism/node.rb:15751 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:15724 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#14715 + # pkg:gem/prism#lib/prism/node.rb:15813 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#14700 + # pkg:gem/prism#lib/prism/node.rb:15798 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#14661 + # pkg:gem/prism#lib/prism/node.rb:15759 sig { returns(Prism::Location) } def keyword_loc; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#14705 + # pkg:gem/prism#lib/prism/node.rb:15803 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#14674 + # pkg:gem/prism#lib/prism/node.rb:15772 sig { returns(Prism::Location) } def opening_loc; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#14695 + # pkg:gem/prism#lib/prism/node.rb:15793 def save_closing_loc(repository); end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#14669 + # pkg:gem/prism#lib/prism/node.rb:15767 def save_keyword_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#14682 + # pkg:gem/prism#lib/prism/node.rb:15780 def save_opening_loc(repository); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#14658 + # pkg:gem/prism#lib/prism/node.rb:15756 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#14720 + # pkg:gem/prism#lib/prism/node.rb:15818 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#14725 + # pkg:gem/prism#lib/prism/node.rb:15823 def type; end end end @@ -29295,13 +29311,11 @@ end # BEGIN { foo } # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#14744 +# pkg:gem/prism#lib/prism/node.rb:15842 class Prism::PreExecutionNode < ::Prism::Node # Initialize a new PreExecutionNode node. # - # @return [PreExecutionNode] a new instance of PreExecutionNode - # - # source://prism//lib/prism/node.rb#14746 + # pkg:gem/prism#lib/prism/node.rb:15844 sig do params( source: Prism::Source, @@ -29319,48 +29333,48 @@ class Prism::PreExecutionNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14866 + # pkg:gem/prism#lib/prism/node.rb:15971 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14758 + # pkg:gem/prism#lib/prism/node.rb:15856 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14763 + # pkg:gem/prism#lib/prism/node.rb:15861 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#14845 + # pkg:gem/prism#lib/prism/node.rb:15950 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#14822 + # pkg:gem/prism#lib/prism/node.rb:15927 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14775 + # pkg:gem/prism#lib/prism/node.rb:15880 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14768 + # pkg:gem/prism#lib/prism/node.rb:15873 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location) -> PreExecutionNode # - # source://prism//lib/prism/node.rb#14780 + # pkg:gem/prism#lib/prism/node.rb:15885 sig do params( node_id: Integer, @@ -29372,101 +29386,103 @@ class Prism::PreExecutionNode < ::Prism::Node closing_loc: Prism::Location ).returns(Prism::PreExecutionNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, statements: self.statements, keyword_loc: self.keyword_loc, opening_loc: self.opening_loc, closing_loc: self.closing_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14763 + # pkg:gem/prism#lib/prism/node.rb:15890 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location } # - # source://prism//lib/prism/node.rb#14788 + # pkg:gem/prism#lib/prism/node.rb:15893 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:15866 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#14850 + # pkg:gem/prism#lib/prism/node.rb:15955 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#14835 + # pkg:gem/prism#lib/prism/node.rb:15940 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#14796 + # pkg:gem/prism#lib/prism/node.rb:15901 sig { returns(Prism::Location) } def keyword_loc; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#14840 + # pkg:gem/prism#lib/prism/node.rb:15945 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#14809 + # pkg:gem/prism#lib/prism/node.rb:15914 sig { returns(Prism::Location) } def opening_loc; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#14830 + # pkg:gem/prism#lib/prism/node.rb:15935 def save_closing_loc(repository); end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#14804 + # pkg:gem/prism#lib/prism/node.rb:15909 def save_keyword_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#14817 + # pkg:gem/prism#lib/prism/node.rb:15922 def save_opening_loc(repository); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#14793 + # pkg:gem/prism#lib/prism/node.rb:15898 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#14855 + # pkg:gem/prism#lib/prism/node.rb:15960 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#14860 + # pkg:gem/prism#lib/prism/node.rb:15965 def type; end end end # The top level node of any parse tree. # -# source://prism//lib/prism/node.rb#14876 +# pkg:gem/prism#lib/prism/node.rb:15981 class Prism::ProgramNode < ::Prism::Node # Initialize a new ProgramNode node. # - # @return [ProgramNode] a new instance of ProgramNode - # - # source://prism//lib/prism/node.rb#14878 + # pkg:gem/prism#lib/prism/node.rb:15983 sig do params( source: Prism::Source, @@ -29482,36 +29498,36 @@ class Prism::ProgramNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14943 + # pkg:gem/prism#lib/prism/node.rb:16055 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14888 + # pkg:gem/prism#lib/prism/node.rb:15993 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14893 + # pkg:gem/prism#lib/prism/node.rb:15998 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14903 + # pkg:gem/prism#lib/prism/node.rb:16015 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14898 + # pkg:gem/prism#lib/prism/node.rb:16010 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?statements: StatementsNode) -> ProgramNode # - # source://prism//lib/prism/node.rb#14908 + # pkg:gem/prism#lib/prism/node.rb:16020 sig do params( node_id: Integer, @@ -29521,64 +29537,68 @@ class Prism::ProgramNode < ::Prism::Node statements: Prism::StatementsNode ).returns(Prism::ProgramNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), statements: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, locals: self.locals, statements: self.statements); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14893 + # pkg:gem/prism#lib/prism/node.rb:16025 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], statements: StatementsNode } # - # source://prism//lib/prism/node.rb#14916 + # pkg:gem/prism#lib/prism/node.rb:16028 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:16003 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#14927 + # pkg:gem/prism#lib/prism/node.rb:16039 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#14921 + # pkg:gem/prism#lib/prism/node.rb:16033 sig { returns(T::Array[Symbol]) } def locals; end # attr_reader statements: StatementsNode # - # source://prism//lib/prism/node.rb#14924 + # pkg:gem/prism#lib/prism/node.rb:16036 sig { returns(Prism::StatementsNode) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#14932 + # pkg:gem/prism#lib/prism/node.rb:16044 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#14937 + # pkg:gem/prism#lib/prism/node.rb:16049 def type; end end end # Flags for range and flip-flop nodes. # -# source://prism//lib/prism/node.rb#18555 +# pkg:gem/prism#lib/prism/node.rb:19876 module Prism::RangeFlags; end # ... operator # -# source://prism//lib/prism/node.rb#18557 +# pkg:gem/prism#lib/prism/node.rb:19878 Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) # Represents the use of the `..` or `...` operators. @@ -29589,13 +29609,11 @@ Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) # c if a =~ /left/ ... b =~ /right/ # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#14958 +# pkg:gem/prism#lib/prism/node.rb:16070 class Prism::RangeNode < ::Prism::Node # Initialize a new RangeNode node. # - # @return [RangeNode] a new instance of RangeNode - # - # source://prism//lib/prism/node.rb#14960 + # pkg:gem/prism#lib/prism/node.rb:16072 sig do params( source: Prism::Source, @@ -29612,36 +29630,36 @@ class Prism::RangeNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15065 + # pkg:gem/prism#lib/prism/node.rb:16185 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14971 + # pkg:gem/prism#lib/prism/node.rb:16083 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14976 + # pkg:gem/prism#lib/prism/node.rb:16088 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14989 + # pkg:gem/prism#lib/prism/node.rb:16109 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14981 + # pkg:gem/prism#lib/prism/node.rb:16101 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location) -> RangeNode # - # source://prism//lib/prism/node.rb#14994 + # pkg:gem/prism#lib/prism/node.rb:16114 sig do params( node_id: Integer, @@ -29652,26 +29670,28 @@ class Prism::RangeNode < ::Prism::Node operator_loc: Prism::Location ).returns(Prism::RangeNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, left: self.left, right: self.right, operator_loc: self.operator_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#14976 + # pkg:gem/prism#lib/prism/node.rb:16119 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node?, right: Prism::node?, operator_loc: Location } # - # source://prism//lib/prism/node.rb#15002 + # pkg:gem/prism#lib/prism/node.rb:16122 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # def exclude_end?: () -> bool + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @return [Boolean] + # pkg:gem/prism#lib/prism/node.rb:16093 + def each_child_node; end + + # def exclude_end?: () -> bool # - # source://prism//lib/prism/node.rb#15007 + # pkg:gem/prism#lib/prism/node.rb:16127 sig { returns(T::Boolean) } def exclude_end?; end @@ -29680,7 +29700,7 @@ class Prism::RangeNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#15049 + # pkg:gem/prism#lib/prism/node.rb:16169 sig { override.returns(String) } def inspect; end @@ -29692,19 +29712,19 @@ class Prism::RangeNode < ::Prism::Node # hello...goodbye # ^^^^^ # - # source://prism//lib/prism/node.rb#15018 + # pkg:gem/prism#lib/prism/node.rb:16138 sig { returns(T.nilable(Prism::Node)) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#15044 + # pkg:gem/prism#lib/prism/node.rb:16164 sig { returns(String) } def operator; end # The location of the `..` or `...` operator. # - # source://prism//lib/prism/node.rb#15031 + # pkg:gem/prism#lib/prism/node.rb:16151 sig { returns(Prism::Location) } def operator_loc; end @@ -29717,26 +29737,26 @@ class Prism::RangeNode < ::Prism::Node # ^^^ # If neither right-hand or left-hand side was included, this will be a MissingNode. # - # source://prism//lib/prism/node.rb#15028 + # pkg:gem/prism#lib/prism/node.rb:16148 sig { returns(T.nilable(Prism::Node)) } def right; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15039 + # pkg:gem/prism#lib/prism/node.rb:16159 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#15054 + # pkg:gem/prism#lib/prism/node.rb:16174 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#15059 + # pkg:gem/prism#lib/prism/node.rb:16179 def type; end end end @@ -29746,13 +29766,11 @@ end # 1.0r # ^^^^ # -# source://prism//lib/prism/node.rb#15078 +# pkg:gem/prism#lib/prism/node.rb:16198 class Prism::RationalNode < ::Prism::Node # Initialize a new RationalNode node. # - # @return [RationalNode] a new instance of RationalNode - # - # source://prism//lib/prism/node.rb#15080 + # pkg:gem/prism#lib/prism/node.rb:16200 sig do params( source: Prism::Source, @@ -29768,44 +29786,42 @@ class Prism::RationalNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15169 + # pkg:gem/prism#lib/prism/node.rb:16295 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15090 + # pkg:gem/prism#lib/prism/node.rb:16210 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def binary?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#15123 + # pkg:gem/prism#lib/prism/node.rb:16249 sig { returns(T::Boolean) } def binary?; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15095 + # pkg:gem/prism#lib/prism/node.rb:16215 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15105 + # pkg:gem/prism#lib/prism/node.rb:16231 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15100 + # pkg:gem/prism#lib/prism/node.rb:16226 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?numerator: Integer, ?denominator: Integer) -> RationalNode # - # source://prism//lib/prism/node.rb#15110 + # pkg:gem/prism#lib/prism/node.rb:16236 sig do params( node_id: Integer, @@ -29815,26 +29831,23 @@ class Prism::RationalNode < ::Prism::Node denominator: Integer ).returns(Prism::RationalNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), numerator: T.unsafe(nil), denominator: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, numerator: self.numerator, denominator: self.denominator); end # def decimal?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#15128 + # pkg:gem/prism#lib/prism/node.rb:16254 sig { returns(T::Boolean) } def decimal?; end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15095 + # pkg:gem/prism#lib/prism/node.rb:16241 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, numerator: Integer, denominator: Integer } # - # source://prism//lib/prism/node.rb#15118 + # pkg:gem/prism#lib/prism/node.rb:16244 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -29842,24 +29855,27 @@ class Prism::RationalNode < ::Prism::Node # # 1.5r # denominator 2 # - # source://prism//lib/prism/node.rb#15150 + # pkg:gem/prism#lib/prism/node.rb:16276 sig { returns(Integer) } def denominator; end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:16220 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def hexadecimal?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#15138 + # pkg:gem/prism#lib/prism/node.rb:16264 sig { returns(T::Boolean) } def hexadecimal?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#15153 + # pkg:gem/prism#lib/prism/node.rb:16279 sig { override.returns(String) } def inspect; end @@ -29867,40 +29883,38 @@ class Prism::RationalNode < ::Prism::Node # # 1.5r # numerator 3 # - # source://prism//lib/prism/node.rb#15145 + # pkg:gem/prism#lib/prism/node.rb:16271 sig { returns(Integer) } def numerator; end # Returns the value of the node as an IntegerNode or a FloatNode. This # method is deprecated in favor of #value or #numerator/#denominator. # - # source://prism//lib/prism/node_ext.rb#120 + # pkg:gem/prism#lib/prism/node_ext.rb:123 def numeric; end # def octal?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#15133 + # pkg:gem/prism#lib/prism/node.rb:16259 sig { returns(T::Boolean) } def octal?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#15158 + # pkg:gem/prism#lib/prism/node.rb:16284 sig { override.returns(Symbol) } def type; end # Returns the value of the node as a Ruby Rational. # - # source://prism//lib/prism/node_ext.rb#114 + # pkg:gem/prism#lib/prism/node_ext.rb:117 sig { returns(Rational) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#15163 + # pkg:gem/prism#lib/prism/node.rb:16289 def type; end end end @@ -29910,84 +29924,86 @@ end # redo # ^^^^ # -# source://prism//lib/prism/node.rb#15181 +# pkg:gem/prism#lib/prism/node.rb:16307 class Prism::RedoNode < ::Prism::Node # Initialize a new RedoNode node. # - # @return [RedoNode] a new instance of RedoNode - # - # source://prism//lib/prism/node.rb#15183 + # pkg:gem/prism#lib/prism/node.rb:16309 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15240 + # pkg:gem/prism#lib/prism/node.rb:16372 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15191 + # pkg:gem/prism#lib/prism/node.rb:16317 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15196 + # pkg:gem/prism#lib/prism/node.rb:16322 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15206 + # pkg:gem/prism#lib/prism/node.rb:16338 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15201 + # pkg:gem/prism#lib/prism/node.rb:16333 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> RedoNode # - # source://prism//lib/prism/node.rb#15211 + # pkg:gem/prism#lib/prism/node.rb:16343 sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::RedoNode) } - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15196 + # pkg:gem/prism#lib/prism/node.rb:16348 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#15219 + # pkg:gem/prism#lib/prism/node.rb:16351 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:16327 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#15224 + # pkg:gem/prism#lib/prism/node.rb:16356 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#15229 + # pkg:gem/prism#lib/prism/node.rb:16361 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#15234 + # pkg:gem/prism#lib/prism/node.rb:16366 def type; end end end @@ -29996,12 +30012,12 @@ end # the syntax tree itself, as opposed to looking at a single syntax tree. This # is useful in metaprogramming contexts. # -# source://prism//lib/prism/reflection.rb#13 +# pkg:gem/prism#lib/prism/reflection.rb:16 module Prism::Reflection class << self # Returns the fields for the given node. # - # source://prism//lib/prism/reflection.rb#104 + # pkg:gem/prism#lib/prism/reflection.rb:107 sig { params(node: T.class_of(Prism::Node)).returns(T::Array[Prism::Reflection::Field]) } def fields_for(node); end end @@ -30011,31 +30027,29 @@ end # represents an identifier found within the source. It resolves to a symbol # in Ruby. # -# source://prism//lib/prism/reflection.rb#45 +# pkg:gem/prism#lib/prism/reflection.rb:48 class Prism::Reflection::ConstantField < ::Prism::Reflection::Field; end # A constant list field represents a list of constant values on a node. It # resolves to an array of symbols in Ruby. # -# source://prism//lib/prism/reflection.rb#55 +# pkg:gem/prism#lib/prism/reflection.rb:58 class Prism::Reflection::ConstantListField < ::Prism::Reflection::Field; end # A field represents a single piece of data on a node. It is the base class # for all other field types. # -# source://prism//lib/prism/reflection.rb#16 +# pkg:gem/prism#lib/prism/reflection.rb:19 class Prism::Reflection::Field # Initializes the field with the given name. # - # @return [Field] a new instance of Field - # - # source://prism//lib/prism/reflection.rb#21 + # pkg:gem/prism#lib/prism/reflection.rb:24 sig { params(name: Symbol).void } def initialize(name); end # The name of the field. # - # source://prism//lib/prism/reflection.rb#18 + # pkg:gem/prism#lib/prism/reflection.rb:21 sig { returns(Symbol) } def name; end end @@ -30045,19 +30059,17 @@ end # node because the integer is kept private. Instead, the various flags in # the bitset should be accessed through their query methods. # -# source://prism//lib/prism/reflection.rb#92 +# pkg:gem/prism#lib/prism/reflection.rb:95 class Prism::Reflection::FlagsField < ::Prism::Reflection::Field # Initializes the flags field with the given name and flags. # - # @return [FlagsField] a new instance of FlagsField - # - # source://prism//lib/prism/reflection.rb#97 + # pkg:gem/prism#lib/prism/reflection.rb:100 sig { params(name: Symbol, flags: T::Array[Symbol]).void } def initialize(name, flags); end # The names of the flags in the bitset. # - # source://prism//lib/prism/reflection.rb#94 + # pkg:gem/prism#lib/prism/reflection.rb:97 sig { returns(T::Array[Symbol]) } def flags; end end @@ -30066,120 +30078,120 @@ end # used exclusively to represent the value of a floating point literal. It # resolves to a Float in Ruby. # -# source://prism//lib/prism/reflection.rb#85 +# pkg:gem/prism#lib/prism/reflection.rb:88 class Prism::Reflection::FloatField < ::Prism::Reflection::Field; end # An integer field represents an integer value. It is used to represent the # value of an integer literal, the depth of local variables, and the number # of a numbered reference. It resolves to an Integer in Ruby. # -# source://prism//lib/prism/reflection.rb#79 +# pkg:gem/prism#lib/prism/reflection.rb:82 class Prism::Reflection::IntegerField < ::Prism::Reflection::Field; end # A location field represents the location of some part of the node in the # source code. For example, the location of a keyword or an operator. It # resolves to a Prism::Location in Ruby. # -# source://prism//lib/prism/reflection.rb#67 +# pkg:gem/prism#lib/prism/reflection.rb:70 class Prism::Reflection::LocationField < ::Prism::Reflection::Field; end # A node field represents a single child node in the syntax tree. It # resolves to a Prism::Node in Ruby. # -# source://prism//lib/prism/reflection.rb#28 +# pkg:gem/prism#lib/prism/reflection.rb:31 class Prism::Reflection::NodeField < ::Prism::Reflection::Field; end # A node list field represents a list of child nodes in the syntax tree. It # resolves to an array of Prism::Node instances in Ruby. # -# source://prism//lib/prism/reflection.rb#39 +# pkg:gem/prism#lib/prism/reflection.rb:42 class Prism::Reflection::NodeListField < ::Prism::Reflection::Field; end # An optional constant field represents a constant value on a node that may # or may not be present. It resolves to either a symbol or nil in Ruby. # -# source://prism//lib/prism/reflection.rb#50 +# pkg:gem/prism#lib/prism/reflection.rb:53 class Prism::Reflection::OptionalConstantField < ::Prism::Reflection::Field; end # An optional location field represents the location of some part of the # node in the source code that may or may not be present. It resolves to # either a Prism::Location or nil in Ruby. # -# source://prism//lib/prism/reflection.rb#73 +# pkg:gem/prism#lib/prism/reflection.rb:76 class Prism::Reflection::OptionalLocationField < ::Prism::Reflection::Field; end # An optional node field represents a single child node in the syntax tree # that may or may not be present. It resolves to either a Prism::Node or nil # in Ruby. # -# source://prism//lib/prism/reflection.rb#34 +# pkg:gem/prism#lib/prism/reflection.rb:37 class Prism::Reflection::OptionalNodeField < ::Prism::Reflection::Field; end # A string field represents a string value on a node. It almost always # represents the unescaped value of a string-like literal. It resolves to a # string in Ruby. # -# source://prism//lib/prism/reflection.rb#61 +# pkg:gem/prism#lib/prism/reflection.rb:64 class Prism::Reflection::StringField < ::Prism::Reflection::Field; end # Flags for regular expression and match last line nodes. # -# source://prism//lib/prism/node.rb#18561 +# pkg:gem/prism#lib/prism/node.rb:19882 module Prism::RegularExpressionFlags; end # n - forces the ASCII-8BIT encoding # -# source://prism//lib/prism/node.rb#18578 +# pkg:gem/prism#lib/prism/node.rb:19899 Prism::RegularExpressionFlags::ASCII_8BIT = T.let(T.unsafe(nil), Integer) # e - forces the EUC-JP encoding # -# source://prism//lib/prism/node.rb#18575 +# pkg:gem/prism#lib/prism/node.rb:19896 Prism::RegularExpressionFlags::EUC_JP = T.let(T.unsafe(nil), Integer) # x - ignores whitespace and allows comments in regular expressions # -# source://prism//lib/prism/node.rb#18566 +# pkg:gem/prism#lib/prism/node.rb:19887 Prism::RegularExpressionFlags::EXTENDED = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#18590 +# pkg:gem/prism#lib/prism/node.rb:19911 Prism::RegularExpressionFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to US-ASCII # -# source://prism//lib/prism/node.rb#18593 +# pkg:gem/prism#lib/prism/node.rb:19914 Prism::RegularExpressionFlags::FORCED_US_ASCII_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to UTF-8 # -# source://prism//lib/prism/node.rb#18587 +# pkg:gem/prism#lib/prism/node.rb:19908 Prism::RegularExpressionFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # i - ignores the case of characters when matching # -# source://prism//lib/prism/node.rb#18563 +# pkg:gem/prism#lib/prism/node.rb:19884 Prism::RegularExpressionFlags::IGNORE_CASE = T.let(T.unsafe(nil), Integer) # m - allows $ to match the end of lines within strings # -# source://prism//lib/prism/node.rb#18569 +# pkg:gem/prism#lib/prism/node.rb:19890 Prism::RegularExpressionFlags::MULTI_LINE = T.let(T.unsafe(nil), Integer) # o - only interpolates values into the regular expression once # -# source://prism//lib/prism/node.rb#18572 +# pkg:gem/prism#lib/prism/node.rb:19893 Prism::RegularExpressionFlags::ONCE = T.let(T.unsafe(nil), Integer) # u - forces the UTF-8 encoding # -# source://prism//lib/prism/node.rb#18584 +# pkg:gem/prism#lib/prism/node.rb:19905 Prism::RegularExpressionFlags::UTF_8 = T.let(T.unsafe(nil), Integer) # s - forces the Windows-31J encoding # -# source://prism//lib/prism/node.rb#18581 +# pkg:gem/prism#lib/prism/node.rb:19902 Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) # Represents a regular expression literal with no interpolation. @@ -30187,15 +30199,13 @@ Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) # /foo/i # ^^^^^^ # -# source://prism//lib/prism/node.rb#15249 +# pkg:gem/prism#lib/prism/node.rb:16381 class Prism::RegularExpressionNode < ::Prism::Node include ::Prism::RegularExpressionOptions # Initialize a new RegularExpressionNode node. # - # @return [RegularExpressionNode] a new instance of RegularExpressionNode - # - # source://prism//lib/prism/node.rb#15251 + # pkg:gem/prism#lib/prism/node.rb:16383 sig do params( source: Prism::Source, @@ -30213,68 +30223,66 @@ class Prism::RegularExpressionNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15424 + # pkg:gem/prism#lib/prism/node.rb:16562 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15263 + # pkg:gem/prism#lib/prism/node.rb:16395 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def ascii_8bit?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#15321 + # pkg:gem/prism#lib/prism/node.rb:16459 sig { returns(T::Boolean) } def ascii_8bit?; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15268 + # pkg:gem/prism#lib/prism/node.rb:16400 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#15403 + # pkg:gem/prism#lib/prism/node.rb:16541 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#15377 + # pkg:gem/prism#lib/prism/node.rb:16515 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15278 + # pkg:gem/prism#lib/prism/node.rb:16416 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15273 + # pkg:gem/prism#lib/prism/node.rb:16411 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#15398 + # pkg:gem/prism#lib/prism/node.rb:16536 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#15364 + # pkg:gem/prism#lib/prism/node.rb:16502 sig { returns(Prism::Location) } def content_loc; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> RegularExpressionNode # - # source://prism//lib/prism/node.rb#15283 + # pkg:gem/prism#lib/prism/node.rb:16421 sig do params( node_id: Integer, @@ -30286,34 +30294,34 @@ class Prism::RegularExpressionNode < ::Prism::Node unescaped: String ).returns(Prism::RegularExpressionNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, opening_loc: self.opening_loc, content_loc: self.content_loc, closing_loc: self.closing_loc, unescaped: self.unescaped); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15268 + # pkg:gem/prism#lib/prism/node.rb:16426 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String } # - # source://prism//lib/prism/node.rb#15291 + # pkg:gem/prism#lib/prism/node.rb:16429 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # def euc_jp?: () -> bool + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @return [Boolean] + # pkg:gem/prism#lib/prism/node.rb:16405 + def each_child_node; end + + # def euc_jp?: () -> bool # - # source://prism//lib/prism/node.rb#15316 + # pkg:gem/prism#lib/prism/node.rb:16454 sig { returns(T::Boolean) } def euc_jp?; end # def extended?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#15301 + # pkg:gem/prism#lib/prism/node.rb:16439 sig { returns(T::Boolean) } def extended?; end @@ -30322,67 +30330,55 @@ class Prism::RegularExpressionNode < ::Prism::Node # def forced_binary_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#15341 + # pkg:gem/prism#lib/prism/node.rb:16479 sig { returns(T::Boolean) } def forced_binary_encoding?; end # def forced_us_ascii_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#15346 + # pkg:gem/prism#lib/prism/node.rb:16484 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end # def forced_utf8_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#15336 + # pkg:gem/prism#lib/prism/node.rb:16474 sig { returns(T::Boolean) } def forced_utf8_encoding?; end # def ignore_case?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#15296 + # pkg:gem/prism#lib/prism/node.rb:16434 sig { returns(T::Boolean) } def ignore_case?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#15408 + # pkg:gem/prism#lib/prism/node.rb:16546 sig { override.returns(String) } def inspect; end # def multi_line?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#15306 + # pkg:gem/prism#lib/prism/node.rb:16444 sig { returns(T::Boolean) } def multi_line?; end # def once?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#15311 + # pkg:gem/prism#lib/prism/node.rb:16449 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#15393 + # pkg:gem/prism#lib/prism/node.rb:16531 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#15351 + # pkg:gem/prism#lib/prism/node.rb:16489 sig { returns(Prism::Location) } def opening_loc; end @@ -30392,63 +30388,59 @@ class Prism::RegularExpressionNode < ::Prism::Node # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15385 + # pkg:gem/prism#lib/prism/node.rb:16523 def save_closing_loc(repository); end # Save the content_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15372 + # pkg:gem/prism#lib/prism/node.rb:16510 def save_content_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15359 + # pkg:gem/prism#lib/prism/node.rb:16497 def save_opening_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#15413 + # pkg:gem/prism#lib/prism/node.rb:16551 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#15390 + # pkg:gem/prism#lib/prism/node.rb:16528 sig { returns(String) } def unescaped; end # def utf_8?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#15331 + # pkg:gem/prism#lib/prism/node.rb:16469 sig { returns(T::Boolean) } def utf_8?; end # def windows_31j?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#15326 + # pkg:gem/prism#lib/prism/node.rb:16464 sig { returns(T::Boolean) } def windows_31j?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#15418 + # pkg:gem/prism#lib/prism/node.rb:16556 def type; end end end -# source://prism//lib/prism/node_ext.rb#20 +# pkg:gem/prism#lib/prism/node_ext.rb:23 module Prism::RegularExpressionOptions # Returns a numeric value that represents the flags that were used to create # the regular expression. # - # source://prism//lib/prism/node_ext.rb#23 + # pkg:gem/prism#lib/prism/node_ext.rb:26 def options; end end @@ -30462,276 +30454,268 @@ end # "save" nodes and locations using a minimal amount of memory (just the # node_id and a field identifier) and then reify them later. # -# source://prism//lib/prism/relocation.rb#13 +# pkg:gem/prism#lib/prism/relocation.rb:14 module Prism::Relocation class << self # Create a new repository for the given filepath. # - # source://prism//lib/prism/relocation.rb#495 + # pkg:gem/prism#lib/prism/relocation.rb:496 def filepath(value); end # Create a new repository for the given string. # - # source://prism//lib/prism/relocation.rb#500 + # pkg:gem/prism#lib/prism/relocation.rb:501 def string(value); end end end # A field representing the start and end character columns. # -# source://prism//lib/prism/relocation.rb#269 +# pkg:gem/prism#lib/prism/relocation.rb:270 class Prism::Relocation::CharacterColumnsField # Fetches the start and end character column of a value. # - # source://prism//lib/prism/relocation.rb#271 + # pkg:gem/prism#lib/prism/relocation.rb:272 def fields(value); end end # A field representing the start and end character offsets. # -# source://prism//lib/prism/relocation.rb#217 +# pkg:gem/prism#lib/prism/relocation.rb:218 class Prism::Relocation::CharacterOffsetsField # Fetches the start and end character offset of a value. # - # source://prism//lib/prism/relocation.rb#219 + # pkg:gem/prism#lib/prism/relocation.rb:220 def fields(value); end end # A field representing the start and end code unit columns for a specific # encoding. # -# source://prism//lib/prism/relocation.rb#281 +# pkg:gem/prism#lib/prism/relocation.rb:282 class Prism::Relocation::CodeUnitColumnsField # Initialize a new field with the associated repository and encoding. # - # @return [CodeUnitColumnsField] a new instance of CodeUnitColumnsField - # - # source://prism//lib/prism/relocation.rb#290 + # pkg:gem/prism#lib/prism/relocation.rb:291 def initialize(repository, encoding); end # The associated encoding for the code units. # - # source://prism//lib/prism/relocation.rb#287 + # pkg:gem/prism#lib/prism/relocation.rb:288 def encoding; end # Fetches the start and end code units column of a value for a particular # encoding. # - # source://prism//lib/prism/relocation.rb#298 + # pkg:gem/prism#lib/prism/relocation.rb:299 def fields(value); end # The repository object that is used for lazily creating a code units # cache. # - # source://prism//lib/prism/relocation.rb#284 + # pkg:gem/prism#lib/prism/relocation.rb:285 def repository; end private # Lazily create a code units cache for the associated encoding. # - # source://prism//lib/prism/relocation.rb#308 + # pkg:gem/prism#lib/prism/relocation.rb:309 def cache; end end # A field representing the start and end code unit offsets. # -# source://prism//lib/prism/relocation.rb#228 +# pkg:gem/prism#lib/prism/relocation.rb:229 class Prism::Relocation::CodeUnitOffsetsField # Initialize a new field with the associated repository and encoding. # - # @return [CodeUnitOffsetsField] a new instance of CodeUnitOffsetsField - # - # source://prism//lib/prism/relocation.rb#237 + # pkg:gem/prism#lib/prism/relocation.rb:238 def initialize(repository, encoding); end # The associated encoding for the code units. # - # source://prism//lib/prism/relocation.rb#234 + # pkg:gem/prism#lib/prism/relocation.rb:235 def encoding; end # Fetches the start and end code units offset of a value for a particular # encoding. # - # source://prism//lib/prism/relocation.rb#245 + # pkg:gem/prism#lib/prism/relocation.rb:246 def fields(value); end # A pointer to the repository object that is used for lazily creating a # code units cache. # - # source://prism//lib/prism/relocation.rb#231 + # pkg:gem/prism#lib/prism/relocation.rb:232 def repository; end private # Lazily create a code units cache for the associated encoding. # - # source://prism//lib/prism/relocation.rb#255 + # pkg:gem/prism#lib/prism/relocation.rb:256 def cache; end end # A field representing the start and end byte columns. # -# source://prism//lib/prism/relocation.rb#261 +# pkg:gem/prism#lib/prism/relocation.rb:262 class Prism::Relocation::ColumnsField # Fetches the start and end byte column of a value. # - # source://prism//lib/prism/relocation.rb#263 + # pkg:gem/prism#lib/prism/relocation.rb:264 def fields(value); end end # An abstract field used as the parent class of the two comments fields. # -# source://prism//lib/prism/relocation.rb#314 +# pkg:gem/prism#lib/prism/relocation.rb:315 class Prism::Relocation::CommentsField private # Create comment objects from the given values. # - # source://prism//lib/prism/relocation.rb#329 + # pkg:gem/prism#lib/prism/relocation.rb:330 def comments(values); end end # An object that represents a slice of a comment. # -# source://prism//lib/prism/relocation.rb#316 +# pkg:gem/prism#lib/prism/relocation.rb:317 class Prism::Relocation::CommentsField::Comment # Initialize a new comment with the given slice. # - # @return [Comment] a new instance of Comment - # - # source://prism//lib/prism/relocation.rb#321 + # pkg:gem/prism#lib/prism/relocation.rb:322 def initialize(slice); end # The slice of the comment. # - # source://prism//lib/prism/relocation.rb#318 + # pkg:gem/prism#lib/prism/relocation.rb:319 def slice; end end # An entry in a repository that will lazily reify its values when they are # first accessed. # -# source://prism//lib/prism/relocation.rb#16 +# pkg:gem/prism#lib/prism/relocation.rb:17 class Prism::Relocation::Entry # Initialize a new entry with the given repository. # - # @return [Entry] a new instance of Entry - # - # source://prism//lib/prism/relocation.rb#24 + # pkg:gem/prism#lib/prism/relocation.rb:25 def initialize(repository); end # Fetch the leading and trailing comments of the value. # - # source://prism//lib/prism/relocation.rb#119 + # pkg:gem/prism#lib/prism/relocation.rb:120 def comments; end # Fetch the end character column of the value. # - # source://prism//lib/prism/relocation.rb#92 + # pkg:gem/prism#lib/prism/relocation.rb:93 def end_character_column; end # Fetch the end character offset of the value. # - # source://prism//lib/prism/relocation.rb#60 + # pkg:gem/prism#lib/prism/relocation.rb:61 def end_character_offset; end # Fetch the end code units column of the value, for the encoding that was # configured on the repository. # - # source://prism//lib/prism/relocation.rb#104 + # pkg:gem/prism#lib/prism/relocation.rb:105 def end_code_units_column; end # Fetch the end code units offset of the value, for the encoding that was # configured on the repository. # - # source://prism//lib/prism/relocation.rb#72 + # pkg:gem/prism#lib/prism/relocation.rb:73 def end_code_units_offset; end # Fetch the end byte column of the value. # - # source://prism//lib/prism/relocation.rb#82 + # pkg:gem/prism#lib/prism/relocation.rb:83 def end_column; end # Fetch the end line of the value. # - # source://prism//lib/prism/relocation.rb#40 + # pkg:gem/prism#lib/prism/relocation.rb:41 def end_line; end # Fetch the end byte offset of the value. # - # source://prism//lib/prism/relocation.rb#50 + # pkg:gem/prism#lib/prism/relocation.rb:51 def end_offset; end # Fetch the filepath of the value. # - # source://prism//lib/prism/relocation.rb#30 + # pkg:gem/prism#lib/prism/relocation.rb:31 def filepath; end # Fetch the leading comments of the value. # - # source://prism//lib/prism/relocation.rb#109 + # pkg:gem/prism#lib/prism/relocation.rb:110 def leading_comments; end # Reify the values on this entry with the given values. This is an # internal-only API that is called from the repository when it is time to # reify the values. # - # source://prism//lib/prism/relocation.rb#126 + # pkg:gem/prism#lib/prism/relocation.rb:127 def reify!(values); end # Fetch the start character column of the value. # - # source://prism//lib/prism/relocation.rb#87 + # pkg:gem/prism#lib/prism/relocation.rb:88 def start_character_column; end # Fetch the start character offset of the value. # - # source://prism//lib/prism/relocation.rb#55 + # pkg:gem/prism#lib/prism/relocation.rb:56 def start_character_offset; end # Fetch the start code units column of the value, for the encoding that # was configured on the repository. # - # source://prism//lib/prism/relocation.rb#98 + # pkg:gem/prism#lib/prism/relocation.rb:99 def start_code_units_column; end # Fetch the start code units offset of the value, for the encoding that # was configured on the repository. # - # source://prism//lib/prism/relocation.rb#66 + # pkg:gem/prism#lib/prism/relocation.rb:67 def start_code_units_offset; end # Fetch the start byte column of the value. # - # source://prism//lib/prism/relocation.rb#77 + # pkg:gem/prism#lib/prism/relocation.rb:78 def start_column; end # Fetch the start line of the value. # - # source://prism//lib/prism/relocation.rb#35 + # pkg:gem/prism#lib/prism/relocation.rb:36 def start_line; end # Fetch the start byte offset of the value. # - # source://prism//lib/prism/relocation.rb#45 + # pkg:gem/prism#lib/prism/relocation.rb:46 def start_offset; end # Fetch the trailing comments of the value. # - # source://prism//lib/prism/relocation.rb#114 + # pkg:gem/prism#lib/prism/relocation.rb:115 def trailing_comments; end private # Fetch a value from the entry, raising an error if it is missing. # - # source://prism//lib/prism/relocation.rb#134 + # pkg:gem/prism#lib/prism/relocation.rb:135 def fetch_value(name); end # Return the values from the repository, reifying them if necessary. # - # source://prism//lib/prism/relocation.rb#142 + # pkg:gem/prism#lib/prism/relocation.rb:143 def values; end end @@ -30739,170 +30723,164 @@ end # because it was either not configured on the repository or it has not yet # been fetched. # -# source://prism//lib/prism/relocation.rb#20 +# pkg:gem/prism#lib/prism/relocation.rb:21 class Prism::Relocation::Entry::MissingValueError < ::StandardError; end # A field that represents the file path. # -# source://prism//lib/prism/relocation.rb#185 +# pkg:gem/prism#lib/prism/relocation.rb:186 class Prism::Relocation::FilepathField # Initialize a new field with the given file path. # - # @return [FilepathField] a new instance of FilepathField - # - # source://prism//lib/prism/relocation.rb#190 + # pkg:gem/prism#lib/prism/relocation.rb:191 def initialize(value); end # Fetch the file path. # - # source://prism//lib/prism/relocation.rb#195 + # pkg:gem/prism#lib/prism/relocation.rb:196 def fields(_value); end # The file path that this field represents. # - # source://prism//lib/prism/relocation.rb#187 + # pkg:gem/prism#lib/prism/relocation.rb:188 def value; end end # A field representing the leading comments. # -# source://prism//lib/prism/relocation.rb#335 +# pkg:gem/prism#lib/prism/relocation.rb:336 class Prism::Relocation::LeadingCommentsField < ::Prism::Relocation::CommentsField # Fetches the leading comments of a value. # - # source://prism//lib/prism/relocation.rb#337 + # pkg:gem/prism#lib/prism/relocation.rb:338 def fields(value); end end # A field representing the start and end lines. # -# source://prism//lib/prism/relocation.rb#201 +# pkg:gem/prism#lib/prism/relocation.rb:202 class Prism::Relocation::LinesField # Fetches the start and end line of a value. # - # source://prism//lib/prism/relocation.rb#203 + # pkg:gem/prism#lib/prism/relocation.rb:204 def fields(value); end end # A field representing the start and end byte offsets. # -# source://prism//lib/prism/relocation.rb#209 +# pkg:gem/prism#lib/prism/relocation.rb:210 class Prism::Relocation::OffsetsField # Fetches the start and end byte offset of a value. # - # source://prism//lib/prism/relocation.rb#211 + # pkg:gem/prism#lib/prism/relocation.rb:212 def fields(value); end end # A repository is a configured collection of fields and a set of entries # that knows how to reparse a source and reify the values. # -# source://prism//lib/prism/relocation.rb#352 +# pkg:gem/prism#lib/prism/relocation.rb:353 class Prism::Relocation::Repository # Initialize a new repository with the given source. # - # @return [Repository] a new instance of Repository - # - # source://prism//lib/prism/relocation.rb#369 + # pkg:gem/prism#lib/prism/relocation.rb:370 def initialize(source); end # Configure the character columns field for this repository and return # self. # - # source://prism//lib/prism/relocation.rb#415 + # pkg:gem/prism#lib/prism/relocation.rb:416 def character_columns; end # Configure the character offsets field for this repository and return # self. # - # source://prism//lib/prism/relocation.rb#398 + # pkg:gem/prism#lib/prism/relocation.rb:399 def character_offsets; end # Configure the code unit columns field for this repository for a specific # encoding and return self. # - # source://prism//lib/prism/relocation.rb#421 + # pkg:gem/prism#lib/prism/relocation.rb:422 def code_unit_columns(encoding); end # Configure the code unit offsets field for this repository for a specific # encoding and return self. # - # source://prism//lib/prism/relocation.rb#404 + # pkg:gem/prism#lib/prism/relocation.rb:405 def code_unit_offsets(encoding); end # Create a code units cache for the given encoding from the source. # - # source://prism//lib/prism/relocation.rb#376 + # pkg:gem/prism#lib/prism/relocation.rb:377 def code_units_cache(encoding); end # Configure the columns field for this repository and return self. # - # source://prism//lib/prism/relocation.rb#409 + # pkg:gem/prism#lib/prism/relocation.rb:410 def columns; end # Configure both the leading and trailing comment fields for this # repository and return self. # - # source://prism//lib/prism/relocation.rb#439 + # pkg:gem/prism#lib/prism/relocation.rb:440 def comments; end # This method is called from nodes and locations when they want to enter # themselves into the repository. It it internal-only and meant to be # called from the #save* APIs. # - # source://prism//lib/prism/relocation.rb#446 + # pkg:gem/prism#lib/prism/relocation.rb:447 def enter(node_id, field_name); end # The entries that have been saved on this repository. # - # source://prism//lib/prism/relocation.rb#366 + # pkg:gem/prism#lib/prism/relocation.rb:367 def entries; end # The fields that have been configured on this repository. # - # source://prism//lib/prism/relocation.rb#363 + # pkg:gem/prism#lib/prism/relocation.rb:364 def fields; end # Configure the filepath field for this repository and return self. # - # @raise [ConfigurationError] - # - # source://prism//lib/prism/relocation.rb#381 + # pkg:gem/prism#lib/prism/relocation.rb:382 def filepath; end # Configure the leading comments field for this repository and return # self. # - # source://prism//lib/prism/relocation.rb#427 + # pkg:gem/prism#lib/prism/relocation.rb:428 def leading_comments; end # Configure the lines field for this repository and return self. # - # source://prism//lib/prism/relocation.rb#387 + # pkg:gem/prism#lib/prism/relocation.rb:388 def lines; end # Configure the offsets field for this repository and return self. # - # source://prism//lib/prism/relocation.rb#392 + # pkg:gem/prism#lib/prism/relocation.rb:393 def offsets; end # This method is called from the entries in the repository when they need # to reify their values. It is internal-only and meant to be called from # the various value APIs. # - # source://prism//lib/prism/relocation.rb#455 + # pkg:gem/prism#lib/prism/relocation.rb:456 def reify!; end # The source associated with this repository. This will be either a # SourceFilepath (the most common use case) or a SourceString. # - # source://prism//lib/prism/relocation.rb#360 + # pkg:gem/prism#lib/prism/relocation.rb:361 def source; end # Configure the trailing comments field for this repository and return # self. # - # source://prism//lib/prism/relocation.rb#433 + # pkg:gem/prism#lib/prism/relocation.rb:434 def trailing_comments; end private @@ -30910,74 +30888,68 @@ class Prism::Relocation::Repository # Append the given field to the repository and return the repository so # that these calls can be chained. # - # @raise [ConfigurationError] - # - # source://prism//lib/prism/relocation.rb#487 + # pkg:gem/prism#lib/prism/relocation.rb:488 def field(name, value); end end # Raised when multiple fields of the same type are configured on the same # repository. # -# source://prism//lib/prism/relocation.rb#355 +# pkg:gem/prism#lib/prism/relocation.rb:356 class Prism::Relocation::Repository::ConfigurationError < ::StandardError; end # Represents the source of a repository that will be reparsed. # -# source://prism//lib/prism/relocation.rb#148 +# pkg:gem/prism#lib/prism/relocation.rb:149 class Prism::Relocation::Source # Initialize the source with the given value. # - # @return [Source] a new instance of Source - # - # source://prism//lib/prism/relocation.rb#153 + # pkg:gem/prism#lib/prism/relocation.rb:154 def initialize(value); end # Create a code units cache for the given encoding. # - # source://prism//lib/prism/relocation.rb#163 + # pkg:gem/prism#lib/prism/relocation.rb:164 def code_units_cache(encoding); end # Reparse the value and return the parse result. # - # @raise [NotImplementedError] - # - # source://prism//lib/prism/relocation.rb#158 + # pkg:gem/prism#lib/prism/relocation.rb:159 def result; end # The value that will need to be reparsed. # - # source://prism//lib/prism/relocation.rb#150 + # pkg:gem/prism#lib/prism/relocation.rb:151 def value; end end # A source that is represented by a file path. # -# source://prism//lib/prism/relocation.rb#169 +# pkg:gem/prism#lib/prism/relocation.rb:170 class Prism::Relocation::SourceFilepath < ::Prism::Relocation::Source # Reparse the file and return the parse result. # - # source://prism//lib/prism/relocation.rb#171 + # pkg:gem/prism#lib/prism/relocation.rb:172 def result; end end # A source that is represented by a string. # -# source://prism//lib/prism/relocation.rb#177 +# pkg:gem/prism#lib/prism/relocation.rb:178 class Prism::Relocation::SourceString < ::Prism::Relocation::Source # Reparse the string and return the parse result. # - # source://prism//lib/prism/relocation.rb#179 + # pkg:gem/prism#lib/prism/relocation.rb:180 def result; end end # A field representing the trailing comments. # -# source://prism//lib/prism/relocation.rb#343 +# pkg:gem/prism#lib/prism/relocation.rb:344 class Prism::Relocation::TrailingCommentsField < ::Prism::Relocation::CommentsField # Fetches the trailing comments of a value. # - # source://prism//lib/prism/relocation.rb#345 + # pkg:gem/prism#lib/prism/relocation.rb:346 def fields(value); end end @@ -30987,13 +30959,11 @@ end # ^^ # end # -# source://prism//lib/prism/node.rb#15439 +# pkg:gem/prism#lib/prism/node.rb:16577 class Prism::RequiredKeywordParameterNode < ::Prism::Node # Initialize a new RequiredKeywordParameterNode node. # - # @return [RequiredKeywordParameterNode] a new instance of RequiredKeywordParameterNode - # - # source://prism//lib/prism/node.rb#15441 + # pkg:gem/prism#lib/prism/node.rb:16579 sig do params( source: Prism::Source, @@ -31009,36 +30979,36 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15521 + # pkg:gem/prism#lib/prism/node.rb:16665 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15451 + # pkg:gem/prism#lib/prism/node.rb:16589 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15456 + # pkg:gem/prism#lib/prism/node.rb:16594 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15466 + # pkg:gem/prism#lib/prism/node.rb:16610 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15461 + # pkg:gem/prism#lib/prism/node.rb:16605 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location) -> RequiredKeywordParameterNode # - # source://prism//lib/prism/node.rb#15471 + # pkg:gem/prism#lib/prism/node.rb:16615 sig do params( node_id: Integer, @@ -31048,66 +31018,68 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node name_loc: Prism::Location ).returns(Prism::RequiredKeywordParameterNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15456 + # pkg:gem/prism#lib/prism/node.rb:16620 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location } # - # source://prism//lib/prism/node.rb#15479 + # pkg:gem/prism#lib/prism/node.rb:16623 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:16599 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#15505 + # pkg:gem/prism#lib/prism/node.rb:16649 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#15489 + # pkg:gem/prism#lib/prism/node.rb:16633 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#15492 + # pkg:gem/prism#lib/prism/node.rb:16636 sig { returns(Prism::Location) } def name_loc; end # def repeated_parameter?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#15484 + # pkg:gem/prism#lib/prism/node.rb:16628 sig { returns(T::Boolean) } def repeated_parameter?; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15500 + # pkg:gem/prism#lib/prism/node.rb:16644 def save_name_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#15510 + # pkg:gem/prism#lib/prism/node.rb:16654 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#15515 + # pkg:gem/prism#lib/prism/node.rb:16659 def type; end end end @@ -31118,49 +31090,47 @@ end # ^ # end # -# source://prism//lib/prism/node.rb#15534 +# pkg:gem/prism#lib/prism/node.rb:16678 class Prism::RequiredParameterNode < ::Prism::Node # Initialize a new RequiredParameterNode node. # - # @return [RequiredParameterNode] a new instance of RequiredParameterNode - # - # source://prism//lib/prism/node.rb#15536 + # pkg:gem/prism#lib/prism/node.rb:16680 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15602 + # pkg:gem/prism#lib/prism/node.rb:16752 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15545 + # pkg:gem/prism#lib/prism/node.rb:16689 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15550 + # pkg:gem/prism#lib/prism/node.rb:16694 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15560 + # pkg:gem/prism#lib/prism/node.rb:16710 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15555 + # pkg:gem/prism#lib/prism/node.rb:16705 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> RequiredParameterNode # - # source://prism//lib/prism/node.rb#15565 + # pkg:gem/prism#lib/prism/node.rb:16715 sig do params( node_id: Integer, @@ -31169,54 +31139,56 @@ class Prism::RequiredParameterNode < ::Prism::Node name: Symbol ).returns(Prism::RequiredParameterNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15550 + # pkg:gem/prism#lib/prism/node.rb:16720 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#15573 + # pkg:gem/prism#lib/prism/node.rb:16723 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:16699 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#15586 + # pkg:gem/prism#lib/prism/node.rb:16736 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#15583 + # pkg:gem/prism#lib/prism/node.rb:16733 sig { returns(Symbol) } def name; end # def repeated_parameter?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#15578 + # pkg:gem/prism#lib/prism/node.rb:16728 sig { returns(T::Boolean) } def repeated_parameter?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#15591 + # pkg:gem/prism#lib/prism/node.rb:16741 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#15596 + # pkg:gem/prism#lib/prism/node.rb:16746 def type; end end end @@ -31226,13 +31198,11 @@ end # foo rescue nil # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#15613 +# pkg:gem/prism#lib/prism/node.rb:16763 class Prism::RescueModifierNode < ::Prism::Node # Initialize a new RescueModifierNode node. # - # @return [RescueModifierNode] a new instance of RescueModifierNode - # - # source://prism//lib/prism/node.rb#15615 + # pkg:gem/prism#lib/prism/node.rb:16765 sig do params( source: Prism::Source, @@ -31249,36 +31219,36 @@ class Prism::RescueModifierNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15699 + # pkg:gem/prism#lib/prism/node.rb:16857 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15626 + # pkg:gem/prism#lib/prism/node.rb:16776 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15631 + # pkg:gem/prism#lib/prism/node.rb:16781 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15641 + # pkg:gem/prism#lib/prism/node.rb:16799 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15636 + # pkg:gem/prism#lib/prism/node.rb:16794 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node, ?keyword_loc: Location, ?rescue_expression: Prism::node) -> RescueModifierNode # - # source://prism//lib/prism/node.rb#15646 + # pkg:gem/prism#lib/prism/node.rb:16804 sig do params( node_id: Integer, @@ -31289,24 +31259,28 @@ class Prism::RescueModifierNode < ::Prism::Node rescue_expression: Prism::Node ).returns(Prism::RescueModifierNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), keyword_loc: T.unsafe(nil), rescue_expression: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, expression: self.expression, keyword_loc: self.keyword_loc, rescue_expression: self.rescue_expression); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15631 + # pkg:gem/prism#lib/prism/node.rb:16809 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node, keyword_loc: Location, rescue_expression: Prism::node } # - # source://prism//lib/prism/node.rb#15654 + # pkg:gem/prism#lib/prism/node.rb:16812 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:16786 + def each_child_node; end + # attr_reader expression: Prism::node # - # source://prism//lib/prism/node.rb#15659 + # pkg:gem/prism#lib/prism/node.rb:16817 sig { returns(Prism::Node) } def expression; end @@ -31315,47 +31289,47 @@ class Prism::RescueModifierNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#15683 + # pkg:gem/prism#lib/prism/node.rb:16841 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#15678 + # pkg:gem/prism#lib/prism/node.rb:16836 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#15662 + # pkg:gem/prism#lib/prism/node.rb:16820 sig { returns(Prism::Location) } def keyword_loc; end - # source://prism//lib/prism/parse_result/newlines.rb#115 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:116 def newline_flag!(lines); end # attr_reader rescue_expression: Prism::node # - # source://prism//lib/prism/node.rb#15675 + # pkg:gem/prism#lib/prism/node.rb:16833 sig { returns(Prism::Node) } def rescue_expression; end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15670 + # pkg:gem/prism#lib/prism/node.rb:16828 def save_keyword_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#15688 + # pkg:gem/prism#lib/prism/node.rb:16846 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#15693 + # pkg:gem/prism#lib/prism/node.rb:16851 def type; end end end @@ -31370,13 +31344,11 @@ end # # `Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `reference` field. # -# source://prism//lib/prism/node.rb#15716 +# pkg:gem/prism#lib/prism/node.rb:16874 class Prism::RescueNode < ::Prism::Node # Initialize a new RescueNode node. # - # @return [RescueNode] a new instance of RescueNode - # - # source://prism//lib/prism/node.rb#15718 + # pkg:gem/prism#lib/prism/node.rb:16876 sig do params( source: Prism::Source, @@ -31397,42 +31369,42 @@ class Prism::RescueNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15865 + # pkg:gem/prism#lib/prism/node.rb:17033 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15733 + # pkg:gem/prism#lib/prism/node.rb:16891 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15738 + # pkg:gem/prism#lib/prism/node.rb:16896 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15753 + # pkg:gem/prism#lib/prism/node.rb:16921 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15743 + # pkg:gem/prism#lib/prism/node.rb:16911 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # Returns the subsequent rescue clause of the rescue node. This method is # deprecated in favor of #subsequent. # - # source://prism//lib/prism/node_ext.rb#494 + # pkg:gem/prism#lib/prism/node_ext.rb:497 def consequent; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?exceptions: Array[Prism::node], ?operator_loc: Location?, ?reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?subsequent: RescueNode?) -> RescueNode # - # source://prism//lib/prism/node.rb#15758 + # pkg:gem/prism#lib/prism/node.rb:16926 sig do params( node_id: Integer, @@ -31447,24 +31419,28 @@ class Prism::RescueNode < ::Prism::Node subsequent: T.nilable(Prism::RescueNode) ).returns(Prism::RescueNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), exceptions: T.unsafe(nil), operator_loc: T.unsafe(nil), reference: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, keyword_loc: self.keyword_loc, exceptions: self.exceptions, operator_loc: self.operator_loc, reference: self.reference, then_keyword_loc: self.then_keyword_loc, statements: self.statements, subsequent: self.subsequent); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15738 + # pkg:gem/prism#lib/prism/node.rb:16931 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, exceptions: Array[Prism::node], operator_loc: Location?, reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil, then_keyword_loc: Location?, statements: StatementsNode?, subsequent: RescueNode? } # - # source://prism//lib/prism/node.rb#15766 + # pkg:gem/prism#lib/prism/node.rb:16934 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:16901 + def each_child_node; end + # attr_reader exceptions: Array[Prism::node] # - # source://prism//lib/prism/node.rb#15784 + # pkg:gem/prism#lib/prism/node.rb:16952 sig { returns(T::Array[Prism::Node]) } def exceptions; end @@ -31473,37 +31449,37 @@ class Prism::RescueNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#15849 + # pkg:gem/prism#lib/prism/node.rb:17017 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#15834 + # pkg:gem/prism#lib/prism/node.rb:17002 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#15771 + # pkg:gem/prism#lib/prism/node.rb:16939 sig { returns(Prism::Location) } def keyword_loc; end # def operator: () -> String? # - # source://prism//lib/prism/node.rb#15839 + # pkg:gem/prism#lib/prism/node.rb:17007 sig { returns(T.nilable(String)) } def operator; end # attr_reader operator_loc: Location? # - # source://prism//lib/prism/node.rb#15787 + # pkg:gem/prism#lib/prism/node.rb:16955 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end # attr_reader reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil # - # source://prism//lib/prism/node.rb#15806 + # pkg:gem/prism#lib/prism/node.rb:16974 sig do returns(T.nilable(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode))) end @@ -31512,55 +31488,55 @@ class Prism::RescueNode < ::Prism::Node # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15779 + # pkg:gem/prism#lib/prism/node.rb:16947 def save_keyword_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15801 + # pkg:gem/prism#lib/prism/node.rb:16969 def save_operator_loc(repository); end # Save the then_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15823 + # pkg:gem/prism#lib/prism/node.rb:16991 def save_then_keyword_loc(repository); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#15828 + # pkg:gem/prism#lib/prism/node.rb:16996 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # attr_reader subsequent: RescueNode? # - # source://prism//lib/prism/node.rb#15831 + # pkg:gem/prism#lib/prism/node.rb:16999 sig { returns(T.nilable(Prism::RescueNode)) } def subsequent; end # def then_keyword: () -> String? # - # source://prism//lib/prism/node.rb#15844 + # pkg:gem/prism#lib/prism/node.rb:17012 sig { returns(T.nilable(String)) } def then_keyword; end # attr_reader then_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#15809 + # pkg:gem/prism#lib/prism/node.rb:16977 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#15854 + # pkg:gem/prism#lib/prism/node.rb:17022 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#15859 + # pkg:gem/prism#lib/prism/node.rb:17027 def type; end end end @@ -31571,13 +31547,11 @@ end # ^^ # end # -# source://prism//lib/prism/node.rb#15883 +# pkg:gem/prism#lib/prism/node.rb:17051 class Prism::RestParameterNode < ::Prism::Node # Initialize a new RestParameterNode node. # - # @return [RestParameterNode] a new instance of RestParameterNode - # - # source://prism//lib/prism/node.rb#15885 + # pkg:gem/prism#lib/prism/node.rb:17053 sig do params( source: Prism::Source, @@ -31594,36 +31568,36 @@ class Prism::RestParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15990 + # pkg:gem/prism#lib/prism/node.rb:17164 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15896 + # pkg:gem/prism#lib/prism/node.rb:17064 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15901 + # pkg:gem/prism#lib/prism/node.rb:17069 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15911 + # pkg:gem/prism#lib/prism/node.rb:17085 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15906 + # pkg:gem/prism#lib/prism/node.rb:17080 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location) -> RestParameterNode # - # source://prism//lib/prism/node.rb#15916 + # pkg:gem/prism#lib/prism/node.rb:17090 sig do params( node_id: Integer, @@ -31634,84 +31608,86 @@ class Prism::RestParameterNode < ::Prism::Node operator_loc: Prism::Location ).returns(Prism::RestParameterNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, name: self.name, name_loc: self.name_loc, operator_loc: self.operator_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#15901 + # pkg:gem/prism#lib/prism/node.rb:17095 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location } # - # source://prism//lib/prism/node.rb#15924 + # pkg:gem/prism#lib/prism/node.rb:17098 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:17074 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#15974 + # pkg:gem/prism#lib/prism/node.rb:17148 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#15934 + # pkg:gem/prism#lib/prism/node.rb:17108 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://prism//lib/prism/node.rb#15937 + # pkg:gem/prism#lib/prism/node.rb:17111 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#15969 + # pkg:gem/prism#lib/prism/node.rb:17143 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#15956 + # pkg:gem/prism#lib/prism/node.rb:17130 sig { returns(Prism::Location) } def operator_loc; end # def repeated_parameter?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#15929 + # pkg:gem/prism#lib/prism/node.rb:17103 sig { returns(T::Boolean) } def repeated_parameter?; end # Save the name_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15951 + # pkg:gem/prism#lib/prism/node.rb:17125 def save_name_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#15964 + # pkg:gem/prism#lib/prism/node.rb:17138 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#15979 + # pkg:gem/prism#lib/prism/node.rb:17153 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#15984 + # pkg:gem/prism#lib/prism/node.rb:17158 def type; end end end @@ -31720,13 +31696,11 @@ end # the requested structure, any comments that were encounters, and any errors # that were encountered. # -# source://prism//lib/prism/parse_result.rb#679 +# pkg:gem/prism#lib/prism/parse_result.rb:676 class Prism::Result # Create a new result object with the given values. # - # @return [Result] a new instance of Result - # - # source://prism//lib/prism/parse_result.rb#701 + # pkg:gem/prism#lib/prism/parse_result.rb:698 sig do params( comments: T::Array[Prism::Comment], @@ -31741,7 +31715,7 @@ class Prism::Result # Create a code units cache for the given encoding. # - # source://prism//lib/prism/parse_result.rb#733 + # pkg:gem/prism#lib/prism/parse_result.rb:730 sig do params( encoding: Encoding @@ -31751,7 +31725,7 @@ class Prism::Result # The list of comments that were encountered during parsing. # - # source://prism//lib/prism/parse_result.rb#681 + # pkg:gem/prism#lib/prism/parse_result.rb:678 sig { returns(T::Array[Prism::Comment]) } def comments; end @@ -31759,61 +31733,57 @@ class Prism::Result # and the rest of the content of the file. This content is loaded into the # DATA constant when the file being parsed is the main file being executed. # - # source://prism//lib/prism/parse_result.rb#689 + # pkg:gem/prism#lib/prism/parse_result.rb:686 sig { returns(T.nilable(Prism::Location)) } def data_loc; end # Implement the hash pattern matching interface for Result. # - # source://prism//lib/prism/parse_result.rb#711 + # pkg:gem/prism#lib/prism/parse_result.rb:708 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # Returns the encoding of the source code that was parsed. # - # source://prism//lib/prism/parse_result.rb#716 + # pkg:gem/prism#lib/prism/parse_result.rb:713 sig { returns(Encoding) } def encoding; end # The list of errors that were generated during parsing. # - # source://prism//lib/prism/parse_result.rb#692 + # pkg:gem/prism#lib/prism/parse_result.rb:689 sig { returns(T::Array[Prism::ParseError]) } def errors; end # Returns true if there were errors during parsing and false if there were # not. # - # @return [Boolean] - # - # source://prism//lib/prism/parse_result.rb#728 + # pkg:gem/prism#lib/prism/parse_result.rb:725 sig { returns(T::Boolean) } def failure?; end # The list of magic comments that were encountered during parsing. # - # source://prism//lib/prism/parse_result.rb#684 + # pkg:gem/prism#lib/prism/parse_result.rb:681 sig { returns(T::Array[Prism::MagicComment]) } def magic_comments; end # A Source instance that represents the source code that was parsed. # - # source://prism//lib/prism/parse_result.rb#698 + # pkg:gem/prism#lib/prism/parse_result.rb:695 sig { returns(Prism::Source) } def source; end # Returns true if there were no errors during parsing and false if there # were. # - # @return [Boolean] - # - # source://prism//lib/prism/parse_result.rb#722 + # pkg:gem/prism#lib/prism/parse_result.rb:719 sig { returns(T::Boolean) } def success?; end # The list of warnings that were generated during parsing. # - # source://prism//lib/prism/parse_result.rb#695 + # pkg:gem/prism#lib/prism/parse_result.rb:692 sig { returns(T::Array[Prism::ParseWarning]) } def warnings; end end @@ -31823,84 +31793,86 @@ end # retry # ^^^^^ # -# source://prism//lib/prism/node.rb#16003 +# pkg:gem/prism#lib/prism/node.rb:17177 class Prism::RetryNode < ::Prism::Node # Initialize a new RetryNode node. # - # @return [RetryNode] a new instance of RetryNode - # - # source://prism//lib/prism/node.rb#16005 + # pkg:gem/prism#lib/prism/node.rb:17179 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16062 + # pkg:gem/prism#lib/prism/node.rb:17242 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16013 + # pkg:gem/prism#lib/prism/node.rb:17187 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16018 + # pkg:gem/prism#lib/prism/node.rb:17192 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16028 + # pkg:gem/prism#lib/prism/node.rb:17208 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16023 + # pkg:gem/prism#lib/prism/node.rb:17203 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> RetryNode # - # source://prism//lib/prism/node.rb#16033 + # pkg:gem/prism#lib/prism/node.rb:17213 sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::RetryNode) } - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16018 + # pkg:gem/prism#lib/prism/node.rb:17218 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#16041 + # pkg:gem/prism#lib/prism/node.rb:17221 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:17197 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#16046 + # pkg:gem/prism#lib/prism/node.rb:17226 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16051 + # pkg:gem/prism#lib/prism/node.rb:17231 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16056 + # pkg:gem/prism#lib/prism/node.rb:17236 def type; end end end @@ -31910,13 +31882,11 @@ end # return 1 # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#16071 +# pkg:gem/prism#lib/prism/node.rb:17251 class Prism::ReturnNode < ::Prism::Node # Initialize a new ReturnNode node. # - # @return [ReturnNode] a new instance of ReturnNode - # - # source://prism//lib/prism/node.rb#16073 + # pkg:gem/prism#lib/prism/node.rb:17253 sig do params( source: Prism::Source, @@ -31932,42 +31902,42 @@ class Prism::ReturnNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16155 + # pkg:gem/prism#lib/prism/node.rb:17342 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16083 + # pkg:gem/prism#lib/prism/node.rb:17263 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#16131 + # pkg:gem/prism#lib/prism/node.rb:17318 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16088 + # pkg:gem/prism#lib/prism/node.rb:17268 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16100 + # pkg:gem/prism#lib/prism/node.rb:17287 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16093 + # pkg:gem/prism#lib/prism/node.rb:17280 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?arguments: ArgumentsNode?) -> ReturnNode # - # source://prism//lib/prism/node.rb#16105 + # pkg:gem/prism#lib/prism/node.rb:17292 sig do params( node_id: Integer, @@ -31977,58 +31947,62 @@ class Prism::ReturnNode < ::Prism::Node arguments: T.nilable(Prism::ArgumentsNode) ).returns(Prism::ReturnNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), arguments: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, keyword_loc: self.keyword_loc, arguments: self.arguments); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16088 + # pkg:gem/prism#lib/prism/node.rb:17297 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, arguments: ArgumentsNode? } # - # source://prism//lib/prism/node.rb#16113 + # pkg:gem/prism#lib/prism/node.rb:17300 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:17273 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#16139 + # pkg:gem/prism#lib/prism/node.rb:17326 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#16134 + # pkg:gem/prism#lib/prism/node.rb:17321 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#16118 + # pkg:gem/prism#lib/prism/node.rb:17305 sig { returns(Prism::Location) } def keyword_loc; end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#16126 + # pkg:gem/prism#lib/prism/node.rb:17313 def save_keyword_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16144 + # pkg:gem/prism#lib/prism/node.rb:17331 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16149 + # pkg:gem/prism#lib/prism/node.rb:17336 def type; end end end @@ -32038,13 +32012,11 @@ end # variables visible at that scope as well as the forwarding parameters # available at that scope. # -# source://prism//lib/prism/parse_result.rb#887 +# pkg:gem/prism#lib/prism/parse_result.rb:884 class Prism::Scope # Create a new scope object with the given locals and forwarding. # - # @return [Scope] a new instance of Scope - # - # source://prism//lib/prism/parse_result.rb#898 + # pkg:gem/prism#lib/prism/parse_result.rb:895 sig { params(locals: T::Array[Symbol], forwarding: T::Array[Symbol]).void } def initialize(locals, forwarding); end @@ -32052,14 +32024,14 @@ class Prism::Scope # should by defined as an array of symbols containing the specific values of # :*, :**, :&, or :"...". # - # source://prism//lib/prism/parse_result.rb#895 + # pkg:gem/prism#lib/prism/parse_result.rb:892 sig { returns(T::Array[Symbol]) } def forwarding; end # The list of local variables that are defined in this scope. This should be # defined as an array of symbols. # - # source://prism//lib/prism/parse_result.rb#890 + # pkg:gem/prism#lib/prism/parse_result.rb:887 sig { returns(T::Array[Symbol]) } def locals; end end @@ -32069,91 +32041,93 @@ end # self # ^^^^ # -# source://prism//lib/prism/node.rb#16166 +# pkg:gem/prism#lib/prism/node.rb:17353 class Prism::SelfNode < ::Prism::Node # Initialize a new SelfNode node. # - # @return [SelfNode] a new instance of SelfNode - # - # source://prism//lib/prism/node.rb#16168 + # pkg:gem/prism#lib/prism/node.rb:17355 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16225 + # pkg:gem/prism#lib/prism/node.rb:17418 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16176 + # pkg:gem/prism#lib/prism/node.rb:17363 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16181 + # pkg:gem/prism#lib/prism/node.rb:17368 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16191 + # pkg:gem/prism#lib/prism/node.rb:17384 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16186 + # pkg:gem/prism#lib/prism/node.rb:17379 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SelfNode # - # source://prism//lib/prism/node.rb#16196 + # pkg:gem/prism#lib/prism/node.rb:17389 sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::SelfNode) } - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16181 + # pkg:gem/prism#lib/prism/node.rb:17394 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#16204 + # pkg:gem/prism#lib/prism/node.rb:17397 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:17373 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#16209 + # pkg:gem/prism#lib/prism/node.rb:17402 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16214 + # pkg:gem/prism#lib/prism/node.rb:17407 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16219 + # pkg:gem/prism#lib/prism/node.rb:17412 def type; end end end # A module responsible for deserializing parse results. # -# source://prism//lib/prism/serialize.rb#14 +# pkg:gem/prism#lib/prism/serialize.rb:17 module Prism::Serialize class << self # Deserialize the dumped output from a request to lex or lex_file. @@ -32161,7 +32135,7 @@ module Prism::Serialize # The formatting of the source of this method is purposeful to illustrate # the structure of the serialized data. # - # source://prism//lib/prism/serialize.rb#84 + # pkg:gem/prism#lib/prism/serialize.rb:87 def load_lex(input, serialized, freeze); end # Deserialize the dumped output from a request to parse or parse_file. @@ -32169,7 +32143,7 @@ module Prism::Serialize # The formatting of the source of this method is purposeful to illustrate # the structure of the serialized data. # - # source://prism//lib/prism/serialize.rb#31 + # pkg:gem/prism#lib/prism/serialize.rb:34 def load_parse(input, serialized, freeze); end # Deserialize the dumped output from a request to parse_comments or @@ -32178,7 +32152,7 @@ module Prism::Serialize # The formatting of the source of this method is purposeful to illustrate # the structure of the serialized data. # - # source://prism//lib/prism/serialize.rb#128 + # pkg:gem/prism#lib/prism/serialize.rb:131 def load_parse_comments(input, serialized, freeze); end # Deserialize the dumped output from a request to parse_lex or @@ -32187,165 +32161,151 @@ module Prism::Serialize # The formatting of the source of this method is purposeful to illustrate # the structure of the serialized data. # - # source://prism//lib/prism/serialize.rb#150 + # pkg:gem/prism#lib/prism/serialize.rb:153 def load_parse_lex(input, serialized, freeze); end end end -# source://prism//lib/prism/serialize.rb#199 +# pkg:gem/prism#lib/prism/serialize.rb:202 class Prism::Serialize::ConstantPool - # @return [ConstantPool] a new instance of ConstantPool - # - # source://prism//lib/prism/serialize.rb#202 + # pkg:gem/prism#lib/prism/serialize.rb:205 def initialize(input, serialized, base, size); end - # source://prism//lib/prism/serialize.rb#210 + # pkg:gem/prism#lib/prism/serialize.rb:213 def get(index, encoding); end - # Returns the value of attribute size. - # - # source://prism//lib/prism/serialize.rb#200 + # pkg:gem/prism#lib/prism/serialize.rb:203 def size; end end # StringIO is synchronized and that adds a high overhead on TruffleRuby. # -# source://prism//lib/prism/serialize.rb#253 +# pkg:gem/prism#lib/prism/serialize.rb:256 Prism::Serialize::FastStringIO = StringIO -# source://prism//lib/prism/serialize.rb#256 +# pkg:gem/prism#lib/prism/serialize.rb:259 class Prism::Serialize::Loader - # @return [Loader] a new instance of Loader - # - # source://prism//lib/prism/serialize.rb#259 + # pkg:gem/prism#lib/prism/serialize.rb:262 def initialize(source, serialized); end - # @return [Boolean] - # - # source://prism//lib/prism/serialize.rb#267 + # pkg:gem/prism#lib/prism/serialize.rb:270 def eof?; end - # Returns the value of attribute input. - # - # source://prism//lib/prism/serialize.rb#257 + # pkg:gem/prism#lib/prism/serialize.rb:260 def input; end - # Returns the value of attribute io. - # - # source://prism//lib/prism/serialize.rb#257 + # pkg:gem/prism#lib/prism/serialize.rb:260 def io; end - # source://prism//lib/prism/serialize.rb#301 + # pkg:gem/prism#lib/prism/serialize.rb:304 def load_comments(freeze); end - # source://prism//lib/prism/serialize.rb#823 + # pkg:gem/prism#lib/prism/serialize.rb:831 def load_constant(constant_pool, encoding); end - # source://prism//lib/prism/serialize.rb#272 + # pkg:gem/prism#lib/prism/serialize.rb:275 def load_constant_pool(constant_pool); end - # source://prism//lib/prism/serialize.rb#774 + # pkg:gem/prism#lib/prism/serialize.rb:782 def load_double; end - # source://prism//lib/prism/serialize.rb#789 + # pkg:gem/prism#lib/prism/serialize.rb:797 def load_embedded_string(encoding); end - # source://prism//lib/prism/serialize.rb#289 + # pkg:gem/prism#lib/prism/serialize.rb:292 def load_encoding; end - # source://prism//lib/prism/serialize.rb#659 + # pkg:gem/prism#lib/prism/serialize.rb:667 def load_error_level; end - # source://prism//lib/prism/serialize.rb#674 + # pkg:gem/prism#lib/prism/serialize.rb:682 def load_errors(encoding, freeze); end - # source://prism//lib/prism/serialize.rb#283 + # pkg:gem/prism#lib/prism/serialize.rb:286 def load_header; end - # source://prism//lib/prism/serialize.rb#763 + # pkg:gem/prism#lib/prism/serialize.rb:771 def load_integer; end - # source://prism//lib/prism/serialize.rb#295 + # pkg:gem/prism#lib/prism/serialize.rb:298 def load_line_offsets(freeze); end - # source://prism//lib/prism/serialize.rb#810 + # pkg:gem/prism#lib/prism/serialize.rb:818 def load_location(freeze); end - # source://prism//lib/prism/serialize.rb#804 + # pkg:gem/prism#lib/prism/serialize.rb:812 def load_location_object(freeze); end - # source://prism//lib/prism/serialize.rb#318 + # pkg:gem/prism#lib/prism/serialize.rb:321 def load_magic_comments(freeze); end - # source://prism//lib/prism/serialize.rb#834 + # pkg:gem/prism#lib/prism/serialize.rb:842 def load_node(constant_pool, encoding, freeze); end - # source://prism//lib/prism/serialize.rb#828 + # pkg:gem/prism#lib/prism/serialize.rb:836 def load_optional_constant(constant_pool, encoding); end - # source://prism//lib/prism/serialize.rb#815 + # pkg:gem/prism#lib/prism/serialize.rb:823 def load_optional_location(freeze); end - # source://prism//lib/prism/serialize.rb#819 + # pkg:gem/prism#lib/prism/serialize.rb:827 def load_optional_location_object(freeze); end - # source://prism//lib/prism/serialize.rb#782 + # pkg:gem/prism#lib/prism/serialize.rb:790 def load_optional_node(constant_pool, encoding, freeze); end - # source://prism//lib/prism/serialize.rb#793 + # pkg:gem/prism#lib/prism/serialize.rb:801 def load_string(encoding); end - # source://prism//lib/prism/serialize.rb#725 + # pkg:gem/prism#lib/prism/serialize.rb:733 def load_tokens; end - # source://prism//lib/prism/serialize.rb#778 + # pkg:gem/prism#lib/prism/serialize.rb:786 def load_uint32; end - # source://prism//lib/prism/serialize.rb#758 + # pkg:gem/prism#lib/prism/serialize.rb:766 def load_varsint; end # variable-length integer using https://en.wikipedia.org/wiki/LEB128 # This is also what protobuf uses: https://protobuf.dev/programming-guides/encoding/#varints # - # source://prism//lib/prism/serialize.rb#744 + # pkg:gem/prism#lib/prism/serialize.rb:752 def load_varuint; end - # source://prism//lib/prism/serialize.rb#693 + # pkg:gem/prism#lib/prism/serialize.rb:701 def load_warning_level; end - # source://prism//lib/prism/serialize.rb#706 + # pkg:gem/prism#lib/prism/serialize.rb:714 def load_warnings(encoding, freeze); end - # Returns the value of attribute source. - # - # source://prism//lib/prism/serialize.rb#257 + # pkg:gem/prism#lib/prism/serialize.rb:260 def source; end end -# source://prism//lib/prism/serialize.rb#335 +# pkg:gem/prism#lib/prism/serialize.rb:338 Prism::Serialize::Loader::DIAGNOSTIC_TYPES = T.let(T.unsafe(nil), Array) # The major version of prism that we are expecting to find in the serialized # strings. # -# source://prism//lib/prism/serialize.rb#17 +# pkg:gem/prism#lib/prism/serialize.rb:20 Prism::Serialize::MAJOR_VERSION = T.let(T.unsafe(nil), Integer) # The minor version of prism that we are expecting to find in the serialized # strings. # -# source://prism//lib/prism/serialize.rb#21 +# pkg:gem/prism#lib/prism/serialize.rb:24 Prism::Serialize::MINOR_VERSION = T.let(T.unsafe(nil), Integer) # The patch version of prism that we are expecting to find in the serialized # strings. # -# source://prism//lib/prism/serialize.rb#25 +# pkg:gem/prism#lib/prism/serialize.rb:28 Prism::Serialize::PATCH_VERSION = T.let(T.unsafe(nil), Integer) # The token types that can be indexed by their enum values. # -# source://prism//lib/prism/serialize.rb#2219 +# pkg:gem/prism#lib/prism/serialize.rb:2227 Prism::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array) # This node wraps a constant write to indicate that when the value is written, it should have its shareability state modified. @@ -32353,13 +32313,11 @@ Prism::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array) # C = { a: 1 } # ^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#16235 +# pkg:gem/prism#lib/prism/node.rb:17428 class Prism::ShareableConstantNode < ::Prism::Node # Initialize a new ShareableConstantNode node. # - # @return [ShareableConstantNode] a new instance of ShareableConstantNode - # - # source://prism//lib/prism/node.rb#16237 + # pkg:gem/prism#lib/prism/node.rb:17430 sig do params( source: Prism::Source, @@ -32374,36 +32332,36 @@ class Prism::ShareableConstantNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16313 + # pkg:gem/prism#lib/prism/node.rb:17513 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16246 + # pkg:gem/prism#lib/prism/node.rb:17439 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16251 + # pkg:gem/prism#lib/prism/node.rb:17444 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16261 + # pkg:gem/prism#lib/prism/node.rb:17461 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16256 + # pkg:gem/prism#lib/prism/node.rb:17456 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode) -> ShareableConstantNode # - # source://prism//lib/prism/node.rb#16266 + # pkg:gem/prism#lib/prism/node.rb:17466 sig do params( node_id: Integer, @@ -32412,34 +32370,34 @@ class Prism::ShareableConstantNode < ::Prism::Node write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode) ).returns(Prism::ShareableConstantNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), write: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, write: self.write); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16251 + # pkg:gem/prism#lib/prism/node.rb:17471 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode } # - # source://prism//lib/prism/node.rb#16274 + # pkg:gem/prism#lib/prism/node.rb:17474 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # def experimental_copy?: () -> bool + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] # - # @return [Boolean] + # pkg:gem/prism#lib/prism/node.rb:17449 + def each_child_node; end + + # def experimental_copy?: () -> bool # - # source://prism//lib/prism/node.rb#16289 + # pkg:gem/prism#lib/prism/node.rb:17489 sig { returns(T::Boolean) } def experimental_copy?; end # def experimental_everything?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16284 + # pkg:gem/prism#lib/prism/node.rb:17484 sig { returns(T::Boolean) } def experimental_everything?; end @@ -32448,27 +32406,25 @@ class Prism::ShareableConstantNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#16297 + # pkg:gem/prism#lib/prism/node.rb:17497 sig { override.returns(String) } def inspect; end # def literal?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16279 + # pkg:gem/prism#lib/prism/node.rb:17479 sig { returns(T::Boolean) } def literal?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16302 + # pkg:gem/prism#lib/prism/node.rb:17502 sig { override.returns(Symbol) } def type; end # The constant write that should be modified with the shareability state. # - # source://prism//lib/prism/node.rb#16294 + # pkg:gem/prism#lib/prism/node.rb:17494 sig do returns(T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode)) end @@ -32477,29 +32433,29 @@ class Prism::ShareableConstantNode < ::Prism::Node class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16307 + # pkg:gem/prism#lib/prism/node.rb:17507 def type; end end end # Flags for shareable constant nodes. # -# source://prism//lib/prism/node.rb#18597 +# pkg:gem/prism#lib/prism/node.rb:19918 module Prism::ShareableConstantNodeFlags; end # constant writes that should be modified with shareable constant value experimental copy # -# source://prism//lib/prism/node.rb#18605 +# pkg:gem/prism#lib/prism/node.rb:19926 Prism::ShareableConstantNodeFlags::EXPERIMENTAL_COPY = T.let(T.unsafe(nil), Integer) # constant writes that should be modified with shareable constant value experimental everything # -# source://prism//lib/prism/node.rb#18602 +# pkg:gem/prism#lib/prism/node.rb:19923 Prism::ShareableConstantNodeFlags::EXPERIMENTAL_EVERYTHING = T.let(T.unsafe(nil), Integer) # constant writes that should be modified with shareable constant value literal # -# source://prism//lib/prism/node.rb#18599 +# pkg:gem/prism#lib/prism/node.rb:19920 Prism::ShareableConstantNodeFlags::LITERAL = T.let(T.unsafe(nil), Integer) # Represents a singleton class declaration involving the `class` keyword. @@ -32507,13 +32463,11 @@ Prism::ShareableConstantNodeFlags::LITERAL = T.let(T.unsafe(nil), Integer) # class << self end # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#16324 +# pkg:gem/prism#lib/prism/node.rb:17524 class Prism::SingletonClassNode < ::Prism::Node # Initialize a new SingletonClassNode node. # - # @return [SingletonClassNode] a new instance of SingletonClassNode - # - # source://prism//lib/prism/node.rb#16326 + # pkg:gem/prism#lib/prism/node.rb:17526 sig do params( source: Prism::Source, @@ -32533,54 +32487,54 @@ class Prism::SingletonClassNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16455 + # pkg:gem/prism#lib/prism/node.rb:17663 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16340 + # pkg:gem/prism#lib/prism/node.rb:17540 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: StatementsNode | BeginNode | nil # - # source://prism//lib/prism/node.rb#16408 + # pkg:gem/prism#lib/prism/node.rb:17616 sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16345 + # pkg:gem/prism#lib/prism/node.rb:17545 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def class_keyword: () -> String # - # source://prism//lib/prism/node.rb#16424 + # pkg:gem/prism#lib/prism/node.rb:17632 sig { returns(String) } def class_keyword; end # attr_reader class_keyword_loc: Location # - # source://prism//lib/prism/node.rb#16379 + # pkg:gem/prism#lib/prism/node.rb:17587 sig { returns(Prism::Location) } def class_keyword_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16358 + # pkg:gem/prism#lib/prism/node.rb:17566 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16350 + # pkg:gem/prism#lib/prism/node.rb:17558 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?class_keyword_loc: Location, ?operator_loc: Location, ?expression: Prism::node, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location) -> SingletonClassNode # - # source://prism//lib/prism/node.rb#16363 + # pkg:gem/prism#lib/prism/node.rb:17571 sig do params( node_id: Integer, @@ -32594,36 +32548,40 @@ class Prism::SingletonClassNode < ::Prism::Node end_keyword_loc: Prism::Location ).returns(Prism::SingletonClassNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, locals: self.locals, class_keyword_loc: self.class_keyword_loc, operator_loc: self.operator_loc, expression: self.expression, body: self.body, end_keyword_loc: self.end_keyword_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16345 + # pkg:gem/prism#lib/prism/node.rb:17576 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Prism::node, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location } # - # source://prism//lib/prism/node.rb#16371 + # pkg:gem/prism#lib/prism/node.rb:17579 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:17550 + def each_child_node; end + # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#16434 + # pkg:gem/prism#lib/prism/node.rb:17642 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#16411 + # pkg:gem/prism#lib/prism/node.rb:17619 sig { returns(Prism::Location) } def end_keyword_loc; end # attr_reader expression: Prism::node # - # source://prism//lib/prism/node.rb#16405 + # pkg:gem/prism#lib/prism/node.rb:17613 sig { returns(Prism::Node) } def expression; end @@ -32632,56 +32590,56 @@ class Prism::SingletonClassNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#16439 + # pkg:gem/prism#lib/prism/node.rb:17647 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#16376 + # pkg:gem/prism#lib/prism/node.rb:17584 sig { returns(T::Array[Symbol]) } def locals; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#16429 + # pkg:gem/prism#lib/prism/node.rb:17637 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#16392 + # pkg:gem/prism#lib/prism/node.rb:17600 sig { returns(Prism::Location) } def operator_loc; end # Save the class_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#16387 + # pkg:gem/prism#lib/prism/node.rb:17595 def save_class_keyword_loc(repository); end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#16419 + # pkg:gem/prism#lib/prism/node.rb:17627 def save_end_keyword_loc(repository); end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#16400 + # pkg:gem/prism#lib/prism/node.rb:17608 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16444 + # pkg:gem/prism#lib/prism/node.rb:17652 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16449 + # pkg:gem/prism#lib/prism/node.rb:17657 def type; end end end @@ -32690,32 +32648,35 @@ end # conjunction with locations to allow them to resolve line numbers and source # ranges. # -# source://prism//lib/prism/parse_result.rb#7 +# pkg:gem/prism#lib/prism/parse_result.rb:8 class Prism::Source # Create a new source object with the given source code. # - # @return [Source] a new instance of Source - # - # source://prism//lib/prism/parse_result.rb#45 + # pkg:gem/prism#lib/prism/parse_result.rb:46 sig { params(source: String, start_line: Integer, offsets: T::Array[Integer]).void } - def initialize(source, start_line = T.unsafe(nil), offsets = T.unsafe(nil)); end + def initialize(source, start_line = 1, offsets = []); end + + # Converts the line number and column in bytes to a byte offset. + # + # pkg:gem/prism#lib/prism/parse_result.rb:80 + def byte_offset(line, column); end # Return the column number in characters for the given byte offset. # - # source://prism//lib/prism/parse_result.rb#107 + # pkg:gem/prism#lib/prism/parse_result.rb:117 sig { params(byte_offset: Integer).returns(Integer) } def character_column(byte_offset); end # Return the character offset for the given byte offset. # - # source://prism//lib/prism/parse_result.rb#102 + # pkg:gem/prism#lib/prism/parse_result.rb:112 sig { params(byte_offset: Integer).returns(Integer) } def character_offset(byte_offset); end # Generate a cache that targets a specific encoding for calculating code # unit offsets. # - # source://prism//lib/prism/parse_result.rb#135 + # pkg:gem/prism#lib/prism/parse_result.rb:145 sig do params( encoding: Encoding @@ -32726,7 +32687,7 @@ class Prism::Source # Returns the column number in code units for the given encoding for the # given byte offset. # - # source://prism//lib/prism/parse_result.rb#141 + # pkg:gem/prism#lib/prism/parse_result.rb:151 sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } def code_units_column(byte_offset, encoding); end @@ -32743,88 +32704,88 @@ class Prism::Source # boundary. Second, it's possible that the source code will contain a # character that has no equivalent in the given encoding. # - # source://prism//lib/prism/parse_result.rb#123 + # pkg:gem/prism#lib/prism/parse_result.rb:133 sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } def code_units_offset(byte_offset, encoding); end # Return the column number for the given byte offset. # - # source://prism//lib/prism/parse_result.rb#97 + # pkg:gem/prism#lib/prism/parse_result.rb:107 sig { params(byte_offset: Integer).returns(Integer) } def column(byte_offset); end # Freeze this object and the objects it contains. # - # source://prism//lib/prism/parse_result.rb#146 + # pkg:gem/prism#lib/prism/parse_result.rb:156 def deep_freeze; end # Returns the encoding of the source code, which is set by parameters to the # parser or by the encoding magic comment. # - # source://prism//lib/prism/parse_result.rb#63 + # pkg:gem/prism#lib/prism/parse_result.rb:64 sig { returns(Encoding) } def encoding; end # Binary search through the offsets to find the line number for the given # byte offset. # - # source://prism//lib/prism/parse_result.rb#80 + # pkg:gem/prism#lib/prism/parse_result.rb:90 sig { params(byte_offset: Integer).returns(Integer) } def line(byte_offset); end # Returns the byte offset of the end of the line corresponding to the given # byte offset. # - # source://prism//lib/prism/parse_result.rb#92 + # pkg:gem/prism#lib/prism/parse_result.rb:102 def line_end(byte_offset); end # Return the byte offset of the start of the line corresponding to the given # byte offset. # - # source://prism//lib/prism/parse_result.rb#86 + # pkg:gem/prism#lib/prism/parse_result.rb:96 sig { params(byte_offset: Integer).returns(Integer) } def line_start(byte_offset); end # Returns the lines of the source code as an array of strings. # - # source://prism//lib/prism/parse_result.rb#68 + # pkg:gem/prism#lib/prism/parse_result.rb:69 sig { returns(T::Array[String]) } def lines; end # The list of newline byte offsets in the source code. # - # source://prism//lib/prism/parse_result.rb#42 + # pkg:gem/prism#lib/prism/parse_result.rb:43 sig { returns(T::Array[Integer]) } def offsets; end # Replace the value of offsets with the given value. # - # source://prism//lib/prism/parse_result.rb#57 + # pkg:gem/prism#lib/prism/parse_result.rb:58 sig { params(offsets: T::Array[Integer]).void } def replace_offsets(offsets); end # Replace the value of start_line with the given value. # - # source://prism//lib/prism/parse_result.rb#52 + # pkg:gem/prism#lib/prism/parse_result.rb:53 sig { params(start_line: Integer).void } def replace_start_line(start_line); end # Perform a byteslice on the source code using the given byte offset and # byte length. # - # source://prism//lib/prism/parse_result.rb#74 + # pkg:gem/prism#lib/prism/parse_result.rb:75 sig { params(byte_offset: Integer, length: Integer).returns(String) } def slice(byte_offset, length); end # The source code that this source object represents. # - # source://prism//lib/prism/parse_result.rb#36 + # pkg:gem/prism#lib/prism/parse_result.rb:37 sig { returns(String) } def source; end # The line number where this source starts. # - # source://prism//lib/prism/parse_result.rb#39 + # pkg:gem/prism#lib/prism/parse_result.rb:40 sig { returns(Integer) } def start_line; end @@ -32833,7 +32794,7 @@ class Prism::Source # Binary search through the offsets to find the line number for the given # byte offset. # - # source://prism//lib/prism/parse_result.rb#156 + # pkg:gem/prism#lib/prism/parse_result.rb:166 def find_line(byte_offset); end class << self @@ -32842,7 +32803,7 @@ class Prism::Source # specialized and more performant `ASCIISource` if no multibyte characters # are present in the source code. # - # source://prism//lib/prism/parse_result.rb#12 + # pkg:gem/prism#lib/prism/parse_result.rb:13 def for(source, start_line = T.unsafe(nil), offsets = T.unsafe(nil)); end end end @@ -32852,84 +32813,86 @@ end # __ENCODING__ # ^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#16471 +# pkg:gem/prism#lib/prism/node.rb:17679 class Prism::SourceEncodingNode < ::Prism::Node # Initialize a new SourceEncodingNode node. # - # @return [SourceEncodingNode] a new instance of SourceEncodingNode - # - # source://prism//lib/prism/node.rb#16473 + # pkg:gem/prism#lib/prism/node.rb:17681 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16530 + # pkg:gem/prism#lib/prism/node.rb:17744 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16481 + # pkg:gem/prism#lib/prism/node.rb:17689 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16486 + # pkg:gem/prism#lib/prism/node.rb:17694 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16496 + # pkg:gem/prism#lib/prism/node.rb:17710 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16491 + # pkg:gem/prism#lib/prism/node.rb:17705 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SourceEncodingNode # - # source://prism//lib/prism/node.rb#16501 + # pkg:gem/prism#lib/prism/node.rb:17715 sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::SourceEncodingNode) } - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16486 + # pkg:gem/prism#lib/prism/node.rb:17720 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#16509 + # pkg:gem/prism#lib/prism/node.rb:17723 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:17699 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#16514 + # pkg:gem/prism#lib/prism/node.rb:17728 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16519 + # pkg:gem/prism#lib/prism/node.rb:17733 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16524 + # pkg:gem/prism#lib/prism/node.rb:17738 def type; end end end @@ -32939,13 +32902,11 @@ end # __FILE__ # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#16539 +# pkg:gem/prism#lib/prism/node.rb:17753 class Prism::SourceFileNode < ::Prism::Node # Initialize a new SourceFileNode node. # - # @return [SourceFileNode] a new instance of SourceFileNode - # - # source://prism//lib/prism/node.rb#16541 + # pkg:gem/prism#lib/prism/node.rb:17755 sig do params( source: Prism::Source, @@ -32960,36 +32921,36 @@ class Prism::SourceFileNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16622 + # pkg:gem/prism#lib/prism/node.rb:17842 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16550 + # pkg:gem/prism#lib/prism/node.rb:17764 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16555 + # pkg:gem/prism#lib/prism/node.rb:17769 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16565 + # pkg:gem/prism#lib/prism/node.rb:17785 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16560 + # pkg:gem/prism#lib/prism/node.rb:17780 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?filepath: String) -> SourceFileNode # - # source://prism//lib/prism/node.rb#16570 + # pkg:gem/prism#lib/prism/node.rb:17790 sig do params( node_id: Integer, @@ -32998,78 +32959,74 @@ class Prism::SourceFileNode < ::Prism::Node filepath: String ).returns(Prism::SourceFileNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), filepath: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, filepath: self.filepath); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16555 + # pkg:gem/prism#lib/prism/node.rb:17795 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, filepath: String } # - # source://prism//lib/prism/node.rb#16578 + # pkg:gem/prism#lib/prism/node.rb:17798 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:17774 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # Represents the file path being parsed. This corresponds directly to the `filepath` option given to the various `Prism::parse*` APIs. # - # source://prism//lib/prism/node.rb#16603 + # pkg:gem/prism#lib/prism/node.rb:17823 sig { returns(String) } def filepath; end # def forced_binary_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16588 + # pkg:gem/prism#lib/prism/node.rb:17808 sig { returns(T::Boolean) } def forced_binary_encoding?; end # def forced_utf8_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16583 + # pkg:gem/prism#lib/prism/node.rb:17803 sig { returns(T::Boolean) } def forced_utf8_encoding?; end # def frozen?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16593 + # pkg:gem/prism#lib/prism/node.rb:17813 sig { returns(T::Boolean) } def frozen?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#16606 + # pkg:gem/prism#lib/prism/node.rb:17826 sig { override.returns(String) } def inspect; end # def mutable?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16598 + # pkg:gem/prism#lib/prism/node.rb:17818 sig { returns(T::Boolean) } def mutable?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16611 + # pkg:gem/prism#lib/prism/node.rb:17831 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16616 + # pkg:gem/prism#lib/prism/node.rb:17836 def type; end end end @@ -33079,84 +33036,86 @@ end # __LINE__ # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#16633 +# pkg:gem/prism#lib/prism/node.rb:17853 class Prism::SourceLineNode < ::Prism::Node # Initialize a new SourceLineNode node. # - # @return [SourceLineNode] a new instance of SourceLineNode - # - # source://prism//lib/prism/node.rb#16635 + # pkg:gem/prism#lib/prism/node.rb:17855 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16692 + # pkg:gem/prism#lib/prism/node.rb:17918 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16643 + # pkg:gem/prism#lib/prism/node.rb:17863 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16648 + # pkg:gem/prism#lib/prism/node.rb:17868 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16658 + # pkg:gem/prism#lib/prism/node.rb:17884 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16653 + # pkg:gem/prism#lib/prism/node.rb:17879 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SourceLineNode # - # source://prism//lib/prism/node.rb#16663 + # pkg:gem/prism#lib/prism/node.rb:17889 sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::SourceLineNode) } - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16648 + # pkg:gem/prism#lib/prism/node.rb:17894 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#16671 + # pkg:gem/prism#lib/prism/node.rb:17897 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:17873 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#16676 + # pkg:gem/prism#lib/prism/node.rb:17902 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16681 + # pkg:gem/prism#lib/prism/node.rb:17907 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16686 + # pkg:gem/prism#lib/prism/node.rb:17912 def type; end end end @@ -33166,13 +33125,11 @@ end # [*a] # ^^ # -# source://prism//lib/prism/node.rb#16701 +# pkg:gem/prism#lib/prism/node.rb:17927 class Prism::SplatNode < ::Prism::Node # Initialize a new SplatNode node. # - # @return [SplatNode] a new instance of SplatNode - # - # source://prism//lib/prism/node.rb#16703 + # pkg:gem/prism#lib/prism/node.rb:17929 sig do params( source: Prism::Source, @@ -33188,36 +33145,36 @@ class Prism::SplatNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16785 + # pkg:gem/prism#lib/prism/node.rb:18018 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16713 + # pkg:gem/prism#lib/prism/node.rb:17939 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16718 + # pkg:gem/prism#lib/prism/node.rb:17944 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16730 + # pkg:gem/prism#lib/prism/node.rb:17963 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16723 + # pkg:gem/prism#lib/prism/node.rb:17956 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?expression: Prism::node?) -> SplatNode # - # source://prism//lib/prism/node.rb#16735 + # pkg:gem/prism#lib/prism/node.rb:17968 sig do params( node_id: Integer, @@ -33227,24 +33184,28 @@ class Prism::SplatNode < ::Prism::Node expression: T.nilable(Prism::Node) ).returns(Prism::SplatNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, operator_loc: self.operator_loc, expression: self.expression); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16718 + # pkg:gem/prism#lib/prism/node.rb:17973 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, expression: Prism::node? } # - # source://prism//lib/prism/node.rb#16743 + # pkg:gem/prism#lib/prism/node.rb:17976 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:17949 + def each_child_node; end + # attr_reader expression: Prism::node? # - # source://prism//lib/prism/node.rb#16761 + # pkg:gem/prism#lib/prism/node.rb:17994 sig { returns(T.nilable(Prism::Node)) } def expression; end @@ -33253,38 +33214,38 @@ class Prism::SplatNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#16769 + # pkg:gem/prism#lib/prism/node.rb:18002 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#16764 + # pkg:gem/prism#lib/prism/node.rb:17997 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#16748 + # pkg:gem/prism#lib/prism/node.rb:17981 sig { returns(Prism::Location) } def operator_loc; end # Save the operator_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#16756 + # pkg:gem/prism#lib/prism/node.rb:17989 def save_operator_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16774 + # pkg:gem/prism#lib/prism/node.rb:18007 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16779 + # pkg:gem/prism#lib/prism/node.rb:18012 def type; end end end @@ -33294,13 +33255,11 @@ end # foo; bar; baz # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#16796 +# pkg:gem/prism#lib/prism/node.rb:18029 class Prism::StatementsNode < ::Prism::Node # Initialize a new StatementsNode node. # - # @return [StatementsNode] a new instance of StatementsNode - # - # source://prism//lib/prism/node.rb#16798 + # pkg:gem/prism#lib/prism/node.rb:18031 sig do params( source: Prism::Source, @@ -33315,42 +33274,42 @@ class Prism::StatementsNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16859 + # pkg:gem/prism#lib/prism/node.rb:18099 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16807 + # pkg:gem/prism#lib/prism/node.rb:18040 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Array[Prism::node] # - # source://prism//lib/prism/node.rb#16840 + # pkg:gem/prism#lib/prism/node.rb:18080 sig { returns(T::Array[Prism::Node]) } def body; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16812 + # pkg:gem/prism#lib/prism/node.rb:18045 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16822 + # pkg:gem/prism#lib/prism/node.rb:18062 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16817 + # pkg:gem/prism#lib/prism/node.rb:18057 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?body: Array[Prism::node]) -> StatementsNode # - # source://prism//lib/prism/node.rb#16827 + # pkg:gem/prism#lib/prism/node.rb:18067 sig do params( node_id: Integer, @@ -33359,63 +33318,67 @@ class Prism::StatementsNode < ::Prism::Node body: T::Array[Prism::Node] ).returns(Prism::StatementsNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), body: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, body: self.body); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16812 + # pkg:gem/prism#lib/prism/node.rb:18072 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, body: Array[Prism::node] } # - # source://prism//lib/prism/node.rb#16835 + # pkg:gem/prism#lib/prism/node.rb:18075 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:18050 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#16843 + # pkg:gem/prism#lib/prism/node.rb:18083 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16848 + # pkg:gem/prism#lib/prism/node.rb:18088 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16853 + # pkg:gem/prism#lib/prism/node.rb:18093 def type; end end end # Flags for string nodes. # -# source://prism//lib/prism/node.rb#18609 +# pkg:gem/prism#lib/prism/node.rb:19930 module Prism::StringFlags; end # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#18614 +# pkg:gem/prism#lib/prism/node.rb:19935 Prism::StringFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to UTF-8 # -# source://prism//lib/prism/node.rb#18611 +# pkg:gem/prism#lib/prism/node.rb:19932 Prism::StringFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/node.rb#18617 +# pkg:gem/prism#lib/prism/node.rb:19938 Prism::StringFlags::FROZEN = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/node.rb#18620 +# pkg:gem/prism#lib/prism/node.rb:19941 Prism::StringFlags::MUTABLE = T.let(T.unsafe(nil), Integer) # Represents a string literal, a string contained within a `%w` list, or plain string content within an interpolated string. @@ -33429,15 +33392,13 @@ Prism::StringFlags::MUTABLE = T.let(T.unsafe(nil), Integer) # "foo #{bar} baz" # ^^^^ ^^^^ # -# source://prism//lib/prism/node.rb#16876 +# pkg:gem/prism#lib/prism/node.rb:18116 class Prism::StringNode < ::Prism::Node include ::Prism::HeredocQuery # Initialize a new StringNode node. # - # @return [StringNode] a new instance of StringNode - # - # source://prism//lib/prism/node.rb#16878 + # pkg:gem/prism#lib/prism/node.rb:18118 sig do params( source: Prism::Source, @@ -33455,60 +33416,60 @@ class Prism::StringNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17028 + # pkg:gem/prism#lib/prism/node.rb:18274 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16890 + # pkg:gem/prism#lib/prism/node.rb:18130 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16895 + # pkg:gem/prism#lib/prism/node.rb:18135 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#17007 + # pkg:gem/prism#lib/prism/node.rb:18253 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#16975 + # pkg:gem/prism#lib/prism/node.rb:18221 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16905 + # pkg:gem/prism#lib/prism/node.rb:18151 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16900 + # pkg:gem/prism#lib/prism/node.rb:18146 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#17002 + # pkg:gem/prism#lib/prism/node.rb:18248 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#16962 + # pkg:gem/prism#lib/prism/node.rb:18208 sig { returns(Prism::Location) } def content_loc; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?content_loc: Location, ?closing_loc: Location?, ?unescaped: String) -> StringNode # - # source://prism//lib/prism/node.rb#16910 + # pkg:gem/prism#lib/prism/node.rb:18156 sig do params( node_id: Integer, @@ -33520,45 +33481,43 @@ class Prism::StringNode < ::Prism::Node unescaped: String ).returns(Prism::StringNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, opening_loc: self.opening_loc, content_loc: self.content_loc, closing_loc: self.closing_loc, unescaped: self.unescaped); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#16895 + # pkg:gem/prism#lib/prism/node.rb:18161 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String } # - # source://prism//lib/prism/node.rb#16918 + # pkg:gem/prism#lib/prism/node.rb:18164 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:18140 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def forced_binary_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16928 + # pkg:gem/prism#lib/prism/node.rb:18174 sig { returns(T::Boolean) } def forced_binary_encoding?; end # def forced_utf8_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16923 + # pkg:gem/prism#lib/prism/node.rb:18169 sig { returns(T::Boolean) } def forced_utf8_encoding?; end # def frozen?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16933 + # pkg:gem/prism#lib/prism/node.rb:18179 sig { returns(T::Boolean) } def frozen?; end @@ -33567,128 +33526,123 @@ class Prism::StringNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17012 + # pkg:gem/prism#lib/prism/node.rb:18258 sig { override.returns(String) } def inspect; end # def mutable?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16938 + # pkg:gem/prism#lib/prism/node.rb:18184 sig { returns(T::Boolean) } def mutable?; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#16997 + # pkg:gem/prism#lib/prism/node.rb:18243 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#16943 + # pkg:gem/prism#lib/prism/node.rb:18189 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#16989 + # pkg:gem/prism#lib/prism/node.rb:18235 def save_closing_loc(repository); end # Save the content_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#16970 + # pkg:gem/prism#lib/prism/node.rb:18216 def save_content_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#16957 + # pkg:gem/prism#lib/prism/node.rb:18203 def save_opening_loc(repository); end # Occasionally it's helpful to treat a string as if it were interpolated so # that there's a consistent interface for working with strings. # - # source://prism//lib/prism/node_ext.rb#72 + # pkg:gem/prism#lib/prism/node_ext.rb:75 sig { returns(Prism::InterpolatedStringNode) } def to_interpolated; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17017 + # pkg:gem/prism#lib/prism/node.rb:18263 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#16994 + # pkg:gem/prism#lib/prism/node.rb:18240 sig { returns(String) } def unescaped; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#17022 + # pkg:gem/prism#lib/prism/node.rb:18268 def type; end end end +# Here we are going to patch StringQuery to put in the class-level methods so +# that it can maintain a consistent interface # Query methods that allow categorizing strings based on their context for # where they could be valid in a Ruby syntax tree. # -# source://prism//lib/prism/string_query.rb#6 +# pkg:gem/prism#lib/prism/string_query.rb:7 class Prism::StringQuery # Initialize a new query with the given string. # - # @return [StringQuery] a new instance of StringQuery - # - # source://prism//lib/prism/string_query.rb#11 + # pkg:gem/prism#lib/prism/string_query.rb:12 def initialize(string); end # Whether or not this string is a valid constant name. # - # @return [Boolean] - # - # source://prism//lib/prism/string_query.rb#21 + # pkg:gem/prism#lib/prism/string_query.rb:22 def constant?; end # Whether or not this string is a valid local variable name. # - # @return [Boolean] - # - # source://prism//lib/prism/string_query.rb#16 + # pkg:gem/prism#lib/prism/string_query.rb:17 def local?; end # Whether or not this string is a valid method name. # - # @return [Boolean] - # - # source://prism//lib/prism/string_query.rb#26 + # pkg:gem/prism#lib/prism/string_query.rb:27 def method_name?; end # The string that this query is wrapping. # - # source://prism//lib/prism/string_query.rb#8 + # pkg:gem/prism#lib/prism/string_query.rb:9 def string; end class << self # Mirrors the C extension's StringQuery::constant? method. # - # @return [Boolean] - def constant?(_arg0); end + # pkg:gem/prism#lib/prism.rb:92 + sig { params(string: String).returns(T::Boolean) } + def constant?(string); end # Mirrors the C extension's StringQuery::local? method. # - # @return [Boolean] - def local?(_arg0); end + # pkg:gem/prism#lib/prism.rb:92 + sig { params(string: String).returns(T::Boolean) } + def local?(string); end # Mirrors the C extension's StringQuery::method_name? method. # - # @return [Boolean] - def method_name?(_arg0); end + # pkg:gem/prism#lib/prism.rb:92 + sig { params(string: String).returns(T::Boolean) } + def method_name?(string); end end end @@ -33700,13 +33654,13 @@ end # super foo, bar # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#17045 +# If no arguments are provided (except for a block), it would be a `ForwardingSuperNode` instead. +# +# pkg:gem/prism#lib/prism/node.rb:18293 class Prism::SuperNode < ::Prism::Node # Initialize a new SuperNode node. # - # @return [SuperNode] a new instance of SuperNode - # - # source://prism//lib/prism/node.rb#17047 + # pkg:gem/prism#lib/prism/node.rb:18295 sig do params( source: Prism::Source, @@ -33725,48 +33679,48 @@ class Prism::SuperNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17184 + # pkg:gem/prism#lib/prism/node.rb:18440 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17060 + # pkg:gem/prism#lib/prism/node.rb:18308 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader arguments: ArgumentsNode? + # Can be only `nil` when there are empty parentheses, like `super()`. # - # source://prism//lib/prism/node.rb#17128 + # pkg:gem/prism#lib/prism/node.rb:18384 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # attr_reader block: BlockNode | BlockArgumentNode | nil # - # source://prism//lib/prism/node.rb#17150 + # pkg:gem/prism#lib/prism/node.rb:18406 sig { returns(T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode))) } def block; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17065 + # pkg:gem/prism#lib/prism/node.rb:18313 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17078 + # pkg:gem/prism#lib/prism/node.rb:18334 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17070 + # pkg:gem/prism#lib/prism/node.rb:18326 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?, ?block: BlockNode | BlockArgumentNode | nil) -> SuperNode # - # source://prism//lib/prism/node.rb#17083 + # pkg:gem/prism#lib/prism/node.rb:18339 sig do params( node_id: Integer, @@ -33779,116 +33733,120 @@ class Prism::SuperNode < ::Prism::Node block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) ).returns(Prism::SuperNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil), block: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, keyword_loc: self.keyword_loc, lparen_loc: self.lparen_loc, arguments: self.arguments, rparen_loc: self.rparen_loc, block: self.block); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17065 + # pkg:gem/prism#lib/prism/node.rb:18344 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: BlockNode | BlockArgumentNode | nil } # - # source://prism//lib/prism/node.rb#17091 + # pkg:gem/prism#lib/prism/node.rb:18347 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:18318 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#17168 + # pkg:gem/prism#lib/prism/node.rb:18424 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#17153 + # pkg:gem/prism#lib/prism/node.rb:18409 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#17096 + # pkg:gem/prism#lib/prism/node.rb:18352 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#17158 + # pkg:gem/prism#lib/prism/node.rb:18414 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#17109 + # pkg:gem/prism#lib/prism/node.rb:18365 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#17163 + # pkg:gem/prism#lib/prism/node.rb:18419 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#17131 + # pkg:gem/prism#lib/prism/node.rb:18387 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#17104 + # pkg:gem/prism#lib/prism/node.rb:18360 def save_keyword_loc(repository); end # Save the lparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#17123 + # pkg:gem/prism#lib/prism/node.rb:18379 def save_lparen_loc(repository); end # Save the rparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#17145 + # pkg:gem/prism#lib/prism/node.rb:18401 def save_rparen_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17173 + # pkg:gem/prism#lib/prism/node.rb:18429 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#17178 + # pkg:gem/prism#lib/prism/node.rb:18434 def type; end end end # Flags for symbol nodes. # -# source://prism//lib/prism/node.rb#18624 +# pkg:gem/prism#lib/prism/node.rb:19945 module Prism::SymbolFlags; end # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#18629 +# pkg:gem/prism#lib/prism/node.rb:19950 Prism::SymbolFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to US-ASCII # -# source://prism//lib/prism/node.rb#18632 +# pkg:gem/prism#lib/prism/node.rb:19953 Prism::SymbolFlags::FORCED_US_ASCII_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to UTF-8 # -# source://prism//lib/prism/node.rb#18626 +# pkg:gem/prism#lib/prism/node.rb:19947 Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # Represents a symbol literal or a symbol contained within a `%i` list. @@ -33899,13 +33857,11 @@ Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # %i[foo] # ^^^ # -# source://prism//lib/prism/node.rb#17201 +# pkg:gem/prism#lib/prism/node.rb:18457 class Prism::SymbolNode < ::Prism::Node # Initialize a new SymbolNode node. # - # @return [SymbolNode] a new instance of SymbolNode - # - # source://prism//lib/prism/node.rb#17203 + # pkg:gem/prism#lib/prism/node.rb:18459 sig do params( source: Prism::Source, @@ -33923,48 +33879,48 @@ class Prism::SymbolNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17354 + # pkg:gem/prism#lib/prism/node.rb:18616 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17215 + # pkg:gem/prism#lib/prism/node.rb:18471 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17220 + # pkg:gem/prism#lib/prism/node.rb:18476 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#17333 + # pkg:gem/prism#lib/prism/node.rb:18595 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#17301 + # pkg:gem/prism#lib/prism/node.rb:18563 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17230 + # pkg:gem/prism#lib/prism/node.rb:18492 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17225 + # pkg:gem/prism#lib/prism/node.rb:18487 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?value_loc: Location?, ?closing_loc: Location?, ?unescaped: String) -> SymbolNode # - # source://prism//lib/prism/node.rb#17235 + # pkg:gem/prism#lib/prism/node.rb:18497 sig do params( node_id: Integer, @@ -33976,171 +33932,167 @@ class Prism::SymbolNode < ::Prism::Node unescaped: String ).returns(Prism::SymbolNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), value_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, opening_loc: self.opening_loc, value_loc: self.value_loc, closing_loc: self.closing_loc, unescaped: self.unescaped); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17220 + # pkg:gem/prism#lib/prism/node.rb:18502 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String } # - # source://prism//lib/prism/node.rb#17243 + # pkg:gem/prism#lib/prism/node.rb:18505 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:18481 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def forced_binary_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#17253 + # pkg:gem/prism#lib/prism/node.rb:18515 sig { returns(T::Boolean) } def forced_binary_encoding?; end # def forced_us_ascii_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#17258 + # pkg:gem/prism#lib/prism/node.rb:18520 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end # def forced_utf8_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#17248 + # pkg:gem/prism#lib/prism/node.rb:18510 sig { returns(T::Boolean) } def forced_utf8_encoding?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#17338 + # pkg:gem/prism#lib/prism/node.rb:18600 sig { override.returns(String) } def inspect; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#17323 + # pkg:gem/prism#lib/prism/node.rb:18585 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#17263 + # pkg:gem/prism#lib/prism/node.rb:18525 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#17315 + # pkg:gem/prism#lib/prism/node.rb:18577 def save_closing_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#17277 + # pkg:gem/prism#lib/prism/node.rb:18539 def save_opening_loc(repository); end # Save the value_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#17296 + # pkg:gem/prism#lib/prism/node.rb:18558 def save_value_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17343 + # pkg:gem/prism#lib/prism/node.rb:18605 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#17320 + # pkg:gem/prism#lib/prism/node.rb:18582 sig { returns(String) } def unescaped; end # def value: () -> String? # - # source://prism//lib/prism/node.rb#17328 + # pkg:gem/prism#lib/prism/node.rb:18590 sig { returns(T.nilable(String)) } def value; end # attr_reader value_loc: Location? # - # source://prism//lib/prism/node.rb#17282 + # pkg:gem/prism#lib/prism/node.rb:18544 sig { returns(T.nilable(Prism::Location)) } def value_loc; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#17348 + # pkg:gem/prism#lib/prism/node.rb:18610 def type; end end end # This represents a token from the Ruby source. # -# source://prism//lib/prism/parse_result.rb#816 +# pkg:gem/prism#lib/prism/parse_result.rb:813 class Prism::Token # Create a new token object with the given type, value, and location. # - # @return [Token] a new instance of Token - # - # source://prism//lib/prism/parse_result.rb#828 + # pkg:gem/prism#lib/prism/parse_result.rb:825 sig { params(source: Prism::Source, type: Symbol, value: String, location: T.any(Integer, Prism::Location)).void } def initialize(source, type, value, location); end # Returns true if the given other token is equal to this token. # - # source://prism//lib/prism/parse_result.rb#863 + # pkg:gem/prism#lib/prism/parse_result.rb:860 sig { params(other: T.untyped).returns(T::Boolean) } def ==(other); end # Implement the hash pattern matching interface for Token. # - # source://prism//lib/prism/parse_result.rb#836 + # pkg:gem/prism#lib/prism/parse_result.rb:833 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # Freeze this object and the objects it contains. # - # source://prism//lib/prism/parse_result.rb#876 + # pkg:gem/prism#lib/prism/parse_result.rb:873 def deep_freeze; end # Returns a string representation of this token. # - # source://prism//lib/prism/parse_result.rb#870 + # pkg:gem/prism#lib/prism/parse_result.rb:867 def inspect; end # A Location object representing the location of this token in the source. # - # source://prism//lib/prism/parse_result.rb#841 + # pkg:gem/prism#lib/prism/parse_result.rb:838 sig { returns(Prism::Location) } def location; end # Implement the pretty print interface for Token. # - # source://prism//lib/prism/parse_result.rb#848 + # pkg:gem/prism#lib/prism/parse_result.rb:845 sig { params(q: T.untyped).void } def pretty_print(q); end # The type of token that this token is. # - # source://prism//lib/prism/parse_result.rb#822 + # pkg:gem/prism#lib/prism/parse_result.rb:819 sig { returns(Symbol) } def type; end # A byteslice of the source that this token represents. # - # source://prism//lib/prism/parse_result.rb#825 + # pkg:gem/prism#lib/prism/parse_result.rb:822 sig { returns(String) } def value; end @@ -34148,7 +34100,7 @@ class Prism::Token # The Source object that represents the source this token came from. # - # source://prism//lib/prism/parse_result.rb#818 + # pkg:gem/prism#lib/prism/parse_result.rb:815 sig { returns(Prism::Source) } def source; end end @@ -34156,7 +34108,7 @@ end # This module is responsible for converting the prism syntax tree into other # syntax trees. # -# source://prism//lib/prism/translation.rb#6 +# pkg:gem/prism#lib/prism/translation.rb:7 module Prism::Translation; end # This class is the entry-point for converting a prism syntax tree into the @@ -34164,7 +34116,14 @@ module Prism::Translation; end # the parser gem, and overrides the parse* methods to parse with prism and # then translate. # -# source://prism//lib/prism/translation/parser.rb#16 +# Note that this version of the parser always parses using the latest +# version of Ruby syntax supported by Prism. If you want specific version +# support, use one of the version-specific subclasses, such as +# `Prism::Translation::Parser34`. If you want to parse using the same +# version of Ruby syntax as the currently running version of Ruby, use +# `Prism::Translation::ParserCurrent`. +# +# pkg:gem/prism#lib/prism/translation/parser.rb:29 class Prism::Translation::Parser < ::Parser::Base # The `builder` argument is used to create the parser using our custom builder class by default. # @@ -34191,55 +34150,53 @@ class Prism::Translation::Parser < ::Parser::Base # In an object passed to the `:parser` keyword argument, the `parse` and `parse_lex` methods # should be implemented as needed. # - # @return [Parser] a new instance of Parser - # - # source://prism//lib/prism/translation/parser.rb#61 + # pkg:gem/prism#lib/prism/translation/parser.rb:74 def initialize(builder = T.unsafe(nil), parser: T.unsafe(nil)); end # The default encoding for Ruby files is UTF-8. # - # source://prism//lib/prism/translation/parser.rb#72 + # pkg:gem/prism#lib/prism/translation/parser.rb:91 def default_encoding; end # Parses a source buffer and returns the AST. # - # source://prism//lib/prism/translation/parser.rb#80 + # pkg:gem/prism#lib/prism/translation/parser.rb:99 def parse(source_buffer); end # Parses a source buffer and returns the AST and the source code comments. # - # source://prism//lib/prism/translation/parser.rb#93 + # pkg:gem/prism#lib/prism/translation/parser.rb:112 def parse_with_comments(source_buffer); end # Parses a source buffer and returns the AST, the source code comments, # and the tokens emitted by the lexer. # - # source://prism//lib/prism/translation/parser.rb#110 + # pkg:gem/prism#lib/prism/translation/parser.rb:129 def tokenize(source_buffer, recover = T.unsafe(nil)); end # Since prism resolves num params for us, we don't need to support this # kind of logic here. # - # source://prism//lib/prism/translation/parser.rb#136 + # pkg:gem/prism#lib/prism/translation/parser.rb:155 def try_declare_numparam(node); end - # source://prism//lib/prism/translation/parser.rb#67 + # pkg:gem/prism#lib/prism/translation/parser.rb:86 sig { overridable.returns(Integer) } def version; end - # source://prism//lib/prism/translation/parser.rb#76 + # pkg:gem/prism#lib/prism/translation/parser.rb:95 def yyerror; end private # Build the parser gem AST from the prism AST. # - # source://prism//lib/prism/translation/parser.rb#294 + # pkg:gem/prism#lib/prism/translation/parser.rb:313 def build_ast(program, offset_cache); end # Build the parser gem comments from the prism comments. # - # source://prism//lib/prism/translation/parser.rb#299 + # pkg:gem/prism#lib/prism/translation/parser.rb:318 def build_comments(comments, offset_cache); end # Prism deals with offsets in bytes, while the parser gem deals with @@ -34250,93 +34207,100 @@ class Prism::Translation::Parser < ::Parser::Base # just use the offset directly. Otherwise, we build an array where the # index is the byte offset and the value is the character offset. # - # source://prism//lib/prism/translation/parser.rb#277 + # pkg:gem/prism#lib/prism/translation/parser.rb:296 def build_offset_cache(source); end # Build a range from a prism location. # - # source://prism//lib/prism/translation/parser.rb#311 + # pkg:gem/prism#lib/prism/translation/parser.rb:330 def build_range(location, offset_cache); end # Build the parser gem tokens from the prism tokens. # - # source://prism//lib/prism/translation/parser.rb#306 + # pkg:gem/prism#lib/prism/translation/parser.rb:325 def build_tokens(tokens, offset_cache); end # Converts the version format handled by Parser to the format handled by Prism. # - # source://prism//lib/prism/translation/parser.rb#334 + # pkg:gem/prism#lib/prism/translation/parser.rb:353 def convert_for_prism(version); end # Build a diagnostic from the given prism parse error. # - # source://prism//lib/prism/translation/parser.rb#155 + # pkg:gem/prism#lib/prism/translation/parser.rb:174 def error_diagnostic(error, offset_cache); end # Options for how prism should parse/lex the source. # - # source://prism//lib/prism/translation/parser.rb#320 + # pkg:gem/prism#lib/prism/translation/parser.rb:339 def prism_options; end # If there was a error generated during the parse, then raise an # appropriate syntax error. Otherwise return the result. # - # source://prism//lib/prism/translation/parser.rb#255 + # pkg:gem/prism#lib/prism/translation/parser.rb:274 def unwrap(result, offset_cache); end # This is a hook to allow consumers to disable some errors if they don't # want them to block creating the syntax tree. # - # @return [Boolean] - # - # source://prism//lib/prism/translation/parser.rb#144 + # pkg:gem/prism#lib/prism/translation/parser.rb:163 def valid_error?(error); end # This is a hook to allow consumers to disable some warnings if they don't # want them to block creating the syntax tree. # - # @return [Boolean] - # - # source://prism//lib/prism/translation/parser.rb#150 + # pkg:gem/prism#lib/prism/translation/parser.rb:169 def valid_warning?(warning); end # Build a diagnostic from the given prism parse warning. # - # source://prism//lib/prism/translation/parser.rb#228 + # pkg:gem/prism#lib/prism/translation/parser.rb:247 def warning_diagnostic(warning, offset_cache); end end # This class is the entry-point for Ruby 3.3 of `Prism::Translation::Parser`. # -# source://prism//lib/prism/translation/parser33.rb#6 +# pkg:gem/prism#lib/prism/translation/parser_versions.rb:7 class Prism::Translation::Parser33 < ::Prism::Translation::Parser - # source://prism//lib/prism/translation/parser33.rb#7 + # pkg:gem/prism#lib/prism/translation/parser_versions.rb:8 sig { override.returns(Integer) } def version; end end # This class is the entry-point for Ruby 3.4 of `Prism::Translation::Parser`. # -# source://prism//lib/prism/translation/parser34.rb#6 +# pkg:gem/prism#lib/prism/translation/parser_versions.rb:14 class Prism::Translation::Parser34 < ::Prism::Translation::Parser - # source://prism//lib/prism/translation/parser34.rb#7 + # pkg:gem/prism#lib/prism/translation/parser_versions.rb:15 sig { override.returns(Integer) } def version; end end -# This class is the entry-point for Ruby 3.5 of `Prism::Translation::Parser`. +# pkg:gem/prism#lib/prism/translation/parser_versions.rb:27 +Prism::Translation::Parser35 = Prism::Translation::Parser40 + +# This class is the entry-point for Ruby 4.0 of `Prism::Translation::Parser`. # -# source://prism//lib/prism/translation/parser35.rb#6 -class Prism::Translation::Parser35 < ::Prism::Translation::Parser - # source://prism//lib/prism/translation/parser35.rb#7 +# pkg:gem/prism#lib/prism/translation/parser_versions.rb:21 +class Prism::Translation::Parser40 < ::Prism::Translation::Parser + # pkg:gem/prism#lib/prism/translation/parser_versions.rb:22 sig { override.returns(Integer) } def version; end end +# This class is the entry-point for Ruby 4.1 of `Prism::Translation::Parser`. +# +# pkg:gem/prism#lib/prism/translation/parser_versions.rb:30 +class Prism::Translation::Parser41 < ::Prism::Translation::Parser + # pkg:gem/prism#lib/prism/translation/parser_versions.rb:31 + def version; end +end + # A builder that knows how to convert more modern Ruby syntax # into whitequark/parser gem's syntax tree. # -# source://prism//lib/prism/translation/parser/builder.rb#8 +# pkg:gem/prism#lib/prism/translation/parser/builder.rb:9 class Prism::Translation::Parser::Builder < ::Parser::Builders::Default # The following three lines have been added to support the `it` block parameter syntax in the source code below. # @@ -34346,112 +34310,110 @@ class Prism::Translation::Parser::Builder < ::Parser::Builders::Default # # https://github.com/whitequark/parser/blob/v3.3.7.1/lib/parser/builders/default.rb#L1122-L1155 # - # source://prism//lib/prism/translation/parser/builder.rb#21 + # pkg:gem/prism#lib/prism/translation/parser/builder.rb:22 def block(method_call, begin_t, args, body, end_t); end # It represents the `it` block argument, which is not yet implemented in the Parser gem. # - # source://prism//lib/prism/translation/parser/builder.rb#10 + # pkg:gem/prism#lib/prism/translation/parser/builder.rb:11 def itarg; end end # A visitor that knows how to convert a prism syntax tree into the # whitequark/parser gem's syntax tree. # -# source://prism//lib/prism/translation/parser/compiler.rb#8 +# pkg:gem/prism#lib/prism/translation/parser/compiler.rb:9 class Prism::Translation::Parser::Compiler < ::Prism::Compiler # Initialize a new compiler with the given parser, offset cache, and # options. # - # @return [Compiler] a new instance of Compiler - # - # source://prism//lib/prism/translation/parser/compiler.rb#39 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:40 def initialize(parser, offset_cache, forwarding: T.unsafe(nil), in_destructure: T.unsafe(nil), in_pattern: T.unsafe(nil)); end # The Parser::Builders::Default instance that is being used to build the # AST. # - # source://prism//lib/prism/translation/parser/compiler.rb#18 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:19 def builder; end # The types of values that can be forwarded in the current scope. # - # source://prism//lib/prism/translation/parser/compiler.rb#29 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:30 def forwarding; end # Whether or not the current node is in a destructure. # - # source://prism//lib/prism/translation/parser/compiler.rb#32 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:33 def in_destructure; end # Whether or not the current node is in a pattern. # - # source://prism//lib/prism/translation/parser/compiler.rb#35 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:36 def in_pattern; end # The offset cache that is used to map between byte and character # offsets in the file. # - # source://prism//lib/prism/translation/parser/compiler.rb#26 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:27 def offset_cache; end # The Parser::Base instance that is being used to build the AST. # - # source://prism//lib/prism/translation/parser/compiler.rb#14 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:15 def parser; end # The Parser::Source::Buffer instance that is holding a reference to the # source code. # - # source://prism//lib/prism/translation/parser/compiler.rb#22 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:23 def source_buffer; end # alias $foo $bar # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#58 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:59 def visit_alias_global_variable_node(node); end # alias foo bar # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#52 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:53 def visit_alias_method_node(node); end # foo => bar | baz # ^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#64 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:65 def visit_alternation_pattern_node(node); end # a and b # ^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#70 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:71 def visit_and_node(node); end # foo(bar) # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#127 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:128 def visit_arguments_node(node); end # [] # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#76 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:77 def visit_array_node(node); end # foo => [bar] # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#104 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:105 def visit_array_pattern_node(node); end # { a: 1 } # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#133 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:134 def visit_assoc_node(node); end # def foo(**); bar(**); end @@ -34460,49 +34422,47 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # { **foo } # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#185 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:182 def visit_assoc_splat_node(node); end # $+ # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#197 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:194 def visit_back_reference_read_node(node); end # begin end # ^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#203 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:200 def visit_begin_node(node); end # foo(&bar) # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#248 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:245 def visit_block_argument_node(node); end # foo { |; bar| } # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#254 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:251 def visit_block_local_variable_node(node); end # A block on a keyword or method call. # - # @raise [CompilationError] - # - # source://prism//lib/prism/translation/parser/compiler.rb#259 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:256 def visit_block_node(node); end # def foo(&bar); end # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#265 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:262 def visit_block_parameter_node(node); end # A block's parameters. # - # source://prism//lib/prism/translation/parser/compiler.rb#270 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:267 def visit_block_parameters_node(node); end # break @@ -34511,13 +34471,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # break foo # ^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#279 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:276 def visit_break_node(node); end # foo.bar &&= baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#384 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:381 def visit_call_and_write_node(node); end # foo @@ -34529,133 +34489,133 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # foo.bar() {} # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#291 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:288 def visit_call_node(node); end # foo.bar += baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#365 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:362 def visit_call_operator_write_node(node); end # foo.bar ||= baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#403 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:400 def visit_call_or_write_node(node); end # foo.bar, = 1 # ^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#422 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:419 def visit_call_target_node(node); end # foo => bar => baz # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#434 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:431 def visit_capture_pattern_node(node); end # case foo; in bar; end # ^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#453 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:450 def visit_case_match_node(node); end # case foo; when bar; end # ^^^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#440 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:437 def visit_case_node(node); end # class Foo; end # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#466 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:463 def visit_class_node(node); end # @@foo &&= bar # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#505 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:502 def visit_class_variable_and_write_node(node); end # @@foo += bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#495 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:492 def visit_class_variable_operator_write_node(node); end # @@foo ||= bar # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#515 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:512 def visit_class_variable_or_write_node(node); end # @@foo # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#479 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:476 def visit_class_variable_read_node(node); end # @@foo, = bar # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#525 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:522 def visit_class_variable_target_node(node); end # @@foo = 1 # ^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#485 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:482 def visit_class_variable_write_node(node); end # Foo &&= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#556 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:553 def visit_constant_and_write_node(node); end # Foo += bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#546 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:543 def visit_constant_operator_write_node(node); end # Foo ||= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#566 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:563 def visit_constant_or_write_node(node); end # Foo::Bar &&= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#622 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:619 def visit_constant_path_and_write_node(node); end # Foo::Bar # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#582 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:579 def visit_constant_path_node(node); end # Foo::Bar += baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#612 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:609 def visit_constant_path_operator_write_node(node); end # Foo::Bar ||= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#632 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:629 def visit_constant_path_or_write_node(node); end # Foo::Bar, = baz # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#642 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:639 def visit_constant_path_target_node(node); end # Foo::Bar = 1 @@ -34664,19 +34624,19 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # Foo::Foo, Bar::Bar = 1 # ^^^^^^^^ ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#602 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:599 def visit_constant_path_write_node(node); end # Foo # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#531 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:528 def visit_constant_read_node(node); end # Foo, = bar # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#576 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:573 def visit_constant_target_node(node); end # Foo = 1 @@ -34685,7 +34645,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # Foo, Bar = 1 # ^^^ ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#540 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:537 def visit_constant_write_node(node); end # def foo; end @@ -34694,7 +34654,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # def self.foo; end # ^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#651 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:648 def visit_def_node(node); end # defined? a @@ -34703,77 +34663,73 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # defined?(a) # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#698 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:695 def visit_defined_node(node); end # if foo then bar else baz end # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#710 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:731 def visit_else_node(node); end # "foo #{bar}" # ^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#716 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:737 def visit_embedded_statements_node(node); end # "foo #@bar" # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#726 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:747 def visit_embedded_variable_node(node); end # begin; foo; ensure; bar; end # ^^^^^^^^^^^^ # - # @raise [CompilationError] - # - # source://prism//lib/prism/translation/parser/compiler.rb#732 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:753 def visit_ensure_node(node); end # false # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#738 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:759 def visit_false_node(node); end # foo => [*, bar, *] # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#744 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:765 def visit_find_pattern_node(node); end - # 0..5 - # ^^^^ # if foo .. bar; end # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1501 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1541 def visit_flip_flop_node(node); end # 1.0 # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#756 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:777 def visit_float_node(node); end # for foo in bar do end # ^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#762 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:783 def visit_for_node(node); end # def foo(...); bar(...); end # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#780 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:801 def visit_forwarding_arguments_node(node); end # def foo(...); end # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#786 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:807 def visit_forwarding_parameter_node(node); end # super @@ -34782,55 +34738,55 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # super {} # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#795 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:816 def visit_forwarding_super_node(node); end # $foo &&= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#833 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:854 def visit_global_variable_and_write_node(node); end # $foo += bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#823 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:844 def visit_global_variable_operator_write_node(node); end # $foo ||= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#843 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:864 def visit_global_variable_or_write_node(node); end # $foo # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#807 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:828 def visit_global_variable_read_node(node); end # $foo, = bar # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#853 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:874 def visit_global_variable_target_node(node); end # $foo = 1 # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#813 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:834 def visit_global_variable_write_node(node); end # {} # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#859 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:880 def visit_hash_node(node); end # foo => {} # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#869 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:890 def visit_hash_pattern_node(node); end # if foo then bar end @@ -34842,146 +34798,145 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # foo ? bar : baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#887 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:908 def visit_if_node(node); end # 1i # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#929 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:950 def visit_imaginary_node(node); end # { foo: } # ^^^^ # - # @raise [CompilationError] - # - # source://prism//lib/prism/translation/parser/compiler.rb#935 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:956 def visit_implicit_node(node); end # foo { |bar,| } # ^ # - # @raise [CompilationError] - # - # source://prism//lib/prism/translation/parser/compiler.rb#941 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:962 def visit_implicit_rest_node(node); end # case foo; in bar; end # ^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#947 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:968 def visit_in_node(node); end # foo[bar] &&= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#995 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1016 def visit_index_and_write_node(node); end # foo[bar] += baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#977 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:998 def visit_index_operator_write_node(node); end # foo[bar] ||= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1013 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1034 def visit_index_or_write_node(node); end # foo[bar], = 1 # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1031 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1052 def visit_index_target_node(node); end + # @foo &&= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1068 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1089 def visit_instance_variable_and_write_node(node); end + # @foo += bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1058 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1079 def visit_instance_variable_operator_write_node(node); end + # @foo ||= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1078 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1099 def visit_instance_variable_or_write_node(node); end + # @foo # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1042 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1063 def visit_instance_variable_read_node(node); end # @foo, = bar # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1088 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1109 def visit_instance_variable_target_node(node); end + # @foo = 1 # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1048 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1069 def visit_instance_variable_write_node(node); end # 1 # ^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1094 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1115 def visit_integer_node(node); end - # /foo #{bar}/ - # ^^^^^^^^^^^^ # if /foo #{bar}/ then end # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1100 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1132 def visit_interpolated_match_last_line_node(node); end # /foo #{bar}/ # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1100 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1121 def visit_interpolated_regular_expression_node(node); end # "foo #{bar}" # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1115 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1136 def visit_interpolated_string_node(node); end # :"foo #{bar}" # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1129 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1150 def visit_interpolated_symbol_node(node); end # `foo #{bar}` # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1139 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1160 def visit_interpolated_x_string_node(node); end # -> { it } # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1153 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1174 def visit_it_local_variable_read_node(node); end # -> { it } # ^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1159 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1180 def visit_it_parameters_node(node); end # foo(bar: baz) # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1175 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1196 def visit_keyword_hash_node(node); end # def foo(**bar); end @@ -34990,100 +34945,98 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # def foo(**); end # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1184 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1205 def visit_keyword_rest_parameter_node(node); end # -> {} # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1193 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1214 def visit_lambda_node(node); end # foo &&= bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1245 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1266 def visit_local_variable_and_write_node(node); end # foo += bar # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1235 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1256 def visit_local_variable_operator_write_node(node); end # foo ||= bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1255 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1276 def visit_local_variable_or_write_node(node); end # foo # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1219 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1240 def visit_local_variable_read_node(node); end # foo, = bar # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1265 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1286 def visit_local_variable_target_node(node); end # foo = 1 # ^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1225 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1246 def visit_local_variable_write_node(node); end - # /foo/ - # ^^^^^ # if /foo/ then end # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1535 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1577 def visit_match_last_line_node(node); end # foo in bar # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1275 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1296 def visit_match_predicate_node(node); end # foo => bar # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1285 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1306 def visit_match_required_node(node); end # /(?foo)/ =~ bar # ^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1295 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1316 def visit_match_write_node(node); end # A node that is missing from the syntax tree. This is only used in the # case of a syntax error. The parser gem doesn't have such a concept, so # we invent our own here. # - # source://prism//lib/prism/translation/parser/compiler.rb#1306 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1327 def visit_missing_node(node); end # module Foo; end # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1312 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1333 def visit_module_node(node); end # foo, bar = baz # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1323 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1344 def visit_multi_target_node(node); end # foo, bar = baz # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1333 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1354 def visit_multi_write_node(node); end # next @@ -35092,55 +35045,55 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # next foo # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1356 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1377 def visit_next_node(node); end # nil # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1368 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1389 def visit_nil_node(node); end # def foo(**nil); end # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1374 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1395 def visit_no_keywords_parameter_node(node); end # -> { _1 + _2 } # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1384 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1405 def visit_numbered_parameters_node(node); end # $1 # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1390 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1411 def visit_numbered_reference_read_node(node); end # def foo(bar: baz); end # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1396 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1417 def visit_optional_keyword_parameter_node(node); end # def foo(bar = 1); end # ^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1402 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1423 def visit_optional_parameter_node(node); end # a or b # ^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1408 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1429 def visit_or_node(node); end # def foo(bar, *baz); end # ^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1414 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1435 def visit_parameters_node(node); end # () @@ -35149,84 +35102,82 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # (1) # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1453 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1474 def visit_parentheses_node(node); end # foo => ^(bar) # ^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1463 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1484 def visit_pinned_expression_node(node); end # foo = 1 and bar => ^foo # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1470 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1492 def visit_pinned_variable_node(node); end # END {} # - # source://prism//lib/prism/translation/parser/compiler.rb#1475 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1497 def visit_post_execution_node(node); end # BEGIN {} # - # source://prism//lib/prism/translation/parser/compiler.rb#1485 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1507 def visit_pre_execution_node(node); end # The top-level program node. # - # source://prism//lib/prism/translation/parser/compiler.rb#1495 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1517 def visit_program_node(node); end # 0..5 # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1501 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1523 def visit_range_node(node); end # 1r # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1523 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1545 def visit_rational_node(node); end # redo # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1529 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1551 def visit_redo_node(node); end # /foo/ # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1535 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1557 def visit_regular_expression_node(node); end # def foo(bar:); end # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1559 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1581 def visit_required_keyword_parameter_node(node); end # def foo(bar); end # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1565 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1587 def visit_required_parameter_node(node); end # foo rescue bar # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1571 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1593 def visit_rescue_modifier_node(node); end # begin; rescue; end # ^^^^^^^ # - # @raise [CompilationError] - # - # source://prism//lib/prism/translation/parser/compiler.rb#1589 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1611 def visit_rescue_node(node); end # def foo(*bar); end @@ -35235,13 +35186,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # def foo(*); end # ^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1598 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1620 def visit_rest_parameter_node(node); end # retry # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1604 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1626 def visit_retry_node(node); end # return @@ -35250,42 +35201,42 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # return 1 # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1613 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1635 def visit_return_node(node); end # self # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1625 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1647 def visit_self_node(node); end # A shareable constant. # - # source://prism//lib/prism/translation/parser/compiler.rb#1630 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1652 def visit_shareable_constant_node(node); end # class << self; end # ^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1636 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1658 def visit_singleton_class_node(node); end # __ENCODING__ # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1648 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1670 def visit_source_encoding_node(node); end # __FILE__ # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1654 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1676 def visit_source_file_node(node); end # __LINE__ # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1660 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1682 def visit_source_line_node(node); end # foo(*bar) @@ -35297,42 +35248,42 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # def foo(*); bar(*); end # ^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1672 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1694 def visit_splat_node(node); end # A list of statements. # - # source://prism//lib/prism/translation/parser/compiler.rb#1685 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1707 def visit_statements_node(node); end # "foo" # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1691 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1713 def visit_string_node(node); end # super(foo) # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1716 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1738 def visit_super_node(node); end # :foo # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1739 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1761 def visit_symbol_node(node); end # true # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1766 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1788 def visit_true_node(node); end # undef foo # ^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1772 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1794 def visit_undef_node(node); end # unless foo; bar end @@ -35341,7 +35292,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # bar unless foo # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1781 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1803 def visit_unless_node(node); end # until foo; bar end @@ -35350,13 +35301,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # bar until foo # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1811 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1833 def visit_until_node(node); end # case foo; when bar; end # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1837 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1859 def visit_when_node(node); end # while foo; bar end @@ -35365,13 +35316,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # bar while foo # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1855 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1877 def visit_while_node(node); end # `foo` # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1881 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1903 def visit_x_string_node(node); end # yield @@ -35380,7 +35331,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # yield 1 # ^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1907 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1929 def visit_yield_node(node); end private @@ -35388,19 +35339,19 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # Initialize a new compiler with the given option overrides, used to # visit a subtree with the given options. # - # source://prism//lib/prism/translation/parser/compiler.rb#1921 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1943 def copy_compiler(forwarding: T.unsafe(nil), in_destructure: T.unsafe(nil), in_pattern: T.unsafe(nil)); end # When *, **, &, or ... are used as an argument in a method call, we # check if they were allowed by the current context. To determine that # we build this lookup table. # - # source://prism//lib/prism/translation/parser/compiler.rb#1928 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1950 def find_forwarding(node); end # Returns the set of targets for a MultiTargetNode or a MultiWriteNode. # - # source://prism//lib/prism/translation/parser/compiler.rb#1941 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1963 def multi_target_elements(node); end # Negate the value of a numeric node. This is a special case where you @@ -35409,123 +35360,119 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # however, marks this as a numeric literal. We have to massage the tree # here to get it into the correct form. # - # source://prism//lib/prism/translation/parser/compiler.rb#1953 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1975 def numeric_negate(message_loc, receiver); end # Blocks can have a special set of parameters that automatically expand # when given arrays if they have a single required parameter and no # other parameters. # - # @return [Boolean] - # - # source://prism//lib/prism/translation/parser/compiler.rb#1967 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:1989 def procarg0?(parameters); end # Constructs a new source range from the given start and end offsets. # - # source://prism//lib/prism/translation/parser/compiler.rb#1984 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2006 def srange(location); end - # Constructs a new source range by finding the given character between - # the given start offset and end offset. If the needle is not found, it - # returns nil. Importantly it does not search past newlines or comments. + # Constructs a new source range from the given start and end offsets. + # + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2011 + def srange_offsets(start_offset, end_offset); end + + # Constructs a new source range by finding a semicolon between the given + # start offset and end offset. If the semicolon is not found, it returns + # nil. Importantly it does not search past newlines or comments. # # Note that end_offset is allowed to be nil, in which case this will # search until the end of the string. # - # source://prism//lib/prism/translation/parser/compiler.rb#1999 - def srange_find(start_offset, end_offset, character); end - - # Constructs a new source range from the given start and end offsets. - # - # source://prism//lib/prism/translation/parser/compiler.rb#1989 - def srange_offsets(start_offset, end_offset); end + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2021 + def srange_semicolon(start_offset, end_offset); end # When the content of a string node is split across multiple lines, the # parser gem creates individual string nodes for each line the content is part of. # - # source://prism//lib/prism/translation/parser/compiler.rb#2116 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2138 def string_nodes_from_interpolation(node, opening); end # Create parser string nodes from a single prism node. The parser gem # "glues" strings together when a line continuation is encountered. # - # source://prism//lib/prism/translation/parser/compiler.rb#2128 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2150 def string_nodes_from_line_continuations(unescaped, escaped, start_offset, opening); end # Transform a location into a token that the parser gem expects. # - # source://prism//lib/prism/translation/parser/compiler.rb#2007 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2029 def token(location); end # Visit a block node on a call. # - # source://prism//lib/prism/translation/parser/compiler.rb#2012 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2034 def visit_block(call, block); end # Visit a heredoc that can be either a string or an xstring. # - # source://prism//lib/prism/translation/parser/compiler.rb#2047 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2069 def visit_heredoc(node); end # Visit a numeric node and account for the optional sign. # - # source://prism//lib/prism/translation/parser/compiler.rb#2093 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2115 def visit_numeric(node, value); end # Within the given block, track that we're within a pattern. # - # source://prism//lib/prism/translation/parser/compiler.rb#2105 + # pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2127 def within_pattern; end end # Raised when the tree is malformed or there is a bug in the compiler. # -# source://prism//lib/prism/translation/parser/compiler.rb#10 +# pkg:gem/prism#lib/prism/translation/parser/compiler.rb:11 class Prism::Translation::Parser::Compiler::CompilationError < ::StandardError; end # Locations in the parser gem AST are generated using this class. We # store a reference to its constant to make it slightly faster to look # up. # -# source://prism//lib/prism/translation/parser/compiler.rb#1981 +# pkg:gem/prism#lib/prism/translation/parser/compiler.rb:2003 Prism::Translation::Parser::Compiler::Range = Parser::Source::Range -# source://prism//lib/prism/translation/parser.rb#17 +# pkg:gem/prism#lib/prism/translation/parser.rb:30 Prism::Translation::Parser::Diagnostic = Parser::Diagnostic # Accepts a list of prism tokens and converts them into the expected # format for the parser gem. # -# source://prism//lib/prism/translation/parser/lexer.rb#11 +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:13 class Prism::Translation::Parser::Lexer # Initialize the lexer with the given source buffer, prism tokens, and # offset cache. # - # @return [Lexer] a new instance of Lexer - # - # source://prism//lib/prism/translation/parser/lexer.rb#229 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:231 def initialize(source_buffer, lexed, offset_cache); end # An array of tuples that contain prism tokens and their associated lex # state when they were lexed. # - # source://prism//lib/prism/translation/parser/lexer.rb#222 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:224 def lexed; end # A hash that maps offsets in bytes to offsets in characters. # - # source://prism//lib/prism/translation/parser/lexer.rb#225 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:227 def offset_cache; end # The Parser::Source::Buffer that the tokens were lexed from. # - # source://prism//lib/prism/translation/parser/lexer.rb#218 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:220 def source_buffer; end # Convert the prism tokens into the expected format for the parser gem. # - # source://prism//lib/prism/translation/parser/lexer.rb#239 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:241 def to_a; end private @@ -35533,111 +35480,103 @@ class Prism::Translation::Parser::Lexer # Wonky heredoc tab/spaces rules. # https://github.com/ruby/prism/blob/v1.3.0/src/prism.c#L10548-L10558 # - # source://prism//lib/prism/translation/parser/lexer.rb#585 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:593 def calculate_heredoc_whitespace(heredoc_token_index); end # Escape a byte value, given the control and meta flags. # - # source://prism//lib/prism/translation/parser/lexer.rb#727 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:735 def escape_build(value, control, meta); end # Read an escape out of the string scanner, given the control and meta # flags, and push the unescaped value into the result. # - # source://prism//lib/prism/translation/parser/lexer.rb#735 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:743 def escape_read(result, scanner, control, meta); end # Determine if characters preceeded by a backslash should be escaped or not # - # @return [Boolean] - # - # source://prism//lib/prism/translation/parser/lexer.rb#796 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:804 def interpolation?(quote); end # Parse a complex from the string representation. # - # source://prism//lib/prism/translation/parser/lexer.rb#556 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:564 def parse_complex(value); end # Parse a float from the string representation. # - # source://prism//lib/prism/translation/parser/lexer.rb#549 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:557 def parse_float(value); end # Parse an integer from the string representation. # - # source://prism//lib/prism/translation/parser/lexer.rb#542 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:550 def parse_integer(value); end # Parse a rational from the string representation. # - # source://prism//lib/prism/translation/parser/lexer.rb#571 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:579 def parse_rational(value); end # Determine if the string is part of a %-style array. # - # @return [Boolean] - # - # source://prism//lib/prism/translation/parser/lexer.rb#806 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:814 def percent_array?(quote); end # For %-arrays whitespace, the parser gem only considers whitespace before the newline. # - # source://prism//lib/prism/translation/parser/lexer.rb#784 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:792 def percent_array_leading_whitespace(string); end # In a percent array, certain whitespace can be preceeded with a backslash, # causing the following characters to be part of the previous element. # - # source://prism//lib/prism/translation/parser/lexer.rb#776 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:784 def percent_array_unescape(string); end # Creates a new parser range, taking prisms byte offsets into account # - # source://prism//lib/prism/translation/parser/lexer.rb#537 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:545 def range(start_offset, end_offset); end # Regexp allow interpolation but are handled differently during unescaping # - # @return [Boolean] - # - # source://prism//lib/prism/translation/parser/lexer.rb#801 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:809 def regexp?(quote); end # Certain strings are merged into a single string token. # - # @return [Boolean] - # - # source://prism//lib/prism/translation/parser/lexer.rb#710 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:718 def simplify_string?(value, quote); end # Wonky heredoc tab/spaces rules. # https://github.com/ruby/prism/blob/v1.3.0/src/prism.c#L16528-L16545 # - # source://prism//lib/prism/translation/parser/lexer.rb#632 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:640 def trim_heredoc_whitespace(string, heredoc); end # Apply Ruby string escaping rules # - # source://prism//lib/prism/translation/parser/lexer.rb#667 + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:675 def unescape_string(string, quote); end end # Types of tokens that are allowed to continue a method call with comments in-between. # For these, the parser gem doesn't emit a newline token after the last comment. # -# source://prism//lib/prism/translation/parser/lexer.rb#209 +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:211 Prism::Translation::Parser::Lexer::COMMENT_CONTINUATION_TYPES = T.let(T.unsafe(nil), Set) # When one of these delimiters is encountered, then the other # one is allowed to be escaped as well. # -# source://prism//lib/prism/translation/parser/lexer.rb#658 +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:666 Prism::Translation::Parser::Lexer::DELIMITER_SYMETRY = T.let(T.unsafe(nil), Hash) # Escape sequences that have special and should appear unescaped in the resulting string. # -# source://prism//lib/prism/translation/parser/lexer.rb#649 +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:657 Prism::Translation::Parser::Lexer::ESCAPES = T.let(T.unsafe(nil), Hash) # These constants represent flags in our lex state. We really, really @@ -35648,43 +35587,42 @@ Prism::Translation::Parser::Lexer::ESCAPES = T.let(T.unsafe(nil), Hash) # meantime we'll hide them from the documentation and mark them as # private constants. # -# source://prism//lib/prism/translation/parser/lexer.rb#191 +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:193 Prism::Translation::Parser::Lexer::EXPR_BEG = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/parser/lexer.rb#192 +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:194 Prism::Translation::Parser::Lexer::EXPR_LABEL = T.let(T.unsafe(nil), Integer) # Heredocs are complex and require us to keep track of a bit of info to refer to later # -# source://prism//lib/prism/translation/parser/lexer.rb#213 +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:215 class Prism::Translation::Parser::Lexer::HeredocData < ::Struct - # Returns the value of attribute common_whitespace - # - # @return [Object] the current value of common_whitespace + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:215 def common_whitespace; end - # Sets the attribute common_whitespace - # - # @param value [Object] the value to set the attribute common_whitespace to. - # @return [Object] the newly set value + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:215 def common_whitespace=(_); end - # Returns the value of attribute identifier - # - # @return [Object] the current value of identifier + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:215 def identifier; end - # Sets the attribute identifier - # - # @param value [Object] the value to set the attribute identifier to. - # @return [Object] the newly set value + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:215 def identifier=(_); end class << self + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:215 def [](*_arg0); end + + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:215 def inspect; end + + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:215 def keyword_init?; end + + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:215 def members; end + + # pkg:gem/prism#lib/prism/translation/parser/lexer.rb:215 def new(*_arg0); end end end @@ -35694,55 +35632,56 @@ end # NOTE: In edge cases like `-> (foo = -> (bar) {}) do end`, please note that `kDO` is still returned # instead of `kDO_LAMBDA`, which is expected: https://github.com/ruby/prism/pull/3046 # -# source://prism//lib/prism/translation/parser/lexer.rb#198 +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:200 Prism::Translation::Parser::Lexer::LAMBDA_TOKEN_TYPES = T.let(T.unsafe(nil), Set) # The `PARENTHESIS_LEFT` token in Prism is classified as either `tLPAREN` or `tLPAREN2` in the Parser gem. # The following token types are listed as those classified as `tLPAREN`. # -# source://prism//lib/prism/translation/parser/lexer.rb#202 +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:204 Prism::Translation::Parser::Lexer::LPAREN_CONVERSION_TOKEN_TYPES = T.let(T.unsafe(nil), Set) # https://github.com/whitequark/parser/blob/v3.3.6.0/lib/parser/lexer-strings.rl#L14 # -# source://prism//lib/prism/translation/parser/lexer.rb#663 +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:671 Prism::Translation::Parser::Lexer::REGEXP_META_CHARACTERS = T.let(T.unsafe(nil), Array) -# source://prism//lib/prism/translation/parser/lexer.rb#235 +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:237 Prism::Translation::Parser::Lexer::Range = Parser::Source::Range # The direct translating of types between the two lexers. # -# source://prism//lib/prism/translation/parser/lexer.rb#17 +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:19 Prism::Translation::Parser::Lexer::TYPES = T.let(T.unsafe(nil), Hash) # These tokens are always skipped # -# source://prism//lib/prism/translation/parser/lexer.rb#13 +# pkg:gem/prism#lib/prism/translation/parser/lexer.rb:15 Prism::Translation::Parser::Lexer::TYPES_ALWAYS_SKIP = T.let(T.unsafe(nil), Set) # The parser gem has a list of diagnostics with a hard-coded set of error # messages. We create our own diagnostic class in order to set our own # error messages. # -# source://prism//lib/prism/translation/parser.rb#23 +# pkg:gem/prism#lib/prism/translation/parser.rb:36 class Prism::Translation::Parser::PrismDiagnostic < ::Parser::Diagnostic # Initialize a new diagnostic with the given message and location. # - # @return [PrismDiagnostic] a new instance of PrismDiagnostic - # - # source://prism//lib/prism/translation/parser.rb#28 + # pkg:gem/prism#lib/prism/translation/parser.rb:41 def initialize(message, level, reason, location); end # This is the cached message coming from prism. # - # source://prism//lib/prism/translation/parser.rb#25 + # pkg:gem/prism#lib/prism/translation/parser.rb:38 def message; end end -# source://prism//lib/prism/translation/parser.rb#34 +# pkg:gem/prism#lib/prism/translation/parser.rb:47 Prism::Translation::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) +# pkg:gem/prism#lib/prism/translation/parser_current.rb:14 +Prism::Translation::ParserCurrent = Prism::Translation::Parser40 + # This class provides a compatibility layer between prism and Ripper. It # functions by parsing the entire tree first and then walking it and # executing each of the Ripper callbacks as it goes. To use this class, you @@ -35779,95 +35718,91 @@ Prism::Translation::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) # - on_tstring_beg # - on_tstring_end # -# source://prism//lib/prism/translation/ripper.rb#43 +# pkg:gem/prism#lib/prism/translation/ripper.rb:42 class Prism::Translation::Ripper < ::Prism::Compiler # Create a new Translation::Ripper object with the given source. # - # @return [Ripper] a new instance of Ripper - # - # source://prism//lib/prism/translation/ripper.rb#444 + # pkg:gem/prism#lib/prism/translation/ripper.rb:482 def initialize(source, filename = T.unsafe(nil), lineno = T.unsafe(nil)); end # The current column number of the parser. # - # source://prism//lib/prism/translation/ripper.rb#441 + # pkg:gem/prism#lib/prism/translation/ripper.rb:479 def column; end # True if the parser encountered an error during parsing. # - # @return [Boolean] - # - # source://prism//lib/prism/translation/ripper.rb#457 + # pkg:gem/prism#lib/prism/translation/ripper.rb:495 sig { returns(T::Boolean) } def error?; end # The filename of the source being parsed. # - # source://prism//lib/prism/translation/ripper.rb#435 + # pkg:gem/prism#lib/prism/translation/ripper.rb:473 def filename; end # The current line number of the parser. # - # source://prism//lib/prism/translation/ripper.rb#438 + # pkg:gem/prism#lib/prism/translation/ripper.rb:476 def lineno; end # Parse the source and return the result. # - # source://prism//lib/prism/translation/ripper.rb#462 + # pkg:gem/prism#lib/prism/translation/ripper.rb:500 sig { returns(T.untyped) } def parse; end # The source that is being parsed. # - # source://prism//lib/prism/translation/ripper.rb#432 + # pkg:gem/prism#lib/prism/translation/ripper.rb:470 def source; end # alias $foo $bar # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#561 + # pkg:gem/prism#lib/prism/translation/ripper.rb:599 def visit_alias_global_variable_node(node); end # alias foo bar # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#551 + # pkg:gem/prism#lib/prism/translation/ripper.rb:589 def visit_alias_method_node(node); end # foo => bar | baz # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#585 + # pkg:gem/prism#lib/prism/translation/ripper.rb:623 def visit_alternation_pattern_node(node); end # a and b # ^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#605 + # pkg:gem/prism#lib/prism/translation/ripper.rb:643 def visit_and_node(node); end # foo(bar) # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#796 + # pkg:gem/prism#lib/prism/translation/ripper.rb:834 def visit_arguments_node(node); end # [] # ^^ # - # source://prism//lib/prism/translation/ripper.rb#615 + # pkg:gem/prism#lib/prism/translation/ripper.rb:653 def visit_array_node(node); end # foo => [bar] # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#775 + # pkg:gem/prism#lib/prism/translation/ripper.rb:813 def visit_array_pattern_node(node); end # { a: 1 } # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#803 + # pkg:gem/prism#lib/prism/translation/ripper.rb:841 def visit_assoc_node(node); end # def foo(**); bar(**); end @@ -35876,47 +35811,47 @@ class Prism::Translation::Ripper < ::Prism::Compiler # { **foo } # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#816 + # pkg:gem/prism#lib/prism/translation/ripper.rb:854 def visit_assoc_splat_node(node); end # $+ # ^^ # - # source://prism//lib/prism/translation/ripper.rb#825 + # pkg:gem/prism#lib/prism/translation/ripper.rb:863 def visit_back_reference_read_node(node); end # begin end # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#832 + # pkg:gem/prism#lib/prism/translation/ripper.rb:870 def visit_begin_node(node); end # foo(&bar) # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#896 + # pkg:gem/prism#lib/prism/translation/ripper.rb:934 def visit_block_argument_node(node); end # foo { |; bar| } # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#902 + # pkg:gem/prism#lib/prism/translation/ripper.rb:940 def visit_block_local_variable_node(node); end # Visit a BlockNode. # - # source://prism//lib/prism/translation/ripper.rb#908 + # pkg:gem/prism#lib/prism/translation/ripper.rb:946 def visit_block_node(node); end # def foo(&bar); end # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#944 + # pkg:gem/prism#lib/prism/translation/ripper.rb:982 def visit_block_parameter_node(node); end # A block's parameters. # - # source://prism//lib/prism/translation/ripper.rb#958 + # pkg:gem/prism#lib/prism/translation/ripper.rb:996 def visit_block_parameters_node(node); end # break @@ -35925,13 +35860,13 @@ class Prism::Translation::Ripper < ::Prism::Compiler # break foo # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#982 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1020 def visit_break_node(node); end # foo.bar &&= baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1204 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1251 def visit_call_and_write_node(node); end # foo @@ -35943,79 +35878,79 @@ class Prism::Translation::Ripper < ::Prism::Compiler # foo.bar() {} # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1002 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1040 def visit_call_node(node); end # foo.bar += baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1182 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1229 def visit_call_operator_write_node(node); end # foo.bar ||= baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1226 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1273 def visit_call_or_write_node(node); end # foo.bar, = 1 # ^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1248 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1295 def visit_call_target_node(node); end # foo => bar => baz # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1273 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1320 def visit_capture_pattern_node(node); end # case foo; in bar; end # ^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1296 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1343 def visit_case_match_node(node); end # case foo; when bar; end # ^^^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1283 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1330 def visit_case_node(node); end # class Foo; end # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1309 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1356 def visit_class_node(node); end # @@foo &&= bar # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1362 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1409 def visit_class_variable_and_write_node(node); end # @@foo += bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1348 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1395 def visit_class_variable_operator_write_node(node); end # @@foo ||= bar # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1376 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1423 def visit_class_variable_or_write_node(node); end # @@foo # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1327 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1374 def visit_class_variable_read_node(node); end # @@foo, = bar # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1390 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1437 def visit_class_variable_target_node(node); end # @@foo = 1 @@ -36024,55 +35959,55 @@ class Prism::Translation::Ripper < ::Prism::Compiler # @@foo, @@bar = 1 # ^^^^^ ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1337 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1384 def visit_class_variable_write_node(node); end # Foo &&= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1432 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1479 def visit_constant_and_write_node(node); end # Foo += bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1418 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1465 def visit_constant_operator_write_node(node); end # Foo ||= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1446 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1493 def visit_constant_or_write_node(node); end # Foo::Bar &&= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1533 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1580 def visit_constant_path_and_write_node(node); end # Foo::Bar # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1467 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1514 def visit_constant_path_node(node); end # Foo::Bar += baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1519 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1566 def visit_constant_path_operator_write_node(node); end # Foo::Bar ||= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1547 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1594 def visit_constant_path_or_write_node(node); end # Foo::Bar, = baz # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1561 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1608 def visit_constant_path_target_node(node); end # Foo::Bar = 1 @@ -36081,19 +36016,19 @@ class Prism::Translation::Ripper < ::Prism::Compiler # Foo::Foo, Bar::Bar = 1 # ^^^^^^^^ ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1490 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1537 def visit_constant_path_write_node(node); end # Foo # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#1397 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1444 def visit_constant_read_node(node); end # Foo, = bar # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#1460 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1507 def visit_constant_target_node(node); end # Foo = 1 @@ -36102,7 +36037,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # Foo, Bar = 1 # ^^^ ^^^ # - # source://prism//lib/prism/translation/ripper.rb#1407 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1454 def visit_constant_write_node(node); end # def foo; end @@ -36111,7 +36046,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # def self.foo; end # ^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1570 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1617 def visit_def_node(node); end # defined? a @@ -36120,72 +36055,72 @@ class Prism::Translation::Ripper < ::Prism::Compiler # defined?(a) # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1617 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1664 def visit_defined_node(node); end # if foo then bar else baz end # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1624 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1686 def visit_else_node(node); end # "foo #{bar}" # ^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1640 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1702 def visit_embedded_statements_node(node); end # "foo #@bar" # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1661 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1723 def visit_embedded_variable_node(node); end # Visit an EnsureNode node. # - # source://prism//lib/prism/translation/ripper.rb#1672 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1734 def visit_ensure_node(node); end # false # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1690 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1752 def visit_false_node(node); end # foo => [*, bar, *] # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1697 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1759 def visit_find_pattern_node(node); end # if foo .. bar; end # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1722 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1784 def visit_flip_flop_node(node); end # 1.0 # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#1736 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1798 def visit_float_node(node); end # for foo in bar do end # ^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1742 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1804 def visit_for_node(node); end # def foo(...); bar(...); end # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#1759 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1821 def visit_forwarding_arguments_node(node); end # def foo(...); end # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#1766 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1828 def visit_forwarding_parameter_node(node); end # super @@ -36194,37 +36129,37 @@ class Prism::Translation::Ripper < ::Prism::Compiler # super {} # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1776 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1838 def visit_forwarding_super_node(node); end # $foo &&= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1825 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1887 def visit_global_variable_and_write_node(node); end # $foo += bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1811 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1873 def visit_global_variable_operator_write_node(node); end # $foo ||= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1839 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1901 def visit_global_variable_or_write_node(node); end # $foo # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1790 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1852 def visit_global_variable_read_node(node); end # $foo, = bar # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1853 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1915 def visit_global_variable_target_node(node); end # $foo = 1 @@ -36233,19 +36168,19 @@ class Prism::Translation::Ripper < ::Prism::Compiler # $foo, $bar = 1 # ^^^^ ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1800 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1862 def visit_global_variable_write_node(node); end # {} # ^^ # - # source://prism//lib/prism/translation/ripper.rb#1860 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1922 def visit_hash_node(node); end # foo => {} # ^^ # - # source://prism//lib/prism/translation/ripper.rb#1875 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1937 def visit_hash_pattern_node(node); end # if foo then bar end @@ -36257,140 +36192,145 @@ class Prism::Translation::Ripper < ::Prism::Compiler # foo ? bar : baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1917 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1979 def visit_if_node(node); end # 1i # ^^ # - # source://prism//lib/prism/translation/ripper.rb#1953 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2015 def visit_imaginary_node(node); end # { foo: } # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1959 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2021 def visit_implicit_node(node); end # foo { |bar,| } # ^ # - # source://prism//lib/prism/translation/ripper.rb#1964 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2026 def visit_implicit_rest_node(node); end # case foo; in bar; end # ^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1971 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2033 def visit_in_node(node); end # foo[bar] &&= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2006 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2068 def visit_index_and_write_node(node); end # foo[bar] += baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#1989 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2051 def visit_index_operator_write_node(node); end # foo[bar] ||= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2023 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2085 def visit_index_or_write_node(node); end # foo[bar], = 1 # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2040 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2102 def visit_index_target_node(node); end + # @foo &&= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2082 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2144 def visit_instance_variable_and_write_node(node); end + # @foo += bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2068 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2130 def visit_instance_variable_operator_write_node(node); end + # @foo ||= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2096 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2158 def visit_instance_variable_or_write_node(node); end + # @foo # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2050 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2112 def visit_instance_variable_read_node(node); end # @foo, = bar # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2110 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2172 def visit_instance_variable_target_node(node); end + # @foo = 1 # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2057 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2119 def visit_instance_variable_write_node(node); end # 1 # ^ # - # source://prism//lib/prism/translation/ripper.rb#2117 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2179 def visit_integer_node(node); end # if /foo #{bar}/ then end # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2123 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2185 def visit_interpolated_match_last_line_node(node); end # /foo #{bar}/ # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2142 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2204 def visit_interpolated_regular_expression_node(node); end # "foo #{bar}" # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2161 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2223 def visit_interpolated_string_node(node); end # :"foo #{bar}" # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2189 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2251 def visit_interpolated_symbol_node(node); end # `foo #{bar}` # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2202 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2264 def visit_interpolated_x_string_node(node); end # -> { it } # ^^ # - # source://prism//lib/prism/translation/ripper.rb#2232 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2294 def visit_it_local_variable_read_node(node); end # -> { it } # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2239 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2301 def visit_it_parameters_node(node); end # foo(bar: baz) # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2244 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2306 def visit_keyword_hash_node(node); end # def foo(**bar); end @@ -36399,96 +36339,96 @@ class Prism::Translation::Ripper < ::Prism::Compiler # def foo(**); end # ^^ # - # source://prism//lib/prism/translation/ripper.rb#2256 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2318 def visit_keyword_rest_parameter_node(node); end # -> {} # - # source://prism//lib/prism/translation/ripper.rb#2270 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2332 def visit_lambda_node(node); end # foo &&= bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2362 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2424 def visit_local_variable_and_write_node(node); end # foo += bar # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2348 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2410 def visit_local_variable_operator_write_node(node); end # foo ||= bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2376 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2438 def visit_local_variable_or_write_node(node); end # foo # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#2330 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2392 def visit_local_variable_read_node(node); end # foo, = bar # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#2390 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2452 def visit_local_variable_target_node(node); end # foo = 1 # ^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2337 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2399 def visit_local_variable_write_node(node); end # if /foo/ then end # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2397 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2459 def visit_match_last_line_node(node); end # foo in bar # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2412 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2474 def visit_match_predicate_node(node); end # foo => bar # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2421 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2483 def visit_match_required_node(node); end # /(?foo)/ =~ bar # ^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2430 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2492 def visit_match_write_node(node); end # A node that is missing from the syntax tree. This is only used in the # case of a syntax error. # - # source://prism//lib/prism/translation/ripper.rb#2436 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2498 def visit_missing_node(node); end # module Foo; end # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2442 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2504 def visit_module_node(node); end # (foo, bar), bar = qux # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2459 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2521 def visit_multi_target_node(node); end # foo, bar = baz # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2513 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2575 def visit_multi_write_node(node); end # next @@ -36497,55 +36437,55 @@ class Prism::Translation::Ripper < ::Prism::Compiler # next foo # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2533 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2595 def visit_next_node(node); end # nil # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#2547 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2609 def visit_nil_node(node); end # def foo(**nil); end # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2554 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2616 def visit_no_keywords_parameter_node(node); end # -> { _1 + _2 } # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2563 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2625 def visit_numbered_parameters_node(node); end # $1 # ^^ # - # source://prism//lib/prism/translation/ripper.rb#2568 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2630 def visit_numbered_reference_read_node(node); end # def foo(bar: baz); end # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2575 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2637 def visit_optional_keyword_parameter_node(node); end # def foo(bar = 1); end # ^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2585 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2647 def visit_optional_parameter_node(node); end # a or b # ^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2595 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2657 def visit_or_node(node); end # def foo(bar, *baz); end # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2605 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2667 def visit_parameters_node(node); end # () @@ -36554,84 +36494,84 @@ class Prism::Translation::Ripper < ::Prism::Compiler # (1) # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#2632 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2694 def visit_parentheses_node(node); end # foo => ^(bar) # ^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2646 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2708 def visit_pinned_expression_node(node); end # foo = 1 and bar => ^foo # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2655 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2717 def visit_pinned_variable_node(node); end # END {} # ^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2661 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2723 def visit_post_execution_node(node); end # BEGIN {} # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2676 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2738 def visit_pre_execution_node(node); end # The top-level program node. # - # source://prism//lib/prism/translation/ripper.rb#2690 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2752 def visit_program_node(node); end # 0..5 # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2701 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2763 def visit_range_node(node); end # 1r # ^^ # - # source://prism//lib/prism/translation/ripper.rb#2715 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2777 def visit_rational_node(node); end # redo # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2721 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2783 def visit_redo_node(node); end # /foo/ # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2728 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2790 def visit_regular_expression_node(node); end # def foo(bar:); end # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2750 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2812 def visit_required_keyword_parameter_node(node); end # def foo(bar); end # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#2757 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2819 def visit_required_parameter_node(node); end # foo rescue bar # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2764 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2826 def visit_rescue_modifier_node(node); end # begin; rescue; end # ^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2774 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2836 def visit_rescue_node(node); end # def foo(*bar); end @@ -36640,13 +36580,13 @@ class Prism::Translation::Ripper < ::Prism::Compiler # def foo(*); end # ^ # - # source://prism//lib/prism/translation/ripper.rb#2832 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2894 def visit_rest_parameter_node(node); end # retry # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2844 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2906 def visit_retry_node(node); end # return @@ -36655,42 +36595,42 @@ class Prism::Translation::Ripper < ::Prism::Compiler # return 1 # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2854 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2916 def visit_return_node(node); end # self # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2868 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2930 def visit_self_node(node); end # A shareable constant. # - # source://prism//lib/prism/translation/ripper.rb#2874 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2936 def visit_shareable_constant_node(node); end # class << self; end # ^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2880 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2942 def visit_singleton_class_node(node); end # __ENCODING__ # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2890 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2952 def visit_source_encoding_node(node); end # __FILE__ # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2897 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2959 def visit_source_file_node(node); end # __LINE__ # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2904 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2966 def visit_source_line_node(node); end # foo(*bar) @@ -36702,42 +36642,42 @@ class Prism::Translation::Ripper < ::Prism::Compiler # def foo(*); bar(*); end # ^ # - # source://prism//lib/prism/translation/ripper.rb#2917 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2979 def visit_splat_node(node); end # A list of statements. # - # source://prism//lib/prism/translation/ripper.rb#2922 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2984 def visit_statements_node(node); end # "foo" # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2939 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3001 def visit_string_node(node); end # super(foo) # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3071 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3133 def visit_super_node(node); end # :foo # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3092 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3154 def visit_symbol_node(node); end # true # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3116 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3178 def visit_true_node(node); end # undef foo # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3123 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3185 def visit_undef_node(node); end # unless foo; bar end @@ -36746,7 +36686,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # bar unless foo # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3135 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3197 def visit_unless_node(node); end # until foo; bar end @@ -36755,13 +36695,13 @@ class Prism::Translation::Ripper < ::Prism::Compiler # bar until foo # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3163 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3225 def visit_until_node(node); end # case foo; when bar; end # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3187 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3249 def visit_when_node(node); end # while foo; bar end @@ -36770,13 +36710,13 @@ class Prism::Translation::Ripper < ::Prism::Compiler # bar while foo # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3208 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3270 def visit_while_node(node); end # `foo` # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3232 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3294 def visit_x_string_node(node); end # yield @@ -36785,33 +36725,33 @@ class Prism::Translation::Ripper < ::Prism::Compiler # yield 1 # ^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3255 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3317 def visit_yield_node(node); end private # :stopdoc: # - # source://prism//lib/prism/translation/ripper.rb#3395 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3457 def _dispatch_0; end - # source://prism//lib/prism/translation/ripper.rb#3396 - def _dispatch_1(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3458 + def _dispatch_1(arg); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def _dispatch_2(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3459 + def _dispatch_2(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3398 - def _dispatch_3(_, _, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3460 + def _dispatch_3(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3399 - def _dispatch_4(_, _, _, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3461 + def _dispatch_4(arg, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3400 - def _dispatch_5(_, _, _, _, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3462 + def _dispatch_5(arg, _, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3401 - def _dispatch_7(_, _, _, _, _, _, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3463 + def _dispatch_7(arg, _, _, _, _, _, _); end # This method is responsible for updating lineno and column information # to reflect the current node. @@ -36819,19 +36759,17 @@ class Prism::Translation::Ripper < ::Prism::Compiler # This method could be drastically improved with some caching on the start # of every line, but for now it's good enough. # - # source://prism//lib/prism/translation/ripper.rb#3385 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3447 def bounds(location); end # Returns true if the given node is a command node. # - # @return [Boolean] - # - # source://prism//lib/prism/translation/ripper.rb#1173 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1220 def command?(node); end # This method is called when the parser found syntax error. # - # source://prism//lib/prism/translation/ripper.rb#3423 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3485 def compile_error(msg); end # This method is provided by the Ripper C extension. It is called when a @@ -36839,631 +36777,635 @@ class Prism::Translation::Ripper < ::Prism::Compiler # that it will modify the string in place and return the number of bytes # that were removed. # - # source://prism//lib/prism/translation/ripper.rb#3438 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3500 def dedent_string(string, width); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_BEGIN(_); end + # Extract the arguments and block Ripper-style, which means if the block + # is like `&b` then it's moved to arguments. + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:1184 + def get_arguments_and_block(arguments_node, block_node); end + + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_BEGIN(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_CHAR(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_CHAR(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_END(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_END(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on___end__(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on___end__(arg); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_alias(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_alias(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_alias_error(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_alias_error(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_aref(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_aref(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_aref_field(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_aref_field(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_arg_ambiguous(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_arg_ambiguous(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_arg_paren(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_arg_paren(arg); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_args_add(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_args_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_args_add_block(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_args_add_block(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_args_add_star(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_args_add_star(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3395 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_args_forward; end - # source://prism//lib/prism/translation/ripper.rb#3395 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_args_new; end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_array(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_array(arg); end - # source://prism//lib/prism/translation/ripper.rb#3399 - def on_aryptn(_, _, _, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_aryptn(arg, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_assign(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_assign(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_assign_error(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_assign_error(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_assoc_new(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_assoc_new(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_assoc_splat(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_assoc_splat(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_assoclist_from_args(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_assoclist_from_args(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_backref(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_backref(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_backtick(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_backtick(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_bare_assoc_hash(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_bare_assoc_hash(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_begin(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_begin(arg); end - # source://prism//lib/prism/translation/ripper.rb#3398 - def on_binary(_, _, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_binary(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_block_var(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_block_var(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_blockarg(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_blockarg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3399 - def on_bodystmt(_, _, _, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_bodystmt(arg, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_brace_block(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_brace_block(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_break(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_break(arg); end - # source://prism//lib/prism/translation/ripper.rb#3398 - def on_call(_, _, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_call(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_case(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_case(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3398 - def on_class(_, _, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_class(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_class_name_error(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_class_name_error(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_comma(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_comma(arg); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_command(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_command(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3399 - def on_command_call(_, _, _, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_command_call(arg, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_comment(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_comment(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_const(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_const(arg); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_const_path_field(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_const_path_field(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_const_path_ref(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_const_path_ref(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_const_ref(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_const_ref(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_cvar(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_cvar(arg); end - # source://prism//lib/prism/translation/ripper.rb#3398 - def on_def(_, _, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_def(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_defined(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_defined(arg); end - # source://prism//lib/prism/translation/ripper.rb#3400 - def on_defs(_, _, _, _, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_defs(arg, _, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_do_block(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_do_block(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_dot2(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_dot2(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_dot3(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_dot3(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_dyna_symbol(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_dyna_symbol(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_else(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_else(arg); end - # source://prism//lib/prism/translation/ripper.rb#3398 - def on_elsif(_, _, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_elsif(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_embdoc(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_embdoc(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_embdoc_beg(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_embdoc_beg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_embdoc_end(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_embdoc_end(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_embexpr_beg(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_embexpr_beg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_embexpr_end(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_embexpr_end(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_embvar(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_embvar(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_ensure(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_ensure(arg); end - # source://prism//lib/prism/translation/ripper.rb#3395 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_excessed_comma; end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_fcall(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_fcall(arg); end - # source://prism//lib/prism/translation/ripper.rb#3398 - def on_field(_, _, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_field(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_float(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_float(arg); end - # source://prism//lib/prism/translation/ripper.rb#3399 - def on_fndptn(_, _, _, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_fndptn(arg, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3398 - def on_for(_, _, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_for(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_gvar(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_gvar(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_hash(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_hash(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_heredoc_beg(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_heredoc_beg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_heredoc_dedent(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_heredoc_dedent(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_heredoc_end(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_heredoc_end(arg); end - # source://prism//lib/prism/translation/ripper.rb#3398 - def on_hshptn(_, _, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_hshptn(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_ident(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_ident(arg); end - # source://prism//lib/prism/translation/ripper.rb#3398 - def on_if(_, _, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_if(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_if_mod(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_if_mod(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3398 - def on_ifop(_, _, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_ifop(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_ignored_nl(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_ignored_nl(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_ignored_sp(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_ignored_sp(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_imaginary(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_imaginary(arg); end - # source://prism//lib/prism/translation/ripper.rb#3398 - def on_in(_, _, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_in(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_int(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_int(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_ivar(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_ivar(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_kw(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_kw(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_kwrest_param(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_kwrest_param(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_label(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_label(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_label_end(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_label_end(arg); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_lambda(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_lambda(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_lbrace(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_lbrace(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_lbracket(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_lbracket(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_lparen(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_lparen(arg); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_magic_comment(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_magic_comment(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_massign(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_massign(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_method_add_arg(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_method_add_arg(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_method_add_block(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_method_add_block(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_mlhs_add(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_mlhs_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_mlhs_add_post(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_mlhs_add_post(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_mlhs_add_star(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_mlhs_add_star(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3395 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_mlhs_new; end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_mlhs_paren(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_mlhs_paren(arg); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_module(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_module(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_mrhs_add(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_mrhs_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_mrhs_add_star(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_mrhs_add_star(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3395 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_mrhs_new; end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_mrhs_new_from_args(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_mrhs_new_from_args(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_next(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_next(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_nl(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_nl(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_nokw_param(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_nokw_param(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_op(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_op(arg); end - # source://prism//lib/prism/translation/ripper.rb#3398 - def on_opassign(_, _, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_opassign(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_operator_ambiguous(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_operator_ambiguous(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_param_error(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_param_error(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3401 - def on_params(_, _, _, _, _, _, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_params(arg, _, _, _, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_paren(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_paren(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_parse_error(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_parse_error(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_period(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_period(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_program(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_program(arg); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_qsymbols_add(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_qsymbols_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_qsymbols_beg(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_qsymbols_beg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3395 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_qsymbols_new; end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_qwords_add(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_qwords_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_qwords_beg(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_qwords_beg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3395 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_qwords_new; end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_rational(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_rational(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_rbrace(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_rbrace(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_rbracket(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_rbracket(arg); end - # source://prism//lib/prism/translation/ripper.rb#3395 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_redo; end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_regexp_add(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_regexp_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_regexp_beg(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_regexp_beg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_regexp_end(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_regexp_end(arg); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_regexp_literal(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_regexp_literal(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3395 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_regexp_new; end - # source://prism//lib/prism/translation/ripper.rb#3399 - def on_rescue(_, _, _, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_rescue(arg, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_rescue_mod(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_rescue_mod(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_rest_param(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_rest_param(arg); end - # source://prism//lib/prism/translation/ripper.rb#3395 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_retry; end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_return(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_return(arg); end - # source://prism//lib/prism/translation/ripper.rb#3395 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_return0; end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_rparen(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_rparen(arg); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_sclass(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_sclass(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_semicolon(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_semicolon(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_sp(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_sp(arg); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_stmts_add(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_stmts_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3395 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_stmts_new; end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_string_add(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_string_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_string_concat(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_string_concat(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3395 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_string_content; end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_string_dvar(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_string_dvar(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_string_embexpr(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_string_embexpr(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_string_literal(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_string_literal(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_super(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_super(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_symbeg(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_symbeg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_symbol(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_symbol(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_symbol_literal(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_symbol_literal(arg); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_symbols_add(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_symbols_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_symbols_beg(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_symbols_beg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3395 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_symbols_new; end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_tlambda(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_tlambda(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_tlambeg(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_tlambeg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_top_const_field(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_top_const_field(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_top_const_ref(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_top_const_ref(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_tstring_beg(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_tstring_beg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_tstring_content(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_tstring_content(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_tstring_end(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_tstring_end(arg); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_unary(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_unary(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_undef(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_undef(arg); end - # source://prism//lib/prism/translation/ripper.rb#3398 - def on_unless(_, _, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_unless(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_unless_mod(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_unless_mod(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_until(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_until(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_until_mod(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_until_mod(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_var_alias(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_var_alias(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_var_field(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_var_field(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_var_ref(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_var_ref(arg); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_vcall(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_vcall(arg); end - # source://prism//lib/prism/translation/ripper.rb#3395 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_void_stmt; end - # source://prism//lib/prism/translation/ripper.rb#3398 - def on_when(_, _, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_when(arg, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_while(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_while(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_while_mod(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_while_mod(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_word_add(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_word_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3395 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_word_new; end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_words_add(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_words_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_words_beg(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_words_beg(arg); end - # source://prism//lib/prism/translation/ripper.rb#3395 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_words_new; end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_words_sep(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3493 + def on_words_sep(arg); end - # source://prism//lib/prism/translation/ripper.rb#3397 - def on_xstring_add(_, _); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_xstring_add(arg, _); end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_xstring_literal(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_xstring_literal(arg); end - # source://prism//lib/prism/translation/ripper.rb#3395 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_xstring_new; end - # source://prism//lib/prism/translation/ripper.rb#3396 - def on_yield(_); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 + def on_yield(arg); end - # source://prism//lib/prism/translation/ripper.rb#3395 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_yield0; end - # source://prism//lib/prism/translation/ripper.rb#3395 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3471 def on_zsuper; end # Lazily initialize the parse result. # - # source://prism//lib/prism/translation/ripper.rb#3281 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3343 def result; end # Returns true if there is a comma between the two locations. # - # @return [Boolean] - # - # source://prism//lib/prism/translation/ripper.rb#3290 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3352 def trailing_comma?(left, right); end # Visit one side of an alias global variable node. # - # source://prism//lib/prism/translation/ripper.rb#570 + # pkg:gem/prism#lib/prism/translation/ripper.rb:608 def visit_alias_global_variable_node_value(node); end # Visit a list of elements, like the elements of an array or arguments. # - # source://prism//lib/prism/translation/ripper.rb#756 + # pkg:gem/prism#lib/prism/translation/ripper.rb:794 def visit_arguments(elements); end # Visit the clauses of a begin node to form an on_bodystmt call. # - # source://prism//lib/prism/translation/ripper.rb#840 + # pkg:gem/prism#lib/prism/translation/ripper.rb:878 def visit_begin_node_clauses(location, node, allow_newline); end # Visit the body of a structure that can have either a set of statements # or statements wrapped in rescue/else/ensure. # - # source://prism//lib/prism/translation/ripper.rb#875 + # pkg:gem/prism#lib/prism/translation/ripper.rb:913 def visit_body_node(location, node, allow_newline = T.unsafe(nil)); end # Visit the arguments and block of a call node and return the arguments # and block as they should be used. # - # source://prism//lib/prism/translation/ripper.rb#1146 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1198 def visit_call_node_arguments(arguments_node, block_node, trailing_comma); end # Visit a constant path that is part of a write node. # - # source://prism//lib/prism/translation/ripper.rb#1499 + # pkg:gem/prism#lib/prism/translation/ripper.rb:1546 def visit_constant_path_write_node_target(node); end # Visit a destructured positional parameter node. # - # source://prism//lib/prism/translation/ripper.rb#2619 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2681 def visit_destructured_parameter_node(node); end # Visit a string that is expressed using a <<~ heredoc. # - # source://prism//lib/prism/translation/ripper.rb#2990 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3052 def visit_heredoc_node(parts, base); end # Ripper gives back the escaped string content but strips out the common @@ -37472,34 +37414,34 @@ class Prism::Translation::Ripper < ::Prism::Compiler # work well together, so here we need to re-derive the common leading # whitespace. # - # source://prism//lib/prism/translation/ripper.rb#2965 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3027 def visit_heredoc_node_whitespace(parts); end # Visit a heredoc node that is representing a string. # - # source://prism//lib/prism/translation/ripper.rb#3036 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3098 def visit_heredoc_string_node(node); end # Visit a heredoc node that is representing an xstring. # - # source://prism//lib/prism/translation/ripper.rb#3053 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3115 def visit_heredoc_x_string_node(node); end # Visit the targets of a multi-target node. # - # source://prism//lib/prism/translation/ripper.rb#2472 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2534 def visit_multi_target_node_targets(lefts, rest, rights, skippable); end # Visit a node that represents a number. We need to explicitly handle the # unary - operator. # - # source://prism//lib/prism/translation/ripper.rb#3329 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3391 def visit_number_node(node); end # Visit a pattern within a pattern match. This is used to bypass the # parenthesis node that can be used to wrap patterns. # - # source://prism//lib/prism/translation/ripper.rb#595 + # pkg:gem/prism#lib/prism/translation/ripper.rb:633 def visit_pattern_node(node); end # Visit the list of statements of a statements node. We support nil @@ -37507,49 +37449,47 @@ class Prism::Translation::Ripper < ::Prism::Compiler # structure of the prism parse tree, but we manually add them here so that # we can mirror Ripper's void stmt. # - # source://prism//lib/prism/translation/ripper.rb#2931 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2993 def visit_statements_node_body(body); end # Visit an individual part of a string-like node. # - # source://prism//lib/prism/translation/ripper.rb#2221 + # pkg:gem/prism#lib/prism/translation/ripper.rb:2283 def visit_string_content(part); end # Visit the string content of a particular node. This method is used to # split into the various token types. # - # source://prism//lib/prism/translation/ripper.rb#3302 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3364 def visit_token(token, allow_keywords = T.unsafe(nil)); end # Dispatch a words_sep event that contains the space between the elements # of list literals. # - # source://prism//lib/prism/translation/ripper.rb#745 + # pkg:gem/prism#lib/prism/translation/ripper.rb:783 def visit_words_sep(opening_loc, previous, current); end # Visit a node that represents a write value. This is used to handle the # special case of an implicit array that is generated without brackets. # - # source://prism//lib/prism/translation/ripper.rb#3347 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3409 def visit_write_value(node); end # Returns true if there is a semicolon between the two locations. # - # @return [Boolean] - # - # source://prism//lib/prism/translation/ripper.rb#3295 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3357 def void_stmt?(left, right, allow_newline); end # This method is called when weak warning is produced by the parser. # +fmt+ and +args+ is printf style. # - # source://prism//lib/prism/translation/ripper.rb#3414 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3476 def warn(fmt, *args); end # This method is called when strong warning is produced by the parser. # +fmt+ and +args+ is printf style. # - # source://prism//lib/prism/translation/ripper.rb#3419 + # pkg:gem/prism#lib/prism/translation/ripper.rb:3481 def warning(fmt, *args); end class << self @@ -37575,13 +37515,16 @@ class Prism::Translation::Ripper < ::Prism::Compiler # [[1, 12], :on_sp, " ", END ], # [[1, 13], :on_kw, "end", END ]] # - # source://prism//lib/prism/translation/ripper.rb#72 + # pkg:gem/prism#lib/prism/translation/ripper.rb:71 def lex(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:463 + def lex_state_name(state); end + # Parses the given Ruby program read from +src+. # +src+ must be a String or an IO or a object with a #gets method. # - # source://prism//lib/prism/translation/ripper.rb#46 + # pkg:gem/prism#lib/prism/translation/ripper.rb:45 def parse(src, filename = T.unsafe(nil), lineno = T.unsafe(nil)); end # Parses +src+ and create S-exp tree. @@ -37602,8 +37545,9 @@ class Prism::Translation::Ripper < ::Prism::Compiler # [:paren, [:params, [[:@ident, "a", [1, 6]]], nil, nil, nil, nil, nil, nil]], # [:bodystmt, [[:var_ref, [:@kw, "nil", [1, 9]]]], nil, nil, nil]]]] # - # source://prism//lib/prism/translation/ripper.rb#381 - def sexp(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:393 + sig { params(source: String, filename: String, lineno: Integer, raise_errors: T.untyped).returns(T.untyped) } + def sexp(source, filename = "-", lineno = 1, raise_errors: false); end # Parses +src+ and create S-exp tree. # This method is mainly for developer use. @@ -37628,637 +37572,864 @@ class Prism::Translation::Ripper < ::Prism::Compiler # nil, # nil]]]] # - # source://prism//lib/prism/translation/ripper.rb#416 - def sexp_raw(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end + # pkg:gem/prism#lib/prism/translation/ripper.rb:428 + sig { params(source: String, filename: String, lineno: Integer, raise_errors: T.untyped).returns(T.untyped) } + def sexp_raw(source, filename = "-", lineno = 1, raise_errors: false); end + + # Tokenizes the Ruby program and returns an array of strings. + # The +filename+ and +lineno+ arguments are mostly ignored, since the + # return value is just the tokenized input. + # By default, this method does not handle syntax errors in +src+, + # use the +raise_errors+ keyword to raise a SyntaxError for an error in +src+. + # + # p Ripper.tokenize("def m(a) nil end") + # # => ["def", " ", "m", "(", "a", ")", " ", "nil", " ", "end"] + # + # pkg:gem/prism#lib/prism/translation/ripper.rb:90 + def tokenize(*, **, &); end end end # A list of all of the Ruby binary operators. # -# source://prism//lib/prism/translation/ripper.rb#337 +# pkg:gem/prism#lib/prism/translation/ripper.rb:349 Prism::Translation::Ripper::BINARY_OPERATORS = T.let(T.unsafe(nil), Array) # This array contains name of all ripper events. # -# source://prism//lib/prism/translation/ripper.rb#289 +# pkg:gem/prism#lib/prism/translation/ripper.rb:301 Prism::Translation::Ripper::EVENTS = T.let(T.unsafe(nil), Array) +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 +Prism::Translation::Ripper::EXPR_ARG = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:460 +Prism::Translation::Ripper::EXPR_ARG_ANY = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 +Prism::Translation::Ripper::EXPR_BEG = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:459 +Prism::Translation::Ripper::EXPR_BEG_ANY = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 +Prism::Translation::Ripper::EXPR_CLASS = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 +Prism::Translation::Ripper::EXPR_CMDARG = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 +Prism::Translation::Ripper::EXPR_DOT = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 +Prism::Translation::Ripper::EXPR_END = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 +Prism::Translation::Ripper::EXPR_ENDARG = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 +Prism::Translation::Ripper::EXPR_ENDFN = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:461 +Prism::Translation::Ripper::EXPR_END_ANY = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 +Prism::Translation::Ripper::EXPR_FITEM = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 +Prism::Translation::Ripper::EXPR_FNAME = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 +Prism::Translation::Ripper::EXPR_LABEL = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 +Prism::Translation::Ripper::EXPR_LABELED = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:455 +Prism::Translation::Ripper::EXPR_MID = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:457 +Prism::Translation::Ripper::EXPR_NONE = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper.rb:458 +Prism::Translation::Ripper::EXPR_VALUE = T.let(T.unsafe(nil), Integer) + +# pkg:gem/prism#lib/prism/translation/ripper/filter.rb:6 +class Prism::Translation::Ripper::Filter + # :stopdoc: + # + # pkg:gem/prism#lib/prism/translation/ripper/filter.rb:8 + def initialize(src, filename = T.unsafe(nil), lineno = T.unsafe(nil)); end + + # pkg:gem/prism#lib/prism/translation/ripper/filter.rb:23 + def column; end + + # pkg:gem/prism#lib/prism/translation/ripper/filter.rb:15 + def filename; end + + # pkg:gem/prism#lib/prism/translation/ripper/filter.rb:19 + def lineno; end + + # pkg:gem/prism#lib/prism/translation/ripper/filter.rb:31 + def parse(init = T.unsafe(nil)); end + + # pkg:gem/prism#lib/prism/translation/ripper/filter.rb:27 + def state; end + + private + + # pkg:gem/prism#lib/prism/translation/ripper/filter.rb:46 + def on_default(event, token, data); end +end + # A list of all of the Ruby keywords. # -# source://prism//lib/prism/translation/ripper.rb#292 +# pkg:gem/prism#lib/prism/translation/ripper.rb:304 Prism::Translation::Ripper::KEYWORDS = T.let(T.unsafe(nil), Array) +# Ripper-internal bitflags. +# +# pkg:gem/prism#lib/prism/translation/ripper.rb:449 +Prism::Translation::Ripper::LEX_STATE_NAMES = T.let(T.unsafe(nil), Hash) + +# pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:9 +class Prism::Translation::Ripper::Lexer < ::Prism::Translation::Ripper + # Pretty much just the same as Prism.lex_compat. + # + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:111 + def lex(raise_errors: T.unsafe(nil)); end + + # Returns the lex_compat result wrapped in `Elem`. Errors are omitted. + # Since ripper is a streaming parser, tokens are expected to be emitted in the order + # that the parser encounters them. This is not implemented. + # + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:118 + def parse(*, **, &); end + + # Similar to parse but ripper sorts the elements by position in the source. Also + # includes errors. Since prism does error recovery, in cases of syntax errors + # the result may differ greatly compared to ripper. + # + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:127 + def scan(*, **, &); end +end + +# pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:50 +class Prism::Translation::Ripper::Lexer::Elem + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:53 + def initialize(pos, event, tok, state, message = T.unsafe(nil)); end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:61 + def [](index); end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:51 + def event; end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:51 + def event=(_arg0); end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:78 + def inspect; end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:51 + def message; end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:51 + def message=(_arg0); end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:51 + def pos; end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:51 + def pos=(_arg0); end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:84 + def pretty_print(q); end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:51 + def state; end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:51 + def state=(_arg0); end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:101 + def to_a; end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:82 + def to_s; end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:51 + def tok; end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:51 + def tok=(_arg0); end +end + +# :stopdoc: +# +# pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:11 +class Prism::Translation::Ripper::Lexer::State + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:15 + def initialize(i); end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:36 + def &(i); end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:35 + def ==(i); end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:21 + def [](index); end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:38 + def allbits?(i); end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:39 + def anybits?(i); end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:33 + def inspect; end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:40 + def nobits?(i); end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:34 + def pretty_print(q); end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:32 + def to_i; end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:13 + def to_int; end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:13 + def to_s; end + + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:37 + def |(i); end + + class << self + # pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:45 + def cached(i); end + end +end + +# Instances are frozen and there are only a handful of them so we cache them here. +# +# pkg:gem/prism#lib/prism/translation/ripper/lexer.rb:43 +Prism::Translation::Ripper::Lexer::State::STATES = T.let(T.unsafe(nil), Hash) + # This array contains name of parser events. # -# source://prism//lib/prism/translation/ripper.rb#283 +# pkg:gem/prism#lib/prism/translation/ripper.rb:295 Prism::Translation::Ripper::PARSER_EVENTS = T.let(T.unsafe(nil), Array) # This contains a table of all of the parser events and their # corresponding arity. # -# source://prism//lib/prism/translation/ripper.rb#84 +# pkg:gem/prism#lib/prism/translation/ripper.rb:96 Prism::Translation::Ripper::PARSER_EVENT_TABLE = T.let(T.unsafe(nil), Hash) # This array contains name of scanner events. # -# source://prism//lib/prism/translation/ripper.rb#286 +# pkg:gem/prism#lib/prism/translation/ripper.rb:298 Prism::Translation::Ripper::SCANNER_EVENTS = T.let(T.unsafe(nil), Array) # This contains a table of all of the scanner events and their # corresponding arity. # -# source://prism//lib/prism/translation/ripper.rb#227 +# pkg:gem/prism#lib/prism/translation/ripper.rb:239 Prism::Translation::Ripper::SCANNER_EVENT_TABLE = T.let(T.unsafe(nil), Hash) # This class mirrors the ::Ripper::SexpBuilder subclass of ::Ripper that # returns the arrays of [type, *children]. # -# source://prism//lib/prism/translation/ripper/sexp.rb#10 +# pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:11 class Prism::Translation::Ripper::SexpBuilder < ::Prism::Translation::Ripper # :stopdoc: # - # source://prism//lib/prism/translation/ripper/sexp.rb#13 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:14 def error; end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_BEGIN(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_CHAR(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_END(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on___end__(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_alias(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_alias_error(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_aref(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_aref_field(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_arg_ambiguous(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_arg_paren(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_args_add(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_args_add_block(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_args_add_star(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_args_forward(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_args_new(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_array(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_aryptn(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_assign(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_assign_error(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_assoc_new(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_assoc_splat(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_assoclist_from_args(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_backref(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_backtick(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_bare_assoc_hash(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_begin(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_binary(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_block_var(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_blockarg(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_bodystmt(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_brace_block(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_break(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_call(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_case(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_class(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_class_name_error(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_comma(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_command(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_command_call(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_comment(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_const(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_const_path_field(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_const_path_ref(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_const_ref(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_cvar(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_def(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_defined(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_defs(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_do_block(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_dot2(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_dot3(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_dyna_symbol(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_else(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_elsif(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_embdoc(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_embdoc_beg(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_embdoc_end(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_embexpr_beg(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_embexpr_end(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_embvar(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_ensure(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_excessed_comma(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_fcall(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_field(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_float(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_fndptn(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_for(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_gvar(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_hash(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_heredoc_beg(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_heredoc_end(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_hshptn(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_ident(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_if(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_if_mod(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_ifop(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_ignored_nl(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_ignored_sp(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_imaginary(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_in(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_int(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_ivar(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_kw(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_kwrest_param(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_label(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_label_end(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_lambda(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_lbrace(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_lbracket(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_lparen(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_magic_comment(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_massign(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_method_add_arg(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_method_add_block(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_mlhs_add(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_mlhs_add_post(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_mlhs_add_star(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_mlhs_new(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_mlhs_paren(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_module(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_mrhs_add(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_mrhs_add_star(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_mrhs_new(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_mrhs_new_from_args(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_next(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_nl(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_nokw_param(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_op(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_opassign(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_operator_ambiguous(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_param_error(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_params(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_paren(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_period(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_program(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_qsymbols_add(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_qsymbols_beg(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_qsymbols_new(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_qwords_add(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_qwords_beg(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_qwords_new(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_rational(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_rbrace(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_rbracket(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_redo(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_regexp_add(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_regexp_beg(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_regexp_end(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_regexp_literal(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_regexp_new(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_rescue(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_rescue_mod(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_rest_param(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_retry(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_return(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_return0(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_rparen(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_sclass(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_semicolon(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_sp(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_stmts_add(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_stmts_new(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_string_add(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_string_concat(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_string_content(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_string_dvar(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_string_embexpr(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_string_literal(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_super(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_symbeg(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_symbol(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_symbol_literal(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_symbols_add(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_symbols_beg(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_symbols_new(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_tlambda(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_tlambeg(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_top_const_field(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_top_const_ref(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_tstring_beg(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_tstring_content(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_tstring_end(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_unary(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_undef(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_unless(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_unless_mod(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_until(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_until_mod(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_var_alias(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_var_field(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_var_ref(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_vcall(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_void_stmt(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_when(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_while(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_while_mod(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_word_add(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_word_new(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_words_add(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_words_beg(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_words_new(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:55 def on_words_sep(tok); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_xstring_add(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_xstring_literal(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_xstring_new(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_yield(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_yield0(*args); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_zsuper(*args); end private - # source://prism//lib/prism/translation/ripper/sexp.rb#61 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:67 def compile_error(mesg); end - # source://prism//lib/prism/translation/ripper/sexp.rb#17 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:18 def dedent_element(e, width); end - # source://prism//lib/prism/translation/ripper/sexp.rb#61 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:62 def on_error(mesg); end - # source://prism//lib/prism/translation/ripper/sexp.rb#24 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:25 def on_heredoc_dedent(val, width); end - # source://prism//lib/prism/translation/ripper/sexp.rb#61 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:47 def on_parse_error(mesg); end end @@ -38266,280 +38437,319 @@ end # returns the same values as ::Ripper::SexpBuilder except with a couple of # niceties that flatten linked lists into arrays. # -# source://prism//lib/prism/translation/ripper/sexp.rb#74 +# pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:75 class Prism::Translation::Ripper::SexpBuilderPP < ::Prism::Translation::Ripper::SexpBuilder private - # source://prism//lib/prism/translation/ripper/sexp.rb#92 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:93 def _dispatch_event_new; end - # source://prism//lib/prism/translation/ripper/sexp.rb#96 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:97 def _dispatch_event_push(list, item); end - # source://prism//lib/prism/translation/ripper/sexp.rb#96 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 def on_args_add(list, item); end - # source://prism//lib/prism/translation/ripper/sexp.rb#92 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 def on_args_new; end - # source://prism//lib/prism/translation/ripper/sexp.rb#79 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:80 def on_heredoc_dedent(val, width); end - # source://prism//lib/prism/translation/ripper/sexp.rb#96 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 def on_mlhs_add(list, item); end - # source://prism//lib/prism/translation/ripper/sexp.rb#109 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:110 def on_mlhs_add_post(list, post); end - # source://prism//lib/prism/translation/ripper/sexp.rb#105 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:106 def on_mlhs_add_star(list, star); end - # source://prism//lib/prism/translation/ripper/sexp.rb#92 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 def on_mlhs_new; end - # source://prism//lib/prism/translation/ripper/sexp.rb#101 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:102 def on_mlhs_paren(list); end - # source://prism//lib/prism/translation/ripper/sexp.rb#96 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 def on_mrhs_add(list, item); end - # source://prism//lib/prism/translation/ripper/sexp.rb#92 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 def on_mrhs_new; end - # source://prism//lib/prism/translation/ripper/sexp.rb#96 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 def on_qsymbols_add(list, item); end - # source://prism//lib/prism/translation/ripper/sexp.rb#92 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 def on_qsymbols_new; end - # source://prism//lib/prism/translation/ripper/sexp.rb#96 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 def on_qwords_add(list, item); end - # source://prism//lib/prism/translation/ripper/sexp.rb#92 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 def on_qwords_new; end - # source://prism//lib/prism/translation/ripper/sexp.rb#96 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 def on_regexp_add(list, item); end - # source://prism//lib/prism/translation/ripper/sexp.rb#92 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 def on_regexp_new; end - # source://prism//lib/prism/translation/ripper/sexp.rb#96 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 def on_stmts_add(list, item); end - # source://prism//lib/prism/translation/ripper/sexp.rb#92 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 def on_stmts_new; end - # source://prism//lib/prism/translation/ripper/sexp.rb#96 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 def on_string_add(list, item); end - # source://prism//lib/prism/translation/ripper/sexp.rb#96 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 def on_symbols_add(list, item); end - # source://prism//lib/prism/translation/ripper/sexp.rb#92 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 def on_symbols_new; end - # source://prism//lib/prism/translation/ripper/sexp.rb#96 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 def on_word_add(list, item); end - # source://prism//lib/prism/translation/ripper/sexp.rb#92 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 def on_word_new; end - # source://prism//lib/prism/translation/ripper/sexp.rb#96 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 def on_words_add(list, item); end - # source://prism//lib/prism/translation/ripper/sexp.rb#92 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 def on_words_new; end - # source://prism//lib/prism/translation/ripper/sexp.rb#96 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:118 def on_xstring_add(list, item); end - # source://prism//lib/prism/translation/ripper/sexp.rb#92 + # pkg:gem/prism#lib/prism/translation/ripper/sexp.rb:116 def on_xstring_new; end end # This module is the entry-point for converting a prism syntax tree into the # seattlerb/ruby_parser gem's syntax tree. # -# source://prism//lib/prism/translation/ruby_parser.rb#14 +# pkg:gem/prism#lib/prism/translation/ruby_parser.rb:20 class Prism::Translation::RubyParser # Parse the given source and translate it into the seattlerb/ruby_parser # gem's Sexp format. # - # source://prism//lib/prism/translation/ruby_parser.rb#1608 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1917 def parse(source, filepath = T.unsafe(nil)); end # Parse the given file and translate it into the seattlerb/ruby_parser # gem's Sexp format. # - # source://prism//lib/prism/translation/ruby_parser.rb#1614 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1923 def parse_file(filepath); end + # Parse the give file and translate it into the + # seattlerb/ruby_parser gem's Sexp format. This method is + # provided for API compatibility to RubyParser and takes an + # optional +timeout+ argument. + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1931 + def process(ruby, file = T.unsafe(nil), timeout = T.unsafe(nil)); end + private # Translate the given parse result and filepath into the # seattlerb/ruby_parser gem's Sexp format. # - # source://prism//lib/prism/translation/ruby_parser.rb#1636 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1953 def translate(result, filepath); end class << self # Parse the given source and translate it into the seattlerb/ruby_parser # gem's Sexp format. # - # source://prism//lib/prism/translation/ruby_parser.rb#1621 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1938 def parse(source, filepath = T.unsafe(nil)); end # Parse the given file and translate it into the seattlerb/ruby_parser # gem's Sexp format. # - # source://prism//lib/prism/translation/ruby_parser.rb#1627 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1944 def parse_file(filepath); end end end # A prism visitor that builds Sexp objects. # -# source://prism//lib/prism/translation/ruby_parser.rb#16 +# pkg:gem/prism#lib/prism/translation/ruby_parser.rb:22 class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # Initialize a new compiler with the given file name. # - # @return [Compiler] a new instance of Compiler - # - # source://prism//lib/prism/translation/ruby_parser.rb#31 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:37 def initialize(file, in_def: T.unsafe(nil), in_pattern: T.unsafe(nil)); end # This is the name of the file that we are compiling. We set it on every - # Sexp object that is generated, and also use it to compile __FILE__ + # Sexp object that is generated, and also use it to compile `__FILE__` # nodes. # - # source://prism//lib/prism/translation/ruby_parser.rb#20 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:26 def file; end # Class variables will change their type based on if they are inside of # a method definition or not, so we need to track that state. # - # source://prism//lib/prism/translation/ruby_parser.rb#24 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:30 def in_def; end # Some nodes will change their representation if they are inside of a # pattern, so we need to track that state. # - # source://prism//lib/prism/translation/ruby_parser.rb#28 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:34 def in_pattern; end + # ``` # alias $foo $bar # ^^^^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#45 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:55 def visit_alias_global_variable_node(node); end + # ``` # alias foo bar # ^^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#39 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:47 def visit_alias_method_node(node); end + # ``` # foo => bar | baz # ^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#51 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:63 def visit_alternation_pattern_node(node); end + # ``` # a and b # ^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#57 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:71 def visit_and_node(node); end + # ``` # foo(bar) # ^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#108 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:128 def visit_arguments_node(node); end + # ``` # [] # ^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#75 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:91 def visit_array_node(node); end + # ``` # foo => [bar] # ^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#85 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:103 def visit_array_pattern_node(node); end + # ``` # { a: 1 } # ^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#114 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:136 def visit_assoc_node(node); end + # ``` # def foo(**); bar(**); end # ^^ # # { **foo } # ^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#123 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:147 def visit_assoc_splat_node(node); end + # ``` # $+ # ^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#133 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:159 def visit_back_reference_read_node(node); end + # ``` # begin end # ^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#139 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:167 def visit_begin_node(node); end + # ``` # foo(&bar) # ^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#172 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:202 def visit_block_argument_node(node); end + # ``` # foo { |; bar| } # ^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#180 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:212 def visit_block_local_variable_node(node); end # A block on a keyword or method call. # - # source://prism//lib/prism/translation/ruby_parser.rb#185 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:217 def visit_block_node(node); end + # ``` # def foo(&bar); end # ^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#191 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:225 def visit_block_parameter_node(node); end # A block's parameters. # - # source://prism//lib/prism/translation/ruby_parser.rb#196 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:230 def visit_block_parameters_node(node); end + # ``` # break # ^^^^^ # # break foo # ^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#236 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:272 def visit_break_node(node); end + # ``` # foo.bar &&= baz # ^^^^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#304 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:346 def visit_call_and_write_node(node); end + # ``` # foo # ^^^ # @@ -38548,313 +38758,409 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # # foo.bar() {} # ^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#254 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:292 def visit_call_node(node); end + # ``` # foo.bar += baz # ^^^^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#294 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:334 def visit_call_operator_write_node(node); end + # ``` # foo.bar ||= baz # ^^^^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#314 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:358 def visit_call_or_write_node(node); end + # ``` # foo.bar, = 1 # ^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#337 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:383 def visit_call_target_node(node); end + # ``` # foo => bar => baz # ^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#343 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:391 def visit_capture_pattern_node(node); end + # ``` # case foo; in bar; end # ^^^^^^^^^^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#355 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:407 def visit_case_match_node(node); end + # ``` # case foo; when bar; end # ^^^^^^^^^^^^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#349 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:399 def visit_case_node(node); end + # ``` # class Foo; end # ^^^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#361 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:415 def visit_class_node(node); end + # ``` # @@foo &&= bar # ^^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#402 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:468 def visit_class_variable_and_write_node(node); end + # ``` # @@foo += bar # ^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#396 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:460 def visit_class_variable_operator_write_node(node); end + # ``` # @@foo ||= bar # ^^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#408 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:476 def visit_class_variable_or_write_node(node); end + # ``` # @@foo # ^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#381 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:441 def visit_class_variable_read_node(node); end + # ``` # @@foo, = bar # ^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#414 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:484 def visit_class_variable_target_node(node); end + # ``` # @@foo = 1 # ^^^^^^^^^ # # @@foo, @@bar = 1 # ^^^^^ ^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#390 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:452 def visit_class_variable_write_node(node); end + # ``` # Foo &&= bar # ^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#447 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:525 def visit_constant_and_write_node(node); end + # ``` # Foo += bar # ^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#441 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:517 def visit_constant_operator_write_node(node); end + # ``` # Foo ||= bar # ^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#453 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:533 def visit_constant_or_write_node(node); end + # ``` # Foo::Bar &&= baz # ^^^^^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#490 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:580 def visit_constant_path_and_write_node(node); end + # ``` # Foo::Bar # ^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#465 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:549 def visit_constant_path_node(node); end + # ``` # Foo::Bar += baz # ^^^^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#484 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:572 def visit_constant_path_operator_write_node(node); end + # ``` # Foo::Bar ||= baz # ^^^^^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#496 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:588 def visit_constant_path_or_write_node(node); end + # ``` # Foo::Bar, = baz # ^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#502 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:596 def visit_constant_path_target_node(node); end + # ``` # Foo::Bar = 1 # ^^^^^^^^^^^^ # # Foo::Foo, Bar::Bar = 1 # ^^^^^^^^ ^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#478 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:564 def visit_constant_path_write_node(node); end + # ``` # Foo # ^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#426 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:498 def visit_constant_read_node(node); end + # ``` # Foo, = bar # ^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#459 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:541 def visit_constant_target_node(node); end + # ``` # Foo = 1 # ^^^^^^^ # # Foo, Bar = 1 # ^^^ ^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#435 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:509 def visit_constant_write_node(node); end + # ``` # def foo; end # ^^^^^^^^^^^^ # # def self.foo; end # ^^^^^^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#518 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:614 def visit_def_node(node); end + # ``` # defined? a # ^^^^^^^^^^ # # defined?(a) # ^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#549 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:649 def visit_defined_node(node); end + # ``` # if foo then bar else baz end # ^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#555 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:657 def visit_else_node(node); end + # ``` # "foo #{bar}" # ^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#561 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:665 def visit_embedded_statements_node(node); end + # ``` # "foo #@bar" # ^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#569 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:675 def visit_embedded_variable_node(node); end + # ``` # begin; foo; ensure; bar; end # ^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#575 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:683 def visit_ensure_node(node); end + # ``` # false # ^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#581 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:691 def visit_false_node(node); end + # ``` # foo => [*, bar, *] # ^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#587 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:699 def visit_find_pattern_node(node); end + # ``` # if foo .. bar; end # ^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#593 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:707 def visit_flip_flop_node(node); end + # ``` # 1.0 # ^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#603 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:719 def visit_float_node(node); end + # ``` # for foo in bar do end # ^^^^^^^^^^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#609 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:727 def visit_for_node(node); end + # ``` # def foo(...); bar(...); end # ^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#615 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:735 def visit_forwarding_arguments_node(node); end + # ``` # def foo(...); end # ^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#621 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:743 def visit_forwarding_parameter_node(node); end + # ``` # super # ^^^^^ # # super {} # ^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#630 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:754 def visit_forwarding_super_node(node); end + # ``` # $foo &&= bar # ^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#657 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:789 def visit_global_variable_and_write_node(node); end + # ``` # $foo += bar # ^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#651 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:781 def visit_global_variable_operator_write_node(node); end + # ``` # $foo ||= bar # ^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#663 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:797 def visit_global_variable_or_write_node(node); end + # ``` # $foo # ^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#636 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:762 def visit_global_variable_read_node(node); end + # ``` # $foo, = bar # ^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#669 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:805 def visit_global_variable_target_node(node); end + # ``` # $foo = 1 # ^^^^^^^^ # # $foo, $bar = 1 # ^^^^ ^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#645 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:773 def visit_global_variable_write_node(node); end + # ``` # {} # ^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#675 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:813 def visit_hash_node(node); end + # ``` # foo => {} # ^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#681 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:821 def visit_hash_pattern_node(node); end + # ``` # if foo then bar end # ^^^^^^^^^^^^^^^^^^^ # @@ -38863,441 +39169,574 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # # foo ? bar : baz # ^^^^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#702 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:844 def visit_if_node(node); end # 1i # - # source://prism//lib/prism/translation/ruby_parser.rb#707 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:849 def visit_imaginary_node(node); end + # ``` # { foo: } # ^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#713 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:857 def visit_implicit_node(node); end + # ``` # foo { |bar,| } # ^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#718 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:864 def visit_implicit_rest_node(node); end + # ``` # case foo; in bar; end # ^^^^^^^^^^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#723 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:871 def visit_in_node(node); end + # ``` # foo[bar] &&= baz # ^^^^^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#749 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:901 def visit_index_and_write_node(node); end + # ``` # foo[bar] += baz # ^^^^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#736 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:886 def visit_index_operator_write_node(node); end + # ``` # foo[bar] ||= baz # ^^^^^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#762 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:916 def visit_index_or_write_node(node); end + # ``` # foo[bar], = 1 # ^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#775 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:931 def visit_index_target_node(node); end + # ``` + # @foo &&= bar # ^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#805 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:969 def visit_instance_variable_and_write_node(node); end + # ``` + # @foo += bar # ^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#799 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:961 def visit_instance_variable_operator_write_node(node); end + # ``` + # @foo ||= bar # ^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#811 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:977 def visit_instance_variable_or_write_node(node); end + # ``` + # @foo # ^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#784 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:942 def visit_instance_variable_read_node(node); end + # ``` # @foo, = bar # ^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#817 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:985 def visit_instance_variable_target_node(node); end + # ``` + # @foo = 1 # ^^^^^^^^ # # @foo, @bar = 1 # ^^^^ ^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#793 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:953 def visit_instance_variable_write_node(node); end + # ``` # 1 # ^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#823 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:993 def visit_integer_node(node); end + # ``` # if /foo #{bar}/ then end # ^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#829 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1001 def visit_interpolated_match_last_line_node(node); end + # ``` # /foo #{bar}/ # ^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#846 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1020 def visit_interpolated_regular_expression_node(node); end + # ``` # "foo #{bar}" # ^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#861 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1037 def visit_interpolated_string_node(node); end + # ``` # :"foo #{bar}" # ^^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#868 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1046 def visit_interpolated_symbol_node(node); end + # ``` # `foo #{bar}` # ^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#875 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1055 def visit_interpolated_x_string_node(node); end + # ``` # -> { it } # ^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#956 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1138 def visit_it_local_variable_read_node(node); end + # ``` # foo(bar: baz) # ^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#962 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1146 def visit_keyword_hash_node(node); end + # ``` # def foo(**bar); end # ^^^^^ # # def foo(**); end # ^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#971 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1157 def visit_keyword_rest_parameter_node(node); end # -> {} # - # source://prism//lib/prism/translation/ruby_parser.rb#976 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1162 def visit_lambda_node(node); end + # ``` # foo &&= bar # ^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1019 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1213 def visit_local_variable_and_write_node(node); end + # ``` # foo += bar # ^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1013 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1205 def visit_local_variable_operator_write_node(node); end + # ``` # foo ||= bar # ^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1025 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1221 def visit_local_variable_or_write_node(node); end + # ``` # foo # ^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#994 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1182 def visit_local_variable_read_node(node); end + # ``` # foo, = bar # ^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1031 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1229 def visit_local_variable_target_node(node); end + # ``` # foo = 1 # ^^^^^^^ # # foo, bar = 1 # ^^^ ^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1007 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1197 def visit_local_variable_write_node(node); end + # ``` # if /foo/ then end # ^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1037 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1237 def visit_match_last_line_node(node); end + # ``` # foo in bar # ^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1043 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1245 def visit_match_predicate_node(node); end + # ``` # foo => bar # ^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1049 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1253 def visit_match_required_node(node); end + # ``` # /(?foo)/ =~ bar # ^^^^^^^^^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1055 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1261 def visit_match_write_node(node); end # A node that is missing from the syntax tree. This is only used in the # case of a syntax error. The parser gem doesn't have such a concept, so # we invent our own here. # - # source://prism//lib/prism/translation/ruby_parser.rb#1062 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1268 def visit_missing_node(node); end + # ``` # module Foo; end # ^^^^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1068 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1276 def visit_module_node(node); end + # ``` # foo, bar = baz # ^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1088 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1302 def visit_multi_target_node(node); end + # ``` # foo, bar = baz # ^^^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1098 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1314 def visit_multi_write_node(node); end + # ``` # next # ^^^^ # # next foo # ^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1122 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1340 def visit_next_node(node); end + # ``` # nil # ^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1135 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1355 def visit_nil_node(node); end + # ``` # def foo(**nil); end # ^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1141 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1363 def visit_no_keywords_parameter_node(node); end + # ``` # -> { _1 + _2 } # ^^^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1147 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1371 def visit_numbered_parameters_node(node); end + # ``` # $1 # ^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1153 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1379 def visit_numbered_reference_read_node(node); end + # ``` # def foo(bar: baz); end # ^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1159 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1387 def visit_optional_keyword_parameter_node(node); end + # ``` # def foo(bar = 1); end # ^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1165 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1395 def visit_optional_parameter_node(node); end + # ``` # a or b # ^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1171 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1403 def visit_or_node(node); end + # ``` # def foo(bar, *baz); end # ^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1189 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1423 def visit_parameters_node(node); end + # ``` # () # ^^ # # (1) # ^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1227 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1465 def visit_parentheses_node(node); end + # ``` # foo => ^(bar) # ^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1237 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1477 def visit_pinned_expression_node(node); end + # ``` # foo = 1 and bar => ^foo # ^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1243 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1485 def visit_pinned_variable_node(node); end # END {} # - # source://prism//lib/prism/translation/ruby_parser.rb#1252 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1494 def visit_post_execution_node(node); end # BEGIN {} # - # source://prism//lib/prism/translation/ruby_parser.rb#1257 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1499 def visit_pre_execution_node(node); end # The top-level program node. # - # source://prism//lib/prism/translation/ruby_parser.rb#1262 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1504 def visit_program_node(node); end + # ``` # 0..5 # ^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1268 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1512 def visit_range_node(node); end + # ``` # 1r # ^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1290 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1536 def visit_rational_node(node); end + # ``` # redo # ^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1296 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1544 def visit_redo_node(node); end + # ``` # /foo/ # ^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1302 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1552 def visit_regular_expression_node(node); end + # ``` # def foo(bar:); end # ^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1308 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1560 def visit_required_keyword_parameter_node(node); end + # ``` # def foo(bar); end # ^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1314 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1568 def visit_required_parameter_node(node); end + # ``` # foo rescue bar # ^^^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1320 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1576 def visit_rescue_modifier_node(node); end + # ``` # begin; rescue; end # ^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1326 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1584 def visit_rescue_node(node); end + # ``` # def foo(*bar); end # ^^^^ # # def foo(*); end # ^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1346 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1606 def visit_rest_parameter_node(node); end + # ``` # retry # ^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1352 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1614 def visit_retry_node(node); end + # ``` # return # ^^^^^^ # # return 1 # ^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1361 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1625 def visit_return_node(node); end + # ``` # self # ^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1374 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1640 def visit_self_node(node); end # A shareable constant. # - # source://prism//lib/prism/translation/ruby_parser.rb#1379 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1645 def visit_shareable_constant_node(node); end + # ``` # class << self; end # ^^^^^^^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1385 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1653 def visit_singleton_class_node(node); end + # ``` # __ENCODING__ # ^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1393 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1663 def visit_source_encoding_node(node); end + # ``` # __FILE__ # ^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1400 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1672 def visit_source_file_node(node); end + # ``` # __LINE__ # ^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1406 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1680 def visit_source_line_node(node); end + # ``` # foo(*bar) # ^^^^ # @@ -39306,159 +39745,187 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # # def foo(*); bar(*); end # ^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1418 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1694 def visit_splat_node(node); end # A list of statements. # - # source://prism//lib/prism/translation/ruby_parser.rb#1427 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1703 def visit_statements_node(node); end + # ``` # "foo" # ^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1439 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1717 def visit_string_node(node); end + # ``` # super(foo) # ^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1452 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1732 def visit_super_node(node); end + # ``` # :foo # ^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1466 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1748 def visit_symbol_node(node); end + # ``` # true # ^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1472 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1756 def visit_true_node(node); end + # ``` # undef foo # ^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1478 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1764 def visit_undef_node(node); end + # ``` # unless foo; bar end # ^^^^^^^^^^^^^^^^^^^ # # bar unless foo # ^^^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1488 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1776 def visit_unless_node(node); end + # ``` # until foo; bar end # ^^^^^^^^^^^^^^^^^ # # bar until foo # ^^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1497 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1787 def visit_until_node(node); end + # ``` # case foo; when bar; end # ^^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1503 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1795 def visit_when_node(node); end + # ``` # while foo; bar end # ^^^^^^^^^^^^^^^^^^ # # bar while foo # ^^^^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1512 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1806 def visit_while_node(node); end + # ``` # `foo` # ^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1518 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1814 def visit_x_string_node(node); end + # ``` # yield # ^^^^^ # # yield 1 # ^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1534 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1832 def visit_yield_node(node); end private + # Attach prism comments to the given sexp. + # + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1839 + def attach_comments(sexp, node); end + # If a class variable is written within a method definition, it has a # different type than everywhere else. # - # source://prism//lib/prism/translation/ruby_parser.rb#420 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:490 def class_variable_write_type; end # Create a new compiler with the given options. # - # source://prism//lib/prism/translation/ruby_parser.rb#1541 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1850 def copy_compiler(in_def: T.unsafe(nil), in_pattern: T.unsafe(nil)); end # Call nodes with operators following them will either be op_asgn or # op_asgn2 nodes. That is determined by their call operator and their # right-hand side. # - # @return [Boolean] - # - # source://prism//lib/prism/translation/ruby_parser.rb#325 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:369 def op_asgn?(node); end # Call nodes with operators following them can use &. as an operator, # which changes their type by prefixing "safe_". # - # source://prism//lib/prism/translation/ruby_parser.rb#331 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:375 def op_asgn_type(node, type); end # Create a new Sexp object from the given prism node and arguments. # - # source://prism//lib/prism/translation/ruby_parser.rb#1546 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1855 def s(node, *arguments); end # Visit a block node, which will modify the AST by wrapping the given # visited node in an iter node. # - # source://prism//lib/prism/translation/ruby_parser.rb#1556 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1865 def visit_block(node, sexp, block); end + # ``` # def foo((bar, baz)); end # ^^^^^^^^^^ + # ``` # - # source://prism//lib/prism/translation/ruby_parser.rb#1204 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1440 def visit_destructured_parameter(node); end # Visit the interpolated content of the string-like node. # - # source://prism//lib/prism/translation/ruby_parser.rb#882 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1062 def visit_interpolated_parts(parts); end # Pattern constants get wrapped in another layer of :const. # - # source://prism//lib/prism/translation/ruby_parser.rb#1577 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1886 def visit_pattern_constant(node); end # If the bounds of a range node are empty parentheses, then they do not # get replaced by their usual s(:nil), but instead are s(:begin). # - # source://prism//lib/prism/translation/ruby_parser.rb#1280 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1524 def visit_range_bounds_node(node); end # Visit the value of a write, which will be on the right-hand side of # a write operator. Because implicit arrays can have splats, those could # potentially be wrapped in an svalue node. # - # source://prism//lib/prism/translation/ruby_parser.rb#1591 + # pkg:gem/prism#lib/prism/translation/ruby_parser.rb:1900 def visit_write_value(node); end end @@ -39467,84 +39934,86 @@ end # true # ^^^^ # -# source://prism//lib/prism/node.rb#17368 +# pkg:gem/prism#lib/prism/node.rb:18630 class Prism::TrueNode < ::Prism::Node # Initialize a new TrueNode node. # - # @return [TrueNode] a new instance of TrueNode - # - # source://prism//lib/prism/node.rb#17370 + # pkg:gem/prism#lib/prism/node.rb:18632 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17427 + # pkg:gem/prism#lib/prism/node.rb:18695 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17378 + # pkg:gem/prism#lib/prism/node.rb:18640 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17383 + # pkg:gem/prism#lib/prism/node.rb:18645 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17393 + # pkg:gem/prism#lib/prism/node.rb:18661 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17388 + # pkg:gem/prism#lib/prism/node.rb:18656 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> TrueNode # - # source://prism//lib/prism/node.rb#17398 + # pkg:gem/prism#lib/prism/node.rb:18666 sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::TrueNode) } - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17383 + # pkg:gem/prism#lib/prism/node.rb:18671 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#17406 + # pkg:gem/prism#lib/prism/node.rb:18674 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:18650 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#17411 + # pkg:gem/prism#lib/prism/node.rb:18679 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17416 + # pkg:gem/prism#lib/prism/node.rb:18684 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#17421 + # pkg:gem/prism#lib/prism/node.rb:18689 def type; end end end @@ -39554,13 +40023,11 @@ end # undef :foo, :bar, :baz # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#17436 +# pkg:gem/prism#lib/prism/node.rb:18704 class Prism::UndefNode < ::Prism::Node # Initialize a new UndefNode node. # - # @return [UndefNode] a new instance of UndefNode - # - # source://prism//lib/prism/node.rb#17438 + # pkg:gem/prism#lib/prism/node.rb:18706 sig do params( source: Prism::Source, @@ -39576,36 +40043,36 @@ class Prism::UndefNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17518 + # pkg:gem/prism#lib/prism/node.rb:18793 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17448 + # pkg:gem/prism#lib/prism/node.rb:18716 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17453 + # pkg:gem/prism#lib/prism/node.rb:18721 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17463 + # pkg:gem/prism#lib/prism/node.rb:18738 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17458 + # pkg:gem/prism#lib/prism/node.rb:18733 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?names: Array[SymbolNode | InterpolatedSymbolNode], ?keyword_loc: Location) -> UndefNode # - # source://prism//lib/prism/node.rb#17468 + # pkg:gem/prism#lib/prism/node.rb:18743 sig do params( node_id: Integer, @@ -39615,64 +40082,68 @@ class Prism::UndefNode < ::Prism::Node keyword_loc: Prism::Location ).returns(Prism::UndefNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), names: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, names: self.names, keyword_loc: self.keyword_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17453 + # pkg:gem/prism#lib/prism/node.rb:18748 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, names: Array[SymbolNode | InterpolatedSymbolNode], keyword_loc: Location } # - # source://prism//lib/prism/node.rb#17476 + # pkg:gem/prism#lib/prism/node.rb:18751 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:18726 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#17502 + # pkg:gem/prism#lib/prism/node.rb:18777 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#17497 + # pkg:gem/prism#lib/prism/node.rb:18772 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#17484 + # pkg:gem/prism#lib/prism/node.rb:18759 sig { returns(Prism::Location) } def keyword_loc; end # attr_reader names: Array[SymbolNode | InterpolatedSymbolNode] # - # source://prism//lib/prism/node.rb#17481 + # pkg:gem/prism#lib/prism/node.rb:18756 sig { returns(T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)]) } def names; end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#17492 + # pkg:gem/prism#lib/prism/node.rb:18767 def save_keyword_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17507 + # pkg:gem/prism#lib/prism/node.rb:18782 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#17512 + # pkg:gem/prism#lib/prism/node.rb:18787 def type; end end end @@ -39685,13 +40156,11 @@ end # unless foo then bar end # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#17533 +# pkg:gem/prism#lib/prism/node.rb:18808 class Prism::UnlessNode < ::Prism::Node # Initialize a new UnlessNode node. # - # @return [UnlessNode] a new instance of UnlessNode - # - # source://prism//lib/prism/node.rb#17535 + # pkg:gem/prism#lib/prism/node.rb:18810 sig do params( source: Prism::Source, @@ -39711,42 +40180,42 @@ class Prism::UnlessNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17702 + # pkg:gem/prism#lib/prism/node.rb:18986 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17549 + # pkg:gem/prism#lib/prism/node.rb:18824 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17554 + # pkg:gem/prism#lib/prism/node.rb:18829 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17568 + # pkg:gem/prism#lib/prism/node.rb:18852 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17559 + # pkg:gem/prism#lib/prism/node.rb:18843 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # Returns the else clause of the unless node. This method is deprecated in # favor of #else_clause. # - # source://prism//lib/prism/node_ext.rb#503 + # pkg:gem/prism#lib/prism/node_ext.rb:506 def consequent; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?predicate: Prism::node, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?else_clause: ElseNode?, ?end_keyword_loc: Location?) -> UnlessNode # - # source://prism//lib/prism/node.rb#17573 + # pkg:gem/prism#lib/prism/node.rb:18857 sig do params( node_id: Integer, @@ -39760,33 +40229,37 @@ class Prism::UnlessNode < ::Prism::Node end_keyword_loc: T.nilable(Prism::Location) ).returns(Prism::UnlessNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), else_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, keyword_loc: self.keyword_loc, predicate: self.predicate, then_keyword_loc: self.then_keyword_loc, statements: self.statements, else_clause: self.else_clause, end_keyword_loc: self.end_keyword_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17554 + # pkg:gem/prism#lib/prism/node.rb:18862 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, else_clause: ElseNode?, end_keyword_loc: Location? } # - # source://prism//lib/prism/node.rb#17581 + # pkg:gem/prism#lib/prism/node.rb:18865 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:18834 + def each_child_node; end + # The else clause of the unless expression, if present. # # unless cond then bar else baz end # ^^^^^^^^ # - # source://prism//lib/prism/node.rb#17646 + # pkg:gem/prism#lib/prism/node.rb:18930 sig { returns(T.nilable(Prism::ElseNode)) } def else_clause; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#17681 + # pkg:gem/prism#lib/prism/node.rb:18965 sig { returns(T.nilable(String)) } def end_keyword; end @@ -39795,7 +40268,7 @@ class Prism::UnlessNode < ::Prism::Node # unless cond then bar end # ^^^ # - # source://prism//lib/prism/node.rb#17652 + # pkg:gem/prism#lib/prism/node.rb:18936 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end @@ -39804,13 +40277,13 @@ class Prism::UnlessNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17686 + # pkg:gem/prism#lib/prism/node.rb:18970 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#17671 + # pkg:gem/prism#lib/prism/node.rb:18955 sig { returns(String) } def keyword; end @@ -39822,11 +40295,11 @@ class Prism::UnlessNode < ::Prism::Node # bar unless cond # ^^^^^^ # - # source://prism//lib/prism/node.rb#17592 + # pkg:gem/prism#lib/prism/node.rb:18876 sig { returns(Prism::Location) } def keyword_loc; end - # source://prism//lib/prism/parse_result/newlines.rb#97 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:98 def newline_flag!(lines); end # The condition to be evaluated for the unless expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). @@ -39837,26 +40310,26 @@ class Prism::UnlessNode < ::Prism::Node # bar unless cond # ^^^^ # - # source://prism//lib/prism/node.rb#17611 + # pkg:gem/prism#lib/prism/node.rb:18895 sig { returns(Prism::Node) } def predicate; end # Save the end_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#17666 + # pkg:gem/prism#lib/prism/node.rb:18950 def save_end_keyword_loc(repository); end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#17600 + # pkg:gem/prism#lib/prism/node.rb:18884 def save_keyword_loc(repository); end # Save the then_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#17631 + # pkg:gem/prism#lib/prism/node.rb:18915 def save_then_keyword_loc(repository); end # The body of statements that will executed if the unless condition is @@ -39865,13 +40338,13 @@ class Prism::UnlessNode < ::Prism::Node # unless cond then bar end # ^^^ # - # source://prism//lib/prism/node.rb#17640 + # pkg:gem/prism#lib/prism/node.rb:18924 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then_keyword: () -> String? # - # source://prism//lib/prism/node.rb#17676 + # pkg:gem/prism#lib/prism/node.rb:18960 sig { returns(T.nilable(String)) } def then_keyword; end @@ -39880,20 +40353,20 @@ class Prism::UnlessNode < ::Prism::Node # unless cond then bar end # ^^^^ # - # source://prism//lib/prism/node.rb#17617 + # pkg:gem/prism#lib/prism/node.rb:18901 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17691 + # pkg:gem/prism#lib/prism/node.rb:18975 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#17696 + # pkg:gem/prism#lib/prism/node.rb:18980 def type; end end end @@ -39906,13 +40379,11 @@ end # until foo do bar end # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#17720 +# pkg:gem/prism#lib/prism/node.rb:19004 class Prism::UntilNode < ::Prism::Node # Initialize a new UntilNode node. # - # @return [UntilNode] a new instance of UntilNode - # - # source://prism//lib/prism/node.rb#17722 + # pkg:gem/prism#lib/prism/node.rb:19006 sig do params( source: Prism::Source, @@ -39931,56 +40402,54 @@ class Prism::UntilNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17864 + # pkg:gem/prism#lib/prism/node.rb:19156 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17735 + # pkg:gem/prism#lib/prism/node.rb:19019 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def begin_modifier?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#17771 + # pkg:gem/prism#lib/prism/node.rb:19063 sig { returns(T::Boolean) } def begin_modifier?; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17740 + # pkg:gem/prism#lib/prism/node.rb:19024 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#17843 + # pkg:gem/prism#lib/prism/node.rb:19135 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#17808 + # pkg:gem/prism#lib/prism/node.rb:19100 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17753 + # pkg:gem/prism#lib/prism/node.rb:19045 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17745 + # pkg:gem/prism#lib/prism/node.rb:19037 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?do_keyword_loc: Location?, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?) -> UntilNode # - # source://prism//lib/prism/node.rb#17758 + # pkg:gem/prism#lib/prism/node.rb:19050 sig do params( node_id: Integer, @@ -39993,97 +40462,101 @@ class Prism::UntilNode < ::Prism::Node statements: T.nilable(Prism::StatementsNode) ).returns(Prism::UntilNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), do_keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, keyword_loc: self.keyword_loc, do_keyword_loc: self.do_keyword_loc, closing_loc: self.closing_loc, predicate: self.predicate, statements: self.statements); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17740 + # pkg:gem/prism#lib/prism/node.rb:19055 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, do_keyword_loc: Location?, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode? } # - # source://prism//lib/prism/node.rb#17766 + # pkg:gem/prism#lib/prism/node.rb:19058 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def do_keyword: () -> String? # - # source://prism//lib/prism/node.rb#17838 + # pkg:gem/prism#lib/prism/node.rb:19130 sig { returns(T.nilable(String)) } def do_keyword; end # attr_reader do_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#17789 + # pkg:gem/prism#lib/prism/node.rb:19081 sig { returns(T.nilable(Prism::Location)) } def do_keyword_loc; end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:19029 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#17848 + # pkg:gem/prism#lib/prism/node.rb:19140 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#17833 + # pkg:gem/prism#lib/prism/node.rb:19125 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#17776 + # pkg:gem/prism#lib/prism/node.rb:19068 sig { returns(Prism::Location) } def keyword_loc; end - # source://prism//lib/prism/parse_result/newlines.rb#103 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:104 def newline_flag!(lines); end # attr_reader predicate: Prism::node # - # source://prism//lib/prism/node.rb#17827 + # pkg:gem/prism#lib/prism/node.rb:19119 sig { returns(Prism::Node) } def predicate; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#17822 + # pkg:gem/prism#lib/prism/node.rb:19114 def save_closing_loc(repository); end # Save the do_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#17803 + # pkg:gem/prism#lib/prism/node.rb:19095 def save_do_keyword_loc(repository); end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#17784 + # pkg:gem/prism#lib/prism/node.rb:19076 def save_keyword_loc(repository); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#17830 + # pkg:gem/prism#lib/prism/node.rb:19122 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17853 + # pkg:gem/prism#lib/prism/node.rb:19145 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#17858 + # pkg:gem/prism#lib/prism/node.rb:19150 def type; end end end @@ -40101,7 +40574,7 @@ Prism::VERSION = T.let(T.unsafe(nil), String) # # class FooCalls < Prism::Visitor # def visit_call_node(node) -# if node.name == "foo" +# if node.name == :foo # # Do something with the node # end # @@ -40110,911 +40583,911 @@ Prism::VERSION = T.let(T.unsafe(nil), String) # end # end # -# source://prism//lib/prism/visitor.rb#54 +# pkg:gem/prism#lib/prism/visitor.rb:57 class Prism::Visitor < ::Prism::BasicVisitor # Visit a AliasGlobalVariableNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:59 sig { params(node: Prism::AliasGlobalVariableNode).void } def visit_alias_global_variable_node(node); end # Visit a AliasMethodNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:64 sig { params(node: Prism::AliasMethodNode).void } def visit_alias_method_node(node); end # Visit a AlternationPatternNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:69 sig { params(node: Prism::AlternationPatternNode).void } def visit_alternation_pattern_node(node); end # Visit a AndNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:74 sig { params(node: Prism::AndNode).void } def visit_and_node(node); end # Visit a ArgumentsNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:79 sig { params(node: Prism::ArgumentsNode).void } def visit_arguments_node(node); end # Visit a ArrayNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:84 sig { params(node: Prism::ArrayNode).void } def visit_array_node(node); end # Visit a ArrayPatternNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:89 sig { params(node: Prism::ArrayPatternNode).void } def visit_array_pattern_node(node); end # Visit a AssocNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:94 sig { params(node: Prism::AssocNode).void } def visit_assoc_node(node); end # Visit a AssocSplatNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:99 sig { params(node: Prism::AssocSplatNode).void } def visit_assoc_splat_node(node); end # Visit a BackReferenceReadNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:104 sig { params(node: Prism::BackReferenceReadNode).void } def visit_back_reference_read_node(node); end # Visit a BeginNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:109 sig { params(node: Prism::BeginNode).void } def visit_begin_node(node); end # Visit a BlockArgumentNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:114 sig { params(node: Prism::BlockArgumentNode).void } def visit_block_argument_node(node); end # Visit a BlockLocalVariableNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:119 sig { params(node: Prism::BlockLocalVariableNode).void } def visit_block_local_variable_node(node); end # Visit a BlockNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:124 sig { params(node: Prism::BlockNode).void } def visit_block_node(node); end # Visit a BlockParameterNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:129 sig { params(node: Prism::BlockParameterNode).void } def visit_block_parameter_node(node); end # Visit a BlockParametersNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:134 sig { params(node: Prism::BlockParametersNode).void } def visit_block_parameters_node(node); end # Visit a BreakNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:139 sig { params(node: Prism::BreakNode).void } def visit_break_node(node); end # Visit a CallAndWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:144 sig { params(node: Prism::CallAndWriteNode).void } def visit_call_and_write_node(node); end # Visit a CallNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:149 sig { params(node: Prism::CallNode).void } def visit_call_node(node); end # Visit a CallOperatorWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:154 sig { params(node: Prism::CallOperatorWriteNode).void } def visit_call_operator_write_node(node); end # Visit a CallOrWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:159 sig { params(node: Prism::CallOrWriteNode).void } def visit_call_or_write_node(node); end # Visit a CallTargetNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:164 sig { params(node: Prism::CallTargetNode).void } def visit_call_target_node(node); end # Visit a CapturePatternNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:169 sig { params(node: Prism::CapturePatternNode).void } def visit_capture_pattern_node(node); end # Visit a CaseMatchNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:174 sig { params(node: Prism::CaseMatchNode).void } def visit_case_match_node(node); end # Visit a CaseNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:179 sig { params(node: Prism::CaseNode).void } def visit_case_node(node); end # Visit a ClassNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:184 sig { params(node: Prism::ClassNode).void } def visit_class_node(node); end # Visit a ClassVariableAndWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:189 sig { params(node: Prism::ClassVariableAndWriteNode).void } def visit_class_variable_and_write_node(node); end # Visit a ClassVariableOperatorWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:194 sig { params(node: Prism::ClassVariableOperatorWriteNode).void } def visit_class_variable_operator_write_node(node); end # Visit a ClassVariableOrWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:199 sig { params(node: Prism::ClassVariableOrWriteNode).void } def visit_class_variable_or_write_node(node); end # Visit a ClassVariableReadNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:204 sig { params(node: Prism::ClassVariableReadNode).void } def visit_class_variable_read_node(node); end # Visit a ClassVariableTargetNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:209 sig { params(node: Prism::ClassVariableTargetNode).void } def visit_class_variable_target_node(node); end # Visit a ClassVariableWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:214 sig { params(node: Prism::ClassVariableWriteNode).void } def visit_class_variable_write_node(node); end # Visit a ConstantAndWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:219 sig { params(node: Prism::ConstantAndWriteNode).void } def visit_constant_and_write_node(node); end # Visit a ConstantOperatorWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:224 sig { params(node: Prism::ConstantOperatorWriteNode).void } def visit_constant_operator_write_node(node); end # Visit a ConstantOrWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:229 sig { params(node: Prism::ConstantOrWriteNode).void } def visit_constant_or_write_node(node); end # Visit a ConstantPathAndWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:234 sig { params(node: Prism::ConstantPathAndWriteNode).void } def visit_constant_path_and_write_node(node); end # Visit a ConstantPathNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:239 sig { params(node: Prism::ConstantPathNode).void } def visit_constant_path_node(node); end # Visit a ConstantPathOperatorWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:244 sig { params(node: Prism::ConstantPathOperatorWriteNode).void } def visit_constant_path_operator_write_node(node); end # Visit a ConstantPathOrWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:249 sig { params(node: Prism::ConstantPathOrWriteNode).void } def visit_constant_path_or_write_node(node); end # Visit a ConstantPathTargetNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:254 sig { params(node: Prism::ConstantPathTargetNode).void } def visit_constant_path_target_node(node); end # Visit a ConstantPathWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:259 sig { params(node: Prism::ConstantPathWriteNode).void } def visit_constant_path_write_node(node); end # Visit a ConstantReadNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:264 sig { params(node: Prism::ConstantReadNode).void } def visit_constant_read_node(node); end # Visit a ConstantTargetNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:269 sig { params(node: Prism::ConstantTargetNode).void } def visit_constant_target_node(node); end # Visit a ConstantWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:274 sig { params(node: Prism::ConstantWriteNode).void } def visit_constant_write_node(node); end # Visit a DefNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:279 sig { params(node: Prism::DefNode).void } def visit_def_node(node); end # Visit a DefinedNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:284 sig { params(node: Prism::DefinedNode).void } def visit_defined_node(node); end # Visit a ElseNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:289 sig { params(node: Prism::ElseNode).void } def visit_else_node(node); end # Visit a EmbeddedStatementsNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:294 sig { params(node: Prism::EmbeddedStatementsNode).void } def visit_embedded_statements_node(node); end # Visit a EmbeddedVariableNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:299 sig { params(node: Prism::EmbeddedVariableNode).void } def visit_embedded_variable_node(node); end # Visit a EnsureNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:304 sig { params(node: Prism::EnsureNode).void } def visit_ensure_node(node); end # Visit a FalseNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:309 sig { params(node: Prism::FalseNode).void } def visit_false_node(node); end # Visit a FindPatternNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:314 sig { params(node: Prism::FindPatternNode).void } def visit_find_pattern_node(node); end # Visit a FlipFlopNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:319 sig { params(node: Prism::FlipFlopNode).void } def visit_flip_flop_node(node); end # Visit a FloatNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:324 sig { params(node: Prism::FloatNode).void } def visit_float_node(node); end # Visit a ForNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:329 sig { params(node: Prism::ForNode).void } def visit_for_node(node); end # Visit a ForwardingArgumentsNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:334 sig { params(node: Prism::ForwardingArgumentsNode).void } def visit_forwarding_arguments_node(node); end # Visit a ForwardingParameterNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:339 sig { params(node: Prism::ForwardingParameterNode).void } def visit_forwarding_parameter_node(node); end # Visit a ForwardingSuperNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:344 sig { params(node: Prism::ForwardingSuperNode).void } def visit_forwarding_super_node(node); end # Visit a GlobalVariableAndWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:349 sig { params(node: Prism::GlobalVariableAndWriteNode).void } def visit_global_variable_and_write_node(node); end # Visit a GlobalVariableOperatorWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:354 sig { params(node: Prism::GlobalVariableOperatorWriteNode).void } def visit_global_variable_operator_write_node(node); end # Visit a GlobalVariableOrWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:359 sig { params(node: Prism::GlobalVariableOrWriteNode).void } def visit_global_variable_or_write_node(node); end # Visit a GlobalVariableReadNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:364 sig { params(node: Prism::GlobalVariableReadNode).void } def visit_global_variable_read_node(node); end # Visit a GlobalVariableTargetNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:369 sig { params(node: Prism::GlobalVariableTargetNode).void } def visit_global_variable_target_node(node); end # Visit a GlobalVariableWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:374 sig { params(node: Prism::GlobalVariableWriteNode).void } def visit_global_variable_write_node(node); end # Visit a HashNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:379 sig { params(node: Prism::HashNode).void } def visit_hash_node(node); end # Visit a HashPatternNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:384 sig { params(node: Prism::HashPatternNode).void } def visit_hash_pattern_node(node); end # Visit a IfNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:389 sig { params(node: Prism::IfNode).void } def visit_if_node(node); end # Visit a ImaginaryNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:394 sig { params(node: Prism::ImaginaryNode).void } def visit_imaginary_node(node); end # Visit a ImplicitNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:399 sig { params(node: Prism::ImplicitNode).void } def visit_implicit_node(node); end # Visit a ImplicitRestNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:404 sig { params(node: Prism::ImplicitRestNode).void } def visit_implicit_rest_node(node); end # Visit a InNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:409 sig { params(node: Prism::InNode).void } def visit_in_node(node); end # Visit a IndexAndWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:414 sig { params(node: Prism::IndexAndWriteNode).void } def visit_index_and_write_node(node); end # Visit a IndexOperatorWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:419 sig { params(node: Prism::IndexOperatorWriteNode).void } def visit_index_operator_write_node(node); end # Visit a IndexOrWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:424 sig { params(node: Prism::IndexOrWriteNode).void } def visit_index_or_write_node(node); end # Visit a IndexTargetNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:429 sig { params(node: Prism::IndexTargetNode).void } def visit_index_target_node(node); end # Visit a InstanceVariableAndWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:434 sig { params(node: Prism::InstanceVariableAndWriteNode).void } def visit_instance_variable_and_write_node(node); end # Visit a InstanceVariableOperatorWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:439 sig { params(node: Prism::InstanceVariableOperatorWriteNode).void } def visit_instance_variable_operator_write_node(node); end # Visit a InstanceVariableOrWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:444 sig { params(node: Prism::InstanceVariableOrWriteNode).void } def visit_instance_variable_or_write_node(node); end # Visit a InstanceVariableReadNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:449 sig { params(node: Prism::InstanceVariableReadNode).void } def visit_instance_variable_read_node(node); end # Visit a InstanceVariableTargetNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:454 sig { params(node: Prism::InstanceVariableTargetNode).void } def visit_instance_variable_target_node(node); end # Visit a InstanceVariableWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:459 sig { params(node: Prism::InstanceVariableWriteNode).void } def visit_instance_variable_write_node(node); end # Visit a IntegerNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:464 sig { params(node: Prism::IntegerNode).void } def visit_integer_node(node); end # Visit a InterpolatedMatchLastLineNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:469 sig { params(node: Prism::InterpolatedMatchLastLineNode).void } def visit_interpolated_match_last_line_node(node); end # Visit a InterpolatedRegularExpressionNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:474 sig { params(node: Prism::InterpolatedRegularExpressionNode).void } def visit_interpolated_regular_expression_node(node); end # Visit a InterpolatedStringNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:479 sig { params(node: Prism::InterpolatedStringNode).void } def visit_interpolated_string_node(node); end # Visit a InterpolatedSymbolNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:484 sig { params(node: Prism::InterpolatedSymbolNode).void } def visit_interpolated_symbol_node(node); end # Visit a InterpolatedXStringNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:489 sig { params(node: Prism::InterpolatedXStringNode).void } def visit_interpolated_x_string_node(node); end # Visit a ItLocalVariableReadNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:494 sig { params(node: Prism::ItLocalVariableReadNode).void } def visit_it_local_variable_read_node(node); end # Visit a ItParametersNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:499 sig { params(node: Prism::ItParametersNode).void } def visit_it_parameters_node(node); end # Visit a KeywordHashNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:504 sig { params(node: Prism::KeywordHashNode).void } def visit_keyword_hash_node(node); end # Visit a KeywordRestParameterNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:509 sig { params(node: Prism::KeywordRestParameterNode).void } def visit_keyword_rest_parameter_node(node); end # Visit a LambdaNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:514 sig { params(node: Prism::LambdaNode).void } def visit_lambda_node(node); end # Visit a LocalVariableAndWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:519 sig { params(node: Prism::LocalVariableAndWriteNode).void } def visit_local_variable_and_write_node(node); end # Visit a LocalVariableOperatorWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:524 sig { params(node: Prism::LocalVariableOperatorWriteNode).void } def visit_local_variable_operator_write_node(node); end # Visit a LocalVariableOrWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:529 sig { params(node: Prism::LocalVariableOrWriteNode).void } def visit_local_variable_or_write_node(node); end # Visit a LocalVariableReadNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:534 sig { params(node: Prism::LocalVariableReadNode).void } def visit_local_variable_read_node(node); end # Visit a LocalVariableTargetNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:539 sig { params(node: Prism::LocalVariableTargetNode).void } def visit_local_variable_target_node(node); end # Visit a LocalVariableWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:544 sig { params(node: Prism::LocalVariableWriteNode).void } def visit_local_variable_write_node(node); end # Visit a MatchLastLineNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:549 sig { params(node: Prism::MatchLastLineNode).void } def visit_match_last_line_node(node); end # Visit a MatchPredicateNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:554 sig { params(node: Prism::MatchPredicateNode).void } def visit_match_predicate_node(node); end # Visit a MatchRequiredNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:559 sig { params(node: Prism::MatchRequiredNode).void } def visit_match_required_node(node); end # Visit a MatchWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:564 sig { params(node: Prism::MatchWriteNode).void } def visit_match_write_node(node); end # Visit a MissingNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:569 sig { params(node: Prism::MissingNode).void } def visit_missing_node(node); end # Visit a ModuleNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:574 sig { params(node: Prism::ModuleNode).void } def visit_module_node(node); end # Visit a MultiTargetNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:579 sig { params(node: Prism::MultiTargetNode).void } def visit_multi_target_node(node); end # Visit a MultiWriteNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:584 sig { params(node: Prism::MultiWriteNode).void } def visit_multi_write_node(node); end # Visit a NextNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:589 sig { params(node: Prism::NextNode).void } def visit_next_node(node); end # Visit a NilNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:594 sig { params(node: Prism::NilNode).void } def visit_nil_node(node); end # Visit a NoKeywordsParameterNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:599 sig { params(node: Prism::NoKeywordsParameterNode).void } def visit_no_keywords_parameter_node(node); end # Visit a NumberedParametersNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:604 sig { params(node: Prism::NumberedParametersNode).void } def visit_numbered_parameters_node(node); end # Visit a NumberedReferenceReadNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:609 sig { params(node: Prism::NumberedReferenceReadNode).void } def visit_numbered_reference_read_node(node); end # Visit a OptionalKeywordParameterNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:614 sig { params(node: Prism::OptionalKeywordParameterNode).void } def visit_optional_keyword_parameter_node(node); end # Visit a OptionalParameterNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:619 sig { params(node: Prism::OptionalParameterNode).void } def visit_optional_parameter_node(node); end # Visit a OrNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:624 sig { params(node: Prism::OrNode).void } def visit_or_node(node); end # Visit a ParametersNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:629 sig { params(node: Prism::ParametersNode).void } def visit_parameters_node(node); end # Visit a ParenthesesNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:634 sig { params(node: Prism::ParenthesesNode).void } def visit_parentheses_node(node); end # Visit a PinnedExpressionNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:639 sig { params(node: Prism::PinnedExpressionNode).void } def visit_pinned_expression_node(node); end # Visit a PinnedVariableNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:644 sig { params(node: Prism::PinnedVariableNode).void } def visit_pinned_variable_node(node); end # Visit a PostExecutionNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:649 sig { params(node: Prism::PostExecutionNode).void } def visit_post_execution_node(node); end # Visit a PreExecutionNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:654 sig { params(node: Prism::PreExecutionNode).void } def visit_pre_execution_node(node); end # Visit a ProgramNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:659 sig { params(node: Prism::ProgramNode).void } def visit_program_node(node); end # Visit a RangeNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:664 sig { params(node: Prism::RangeNode).void } def visit_range_node(node); end # Visit a RationalNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:669 sig { params(node: Prism::RationalNode).void } def visit_rational_node(node); end # Visit a RedoNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:674 sig { params(node: Prism::RedoNode).void } def visit_redo_node(node); end # Visit a RegularExpressionNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:679 sig { params(node: Prism::RegularExpressionNode).void } def visit_regular_expression_node(node); end # Visit a RequiredKeywordParameterNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:684 sig { params(node: Prism::RequiredKeywordParameterNode).void } def visit_required_keyword_parameter_node(node); end # Visit a RequiredParameterNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:689 sig { params(node: Prism::RequiredParameterNode).void } def visit_required_parameter_node(node); end # Visit a RescueModifierNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:694 sig { params(node: Prism::RescueModifierNode).void } def visit_rescue_modifier_node(node); end # Visit a RescueNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:699 sig { params(node: Prism::RescueNode).void } def visit_rescue_node(node); end # Visit a RestParameterNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:704 sig { params(node: Prism::RestParameterNode).void } def visit_rest_parameter_node(node); end # Visit a RetryNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:709 sig { params(node: Prism::RetryNode).void } def visit_retry_node(node); end # Visit a ReturnNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:714 sig { params(node: Prism::ReturnNode).void } def visit_return_node(node); end # Visit a SelfNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:719 sig { params(node: Prism::SelfNode).void } def visit_self_node(node); end # Visit a ShareableConstantNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:724 sig { params(node: Prism::ShareableConstantNode).void } def visit_shareable_constant_node(node); end # Visit a SingletonClassNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:729 sig { params(node: Prism::SingletonClassNode).void } def visit_singleton_class_node(node); end # Visit a SourceEncodingNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:734 sig { params(node: Prism::SourceEncodingNode).void } def visit_source_encoding_node(node); end # Visit a SourceFileNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:739 sig { params(node: Prism::SourceFileNode).void } def visit_source_file_node(node); end # Visit a SourceLineNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:744 sig { params(node: Prism::SourceLineNode).void } def visit_source_line_node(node); end # Visit a SplatNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:749 sig { params(node: Prism::SplatNode).void } def visit_splat_node(node); end # Visit a StatementsNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:754 sig { params(node: Prism::StatementsNode).void } def visit_statements_node(node); end # Visit a StringNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:759 sig { params(node: Prism::StringNode).void } def visit_string_node(node); end # Visit a SuperNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:764 sig { params(node: Prism::SuperNode).void } def visit_super_node(node); end # Visit a SymbolNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:769 sig { params(node: Prism::SymbolNode).void } def visit_symbol_node(node); end # Visit a TrueNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:774 sig { params(node: Prism::TrueNode).void } def visit_true_node(node); end # Visit a UndefNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:779 sig { params(node: Prism::UndefNode).void } def visit_undef_node(node); end # Visit a UnlessNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:784 sig { params(node: Prism::UnlessNode).void } def visit_unless_node(node); end # Visit a UntilNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:789 sig { params(node: Prism::UntilNode).void } def visit_until_node(node); end # Visit a WhenNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:794 sig { params(node: Prism::WhenNode).void } def visit_when_node(node); end # Visit a WhileNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:799 sig { params(node: Prism::WhileNode).void } def visit_while_node(node); end # Visit a XStringNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:804 sig { params(node: Prism::XStringNode).void } def visit_x_string_node(node); end # Visit a YieldNode node # - # source://prism//lib/prism/visitor.rb#29 + # pkg:gem/prism#lib/prism/visitor.rb:809 sig { params(node: Prism::YieldNode).void } def visit_yield_node(node); end end @@ -41026,13 +41499,11 @@ end # ^^^^^^^^^ # end # -# source://prism//lib/prism/node.rb#17881 +# pkg:gem/prism#lib/prism/node.rb:19173 class Prism::WhenNode < ::Prism::Node # Initialize a new WhenNode node. # - # @return [WhenNode] a new instance of WhenNode - # - # source://prism//lib/prism/node.rb#17883 + # pkg:gem/prism#lib/prism/node.rb:19175 sig do params( source: Prism::Source, @@ -41050,42 +41521,42 @@ class Prism::WhenNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17995 + # pkg:gem/prism#lib/prism/node.rb:19295 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17895 + # pkg:gem/prism#lib/prism/node.rb:19187 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17900 + # pkg:gem/prism#lib/prism/node.rb:19192 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17913 + # pkg:gem/prism#lib/prism/node.rb:19213 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17905 + # pkg:gem/prism#lib/prism/node.rb:19205 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader conditions: Array[Prism::node] # - # source://prism//lib/prism/node.rb#17944 + # pkg:gem/prism#lib/prism/node.rb:19244 sig { returns(T::Array[Prism::Node]) } def conditions; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?conditions: Array[Prism::node], ?then_keyword_loc: Location?, ?statements: StatementsNode?) -> WhenNode # - # source://prism//lib/prism/node.rb#17918 + # pkg:gem/prism#lib/prism/node.rb:19218 sig do params( node_id: Integer, @@ -41097,82 +41568,86 @@ class Prism::WhenNode < ::Prism::Node statements: T.nilable(Prism::StatementsNode) ).returns(Prism::WhenNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), conditions: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, keyword_loc: self.keyword_loc, conditions: self.conditions, then_keyword_loc: self.then_keyword_loc, statements: self.statements); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#17900 + # pkg:gem/prism#lib/prism/node.rb:19223 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, conditions: Array[Prism::node], then_keyword_loc: Location?, statements: StatementsNode? } # - # source://prism//lib/prism/node.rb#17926 + # pkg:gem/prism#lib/prism/node.rb:19226 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:19197 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#17979 + # pkg:gem/prism#lib/prism/node.rb:19279 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#17969 + # pkg:gem/prism#lib/prism/node.rb:19269 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#17931 + # pkg:gem/prism#lib/prism/node.rb:19231 sig { returns(Prism::Location) } def keyword_loc; end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#17939 + # pkg:gem/prism#lib/prism/node.rb:19239 def save_keyword_loc(repository); end # Save the then_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#17961 + # pkg:gem/prism#lib/prism/node.rb:19261 def save_then_keyword_loc(repository); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#17966 + # pkg:gem/prism#lib/prism/node.rb:19266 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then_keyword: () -> String? # - # source://prism//lib/prism/node.rb#17974 + # pkg:gem/prism#lib/prism/node.rb:19274 sig { returns(T.nilable(String)) } def then_keyword; end # attr_reader then_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#17947 + # pkg:gem/prism#lib/prism/node.rb:19247 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17984 + # pkg:gem/prism#lib/prism/node.rb:19284 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#17989 + # pkg:gem/prism#lib/prism/node.rb:19289 def type; end end end @@ -41185,13 +41660,11 @@ end # while foo do bar end # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#18012 +# pkg:gem/prism#lib/prism/node.rb:19312 class Prism::WhileNode < ::Prism::Node # Initialize a new WhileNode node. # - # @return [WhileNode] a new instance of WhileNode - # - # source://prism//lib/prism/node.rb#18014 + # pkg:gem/prism#lib/prism/node.rb:19314 sig do params( source: Prism::Source, @@ -41210,56 +41683,54 @@ class Prism::WhileNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18156 + # pkg:gem/prism#lib/prism/node.rb:19464 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18027 + # pkg:gem/prism#lib/prism/node.rb:19327 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def begin_modifier?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#18063 + # pkg:gem/prism#lib/prism/node.rb:19371 sig { returns(T::Boolean) } def begin_modifier?; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18032 + # pkg:gem/prism#lib/prism/node.rb:19332 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#18135 + # pkg:gem/prism#lib/prism/node.rb:19443 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#18100 + # pkg:gem/prism#lib/prism/node.rb:19408 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18045 + # pkg:gem/prism#lib/prism/node.rb:19353 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18037 + # pkg:gem/prism#lib/prism/node.rb:19345 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?do_keyword_loc: Location?, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?) -> WhileNode # - # source://prism//lib/prism/node.rb#18050 + # pkg:gem/prism#lib/prism/node.rb:19358 sig do params( node_id: Integer, @@ -41272,97 +41743,101 @@ class Prism::WhileNode < ::Prism::Node statements: T.nilable(Prism::StatementsNode) ).returns(Prism::WhileNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), do_keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, keyword_loc: self.keyword_loc, do_keyword_loc: self.do_keyword_loc, closing_loc: self.closing_loc, predicate: self.predicate, statements: self.statements); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18032 + # pkg:gem/prism#lib/prism/node.rb:19363 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, do_keyword_loc: Location?, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode? } # - # source://prism//lib/prism/node.rb#18058 + # pkg:gem/prism#lib/prism/node.rb:19366 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def do_keyword: () -> String? # - # source://prism//lib/prism/node.rb#18130 + # pkg:gem/prism#lib/prism/node.rb:19438 sig { returns(T.nilable(String)) } def do_keyword; end # attr_reader do_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#18081 + # pkg:gem/prism#lib/prism/node.rb:19389 sig { returns(T.nilable(Prism::Location)) } def do_keyword_loc; end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:19337 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#18140 + # pkg:gem/prism#lib/prism/node.rb:19448 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18125 + # pkg:gem/prism#lib/prism/node.rb:19433 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#18068 + # pkg:gem/prism#lib/prism/node.rb:19376 sig { returns(Prism::Location) } def keyword_loc; end - # source://prism//lib/prism/parse_result/newlines.rb#109 + # pkg:gem/prism#lib/prism/parse_result/newlines.rb:110 def newline_flag!(lines); end # attr_reader predicate: Prism::node # - # source://prism//lib/prism/node.rb#18119 + # pkg:gem/prism#lib/prism/node.rb:19427 sig { returns(Prism::Node) } def predicate; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18114 + # pkg:gem/prism#lib/prism/node.rb:19422 def save_closing_loc(repository); end # Save the do_keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18095 + # pkg:gem/prism#lib/prism/node.rb:19403 def save_do_keyword_loc(repository); end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18076 + # pkg:gem/prism#lib/prism/node.rb:19384 def save_keyword_loc(repository); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#18122 + # pkg:gem/prism#lib/prism/node.rb:19430 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#18145 + # pkg:gem/prism#lib/prism/node.rb:19453 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#18150 + # pkg:gem/prism#lib/prism/node.rb:19458 def type; end end end @@ -41372,15 +41847,13 @@ end # `foo` # ^^^^^ # -# source://prism//lib/prism/node.rb#18171 +# pkg:gem/prism#lib/prism/node.rb:19479 class Prism::XStringNode < ::Prism::Node include ::Prism::HeredocQuery # Initialize a new XStringNode node. # - # @return [XStringNode] a new instance of XStringNode - # - # source://prism//lib/prism/node.rb#18173 + # pkg:gem/prism#lib/prism/node.rb:19481 sig do params( source: Prism::Source, @@ -41398,60 +41871,60 @@ class Prism::XStringNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18301 + # pkg:gem/prism#lib/prism/node.rb:19615 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18185 + # pkg:gem/prism#lib/prism/node.rb:19493 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18190 + # pkg:gem/prism#lib/prism/node.rb:19498 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#18280 + # pkg:gem/prism#lib/prism/node.rb:19594 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#18254 + # pkg:gem/prism#lib/prism/node.rb:19568 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18200 + # pkg:gem/prism#lib/prism/node.rb:19514 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18195 + # pkg:gem/prism#lib/prism/node.rb:19509 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#18275 + # pkg:gem/prism#lib/prism/node.rb:19589 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#18241 + # pkg:gem/prism#lib/prism/node.rb:19555 sig { returns(Prism::Location) } def content_loc; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> XStringNode # - # source://prism//lib/prism/node.rb#18205 + # pkg:gem/prism#lib/prism/node.rb:19519 sig do params( node_id: Integer, @@ -41463,37 +41936,37 @@ class Prism::XStringNode < ::Prism::Node unescaped: String ).returns(Prism::XStringNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, opening_loc: self.opening_loc, content_loc: self.content_loc, closing_loc: self.closing_loc, unescaped: self.unescaped); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18190 + # pkg:gem/prism#lib/prism/node.rb:19524 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String } # - # source://prism//lib/prism/node.rb#18213 + # pkg:gem/prism#lib/prism/node.rb:19527 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:19503 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def forced_binary_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#18223 + # pkg:gem/prism#lib/prism/node.rb:19537 sig { returns(T::Boolean) } def forced_binary_encoding?; end # def forced_utf8_encoding?: () -> bool # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#18218 + # pkg:gem/prism#lib/prism/node.rb:19532 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -41502,63 +41975,63 @@ class Prism::XStringNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#18285 + # pkg:gem/prism#lib/prism/node.rb:19599 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#18270 + # pkg:gem/prism#lib/prism/node.rb:19584 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#18228 + # pkg:gem/prism#lib/prism/node.rb:19542 sig { returns(Prism::Location) } def opening_loc; end # Save the closing_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18262 + # pkg:gem/prism#lib/prism/node.rb:19576 def save_closing_loc(repository); end # Save the content_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18249 + # pkg:gem/prism#lib/prism/node.rb:19563 def save_content_loc(repository); end # Save the opening_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18236 + # pkg:gem/prism#lib/prism/node.rb:19550 def save_opening_loc(repository); end # Occasionally it's helpful to treat a string as if it were interpolated so # that there's a consistent interface for working with strings. # - # source://prism//lib/prism/node_ext.rb#90 + # pkg:gem/prism#lib/prism/node_ext.rb:93 sig { returns(Prism::InterpolatedXStringNode) } def to_interpolated; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#18290 + # pkg:gem/prism#lib/prism/node.rb:19604 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#18267 + # pkg:gem/prism#lib/prism/node.rb:19581 sig { returns(String) } def unescaped; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#18295 + # pkg:gem/prism#lib/prism/node.rb:19609 def type; end end end @@ -41568,13 +42041,11 @@ end # yield 1 # ^^^^^^^ # -# source://prism//lib/prism/node.rb#18315 +# pkg:gem/prism#lib/prism/node.rb:19629 class Prism::YieldNode < ::Prism::Node # Initialize a new YieldNode node. # - # @return [YieldNode] a new instance of YieldNode - # - # source://prism//lib/prism/node.rb#18317 + # pkg:gem/prism#lib/prism/node.rb:19631 sig do params( source: Prism::Source, @@ -41592,42 +42063,42 @@ class Prism::YieldNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18449 + # pkg:gem/prism#lib/prism/node.rb:19770 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18329 + # pkg:gem/prism#lib/prism/node.rb:19643 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#18396 + # pkg:gem/prism#lib/prism/node.rb:19717 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end - # def child_nodes: () -> Array[nil | Node] + # def child_nodes: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18334 + # pkg:gem/prism#lib/prism/node.rb:19648 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18346 + # pkg:gem/prism#lib/prism/node.rb:19667 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18339 + # pkg:gem/prism#lib/prism/node.rb:19660 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?) -> YieldNode # - # source://prism//lib/prism/node.rb#18351 + # pkg:gem/prism#lib/prism/node.rb:19672 sig do params( node_id: Integer, @@ -41639,94 +42110,104 @@ class Prism::YieldNode < ::Prism::Node rparen_loc: T.nilable(Prism::Location) ).returns(Prism::YieldNode) end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end + def copy(node_id: self.node_id, location: self.location, flags: self.flags, keyword_loc: self.keyword_loc, lparen_loc: self.lparen_loc, arguments: self.arguments, rparen_loc: self.rparen_loc); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # def deconstruct: () -> Array[Node?] # - # source://prism//lib/prism/node.rb#18334 + # pkg:gem/prism#lib/prism/node.rb:19677 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location? } # - # source://prism//lib/prism/node.rb#18359 + # pkg:gem/prism#lib/prism/node.rb:19680 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # pkg:gem/prism#lib/prism/node.rb:19653 + def each_child_node; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end # def inspect -> String # - # source://prism//lib/prism/node.rb#18433 + # pkg:gem/prism#lib/prism/node.rb:19754 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18418 + # pkg:gem/prism#lib/prism/node.rb:19739 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#18364 + # pkg:gem/prism#lib/prism/node.rb:19685 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#18423 + # pkg:gem/prism#lib/prism/node.rb:19744 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#18377 + # pkg:gem/prism#lib/prism/node.rb:19698 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#18428 + # pkg:gem/prism#lib/prism/node.rb:19749 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#18399 + # pkg:gem/prism#lib/prism/node.rb:19720 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Save the keyword_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18372 + # pkg:gem/prism#lib/prism/node.rb:19693 def save_keyword_loc(repository); end # Save the lparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18391 + # pkg:gem/prism#lib/prism/node.rb:19712 def save_lparen_loc(repository); end # Save the rparen_loc location using the given saved source so that # it can be retrieved later. # - # source://prism//lib/prism/node.rb#18413 + # pkg:gem/prism#lib/prism/node.rb:19734 def save_rparen_loc(repository); end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#18438 + # pkg:gem/prism#lib/prism/node.rb:19759 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#18443 + # pkg:gem/prism#lib/prism/node.rb:19764 def type; end end end + +# pkg:gem/prism#lib/prism/translation/ruby_parser.rb:11 +class RubyParser; end + +# pkg:gem/prism#lib/prism/translation/ruby_parser.rb:12 +class RubyParser::SyntaxError < ::RuntimeError; end diff --git a/sorbet/rbi/gems/pry@0.15.2.rbi b/sorbet/rbi/gems/pry@0.16.0.rbi similarity index 55% rename from sorbet/rbi/gems/pry@0.15.2.rbi rename to sorbet/rbi/gems/pry@0.16.0.rbi index 7ef192e..f60c517 100644 --- a/sorbet/rbi/gems/pry@0.15.2.rbi +++ b/sorbet/rbi/gems/pry@0.16.0.rbi @@ -5,7 +5,7 @@ # Please instead update this file by running `bin/tapioca gem pry`. -# source://pry//lib/pry/core_extensions.rb#115 +# pkg:gem/pry#lib/pry/core_extensions.rb:115 class BasicObject # Return a binding object for the receiver. # @@ -17,11 +17,11 @@ class BasicObject # # @return [Binding] # - # source://pry//lib/pry/core_extensions.rb#125 + # pkg:gem/pry#lib/pry/core_extensions.rb:125 def __binding__; end end -# source://pry//lib/pry/core_extensions.rb#24 +# pkg:gem/pry#lib/pry/core_extensions.rb:24 class Object < ::BasicObject include ::Kernel include ::PP::ObjectMixin @@ -46,7 +46,7 @@ class Object < ::BasicObject # # @return [Binding] # - # source://pry//lib/pry/core_extensions.rb#70 + # pkg:gem/pry#lib/pry/core_extensions.rb:70 def __binding__; end # Start a Pry REPL on self. @@ -54,137 +54,134 @@ class Object < ::BasicObject # If `self` is a Binding then that will be used to evaluate expressions; # otherwise a new binding will be created. # + # @param [Object] object the object or binding to pry + # (__deprecated__, use `object.pry`) + # @param [Hash] hash the options hash # @example With a binding - # binding.pry + # binding.pry # @example On any object # "dummy".pry # @example With options # def my_method - # binding.pry :quiet => true + # 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 + # pkg:gem/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 +# taken from irb +# Implements tab completion for Readline in Pry +# +# {Pry::LastException} is a proxy class who wraps an Exception object for +# {Pry#last_exception}. it extends the exception object with methods that +# help pry commands be useful. +# +# the original exception object is not modified and method calls are forwarded +# to the wrapped exception object. +# +# A pager is an `IO`-like object that accepts text and either prints it +# immediately, prints it one page at a time, or streams it to an external +# program to print one page at a time. +# +# pkg:gem/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#80 + # @param [Hash] options + # @option options [#readline] :input + # The object to use for input. + # @option options [#puts] :output + # The object to use for output. + # @option options [Pry::CommandBase] :commands + # The object to use for commands. + # @option options [Hash] :hooks + # The defined hook Procs. + # @option options [Pry::Prompt] :prompt + # The array of Procs to use for prompts. + # @option options [Proc] :print + # The Proc to use for printing return values. + # @option options [Boolean] :quiet + # Omit the `whereami` banner when starting. + # @option options [Array] :backtrace + # The backtrace of the session's `binding.pry` line, if applicable. + # @option options [Object] :target + # The initial context for this session. + # + # pkg:gem/pry#lib/pry/pry_instance.rb:80 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. + # @param [Symbol] name 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#210 + # pkg:gem/pry#lib/pry/pry_instance.rb:210 def add_sticky_local(name, &block); end - # Returns the value of attribute backtrace. - # - # source://pry//lib/pry/pry_instance.rb#34 + # pkg:gem/pry#lib/pry/pry_instance.rb:34 def backtrace; end - # Sets the attribute backtrace - # - # @param value the value to set the attribute backtrace to. - # - # source://pry//lib/pry/pry_instance.rb#34 + # pkg:gem/pry#lib/pry/pry_instance.rb:34 def backtrace=(_arg0); end - # Returns the value of attribute binding_stack. - # - # source://pry//lib/pry/pry_instance.rb#31 + # pkg:gem/pry#lib/pry/pry_instance.rb:31 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#31 + # pkg:gem/pry#lib/pry/pry_instance.rb:31 def binding_stack=(_arg0); end - # source://forwardable/1.3.3/forwardable.rb#231 - def color(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_instance.rb:51 + def color(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def color=(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_instance.rb:51 + def color=(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def commands(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_instance.rb:51 + def commands(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def commands=(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_instance.rb:51 + def commands=(*, **, &); end # Generate completions. # - # @param str [String] What the user has typed so far - # @return [Array] Possible completions + # @param [String] str + # What the user has typed so far # - # source://pry//lib/pry/pry_instance.rb#143 + # @return [Array] + # Possible completions + # + # pkg:gem/pry#lib/pry/pry_instance.rb:143 def complete(str); end - # Returns the value of attribute config. - # - # source://pry//lib/pry/pry_instance.rb#49 + # pkg:gem/pry#lib/pry/pry_instance.rb:49 def config; end # The currently active `Binding`. - # # @return [Binding] The currently active `Binding` for the session. # - # source://pry//lib/pry/pry_instance.rb#122 + # pkg:gem/pry#lib/pry/pry_instance.rb:122 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#122 + # pkg:gem/pry#lib/pry/pry_instance.rb:125 def current_context; end - # Returns the value of attribute custom_completions. - # - # source://pry//lib/pry/pry_instance.rb#32 + # pkg:gem/pry#lib/pry/pry_instance.rb:32 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#32 + # pkg:gem/pry#lib/pry/pry_instance.rb:32 def custom_completions=(_arg0); end - # source://forwardable/1.3.3/forwardable.rb#231 - def editor(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_instance.rb:51 + def editor(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def editor=(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_instance.rb:51 + def editor=(*, **, &); end # Pass a line of input to Pry. # @@ -200,247 +197,228 @@ class Pry # 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 + # @param [String?] line The line of input; `nil` if the user types `` + # @option options [Boolean] :generated Whether this line was generated automatically. + # Generated lines are not stored in history. + # @return [Boolean] Is Pry ready to accept more input? # @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#253 + # pkg:gem/pry#lib/pry/pry_instance.rb:253 def eval(line, options = T.unsafe(nil)); end - # Returns the value of attribute eval_string. - # - # source://pry//lib/pry/pry_instance.rb#33 + # pkg:gem/pry#lib/pry/pry_instance.rb:33 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#33 + # pkg:gem/pry#lib/pry/pry_instance.rb:33 def eval_string=(_arg0); end - # source://pry//lib/pry/pry_instance.rb#284 + # pkg:gem/pry#lib/pry/pry_instance.rb:284 def evaluate_ruby(code); end - # source://forwardable/1.3.3/forwardable.rb#231 - def exception_handler(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_instance.rb:51 + def exception_handler(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def exception_handler=(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_instance.rb:51 + def exception_handler=(*, **, &); end # Execute the specified hook. + # @param [Symbol] name The hook name to execute + # @param [*Object] args The arguments to pass to the hook + # @return [Object, Exception] The return value of the hook or the exception raised + # # If executing a hook raises an exception, we log that and then continue successfully. # 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#392 + # pkg:gem/pry#lib/pry/pry_instance.rb:392 def exec_hook(name, *args, &block); end - # Returns the value of attribute exit_value. - # - # source://pry//lib/pry/pry_instance.rb#41 + # pkg:gem/pry#lib/pry/pry_instance.rb:41 def exit_value; end - # source://forwardable/1.3.3/forwardable.rb#231 - def extra_sticky_locals(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_instance.rb:51 + def extra_sticky_locals(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def extra_sticky_locals=(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_instance.rb:51 + def extra_sticky_locals=(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def hooks(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_instance.rb:51 + def hooks(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def hooks=(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_instance.rb:51 + def hooks=(*, **, &); 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. + # @param [String] name + # The name of the local to inject. + # + # @param [Object] value + # The value to set the local to. + # + # @param [Binding] binding + # The binding to set the local on. # - # source://pry//lib/pry/pry_instance.rb#171 + # @return [Object] + # The value the local was set to. + # + # pkg:gem/pry#lib/pry/pry_instance.rb:171 def inject_local(name, value, binding); end # Inject all the sticky locals into the current binding. # - # source://pry//lib/pry/pry_instance.rb#199 + # pkg:gem/pry#lib/pry/pry_instance.rb:199 def inject_sticky_locals!; end - # source://forwardable/1.3.3/forwardable.rb#231 - def input(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_instance.rb:51 + def input(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def input=(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_instance.rb:51 + def input=(*, **, &); end # @since v0.12.0 # - # source://pry//lib/pry/pry_instance.rb#44 + # pkg:gem/pry#lib/pry/pry_instance.rb:44 def input_ring; end - # Returns the value of attribute last_dir. - # - # source://pry//lib/pry/pry_instance.rb#38 + # pkg:gem/pry#lib/pry/pry_instance.rb:38 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#38 + # pkg:gem/pry#lib/pry/pry_instance.rb:38 def last_dir=(_arg0); end - # Returns the value of attribute last_exception. - # - # source://pry//lib/pry/pry_instance.rb#40 + # pkg:gem/pry#lib/pry/pry_instance.rb:40 def last_exception; end # Set the last exception for a session. + # @param [Exception] exception The last exception. # - # @param exception [Exception] The last exception. - # - # source://pry//lib/pry/pry_instance.rb#416 + # pkg:gem/pry#lib/pry/pry_instance.rb:416 def last_exception=(exception); end - # Returns the value of attribute last_file. - # - # source://pry//lib/pry/pry_instance.rb#37 + # pkg:gem/pry#lib/pry/pry_instance.rb:37 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#37 + # pkg:gem/pry#lib/pry/pry_instance.rb:37 def last_file=(_arg0); end - # Returns the value of attribute last_result. - # - # source://pry//lib/pry/pry_instance.rb#36 + # pkg:gem/pry#lib/pry/pry_instance.rb:36 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#36 + # pkg:gem/pry#lib/pry/pry_instance.rb:36 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#438 + # pkg:gem/pry#lib/pry/pry_instance.rb:438 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#188 + # pkg:gem/pry#lib/pry/pry_instance.rb:51 def memory_size; end - # source://pry//lib/pry/pry_instance.rb#193 + # pkg:gem/pry#lib/pry/pry_instance.rb:51 def memory_size=(size); end # Returns an output device - # # @example # pry_instance.output.puts "ohai!" # - # source://pry//lib/pry/pry_instance.rb#508 + # pkg:gem/pry#lib/pry/pry_instance.rb:51 def output; end - # source://forwardable/1.3.3/forwardable.rb#231 - def output=(*args, **_arg1, &block); end + # Returns an output device + # @example + # pry_instance.output.puts "ohai!" + # + # pkg:gem/pry#lib/pry/pry_instance.rb:51 + def output=(*, **, &); end # @since v0.12.0 # - # source://pry//lib/pry/pry_instance.rb#47 + # pkg:gem/pry#lib/pry/pry_instance.rb:47 def output_ring; end # Returns the currently configured pager - # # @example # pry_instance.pager.page text # - # source://pry//lib/pry/pry_instance.rb#500 + # pkg:gem/pry#lib/pry/pry_instance.rb:51 def pager; end - # source://forwardable/1.3.3/forwardable.rb#231 - def pager=(*args, **_arg1, &block); end + # Returns the currently configured pager + # @example + # pry_instance.pager.page text + # + # pkg:gem/pry#lib/pry/pry_instance.rb:51 + def pager=(*, **, &); 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 + # 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#492 + # pkg:gem/pry#lib/pry/pry_instance.rb:492 def pop_prompt; end - # source://forwardable/1.3.3/forwardable.rb#231 - def print(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_instance.rb:51 + def print(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def print=(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_instance.rb:51 + def print=(*, **, &); 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. + # @param [String] val The line to process. # @return [Boolean] `true` if `val` is a command, `false` otherwise # - # source://pry//lib/pry/pry_instance.rb#323 + # pkg:gem/pry#lib/pry/pry_instance.rb:323 def process_command(val); end # Same as process_command, but outputs exceptions to `#output` instead of # raising. - # - # @param val [String] The line to process. + # @param [String] val The line to process. # @return [Boolean] `true` if `val` is a command, `false` otherwise # - # source://pry//lib/pry/pry_instance.rb#358 + # pkg:gem/pry#lib/pry/pry_instance.rb:358 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#99 + # pkg:gem/pry#lib/pry/pry_instance.rb:99 def prompt; end # Sets the Pry prompt. - # - # @param new_prompt [Pry::Prompt] + # @param [Pry::Prompt] new_prompt # @return [void] # - # source://pry//lib/pry/pry_instance.rb#106 + # pkg:gem/pry#lib/pry/pry_instance.rb:106 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#129 + # pkg:gem/pry#lib/pry/pry_instance.rb:129 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#116 + # pkg:gem/pry#lib/pry/pry_instance.rb:116 def push_initial_binding(target = T.unsafe(nil)); end # Pushes the current prompt onto a stack that it can be restored from later. @@ -448,23 +426,23 @@ class Pry # # @example # push_prompt(Pry::Prompt[:my_prompt]) - # @param new_prompt [Pry::Prompt] + # + # @param [Pry::Prompt] new_prompt # @return [Pry::Prompt] new_prompt # - # source://pry//lib/pry/pry_instance.rb#476 + # pkg:gem/pry#lib/pry/pry_instance.rb:476 def push_prompt(new_prompt); end # Convenience accessor for the `quiet` config key. - # # @return [Boolean] # - # source://pry//lib/pry/pry_instance.rb#562 + # pkg:gem/pry#lib/pry/pry_instance.rb:562 def quiet?; end - # source://pry//lib/pry/pry_instance.rb#552 + # pkg:gem/pry#lib/pry/pry_instance.rb:552 def raise_up(*args); end - # source://pry//lib/pry/pry_instance.rb#556 + # pkg:gem/pry#lib/pry/pry_instance.rb:556 def raise_up!(*args); end # Raise an exception out of Pry. @@ -479,478 +457,430 @@ class Pry # (i.e. raise-up RunThymeError.new should not be the same as # raise-up NameError, "uninitialized constant RunThymeError") # - # @raise [TypeError] - # - # source://pry//lib/pry/pry_instance.rb#524 + # pkg:gem/pry#lib/pry/pry_instance.rb:524 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#280 + # pkg:gem/pry#lib/pry/pry_instance.rb:280 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#229 + # pkg:gem/pry#lib/pry/pry_instance.rb:229 def reset_eval_string; end # Run the specified command. - # + # @param [String] val The command (and its params) to execute. + # @return [Pry::Command::VOID_VALUE] # @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#373 + # pkg:gem/pry#lib/pry/pry_instance.rb:373 def run_command(val); end # Returns the appropriate prompt to use. - # # @return [String] The prompt. # - # source://pry//lib/pry/pry_instance.rb#451 + # pkg:gem/pry#lib/pry/pry_instance.rb:451 def select_prompt; end # Set the last result of an eval. # This method should not need to be invoked directly. + # @param [Object] result The result. + # @param [String] code The code that was run. # - # @param result [Object] The result. - # @param code [String] The code that was run. - # - # source://pry//lib/pry/pry_instance.rb#407 + # pkg:gem/pry#lib/pry/pry_instance.rb:407 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#445 + # pkg:gem/pry#lib/pry/pry_instance.rb:445 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#296 + # pkg:gem/pry#lib/pry/pry_instance.rb:296 def show_result(result); end - # source://pry//lib/pry/pry_instance.rb#214 + # pkg:gem/pry#lib/pry/pry_instance.rb:214 def sticky_locals; end - # Returns the value of attribute suppress_output. - # - # source://pry//lib/pry/pry_instance.rb#35 + # pkg:gem/pry#lib/pry/pry_instance.rb:35 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#35 + # pkg:gem/pry#lib/pry/pry_instance.rb:35 def suppress_output=(_arg0); end # Update Pry's internal state after evalling code. # This method should not need to be invoked directly. + # @param [String] code The code we just eval'd # - # @param code [String] The code we just eval'd - # - # source://pry//lib/pry/pry_instance.rb#426 + # pkg:gem/pry#lib/pry/pry_instance.rb:426 def update_input_history(code); end private # Force `eval_string` into the encoding of `val`. [Issue #284] # - # source://pry//lib/pry/pry_instance.rb#650 + # pkg:gem/pry#lib/pry/pry_instance.rb:650 def ensure_correct_encoding!(val); end - # source://pry//lib/pry/pry_instance.rb#568 + # pkg:gem/pry#lib/pry/pry_instance.rb:568 def handle_line(line, options); end # the array that the prompt stack is stored in # - # source://pry//lib/pry/pry_instance.rb#659 + # pkg:gem/pry#lib/pry/pry_instance.rb:659 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] + # @param [Code, Method, UnboundMethod, Proc, Pry::Method, String, Array, + # IO] obj # - # source://pry//lib/pry/code.rb#12 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/wrapped_module.rb:7 def WrappedModule(obj); end - # source://pry//lib/pry/pry_class.rb#296 + # pkg:gem/pry#lib/pry/pry_class.rb:296 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. + # @param [Object] target The object to get a `Binding` object for. # @return [Binding] The `Binding` object. # - # source://pry//lib/pry/pry_class.rb#349 + # pkg:gem/pry#lib/pry/pry_class.rb:322 def binding_for(target); end - # Returns the value of attribute cli. - # - # source://pry//lib/pry/pry_class.rb#22 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/pry_class.rb:27 + def color(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def color=(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_class.rb:27 + def color=(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def commands(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_class.rb:27 + def commands(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def commands=(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_class.rb:27 + def commands=(*, **, &); end - # Returns the value of attribute config. - # - # source://pry//lib/pry/pry_class.rb#25 + # pkg:gem/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 + # pkg:gem/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. + # Pry.configure do |config| + # config.eager_load! # optional + # config.input = # .. + # config.foo = 2 + # end # - # source://pry//lib/pry/pry_class.rb#46 + # @yield [config] + # Yields a block with {Pry.config} as its argument. + # + # pkg:gem/pry#lib/pry/pry_class.rb:46 def configure; end - # source://pry//lib/pry/pry_class.rb#382 + # pkg:gem/pry#lib/pry/pry_class.rb:355 def critical_section; end - # @return [Pry::Config] Returns a value store for an instance of Pry running on the current thread. + # @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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/pry_class.rb:27 + def editor(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def editor=(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_class.rb:27 + def editor=(*, **, &); end - # Returns the value of attribute eval_path. - # - # source://pry//lib/pry/pry_class.rb#21 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/pry_class.rb:27 + def exception_handler(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def exception_handler=(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_class.rb:27 + def exception_handler=(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def extra_sticky_locals(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_class.rb:27 + def extra_sticky_locals(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def extra_sticky_locals=(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_class.rb:27 + def extra_sticky_locals=(*, **, &); end - # source://pry//lib/pry/pry_class.rb#139 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/pry_class.rb:27 + def history(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def history=(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_class.rb:27 + def history=(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def hooks(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_class.rb:27 + def hooks(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def hooks=(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_class.rb:27 + def hooks=(*, **, &); end - # @return [Boolean] - # - # source://pry//lib/pry/pry_class.rb#377 + # pkg:gem/pry#lib/pry/pry_class.rb:350 def in_critical_section?; end # Basic initialization. # - # source://pry//lib/pry/pry_class.rb#340 + # pkg:gem/pry#lib/pry/pry_class.rb:313 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#259 + # pkg:gem/pry#lib/pry/pry_class.rb:259 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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/pry_class.rb:27 + def input(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def input=(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_class.rb:27 + def input=(*, **, &); end - # Returns the value of attribute last_internal_error. - # - # source://pry//lib/pry/pry_class.rb#24 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/pry_class.rb:20 def line_buffer=(_arg0); end # Load the given file in the context of `Pry.toplevel_binding` + # @param [String] file The unexpanded file path. # - # @param file [String] The unexpanded file path. - # - # source://pry//lib/pry/pry_class.rb#69 + # pkg:gem/pry#lib/pry/pry_class.rb:69 def load_file_at_toplevel(file); end # Execute the file through the REPL loop, non-interactively. + # @param [String] file_name File name to load through the REPL. # - # @param file_name [String] File name to load through the REPL. - # - # source://pry//lib/pry/pry_class.rb#204 + # pkg:gem/pry#lib/pry/pry_class.rb:204 def load_file_through_repl(file_name); end # Load Readline history if required. # - # source://pry//lib/pry/pry_class.rb#253 + # pkg:gem/pry#lib/pry/pry_class.rb:253 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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/pry_class.rb:109 def load_traps; end - # source://pry//lib/pry/pry_class.rb#113 + # pkg:gem/pry#lib/pry/pry_class.rb:113 def load_win32console; end - # @return [main] returns the special instance of Object, "main". + # @return [main] + # returns the special instance of Object, "main". # - # source://pry//lib/pry/pry_class.rb#55 + # pkg:gem/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 + # @return [Integer] The maximum amount of objects remembered by the inp and + # out arrays. Defaults to 100. + # + # pkg:gem/pry#lib/pry/pry_class.rb:27 + def memory_size(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def output(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_class.rb:27 + def memory_size=(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def output=(*args, **_arg1, &block); end + # Returns an output device + # @example + # pry_instance.output.puts "ohai!" + # + # pkg:gem/pry#lib/pry/pry_class.rb:27 + def output(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def pager(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_class.rb:27 + def output=(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def pager=(*args, **_arg1, &block); end + # Returns the currently configured pager + # @example + # pry_instance.pager.page text + # + # pkg:gem/pry#lib/pry/pry_class.rb:27 + def pager(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def print(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_class.rb:27 + def pager=(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def print=(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_class.rb:27 + def print(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def prompt(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/pry_class.rb:27 + def print=(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def prompt=(*args, **_arg1, &block); end + # This is the prompt at the top of the prompt stack. + # @return [Pry::Prompt] the current prompt + # + # pkg:gem/pry#lib/pry/pry_class.rb:27 + def prompt(*, **, &); end - # Returns the value of attribute quiet. + # Sets the Pry prompt. + # @param [Pry::Prompt] new_prompt + # @return [void] # - # source://pry//lib/pry/pry_class.rb#23 + # pkg:gem/pry#lib/pry/pry_class.rb:27 + def prompt=(*, **, &); end + + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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#328 + # pkg:gem/pry#lib/pry/pry_class.rb:301 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 + # @param [String] command_string The Pry command (including arguments, + # if any). + # @param [Hash] options Optional named parameters. + # @return [nil] + # @option options [Object, Binding] :target The object to run the + # command under. Defaults to `TOPLEVEL_BINDING` (main). + # @option options [Boolean] :show_output Whether to show command + # output. Defaults to true. # @example Run at top-level with no output. # Pry.run_command "ls" + # @example Run under Pry class, returning only public methods. + # Pry.run_command "ls -m", :target => Pry # @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#279 + # pkg:gem/pry#lib/pry/pry_class.rb:279 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. - # + # @param [Object, Binding] target The receiver of the Pry session + # @param [Hash] options + # @option options (see Pry#initialize) # @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 + # + # pkg:gem/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#356 + # pkg:gem/pry#lib/pry/pry_class.rb:329 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#374 + # pkg:gem/pry#lib/pry/pry_class.rb:347 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`. + # @param [Object] obj + # The object to view. + # + # @param [Hash] options + # @option options [Integer] :max_length (60) + # The maximum number of chars before clipping occurs. # - # source://pry//lib/pry/pry_class.rb#227 + # @option options [Boolean] :id (false) + # Boolean to indicate whether or not a hex representation of the object ID + # is attached to the return value when the length of inspect is greater than + # value of `:max_length`. + # + # @return [String] + # The string representation of `obj`. + # + # pkg:gem/pry#lib/pry/pry_class.rb:227 def view_clip(obj, options = T.unsafe(nil)); end private - # @return [Boolean] - # - # source://pry//lib/pry/pry_class.rb#390 + # pkg:gem/pry#lib/pry/pry_class.rb:363 def mutex_available?; end end end @@ -958,32 +888,33 @@ 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 +# pkg:gem/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 +# pkg:gem/pry#lib/pry/basic_object.rb:4 class Pry::BasicObject < ::BasicObject include ::Kernel end -# source://pry//lib/pry/basic_object.rb#6 +# pkg:gem/pry#lib/pry/basic_object.rb:6 Pry::BasicObject::Dir = Dir -# source://pry//lib/pry/basic_object.rb#6 +# pkg:gem/pry#lib/pry/basic_object.rb:6 Pry::BasicObject::ENV = T.let(T.unsafe(nil), Object) -# source://pry//lib/pry/basic_object.rb#6 +# pkg:gem/pry#lib/pry/basic_object.rb:6 Pry::BasicObject::File = File -# source://pry//lib/pry/basic_object.rb#6 +# pkg:gem/pry#lib/pry/basic_object.rb:6 Pry::BasicObject::Kernel = Kernel -# source://pry//lib/pry/basic_object.rb#6 +# pkg:gem/pry#lib/pry/basic_object.rb:6 Pry::BasicObject::LoadError = LoadError -# source://pry//lib/pry/basic_object.rb#6 +# pkg:gem/pry#lib/pry/basic_object.rb:6 Pry::BasicObject::Pry = Pry # A super-class for Commands that are created with a single block. @@ -993,85 +924,84 @@ Pry::BasicObject::Pry = Pry # # Create subclasses using {Pry::CommandSet#command}. # -# source://pry//lib/pry/block_command.rb#10 +# pkg:gem/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 + # @param [Array] args The arguments passed # @return [Object] The return value of the block # - # source://pry//lib/pry/block_command.rb#14 + # pkg:gem/pry#lib/pry/block_command.rb:14 def call(*args); end - # source://pry//lib/pry/block_command.rb#18 + # pkg:gem/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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/cli.rb:12 def options=(_arg0); end - # source://pry//lib/pry/cli.rb#52 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/cli.rb:47 def reset; end - # source://pry//lib/pry/cli.rb#90 + # pkg:gem/pry#lib/pry/cli.rb:90 def start(opts); end end end -# source://pry//lib/pry/cli.rb#8 +# pkg:gem/pry#lib/pry/cli.rb:8 class Pry::CLI::NoOptionsError < ::StandardError; end # A super-class of Commands with structure. @@ -1086,70 +1016,57 @@ class Pry::CLI::NoOptionsError < ::StandardError; end # `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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # @param [Array] args The arguments passed # @return [Object] The return value of `process` or VOID_VALUE # - # source://pry//lib/pry/class_command.rb#72 + # pkg:gem/pry#lib/pry/class_command.rb:72 def call(*args); end # Generate shell completions + # @param [String] search The line typed so far + # @return [Array] the words to complete # - # @param search [String] The line typed so far - # @return [Array] the words to complete - # - # source://pry//lib/pry/class_command.rb#105 + # pkg:gem/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 + # pkg:gem/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. # + # @note Please don't do anything side-effecty in the main part of this # 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) + # opt.banner "Gists methods or classes" + # opt.on(:c, :class, "gist a class") do + # @action = :class + # end + # end + # + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/class_command.rb:63 def opts=(_arg0); end # The actual body of your command should go here. @@ -1163,15 +1080,14 @@ class Pry::ClassCommand < ::Pry::Command # # @example # def process - # if opts.present?(:class) - # gist_class - # else - # gist_method - # end + # if opts.present?(:class) + # gist_class + # else + # gist_method + # end # end - # @raise [CommandError] # - # source://pry//lib/pry/class_command.rb#190 + # pkg:gem/pry#lib/pry/class_command.rb:190 def process; end # A method called just before `options(opt)` as part of `call`. @@ -1181,17 +1097,17 @@ class Pry::ClassCommand < ::Pry::Command # # @example # def setup - # require 'gist' - # @action = :method + # require 'gist' + # @action = :method # end # - # source://pry//lib/pry/class_command.rb#121 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/class_command.rb:93 def slop; end # A method to setup Pry::Slop commands so it can parse the subcommands your @@ -1200,62 +1116,63 @@ class Pry::ClassCommand < ::Pry::Command # # @example A minimal example # def subcommands(cmd) - # cmd.command :download do |opt| - # description 'Downloads a content from a server' + # cmd.command :download do |opt| + # description 'Downloads a content from a server' # - # opt.on :verbose, 'Use verbose output' + # opt.on :verbose, 'Use verbose output' # - # run do |options, arguments| - # ContentDownloader.download(options, arguments) - # end - # end + # run do |options, arguments| + # ContentDownloader.download(options, arguments) + # end + # end # end + # # @example Define the invocation block anywhere you want # def subcommands(cmd) - # cmd.command :download do |opt| - # description 'Downloads a content from a server' + # cmd.command :download do |opt| + # description 'Downloads a content from a server' # - # opt.on :verbose, 'Use verbose output' - # end + # 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... + # # 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 + # pkg:gem/pry#lib/pry/class_command.rb:156 def subcommands(cmd); end class << self - # source://pry//lib/pry/class_command.rb#29 + # pkg:gem/pry#lib/pry/class_command.rb:29 def doc; end - # source://pry//lib/pry/class_command.rb#37 + # pkg:gem/pry#lib/pry/class_command.rb:40 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 + # pkg:gem/pry#lib/pry/class_command.rb:19 def inherited(klass); end - # source://pry//lib/pry/class_command.rb#42 + # pkg:gem/pry#lib/pry/class_command.rb:45 def line; end - # source://pry//lib/pry/class_command.rb#25 + # pkg:gem/pry#lib/pry/class_command.rb:25 def source; end - # source://pry//lib/pry/class_command.rb#37 + # pkg:gem/pry#lib/pry/class_command.rb:37 def source_file; end - # source://pry//lib/pry/class_command.rb#42 + # pkg:gem/pry#lib/pry/class_command.rb:42 def source_line; end - # source://pry//lib/pry/class_command.rb#33 + # pkg:gem/pry#lib/pry/class_command.rb:33 def source_location; end private @@ -1264,10 +1181,9 @@ class Pry::ClassCommand < ::Pry::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 + # pkg:gem/pry#lib/pry/class_command.rb:54 def source_object; end end end @@ -1281,7 +1197,7 @@ end # arbitrary chaining of formatting methods without mutating the original # object. # -# source://pry//lib/pry/code.rb#32 +# pkg:gem/pry#lib/pry/code.rb:32 class Pry::Code extend ::MethodSource::CodeHelpers @@ -1290,212 +1206,205 @@ class Pry::Code # 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 + # @param [Array, String, IO] lines + # @param [Integer?] start_line + # @param [Symbol?] code_type # - # source://pry//lib/pry/code.rb#87 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/code.rb:106 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] + # @param [Code, Object] other # @return [Boolean] # - # source://pry//lib/pry/code.rb#325 + # pkg:gem/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] + # @param [Integer] lineno + # @param [Integer] lines # @return [Code] # - # source://pry//lib/pry/code.rb#195 + # pkg:gem/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] + # @param [Integer] lineno + # @param [Integer] lines # @return [Code] # - # source://pry//lib/pry/code.rb#182 + # pkg:gem/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] + # @param [Integer] lineno + # @param [Integer] lines # @return [Code] # - # source://pry//lib/pry/code.rb#168 + # pkg:gem/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?] + # @param [Range, Integer] start_line + # @param [Integer?] end_line # @return [Code] # - # source://pry//lib/pry/code.rb#135 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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) + # @param [Integer] line_number (1-based) # @return [String] the code. # - # source://pry//lib/pry/code.rb#286 + # pkg:gem/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) + # @param [Integer] line_number (1-based) # @return [String] the code. # - # source://pry//lib/pry/code.rb#294 + # pkg:gem/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] + # @param [Regexp] pattern # @return [Code] # - # source://pry//lib/pry/code.rb#207 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/code.rb:263 def highlighted; end # Return the number of lines stored. # # @return [Integer] # - # source://pry//lib/pry/code.rb#316 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # @param [Integer] line_number line number starting from 1 # @return [Array] a list of open modules. # - # source://pry//lib/pry/code.rb#302 + # pkg:gem/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 + # pkg:gem/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] + # @param [String] line # @return [void] # - # source://pry//lib/pry/code.rb#102 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/code.rb:309 def raw; end # Filter the lines using the given block. # - # @return [Code] # @yield [LOC] + # @return [Code] # - # source://pry//lib/pry/code.rb#122 + # pkg:gem/pry#lib/pry/code.rb:122 def reject(&block); end # Filter the lines using the given block. # - # @return [Code] # @yield [LOC] + # @return [Code] # - # source://pry//lib/pry/code.rb#112 + # pkg:gem/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] + # @param [Integer] start_line + # @param [Integer] num_lines # @return [Code] # - # source://pry//lib/pry/code.rb#150 + # pkg:gem/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 + # pkg:gem/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?] + # @param [Integer?] spaces # @return [Code] # - # source://pry//lib/pry/code.rb#244 + # pkg:gem/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?] + # @param [Boolean?] y_n # @return [Code] # - # source://pry//lib/pry/code.rb#221 + # pkg:gem/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?] + # @param [Integer?] lineno # @return [Code] # - # source://pry//lib/pry/code.rb#232 + # pkg:gem/pry#lib/pry/code.rb:232 def with_marker(lineno = T.unsafe(nil)); end protected @@ -1503,51 +1412,49 @@ class Pry::Code # An abstraction of the `dup.instance_eval` pattern used throughout this # class. # - # source://pry//lib/pry/code.rb#353 + # pkg:gem/pry#lib/pry/code.rb:353 def alter(&block); end private # Check whether String responds to missing methods. # - # @return [Boolean] - # - # source://pry//lib/pry/code.rb#345 + # pkg:gem/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. + # @param [String] filename The name of a file, or "(pry)". + # @param [Symbol] code_type The type of code the file contains. # @return [Code] # - # source://pry//lib/pry/code.rb#42 + # pkg:gem/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 + # @param [::Method, UnboundMethod, Proc, Pry::Method] meth The method # object. - # @param start_line [Integer, nil] The line number to start on, or nil to + # @param [Integer, nil] start_line 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 + # pkg:gem/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) + # @param [Module, Class] mod The module (or class) of interest. + # @param [Integer] candidate_rank 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 + # @param [Integer, nil] start_line 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 + # pkg:gem/pry#lib/pry/code.rb:69 def from_module(mod, candidate_rank = T.unsafe(nil), start_line = T.unsafe(nil)); end end end @@ -1556,73 +1463,59 @@ end # # @api private # -# source://pry//lib/pry/code/code_range.rb#8 +# pkg:gem/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 + # @param [Integer] start_line + # @param [Integer?] end_line # - # source://pry//lib/pry/code/code_range.rb#11 + # pkg:gem/pry#lib/pry/code/code_range.rb:11 def initialize(start_line, end_line = T.unsafe(nil)); end - # @api private - # @param lines [Array] + # @param [Array] lines # @return [Range] # - # source://pry//lib/pry/code/code_range.rb#19 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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] + # @param [Array] lines # @return [Array] # - # source://pry//lib/pry/code/code_range.rb#45 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/code/code_range.rb:25 def start_line; end end @@ -1638,112 +1531,97 @@ end # loc = LOC.new("def example\n :example\nend", 1) # puts loc.line # def example -# :example +# :example # end # #=> nil # # loc.indent(3) # loc.line #=> " def example\n :example\nend" # -# source://pry//lib/pry/code/loc.rb#23 +# pkg:gem/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 + # @param [String] line The line of code. + # @param [Integer] lineno The position of the +line+. # - # source://pry//lib/pry/code/loc.rb#29 + # pkg:gem/pry#lib/pry/code/loc.rb:29 def initialize(line, lineno); end - # @api private # @return [Boolean] # - # source://pry//lib/pry/code/loc.rb#34 + # pkg:gem/pry#lib/pry/code/loc.rb:34 def ==(other); end # Prepends the line number `lineno` to the `line`. # - # @api private - # @param max_width [Integer] + # @param [Integer] max_width # @return [void] # - # source://pry//lib/pry/code/loc.rb#64 + # pkg:gem/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 + # @param [Integer] marker_lineno 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 + # pkg:gem/pry#lib/pry/code/loc.rb:81 def add_marker(marker_lineno); end # Paints the `line` of code. # - # @api private - # @param code_type [Symbol] + # @param [Symbol] code_type # @return [void] # - # source://pry//lib/pry/code/loc.rb#56 + # pkg:gem/pry#lib/pry/code/loc.rb:56 def colorize(code_type); end - # @api private - # - # source://pry//lib/pry/code/loc.rb#38 + # pkg:gem/pry#lib/pry/code/loc.rb:38 def dup; end - # @api private - # - # source://pry//lib/pry/code/loc.rb#98 + # pkg:gem/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] + # @param [Integer] distance # @return [void] # - # source://pry//lib/pry/code/loc.rb#94 + # pkg:gem/pry#lib/pry/code/loc.rb:94 def indent(distance); end - # @api private # @return [String] # - # source://pry//lib/pry/code/loc.rb#43 + # pkg:gem/pry#lib/pry/code/loc.rb:43 def line; end - # @api private # @return [Integer] # - # source://pry//lib/pry/code/loc.rb#48 + # pkg:gem/pry#lib/pry/code/loc.rb:48 def lineno; end - # @api private # @return [Array] # - # source://pry//lib/pry/code/loc.rb#25 + # pkg:gem/pry#lib/pry/code/loc.rb:25 def tuple; end end -# source://pry//lib/pry/code/code_file.rb#6 +# pkg:gem/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 + # @param [String] filename The name of a file with code to be detected + # @param [Symbol] code_type The type of code the `filename` contains # - # source://pry//lib/pry/code/code_file.rb#41 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/code/code_file.rb:37 def code_type; end private @@ -1752,64 +1630,63 @@ class Pry::CodeFile # readable for some reason. # @return [String] absolute path for the given `filename`. # - # source://pry//lib/pry/code/code_file.rb#64 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/code/code_file.rb:80 def code_path; end # @return [String] # - # source://pry//lib/pry/code/code_file.rb#110 + # pkg:gem/pry#lib/pry/code/code_file.rb:110 def from_load_path; end # @return [String] # - # source://pry//lib/pry/code/code_file.rb#105 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/code/code_file.rb:100 def from_pwd; end - # @param path [String] + # @param [String] path # @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 + # pkg:gem/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 + # @param [String] filename + # @param [Symbol] default (: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 + # pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 @@ -1831,81 +1708,55 @@ Pry::CodeFile::INITIAL_PWD = T.let(T.unsafe(nil), String) # commands/classes/candidates/methods and so on just share a very # ill-defined interface. # -# source://pry//lib/pry/code_object.rb#22 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/code_object.rb:118 def default_lookup; end # when no parameter is given (i.e CodeObject.lookup(nil)), then we # lookup the 'current object' from the binding. # - # source://pry//lib/pry/code_object.rb#102 + # pkg:gem/pry#lib/pry/code_object.rb:102 def empty_lookup; end - # source://pry//lib/pry/code_object.rb#136 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/code_object.rb:78 def target=(_arg0); end private @@ -1915,110 +1766,101 @@ class Pry::CodeObject # 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] + # @param [String] str # @return [Boolean] Whether the string looks like an instance method. # - # source://pry//lib/pry/code_object.rb#163 + # pkg:gem/pry#lib/pry/code_object.rb:163 def looks_like_an_instance_method?(str); end # grab the nth (`super_level`) super of `obj + # @param [Object] obj + # @param [Fixnum] super_level How far up the super chain to ascend. # - # @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 + # pkg:gem/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 + # @param [String] str The string to lookup # @return [Boolean] # - # source://pry//lib/pry/code_object.rb#173 + # pkg:gem/pry#lib/pry/code_object.rb:173 def safe_to_evaluate?(str); end - # @return [Boolean] - # - # source://pry//lib/pry/code_object.rb#152 + # pkg:gem/pry#lib/pry/code_object.rb:152 def sourcable_object?(obj); end - # source://pry//lib/pry/code_object.rb#181 + # pkg:gem/pry#lib/pry/code_object.rb:181 def target_self; end class << self - # source://pry//lib/pry/code_object.rb#69 + # pkg:gem/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 +# pkg:gem/pry#lib/pry/code_object.rb:23 module Pry::CodeObject::Helpers - # @return [Boolean] - # - # source://pry//lib/pry/code_object.rb#30 + # pkg:gem/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. + # @note If a module defined by C was extended with a lot of methods written + # in Ruby, this method would fail. # - # source://pry//lib/pry/code_object.rb#46 + # pkg:gem/pry#lib/pry/code_object.rb:46 def c_module?; end - # @return [Boolean] - # - # source://pry//lib/pry/code_object.rb#38 + # pkg:gem/pry#lib/pry/code_object.rb:38 def command?; end - # @return [Boolean] - # - # source://pry//lib/pry/code_object.rb#34 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/pry#lib/pry/color_printer.rb:8 class Pry::ColorPrinter < ::PP - # source://pry//lib/pry/color_printer.rb#25 + # pkg:gem/pry#lib/pry/color_printer.rb:25 def pp(object); end - # source://pry//lib/pry/color_printer.rb#37 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/color_printer.rb:49 def highlight_object_literal(object_literal); end - # source://pry//lib/pry/color_printer.rb#55 + # pkg:gem/pry#lib/pry/color_printer.rb:55 def inspect_object(object); end class << self - # source://pry//lib/pry/color_printer.rb#11 + # pkg:gem/pry#lib/pry/color_printer.rb:11 def default(_output, value, pry_instance); end - # source://pry//lib/pry/color_printer.rb#18 + # pkg:gem/pry#lib/pry/color_printer.rb:18 def pp(obj, output = T.unsafe(nil), max_width = T.unsafe(nil)); end end end +# The super-class of all commands, new commands should be created by calling +# {Pry::CommandSet#command} which creates a BlockCommand or +# {Pry::CommandSet#create_command} which creates a ClassCommand. Please don't +# use this class directly. # N.B. using a regular expression here so that "raise-up 'foo'" does the right thing. # -# source://pry//lib/pry/command.rb#11 +# pkg:gem/pry#lib/pry/command.rb:11 class Pry::Command include ::Pry::Helpers::BaseHelpers include ::Pry::Helpers::OptionsHelpers @@ -2028,238 +1870,180 @@ class Pry::Command extend ::Pry::CodeObject::Helpers # Instantiate a command, in preparation for calling it. + # @param [Hash] context The runtime context to use with this command. # - # @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 + # pkg:gem/pry#lib/pry/command.rb:230 def initialize(context = T.unsafe(nil)); end - # source://pry//lib/pry/command.rb#292 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/command.rb:218 def _pry_=(_arg0); end - # Returns the value of attribute arg_string. - # - # source://pry//lib/pry/command.rb#213 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/command.rb:213 def arg_string=(_arg0); end - # source://pry//lib/pry/command.rb#253 + # pkg:gem/pry#lib/pry/command.rb:253 def block; end - # Returns the value of attribute captures. - # - # source://pry//lib/pry/command.rb#211 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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" + # puts "block content" # end # - # source://pry//lib/pry/command.rb#226 + # pkg:gem/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" + # puts "block content" # end # - # source://pry//lib/pry/command.rb#226 + # pkg:gem/pry#lib/pry/command.rb:226 def command_block=(_arg0); end - # source://pry//lib/pry/command.rb#261 + # pkg:gem/pry#lib/pry/command.rb:261 def command_name; end - # source://pry//lib/pry/command.rb#257 + # pkg:gem/pry#lib/pry/command.rb:257 def command_options; end - # Returns the value of attribute command_set. - # - # source://pry//lib/pry/command.rb#215 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/command.rb:215 def command_set=(_arg0); end - # source://pry//lib/pry/command.rb#284 + # pkg:gem/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 + # @param [String] _search The line typed so far + # @return [Array] Completion words # - # source://pry//lib/pry/command.rb#411 + # pkg:gem/pry#lib/pry/command.rb:411 def complete(_search); end - # Returns the value of attribute context. - # - # source://pry//lib/pry/command.rb#214 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/command.rb:214 def context=(_arg0); end - # source://pry//lib/pry/command.rb#249 + # pkg:gem/pry#lib/pry/command.rb:249 def description; end - # Returns the value of attribute eval_string. - # - # source://pry//lib/pry/command.rb#212 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/command.rb:212 def eval_string=(_arg0); end - # Returns the value of attribute hooks. - # - # source://pry//lib/pry/command.rb#216 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/command.rb:216 def hooks=(_arg0); end # Revaluate the string (str) and perform interpolation. + # @param [String] str The string to reevaluate with 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 + # pkg:gem/pry#lib/pry/command.rb:318 def interpolate_string(str); end - # source://pry//lib/pry/command.rb#245 + # pkg:gem/pry#lib/pry/command.rb:245 def match; end # Make those properties accessible to instances # - # source://pry//lib/pry/command.rb#241 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # @param [String] line The line to process # @return [Object, Command::VOID_VALUE] # - # source://pry//lib/pry/command.rb#394 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/command.rb:217 def pry_instance=(_arg0); end # Run a command from another command. - # + # @param [String] command_string The string that invokes the command + # @param [Array] args Further arguments to pass to the 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 + # pkg:gem/pry#lib/pry/command.rb:278 def run(command_string, *args); end - # source://pry//lib/pry/command.rb#265 + # pkg:gem/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. + # @example + # state.my_state = "my state" # this will not conflict with any + # # `state.my_state` used in another command. # - # source://pry//lib/pry/command.rb#309 + # pkg:gem/pry#lib/pry/command.rb:309 def state; end - # Returns the value of attribute target. - # - # source://pry//lib/pry/command.rb#210 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/command.rb:298 def target_self; end # Extract necessary information from a line that Command.matches? this @@ -2274,21 +2058,21 @@ class Pry::Command # [Array] the arguments obtained by splitting the arg_string # ``` # - # @param val [String] The line of input + # @param [String] val The line of input # @return [Array] # - # source://pry//lib/pry/command.rb#356 + # pkg:gem/pry#lib/pry/command.rb:356 def tokenize(val); end - # source://pry//lib/pry/command.rb#288 + # pkg:gem/pry#lib/pry/command.rb:288 def void; end private - # source://pry//lib/pry/command.rb#485 + # pkg:gem/pry#lib/pry/command.rb:485 def after_hooks; end - # source://pry//lib/pry/command.rb#481 + # pkg:gem/pry#lib/pry/command.rb:481 def before_hooks; end # Run the command with the given `args`. @@ -2296,104 +2080,94 @@ class Pry::Command # This is a public wrapper around `#call` which ensures all preconditions # are met. # - # @param args [Array] The arguments to pass to this command. + # @param [Array] args 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 + # pkg:gem/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` + # @param [Array] args The arguments to `#call` # @return [Object] The return value from `#call` # - # source://pry//lib/pry/command.rb#492 + # pkg:gem/pry#lib/pry/command.rb:492 def call_with_hooks(*args); end - # source://pry//lib/pry/command.rb#476 + # pkg:gem/pry#lib/pry/command.rb:476 def find_hooks(event); end # Normalize method arguments according to its arity. # - # @param method [Integer] - # @param args [Array] + # @param [Integer] method + # @param [Array] args # @return [Array] a (possibly shorter) array of the arguments to pass # - # source://pry//lib/pry/command.rb#509 + # pkg:gem/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. + # @param [String] arg_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 + # pkg:gem/pry#lib/pry/command.rb:451 def pass_block(arg_string); end - # source://pry//lib/pry/command.rb#436 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/command.rb:61 def banner(arg = T.unsafe(nil)); end - # source://pry//lib/pry/command.rb#66 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/command.rb:30 def block=(_arg0); end - # source://pry//lib/pry/command.rb#109 + # pkg:gem/pry#lib/pry/command.rb:109 def command_name; end # Define or get the command's options # - # source://pry//lib/pry/command.rb#51 + # pkg:gem/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. + # Define or get the command's options # - # source://pry//lib/pry/command.rb#32 + # pkg:gem/pry#lib/pry/command.rb:32 def command_options=(_arg0); end - # source://pry//lib/pry/command.rb#165 + # pkg:gem/pry#lib/pry/command.rb:165 def command_regex; end - # source://pry//lib/pry/command.rb#172 + # pkg:gem/pry#lib/pry/command.rb:172 def convert_to_regex(obj); end - # source://pry//lib/pry/command.rb#89 + # pkg:gem/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 + # pkg:gem/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. + # Define or get the command's description # - # source://pry//lib/pry/command.rb#31 + # pkg:gem/pry#lib/pry/command.rb:31 def description=(_arg0); end - # source://pry//lib/pry/command.rb#75 + # pkg:gem/pry#lib/pry/command.rb:75 def doc; end - # source://pry//lib/pry/command.rb#79 + # pkg:gem/pry#lib/pry/command.rb:82 def file; end # The group in which the command should be displayed in "help" output. @@ -2401,23 +2175,19 @@ class Pry::Command # manually overridden if necessary. # Group should not be changed once it is initialized. # - # source://pry//lib/pry/command.rb#185 + # pkg:gem/pry#lib/pry/command.rb:185 def group(name = T.unsafe(nil)); end - # source://pry//lib/pry/command.rb#105 + # pkg:gem/pry#lib/pry/command.rb:105 def inspect; end - # source://pry//lib/pry/command.rb#84 + # pkg:gem/pry#lib/pry/command.rb:87 def line; end - # source://pry//lib/pry/command.rb#35 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/command.rb:33 def match=(_arg0); end # How well does this command match the given line? @@ -2433,147 +2203,136 @@ class Pry::Command # /\.(.*)/.match_score(".foo") #=> 1 # /\.*(.*)/.match_score("...foo") #=> 3 # 'hi'.match_score("hi there") #=> 2 - # @param val [String] A line input at the REPL + # + # @param [String] val A line input at the REPL # @return [Fixnum] # - # source://pry//lib/pry/command.rb#153 + # pkg:gem/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 + # @param [String] val A line input at the REPL # @return [Boolean] # - # source://pry//lib/pry/command.rb#133 + # pkg:gem/pry#lib/pry/command.rb:133 def matches?(val); end - # source://pry//lib/pry/command.rb#101 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/command.rb:57 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 + # pkg:gem/pry#lib/pry/command.rb:58 def options=(_arg0); end - # source://pry//lib/pry/command.rb#70 + # pkg:gem/pry#lib/pry/command.rb:70 def source; end - # source://pry//lib/pry/command.rb#79 + # pkg:gem/pry#lib/pry/command.rb:79 def source_file; end - # source://pry//lib/pry/command.rb#84 + # pkg:gem/pry#lib/pry/command.rb:84 def source_line; end - # source://pry//lib/pry/command.rb#202 + # pkg:gem/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}) + # @param [String, Regex] match The thing that triggers this command + # @param [String] description The description to appear in `help` + # @param [Hash] options Behavioral options (see {Pry::CommandSet#command}) + # @param [Module] helpers A module of helper functions to be included. # @yield optional, used for BlockCommands + # @return [Class] (a subclass of {Pry::Command}) # - # source://pry//lib/pry/command.rb#120 + # pkg:gem/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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/amend_line.rb:33 def amend_input; end - # source://pry//lib/pry/commands/amend_line.rb#47 + # pkg:gem/pry#lib/pry/commands/amend_line.rb:47 def delete_from_array(array, range); end - # source://pry//lib/pry/commands/amend_line.rb#51 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/amend_line.rb:90 def line_range; end - # source://pry//lib/pry/commands/amend_line.rb#56 + # pkg:gem/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 + # pkg:gem/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 # identified 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. + # @param [Fixnum] start_line_number One-indexed number. + # @param [Fixnum] end_line_number One-indexed number. # @return [Range] The zero-indexed range. # - # source://pry//lib/pry/commands/amend_line.rb#83 + # pkg:gem/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 +# pkg:gem/pry#lib/pry/commands/bang.rb:5 class Pry::Command::Bang < ::Pry::ClassCommand - # source://pry//lib/pry/commands/bang.rb#16 + # pkg:gem/pry#lib/pry/commands/bang.rb:16 def process; end end -# source://pry//lib/pry/commands/bang_pry.rb#5 +# pkg:gem/pry#lib/pry/commands/bang_pry.rb:5 class Pry::Command::BangPry < ::Pry::ClassCommand - # source://pry//lib/pry/commands/bang_pry.rb#14 + # pkg:gem/pry#lib/pry/commands/bang_pry.rb:14 def process; end end -# source://pry//lib/pry/commands/cat.rb#5 +# pkg:gem/pry#lib/pry/commands/cat.rb:5 class Pry::Command::Cat < ::Pry::ClassCommand - # source://pry//lib/pry/commands/cat.rb#53 + # pkg:gem/pry#lib/pry/commands/cat.rb:53 def complete(search); end - # source://pry//lib/pry/commands/cat.rb#57 + # pkg:gem/pry#lib/pry/commands/cat.rb:57 def load_path_completions; end - # source://pry//lib/pry/commands/cat.rb#23 + # pkg:gem/pry#lib/pry/commands/cat.rb:23 def options(opt); end - # source://pry//lib/pry/commands/cat.rb#38 + # pkg:gem/pry#lib/pry/commands/cat.rb:38 def process; end end -# source://pry//lib/pry/commands/cat/abstract_formatter.rb#6 +# pkg:gem/pry#lib/pry/commands/cat/abstract_formatter.rb:6 class Pry::Command::Cat::AbstractFormatter include ::Pry::Helpers::OptionsHelpers include ::Pry::Helpers::CommandHelpers @@ -2581,234 +2340,194 @@ class Pry::Command::Cat::AbstractFormatter private - # source://pry//lib/pry/commands/cat/abstract_formatter.rb#26 + # pkg:gem/pry#lib/pry/commands/cat/abstract_formatter.rb:26 def between_lines; end - # source://pry//lib/pry/commands/cat/abstract_formatter.rb#18 + # pkg:gem/pry#lib/pry/commands/cat/abstract_formatter.rb:18 def code_type; end - # source://pry//lib/pry/commands/cat/abstract_formatter.rb#12 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/cat/exception_formatter.rb:7 def ex; end - # source://pry//lib/pry/commands/cat/exception_formatter.rb#18 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/cat/exception_formatter.rb:9 def pry_instance; end private - # source://pry//lib/pry/commands/cat/exception_formatter.rb#56 + # pkg:gem/pry#lib/pry/commands/cat/exception_formatter.rb:56 def backtrace_file; end - # source://pry//lib/pry/commands/cat/exception_formatter.rb#37 + # pkg:gem/pry#lib/pry/commands/cat/exception_formatter.rb:37 def backtrace_level; end - # source://pry//lib/pry/commands/cat/exception_formatter.rb#60 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/cat/exception_formatter.rb:64 def check_for_errors; end - # source://pry//lib/pry/commands/cat/exception_formatter.rb#33 + # pkg:gem/pry#lib/pry/commands/cat/exception_formatter.rb:33 def code_window_size; end - # source://pry//lib/pry/commands/cat/exception_formatter.rb#78 + # pkg:gem/pry#lib/pry/commands/cat/exception_formatter.rb:78 def header; end - # source://pry//lib/pry/commands/cat/exception_formatter.rb#52 + # pkg:gem/pry#lib/pry/commands/cat/exception_formatter.rb:52 def increment_backtrace_level; end - # source://pry//lib/pry/commands/cat/exception_formatter.rb#71 + # pkg:gem/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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/cat/file_formatter.rb:9 def pry_instance; end private - # source://pry//lib/pry/commands/cat/file_formatter.rb#55 + # pkg:gem/pry#lib/pry/commands/cat/file_formatter.rb:55 def code_type; end - # source://pry//lib/pry/commands/cat/file_formatter.rb#43 + # pkg:gem/pry#lib/pry/commands/cat/file_formatter.rb:43 def code_window_size; end - # source://pry//lib/pry/commands/cat/file_formatter.rb#47 + # pkg:gem/pry#lib/pry/commands/cat/file_formatter.rb:47 def decorate(content); end - # source://pry//lib/pry/commands/cat/file_formatter.rb#59 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/cat/file_formatter.rb:35 def file_name; end - # source://pry//lib/pry/commands/cat/file_formatter.rb#39 + # pkg:gem/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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/cat/input_expression_formatter.rb:33 def selected_input_items; end end -# source://pry//lib/pry/commands/cd.rb#5 +# pkg:gem/pry#lib/pry/commands/cd.rb:5 class Pry::Command::Cd < ::Pry::ClassCommand - # source://pry//lib/pry/commands/cd.rb#27 + # pkg:gem/pry#lib/pry/commands/cd.rb:27 def process; end end -# source://pry//lib/pry/commands/change_inspector.rb#5 +# pkg:gem/pry#lib/pry/commands/change_inspector.rb:5 class Pry::Command::ChangeInspector < ::Pry::ClassCommand - # source://pry//lib/pry/commands/change_inspector.rb#17 + # pkg:gem/pry#lib/pry/commands/change_inspector.rb:17 def process(inspector); end private - # source://pry//lib/pry/commands/change_inspector.rb#28 + # pkg:gem/pry#lib/pry/commands/change_inspector.rb:28 def inspector_map; end end -# source://pry//lib/pry/commands/change_prompt.rb#5 +# pkg:gem/pry#lib/pry/commands/change_prompt.rb:5 class Pry::Command::ChangePrompt < ::Pry::ClassCommand - # source://pry//lib/pry/commands/change_prompt.rb#16 + # pkg:gem/pry#lib/pry/commands/change_prompt.rb:16 def options(opt); end - # source://pry//lib/pry/commands/change_prompt.rb#20 + # pkg:gem/pry#lib/pry/commands/change_prompt.rb:20 def process(prompt); end private - # source://pry//lib/pry/commands/change_prompt.rb#38 + # pkg:gem/pry#lib/pry/commands/change_prompt.rb:38 def change_prompt(prompt); end - # source://pry//lib/pry/commands/change_prompt.rb#30 + # pkg:gem/pry#lib/pry/commands/change_prompt.rb:30 def list_prompts; end end -# source://pry//lib/pry/commands/clear_screen.rb#5 +# pkg:gem/pry#lib/pry/commands/clear_screen.rb:5 class Pry::Command::ClearScreen < ::Pry::ClassCommand - # source://pry//lib/pry/commands/clear_screen.rb#10 + # pkg:gem/pry#lib/pry/commands/clear_screen.rb:10 def process; end end -# source://pry//lib/pry/commands/code_collector.rb#5 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/code_collector.rb:86 def code_object; end # The content (i.e code/docs) for the selected object. @@ -2819,32 +2538,30 @@ class Pry::Command::CodeCollector # # @return [String] # - # source://pry//lib/pry/commands/code_collector.rb#60 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/code_collector.rb:9 def opts; end # The selected `pry_instance.input_ring` as a string, as specified by @@ -2852,12 +2569,10 @@ class Pry::Command::CodeCollector # # @return [String] # - # source://pry//lib/pry/commands/code_collector.rb#116 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/code_collector.rb:10 def pry_instance; end # The selected `pry_instance.output_ring` as a string, as specified by @@ -2865,279 +2580,217 @@ class Pry::Command::CodeCollector # # @return [String] # - # source://pry//lib/pry/commands/code_collector.rb#104 + # pkg:gem/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] + # @param [String] content + # @param [Range, Fixnum] range # @return [String] The string restricted to the given range # - # source://pry//lib/pry/commands/code_collector.rb#96 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/code_collector.rb:134 def bad_option_combination?; end - # source://pry//lib/pry/commands/code_collector.rb#153 + # pkg:gem/pry#lib/pry/commands/code_collector.rb:153 def code_object_doc; end - # source://pry//lib/pry/commands/code_collector.rb#157 + # pkg:gem/pry#lib/pry/commands/code_collector.rb:157 def code_object_source_or_file; end - # source://pry//lib/pry/commands/code_collector.rb#175 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/code_collector.rb:171 def could_not_locate(name); end - # source://pry//lib/pry/commands/code_collector.rb#161 + # pkg:gem/pry#lib/pry/commands/code_collector.rb:161 def file_content; end - # source://pry//lib/pry/commands/code_collector.rb#139 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/pry#lib/pry/commands/disable_pry.rb:5 class Pry::Command::DisablePry < ::Pry::ClassCommand - # source://pry//lib/pry/commands/disable_pry.rb#23 + # pkg:gem/pry#lib/pry/commands/disable_pry.rb:23 def process; end end -# source://pry//lib/pry/commands/edit.rb#5 +# pkg:gem/pry#lib/pry/commands/edit.rb:5 class Pry::Command::Edit < ::Pry::ClassCommand - # source://pry//lib/pry/commands/edit.rb#91 + # pkg:gem/pry#lib/pry/commands/edit.rb:91 def apply_runtime_patch; end - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#174 + # pkg:gem/pry#lib/pry/commands/edit.rb:174 def bad_option_combination?; end - # source://pry//lib/pry/commands/edit.rb#154 + # pkg:gem/pry#lib/pry/commands/edit.rb:154 def code_object; end - # @raise [CommandError] - # - # source://pry//lib/pry/commands/edit.rb#107 + # pkg:gem/pry#lib/pry/commands/edit.rb:107 def ensure_file_name_is_valid(file_name); end - # source://pry//lib/pry/commands/edit.rb#121 + # pkg:gem/pry#lib/pry/commands/edit.rb:121 def file_and_line; end - # source://pry//lib/pry/commands/edit.rb#117 + # pkg:gem/pry#lib/pry/commands/edit.rb:117 def file_and_line_for_current_exception; end - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#80 + # pkg:gem/pry#lib/pry/commands/edit.rb:80 def file_based_exception?; end - # source://pry//lib/pry/commands/edit.rb#137 + # pkg:gem/pry#lib/pry/commands/edit.rb:137 def file_edit; end - # source://pry//lib/pry/commands/edit.rb#150 + # pkg:gem/pry#lib/pry/commands/edit.rb:150 def filename_argument; end - # source://pry//lib/pry/commands/edit.rb#205 + # pkg:gem/pry#lib/pry/commands/edit.rb:205 def initial_temp_file_content; end - # source://pry//lib/pry/commands/edit.rb#182 + # pkg:gem/pry#lib/pry/commands/edit.rb:182 def input_expression; end - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#197 + # pkg:gem/pry#lib/pry/commands/edit.rb:197 def never_reload?; end - # source://pry//lib/pry/commands/edit.rb#27 + # pkg:gem/pry#lib/pry/commands/edit.rb:27 def options(opt); end - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#170 + # pkg:gem/pry#lib/pry/commands/edit.rb:170 def patch_exception?; end - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#165 + # pkg:gem/pry#lib/pry/commands/edit.rb:165 def previously_patched?(code_object); end - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#217 + # pkg:gem/pry#lib/pry/commands/edit.rb:217 def probably_a_file?(str); end - # source://pry//lib/pry/commands/edit.rb#48 + # pkg:gem/pry#lib/pry/commands/edit.rb:48 def process; end - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#160 + # pkg:gem/pry#lib/pry/commands/edit.rb:160 def pry_method?(code_object); end - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#201 + # pkg:gem/pry#lib/pry/commands/edit.rb:201 def reload?(file_name = T.unsafe(nil)); end - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#193 + # pkg:gem/pry#lib/pry/commands/edit.rb:193 def reloadable?; end - # source://pry//lib/pry/commands/edit.rb#71 + # pkg:gem/pry#lib/pry/commands/edit.rb:71 def repl_edit; end - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#66 + # pkg:gem/pry#lib/pry/commands/edit.rb:66 def repl_edit?; end - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#84 + # pkg:gem/pry#lib/pry/commands/edit.rb:84 def runtime_patch?; end end -# source://pry//lib/pry/commands/edit/exception_patcher.rb#6 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/pry#lib/pry/commands/exit.rb:5 class Pry::Command::Exit < ::Pry::ClassCommand - # source://pry//lib/pry/commands/exit.rb#25 + # pkg:gem/pry#lib/pry/commands/exit.rb:25 def process; end - # source://pry//lib/pry/commands/exit.rb#34 + # pkg:gem/pry#lib/pry/commands/exit.rb:34 def process_pop_and_return; end end -# source://pry//lib/pry/commands/exit_all.rb#5 +# pkg:gem/pry#lib/pry/commands/exit_all.rb:5 class Pry::Command::ExitAll < ::Pry::ClassCommand - # source://pry//lib/pry/commands/exit_all.rb#18 + # pkg:gem/pry#lib/pry/commands/exit_all.rb:18 def process; end end -# source://pry//lib/pry/commands/exit_program.rb#5 +# pkg:gem/pry#lib/pry/commands/exit_program.rb:5 class Pry::Command::ExitProgram < ::Pry::ClassCommand - # source://pry//lib/pry/commands/exit_program.rb#18 + # pkg:gem/pry#lib/pry/commands/exit_program.rb:18 def process; end end -# source://pry//lib/pry/commands/find_method.rb#5 +# pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/find_method.rb:31 def options(opt); end - # source://pry//lib/pry/commands/find_method.rb#36 + # pkg:gem/pry#lib/pry/commands/find_method.rb:36 def process; end private @@ -3145,64 +2798,64 @@ class Pry::Command::FindMethod < ::Pry::ClassCommand # 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 + # pkg:gem/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 + # @param [Module] namespace The namespace to search # @return [Array] # - # source://pry//lib/pry/commands/find_method.rb#186 + # pkg:gem/pry#lib/pry/commands/find_method.rb:186 def content_search(namespace); end - # source://pry//lib/pry/commands/find_method.rb#108 + # pkg:gem/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 + # @param [Module] namespace The namespace to search # @return [Array] # - # source://pry//lib/pry/commands/find_method.rb#174 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/find_method.rb:48 def pattern; end # pretty-print a list of matching methods. # - # @param matches [Array] + # @param [Array] matches # - # source://pry//lib/pry/commands/find_method.rb#80 + # pkg:gem/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 + # pkg:gem/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) + # @param [Module] klass The namespace in which to start the search. + # @param [Hash] done The namespaces we've already visited (private) # @yieldparam klass Each class/module in the namespace. # - # source://pry//lib/pry/commands/find_method.rb#120 + # pkg:gem/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 + # @param [Module] namespace The namespace in which to search. + # @yieldparam [Method] method The method to test # @yieldreturn [Boolean] + # @return [Array] # - # source://pry//lib/pry/commands/find_method.rb#150 + # pkg:gem/pry#lib/pry/commands/find_method.rb:150 def search_all_methods(namespace); end # The class to search for methods. @@ -3210,89 +2863,88 @@ class Pry::Command::FindMethod < ::Pry::ClassCommand # instance, return its class. If no search object is given # search `target_self`. # - # source://pry//lib/pry/commands/find_method.rb#67 + # pkg:gem/pry#lib/pry/commands/find_method.rb:67 def search_class; end # Output the result of the search. # - # @param matches [Array] + # @param [Array] matches # - # source://pry//lib/pry/commands/find_method.rb#55 + # pkg:gem/pry#lib/pry/commands/find_method.rb:55 def show_search_results(matches); end end -# source://pry//lib/pry/commands/fix_indent.rb#5 +# pkg:gem/pry#lib/pry/commands/fix_indent.rb:5 class Pry::Command::FixIndent < ::Pry::ClassCommand - # source://pry//lib/pry/commands/fix_indent.rb#15 + # pkg:gem/pry#lib/pry/commands/fix_indent.rb:15 def process; end end -# source://pry//lib/pry/commands/help.rb#5 +# pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/help.rb:29 def command_groups; end # Display help for an individual command. # - # @param command [Pry::Command] + # @param [Pry::Command] command # - # source://pry//lib/pry/commands/help.rb#125 + # pkg:gem/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] + # @param [String] search The string to search for. # - # source://pry//lib/pry/commands/help.rb#111 + # pkg:gem/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. + # @param [String] search The string to search for. # - # source://pry//lib/pry/commands/help.rb#98 + # pkg:gem/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>] + # @param [Hash>] groups # - # source://pry//lib/pry/commands/help.rb#44 + # pkg:gem/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. + # @param [String] search The string to search for. # - # source://pry//lib/pry/commands/help.rb#86 + # pkg:gem/pry#lib/pry/commands/help.rb:86 def display_search(search); end - # source://pry//lib/pry/commands/help.rb#159 + # pkg:gem/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] + # @param [String] name The group name. + # @param [Array] commands # @return [String] The generated help string. # - # source://pry//lib/pry/commands/help.rb#62 + # pkg:gem/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] + # @param [String] key # @return [String] # - # source://pry//lib/pry/commands/help.rb#155 + # pkg:gem/pry#lib/pry/commands/help.rb:155 def normalize(key); end - # source://pry//lib/pry/commands/help.rb#33 + # pkg:gem/pry#lib/pry/commands/help.rb:33 def process; end # Find a subset of a hash that matches the user's search term. @@ -3301,45 +2953,44 @@ class Pry::Command::Help < ::Pry::ClassCommand # 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 + # @param [String] search the search term + # @param [Hash] hash the hash to search # - # source://pry//lib/pry/commands/help.rb#137 + # pkg:gem/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 + # @param [Array] commands The commands to sort # @return [Array] commands sorted by listing name. # - # source://pry//lib/pry/commands/help.rb#79 + # pkg:gem/pry#lib/pry/commands/help.rb:79 def sorted_commands(commands); end - # @param groups [Hash] + # @param [Hash] groups # @return [Array] An array of sorted group names. # - # source://pry//lib/pry/commands/help.rb#71 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/help.rb:20 def visible_commands; end end -# source://pry//lib/pry/commands/hist.rb#5 +# pkg:gem/pry#lib/pry/commands/hist.rb:5 class Pry::Command::Hist < ::Pry::ClassCommand - # source://pry//lib/pry/commands/hist.rb#25 + # pkg:gem/pry#lib/pry/commands/hist.rb:25 def options(opt); end - # source://pry//lib/pry/commands/hist.rb#43 + # pkg:gem/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 @@ -3351,14 +3002,15 @@ class Pry::Command::Hist < ::Pry::ClassCommand # 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 + # @param [String] replay_sequence The sequence of commands to be replayed + # (per saltum) # @return [Boolean] `false` if +replay_sequence+ does not contain another # "hist --replay" call # - # source://pry//lib/pry/commands/hist.rb#143 + # pkg:gem/pry#lib/pry/commands/hist.rb:143 def check_for_juxtaposed_replay(replay_sequence); end # Finds history depending on the given switch. @@ -3367,394 +3019,358 @@ class Pry::Command::Hist < ::Pry::ClassCommand # entries in history. Without the switch returns only the entries from the # current Pry session. # - # source://pry//lib/pry/commands/hist.rb#168 + # pkg:gem/pry#lib/pry/commands/hist.rb:168 def find_history; end - # source://pry//lib/pry/commands/hist.rb#105 + # pkg:gem/pry#lib/pry/commands/hist.rb:105 def process_clear; end - # source://pry//lib/pry/commands/hist.rb#78 + # pkg:gem/pry#lib/pry/commands/hist.rb:78 def process_display; end - # source://pry//lib/pry/commands/hist.rb#110 + # pkg:gem/pry#lib/pry/commands/hist.rb:110 def process_replay; end - # source://pry//lib/pry/commands/hist.rb#86 + # pkg:gem/pry#lib/pry/commands/hist.rb:86 def process_save; end end -# source://pry//lib/pry/commands/import_set.rb#5 +# pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/import_set.rb:17 def process(_command_set_name); end end -# source://pry//lib/pry/commands/jump_to.rb#5 +# pkg:gem/pry#lib/pry/commands/jump_to.rb:5 class Pry::Command::JumpTo < ::Pry::ClassCommand - # source://pry//lib/pry/commands/jump_to.rb#14 + # pkg:gem/pry#lib/pry/commands/jump_to.rb:14 def process(break_level); end end -# source://pry//lib/pry/commands/list_inspectors.rb#5 +# pkg:gem/pry#lib/pry/commands/list_inspectors.rb:5 class Pry::Command::ListInspectors < ::Pry::ClassCommand - # source://pry//lib/pry/commands/list_inspectors.rb#16 + # pkg:gem/pry#lib/pry/commands/list_inspectors.rb:16 def process; end private - # source://pry//lib/pry/commands/list_inspectors.rb#28 + # pkg:gem/pry#lib/pry/commands/list_inspectors.rb:28 def inspector_map; end - # @return [Boolean] - # - # source://pry//lib/pry/commands/list_inspectors.rb#36 + # pkg:gem/pry#lib/pry/commands/list_inspectors.rb:36 def selected_inspector?(inspector); end - # source://pry//lib/pry/commands/list_inspectors.rb#32 + # pkg:gem/pry#lib/pry/commands/list_inspectors.rb:32 def selected_text; end end -# source://pry//lib/pry/commands/ls/config.rb#7 +# pkg:gem/pry#lib/pry/commands/ls/config.rb:7 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#64 + # pkg:gem/pry#lib/pry/commands/ls.rb:64 def no_user_opts?; end - # source://pry//lib/pry/commands/ls.rb#31 + # pkg:gem/pry#lib/pry/commands/ls.rb:31 def options(opt); end - # source://pry//lib/pry/commands/ls.rb#69 + # pkg:gem/pry#lib/pry/commands/ls.rb:69 def process; end private - # source://pry//lib/pry/commands/ls.rb#85 + # pkg:gem/pry#lib/pry/commands/ls.rb:85 def error_list; end - # source://pry//lib/pry/commands/ls.rb#105 + # pkg:gem/pry#lib/pry/commands/ls.rb:105 def raise_errors_if_arguments_are_weird; end end -# source://pry//lib/pry/commands/ls/config.rb#8 +# pkg:gem/pry#lib/pry/commands/ls/config.rb:8 class Pry::Command::Ls::Config extend ::Forwardable extend ::Pry::Forwardable - # @return [Config] a new instance of Config - # - # source://pry//lib/pry/commands/ls/config.rb#44 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:44 def initialize(config); end - # source://forwardable/1.3.3/forwardable.rb#231 - def [](*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/commands/ls/config.rb:42 + def [](*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def []=(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/commands/ls/config.rb:42 + def []=(*, **, &); end - # source://pry//lib/pry/commands/ls/config.rb#33 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:33 def builtin_global_color; end - # source://pry//lib/pry/commands/ls/config.rb#37 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:37 def builtin_global_color=(value); end - # source://pry//lib/pry/commands/ls/config.rb#33 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:33 def ceiling; end - # source://pry//lib/pry/commands/ls/config.rb#37 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:37 def ceiling=(value); end - # source://pry//lib/pry/commands/ls/config.rb#33 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:33 def class_constant_color; end - # source://pry//lib/pry/commands/ls/config.rb#37 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:37 def class_constant_color=(value); end - # source://pry//lib/pry/commands/ls/config.rb#33 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:33 def class_var_color; end - # source://pry//lib/pry/commands/ls/config.rb#37 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:37 def class_var_color=(value); end - # source://pry//lib/pry/commands/ls/config.rb#33 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:33 def constant_color; end - # source://pry//lib/pry/commands/ls/config.rb#37 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:37 def constant_color=(value); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/commands/ls/config.rb:42 + def each(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each_pair(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/commands/ls/config.rb:42 + def each_pair(*, **, &); end - # source://pry//lib/pry/commands/ls/config.rb#33 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:33 def exception_constant_color; end - # source://pry//lib/pry/commands/ls/config.rb#37 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:37 def exception_constant_color=(value); end - # source://pry//lib/pry/commands/ls/config.rb#33 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:33 def global_var_color; end - # source://pry//lib/pry/commands/ls/config.rb#37 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:37 def global_var_color=(value); end - # source://pry//lib/pry/commands/ls/config.rb#33 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:33 def heading_color; end - # source://pry//lib/pry/commands/ls/config.rb#37 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:37 def heading_color=(value); end - # source://pry//lib/pry/commands/ls/config.rb#33 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:33 def instance_var_color; end - # source://pry//lib/pry/commands/ls/config.rb#37 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:37 def instance_var_color=(value); end - # source://forwardable/1.3.3/forwardable.rb#231 - def keys(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/commands/ls/config.rb:42 + def keys(*, **, &); end - # source://pry//lib/pry/commands/ls/config.rb#33 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:33 def local_var_color; end - # source://pry//lib/pry/commands/ls/config.rb#37 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:37 def local_var_color=(value); end - # source://pry//lib/pry/commands/ls/config.rb#33 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:33 def method_missing_color; end - # source://pry//lib/pry/commands/ls/config.rb#37 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:37 def method_missing_color=(value); end - # source://pry//lib/pry/commands/ls/config.rb#33 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:33 def private_method_color; end - # source://pry//lib/pry/commands/ls/config.rb#37 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:37 def private_method_color=(value); end - # source://pry//lib/pry/commands/ls/config.rb#33 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:33 def protected_method_color; end - # source://pry//lib/pry/commands/ls/config.rb#37 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:37 def protected_method_color=(value); end - # source://pry//lib/pry/commands/ls/config.rb#33 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:33 def pry_var_color; end - # source://pry//lib/pry/commands/ls/config.rb#37 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:37 def pry_var_color=(value); end - # source://pry//lib/pry/commands/ls/config.rb#33 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:33 def pseudo_global_color; end - # source://pry//lib/pry/commands/ls/config.rb#37 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:37 def pseudo_global_color=(value); end - # source://pry//lib/pry/commands/ls/config.rb#33 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:33 def public_method_color; end - # source://pry//lib/pry/commands/ls/config.rb#37 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:37 def public_method_color=(value); end - # source://pry//lib/pry/commands/ls/config.rb#33 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:33 def separator; end - # source://pry//lib/pry/commands/ls/config.rb#37 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:37 def separator=(value); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_a(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/commands/ls/config.rb:42 + def to_a(*, **, &); end - # source://pry//lib/pry/commands/ls/config.rb#33 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:33 def unloaded_constant_color; end - # source://pry//lib/pry/commands/ls/config.rb#37 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:37 def unloaded_constant_color=(value); end - # source://forwardable/1.3.3/forwardable.rb#231 - def values(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/commands/ls/config.rb:42 + def values(*, **, &); end class << self - # source://pry//lib/pry/commands/ls/config.rb#48 + # pkg:gem/pry#lib/pry/commands/ls/config.rb:48 def default; end end end -# source://pry//lib/pry/commands/ls/config.rb#11 +# pkg:gem/pry#lib/pry/commands/ls/config.rb:11 Pry::Command::Ls::Config::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) -# source://pry//lib/pry/commands/ls/constants.rb#6 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/ls/constants.rb:23 def correct_opts?; end - # source://pry//lib/pry/commands/ls/constants.rb#27 + # pkg:gem/pry#lib/pry/commands/ls/constants.rb:27 def output_self; end private - # source://pry//lib/pry/commands/ls/constants.rb#39 + # pkg:gem/pry#lib/pry/commands/ls/constants.rb:39 def format(mod, constants); end - # @return [Boolean] - # - # source://pry//lib/pry/commands/ls/constants.rb#35 + # pkg:gem/pry#lib/pry/commands/ls/constants.rb:35 def show_deprecated_constants?; end end -# source://pry//lib/pry/commands/ls/constants.rb#7 +# pkg:gem/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/formatter.rb#6 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/ls/formatter.rb:8 def pry_instance; end - # source://pry//lib/pry/commands/ls/formatter.rb#16 + # pkg:gem/pry#lib/pry/commands/ls/formatter.rb:16 def write_out; end private - # source://pry//lib/pry/commands/ls/formatter.rb#24 + # pkg:gem/pry#lib/pry/commands/ls/formatter.rb:24 def color(type, str); end - # @return [Boolean] - # - # source://pry//lib/pry/commands/ls/formatter.rb#41 + # pkg:gem/pry#lib/pry/commands/ls/formatter.rb:41 def correct_opts?; end - # source://pry//lib/pry/commands/ls/formatter.rb#37 + # pkg:gem/pry#lib/pry/commands/ls/formatter.rb:37 def format_value(value); end - # source://pry//lib/pry/commands/ls/formatter.rb#49 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/ls/formatter.rb:45 def output_self; end end -# source://pry//lib/pry/commands/ls/globals.rb#6 +# pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/ls/globals.rb:24 def initialize(opts, pry_instance); end - # source://pry//lib/pry/commands/ls/globals.rb#29 + # pkg:gem/pry#lib/pry/commands/ls/globals.rb:29 def output_self; end private - # source://pry//lib/pry/commands/ls/globals.rb#36 + # pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/ls/grep.rb:7 def initialize(grep_regexp); end - # source://pry//lib/pry/commands/ls/grep.rb#11 + # pkg:gem/pry#lib/pry/commands/ls/grep.rb:11 def regexp; end end -# source://pry//lib/pry/commands/ls/instance_vars.rb#6 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/ls/instance_vars.rb:16 def correct_opts?; end - # source://pry//lib/pry/commands/ls/instance_vars.rb#20 + # pkg:gem/pry#lib/pry/commands/ls/instance_vars.rb:20 def output_self; end private - # source://pry//lib/pry/commands/ls/instance_vars.rb#34 + # pkg:gem/pry#lib/pry/commands/ls/instance_vars.rb:34 def format(type, vars); end end -# source://pry//lib/pry/commands/ls/interrogatable.rb#6 +# pkg:gem/pry#lib/pry/commands/ls/interrogatable.rb:6 module Pry::Command::Ls::Interrogatable private - # source://pry//lib/pry/commands/ls/interrogatable.rb#13 + # pkg:gem/pry#lib/pry/commands/ls/interrogatable.rb:13 def interrogatee_mod; end - # @return [Boolean] - # - # source://pry//lib/pry/commands/ls/interrogatable.rb#9 + # pkg:gem/pry#lib/pry/commands/ls/interrogatable.rb:9 def interrogating_a_module?; end end -# source://pry//lib/pry/commands/ls/jruby_hacks.rb#6 +# pkg:gem/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 + # pkg:gem/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 @@ -3770,107 +3386,95 @@ module Pry::Command::Ls::JRubyHacks # 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 + # pkg:gem/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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/ls/local_names.rb:14 def correct_opts?; end - # source://pry//lib/pry/commands/ls/local_names.rb#18 + # pkg:gem/pry#lib/pry/commands/ls/local_names.rb:18 def output_self; end private - # source://pry//lib/pry/commands/ls/local_names.rb#25 + # pkg:gem/pry#lib/pry/commands/ls/local_names.rb:25 def format(locals); end end -# source://pry//lib/pry/commands/ls/local_vars.rb#6 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/ls/local_vars.rb:13 def output_self; end private - # source://pry//lib/pry/commands/ls/local_vars.rb#34 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/ls/ls_entity.rb:9 def initialize(opts); end - # source://pry//lib/pry/commands/ls/ls_entity.rb#18 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/ls/ls_entity.rb:7 def pry_instance; end private - # source://pry//lib/pry/commands/ls/ls_entity.rb#32 + # pkg:gem/pry#lib/pry/commands/ls/ls_entity.rb:32 def constants; end - # source://pry//lib/pry/commands/ls/ls_entity.rb#56 + # pkg:gem/pry#lib/pry/commands/ls/ls_entity.rb:56 def entities; end - # source://pry//lib/pry/commands/ls/ls_entity.rb#28 + # pkg:gem/pry#lib/pry/commands/ls/ls_entity.rb:28 def globals; end - # source://pry//lib/pry/commands/ls/ls_entity.rb#24 + # pkg:gem/pry#lib/pry/commands/ls/ls_entity.rb:24 def grep(entity); end - # source://pry//lib/pry/commands/ls/ls_entity.rb#44 + # pkg:gem/pry#lib/pry/commands/ls/ls_entity.rb:44 def instance_vars; end - # source://pry//lib/pry/commands/ls/ls_entity.rb#48 + # pkg:gem/pry#lib/pry/commands/ls/ls_entity.rb:48 def local_names; end - # source://pry//lib/pry/commands/ls/ls_entity.rb#52 + # pkg:gem/pry#lib/pry/commands/ls/ls_entity.rb:52 def local_vars; end - # source://pry//lib/pry/commands/ls/ls_entity.rb#36 + # pkg:gem/pry#lib/pry/commands/ls/ls_entity.rb:36 def methods; end - # source://pry//lib/pry/commands/ls/ls_entity.rb#40 + # pkg:gem/pry#lib/pry/commands/ls/ls_entity.rb:40 def self_methods; end end -# source://pry//lib/pry/commands/ls/methods.rb#6 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/ls/methods.rb:22 def output_self; end private @@ -3878,16 +3482,14 @@ class Pry::Command::Ls::Methods < ::Pry::Command::Ls::Formatter # 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 + # pkg:gem/pry#lib/pry/commands/ls/methods.rb:41 def below_ceiling; end - # @return [Boolean] - # - # source://pry//lib/pry/commands/ls/methods.rb#35 + # pkg:gem/pry#lib/pry/commands/ls/methods.rb:35 def correct_opts?; end end -# source://pry//lib/pry/commands/ls/methods_helper.rb#6 +# pkg:gem/pry#lib/pry/commands/ls/methods_helper.rb:6 module Pry::Command::Ls::MethodsHelper include ::Pry::Command::Ls::JRubyHacks @@ -3895,197 +3497,183 @@ module Pry::Command::Ls::MethodsHelper # Get all the methods that we'll want to output. # - # source://pry//lib/pry/commands/ls/methods_helper.rb#12 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/ls/methods_helper.rb:34 def format(methods); end - # source://pry//lib/pry/commands/ls/methods_helper.rb#26 + # pkg:gem/pry#lib/pry/commands/ls/methods_helper.rb:26 def resolution_order; end end -# source://pry//lib/pry/commands/ls/self_methods.rb#6 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/ls/self_methods.rb:28 def correct_opts?; end end -# source://pry//lib/pry/commands/nesting.rb#5 +# pkg:gem/pry#lib/pry/commands/nesting.rb:5 class Pry::Command::Nesting < ::Pry::ClassCommand - # source://pry//lib/pry/commands/nesting.rb#14 + # pkg:gem/pry#lib/pry/commands/nesting.rb:14 def process; end end -# source://pry//lib/pry/commands/play.rb#5 +# pkg:gem/pry#lib/pry/commands/play.rb:5 class Pry::Command::Play < ::Pry::ClassCommand - # source://pry//lib/pry/commands/play.rb#74 + # pkg:gem/pry#lib/pry/commands/play.rb:74 def code_object; end - # source://pry//lib/pry/commands/play.rb#82 + # pkg:gem/pry#lib/pry/commands/play.rb:82 def content; end - # source://pry//lib/pry/commands/play.rb#60 + # pkg:gem/pry#lib/pry/commands/play.rb:60 def content_after_options; end - # source://pry//lib/pry/commands/play.rb#70 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/play.rb:92 def default_file; end - # source://pry//lib/pry/commands/play.rb#102 + # pkg:gem/pry#lib/pry/commands/play.rb:102 def file_content; end - # source://pry//lib/pry/commands/play.rb#29 + # pkg:gem/pry#lib/pry/commands/play.rb:29 def options(opt); end - # source://pry//lib/pry/commands/play.rb#48 + # pkg:gem/pry#lib/pry/commands/play.rb:48 def perform_play; end - # source://pry//lib/pry/commands/play.rb#41 + # pkg:gem/pry#lib/pry/commands/play.rb:41 def process; end - # @return [Boolean] - # - # source://pry//lib/pry/commands/play.rb#78 + # pkg:gem/pry#lib/pry/commands/play.rb:78 def should_use_default_file?; end - # source://pry//lib/pry/commands/play.rb#53 + # pkg:gem/pry#lib/pry/commands/play.rb:53 def show_input; end end -# source://pry//lib/pry/commands/pry_backtrace.rb#5 +# pkg:gem/pry#lib/pry/commands/pry_backtrace.rb:5 class Pry::Command::PryBacktrace < ::Pry::ClassCommand - # source://pry//lib/pry/commands/pry_backtrace.rb#22 + # pkg:gem/pry#lib/pry/commands/pry_backtrace.rb:22 def process; end end -# source://pry//lib/pry/commands/raise_up.rb#6 +# pkg:gem/pry#lib/pry/commands/raise_up.rb:6 class Pry::Command::RaiseUp < ::Pry::ClassCommand - # source://pry//lib/pry/commands/raise_up.rb#27 + # pkg:gem/pry#lib/pry/commands/raise_up.rb:27 def process; end end -# source://pry//lib/pry/commands/reload_code.rb#5 +# pkg:gem/pry#lib/pry/commands/reload_code.rb:5 class Pry::Command::ReloadCode < ::Pry::ClassCommand - # source://pry//lib/pry/commands/reload_code.rb#20 + # pkg:gem/pry#lib/pry/commands/reload_code.rb:20 def process; end private - # @raise [CommandError] - # - # source://pry//lib/pry/commands/reload_code.rb#58 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/reload_code.rb:32 def current_file; end - # source://pry//lib/pry/commands/reload_code.rb#42 + # pkg:gem/pry#lib/pry/commands/reload_code.rb:42 def reload_current_file; end - # source://pry//lib/pry/commands/reload_code.rb#51 + # pkg:gem/pry#lib/pry/commands/reload_code.rb:51 def reload_object(identifier); end end -# source://pry//lib/pry/commands/reset.rb#5 +# pkg:gem/pry#lib/pry/commands/reset.rb:5 class Pry::Command::Reset < ::Pry::ClassCommand - # source://pry//lib/pry/commands/reset.rb#14 + # pkg:gem/pry#lib/pry/commands/reset.rb:14 def process; end end -# source://pry//lib/pry/commands/ri.rb#7 +# pkg:gem/pry#lib/pry/commands/ri.rb:7 class Pry::Command::Ri < ::Pry::ClassCommand - # source://pry//lib/pry/commands/ri.rb#21 + # pkg:gem/pry#lib/pry/commands/ri.rb:21 def process(spec); end end -# source://pry//lib/pry/commands/save_file.rb#5 +# pkg:gem/pry#lib/pry/commands/save_file.rb:5 class Pry::Command::SaveFile < ::Pry::ClassCommand - # source://pry//lib/pry/commands/save_file.rb#50 + # pkg:gem/pry#lib/pry/commands/save_file.rb:50 def display_content; end - # source://pry//lib/pry/commands/save_file.rb#39 + # pkg:gem/pry#lib/pry/commands/save_file.rb:39 def file_name; end - # source://pry//lib/pry/commands/save_file.rb#56 + # pkg:gem/pry#lib/pry/commands/save_file.rb:56 def mode; end - # source://pry//lib/pry/commands/save_file.rb#21 + # pkg:gem/pry#lib/pry/commands/save_file.rb:21 def options(opt); end - # @raise [CommandError] - # - # source://pry//lib/pry/commands/save_file.rb#28 + # pkg:gem/pry#lib/pry/commands/save_file.rb:28 def process; end - # source://pry//lib/pry/commands/save_file.rb#43 + # pkg:gem/pry#lib/pry/commands/save_file.rb:43 def save_file; end end -# source://pry//lib/pry/commands/shell_command.rb#5 +# pkg:gem/pry#lib/pry/commands/shell_command.rb:5 class Pry::Command::ShellCommand < ::Pry::ClassCommand - # source://pry//lib/pry/commands/shell_command.rb#21 + # pkg:gem/pry#lib/pry/commands/shell_command.rb:21 def process(cmd); end private - # source://pry//lib/pry/commands/shell_command.rb#50 + # pkg:gem/pry#lib/pry/commands/shell_command.rb:50 def cd_path_env; end - # @return [Boolean] - # - # source://pry//lib/pry/commands/shell_command.rb#54 + # pkg:gem/pry#lib/pry/commands/shell_command.rb:54 def cd_path_exists?; end - # source://pry//lib/pry/commands/shell_command.rb#36 + # pkg:gem/pry#lib/pry/commands/shell_command.rb:36 def parse_destination(dest); end - # source://pry//lib/pry/commands/shell_command.rb#58 + # pkg:gem/pry#lib/pry/commands/shell_command.rb:58 def path_from_cd_path(dest); end - # source://pry//lib/pry/commands/shell_command.rb#43 + # pkg:gem/pry#lib/pry/commands/shell_command.rb:43 def process_cd(dest); end - # @return [Boolean] - # - # source://pry//lib/pry/commands/shell_command.rb#68 + # pkg:gem/pry#lib/pry/commands/shell_command.rb:68 def special_case_path?(dest); end end -# source://pry//lib/pry/commands/shell_mode.rb#5 +# pkg:gem/pry#lib/pry/commands/shell_mode.rb:5 class Pry::Command::ShellMode < ::Pry::ClassCommand - # source://pry//lib/pry/commands/shell_mode.rb#15 + # pkg:gem/pry#lib/pry/commands/shell_mode.rb:15 def process; end end -# source://pry//lib/pry/commands/show_doc.rb#5 +# pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/show_doc.rb:25 def content_for(code_object); end # Return docs for the code_object, adjusting for whether the code_object @@ -4094,42 +3682,36 @@ class Pry::Command::ShowDoc < ::Pry::Command::ShowInfo # 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 + # pkg:gem/pry#lib/pry/commands/show_doc.rb:54 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 + # pkg:gem/pry#lib/pry/commands/show_doc.rb:66 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 + # pkg:gem/pry#lib/pry/commands/show_doc.rb:34 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 + # pkg:gem/pry#lib/pry/commands/show_doc.rb:73 def start_line_for(code_object); end end -# source://pry//lib/pry/commands/show_info.rb#5 +# pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/show_info.rb:10 + def initialize(*); end - # source://pry//lib/pry/commands/show_info.rb#127 + # pkg:gem/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 @@ -4137,19 +3719,18 @@ class Pry::Command::ShowInfo < ::Pry::ClassCommand # 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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/show_info.rb:213 def complete(input); end - # source://pry//lib/pry/commands/show_info.rb#77 + # pkg:gem/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 + # pkg:gem/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 @@ -4157,179 +3738,139 @@ class Pry::Command::ShowInfo < ::Pry::ClassCommand # 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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/show_info.rb:106 def header(code_object); end - # source://pry//lib/pry/commands/show_info.rb#173 + # pkg:gem/pry#lib/pry/commands/show_info.rb:173 def header_options; end - # source://pry//lib/pry/commands/show_info.rb#142 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/show_info.rb:165 def method_sections(code_object); end - # source://pry//lib/pry/commands/show_info.rb#151 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/show_info.rb:100 def no_definition_message; end - # source://pry//lib/pry/commands/show_info.rb#185 + # pkg:gem/pry#lib/pry/commands/show_info.rb:185 def obj_name; end - # source://pry//lib/pry/commands/show_info.rb#16 + # pkg:gem/pry#lib/pry/commands/show_info.rb:16 def options(opt); end - # @raise [CommandError] - # - # source://pry//lib/pry/commands/show_info.rb#26 + # pkg:gem/pry#lib/pry/commands/show_info.rb:26 def process; end - # @return [Boolean] - # - # source://pry//lib/pry/commands/show_info.rb#181 + # pkg:gem/pry#lib/pry/commands/show_info.rb:181 def show_all_modules?(code_object); end - # source://pry//lib/pry/commands/show_info.rb#193 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/show_info.rb:189 def use_line_numbers?; end - # @return [Boolean] - # - # source://pry//lib/pry/commands/show_info.rb#73 + # pkg:gem/pry#lib/pry/commands/show_info.rb:73 def valid_superclass?(code_object); end end -# source://pry//lib/pry/commands/show_input.rb#5 +# pkg:gem/pry#lib/pry/commands/show_input.rb:5 class Pry::Command::ShowInput < ::Pry::ClassCommand - # source://pry//lib/pry/commands/show_input.rb#15 + # pkg:gem/pry#lib/pry/commands/show_input.rb:15 def process; end end -# source://pry//lib/pry/commands/show_source.rb#5 +# pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/show_source.rb:44 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 + # pkg:gem/pry#lib/pry/commands/show_source.rb:28 def options(opt); end - # source://pry//lib/pry/commands/show_source.rb#38 + # pkg:gem/pry#lib/pry/commands/show_source.rb:34 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 +# pkg:gem/pry#lib/pry/commands/stat.rb:5 class Pry::Command::Stat < ::Pry::ClassCommand - # source://pry//lib/pry/commands/stat.rb#19 + # pkg:gem/pry#lib/pry/commands/stat.rb:19 def options(opt); end - # source://pry//lib/pry/commands/stat.rb#23 + # pkg:gem/pry#lib/pry/commands/stat.rb:23 def process; end end -# source://pry//lib/pry/commands/switch_to.rb#5 +# pkg:gem/pry#lib/pry/commands/switch_to.rb:5 class Pry::Command::SwitchTo < ::Pry::ClassCommand - # source://pry//lib/pry/commands/switch_to.rb#14 + # pkg:gem/pry#lib/pry/commands/switch_to.rb:14 def process(selection); end end -# source://pry//lib/pry/commands/toggle_color.rb#5 +# pkg:gem/pry#lib/pry/commands/toggle_color.rb:5 class Pry::Command::ToggleColor < ::Pry::ClassCommand - # source://pry//lib/pry/commands/toggle_color.rb#21 + # pkg:gem/pry#lib/pry/commands/toggle_color.rb:21 def color_toggle; end - # source://pry//lib/pry/commands/toggle_color.rb#16 + # pkg:gem/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 +# pkg:gem/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 +# pkg:gem/pry#lib/pry/commands/pry_version.rb:5 class Pry::Command::Version < ::Pry::ClassCommand - # source://pry//lib/pry/commands/pry_version.rb#14 + # pkg:gem/pry#lib/pry/commands/pry_version.rb:14 def process; end end -# source://pry//lib/pry/commands/watch_expression.rb#5 +# pkg:gem/pry#lib/pry/commands/watch_expression.rb:5 class Pry::Command::WatchExpression < ::Pry::ClassCommand - # source://pry//lib/pry/commands/watch_expression.rb#31 + # pkg:gem/pry#lib/pry/commands/watch_expression.rb:31 def options(opt); end - # source://pry//lib/pry/commands/watch_expression.rb#42 + # pkg:gem/pry#lib/pry/commands/watch_expression.rb:42 def process; end private - # source://pry//lib/pry/commands/watch_expression.rb#91 + # pkg:gem/pry#lib/pry/commands/watch_expression.rb:91 def add_expression; end - # source://pry//lib/pry/commands/watch_expression.rb#96 + # pkg:gem/pry#lib/pry/commands/watch_expression.rb:96 def add_hook; end - # source://pry//lib/pry/commands/watch_expression.rb#59 + # pkg:gem/pry#lib/pry/commands/watch_expression.rb:59 def delete(index); end - # source://pry//lib/pry/commands/watch_expression.rb#84 + # pkg:gem/pry#lib/pry/commands/watch_expression.rb:84 def eval_and_print_changed(output); end - # source://pry//lib/pry/commands/watch_expression.rb#55 + # pkg:gem/pry#lib/pry/commands/watch_expression.rb:55 def expressions; end - # source://pry//lib/pry/commands/watch_expression.rb#69 + # pkg:gem/pry#lib/pry/commands/watch_expression.rb:69 def list; end end -# source://pry//lib/pry/commands/watch_expression/expression.rb#6 +# pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/watch_expression/expression.rb:9 def initialize(pry_instance, target, source); end # Has the value of the expression changed? @@ -4338,299 +3879,244 @@ class Pry::Command::WatchExpression::Expression # 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 + # pkg:gem/pry#lib/pry/commands/watch_expression/expression.rb:29 def changed?; end - # source://pry//lib/pry/commands/watch_expression/expression.rb#15 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/watch_expression/expression.rb:7 def target; end - # source://pry//lib/pry/commands/watch_expression/expression.rb#20 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/watch_expression/expression.rb:7 def value; end private - # source://pry//lib/pry/commands/watch_expression/expression.rb#35 + # pkg:gem/pry#lib/pry/commands/watch_expression/expression.rb:35 def target_eval(target, source); end end -# source://pry//lib/pry/commands/whereami.rb#7 +# pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/whereami.rb:8 + def initialize(*); end - # @return [Boolean] - # - # source://pry//lib/pry/commands/whereami.rb#83 + # pkg:gem/pry#lib/pry/commands/whereami.rb:83 def bad_option_combination?; end - # source://pry//lib/pry/commands/whereami.rb#63 + # pkg:gem/pry#lib/pry/commands/whereami.rb:63 def code; end - # @return [Boolean] - # - # source://pry//lib/pry/commands/whereami.rb#77 + # pkg:gem/pry#lib/pry/commands/whereami.rb:77 def code?; end - # source://pry//lib/pry/commands/whereami.rb#88 + # pkg:gem/pry#lib/pry/commands/whereami.rb:88 def location; end - # source://pry//lib/pry/commands/whereami.rb#55 + # pkg:gem/pry#lib/pry/commands/whereami.rb:55 def options(opt); end - # source://pry//lib/pry/commands/whereami.rb#92 + # pkg:gem/pry#lib/pry/commands/whereami.rb:92 def process; end - # source://pry//lib/pry/commands/whereami.rb#44 + # pkg:gem/pry#lib/pry/commands/whereami.rb:44 def setup; end private - # source://pry//lib/pry/commands/whereami.rb#171 + # pkg:gem/pry#lib/pry/commands/whereami.rb:171 def class_code; end - # source://pry//lib/pry/commands/whereami.rb#152 + # pkg:gem/pry#lib/pry/commands/whereami.rb:152 def code_window; end - # source://pry//lib/pry/commands/whereami.rb#144 + # pkg:gem/pry#lib/pry/commands/whereami.rb:144 def default_code; end - # source://pry//lib/pry/commands/whereami.rb#185 + # pkg:gem/pry#lib/pry/commands/whereami.rb:185 def expand_path(filename); end - # source://pry//lib/pry/commands/whereami.rb#132 + # pkg:gem/pry#lib/pry/commands/whereami.rb:132 def handle_internal_binding; end - # source://pry//lib/pry/commands/whereami.rb#124 + # pkg:gem/pry#lib/pry/commands/whereami.rb:124 def marker; end - # source://pry//lib/pry/commands/whereami.rb#156 + # pkg:gem/pry#lib/pry/commands/whereami.rb:156 def method_code; end - # @return [Boolean] - # - # source://pry//lib/pry/commands/whereami.rb#116 + # pkg:gem/pry#lib/pry/commands/whereami.rb:116 def nothing_to_do?; end - # @return [Boolean] - # - # source://pry//lib/pry/commands/whereami.rb#140 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/whereami.rb:165 def target_class; end - # @return [Boolean] - # - # source://pry//lib/pry/commands/whereami.rb#128 + # pkg:gem/pry#lib/pry/commands/whereami.rb:128 def top_level?; end - # @return [Boolean] - # - # source://pry//lib/pry/commands/whereami.rb#120 + # pkg:gem/pry#lib/pry/commands/whereami.rb:120 def use_line_numbers?; end - # @return [Boolean] - # - # source://pry//lib/pry/commands/whereami.rb#180 + # pkg:gem/pry#lib/pry/commands/whereami.rb:180 def valid_method?; end - # source://pry//lib/pry/commands/whereami.rb#192 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/commands/whereami.rb:15 def method_size_cutoff=(_arg0); end end end -# source://pry//lib/pry/commands/wtf.rb#5 +# pkg:gem/pry#lib/pry/commands/wtf.rb:5 class Pry::Command::Wtf < ::Pry::ClassCommand - # source://pry//lib/pry/commands/wtf.rb#27 + # pkg:gem/pry#lib/pry/commands/wtf.rb:27 def options(opt); end - # source://pry//lib/pry/commands/wtf.rb#32 + # pkg:gem/pry#lib/pry/commands/wtf.rb:32 def process; end private - # source://pry//lib/pry/commands/wtf.rb#64 + # pkg:gem/pry#lib/pry/commands/wtf.rb:64 def format_backtrace(backtrace); end - # source://pry//lib/pry/commands/wtf.rb#60 + # pkg:gem/pry#lib/pry/commands/wtf.rb:60 def format_header(title, exception); end - # source://pry//lib/pry/commands/wtf.rb#83 + # pkg:gem/pry#lib/pry/commands/wtf.rb:83 def read_line(file, line); end - # source://pry//lib/pry/commands/wtf.rb#76 + # pkg:gem/pry#lib/pry/commands/wtf.rb:76 def trim_backtrace(backtrace); end - # source://pry//lib/pry/commands/wtf.rb#48 + # pkg:gem/pry#lib/pry/commands/wtf.rb:48 def unwind_exceptions; end end -# source://pry//lib/pry/commands/wtf.rb#25 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 + # @param [Array] imported_sets + # Sets which will be imported automatically # @yield Optional block run to define commands # - # source://pry//lib/pry/command_set.rb#20 + # pkg:gem/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 + # @param [String] pattern The line that might be a command invocation # @return [Pry::Command, nil] # - # source://pry//lib/pry/command_set.rb#275 + # pkg:gem/pry#lib/pry/command_set.rb:275 def [](pattern); end # Re-assign the command found at _pattern_ with _command_. # + # @param [Regexp, String] pattern + # The command to add or replace(found at _pattern_). + # + # @param [Pry::Command] command + # The command to add. + # + # @return [Pry::Command] + # Returns the new command (matched with "pattern".) + # # @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 + # pkg:gem/pry#lib/pry/command_set.rb:298 def []=(pattern, command); end # Add a command to set. # - # @param command [Command] a subclass of Pry::Command. + # @param [Command] command + # a subclass of Pry::Command. # - # source://pry//lib/pry/command_set.rb#324 + # pkg:gem/pry#lib/pry/command_set.rb:324 def add_command(command); end # Aliases a command - # + # @param [String, Regex] match The match of the alias (can be a regex). + # @param [String] action The action to be performed (typically + # another command). + # @param [Hash] options 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` # @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. + # pkg:gem/pry#lib/pry/command_set.rb:190 + def alias_command(match, action, options = T.unsafe(nil)); end + + # Defines a new Pry command. + # @param [String, Regexp] match The start of invocations of this command. + # @param [String] description A description of the command. + # @param [Hash] options The optional configuration parameters. + # @option options [Boolean] :keep_retval Whether or not to use return value + # of the block for return of `command` or just to return `nil` + # (the default). + # @option options [Boolean] :interpolate Whether string #{} based + # interpolation is applied to the command arguments before + # executing the command. Defaults to true. + # @option options [String] :listing The listing name of the + # command. That is the name by which the command is looked up by + # help and by show-source. Necessary for commands with regex matches. + # @option options [Boolean] :use_prefix Whether the command uses + # `Pry.config.command_prefix` prefix (if one is defined). Defaults + # to true. + # @option options [Boolean] :shellwords Whether the command's arguments + # should be split using Shellwords instead of just split on spaces. + # Defaults to true. # @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 + # command "greet", "Greet somebody" do |name| + # puts "Good afternoon #{name.capitalize}!" + # end # end # # # From pry: @@ -4641,11 +4127,11 @@ class Pry::CommandSet # # 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 + # command( + # /number-(\d+)/, "number-N regex command", :listing => "number" + # ) do |num, name| + # puts "hello #{name}, nice number: #{num}" + # end # end # # # From pry: @@ -4654,176 +4140,152 @@ class Pry::CommandSet # # 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 + # pkg:gem/pry#lib/pry/command_set.rb:78 + def block_command(match, description = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # pkg:gem/pry#lib/pry/command_set.rb:89 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 + # @param [String] search The line to search for + # @param [Hash] context The context to create the command with # @return [Array] # - # source://pry//lib/pry/command_set.rb#365 + # pkg:gem/pry#lib/pry/command_set.rb:365 def complete(search, context = T.unsafe(nil)); end # Defines a new Pry command class. # + # @param [String, Regexp] match The start of invocations of this command. + # @param [String] description A description of the command. + # @param [Hash] options The optional configuration parameters, see {#command} + # @yield The class body's definition. + # # @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 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 + # 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 + # pkg:gem/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 + # @param [Array] searches the matches or listings of the commands # to remove # - # source://pry//lib/pry/command_set.rb#138 + # pkg:gem/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. - # + # @param [String, Regexp] search The command match. + # @param [String?] description (nil) The command description. # @example Setting # MyCommands = Pry::CommandSet.new do - # desc "help", "help description" + # 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 + # pkg:gem/pry#lib/pry/command_set.rb:253 def desc(search, description = T.unsafe(nil)); end - # source://pry//lib/pry/command_set.rb#131 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/command_set.rb:281 def find_command(pattern); end - # @param match_or_listing [String, Regexp] The match or listing of a command. + # @param [String, Regexp] match_or_listing 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 + # pkg:gem/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. + # @param [String] search The user's search. # @return [Pry::Command?] # - # source://pry//lib/pry/command_set.rb#331 + # pkg:gem/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 + # pkg:gem/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 + # @param [Array] sets Command sets, all of the commands of which # will be imported. # @return [Pry::CommandSet] Returns the receiver (a command set). # - # source://pry//lib/pry/command_set.rb#149 + # pkg:gem/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 + # @param [CommandSet] set Set to import commands from + # @param [Array] matches Commands to import # @return [Pry::CommandSet] Returns the receiver (a command set). # - # source://pry//lib/pry/command_set.rb#161 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/command_set.rb:265 def keys; end - # @return [Array] The list of commands provided by the command set. + # @return [Array] + # The list of commands provided by the command set. # - # source://pry//lib/pry/command_set.rb#262 + # pkg:gem/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 + # @param [String] val The line to execute + # @param [Hash] context The context to execute the commands with # @return [CommandSet::Result] # - # source://pry//lib/pry/command_set.rb#351 + # pkg:gem/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, + # @param [String, Regexp] new_match The new match for the command. + # @param [String, Regexp] search The command's current match or listing. + # @param [Hash] options The optional configuration parameters, # accepts the same as the `command` method, but also allows the # command description to be passed this way too. + # @example Renaming the `ls` command and changing its description. + # Pry.config.commands.rename "dir", "ls", :description => "DOS friendly ls" # - # source://pry//lib/pry/command_set.rb#227 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/command_set.rb:270 def to_h; end - # source://pry//lib/pry/command_set.rb#267 + # pkg:gem/pry#lib/pry/command_set.rb:267 def to_hash; end # Is the given line a command invocation? - # - # @param val [String] + # @param [String] val # @return [Boolean] # - # source://pry//lib/pry/command_set.rb#343 + # pkg:gem/pry#lib/pry/command_set.rb:343 def valid_command?(val); end private @@ -4831,17 +4293,17 @@ class Pry::CommandSet # Defines helpers methods for this command sets. # Those helpers are only defined in this command set. # + # @yield A block defining helper methods # @example # helpers do - # def hello - # puts "Hello!" - # end + # def hello + # puts "Hello!" + # end # - # include OtherModule + # include OtherModule # end - # @yield A block defining helper methods # - # source://pry//lib/pry/command_set.rb#390 + # pkg:gem/pry#lib/pry/command_set.rb:390 def helpers(&block); end end @@ -4851,521 +4313,331 @@ end # subsequent command invocations. All state saved here is unique to the # command. # -# @api private # @since v0.13.0 +# @api private # -# source://pry//lib/pry/command_state.rb#12 +# pkg:gem/pry#lib/pry/command_state.rb:12 class Pry::CommandState - # @api private - # @return [CommandState] a new instance of CommandState - # @since v0.13.0 - # - # source://pry//lib/pry/command_state.rb#17 + # pkg:gem/pry#lib/pry/command_state.rb:17 def initialize; end - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/command_state.rb#25 + # pkg:gem/pry#lib/pry/command_state.rb:25 def reset(command_class); end - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/command_state.rb#21 + # pkg:gem/pry#lib/pry/command_state.rb:21 def state_for(command_class); end private - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/command_state.rb#31 + # pkg:gem/pry#lib/pry/command_state.rb:31 def command_struct(command_class); end class << self - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/command_state.rb#13 + # pkg:gem/pry#lib/pry/command_state.rb:13 def default; end end end -# source://pry//lib/pry.rb#35 +# pkg:gem/pry#lib/pry.rb:35 Pry::Commands = T.let(T.unsafe(nil), Pry::CommandSet) # @api private # -# source://pry//lib/pry/config/attributable.rb#4 +# pkg:gem/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#151 + # pkg:gem/pry#lib/pry/config.rb:151 def initialize; end - # @api private - # - # source://pry//lib/pry/config.rb#224 + # pkg:gem/pry#lib/pry/config.rb:224 def [](attr); end - # @api private - # - # source://pry//lib/pry/config.rb#220 + # pkg:gem/pry#lib/pry/config.rb:220 def []=(attr, value); end - # @api private - # @return [Boolean] - # - # source://pry//lib/pry/config/attributable.rb#13 + # pkg:gem/pry#lib/pry/config.rb:109 def auto_indent; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:109 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 + # pkg:gem/pry#lib/pry/config.rb:116 def collision_warning; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:116 def collision_warning=(_arg0); end - # @api private - # @return [Boolean] - # - # source://pry//lib/pry/config/attributable.rb#13 + # pkg:gem/pry#lib/pry/config.rb:59 def color; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:59 def color=(_arg0); end - # @api private - # @return [Proc] - # - # source://pry//lib/pry/config/attributable.rb#13 + # pkg:gem/pry#lib/pry/config.rb:132 def command_completions; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:132 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 + # pkg:gem/pry#lib/pry/config.rb:56 def command_prefix; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:56 def command_prefix=(_arg0); end - # @api private - # @return [Pry::CommandSet] - # - # source://pry//lib/pry/config/attributable.rb#13 + # pkg:gem/pry#lib/pry/config.rb:16 def commands; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:16 def commands=(_arg0); end - # @api private - # @return [#build_completion_proc] a completer to use - # - # source://pry//lib/pry/config/attributable.rb#13 + # pkg:gem/pry#lib/pry/config.rb:122 def completer; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:122 def completer=(_arg0); end - # @api private - # - # source://pry//lib/pry/config.rb#249 + # pkg:gem/pry#lib/pry/config.rb:249 def control_d_handler; end - # @api private - # - # source://pry//lib/pry/config.rb#250 + # pkg:gem/pry#lib/pry/config.rb:250 def control_d_handler=(value); end - # @api private - # @return [Boolean] - # - # source://pry//lib/pry/config/attributable.rb#13 + # pkg:gem/pry#lib/pry/config.rb:112 def correct_indent; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:112 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 + # pkg:gem/pry#lib/pry/config.rb:29 def default_window_size; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:29 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 + # pkg:gem/pry#lib/pry/config.rb:77 def disable_auto_reload; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:77 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 + # pkg:gem/pry#lib/pry/config.rb:51 def editor; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:51 def editor=(_arg0); end - # @api private - # @return [Proc] the printer for exceptions - # - # source://pry//lib/pry/config/attributable.rb#13 + # pkg:gem/pry#lib/pry/config.rb:22 def exception_handler; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:22 def exception_handler=(_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 + # pkg:gem/pry#lib/pry/config.rb:142 def exec_string; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:142 def exec_string=(_arg0); end - # @api private - # @return [Hash{Symbol=>Proc}] - # - # source://pry//lib/pry/config/attributable.rb#13 + # pkg:gem/pry#lib/pry/config.rb:119 def extra_sticky_locals; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:119 def extra_sticky_locals=(_arg0); end - # @api private - # @return [Proc] - # - # source://pry//lib/pry/config/attributable.rb#13 + # pkg:gem/pry#lib/pry/config.rb:135 def file_completions; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:135 def file_completions=(_arg0); end - # @api private - # @return [Pry::History] - # - # source://pry//lib/pry/config/attributable.rb#13 + # pkg:gem/pry#lib/pry/config.rb:85 def history; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:85 def history=(_arg0); end - # @api private - # @return [String] - # - # source://pry//lib/pry/config/attributable.rb#13 + # pkg:gem/pry#lib/pry/config.rb:94 def history_file; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:94 def history_file=(_arg0); end - # @api private - # @return [Array] - # - # source://pry//lib/pry/config/attributable.rb#13 + # pkg:gem/pry#lib/pry/config.rb:97 def history_ignorelist; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:97 def history_ignorelist=(_arg0); end - # @api private - # @return [Boolean] - # - # source://pry//lib/pry/config/attributable.rb#13 + # pkg:gem/pry#lib/pry/config.rb:91 def history_load; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:91 def history_load=(_arg0); end - # @api private - # @return [Boolean] - # - # source://pry//lib/pry/config/attributable.rb#13 + # pkg:gem/pry#lib/pry/config.rb:88 def history_save; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:88 def history_save=(_arg0); end - # @api private - # @return [Pry::Hooks] - # - # source://pry//lib/pry/config/attributable.rb#13 + # pkg:gem/pry#lib/pry/config.rb:32 def hooks; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:32 def hooks=(_arg0); end - # @api private - # @return [IO, #readline] the object from which Pry retrieves its lines of - # input - # - # source://pry//lib/pry/config/attributable.rb#13 + # pkg:gem/pry#lib/pry/config.rb:10 def input; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:10 def input=(_arg0); end - # @api private - # @return [Hash] - # - # source://pry//lib/pry/config/attributable.rb#13 + # pkg:gem/pry#lib/pry/config.rb:138 def ls; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:138 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 + # pkg:gem/pry#lib/pry/config.rb:103 def memory_size; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:103 def memory_size=(_arg0); end - # @api private - # - # source://pry//lib/pry/config.rb#216 + # pkg:gem/pry#lib/pry/config.rb:216 def merge(config_hash); end - # @api private - # - # source://pry//lib/pry/config.rb#211 + # pkg:gem/pry#lib/pry/config.rb:211 def merge!(config_hash); end - # @api private - # - # source://pry//lib/pry/config.rb#229 + # pkg:gem/pry#lib/pry/config.rb:229 def method_missing(method_name, *args, &_block); end - # @api private - # @return [Boolean] - # - # source://pry//lib/pry/config/attributable.rb#13 + # pkg:gem/pry#lib/pry/config.rb:65 def multiline; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:65 def multiline=(_arg0); end - # @api private - # @return [IO, #puts] where Pry should output results provided by {input} - # - # source://pry//lib/pry/config/attributable.rb#13 + # pkg:gem/pry#lib/pry/config.rb:13 def output; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:13 def output=(_arg0); end - # @api private - # @return [String] - # - # source://pry//lib/pry/config/attributable.rb#13 + # pkg:gem/pry#lib/pry/config.rb:145 def output_prefix; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:145 def output_prefix=(_arg0); end - # @api private - # @return [Boolean] - # - # source://pry//lib/pry/config/attributable.rb#13 + # pkg:gem/pry#lib/pry/config.rb:62 def pager; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:62 def pager=(_arg0); end - # @api private - # @return [Proc] the printer for Ruby expressions (not commands) - # - # source://pry//lib/pry/config/attributable.rb#13 + # pkg:gem/pry#lib/pry/config.rb:19 def print; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:19 def print=(_arg0); end - # @api private - # @return [Pry::Prompt] - # - # source://pry//lib/pry/config/attributable.rb#13 + # pkg:gem/pry#lib/pry/config.rb:35 def prompt; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:35 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 + # pkg:gem/pry#lib/pry/config.rb:38 def prompt_name; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:38 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 + # pkg:gem/pry#lib/pry/config.rb:42 def prompt_safe_contexts; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:42 def prompt_safe_contexts=(_arg0); end - # @api private - # @return [Boolean] suppresses whereami output on `binding.pry` - # - # source://pry//lib/pry/config/attributable.rb#13 + # pkg:gem/pry#lib/pry/config.rb:125 def quiet; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:125 def quiet=(_arg0); end - # @api private - # @return [String] - # @since v0.13.0 - # - # source://pry//lib/pry/config/attributable.rb#13 + # pkg:gem/pry#lib/pry/config.rb:149 def rc_file; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:149 def rc_file=(_arg0); end - # @api private - # @return [Array] Ruby files to be required - # - # source://pry//lib/pry/config/attributable.rb#13 + # pkg:gem/pry#lib/pry/config.rb:100 def requires; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:100 def requires=(_arg0); end - # @api private - # @return [Boolean] whether the local ./.pryrc should be loaded - # - # source://pry//lib/pry/config/attributable.rb#13 + # pkg:gem/pry#lib/pry/config.rb:71 def should_load_local_rc; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:71 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 + # pkg:gem/pry#lib/pry/config.rb:68 def should_load_rc; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:68 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 + # pkg:gem/pry#lib/pry/config.rb:74 def should_load_requires; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:74 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 + # pkg:gem/pry#lib/pry/config.rb:82 def should_trap_interrupts; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:82 def should_trap_interrupts=(_arg0); end - # @api private - # @return [Proc] The proc that runs system commands - # - # source://pry//lib/pry/config/attributable.rb#13 + # pkg:gem/pry#lib/pry/config.rb:106 def system; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:106 def system=(_arg0); end - # @api private - # @return [Array] Exception that Pry shouldn't rescue - # - # source://pry//lib/pry/config/attributable.rb#13 + # pkg:gem/pry#lib/pry/config.rb:25 def unrescued_exceptions; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:25 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 + # pkg:gem/pry#lib/pry/config.rb:129 def windows_console_warning; end - # source://pry//lib/pry/config/attributable.rb#18 + # pkg:gem/pry#lib/pry/config.rb:129 def windows_console_warning=(_arg0); end private - # @api private - # - # source://pry//lib/pry/config.rb#279 + # pkg:gem/pry#lib/pry/config.rb:279 def choose_input; end - # @api private - # - # source://pry//lib/pry/config.rb#303 + # pkg:gem/pry#lib/pry/config.rb:310 def default_rc_file; end - # @api private - # - # source://pry//lib/pry/config.rb#244 + # pkg:gem/pry#lib/pry/config.rb:244 def initialize_dup(other); end - # @api private - # - # source://pry//lib/pry/config.rb#289 + # pkg:gem/pry#lib/pry/config.rb:289 def load_readline; end - # @api private - # @return [Boolean] - # - # source://pry//lib/pry/config.rb#240 + # pkg:gem/pry#lib/pry/config.rb:240 def respond_to_missing?(method_name, include_all = T.unsafe(nil)); end end @@ -5373,15 +4645,12 @@ end # 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 +# @api private # -# source://pry//lib/pry/config/attributable.rb#11 +# pkg:gem/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 + # pkg:gem/pry#lib/pry/config/attributable.rb:12 def attribute(attr_name); end end @@ -5389,29 +4658,23 @@ end # 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 +# +# @api private # @since v0.13.0 +# @see Pry::Config::MemoizedValue # -# source://pry//lib/pry/config/lazy_value.rb#19 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/config/lazy_value.rb:24 def call; end end @@ -5419,58 +4682,45 @@ end # 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 +# +# @api private # @since v0.13.0 +# @see Pry::Config::LazyValue # -# source://pry//lib/pry/config/memoized_value.rb#19 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 +# @api private # -# source://pry//lib/pry/config/value.rb#10 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/pry#lib/pry/control_d_handler.rb:6 module Pry::ControlDHandler class << self # Deal with the ^D key being pressed. Different behaviour in different @@ -5479,43 +4729,36 @@ module Pry::ControlDHandler # 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 + # pkg:gem/pry#lib/pry/control_d_handler.rb:12 def default(pry_instance); end end end -# source://pry//lib/pry/pry_instance.rb#58 +# pkg:gem/pry#lib/pry/pry_instance.rb:58 Pry::EMPTY_COMPLETIONS = T.let(T.unsafe(nil), Array) -# source://pry//lib/pry/editor.rb#6 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/editor.rb:60 def build_editor_invocation_string(file, line, blocking); end - # source://pry//lib/pry/editor.rb#31 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/editor.rb:25 def pry_instance; end private @@ -5524,7 +4767,7 @@ class Pry::Editor # 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 + # pkg:gem/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. @@ -5537,44 +4780,41 @@ class Pry::Editor # editor_name # # => textmate # - # source://pry//lib/pry/editor.rb#153 + # pkg:gem/pry#lib/pry/editor.rb:153 def editor_name; end # Start the editor running, using the calculated invocation string # - # source://pry//lib/pry/editor.rb#76 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 +# @api private # -# source://pry//lib/pry/env.rb#8 +# pkg:gem/pry#lib/pry/env.rb:8 module Pry::Env class << self - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/env.rb#9 + # pkg:gem/pry#lib/pry/env.rb:9 def [](key); end end end @@ -5582,40 +4822,28 @@ end # @api private # @since v0.13.0 # -# source://pry//lib/pry/exception_handler.rb#6 +# pkg:gem/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 + # pkg:gem/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#42 + # pkg:gem/pry#lib/pry/exception_handler.rb:42 def cause_text(cause); end - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/exception_handler.rb#32 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/exception_handler.rb:19 def standard_error_text_for(exception); end end end -# source://pry//lib/pry/forwardable.rb#4 +# pkg:gem/pry#lib/pry/forwardable.rb:4 module Pry::Forwardable include ::Forwardable @@ -5626,7 +4854,7 @@ module Pry::Forwardable # That's why we revert to a custom implementation for delegating one # private method to another. # - # source://pry//lib/pry/forwardable.rb#16 + # pkg:gem/pry#lib/pry/forwardable.rb:16 def def_private_delegators(target, *private_delegates); end end @@ -5634,55 +4862,53 @@ end # 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 +# pkg:gem/pry#lib/pry/exceptions.rb:56 module Pry::FrozenObjectException class << self - # source://pry//lib/pry/exceptions.rb#57 + # pkg:gem/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 +# to guard against using deprecated or unsupported features # -# source://pry//lib/pry/pry_class.rb#11 +# pkg:gem/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 +# pkg:gem/pry#lib/pry/helpers/base_helpers.rb:4 module Pry::Helpers class << self - # source://pry//lib/pry/helpers/table.rb#27 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/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 + # pkg:gem/pry#lib/pry/helpers/base_helpers.rb:43 def colorize_code(code); end - # source://pry//lib/pry/helpers/base_helpers.rb#27 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/helpers/base_helpers.rb:54 def heading(text); end - # source://pry//lib/pry/helpers/base_helpers.rb#47 + # pkg:gem/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 + # pkg:gem/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 @@ -5690,73 +4916,67 @@ module Pry::Helpers::BaseHelpers # 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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/helpers/base_helpers.rb:38 def use_ansi_codes?; end end -# source://pry//lib/pry/helpers/command_helpers.rb#7 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/helpers/command_helpers.rb:21 def internal_binding?(context); end - # source://pry//lib/pry/helpers/command_helpers.rb#97 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/helpers/command_helpers.rb:102 def one_index_range(range); end - # source://pry//lib/pry/helpers/command_helpers.rb#106 + # pkg:gem/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. + # @param [String] content The string. + # @param [Range, Integer] lines The line(s) to restrict it to. # @return [String] The resulting string. # - # source://pry//lib/pry/helpers/command_helpers.rb#92 + # pkg:gem/pry#lib/pry/helpers/command_helpers.rb:92 def restrict_to_lines(content, lines); end - # source://pry//lib/pry/helpers/command_helpers.rb#135 + # pkg:gem/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 + # pkg:gem/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 @@ -5765,21 +4985,22 @@ module Pry::Helpers::CommandHelpers # # @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." + # 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 + # + # @param [String] dirty_text The text from which to remove indentation # @return [String] the text with indentation stripped # - # source://pry//lib/pry/helpers/command_helpers.rb#68 + # pkg:gem/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 +# pkg:gem/pry#lib/pry/helpers/documentation_helpers.rb:7 module Pry::Helpers::DocumentationHelpers private @@ -5787,34 +5008,34 @@ module Pry::Helpers::DocumentationHelpers # that the user is intended to read. (i.e. without leading indentation, #-characters # or shebangs) # - # @param comment [String] + # @param [String] comment # @return [String] # - # source://pry//lib/pry/helpers/documentation_helpers.rb#67 + # pkg:gem/pry#lib/pry/helpers/documentation_helpers.rb:67 def get_comment_content(comment); end - # source://pry//lib/pry/helpers/documentation_helpers.rb#51 + # pkg:gem/pry#lib/pry/helpers/documentation_helpers.rb:51 def process_comment_markup(comment); end - # source://pry//lib/pry/helpers/documentation_helpers.rb#15 + # pkg:gem/pry#lib/pry/helpers/documentation_helpers.rb:15 def process_rdoc(comment); end - # source://pry//lib/pry/helpers/documentation_helpers.rb#45 + # pkg:gem/pry#lib/pry/helpers/documentation_helpers.rb:45 def process_yardoc(comment); end - # source://pry//lib/pry/helpers/documentation_helpers.rb#30 + # pkg:gem/pry#lib/pry/helpers/documentation_helpers.rb:30 def process_yardoc_tag(comment, tag); end - # @param code [String] + # @param [String] code # @return [String] # - # source://pry//lib/pry/helpers/documentation_helpers.rb#57 + # pkg:gem/pry#lib/pry/helpers/documentation_helpers.rb:57 def strip_comments_from_c_code(code); end - # @param text [String] + # @param [String] text # @return [String] # - # source://pry//lib/pry/helpers/documentation_helpers.rb#79 + # pkg:gem/pry#lib/pry/helpers/documentation_helpers.rb:79 def strip_leading_whitespace(text); end class << self @@ -5822,928 +5043,881 @@ module Pry::Helpers::DocumentationHelpers # that the user is intended to read. (i.e. without leading indentation, #-characters # or shebangs) # - # @param comment [String] + # @param [String] comment # @return [String] # - # source://pry//lib/pry/helpers/documentation_helpers.rb#67 + # pkg:gem/pry#lib/pry/helpers/documentation_helpers.rb:67 def get_comment_content(comment); end - # source://pry//lib/pry/helpers/documentation_helpers.rb#51 + # pkg:gem/pry#lib/pry/helpers/documentation_helpers.rb:51 def process_comment_markup(comment); end - # source://pry//lib/pry/helpers/documentation_helpers.rb#15 + # pkg:gem/pry#lib/pry/helpers/documentation_helpers.rb:15 def process_rdoc(comment); end - # source://pry//lib/pry/helpers/documentation_helpers.rb#45 + # pkg:gem/pry#lib/pry/helpers/documentation_helpers.rb:45 def process_yardoc(comment); end - # source://pry//lib/pry/helpers/documentation_helpers.rb#30 + # pkg:gem/pry#lib/pry/helpers/documentation_helpers.rb:30 def process_yardoc_tag(comment, tag); end - # @param code [String] + # @param [String] code # @return [String] # - # source://pry//lib/pry/helpers/documentation_helpers.rb#57 + # pkg:gem/pry#lib/pry/helpers/documentation_helpers.rb:57 def strip_comments_from_c_code(code); end - # @param text [String] + # @param [String] text # @return [String] # - # source://pry//lib/pry/helpers/documentation_helpers.rb#79 + # pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/helpers/platform.rb:50 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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/helpers/platform.rb:28 def windows_ansi?; end end end -# source://pry//lib/pry/helpers/table.rb#35 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/helpers/table.rb:36 def column_count; end - # source://pry//lib/pry/helpers/table.rb#68 + # pkg:gem/pry#lib/pry/helpers/table.rb:68 def column_count=(count); end - # source://pry//lib/pry/helpers/table.rb#77 + # pkg:gem/pry#lib/pry/helpers/table.rb:77 def columns; end - # @return [Boolean] - # - # source://pry//lib/pry/helpers/table.rb#73 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/helpers/table.rb:36 def items; end - # source://pry//lib/pry/helpers/table.rb#62 + # pkg:gem/pry#lib/pry/helpers/table.rb:62 def items=(items); end - # source://pry//lib/pry/helpers/table.rb#47 + # pkg:gem/pry#lib/pry/helpers/table.rb:47 def rows_to_s(style = T.unsafe(nil)); end - # source://pry//lib/pry/helpers/table.rb#85 + # pkg:gem/pry#lib/pry/helpers/table.rb:85 def to_a; end - # source://pry//lib/pry/helpers/table.rb#43 + # pkg:gem/pry#lib/pry/helpers/table.rb:43 def to_s; end private - # source://pry//lib/pry/helpers/table.rb#91 + # pkg:gem/pry#lib/pry/helpers/table.rb:91 def _max_width(things); end - # source://pry//lib/pry/helpers/table.rb#95 + # pkg:gem/pry#lib/pry/helpers/table.rb:95 def _rebuild_colorless_cache; end - # source://pry//lib/pry/helpers/table.rb#116 + # pkg:gem/pry#lib/pry/helpers/table.rb:116 def _recall_color_for(thing); end - # source://pry//lib/pry/helpers/table.rb#105 + # pkg:gem/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 +# pkg:gem/pry#lib/pry/helpers/text.rb:7 module Pry::Helpers::Text extend ::Pry::Helpers::Text - # source://pry//lib/pry/helpers/text.rb#23 + # pkg:gem/pry#lib/pry/helpers/text.rb:23 def black(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def black_on_black(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def black_on_blue(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def black_on_cyan(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def black_on_green(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def black_on_magenta(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def black_on_purple(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def black_on_red(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def black_on_white(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def black_on_yellow(text); end - # source://pry//lib/pry/helpers/text.rb#23 + # pkg:gem/pry#lib/pry/helpers/text.rb:23 def blue(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def blue_on_black(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def blue_on_blue(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def blue_on_cyan(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def blue_on_green(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def blue_on_magenta(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def blue_on_purple(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def blue_on_red(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def blue_on_white(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/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] + # @param [String, #to_s] text # @return [String] _text_ # - # source://pry//lib/pry/helpers/text.rb#54 + # pkg:gem/pry#lib/pry/helpers/text.rb:54 def bold(text); end - # source://pry//lib/pry/helpers/text.rb#27 + # pkg:gem/pry#lib/pry/helpers/text.rb:27 def bright_black(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_black_on_black(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_black_on_blue(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_black_on_cyan(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_black_on_green(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_black_on_magenta(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_black_on_purple(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_black_on_red(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_black_on_white(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_black_on_yellow(text); end - # source://pry//lib/pry/helpers/text.rb#27 + # pkg:gem/pry#lib/pry/helpers/text.rb:27 def bright_blue(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_blue_on_black(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_blue_on_blue(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_blue_on_cyan(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_blue_on_green(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_blue_on_magenta(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_blue_on_purple(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_blue_on_red(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_blue_on_white(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_blue_on_yellow(text); end - # source://pry//lib/pry/helpers/text.rb#27 + # pkg:gem/pry#lib/pry/helpers/text.rb:27 def bright_cyan(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_cyan_on_black(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_cyan_on_blue(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_cyan_on_cyan(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_cyan_on_green(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_cyan_on_magenta(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_cyan_on_purple(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_cyan_on_red(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_cyan_on_white(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_cyan_on_yellow(text); end - # source://pry//lib/pry/helpers/text.rb#27 + # pkg:gem/pry#lib/pry/helpers/text.rb:27 def bright_green(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_green_on_black(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_green_on_blue(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_green_on_cyan(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_green_on_green(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_green_on_magenta(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_green_on_purple(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_green_on_red(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_green_on_white(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_green_on_yellow(text); end - # source://pry//lib/pry/helpers/text.rb#27 + # pkg:gem/pry#lib/pry/helpers/text.rb:27 def bright_magenta(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_magenta_on_black(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_magenta_on_blue(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_magenta_on_cyan(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_magenta_on_green(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_magenta_on_magenta(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_magenta_on_purple(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_magenta_on_red(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_magenta_on_white(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_magenta_on_yellow(text); end - # source://pry//lib/pry/helpers/text.rb#27 + # pkg:gem/pry#lib/pry/helpers/text.rb:27 def bright_purple(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_purple_on_black(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_purple_on_blue(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_purple_on_cyan(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_purple_on_green(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_purple_on_magenta(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_purple_on_purple(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_purple_on_red(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_purple_on_white(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_purple_on_yellow(text); end - # source://pry//lib/pry/helpers/text.rb#27 + # pkg:gem/pry#lib/pry/helpers/text.rb:27 def bright_red(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_red_on_black(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_red_on_blue(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_red_on_cyan(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_red_on_green(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_red_on_magenta(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_red_on_purple(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_red_on_red(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_red_on_white(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_red_on_yellow(text); end - # source://pry//lib/pry/helpers/text.rb#27 + # pkg:gem/pry#lib/pry/helpers/text.rb:27 def bright_white(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_white_on_black(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_white_on_blue(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_white_on_cyan(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_white_on_green(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_white_on_magenta(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_white_on_purple(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_white_on_red(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_white_on_white(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_white_on_yellow(text); end - # source://pry//lib/pry/helpers/text.rb#27 + # pkg:gem/pry#lib/pry/helpers/text.rb:27 def bright_yellow(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_yellow_on_black(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_yellow_on_blue(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_yellow_on_cyan(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_yellow_on_green(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_yellow_on_magenta(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_yellow_on_purple(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_yellow_on_red(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_yellow_on_white(text); end - # source://pry//lib/pry/helpers/text.rb#36 + # pkg:gem/pry#lib/pry/helpers/text.rb:36 def bright_yellow_on_yellow(text); end - # source://pry//lib/pry/helpers/text.rb#23 + # pkg:gem/pry#lib/pry/helpers/text.rb:23 def cyan(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def cyan_on_black(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def cyan_on_blue(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def cyan_on_cyan(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def cyan_on_green(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def cyan_on_magenta(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def cyan_on_purple(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def cyan_on_red(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def cyan_on_white(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/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] + # @param [String, #to_s] text # @return [String] # - # source://pry//lib/pry/helpers/text.rb#63 + # pkg:gem/pry#lib/pry/helpers/text.rb:63 def default(text); end - # source://pry//lib/pry/helpers/text.rb#23 + # pkg:gem/pry#lib/pry/helpers/text.rb:23 def green(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def green_on_black(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def green_on_blue(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def green_on_cyan(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def green_on_green(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def green_on_magenta(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def green_on_purple(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def green_on_red(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def green_on_white(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/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] + # @param [String] text + # @param [Fixnum] chars # - # source://pry//lib/pry/helpers/text.rb#113 + # pkg:gem/pry#lib/pry/helpers/text.rb:113 def indent(text, chars); end - # source://pry//lib/pry/helpers/text.rb#23 + # pkg:gem/pry#lib/pry/helpers/text.rb:23 def magenta(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def magenta_on_black(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def magenta_on_blue(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def magenta_on_cyan(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def magenta_on_green(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def magenta_on_magenta(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def magenta_on_purple(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def magenta_on_red(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def magenta_on_white(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def magenta_on_yellow(text); end + # @yield + # Yields a block with color turned off. + # # @return [void] - # @yield Yields a block with color turned off. # - # source://pry//lib/pry/helpers/text.rb#73 + # pkg:gem/pry#lib/pry/helpers/text.rb:73 def no_color; end + # @yield + # Yields a block with paging turned off. + # # @return [void] - # @yield Yields a block with paging turned off. # - # source://pry//lib/pry/helpers/text.rb#87 + # pkg:gem/pry#lib/pry/helpers/text.rb:87 def no_pager; end - # source://pry//lib/pry/helpers/text.rb#23 + # pkg:gem/pry#lib/pry/helpers/text.rb:23 def purple(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def purple_on_black(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def purple_on_blue(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def purple_on_cyan(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def purple_on_green(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def purple_on_magenta(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def purple_on_purple(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def purple_on_red(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def purple_on_white(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def purple_on_yellow(text); end - # source://pry//lib/pry/helpers/text.rb#23 + # pkg:gem/pry#lib/pry/helpers/text.rb:23 def red(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def red_on_black(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def red_on_blue(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def red_on_cyan(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def red_on_green(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def red_on_magenta(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def red_on_purple(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def red_on_red(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def red_on_white(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def red_on_yellow(text); end # Remove any color codes from _text_. # - # @param text [String, #to_s] + # @param [String, #to_s] text # @return [String] _text_ stripped of any color codes. # - # source://pry//lib/pry/helpers/text.rb#46 + # pkg:gem/pry#lib/pry/helpers/text.rb:46 def strip_color(text); end - # source://pry//lib/pry/helpers/text.rb#23 + # pkg:gem/pry#lib/pry/helpers/text.rb:23 def white(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def white_on_black(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def white_on_blue(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def white_on_cyan(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def white_on_green(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def white_on_magenta(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def white_on_purple(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def white_on_red(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def white_on_white(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/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] + # @param [#each_line] text + # @param [Fixnum] offset # @return [String] # - # source://pry//lib/pry/helpers/text.rb#100 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/helpers/text.rb:23 def yellow(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def yellow_on_black(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def yellow_on_blue(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def yellow_on_cyan(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def yellow_on_green(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def yellow_on_magenta(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def yellow_on_purple(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def yellow_on_red(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def yellow_on_white(text); end - # source://pry//lib/pry/helpers/text.rb#32 + # pkg:gem/pry#lib/pry/helpers/text.rb:32 def yellow_on_yellow(text); end end -# source://pry//lib/pry/helpers/text.rb#10 +# pkg:gem/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 +# pkg:gem/pry#lib/pry/history.rb:6 class Pry::History - # @return [History] a new instance of History - # - # source://pry//lib/pry/history.rb#29 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/history.rb:70 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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/history.rb:40 def load; end - # Returns the value of attribute loader. - # - # source://pry//lib/pry/history.rb#21 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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] + # @param [String] line # @return [String] The same line that was passed in # - # source://pry//lib/pry/history.rb#53 + # pkg:gem/pry#lib/pry/history.rb:53 def push(line); end - # Returns the value of attribute saver. - # - # source://pry//lib/pry/history.rb#21 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/history.rb:88 def to_a; end private # The history file, opened for appending. # - # source://pry//lib/pry/history.rb#127 + # pkg:gem/pry#lib/pry/history.rb:127 def history_file; end - # source://pry//lib/pry/history.rb#143 + # pkg:gem/pry#lib/pry/history.rb:143 def history_file_path; end - # @return [Boolean] - # - # source://pry//lib/pry/history.rb#147 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/history.rb:105 def should_ignore?(line); end class << self - # source://pry//lib/pry/history.rb#7 + # pkg:gem/pry#lib/pry/history.rb:7 def default_file; end end end @@ -6756,120 +5930,112 @@ end # # @example Adding a hook for the `:before_session` event. # Pry.config.hooks.add_hook(:before_session, :say_hi) do -# puts "hello" +# puts "hello" # end # -# source://pry//lib/pry/hooks.rb#14 +# pkg:gem/pry#lib/pry/hooks.rb:14 class Pry::Hooks - # @return [Hooks] a new instance of Hooks - # - # source://pry//lib/pry/hooks.rb#25 + # pkg:gem/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. + # @param [Symbol] event_name The name of the event. + # @param [Symbol] hook_name The name of the hook. + # @param [#call] callable The callable. # @yield The block to use as the callable (if no `callable` provided). + # @return [Pry:Hooks] The receiver. # - # source://pry//lib/pry/hooks.rb#81 + # pkg:gem/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. + # @param [String] event_name The name of the event. # @return [void] # - # source://pry//lib/pry/hooks.rb#165 + # pkg:gem/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. + # @param [Symbol] event_name The name of the event. + # @param [Symbol] hook_name The name of the hook. # to delete. # @return [#call] The deleted hook. # - # source://pry//lib/pry/hooks.rb#147 + # pkg:gem/pry#lib/pry/hooks.rb:147 def delete_hook(event_name, hook_name); end - # source://pry//lib/pry/hooks.rb#39 + # pkg:gem/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. + # @param [Symbol] event_name The name of the event. + # @param [Array] args 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 + # pkg:gem/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 + # @param [Symbol] event_name The name of the event. + # @param [Symbol] hook_name The name of the hook # @return [#call] a specific hook for a given event. # - # source://pry//lib/pry/hooks.rb#128 + # pkg:gem/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. + # @param [Symbol] event_name The name of the event. # @return [Hash] The hash of hook names / hook functions. + # @note Modifying the returned hash does not alter the hooks, use + # `add_hook`/`delete_hook` for that. # - # source://pry//lib/pry/hooks.rb#139 + # pkg:gem/pry#lib/pry/hooks.rb:139 def get_hooks(event_name); end - # @param event_name [Symbol] The name of the event. + # @param [Symbol] event_name The name of the event. # @return [Fixnum] The number of hook functions for `event_name`. # - # source://pry//lib/pry/hooks.rb#121 + # pkg:gem/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. + # @param [Symbol] event_name Name of the event. + # @param [Symbol] hook_name Name of the hook. # @return [Boolean] Whether the hook by the name `hook_name`. # - # source://pry//lib/pry/hooks.rb#172 + # pkg:gem/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 + # @param [Pry::Hooks] other 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 + # pkg:gem/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 + # @param [Pry::Hooks] other The `Pry::Hooks` instance to merge # @return [Pry:Hooks] The receiver. # @see #merge # - # source://pry//lib/pry/hooks.rb#48 + # pkg:gem/pry#lib/pry/hooks.rb:48 def merge!(other); end protected - # Returns the value of attribute hooks. - # - # source://pry//lib/pry/hooks.rb#178 + # pkg:gem/pry#lib/pry/hooks.rb:178 def hooks; end private # Ensure that duplicates have their @hooks object. # - # source://pry//lib/pry/hooks.rb#30 + # pkg:gem/pry#lib/pry/hooks.rb:30 def initialize_copy(_orig); end class << self - # source://pry//lib/pry/hooks.rb#15 + # pkg:gem/pry#lib/pry/hooks.rb:15 def default; end end end @@ -6880,25 +6046,24 @@ end # 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 +# pkg:gem/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#107 + # pkg:gem/pry#lib/pry/indent.rb:107 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 + # @param [String] prompt The user's prompt + # @param [String] code The code the user just typed in + # @param [Integer] overhang 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#395 + # pkg:gem/pry#lib/pry/indent.rb:395 def correct_indentation(prompt, code, overhang = T.unsafe(nil)); end # Get the indentation for the start of the next line. @@ -6907,16 +6072,14 @@ class Pry::Indent # # @return String The correct number of spaces # - # source://pry//lib/pry/indent.rb#185 + # pkg:gem/pry#lib/pry/indent.rb:185 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#268 + # pkg:gem/pry#lib/pry/indent.rb:268 def end_of_statement?(last_token, last_kind); end # Are we currently in the middle of a string literal. @@ -6925,37 +6088,38 @@ class Pry::Indent # re-indent within string literals because to do so would actually change # the value of the String! # - # @return [Boolean] Boolean + # @return Boolean # - # source://pry//lib/pry/indent.rb#279 + # pkg:gem/pry#lib/pry/indent.rb:279 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#378 + # pkg:gem/pry#lib/pry/indent.rb:378 def module_nesting; end # All the open delimiters, in the order that they first appeared. # # @return [String] # - # source://pry//lib/pry/indent.rb#314 + # pkg:gem/pry#lib/pry/indent.rb:314 def open_delimiters; end # Return a string which restores the CodeRay string status to the correct value by @@ -7001,25 +6165,25 @@ class Pry::Indent # # @return String # - # source://pry//lib/pry/indent.rb#322 + # pkg:gem/pry#lib/pry/indent.rb:322 def open_delimiters_line; end # reset internal state # - # source://pry//lib/pry/indent.rb#113 + # pkg:gem/pry#lib/pry/indent.rb:113 def reset; end # @return [Array] The stack of open tokens. # - # source://pry//lib/pry/indent.rb#24 + # pkg:gem/pry#lib/pry/indent.rb:24 def stack; end # Given a string of Ruby code, use CodeRay to export the tokens. # - # @param string [String] The Ruby to lex + # @param [String] string The Ruby to lex # @return [Array] An Array of pairs of [token_value, token_type] # - # source://pry//lib/pry/indent.rb#287 + # pkg:gem/pry#lib/pry/indent.rb:287 def tokenize(string); end # Update the internal state about what kind of strings are open. @@ -7029,9 +6193,9 @@ class Pry::Indent # correctly pairs open-and-close delimiters so we don't bother checking what # they are. # - # @param token [String] The token (of type :delimiter) + # @param [String] token The token (of type :delimiter) # - # source://pry//lib/pry/indent.rb#299 + # pkg:gem/pry#lib/pry/indent.rb:299 def track_delimiter(token); end # Update the internal state relating to module nesting. @@ -7049,10 +6213,10 @@ class Pry::Indent # 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 + # @param [String] token a token from Coderay + # @param [Symbol] kind the kind of that token # - # source://pry//lib/pry/indent.rb#343 + # pkg:gem/pry#lib/pry/indent.rb:343 def track_module_nesting(token, kind); end # Update the internal state relating to module nesting on 'end'. @@ -7060,19 +6224,19 @@ class Pry::Indent # 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 + # @param [String] token a token from Coderay + # @param [Symbol] kind the kind of that token # - # source://pry//lib/pry/indent.rb#368 + # pkg:gem/pry#lib/pry/indent.rb:368 def track_module_nesting_end(token, kind = T.unsafe(nil)); end class << self # Clean the indentation of a fragment of ruby. # - # @param str [String] + # @param [String] str # @return [String] # - # source://pry//lib/pry/indent.rb#85 + # pkg:gem/pry#lib/pry/indent.rb:85 def indent(str); end # Get the module nesting at the given point in the given string. @@ -7081,11 +6245,11 @@ class Pry::Indent # 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) + # @param [String] str The ruby code to analyze + # @param [Fixnum] line_number The line number (starting from 1) # @return [Array] # - # source://pry//lib/pry/indent.rb#98 + # pkg:gem/pry#lib/pry/indent.rb:98 def nesting_at(str, line_number); end end end @@ -7097,13 +6261,13 @@ end # :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#63 +# pkg:gem/pry#lib/pry/indent.rb:63 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#79 +# pkg:gem/pry#lib/pry/indent.rb:79 Pry::Indent::MIDWAY_TOKENS = T.let(T.unsafe(nil), Array) # Hash containing all the tokens that should increase the indentation @@ -7111,23 +6275,23 @@ Pry::Indent::MIDWAY_TOKENS = T.let(T.unsafe(nil), Array) # tokens that should prevent a line from being indented if they appear on # the same line. # -# source://pry//lib/pry/indent.rb#33 +# pkg:gem/pry#lib/pry/indent.rb:33 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#55 +# pkg:gem/pry#lib/pry/indent.rb:55 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#52 +# pkg:gem/pry#lib/pry/indent.rb:52 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#27 +# pkg:gem/pry#lib/pry/indent.rb:27 Pry::Indent::SPACES = T.let(T.unsafe(nil), String) # Tokens that indicate the end of a statement (i.e. that, if they appear @@ -7137,93 +6301,91 @@ Pry::Indent::SPACES = T.let(T.unsafe(nil), String) # :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#72 +# pkg:gem/pry#lib/pry/indent.rb:72 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 +# pkg:gem/pry#lib/pry/indent.rb:15 class Pry::Indent::UnparseableNestingError < ::StandardError; end -# source://pry//lib/pry/input/simple_stdio.rb#4 +# pkg:gem/pry#lib/pry/input/simple_stdio.rb:4 module Pry::Input; end # Readline replacement for low-capability terminals. # -# source://pry//lib/pry/input/simple_stdio.rb#6 +# pkg:gem/pry#lib/pry/input/simple_stdio.rb:6 class Pry::Input::SimpleStdio class << self - # source://pry//lib/pry/input/simple_stdio.rb#7 + # pkg:gem/pry#lib/pry/input/simple_stdio.rb:7 def readline(prompt); end end end -# source://pry//lib/pry/input_completer.rb#6 +# pkg:gem/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 + # pkg:gem/pry#lib/pry/input_completer.rb:42 def initialize(input, pry = T.unsafe(nil)); end # build_path separates 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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/input_completer.rb:56 def call(str, options = T.unsafe(nil)); end - # source://pry//lib/pry/input_completer.rb#255 + # pkg:gem/pry#lib/pry/input_completer.rb:255 def ignored_modules; end - # source://pry//lib/pry/input_completer.rb#229 + # pkg:gem/pry#lib/pry/input_completer.rb:229 def select_message(path, receiver, message, candidates); end end -# source://pry//lib/pry/input_completer.rb#8 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 @@ -7231,128 +6393,107 @@ Pry::InputCompleter::WORD_ESCAPE_STR = T.let(T.unsafe(nil), String) # 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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/input_lock.rb:38 def __with_ownership; end - # source://pry//lib/pry/input_lock.rb#81 + # pkg:gem/pry#lib/pry/input_lock.rb:81 def enter_interruptible_region; end - # source://pry//lib/pry/input_lock.rb#108 + # pkg:gem/pry#lib/pry/input_lock.rb:108 def interruptible_region; end - # source://pry//lib/pry/input_lock.rb#95 + # pkg:gem/pry#lib/pry/input_lock.rb:95 def leave_interruptible_region; end - # source://pry//lib/pry/input_lock.rb#75 + # pkg:gem/pry#lib/pry/input_lock.rb:75 def with_ownership(&block); end class << self - # source://pry//lib/pry/input_lock.rb#19 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/input_lock.rb:12 def input_locks=(_arg0); end end end -# source://pry//lib/pry/input_lock.rb#9 +# pkg:gem/pry#lib/pry/input_lock.rb:9 class Pry::InputLock::Interrupt < ::Exception; end -# source://pry//lib/pry/inspector.rb#4 +# pkg:gem/pry#lib/pry/inspector.rb:4 class Pry::Inspector; end -# source://pry//lib/pry/inspector.rb#5 +# pkg:gem/pry#lib/pry/inspector.rb:5 Pry::Inspector::MAP = T.let(T.unsafe(nil), Hash) -# source://pry//lib/pry/pry_class.rb#7 +# pkg:gem/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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/last_exception.rb:13 def bt_index=(_arg0); end - # source://pry//lib/pry/last_exception.rb#52 + # pkg:gem/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}. + # @return [String] + # returns the path to a file for the current backtrace. see {#bt_index}. # - # source://pry//lib/pry/last_exception.rb#37 + # pkg:gem/pry#lib/pry/last_exception.rb:37 def file; end - # source://pry//lib/pry/last_exception.rb#57 + # pkg:gem/pry#lib/pry/last_exception.rb:57 def inc_bt_index; end - # @return [Fixnum] returns the line for the current backtrace. see {#bt_index}. + # @return [Fixnum] + # returns the line for the current backtrace. see {#bt_index}. # - # source://pry//lib/pry/last_exception.rb#43 + # pkg:gem/pry#lib/pry/last_exception.rb:43 def line; end - # source://pry//lib/pry/last_exception.rb#21 + # pkg:gem/pry#lib/pry/last_exception.rb:21 def method_missing(name, *args, &block); end - # @return [Exception] returns the wrapped exception + # @return [Exception] + # returns the wrapped exception # - # source://pry//lib/pry/last_exception.rb#48 + # pkg:gem/pry#lib/pry/last_exception.rb:48 def wrapped_exception; end private - # @return [Boolean] - # - # source://pry//lib/pry/last_exception.rb#29 + # pkg:gem/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 +# pkg:gem/pry#lib/pry/method.rb:20 class Pry::Method include ::Pry::Helpers::BaseHelpers include ::Pry::Helpers::DocumentationHelpers @@ -7364,62 +6505,59 @@ class Pry::Method # 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. + # @param [::Method, UnboundMethod, Proc] method + # @param [Hash] known_info Can be used to pre-cache expensive to compute stuff. # @return [Pry::Method] # - # source://pry//lib/pry/method.rb#263 + # pkg:gem/pry#lib/pry/method.rb:263 def initialize(method, known_info = T.unsafe(nil)); end # @return [Boolean] # - # source://pry//lib/pry/method.rb#483 + # pkg:gem/pry#lib/pry/method.rb:483 def ==(other); end # @return [Boolean] Is the method definitely an alias? # - # source://pry//lib/pry/method.rb#478 + # pkg:gem/pry#lib/pry/method.rb:478 def alias?; end # @return [Array] All known aliases for the method. # - # source://pry//lib/pry/method.rb#461 + # pkg:gem/pry#lib/pry/method.rb:461 def aliases; end # @return [Boolean] Whether the method is bound. # - # source://pry//lib/pry/method.rb#446 + # pkg:gem/pry#lib/pry/method.rb:446 def bound_method?; end - # source://pry//lib/pry/method.rb#515 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/method.rb:436 def dynamically_defined?; end - # @param klass [Class] + # @param [Class] klass # @return [Boolean] # - # source://pry//lib/pry/method.rb#491 + # pkg:gem/pry#lib/pry/method.rb:491 def is_a?(klass); end - # @param klass [Class] - # @return [Boolean] - # - # source://pry//lib/pry/method.rb#491 + # pkg:gem/pry#lib/pry/method.rb:494 def kind_of?(klass); end # Delegate any unknown calls to the wrapped method. # - # source://pry//lib/pry/method.rb#503 + # pkg:gem/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 @@ -7427,48 +6565,47 @@ class Pry::Method # # @return [String] # - # source://pry//lib/pry/method.rb#272 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/method.rb:429 def original_name; end - # source://forwardable/1.3.3/forwardable.rb#231 - def owner(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/method.rb:255 + def owner(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def parameters(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/method.rb:255 + def parameters(*, **, &); end # @return [Boolean] Was the method defined within the Pry REPL? # - # source://pry//lib/pry/method.rb#456 + # pkg:gem/pry#lib/pry/method.rb:456 def pry_method?; end - # source://forwardable/1.3.3/forwardable.rb#231 - def receiver(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/method.rb:255 + def receiver(*, **, &); end # Update the live copy of the method's source. # - # source://pry//lib/pry/method.rb#314 + # pkg:gem/pry#lib/pry/method.rb:314 def redefine(source); end - # @param method_name [String, Symbol] + # @param [String, Symbol] method_name # @return [Boolean] # - # source://pry//lib/pry/method.rb#498 + # pkg:gem/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 @@ -7477,242 +6614,224 @@ class Pry::Method # If the parameter names are unavailable, they're given numbered names instead. # Paraphrased from `awesome_print` gem. # - # source://pry//lib/pry/method.rb#391 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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. + # the method's definition, or `nil` if that information is unavailable. # - # source://pry//lib/pry/method.rb#367 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/method.rb:278 def wrapped_owner; end private - # source://pry//lib/pry/method.rb#577 + # pkg:gem/pry#lib/pry/method.rb:577 def c_source; end - # @param first_ln [String] The first line of a method definition. + # @param [String] first_ln The first line of a method definition. # @return [String, nil] # - # source://pry//lib/pry/method.rb#564 + # pkg:gem/pry#lib/pry/method.rb:564 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] + # @raise [CommandError] when the method can't be found or `pry-doc` isn't installed. # - # source://pry//lib/pry/method.rb#523 + # pkg:gem/pry#lib/pry/method.rb:523 def pry_doc_info; end - # @return [Boolean] - # - # source://pry//lib/pry/method.rb#511 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/method.rb:582 def ruby_source; end - # @param ancestors [Class, Module] The ancestors to investigate + # @param [Class, Module] ancestors The ancestors to investigate # @return [Method] The unwrapped super-method # - # source://pry//lib/pry/method.rb#543 + # pkg:gem/pry#lib/pry/method.rb:543 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. + # @param [Class,Module] klass + # @param [Boolean] include_super Whether to include methods from ancestors. # @return [Array[Pry::Method]] # - # source://pry//lib/pry/method.rb#161 + # pkg:gem/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. + # @param [Object] obj + # + # @param [Boolean] include_super + # indicates whether or not to include methods from ancestors. + # # @return [Array[Pry::Method]] # - # source://pry//lib/pry/method.rb#184 + # pkg:gem/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] + # @param [Binding] binding # @return [Pry::Method, nil] # - # source://pry//lib/pry/method.rb#77 + # pkg:gem/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. + # @param [Class, Module] klass + # @param [String] name + # @param [Binding] target The binding where the method is looked up. # @return [Pry::Method, nil] # - # source://pry//lib/pry/method.rb#136 + # pkg:gem/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 + + # pkg:gem/pry#lib/pry/method.rb:141 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. + # @param [Object] obj + # @param [String] name + # @param [Binding] target The binding where the method is looked up. # @return [Pry::Method, nil] # - # source://pry//lib/pry/method.rb#151 + # pkg:gem/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] + # @param [String] name The name of the method to retrieve. + # @param [Binding] target The context in which to search for the method. + # @param [Hash] options + # @option options [Boolean] :instance Look for an instance method if + # `name` doesn't contain any context. + # @option options [Boolean] :methods Look for a bound/singleton method if + # `name` doesn't contain any context. # @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 + # pkg:gem/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 + # pkg:gem/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] + # @param [Class, Module] klass # @return [Array[Class, Module]] # - # source://pry//lib/pry/method.rb#210 + # pkg:gem/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. + # @param [Object] obj The owner/receiver of the method. + # @param [Symbol] method_name The name of the method. + # @param [Symbol] method_type The type of method: :method or :instance_method + # @param [Binding] target The binding where the method is looked up. # @return [Method, UnboundMethod] The 'refined' method object. # - # source://pry//lib/pry/method.rb#114 + # pkg:gem/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 + # pkg:gem/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] + # @param [Object] obj # @return [Array[Class, Module]] # - # source://pry//lib/pry/method.rb#192 + # pkg:gem/pry#lib/pry/method.rb:192 def resolution_order(obj); end - # source://pry//lib/pry/method.rb#247 + # pkg:gem/pry#lib/pry/method.rb:247 def singleton_class_of(obj); end # Get the singleton classes of superclasses that could define methods on @@ -7720,12 +6839,10 @@ class Pry::Method # 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 + # pkg:gem/pry#lib/pry/method.rb:238 def singleton_class_resolution_order(klass); end - # @return [Boolean] - # - # source://pry//lib/pry/method.rb#220 + # pkg:gem/pry#lib/pry/method.rb:220 def singleton_method_definition?(name, definition_line); end end end @@ -7744,88 +6861,71 @@ end # # This occurs mainly in Sinatra applications. # -# source://pry//lib/pry/method/disowned.rb#18 +# pkg:gem/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 + # @param [Object] receiver + # @param [String] method_name # - # source://pry//lib/pry/method/disowned.rb#25 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/method/disowned.rb:46 def owner; end - # Returns the value of attribute receiver. - # - # source://pry//lib/pry/method/disowned.rb#19 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/method/disowned.rb:33 def undefined?; end private - # @return [Boolean] - # - # source://pry//lib/pry/method/disowned.rb#62 + # pkg:gem/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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/method/patcher.rb:6 def method=(_arg0); end # perform the patch # - # source://pry//lib/pry/method/patcher.rb#21 + # pkg:gem/pry#lib/pry/method/patcher.rb:21 def patch_in_ram(source); end private - # source://pry//lib/pry/method/patcher.rb#38 + # pkg:gem/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 @@ -7838,13 +6938,13 @@ class Pry::Method::Patcher # 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) + # @param [String] line 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 + # pkg:gem/pry#lib/pry/method/patcher.rb:78 def definition_for_owner(line); end - # source://pry//lib/pry/method/patcher.rb#33 + # pkg:gem/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. @@ -7854,15 +6954,14 @@ class Pry::Method::Patcher # translation we make that not happen, which means that alias_method_chains, etc. # continue to work. # - # source://pry//lib/pry/method/patcher.rb#49 + # pkg:gem/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] + # @param [String] source # @return [String] The wrapped source. # - # source://pry//lib/pry/method/patcher.rb#91 + # pkg:gem/pry#lib/pry/method/patcher.rb:91 def wrap(source); end # Update the new source code to have the correct Module.nesting. @@ -7875,10 +6974,10 @@ class Pry::Method::Patcher # # The resulting code should be evaluated in the TOPLEVEL_BINDING. # - # @param source [String] The source to wrap. + # @param [String] source The source to wrap. # @return [String] # - # source://pry//lib/pry/method/patcher.rb#122 + # pkg:gem/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. @@ -7887,14 +6986,14 @@ class Pry::Method::Patcher # wrap_for_nesting fails, to ensure that the method will still be defined in # the correct place. # - # @param source [String] The source to wrap + # @param [String] source The source to wrap # @return [String] # - # source://pry//lib/pry/method/patcher.rb#103 + # pkg:gem/pry#lib/pry/method/patcher.rb:103 def wrap_for_owner(source); end class << self - # source://pry//lib/pry/method/patcher.rb#16 + # pkg:gem/pry#lib/pry/method/patcher.rb:16 def code_for(filename); end end end @@ -7914,59 +7013,46 @@ end # 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 +# pkg:gem/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 + # @param [Pry::Method] method The seed method. + # @param [Binding] target 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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/method/weird_method_locator.rb:50 def target=(_arg0); end private - # source://pry//lib/pry/method/weird_method_locator.rb#215 + # pkg:gem/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 + # pkg:gem/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 @@ -7985,7 +7071,7 @@ class Pry::Method::WeirdMethodLocator # @return [Pry::Method, nil] The Pry::Method representing the # superclass method. # - # source://pry//lib/pry/method/weird_method_locator.rb#131 + # pkg:gem/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 @@ -7995,23 +7081,19 @@ class Pry::Method::WeirdMethodLocator # @return [Pry::Method, nil] The Pry::Method representing the # renamed method # - # source://pry//lib/pry/method/weird_method_locator.rb#156 + # pkg:gem/pry#lib/pry/method/weird_method_locator.rb:156 def find_renamed_method; end - # source://pry//lib/pry/method/weird_method_locator.rb#197 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/method/weird_method_locator.rb:106 def pry_file?; end # Use static analysis to locate the start of the method definition. @@ -8022,26 +7104,22 @@ class Pry::Method::WeirdMethodLocator # @return [Array] The `source_location` of the # renamed method # - # source://pry//lib/pry/method/weird_method_locator.rb#184 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/method/weird_method_locator.rb:75 def skip_superclass_search?; end - # source://pry//lib/pry/method/weird_method_locator.rb#88 + # pkg:gem/pry#lib/pry/method/weird_method_locator.rb:88 def target_file; end - # source://pry//lib/pry/method/weird_method_locator.rb#98 + # pkg:gem/pry#lib/pry/method/weird_method_locator.rb:98 def target_line; end - # source://pry//lib/pry/method/weird_method_locator.rb#84 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/method/weird_method_locator.rb:202 def valid_file?(file); end class << self @@ -8050,28 +7128,24 @@ class Pry::Method::WeirdMethodLocator # most likely not the method captured by the binding, and we # must commence a search. # - # @param method [Pry::Method] - # @param binding [Binding] + # @param [Pry::Method] method + # @param [Binding] binding # @return [Boolean] # - # source://pry//lib/pry/method/weird_method_locator.rb#29 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/method/weird_method_locator.rb:44 def weird_method?(method, binding); end end end -# source://pry//lib/pry/exceptions.rb#69 +# pkg:gem/pry#lib/pry/exceptions.rb:69 class Pry::MethodNotFound < ::Pry::CommandError; end -# source://pry//lib/pry/command_set.rb#4 +# pkg:gem/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 + # pkg:gem/pry#lib/pry/command_set.rb:5 def initialize(match, owner); end end @@ -8085,139 +7159,123 @@ end # 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 +# pkg:gem/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 + # @param [String] path_string The object path expressed as a string. + # @param [Array] current_stack The current state of the binding # stack. - # @return [ObjectPath] a new instance of ObjectPath # - # source://pry//lib/pry/object_path.rb#23 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/object_path.rb:30 def resolve; end private - # @return [Boolean] - # - # source://pry//lib/pry/object_path.rb#74 + # pkg:gem/pry#lib/pry/object_path.rb:74 def complete?(segment); end - # source://pry//lib/pry/object_path.rb#78 + # pkg:gem/pry#lib/pry/object_path.rb:78 def handle_failure(context, err); end end -# source://pry//lib/pry/object_path.rb#18 +# pkg:gem/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 +# pkg:gem/pry#lib/pry/exceptions.rb:72 class Pry::ObsoleteError < ::StandardError; end -# source://pry//lib/pry/output.rb#4 +# pkg:gem/pry#lib/pry/output.rb:4 class Pry::Output - # @return [Output] a new instance of Output - # - # source://pry//lib/pry/output.rb#10 + # pkg:gem/pry#lib/pry/output.rb:10 def initialize(pry_instance); end - # source://pry//lib/pry/output.rb#28 + # pkg:gem/pry#lib/pry/output.rb:34 def <<(*objs); end - # source://pry//lib/pry/output.rb#53 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/output.rb:74 def height; end - # source://pry//lib/pry/output.rb#41 + # pkg:gem/pry#lib/pry/output.rb:41 def method_missing(method_name, *args, &block); end - # source://pry//lib/pry/output.rb#28 + # pkg:gem/pry#lib/pry/output.rb:28 def print(*objs); end - # Returns the value of attribute pry_instance. - # - # source://pry//lib/pry/output.rb#8 + # pkg:gem/pry#lib/pry/output.rb:8 def pry_instance; end - # source://pry//lib/pry/output.rb#15 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/output.rb:61 def size; end - # @return [Boolean] - # - # source://pry//lib/pry/output.rb#37 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/output.rb:69 def width; end - # source://pry//lib/pry/output.rb#28 + # pkg:gem/pry#lib/pry/output.rb:35 def write(*objs); end private - # source://pry//lib/pry/output.rb#80 + # pkg:gem/pry#lib/pry/output.rb:80 def actual_screen_size; end - # source://pry//lib/pry/output.rb#125 + # pkg:gem/pry#lib/pry/output.rb:125 def ansicon_env_size; end - # source://pry//lib/pry/output.rb#109 + # pkg:gem/pry#lib/pry/output.rb:109 def env_size; end - # source://pry//lib/pry/output.rb#92 + # pkg:gem/pry#lib/pry/output.rb:92 def io_console_size; end - # @return [Boolean] - # - # source://pry//lib/pry/output.rb#132 + # pkg:gem/pry#lib/pry/output.rb:132 def nonzero_column?(size); end - # source://pry//lib/pry/output.rb#114 + # pkg:gem/pry#lib/pry/output.rb:114 def readline_size; end - # @return [Boolean] - # - # source://pry//lib/pry/output.rb#49 + # pkg:gem/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 +# pkg:gem/pry#lib/pry/output.rb:6 Pry::Output::DEFAULT_SIZE = T.let(T.unsafe(nil), Array) -# source://pry//lib/pry/pager.rb#7 +# pkg:gem/pry#lib/pry/pager.rb:7 class Pry::Pager - # @return [Pager] a new instance of Pager - # - # source://pry//lib/pry/pager.rb#13 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/pager.rb:33 def open; end # Send the given text through the best available pager (if @@ -8225,14 +7283,13 @@ class Pry::Pager # chunks as you generate it, use `open` to get a writable object # instead. # - # @param text [String] Text to run through a pager. + # @param [String] text + # Text to run through a pager. # - # source://pry//lib/pry/pager.rb#25 + # pkg:gem/pry#lib/pry/pager.rb:25 def page(text); end - # Returns the value of attribute pry_instance. - # - # source://pry//lib/pry/pager.rb#11 + # pkg:gem/pry#lib/pry/pager.rb:11 def pry_instance; end private @@ -8245,51 +7302,45 @@ class Pry::Pager # you must rescue `Pry::Pager::StopPaging`. These requirements can be # avoided by using `.open` instead. # - # source://pry//lib/pry/pager.rb#56 + # pkg:gem/pry#lib/pry/pager.rb:56 def best_available; end - # @return [Boolean] - # - # source://pry//lib/pry/pager.rb#43 + # pkg:gem/pry#lib/pry/pager.rb:43 def enabled?; end - # Returns the value of attribute output. - # - # source://pry//lib/pry/pager.rb#47 + # pkg:gem/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 +# pkg:gem/pry#lib/pry/pager.rb:68 class Pry::Pager::NullPager - # @return [NullPager] a new instance of NullPager - # - # source://pry//lib/pry/pager.rb#69 + # pkg:gem/pry#lib/pry/pager.rb:69 def initialize(out); end - # source://pry//lib/pry/pager.rb#77 + # pkg:gem/pry#lib/pry/pager.rb:80 def <<(str); end - # source://pry//lib/pry/pager.rb#86 + # pkg:gem/pry#lib/pry/pager.rb:86 def close; end - # source://pry//lib/pry/pager.rb#77 + # pkg:gem/pry#lib/pry/pager.rb:77 def print(str); end - # source://pry//lib/pry/pager.rb#73 + # pkg:gem/pry#lib/pry/pager.rb:73 def puts(str); end - # source://pry//lib/pry/pager.rb#82 + # pkg:gem/pry#lib/pry/pager.rb:82 def write(str); end private - # source://pry//lib/pry/pager.rb#90 + # pkg:gem/pry#lib/pry/pager.rb:90 def height; end - # source://pry//lib/pry/pager.rb#94 + # pkg:gem/pry#lib/pry/pager.rb:94 def width; end end @@ -8303,22 +7354,18 @@ end # 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 +# pkg:gem/pry#lib/pry/pager.rb:213 class Pry::Pager::PageTracker - # @return [PageTracker] a new instance of PageTracker - # - # source://pry//lib/pry/pager.rb#214 + # pkg:gem/pry#lib/pry/pager.rb:214 def initialize(rows, cols); end - # @return [Boolean] - # - # source://pry//lib/pry/pager.rb#231 + # pkg:gem/pry#lib/pry/pager.rb:231 def page?; end - # source://pry//lib/pry/pager.rb#220 + # pkg:gem/pry#lib/pry/pager.rb:220 def record(str); end - # source://pry//lib/pry/pager.rb#235 + # pkg:gem/pry#lib/pry/pager.rb:235 def reset; end private @@ -8326,25 +7373,23 @@ class Pry::Pager::PageTracker # Approximation of the printable length of a given line, without the # newline and without ANSI color codes. # - # source://pry//lib/pry/pager.rb#244 + # pkg:gem/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 +# pkg:gem/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 + # pkg:gem/pry#lib/pry/pager.rb:102 + def initialize(*); end - # source://pry//lib/pry/pager.rb#107 + # pkg:gem/pry#lib/pry/pager.rb:107 def write(str); end end -# source://pry//lib/pry/pager.rb#8 +# pkg:gem/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 @@ -8352,39 +7397,33 @@ class Pry::Pager::StopPaging < ::StandardError; end # to it. If `#close` is called before then, it just prints out the # buffered content. # -# source://pry//lib/pry/pager.rb#129 +# pkg:gem/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 + # pkg:gem/pry#lib/pry/pager.rb:161 + def initialize(*); end - # source://pry//lib/pry/pager.rb#181 + # pkg:gem/pry#lib/pry/pager.rb:181 def close; end - # source://pry//lib/pry/pager.rb#168 + # pkg:gem/pry#lib/pry/pager.rb:168 def write(str); end private - # @return [Boolean] - # - # source://pry//lib/pry/pager.rb#195 + # pkg:gem/pry#lib/pry/pager.rb:195 def invoked_pager?; end - # source://pry//lib/pry/pager.rb#199 + # pkg:gem/pry#lib/pry/pager.rb:199 def pager; end - # source://pry//lib/pry/pager.rb#191 + # pkg:gem/pry#lib/pry/pager.rb:191 def write_to_pager(text); end class << self - # @return [Boolean] - # - # source://pry//lib/pry/pager.rb#142 + # pkg:gem/pry#lib/pry/pager.rb:142 def available?; end - # source://pry//lib/pry/pager.rb#130 + # pkg:gem/pry#lib/pry/pager.rb:130 def default_pager; end end end @@ -8393,13 +7432,12 @@ end # 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', [':', '...:'] +# :ipython, +# 'IPython-like prompt', [':', '...:'] # ) do |_context, _nesting, pry_instance, sep| -# sep == ':' ? "In [#{pry_instance.input_ring.count}]: " : ' ...: ' +# sep == ':' ? "In [#{pry_instance.input_ring.count}]: " : ' ...: ' # end # # # Produces: @@ -8408,159 +7446,142 @@ end # # ...: end # # => :foo # # In [4]: +# # @example Manually instantiating the Prompt class # prompt_procs = [ -# proc { '#{rand(1)}>" }, -# proc { "#{('a'..'z').to_a.sample}*" } +# proc { '#{rand(1)}>" }, +# proc { "#{('a'..'z').to_a.sample}*" } # ] # prompt = Pry::Prompt.new( -# :random, -# 'Random number or letter prompt.', -# prompt_procs +# :random, +# 'Random number or letter prompt.', +# prompt_procs # ) # prompt.wait_proc.call(...) #=> # prompt.incomplete_proc.call(...) +# # @since v0.11.0 +# @api public # -# source://pry//lib/pry/prompt.rb#38 +# pkg:gem/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 + # @param [String] name + # @param [String] description + # @param [Array] prompt_procs + # + # pkg:gem/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 + # pkg:gem/pry#lib/pry/prompt.rb:135 def [](key); end - # @api public # @return [String] - # @since v0.11.0 # - # source://pry//lib/pry/prompt.rb#108 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # + # @param [Symbol] name The name of the prompt you want to access # @return [Hash{Symbol=>Object}] # @since v0.12.0 # - # source://pry//lib/pry/prompt.rb#52 + # pkg:gem/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 + # @param [Symbol] name + # @param [String] description + # @param [Array] separators 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 + # @return [nil] + # @raise [ArgumentError] if the size of `separators` is not 2 + # @raise [ArgumentError] if `prompt_name` is already occupied + # @since v0.12.0 # - # source://pry//lib/pry/prompt.rb#79 + # pkg:gem/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 + # @note Use this for read-only operations # @since v0.12.0 # - # source://pry//lib/pry/prompt.rb#59 + # pkg:gem/pry#lib/pry/prompt.rb:59 def all; end end end -# source://pry//lib/pry/repl.rb#4 +# pkg:gem/pry#lib/pry/repl.rb:4 class Pry::REPL extend ::Forwardable extend ::Pry::Forwardable # Create an instance of {REPL} wrapping the given {Pry}. + # @param [Pry] pry The instance of {Pry} that this {REPL} will control. + # @param [Hash] options Options for this {REPL} instance. + # @option options [Object] :target The initial target of the session. # - # @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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/repl.rb:6 + def input(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def output(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/repl.rb:6 + def output(*, **, &); end # @return [Pry] The instance of {Pry} that the user is controlling. # - # source://pry//lib/pry/repl.rb#9 + # pkg:gem/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 + # pkg:gem/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. + # @raise [Exception] If the session throws `:raise_up`, raise the exception + # thrown with it. # - # source://pry//lib/pry/repl.rb#36 + # pkg:gem/pry#lib/pry/repl.rb:36 def start; end private @@ -8568,52 +7589,43 @@ class Pry::REPL # Calculates correct overhang for current line. Supports vi Readline # mode and its indicators such as "(ins)" or "(cmd)". # + # @return [Integer] # @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#307 + # pkg:gem/pry#lib/pry/repl.rb:307 def calculate_overhang(current_prompt, original_val, indented_val); end - # @return [Boolean] - # - # source://pry//lib/pry/repl.rb#287 + # pkg:gem/pry#lib/pry/repl.rb:287 def complete_expression?(multiline_input); end - # @return [Boolean] - # - # source://pry//lib/pry/repl.rb#246 + # pkg:gem/pry#lib/pry/repl.rb:246 def coolline_available?; end # Clean up after the repl session. - # # @return [void] # - # source://pry//lib/pry/repl.rb#84 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/repl.rb:127 def handle_read_errors; end - # @return [Boolean] - # - # source://pry//lib/pry/repl.rb#234 + # pkg:gem/pry#lib/pry/repl.rb:234 def input_multiline?; end - # source://pry//lib/pry/repl.rb#228 + # pkg:gem/pry#lib/pry/repl.rb:228 def input_readline(*args); end - # source://pry//lib/pry/repl.rb#219 + # pkg:gem/pry#lib/pry/repl.rb:219 def input_readmultiline(*args); end # If `$stdout` is not a tty, it's probably a pipe. - # # @example # # `piping?` returns `false` # % pry @@ -8621,49 +7633,39 @@ class Pry::REPL # # # `piping?` returns `true` # % pry | tee log - # @return [Boolean] # - # source://pry//lib/pry/repl.rb#272 + # pkg:gem/pry#lib/pry/repl.rb:272 def piping?; end - # @return [Boolean] - # - # source://pry//lib/pry/repl.rb#250 + # pkg:gem/pry#lib/pry/repl.rb:250 def prism_available?; end # Set up the repl session. - # # @return [void] # - # source://pry//lib/pry/repl.rb#47 + # pkg:gem/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 + # pkg:gem/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. + # @param [String] current_prompt The prompt to use for input. # @return [String?] The next line of input, or `nil` on . # - # source://pry//lib/pry/repl.rb#169 + # pkg:gem/pry#lib/pry/repl.rb:169 def read_line(current_prompt); end - # @return [Boolean] - # - # source://pry//lib/pry/repl.rb#242 + # pkg:gem/pry#lib/pry/repl.rb:242 def readline_available?; end - # @return [Boolean] - # - # source://pry//lib/pry/repl.rb#238 + # pkg:gem/pry#lib/pry/repl.rb:238 def reline_available?; end # The actual read-eval-print loop. @@ -8672,32 +7674,30 @@ class Pry::REPL # {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. + # @raise [Exception] If the session throws `:raise_up`, raise the exception + # thrown with it. # - # source://pry//lib/pry/repl.rb#66 + # pkg:gem/pry#lib/pry/repl.rb:66 def repl; end # @return [void] # - # source://pry//lib/pry/repl.rb#279 + # pkg:gem/pry#lib/pry/repl.rb:279 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 See {Pry#initialize} # - # @option options - # @param options [Hash] a customizable set of options - # - # source://pry//lib/pry/repl.rb#14 + # pkg:gem/pry#lib/pry/repl.rb:14 def start(options); end end end -# source://pry//lib/pry/repl.rb#285 +# pkg:gem/pry#lib/pry/repl.rb:285 Pry::REPL::UNEXPECTED_TOKENS = T.let(T.unsafe(nil), Array) # A class to manage the loading of files through the REPL loop. @@ -8710,40 +7710,36 @@ Pry::REPL::UNEXPECTED_TOKENS = T.let(T.unsafe(nil), Array) # the error before returning to non-interactive processing with the # 'make-non-interactive' command. # -# source://pry//lib/pry/repl_file_loader.rb#14 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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] pry_instance the Pry instance to make interactive. # - # @param pry_instance [Pry] the Pry instance to make interactive. - # - # source://pry//lib/pry/repl_file_loader.rb#26 + # pkg:gem/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 + # pkg:gem/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] pry_instance the Pry instance to make non-interactive. # - # @param pry_instance [Pry] the Pry instance to make non-interactive. - # - # source://pry//lib/pry/repl_file_loader.rb#37 + # pkg:gem/pry#lib/pry/repl_file_loader.rb:37 def non_interactive_mode(pry_instance, content); end end @@ -8751,10 +7747,10 @@ end # 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 +# pkg:gem/pry#lib/pry/exceptions.rb:7 module Pry::RescuableException class << self - # source://pry//lib/pry/exceptions.rb#8 + # pkg:gem/pry#lib/pry/exceptions.rb:8 def ===(exception); end end end @@ -8762,31 +7758,25 @@ 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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/command_set.rb:407 def command?; end - # Returns the value of attribute retval. - # - # source://pry//lib/pry/command_set.rb#398 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/command_set.rb:414 def void_command?; end end @@ -8794,7 +7784,6 @@ end # elements. Older entries are overwritten as you add new elements, so that the # ring can never contain more than `max_size` elements. # -# @api public # @example # ring = Pry::Ring.new(3) # ring << 1 << 2 << 3 @@ -8806,90 +7795,68 @@ end # ring[-1] #=> 4 # ring.clear # ring[0] #=> nil +# +# @api public # @since v0.12.0 # -# source://pry//lib/pry/ring.rb#22 +# pkg:gem/pry#lib/pry/ring.rb:22 class Pry::Ring - # @api public - # @param max_size [Integer] Maximum buffer size. The buffer will start + # @param [Integer] max_size 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 + # pkg:gem/pry#lib/pry/ring.rb:33 def initialize(max_size); end # Push `value` to the current index. # - # @api public - # @param value [Object] + # @param [Object] value # @return [self] - # @since v0.12.0 # - # source://pry//lib/pry/ring.rb#43 + # pkg:gem/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 + # @param [Integer, Range] index 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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/ring.rb:29 def size; end - # @api public # @return [Array] the buffer as unwinded array - # @since v0.12.0 # - # source://pry//lib/pry/ring.rb#67 + # pkg:gem/pry#lib/pry/ring.rb:67 def to_a; end private - # @api public - # @since v0.12.0 - # - # source://pry//lib/pry/ring.rb#84 + # pkg:gem/pry#lib/pry/ring.rb:84 def transpose_buffer_tail; end end -# source://pry//lib/pry/slop.rb#5 +# pkg:gem/pry#lib/pry/slop.rb:5 class Pry::Slop include ::Enumerable @@ -8898,9 +7865,7 @@ class Pry::Slop # 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 + # pkg:gem/pry#lib/pry/slop.rb:127 def initialize(config = T.unsafe(nil), &block); end # Fetch an options argument value. @@ -8909,7 +7874,7 @@ class Pry::Slop # # Returns the Object value for this option, or nil. # - # source://pry//lib/pry/slop.rb#278 + # pkg:gem/pry#lib/pry/slop.rb:278 def [](key); end # Add a callback. @@ -8918,7 +7883,7 @@ class Pry::Slop # # Returns nothing. # - # source://pry//lib/pry/slop.rb#398 + # pkg:gem/pry#lib/pry/slop.rb:398 def add_callback(label, &block); end # Get or set the banner. @@ -8927,14 +7892,14 @@ class Pry::Slop # # Returns the banner String. # - # source://pry//lib/pry/slop.rb#168 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/slop.rb:159 def banner=(banner); end # Add a new command. @@ -8944,12 +7909,12 @@ class Pry::Slop # # Returns a new instance of Slop mapped to this command. # - # source://pry//lib/pry/slop.rb#196 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/slop.rb:118 def config; end # Get or set the description (used for commands). @@ -8958,19 +7923,19 @@ class Pry::Slop # # Returns the description String. # - # source://pry//lib/pry/slop.rb#185 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/slop.rb:176 def description=(desc); end # Enumerable interface. Yields each Slop::Option. # - # source://pry//lib/pry/slop.rb#297 + # pkg:gem/pry#lib/pry/slop.rb:297 def each(&block); end # Fetch a Slop object associated with this command. @@ -8986,7 +7951,7 @@ class Pry::Slop # # ruby run.rb foo -v # opts.fetch_command(:foo).verbose? #=> true # - # source://pry//lib/pry/slop.rb#389 + # pkg:gem/pry#lib/pry/slop.rb:389 def fetch_command(command); end # Fetch a Slop::Option object. @@ -9002,23 +7967,13 @@ class Pry::Slop # # Returns an Option or nil if none were found. # - # source://pry//lib/pry/slop.rb#373 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/slop.rb:282 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 + # pkg:gem/pry#lib/pry/slop.rb:440 def help; end # Fetch a list of options which were missing from the parsed list. @@ -9035,7 +7990,7 @@ class Pry::Slop # # Returns an Array of Strings representing missing options. # - # source://pry//lib/pry/slop.rb#357 + # pkg:gem/pry#lib/pry/slop.rb:357 def missing; end # Add an Option. @@ -9049,40 +8004,18 @@ class Pry::Slop # # Returns the created instance of Slop::Option. # - # source://pry//lib/pry/slop.rb#265 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/slop.rb:271 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 + # pkg:gem/pry#lib/pry/slop.rb:270 def option(*objects, &block); end # The Array of Slop::Option objects tied to this Slop instance. # - # source://pry//lib/pry/slop.rb#121 + # pkg:gem/pry#lib/pry/slop.rb:121 def options; end # Parse a list of items, executing and gathering options along the way. @@ -9092,7 +8025,7 @@ class Pry::Slop # # Returns an Array of original items. # - # source://pry//lib/pry/slop.rb#206 + # pkg:gem/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. @@ -9104,7 +8037,7 @@ class Pry::Slop # # Returns an Array of original items with options removed. # - # source://pry//lib/pry/slop.rb#219 + # pkg:gem/pry#lib/pry/slop.rb:219 def parse!(items = T.unsafe(nil), &block); end # Check for an options presence. @@ -9117,9 +8050,7 @@ class Pry::Slop # # Returns true if all of the keys are present in the parsed arguments. # - # @return [Boolean] - # - # source://pry//lib/pry/slop.rb#333 + # pkg:gem/pry#lib/pry/slop.rb:333 def present?(*keys); end # Specify code to be executed when these options are parsed. @@ -9139,46 +8070,38 @@ class Pry::Slop # end # end # - # @raise [ArgumentError] - # - # source://pry//lib/pry/slop.rb#317 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/slop.rb:294 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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/slop.rb:416 def to_s; end private @@ -9190,7 +8113,7 @@ class Pry::Slop # # Returns nothing. # - # source://pry//lib/pry/slop.rb#590 + # pkg:gem/pry#lib/pry/slop.rb:590 def autocreate(items, index); end # Build an option from a list of objects. @@ -9199,7 +8122,7 @@ class Pry::Slop # # Returns a new instance of Slop::Option. # - # source://pry//lib/pry/slop.rb#606 + # pkg:gem/pry#lib/pry/slop.rb:606 def build_option(objects, &block); end # Remove any leading -- characters from a string. @@ -9208,10 +8131,10 @@ class Pry::Slop # # Returns the newly cleaned String with leading -- characters removed. # - # source://pry//lib/pry/slop.rb#659 + # pkg:gem/pry#lib/pry/slop.rb:659 def clean(object); end - # source://pry//lib/pry/slop.rb#663 + # pkg:gem/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 @@ -9223,7 +8146,7 @@ class Pry::Slop # # Returns nothing. # - # source://pry//lib/pry/slop.rb#552 + # pkg:gem/pry#lib/pry/slop.rb:552 def execute_multiple_switches(option, argument, index); end # Execute an option, firing off callbacks and assigning arguments. @@ -9235,7 +8158,7 @@ class Pry::Slop # # Returns nothing. # - # source://pry//lib/pry/slop.rb#519 + # pkg:gem/pry#lib/pry/slop.rb:519 def execute_option(option, argument, index, item = T.unsafe(nil)); end # Extract the long flag from an item. @@ -9243,7 +8166,7 @@ class Pry::Slop # 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 + # pkg:gem/pry#lib/pry/slop.rb:644 def extract_long_flag(objects, config); end # Extract an option from a flag. @@ -9252,7 +8175,7 @@ class Pry::Slop # # Returns an Array of [option, argument]. # - # source://pry//lib/pry/slop.rb#567 + # pkg:gem/pry#lib/pry/slop.rb:567 def extract_option(flag); end # Extract the short flag from an item. @@ -9260,7 +8183,7 @@ class Pry::Slop # 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 + # pkg:gem/pry#lib/pry/slop.rb:626 def extract_short_flag(objects, config); end # Convenience method for present?(:option). @@ -9274,7 +8197,7 @@ class Pry::Slop # 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 + # pkg:gem/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 @@ -9286,16 +8209,14 @@ class Pry::Slop # # Returns nothing. # - # source://pry//lib/pry/slop.rb#472 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/slop.rb:340 def respond_to_missing?(method_name, include_all = T.unsafe(nil)); end class << self @@ -9324,7 +8245,7 @@ class Pry::Slop # # Returns a new instance of Slop. # - # source://pry//lib/pry/slop.rb#97 + # pkg:gem/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). @@ -9339,7 +8260,7 @@ class Pry::Slop # # Returns a new instance of Slop. # - # source://pry//lib/pry/slop.rb#54 + # pkg:gem/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). @@ -9348,12 +8269,12 @@ class Pry::Slop # # Returns a new instance of Slop. # - # source://pry//lib/pry/slop.rb#63 + # pkg:gem/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 +# pkg:gem/pry#lib/pry/slop/commands.rb:5 class Pry::Slop::Commands include ::Enumerable @@ -9385,9 +8306,7 @@ class Pry::Slop::Commands # commands[:new].class #=> Slop # commands.parse # - # @return [Commands] a new instance of Commands - # - # source://pry//lib/pry/slop/commands.rb#39 + # pkg:gem/pry#lib/pry/slop/commands.rb:39 def initialize(config = T.unsafe(nil), &block); end # Fetch the instance of Slop tied to a command. @@ -9396,12 +8315,10 @@ class Pry::Slop::Commands # # Returns the Slop instance if this key is found, nil otherwise. # - # source://pry//lib/pry/slop/commands.rb#100 + # pkg:gem/pry#lib/pry/slop/commands.rb:100 def [](key); end - # Returns the value of attribute arguments. - # - # source://pry//lib/pry/slop/commands.rb#8 + # pkg:gem/pry#lib/pry/slop/commands.rb:8 def arguments; end # Optionally set the banner for this command help output. @@ -9410,24 +8327,22 @@ class Pry::Slop::Commands # # Returns the String banner if one is set. # - # source://pry//lib/pry/slop/commands.rb#59 + # pkg:gem/pry#lib/pry/slop/commands.rb:59 def banner(banner = T.unsafe(nil)); end - # Sets the attribute banner + # Optionally set the banner for this command help output. + # + # banner - The String text to set the banner. # - # @param value the value to set the attribute banner to. + # Returns the String banner if one is set. # - # source://pry//lib/pry/slop/commands.rb#9 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/slop/commands.rb:8 def commands; end - # Returns the value of attribute config. - # - # source://pry//lib/pry/slop/commands.rb#8 + # pkg:gem/pry#lib/pry/slop/commands.rb:8 def config; end # Add a Slop instance used when no other commands exist. @@ -9437,21 +8352,15 @@ class Pry::Slop::Commands # # Returns the newly created Slop instance mapped to default. # - # source://pry//lib/pry/slop/commands.rb#81 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/slop/commands.rb:103 def get(key); end # Add a global Slop instance. @@ -9461,17 +8370,15 @@ class Pry::Slop::Commands # # Returns the newly created Slop instance mapped to global. # - # source://pry//lib/pry/slop/commands.rb#91 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/slop/commands.rb:167 def help; end # Returns the inspection String. # - # source://pry//lib/pry/slop/commands.rb#170 + # pkg:gem/pry#lib/pry/slop/commands.rb:170 def inspect; end # Add a Slop instance for a specific command. @@ -9482,7 +8389,7 @@ class Pry::Slop::Commands # # Returns the newly created Slop instance mapped to command. # - # source://pry//lib/pry/slop/commands.rb#71 + # pkg:gem/pry#lib/pry/slop/commands.rb:71 def on(command, config = T.unsafe(nil), &block); end # Parse a list of items. @@ -9491,7 +8398,7 @@ class Pry::Slop::Commands # # Returns the original Array of items. # - # source://pry//lib/pry/slop/commands.rb#128 + # pkg:gem/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. @@ -9500,7 +8407,7 @@ class Pry::Slop::Commands # # Returns the original Array of items with options removed. # - # source://pry//lib/pry/slop/commands.rb#138 + # pkg:gem/pry#lib/pry/slop/commands.rb:138 def parse!(items = T.unsafe(nil)); end # Check for a command presence. @@ -9513,70 +8420,68 @@ class Pry::Slop::Commands # # Returns true if the given key is present in the parsed arguments. # - # @return [Boolean] - # - # source://pry//lib/pry/slop/commands.rb#114 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/slop/commands.rb:153 def to_hash; end # Returns the help String. # - # source://pry//lib/pry/slop/commands.rb#158 + # pkg:gem/pry#lib/pry/slop/commands.rb:158 def to_s; end private # Returns nothing. # - # source://pry//lib/pry/slop/commands.rb#177 + # pkg:gem/pry#lib/pry/slop/commands.rb:177 def execute_arguments!(items); end # Returns nothing. # - # source://pry//lib/pry/slop/commands.rb#183 + # pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/pry#lib/pry/slop.rb:18 class Pry::Slop::MissingOptionError < ::Pry::Slop::Error; end -# source://pry//lib/pry/slop/option.rb#5 +# pkg:gem/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 @@ -9589,106 +8494,76 @@ class Pry::Slop::Option # 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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/slop/option.rb:22 def config; end - # Returns the value of attribute count. - # - # source://pry//lib/pry/slop/option.rb#23 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/slop/option.rb:140 def help; end # Returns the String inspection text. # - # source://pry//lib/pry/slop/option.rb#143 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/slop/option.rb:77 def key; end - # Returns the value of attribute long. - # - # source://pry//lib/pry/slop/option.rb#22 + # pkg:gem/pry#lib/pry/slop/option.rb:22 def long; end - # Returns the value of attribute short. - # - # source://pry//lib/pry/slop/option.rb#22 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/slop/option.rb:108 def value; end # Set the new argument value for this option. @@ -9697,7 +8572,7 @@ class Pry::Slop::Option # 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 + # pkg:gem/pry#lib/pry/slop/option.rb:93 def value=(new_value); end private @@ -9708,7 +8583,7 @@ class Pry::Slop::Option # # Returns the Float value if possible to convert, else a zero. # - # source://pry//lib/pry/slop/option.rb#173 + # pkg:gem/pry#lib/pry/slop/option.rb:173 def value_to_float(value); end # Convert an object to an Integer if possible. @@ -9717,7 +8592,7 @@ class Pry::Slop::Option # # Returns the Integer value if possible to convert, else a zero. # - # source://pry//lib/pry/slop/option.rb#156 + # pkg:gem/pry#lib/pry/slop/option.rb:156 def value_to_integer(value); end # Convert an object to a Range if possible. @@ -9726,48 +8601,36 @@ class Pry::Slop::Option # # Returns the Range value if one could be found, else the original object. # - # source://pry//lib/pry/slop/option.rb#190 + # pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/syntax_highlighter.rb:13 def tokenize(code, language = T.unsafe(nil)); end end end @@ -9775,23 +8638,20 @@ end # @api private # @since v0.13.0 # -# source://pry//lib/pry/system_command_handler.rb#6 +# pkg:gem/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 + # pkg:gem/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 +# pkg:gem/pry#lib/pry/exceptions.rb:28 module Pry::TooSafeException class << self - # source://pry//lib/pry/exceptions.rb#29 + # pkg:gem/pry#lib/pry/exceptions.rb:29 def ===(exception); end end end @@ -9810,41 +8670,38 @@ end # SyntaxError: (eval):1: syntax error, unexpected ')' # from ./a.rb:2 in `eval' # -# source://pry//lib/pry/exceptions.rb#51 +# pkg:gem/pry#lib/pry/exceptions.rb:51 module Pry::UserError; end -# source://pry//lib/pry/version.rb#4 +# pkg:gem/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 +# pkg:gem/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] + # @param [String] message # @return [void] - # @since v0.13.0 # - # source://pry//lib/pry/warning.rb#12 + # pkg:gem/pry#lib/pry/warning.rb:12 def warn(message); end end end -# source://pry//lib/pry/wrapped_module.rb#16 +# pkg:gem/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 + # @param [Module] mod # - # source://pry//lib/pry/wrapped_module.rb#56 + # pkg:gem/pry#lib/pry/wrapped_module.rb:56 def initialize(mod); end # Return a candidate for this module of specified rank. A `rank` @@ -9855,35 +8712,32 @@ class Pry::WrappedModule # 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`. + # @param [Fixnum] rank # @return [Pry::WrappedModule::Candidate] # - # source://pry//lib/pry/wrapped_module.rb#239 + # pkg:gem/pry#lib/pry/wrapped_module.rb:239 def candidate(rank); end # @return [Array] # - # source://pry//lib/pry/wrapped_module.rb#250 + # pkg:gem/pry#lib/pry/wrapped_module.rb:250 def candidates; end # Is this strictly a class? - # # @return [Boolean] # - # source://pry//lib/pry/wrapped_module.rb#126 + # pkg:gem/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 + # @param [Boolean] inherit Include the names of constants from included # modules? # - # source://pry//lib/pry/wrapped_module.rb#76 + # pkg:gem/pry#lib/pry/wrapped_module.rb:76 def constants(inherit = T.unsafe(nil)); end # Returns documentation for the module. @@ -9891,28 +8745,27 @@ class Pry::WrappedModule # 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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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. @@ -9921,42 +8774,41 @@ class Pry::WrappedModule # # @return String # - # source://pry//lib/pry/wrapped_module.rb#85 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/wrapped_module.rb:135 def singleton_instance; end # Returns the source for the module. @@ -9964,23 +8816,16 @@ class Pry::WrappedModule # 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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/wrapped_module.rb:179 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 + # pkg:gem/pry#lib/pry/wrapped_module.rb:186 def source_line; end # Retrieve the source location of a module. Return value is in same @@ -9990,54 +8835,51 @@ class Pry::WrappedModule # @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 + # pkg:gem/pry#lib/pry/wrapped_module.rb:168 def source_location; end - # @param times [Fixnum] How far to travel up the ancestor chain. + # @param [Fixnum] times 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#270 + # pkg:gem/pry#lib/pry/wrapped_module.rb:270 def super(times = T.unsafe(nil)); end - # Returns the value of attribute wrapped. - # - # source://pry//lib/pry/wrapped_module.rb#20 + # pkg:gem/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 + # pkg:gem/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#260 + # pkg:gem/pry#lib/pry/wrapped_module.rb:260 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 + # pkg:gem/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 + # pkg:gem/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#347 + # pkg:gem/pry#lib/pry/wrapped_module.rb:347 def all_methods_for(mod); end # We only want methods that have a non-nil `source_location`. We also @@ -10045,17 +8887,17 @@ class Pry::WrappedModule # # @return [Array] # - # source://pry//lib/pry/wrapped_module.rb#329 + # pkg:gem/pry#lib/pry/wrapped_module.rb:329 def all_relevant_methods_for(mod); end # A helper method. # - # source://pry//lib/pry/wrapped_module.rb#310 + # pkg:gem/pry#lib/pry/wrapped_module.rb:310 def all_source_locations_by_popularity; end # memoized lines for file # - # source://pry//lib/pry/wrapped_module.rb#371 + # pkg:gem/pry#lib/pry/wrapped_module.rb:371 def lines_for_file(file); end # @return [Array>] The array of `Pry::Method` objects, @@ -10065,7 +8907,7 @@ class Pry::WrappedModule # the last method defined for that candidate and it is used to # speed up source code extraction. # - # source://pry//lib/pry/wrapped_module.rb#302 + # pkg:gem/pry#lib/pry/wrapped_module.rb:302 def method_candidates; end # Detect methods that are defined with `def_delegator` from the Forwardable @@ -10074,14 +8916,10 @@ class Pry::WrappedModule # 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#366 + # pkg:gem/pry#lib/pry/wrapped_module.rb:366 def method_defined_by_forwardable_module?(method); end - # @return [Boolean] - # - # source://pry//lib/pry/wrapped_module.rb#351 + # pkg:gem/pry#lib/pry/wrapped_module.rb:351 def nested_module?(parent, name); end # @return [Pry::WrappedModule::Candidate] The candidate with the @@ -10092,24 +8930,22 @@ class Pry::WrappedModule # 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#292 + # pkg:gem/pry#lib/pry/wrapped_module.rb:292 def primary_candidate; end - # @return [Boolean] - # - # source://pry//lib/pry/wrapped_module.rb#158 + # pkg:gem/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. # + # @param [String] mod_name + # @param [Binding] target The binding where the lookup takes place. + # @return [Module, nil] The module or `nil` (if conversion failed). # @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 + # pkg:gem/pry#lib/pry/wrapped_module.rb:29 def from_str(mod_name, target = T.unsafe(nil)); end private @@ -10118,12 +8954,11 @@ class Pry::WrappedModule # 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. + # @param [String] str The string to lookup. + # @param [Binding] target Where the lookup takes place. # @return [Boolean] # - # source://pry//lib/pry/wrapped_module.rb#45 + # pkg:gem/pry#lib/pry/wrapped_module.rb:45 def safe_to_evaluate?(str, target); end end end @@ -10132,122 +8967,113 @@ end # 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 +# pkg:gem/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 + # @raise [Pry::CommandError] If `rank` is out of bounds. + # @param [Pry::WrappedModule] wrapper The associated # `Pry::WrappedModule` instance that owns the candidates. - # @param rank [Fixnum] The rank of the candidate to + # @param [Fixnum] rank 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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/wrapped_module/candidate.rb:27 + def class?(*, **, &); 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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/wrapped_module/candidate.rb:27 + def module?(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def nonblank_name(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/wrapped_module/candidate.rb:27 + def nonblank_name(*, **, &); end - # source://forwardable/1.3.3/forwardable.rb#231 - def number_of_candidates(*args, **_arg1, &block); end + # pkg:gem/pry#lib/pry/wrapped_module/candidate.rb:27 + def number_of_candidates(*, **, &); 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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/wrapped_module/candidate.rb:15 def source_file; end - # @return [Fixnum] The line where the module definition is located. - # - # source://pry//lib/pry/wrapped_module/candidate.rb#18 + # pkg:gem/pry#lib/pry/wrapped_module/candidate.rb:19 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 + # pkg:gem/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 + # pkg:gem/pry#lib/pry/wrapped_module/candidate.rb:27 + def wrapped(*, **, &); end private # Locate the first line of the module definition. - # - # @param file [String] The file that contains the module + # @param [String] file The file that contains the module # definition (somewhere). - # @param line [Fixnum] The module definition should appear + # @param [Fixnum] line 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 + # pkg:gem/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#116 + # pkg:gem/pry#lib/pry/wrapped_module/candidate.rb:116 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#122 + # pkg:gem/pry#lib/pry/wrapped_module/candidate.rb:122 def last_method_source_location; end - # source://pry//lib/pry/forwardable.rb#18 + # pkg:gem/pry#lib/pry/wrapped_module/candidate.rb:28 def lines_for_file(*a, &b); end - # source://pry//lib/pry/forwardable.rb#18 + # pkg:gem/pry#lib/pry/wrapped_module/candidate.rb:28 def method_candidates(*a, &b); end - # @return [Boolean] - # - # source://pry//lib/pry/wrapped_module/candidate.rb#104 + # pkg:gem/pry#lib/pry/wrapped_module/candidate.rb:104 def module_definition_first_line?(line); end - # source://pry//lib/pry/forwardable.rb#18 + # pkg:gem/pry#lib/pry/wrapped_module/candidate.rb:28 def name(*a, &b); end # Return the number of lines between the start of the class definition and @@ -10257,9 +9083,9 @@ class Pry::WrappedModule::Candidate # # @return [Integer] number of lines. # - # source://pry//lib/pry/wrapped_module/candidate.rb#132 + # pkg:gem/pry#lib/pry/wrapped_module/candidate.rb:132 def number_of_lines_in_first_chunk; end - # source://pry//lib/pry/forwardable.rb#18 + # pkg:gem/pry#lib/pry/wrapped_module/candidate.rb:28 def yard_docs?(*a, &b); end end diff --git a/sorbet/rbi/gems/psych@5.2.3.rbi b/sorbet/rbi/gems/psych@5.2.3.rbi deleted file mode 100644 index a98c089..0000000 --- a/sorbet/rbi/gems/psych@5.2.3.rbi +++ /dev/null @@ -1,2435 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `psych` gem. -# Please instead update this file by running `bin/tapioca gem psych`. - - -# source://psych//lib/psych/core_ext.rb#2 -class Object < ::BasicObject - include ::Kernel - include ::PP::ObjectMixin - - # call-seq: to_yaml(options = {}) - # - # Convert an object to YAML. See Psych.dump for more information on the - # available +options+. - # - # source://psych//lib/psych/core_ext.rb#12 - def to_yaml(options = T.unsafe(nil)); end - - class << self - # source://psych//lib/psych/core_ext.rb#3 - def yaml_tag(url); end - end -end - -# = Overview -# -# Psych is a YAML parser and emitter. -# Psych leverages libyaml [Home page: https://pyyaml.org/wiki/LibYAML] -# or [git repo: https://github.com/yaml/libyaml] for its YAML parsing -# and emitting capabilities. In addition to wrapping libyaml, Psych also -# knows how to serialize and de-serialize most Ruby objects to and from -# the YAML format. -# -# = I NEED TO PARSE OR EMIT YAML RIGHT NOW! -# -# # Parse some YAML -# Psych.load("--- foo") # => "foo" -# -# # Emit some YAML -# Psych.dump("foo") # => "--- foo\n...\n" -# { :a => 'b'}.to_yaml # => "---\n:a: b\n" -# -# Got more time on your hands? Keep on reading! -# -# == YAML Parsing -# -# Psych provides a range of interfaces for parsing a YAML document ranging from -# low level to high level, depending on your parsing needs. At the lowest -# level, is an event based parser. Mid level is access to the raw YAML AST, -# and at the highest level is the ability to unmarshal YAML to Ruby objects. -# -# == YAML Emitting -# -# Psych provides a range of interfaces ranging from low to high level for -# producing YAML documents. Very similar to the YAML parsing interfaces, Psych -# provides at the lowest level, an event based system, mid-level is building -# a YAML AST, and the highest level is converting a Ruby object straight to -# a YAML document. -# -# == High-level API -# -# === Parsing -# -# The high level YAML parser provided by Psych simply takes YAML as input and -# returns a Ruby data structure. For information on using the high level parser -# see Psych.load -# -# ==== Reading from a string -# -# Psych.safe_load("--- a") # => 'a' -# Psych.safe_load("---\n - a\n - b") # => ['a', 'b'] -# # From a trusted string: -# Psych.load("--- !ruby/range\nbegin: 0\nend: 42\nexcl: false\n") # => 0..42 -# -# ==== Reading from a file -# -# Psych.safe_load_file("data.yml", permitted_classes: [Date]) -# Psych.load_file("trusted_database.yml") -# -# ==== \Exception handling -# -# begin -# # The second argument changes only the exception contents -# Psych.parse("--- `", "file.txt") -# rescue Psych::SyntaxError => ex -# ex.file # => 'file.txt' -# ex.message # => "(file.txt): found character that cannot start any token" -# end -# -# === Emitting -# -# The high level emitter has the easiest interface. Psych simply takes a Ruby -# data structure and converts it to a YAML document. See Psych.dump for more -# information on dumping a Ruby data structure. -# -# ==== Writing to a string -# -# # Dump an array, get back a YAML string -# Psych.dump(['a', 'b']) # => "---\n- a\n- b\n" -# -# # Dump an array to an IO object -# Psych.dump(['a', 'b'], StringIO.new) # => # -# -# # Dump an array with indentation set -# Psych.dump(['a', ['b']], :indentation => 3) # => "---\n- a\n- - b\n" -# -# # Dump an array to an IO with indentation set -# Psych.dump(['a', ['b']], StringIO.new, :indentation => 3) -# -# ==== Writing to a file -# -# Currently there is no direct API for dumping Ruby structure to file: -# -# File.open('database.yml', 'w') do |file| -# file.write(Psych.dump(['a', 'b'])) -# end -# -# == Mid-level API -# -# === Parsing -# -# Psych provides access to an AST produced from parsing a YAML document. This -# tree is built using the Psych::Parser and Psych::TreeBuilder. The AST can -# be examined and manipulated freely. Please see Psych::parse_stream, -# Psych::Nodes, and Psych::Nodes::Node for more information on dealing with -# YAML syntax trees. -# -# ==== Reading from a string -# -# # Returns Psych::Nodes::Stream -# Psych.parse_stream("---\n - a\n - b") -# -# # Returns Psych::Nodes::Document -# Psych.parse("---\n - a\n - b") -# -# ==== Reading from a file -# -# # Returns Psych::Nodes::Stream -# Psych.parse_stream(File.read('database.yml')) -# -# # Returns Psych::Nodes::Document -# Psych.parse_file('database.yml') -# -# ==== \Exception handling -# -# begin -# # The second argument changes only the exception contents -# Psych.parse("--- `", "file.txt") -# rescue Psych::SyntaxError => ex -# ex.file # => 'file.txt' -# ex.message # => "(file.txt): found character that cannot start any token" -# end -# -# === Emitting -# -# At the mid level is building an AST. This AST is exactly the same as the AST -# used when parsing a YAML document. Users can build an AST by hand and the -# AST knows how to emit itself as a YAML document. See Psych::Nodes, -# Psych::Nodes::Node, and Psych::TreeBuilder for more information on building -# a YAML AST. -# -# ==== Writing to a string -# -# # We need Psych::Nodes::Stream (not Psych::Nodes::Document) -# stream = Psych.parse_stream("---\n - a\n - b") -# -# stream.to_yaml # => "---\n- a\n- b\n" -# -# ==== Writing to a file -# -# # We need Psych::Nodes::Stream (not Psych::Nodes::Document) -# stream = Psych.parse_stream(File.read('database.yml')) -# -# File.open('database.yml', 'w') do |file| -# file.write(stream.to_yaml) -# end -# -# == Low-level API -# -# === Parsing -# -# The lowest level parser should be used when the YAML input is already known, -# and the developer does not want to pay the price of building an AST or -# automatic detection and conversion to Ruby objects. See Psych::Parser for -# more information on using the event based parser. -# -# ==== Reading to Psych::Nodes::Stream structure -# -# parser = Psych::Parser.new(TreeBuilder.new) # => # -# parser = Psych.parser # it's an alias for the above -# -# parser.parse("---\n - a\n - b") # => # -# parser.handler # => # -# parser.handler.root # => # -# -# ==== Receiving an events stream -# -# recorder = Psych::Handlers::Recorder.new -# parser = Psych::Parser.new(recorder) -# -# parser.parse("---\n - a\n - b") -# recorder.events # => [list of [event, args] lists] -# # event is one of: Psych::Handler::EVENTS -# # args are the arguments passed to the event -# -# === Emitting -# -# The lowest level emitter is an event based system. Events are sent to a -# Psych::Emitter object. That object knows how to convert the events to a YAML -# document. This interface should be used when document format is known in -# advance or speed is a concern. See Psych::Emitter for more information. -# -# ==== Writing to a Ruby structure -# -# Psych.parser.parse("--- a") # => # -# -# parser.handler.first # => # -# parser.handler.first.to_ruby # => ["a"] -# -# parser.handler.root.first # => # -# parser.handler.root.first.to_ruby # => "a" -# -# # You can instantiate an Emitter manually -# Psych::Visitors::ToRuby.new.accept(parser.handler.root.first) -# # => "a" -# -# source://psych//lib/psych/versions.rb#3 -module Psych - class << self - # source://psych//lib/psych.rb#700 - def add_builtin_type(type_tag, &block); end - - # :stopdoc: - # - # source://psych//lib/psych.rb#694 - def add_domain_type(domain, type_tag, &block); end - - # source://psych//lib/psych.rb#710 - def add_tag(tag, klass); end - - # source://psych//lib/psych.rb#726 - def config; end - - # source://psych//lib/psych.rb#738 - def domain_types; end - - # source://psych//lib/psych.rb#750 - def domain_types=(value); end - - # call-seq: - # Psych.dump(o) -> string of yaml - # Psych.dump(o, options) -> string of yaml - # Psych.dump(o, io) -> io object passed in - # Psych.dump(o, io, options) -> io object passed in - # - # Dump Ruby object +o+ to a YAML string. Optional +options+ may be passed in - # to control the output format. If an IO object is passed in, the YAML will - # be dumped to that IO object. - # - # Currently supported options are: - # - # [:indentation] Number of space characters used to indent. - # Acceptable value should be in 0..9 range, - # otherwise option is ignored. - # - # Default: 2. - # [:line_width] Max character to wrap line at. - # For unlimited line width use -1. - # - # Default: 0 (meaning "wrap at 81"). - # [:canonical] Write "canonical" YAML form (very verbose, yet - # strictly formal). - # - # Default: false. - # [:header] Write %YAML [version] at the beginning of document. - # - # Default: false. - # - # [:stringify_names] Dump symbol keys in Hash objects as string. - # - # Default: false. - # - # Example: - # - # # Dump an array, get back a YAML string - # Psych.dump(['a', 'b']) # => "---\n- a\n- b\n" - # - # # Dump an array to an IO object - # Psych.dump(['a', 'b'], StringIO.new) # => # - # - # # Dump an array with indentation set - # Psych.dump(['a', ['b']], indentation: 3) # => "---\n- a\n- - b\n" - # - # # Dump an array to an IO with indentation set - # Psych.dump(['a', ['b']], StringIO.new, indentation: 3) - # - # # Dump hash with symbol keys as string - # Psych.dump({a: "b"}, stringify_names: true) # => "---\na: b\n" - # - # source://psych//lib/psych.rb#515 - def dump(o, io = T.unsafe(nil), options = T.unsafe(nil)); end - - # Dump a list of objects as separate documents to a document stream. - # - # Example: - # - # Psych.dump_stream("foo\n ", {}) # => "--- ! \"foo\\n \"\n--- {}\n" - # - # source://psych//lib/psych.rb#613 - def dump_stream(*objects); end - - # source://psych//lib/psych.rb#734 - def dump_tags; end - - # source://psych//lib/psych.rb#746 - def dump_tags=(value); end - - # Load +yaml+ in to a Ruby data structure. If multiple documents are - # provided, the object contained in the first document will be returned. - # +filename+ will be used in the exception message if any exception - # is raised while parsing. If +yaml+ is empty, it returns - # the specified +fallback+ return value, which defaults to +nil+. - # - # Raises a Psych::SyntaxError when a YAML syntax error is detected. - # - # Example: - # - # Psych.load("--- a") # => 'a' - # Psych.load("---\n - a\n - b") # => ['a', 'b'] - # - # begin - # Psych.load("--- `", filename: "file.txt") - # rescue Psych::SyntaxError => ex - # ex.file # => 'file.txt' - # ex.message # => "(file.txt): found character that cannot start any token" - # end - # - # When the optional +symbolize_names+ keyword argument is set to a - # true value, returns symbols for keys in Hash objects (default: strings). - # - # Psych.load("---\n foo: bar") # => {"foo"=>"bar"} - # Psych.load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"} - # - # Raises a TypeError when `yaml` parameter is NilClass. This method is - # similar to `safe_load` except that `Symbol` objects are allowed by default. - # - # source://psych//lib/psych.rb#370 - def load(yaml, permitted_classes: T.unsafe(nil), permitted_symbols: T.unsafe(nil), aliases: T.unsafe(nil), filename: T.unsafe(nil), fallback: T.unsafe(nil), symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end - - # Loads the document contained in +filename+. Returns the yaml contained in - # +filename+ as a Ruby object, or if the file is empty, it returns - # the specified +fallback+ return value, which defaults to +nil+. - # See load for options. - # - # source://psych//lib/psych.rb#687 - def load_file(filename, **kwargs); end - - # Load multiple documents given in +yaml+. Returns the parsed documents - # as a list. If a block is given, each document will be converted to Ruby - # and passed to the block during parsing - # - # Example: - # - # Psych.load_stream("--- foo\n...\n--- bar\n...") # => ['foo', 'bar'] - # - # list = [] - # Psych.load_stream("--- foo\n...\n--- bar\n...") do |ruby| - # list << ruby - # end - # list # => ['foo', 'bar'] - # - # source://psych//lib/psych.rb#644 - def load_stream(yaml, filename: T.unsafe(nil), fallback: T.unsafe(nil), **kwargs); end - - # source://psych//lib/psych.rb#730 - def load_tags; end - - # source://psych//lib/psych.rb#742 - def load_tags=(value); end - - # Parse a YAML string in +yaml+. Returns the Psych::Nodes::Document. - # +filename+ is used in the exception message if a Psych::SyntaxError is - # raised. - # - # Raises a Psych::SyntaxError when a YAML syntax error is detected. - # - # Example: - # - # Psych.parse("---\n - a\n - b") # => # - # - # begin - # Psych.parse("--- `", filename: "file.txt") - # rescue Psych::SyntaxError => ex - # ex.file # => 'file.txt' - # ex.message # => "(file.txt): found character that cannot start any token" - # end - # - # See Psych::Nodes for more information about YAML AST. - # - # source://psych//lib/psych.rb#400 - def parse(yaml, filename: T.unsafe(nil)); end - - # Parse a file at +filename+. Returns the Psych::Nodes::Document. - # - # Raises a Psych::SyntaxError when a YAML syntax error is detected. - # - # source://psych//lib/psych.rb#412 - def parse_file(filename, fallback: T.unsafe(nil)); end - - # Parse a YAML string in +yaml+. Returns the Psych::Nodes::Stream. - # This method can handle multiple YAML documents contained in +yaml+. - # +filename+ is used in the exception message if a Psych::SyntaxError is - # raised. - # - # If a block is given, a Psych::Nodes::Document node will be yielded to the - # block as it's being parsed. - # - # Raises a Psych::SyntaxError when a YAML syntax error is detected. - # - # Example: - # - # Psych.parse_stream("---\n - a\n - b") # => # - # - # Psych.parse_stream("--- a\n--- b") do |node| - # node # => # - # end - # - # begin - # Psych.parse_stream("--- `", filename: "file.txt") - # rescue Psych::SyntaxError => ex - # ex.file # => 'file.txt' - # ex.message # => "(file.txt): found character that cannot start any token" - # end - # - # Raises a TypeError when NilClass is passed. - # - # See Psych::Nodes for more information about YAML AST. - # - # source://psych//lib/psych.rb#454 - def parse_stream(yaml, filename: T.unsafe(nil), &block); end - - # Returns a default parser - # - # source://psych//lib/psych.rb#421 - def parser; end - - # source://psych//lib/psych.rb#706 - def remove_type(type_tag); end - - # call-seq: - # Psych.safe_dump(o) -> string of yaml - # Psych.safe_dump(o, options) -> string of yaml - # Psych.safe_dump(o, io) -> io object passed in - # Psych.safe_dump(o, io, options) -> io object passed in - # - # Safely dump Ruby object +o+ to a YAML string. Optional +options+ may be passed in - # to control the output format. If an IO object is passed in, the YAML will - # be dumped to that IO object. By default, only the following - # classes are allowed to be serialized: - # - # * TrueClass - # * FalseClass - # * NilClass - # * Integer - # * Float - # * String - # * Array - # * Hash - # - # Arbitrary classes can be allowed by adding those classes to the +permitted_classes+ - # keyword argument. They are additive. For example, to allow Date serialization: - # - # Psych.safe_dump(yaml, permitted_classes: [Date]) - # - # Now the Date class can be dumped in addition to the classes listed above. - # - # A Psych::DisallowedClass exception will be raised if the object contains a - # class that isn't in the +permitted_classes+ list. - # - # Currently supported options are: - # - # [:indentation] Number of space characters used to indent. - # Acceptable value should be in 0..9 range, - # otherwise option is ignored. - # - # Default: 2. - # [:line_width] Max character to wrap line at. - # For unlimited line width use -1. - # - # Default: 0 (meaning "wrap at 81"). - # [:canonical] Write "canonical" YAML form (very verbose, yet - # strictly formal). - # - # Default: false. - # [:header] Write %YAML [version] at the beginning of document. - # - # Default: false. - # - # [:stringify_names] Dump symbol keys in Hash objects as string. - # - # Default: false. - # - # Example: - # - # # Dump an array, get back a YAML string - # Psych.safe_dump(['a', 'b']) # => "---\n- a\n- b\n" - # - # # Dump an array to an IO object - # Psych.safe_dump(['a', 'b'], StringIO.new) # => # - # - # # Dump an array with indentation set - # Psych.safe_dump(['a', ['b']], indentation: 3) # => "---\n- a\n- - b\n" - # - # # Dump an array to an IO with indentation set - # Psych.safe_dump(['a', ['b']], StringIO.new, indentation: 3) - # - # # Dump hash with symbol keys as string - # Psych.dump({a: "b"}, stringify_names: true) # => "---\na: b\n" - # - # source://psych//lib/psych.rb#596 - def safe_dump(o, io = T.unsafe(nil), options = T.unsafe(nil)); end - - # Safely load the yaml string in +yaml+. By default, only the following - # classes are allowed to be deserialized: - # - # * TrueClass - # * FalseClass - # * NilClass - # * Integer - # * Float - # * String - # * Array - # * Hash - # - # Recursive data structures are not allowed by default. Arbitrary classes - # can be allowed by adding those classes to the +permitted_classes+ keyword argument. They are - # additive. For example, to allow Date deserialization: - # - # Psych.safe_load(yaml, permitted_classes: [Date]) - # - # Now the Date class can be loaded in addition to the classes listed above. - # - # Aliases can be explicitly allowed by changing the +aliases+ keyword argument. - # For example: - # - # x = [] - # x << x - # yaml = Psych.dump x - # Psych.safe_load yaml # => raises an exception - # Psych.safe_load yaml, aliases: true # => loads the aliases - # - # A Psych::DisallowedClass exception will be raised if the yaml contains a - # class that isn't in the +permitted_classes+ list. - # - # A Psych::AliasesNotEnabled exception will be raised if the yaml contains aliases - # but the +aliases+ keyword argument is set to false. - # - # +filename+ will be used in the exception message if any exception is raised - # while parsing. - # - # When the optional +symbolize_names+ keyword argument is set to a - # true value, returns symbols for keys in Hash objects (default: strings). - # - # Psych.safe_load("---\n foo: bar") # => {"foo"=>"bar"} - # Psych.safe_load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"} - # - # source://psych//lib/psych.rb#324 - def safe_load(yaml, permitted_classes: T.unsafe(nil), permitted_symbols: T.unsafe(nil), aliases: T.unsafe(nil), filename: T.unsafe(nil), fallback: T.unsafe(nil), symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end - - # Safely loads the document contained in +filename+. Returns the yaml contained in - # +filename+ as a Ruby object, or if the file is empty, it returns - # the specified +fallback+ return value, which defaults to +nil+. - # See safe_load for options. - # - # source://psych//lib/psych.rb#676 - def safe_load_file(filename, **kwargs); end - - # Dump Ruby +object+ to a JSON string. - # - # source://psych//lib/psych.rb#623 - def to_json(object); end - - # Load +yaml+ in to a Ruby data structure. If multiple documents are - # provided, the object contained in the first document will be returned. - # +filename+ will be used in the exception message if any exception - # is raised while parsing. If +yaml+ is empty, it returns - # the specified +fallback+ return value, which defaults to +false+. - # - # Raises a Psych::SyntaxError when a YAML syntax error is detected. - # - # Example: - # - # Psych.unsafe_load("--- a") # => 'a' - # Psych.unsafe_load("---\n - a\n - b") # => ['a', 'b'] - # - # begin - # Psych.unsafe_load("--- `", filename: "file.txt") - # rescue Psych::SyntaxError => ex - # ex.file # => 'file.txt' - # ex.message # => "(file.txt): found character that cannot start any token" - # end - # - # When the optional +symbolize_names+ keyword argument is set to a - # true value, returns symbols for keys in Hash objects (default: strings). - # - # Psych.unsafe_load("---\n foo: bar") # => {"foo"=>"bar"} - # Psych.unsafe_load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"} - # - # Raises a TypeError when `yaml` parameter is NilClass - # - # NOTE: This method *should not* be used to parse untrusted documents, such as - # YAML documents that are supplied via user input. Instead, please use the - # load method or the safe_load method. - # - # source://psych//lib/psych.rb#273 - def unsafe_load(yaml, filename: T.unsafe(nil), fallback: T.unsafe(nil), symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end - - # Load the document contained in +filename+. Returns the yaml contained in - # +filename+ as a Ruby object, or if the file is empty, it returns - # the specified +fallback+ return value, which defaults to +false+. - # - # NOTE: This method *should not* be used to parse untrusted documents, such as - # YAML documents that are supplied via user input. Instead, please use the - # safe_load_file method. - # - # source://psych//lib/psych.rb#665 - def unsafe_load_file(filename, **kwargs); end - end -end - -# Subclasses `BadAlias` for backwards compatibility -# -# source://psych//lib/psych/exception.rb#10 -class Psych::AliasesNotEnabled < ::Psych::BadAlias - # @return [AliasesNotEnabled] a new instance of AliasesNotEnabled - # - # source://psych//lib/psych/exception.rb#11 - def initialize; end -end - -# Subclasses `BadAlias` for backwards compatibility -# -# source://psych//lib/psych/exception.rb#17 -class Psych::AnchorNotDefined < ::Psych::BadAlias - # @return [AnchorNotDefined] a new instance of AnchorNotDefined - # - # source://psych//lib/psych/exception.rb#18 - def initialize(anchor_name); end -end - -# source://psych//lib/psych/class_loader.rb#6 -class Psych::ClassLoader - # @return [ClassLoader] a new instance of ClassLoader - # - # source://psych//lib/psych/class_loader.rb#21 - def initialize; end - - # source://psych//lib/psych/class_loader.rb#39 - def big_decimal; end - - # source://psych//lib/psych/class_loader.rb#39 - def complex; end - - # source://psych//lib/psych/class_loader.rb#39 - def date; end - - # source://psych//lib/psych/class_loader.rb#39 - def date_time; end - - # source://psych//lib/psych/class_loader.rb#39 - def exception; end - - # source://psych//lib/psych/class_loader.rb#25 - def load(klassname); end - - # source://psych//lib/psych/class_loader.rb#39 - def object; end - - # source://psych//lib/psych/class_loader.rb#39 - def psych_omap; end - - # source://psych//lib/psych/class_loader.rb#39 - def psych_set; end - - # source://psych//lib/psych/class_loader.rb#39 - def range; end - - # source://psych//lib/psych/class_loader.rb#39 - def rational; end - - # source://psych//lib/psych/class_loader.rb#39 - def regexp; end - - # source://psych//lib/psych/class_loader.rb#39 - def struct; end - - # source://psych//lib/psych/class_loader.rb#39 - def symbol; end - - # source://psych//lib/psych/class_loader.rb#31 - def symbolize(sym); end - - private - - # source://psych//lib/psych/class_loader.rb#47 - def find(klassname); end - - # source://psych//lib/psych/class_loader.rb#51 - def resolve(klassname); end -end - -# source://psych//lib/psych/class_loader.rb#76 -class Psych::ClassLoader::Restricted < ::Psych::ClassLoader - # @return [Restricted] a new instance of Restricted - # - # source://psych//lib/psych/class_loader.rb#77 - def initialize(classes, symbols); end - - # source://psych//lib/psych/class_loader.rb#83 - def symbolize(sym); end - - private - - # source://psych//lib/psych/class_loader.rb#95 - def find(klassname); end -end - -# If an object defines +encode_with+, then an instance of Psych::Coder will -# be passed to the method when the object is being serialized. The Coder -# automatically assumes a Psych::Nodes::Mapping is being emitted. Other -# objects like Sequence and Scalar may be emitted if +seq=+ or +scalar=+ are -# called, respectively. -# -# source://psych//lib/psych/coder.rb#9 -class Psych::Coder - # @return [Coder] a new instance of Coder - # - # source://psych//lib/psych/coder.rb#13 - def initialize(tag); end - - # source://psych//lib/psych/coder.rb#84 - def [](k); end - - # source://psych//lib/psych/coder.rb#78 - def []=(k, v); end - - # source://psych//lib/psych/coder.rb#78 - def add(k, v); end - - # Returns the value of attribute implicit. - # - # source://psych//lib/psych/coder.rb#10 - def implicit; end - - # Sets the attribute implicit - # - # @param value the value to set the attribute implicit to. - # - # source://psych//lib/psych/coder.rb#10 - def implicit=(_arg0); end - - # Emit a map. The coder will be yielded to the block. - # - # @yield [_self] - # @yieldparam _self [Psych::Coder] the object that the method was called on - # - # source://psych//lib/psych/coder.rb#34 - def map(tag = T.unsafe(nil), style = T.unsafe(nil)); end - - # Emit a map with +value+ - # - # source://psych//lib/psych/coder.rb#73 - def map=(map); end - - # Returns the value of attribute object. - # - # source://psych//lib/psych/coder.rb#10 - def object; end - - # Sets the attribute object - # - # @param value the value to set the attribute object to. - # - # source://psych//lib/psych/coder.rb#10 - def object=(_arg0); end - - # Emit a sequence with +map+ and +tag+ - # - # source://psych//lib/psych/coder.rb#54 - def represent_map(tag, map); end - - # Emit an arbitrary object +obj+ and +tag+ - # - # source://psych//lib/psych/coder.rb#60 - def represent_object(tag, obj); end - - # Emit a scalar with +value+ and +tag+ - # - # source://psych//lib/psych/coder.rb#42 - def represent_scalar(tag, value); end - - # Emit a sequence with +list+ and +tag+ - # - # source://psych//lib/psych/coder.rb#48 - def represent_seq(tag, list); end - - # source://psych//lib/psych/coder.rb#24 - def scalar(*args); end - - # Emit a scalar with +value+ - # - # source://psych//lib/psych/coder.rb#67 - def scalar=(value); end - - # Returns the value of attribute seq. - # - # source://psych//lib/psych/coder.rb#11 - def seq; end - - # Emit a sequence of +list+ - # - # source://psych//lib/psych/coder.rb#90 - def seq=(list); end - - # Returns the value of attribute style. - # - # source://psych//lib/psych/coder.rb#10 - def style; end - - # Sets the attribute style - # - # @param value the value to set the attribute style to. - # - # source://psych//lib/psych/coder.rb#10 - def style=(_arg0); end - - # Returns the value of attribute tag. - # - # source://psych//lib/psych/coder.rb#10 - def tag; end - - # Sets the attribute tag - # - # @param value the value to set the attribute tag to. - # - # source://psych//lib/psych/coder.rb#10 - def tag=(_arg0); end - - # Returns the value of attribute type. - # - # source://psych//lib/psych/coder.rb#11 - def type; end -end - -# source://psych//lib/psych/exception.rb#23 -class Psych::DisallowedClass < ::Psych::Exception - # @return [DisallowedClass] a new instance of DisallowedClass - # - # source://psych//lib/psych/exception.rb#24 - def initialize(action, klass_name); end -end - -# Psych::Handler is an abstract base class that defines the events used -# when dealing with Psych::Parser. Clients who want to use Psych::Parser -# should implement a class that inherits from Psych::Handler and define -# events that they can handle. -# -# Psych::Handler defines all events that Psych::Parser can possibly send to -# event handlers. -# -# See Psych::Parser for more details -# -# source://psych//lib/psych/handler.rb#13 -class Psych::Handler - # Called when an alias is found to +anchor+. +anchor+ will be the name - # of the anchor found. - # - # === Example - # - # Here we have an example of an array that references itself in YAML: - # - # --- &ponies - # - first element - # - *ponies - # - # &ponies is the anchor, *ponies is the alias. In this case, alias is - # called with "ponies". - # - # source://psych//lib/psych/handler.rb#110 - def alias(anchor); end - - # Called when an empty event happens. (Which, as far as I can tell, is - # never). - # - # source://psych//lib/psych/handler.rb#236 - def empty; end - - # Called with the document ends. +implicit+ is a boolean value indicating - # whether or not the document has an implicit ending. - # - # === Example - # - # Given the following YAML: - # - # --- - # hello world - # - # +implicit+ will be true. Given this YAML: - # - # --- - # hello world - # ... - # - # +implicit+ will be false. - # - # source://psych//lib/psych/handler.rb#93 - def end_document(implicit); end - - # Called when a map ends - # - # source://psych//lib/psych/handler.rb#230 - def end_mapping; end - - # Called when a sequence ends. - # - # source://psych//lib/psych/handler.rb#191 - def end_sequence; end - - # Called when the YAML stream ends - # - # source://psych//lib/psych/handler.rb#241 - def end_stream; end - - # Called before each event with line/column information. - # - # source://psych//lib/psych/handler.rb#246 - def event_location(start_line, start_column, end_line, end_column); end - - # Called when a scalar +value+ is found. The scalar may have an - # +anchor+, a +tag+, be implicitly +plain+ or implicitly +quoted+ - # - # +value+ is the string value of the scalar - # +anchor+ is an associated anchor or nil - # +tag+ is an associated tag or nil - # +plain+ is a boolean value - # +quoted+ is a boolean value - # +style+ is an integer indicating the string style - # - # See the constants in Psych::Nodes::Scalar for the possible values of - # +style+ - # - # === Example - # - # Here is a YAML document that exercises most of the possible ways this - # method can be called: - # - # --- - # - !str "foo" - # - &anchor fun - # - many - # lines - # - | - # many - # newlines - # - # The above YAML document contains a list with four strings. Here are - # the parameters sent to this method in the same order: - # - # # value anchor tag plain quoted style - # ["foo", nil, "!str", false, false, 3 ] - # ["fun", "anchor", nil, true, false, 1 ] - # ["many lines", nil, nil, true, false, 1 ] - # ["many\nnewlines\n", nil, nil, false, true, 4 ] - # - # source://psych//lib/psych/handler.rb#150 - def scalar(value, anchor, tag, plain, quoted, style); end - - # Called when the document starts with the declared +version+, - # +tag_directives+, if the document is +implicit+. - # - # +version+ will be an array of integers indicating the YAML version being - # dealt with, +tag_directives+ is a list of tuples indicating the prefix - # and suffix of each tag, and +implicit+ is a boolean indicating whether - # the document is started implicitly. - # - # === Example - # - # Given the following YAML: - # - # %YAML 1.1 - # %TAG ! tag:tenderlovemaking.com,2009: - # --- !squee - # - # The parameters for start_document must be this: - # - # version # => [1, 1] - # tag_directives # => [["!", "tag:tenderlovemaking.com,2009:"]] - # implicit # => false - # - # source://psych//lib/psych/handler.rb#72 - def start_document(version, tag_directives, implicit); end - - # Called when a map starts. - # - # +anchor+ is the anchor associated with the map or +nil+. - # +tag+ is the tag associated with the map or +nil+. - # +implicit+ is a boolean indicating whether or not the map was implicitly - # started. - # +style+ is an integer indicating the mapping style. - # - # See the constants in Psych::Nodes::Mapping for the possible values of - # +style+. - # - # === Example - # - # Here is a YAML document that exercises most of the possible ways this - # method can be called: - # - # --- - # k: !!map { hello: world } - # v: &pewpew - # hello: world - # - # The above YAML document consists of three maps, an outer map that contains - # two inner maps. Below is a matrix of the parameters sent in order to - # represent these three maps: - # - # # anchor tag implicit style - # [nil, nil, true, 1 ] - # [nil, "tag:yaml.org,2002:map", false, 2 ] - # ["pewpew", nil, true, 1 ] - # - # source://psych//lib/psych/handler.rb#225 - def start_mapping(anchor, tag, implicit, style); end - - # Called when a sequence is started. - # - # +anchor+ is the anchor associated with the sequence or nil. - # +tag+ is the tag associated with the sequence or nil. - # +implicit+ a boolean indicating whether or not the sequence was implicitly - # started. - # +style+ is an integer indicating the list style. - # - # See the constants in Psych::Nodes::Sequence for the possible values of - # +style+. - # - # === Example - # - # Here is a YAML document that exercises most of the possible ways this - # method can be called: - # - # --- - # - !!seq [ - # a - # ] - # - &pewpew - # - b - # - # The above YAML document consists of three lists, an outer list that - # contains two inner lists. Here is a matrix of the parameters sent - # to represent these lists: - # - # # anchor tag implicit style - # [nil, nil, true, 1 ] - # [nil, "tag:yaml.org,2002:seq", false, 2 ] - # ["pewpew", nil, true, 1 ] - # - # source://psych//lib/psych/handler.rb#186 - def start_sequence(anchor, tag, implicit, style); end - - # Called with +encoding+ when the YAML stream starts. This method is - # called once per stream. A stream may contain multiple documents. - # - # See the constants in Psych::Parser for the possible values of +encoding+. - # - # source://psych//lib/psych/handler.rb#47 - def start_stream(encoding); end - - # Is this handler a streaming handler? - # - # @return [Boolean] - # - # source://psych//lib/psych/handler.rb#251 - def streaming?; end -end - -# Configuration options for dumping YAML. -# -# source://psych//lib/psych/handler.rb#16 -class Psych::Handler::DumperOptions - # @return [DumperOptions] a new instance of DumperOptions - # - # source://psych//lib/psych/handler.rb#19 - def initialize; end - - # Returns the value of attribute canonical. - # - # source://psych//lib/psych/handler.rb#17 - def canonical; end - - # Sets the attribute canonical - # - # @param value the value to set the attribute canonical to. - # - # source://psych//lib/psych/handler.rb#17 - def canonical=(_arg0); end - - # Returns the value of attribute indentation. - # - # source://psych//lib/psych/handler.rb#17 - def indentation; end - - # Sets the attribute indentation - # - # @param value the value to set the attribute indentation to. - # - # source://psych//lib/psych/handler.rb#17 - def indentation=(_arg0); end - - # Returns the value of attribute line_width. - # - # source://psych//lib/psych/handler.rb#17 - def line_width; end - - # Sets the attribute line_width - # - # @param value the value to set the attribute line_width to. - # - # source://psych//lib/psych/handler.rb#17 - def line_width=(_arg0); end -end - -# source://psych//lib/psych/handlers/document_stream.rb#6 -class Psych::Handlers::DocumentStream < ::Psych::TreeBuilder - # @return [DocumentStream] a new instance of DocumentStream - # - # source://psych//lib/psych/handlers/document_stream.rb#7 - def initialize(&block); end - - # source://psych//lib/psych/handlers/document_stream.rb#17 - def end_document(implicit_end = T.unsafe(nil)); end - - # source://psych//lib/psych/handlers/document_stream.rb#12 - def start_document(version, tag_directives, implicit); end -end - -# source://psych//lib/psych/json/ruby_events.rb#4 -module Psych::JSON::RubyEvents - # source://psych//lib/psych/json/ruby_events.rb#10 - def visit_DateTime(o); end - - # source://psych//lib/psych/json/ruby_events.rb#14 - def visit_String(o); end - - # source://psych//lib/psych/json/ruby_events.rb#14 - def visit_Symbol(o); end - - # source://psych//lib/psych/json/ruby_events.rb#5 - def visit_Time(o); end -end - -# source://psych//lib/psych/json/stream.rb#7 -class Psych::JSON::Stream < ::Psych::Visitors::JSONTree - include ::Psych::Streaming - extend ::Psych::Streaming::ClassMethods -end - -# source://psych//lib/psych/json/stream.rb#12 -class Psych::JSON::Stream::Emitter < ::Psych::Stream::Emitter - include ::Psych::JSON::YAMLEvents -end - -# Psych::JSON::TreeBuilder is an event based AST builder. Events are sent -# to an instance of Psych::JSON::TreeBuilder and a JSON AST is constructed. -# -# source://psych//lib/psych/json/tree_builder.rb#9 -class Psych::JSON::TreeBuilder < ::Psych::TreeBuilder - include ::Psych::JSON::YAMLEvents -end - -# source://psych//lib/psych/json/yaml_events.rb#4 -module Psych::JSON::YAMLEvents - # source://psych//lib/psych/json/yaml_events.rb#9 - def end_document(implicit_end = T.unsafe(nil)); end - - # source://psych//lib/psych/json/yaml_events.rb#21 - def scalar(value, anchor, tag, plain, quoted, style); end - - # source://psych//lib/psych/json/yaml_events.rb#5 - def start_document(version, tag_directives, implicit); end - - # source://psych//lib/psych/json/yaml_events.rb#13 - def start_mapping(anchor, tag, implicit, style); end - - # source://psych//lib/psych/json/yaml_events.rb#17 - def start_sequence(anchor, tag, implicit, style); end -end - -# This class represents a {YAML Alias}[http://yaml.org/spec/1.1/#alias]. -# It points to an +anchor+. -# -# A Psych::Nodes::Alias is a terminal node and may have no children. -# -# source://psych//lib/psych/nodes/alias.rb#9 -class Psych::Nodes::Alias < ::Psych::Nodes::Node - # Create a new Alias that points to an +anchor+ - # - # @return [Alias] a new instance of Alias - # - # source://psych//lib/psych/nodes/alias.rb#14 - def initialize(anchor); end - - # @return [Boolean] - # - # source://psych//lib/psych/nodes/alias.rb#18 - def alias?; end - - # The anchor this alias links to - # - # source://psych//lib/psych/nodes/alias.rb#11 - def anchor; end - - # The anchor this alias links to - # - # source://psych//lib/psych/nodes/alias.rb#11 - def anchor=(_arg0); end -end - -# This represents a YAML Document. This node must be a child of -# Psych::Nodes::Stream. A Psych::Nodes::Document must have one child, -# and that child may be one of the following: -# -# * Psych::Nodes::Sequence -# * Psych::Nodes::Mapping -# * Psych::Nodes::Scalar -# -# source://psych//lib/psych/nodes/document.rb#12 -class Psych::Nodes::Document < ::Psych::Nodes::Node - # Create a new Psych::Nodes::Document object. - # - # +version+ is a list indicating the YAML version. - # +tags_directives+ is a list of tag directive declarations - # +implicit+ is a flag indicating whether the document will be implicitly - # started. - # - # == Example: - # This creates a YAML document object that represents a YAML 1.1 document - # with one tag directive, and has an implicit start: - # - # Psych::Nodes::Document.new( - # [1,1], - # [["!", "tag:tenderlovemaking.com,2009:"]], - # true - # ) - # - # == See Also - # See also Psych::Handler#start_document - # - # @return [Document] a new instance of Document - # - # source://psych//lib/psych/nodes/document.rb#45 - def initialize(version = T.unsafe(nil), tag_directives = T.unsafe(nil), implicit = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://psych//lib/psych/nodes/document.rb#60 - def document?; end - - # Was this document implicitly created? - # - # source://psych//lib/psych/nodes/document.rb#20 - def implicit; end - - # Was this document implicitly created? - # - # source://psych//lib/psych/nodes/document.rb#20 - def implicit=(_arg0); end - - # Is the end of the document implicit? - # - # source://psych//lib/psych/nodes/document.rb#23 - def implicit_end; end - - # Is the end of the document implicit? - # - # source://psych//lib/psych/nodes/document.rb#23 - def implicit_end=(_arg0); end - - # Returns the root node. A Document may only have one root node: - # http://yaml.org/spec/1.1/#id898031 - # - # source://psych//lib/psych/nodes/document.rb#56 - def root; end - - # A list of tag directives for this document - # - # source://psych//lib/psych/nodes/document.rb#17 - def tag_directives; end - - # A list of tag directives for this document - # - # source://psych//lib/psych/nodes/document.rb#17 - def tag_directives=(_arg0); end - - # The version of the YAML document - # - # source://psych//lib/psych/nodes/document.rb#14 - def version; end - - # The version of the YAML document - # - # source://psych//lib/psych/nodes/document.rb#14 - def version=(_arg0); end -end - -# This class represents a {YAML Mapping}[http://yaml.org/spec/1.1/#mapping]. -# -# A Psych::Nodes::Mapping node may have 0 or more children, but must have -# an even number of children. Here are the valid children a -# Psych::Nodes::Mapping node may have: -# -# * Psych::Nodes::Sequence -# * Psych::Nodes::Mapping -# * Psych::Nodes::Scalar -# * Psych::Nodes::Alias -# -# source://psych//lib/psych/nodes/mapping.rb#15 -class Psych::Nodes::Mapping < ::Psych::Nodes::Node - # Create a new Psych::Nodes::Mapping object. - # - # +anchor+ is the anchor associated with the map or +nil+. - # +tag+ is the tag associated with the map or +nil+. - # +implicit+ is a boolean indicating whether or not the map was implicitly - # started. - # +style+ is an integer indicating the mapping style. - # - # == See Also - # See also Psych::Handler#start_mapping - # - # @return [Mapping] a new instance of Mapping - # - # source://psych//lib/psych/nodes/mapping.rb#48 - def initialize(anchor = T.unsafe(nil), tag = T.unsafe(nil), implicit = T.unsafe(nil), style = T.unsafe(nil)); end - - # The optional anchor for this mapping - # - # source://psych//lib/psych/nodes/mapping.rb#26 - def anchor; end - - # The optional anchor for this mapping - # - # source://psych//lib/psych/nodes/mapping.rb#26 - def anchor=(_arg0); end - - # Is this an implicit mapping? - # - # source://psych//lib/psych/nodes/mapping.rb#32 - def implicit; end - - # Is this an implicit mapping? - # - # source://psych//lib/psych/nodes/mapping.rb#32 - def implicit=(_arg0); end - - # @return [Boolean] - # - # source://psych//lib/psych/nodes/mapping.rb#56 - def mapping?; end - - # The style of this mapping - # - # source://psych//lib/psych/nodes/mapping.rb#35 - def style; end - - # The style of this mapping - # - # source://psych//lib/psych/nodes/mapping.rb#35 - def style=(_arg0); end - - # The optional tag for this mapping - # - # source://psych//lib/psych/nodes/mapping.rb#29 - def tag; end - - # The optional tag for this mapping - # - # source://psych//lib/psych/nodes/mapping.rb#29 - def tag=(_arg0); end -end - -# The base class for any Node in a YAML parse tree. This class should -# never be instantiated. -# -# source://psych//lib/psych/nodes/node.rb#10 -class Psych::Nodes::Node - include ::Enumerable - - # Create a new Psych::Nodes::Node - # - # @return [Node] a new instance of Node - # - # source://psych//lib/psych/nodes/node.rb#32 - def initialize; end - - # @return [Boolean] - # - # source://psych//lib/psych/nodes/node.rb#67 - def alias?; end - - # The children of this node - # - # source://psych//lib/psych/nodes/node.rb#14 - def children; end - - # @return [Boolean] - # - # source://psych//lib/psych/nodes/node.rb#68 - def document?; end - - # Iterate over each node in the tree. Yields each node to +block+ depth - # first. - # - # source://psych//lib/psych/nodes/node.rb#39 - def each(&block); end - - # The column number where this node ends - # - # source://psych//lib/psych/nodes/node.rb#29 - def end_column; end - - # The column number where this node ends - # - # source://psych//lib/psych/nodes/node.rb#29 - def end_column=(_arg0); end - - # The line number where this node ends - # - # source://psych//lib/psych/nodes/node.rb#26 - def end_line; end - - # The line number where this node ends - # - # source://psych//lib/psych/nodes/node.rb#26 - def end_line=(_arg0); end - - # @return [Boolean] - # - # source://psych//lib/psych/nodes/node.rb#69 - def mapping?; end - - # @return [Boolean] - # - # source://psych//lib/psych/nodes/node.rb#70 - def scalar?; end - - # @return [Boolean] - # - # source://psych//lib/psych/nodes/node.rb#71 - def sequence?; end - - # The column number where this node start - # - # source://psych//lib/psych/nodes/node.rb#23 - def start_column; end - - # The column number where this node start - # - # source://psych//lib/psych/nodes/node.rb#23 - def start_column=(_arg0); end - - # The line number where this node start - # - # source://psych//lib/psych/nodes/node.rb#20 - def start_line; end - - # The line number where this node start - # - # source://psych//lib/psych/nodes/node.rb#20 - def start_line=(_arg0); end - - # @return [Boolean] - # - # source://psych//lib/psych/nodes/node.rb#72 - def stream?; end - - # An associated tag - # - # source://psych//lib/psych/nodes/node.rb#17 - def tag; end - - # Convert this node to Ruby. - # - # See also Psych::Visitors::ToRuby - # - # source://psych//lib/psych/nodes/node.rb#48 - def to_ruby(symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end - - # Convert this node to YAML. - # - # See also Psych::Visitors::Emitter - # - # source://psych//lib/psych/nodes/node.rb#57 - def to_yaml(io = T.unsafe(nil), options = T.unsafe(nil)); end - - # Convert this node to Ruby. - # - # See also Psych::Visitors::ToRuby - # - # source://psych//lib/psych/nodes/node.rb#48 - def transform(symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end - - # Convert this node to YAML. - # - # See also Psych::Visitors::Emitter - # - # source://psych//lib/psych/nodes/node.rb#57 - def yaml(io = T.unsafe(nil), options = T.unsafe(nil)); end -end - -# This class represents a {YAML Scalar}[http://yaml.org/spec/1.1/#id858081]. -# -# This node type is a terminal node and should not have any children. -# -# source://psych//lib/psych/nodes/scalar.rb#8 -class Psych::Nodes::Scalar < ::Psych::Nodes::Node - # Create a new Psych::Nodes::Scalar object. - # - # +value+ is the string value of the scalar - # +anchor+ is an associated anchor or nil - # +tag+ is an associated tag or nil - # +plain+ is a boolean value - # +quoted+ is a boolean value - # +style+ is an integer indicating the string style - # - # == See Also - # - # See also Psych::Handler#scalar - # - # @return [Scalar] a new instance of Scalar - # - # source://psych//lib/psych/nodes/scalar.rb#58 - def initialize(value, anchor = T.unsafe(nil), tag = T.unsafe(nil), plain = T.unsafe(nil), quoted = T.unsafe(nil), style = T.unsafe(nil)); end - - # The anchor value (if there is one) - # - # source://psych//lib/psych/nodes/scalar.rb#31 - def anchor; end - - # The anchor value (if there is one) - # - # source://psych//lib/psych/nodes/scalar.rb#31 - def anchor=(_arg0); end - - # Is this a plain scalar? - # - # source://psych//lib/psych/nodes/scalar.rb#37 - def plain; end - - # Is this a plain scalar? - # - # source://psych//lib/psych/nodes/scalar.rb#37 - def plain=(_arg0); end - - # Is this scalar quoted? - # - # source://psych//lib/psych/nodes/scalar.rb#40 - def quoted; end - - # Is this scalar quoted? - # - # source://psych//lib/psych/nodes/scalar.rb#40 - def quoted=(_arg0); end - - # @return [Boolean] - # - # source://psych//lib/psych/nodes/scalar.rb#67 - def scalar?; end - - # The style of this scalar - # - # source://psych//lib/psych/nodes/scalar.rb#43 - def style; end - - # The style of this scalar - # - # source://psych//lib/psych/nodes/scalar.rb#43 - def style=(_arg0); end - - # The tag value (if there is one) - # - # source://psych//lib/psych/nodes/scalar.rb#34 - def tag; end - - # The tag value (if there is one) - # - # source://psych//lib/psych/nodes/scalar.rb#34 - def tag=(_arg0); end - - # The scalar value - # - # source://psych//lib/psych/nodes/scalar.rb#28 - def value; end - - # The scalar value - # - # source://psych//lib/psych/nodes/scalar.rb#28 - def value=(_arg0); end -end - -# This class represents a -# {YAML sequence}[http://yaml.org/spec/1.1/#sequence/syntax]. -# -# A YAML sequence is basically a list, and looks like this: -# -# %YAML 1.1 -# --- -# - I am -# - a Sequence -# -# A YAML sequence may have an anchor like this: -# -# %YAML 1.1 -# --- -# &A [ -# "This sequence", -# "has an anchor" -# ] -# -# A YAML sequence may also have a tag like this: -# -# %YAML 1.1 -# --- -# !!seq [ -# "This sequence", -# "has a tag" -# ] -# -# This class represents a sequence in a YAML document. A -# Psych::Nodes::Sequence node may have 0 or more children. Valid children -# for this node are: -# -# * Psych::Nodes::Sequence -# * Psych::Nodes::Mapping -# * Psych::Nodes::Scalar -# * Psych::Nodes::Alias -# -# source://psych//lib/psych/nodes/sequence.rb#41 -class Psych::Nodes::Sequence < ::Psych::Nodes::Node - # Create a new object representing a YAML sequence. - # - # +anchor+ is the anchor associated with the sequence or nil. - # +tag+ is the tag associated with the sequence or nil. - # +implicit+ a boolean indicating whether or not the sequence was - # implicitly started. - # +style+ is an integer indicating the list style. - # - # See Psych::Handler#start_sequence - # - # @return [Sequence] a new instance of Sequence - # - # source://psych//lib/psych/nodes/sequence.rb#73 - def initialize(anchor = T.unsafe(nil), tag = T.unsafe(nil), implicit = T.unsafe(nil), style = T.unsafe(nil)); end - - # The anchor for this sequence (if any) - # - # source://psych//lib/psych/nodes/sequence.rb#52 - def anchor; end - - # The anchor for this sequence (if any) - # - # source://psych//lib/psych/nodes/sequence.rb#52 - def anchor=(_arg0); end - - # Is this sequence started implicitly? - # - # source://psych//lib/psych/nodes/sequence.rb#58 - def implicit; end - - # Is this sequence started implicitly? - # - # source://psych//lib/psych/nodes/sequence.rb#58 - def implicit=(_arg0); end - - # @return [Boolean] - # - # source://psych//lib/psych/nodes/sequence.rb#81 - def sequence?; end - - # The sequence style used - # - # source://psych//lib/psych/nodes/sequence.rb#61 - def style; end - - # The sequence style used - # - # source://psych//lib/psych/nodes/sequence.rb#61 - def style=(_arg0); end - - # The tag name for this sequence (if any) - # - # source://psych//lib/psych/nodes/sequence.rb#55 - def tag; end - - # The tag name for this sequence (if any) - # - # source://psych//lib/psych/nodes/sequence.rb#55 - def tag=(_arg0); end -end - -# Represents a YAML stream. This is the root node for any YAML parse -# tree. This node must have one or more child nodes. The only valid -# child node for a Psych::Nodes::Stream node is Psych::Nodes::Document. -# -# source://psych//lib/psych/nodes/stream.rb#8 -class Psych::Nodes::Stream < ::Psych::Nodes::Node - # Create a new Psych::Nodes::Stream node with an +encoding+ that - # defaults to Psych::Nodes::Stream::UTF8. - # - # See also Psych::Handler#start_stream - # - # @return [Stream] a new instance of Stream - # - # source://psych//lib/psych/nodes/stream.rb#32 - def initialize(encoding = T.unsafe(nil)); end - - # The encoding used for this stream - # - # source://psych//lib/psych/nodes/stream.rb#25 - def encoding; end - - # The encoding used for this stream - # - # source://psych//lib/psych/nodes/stream.rb#25 - def encoding=(_arg0); end - - # @return [Boolean] - # - # source://psych//lib/psych/nodes/stream.rb#37 - def stream?; end -end - -# YAML event parser class. This class parses a YAML document and calls -# events on the handler that is passed to the constructor. The events can -# be used for things such as constructing a YAML AST or deserializing YAML -# documents. It can even be fed back to Psych::Emitter to emit the same -# document that was parsed. -# -# See Psych::Handler for documentation on the events that Psych::Parser emits. -# -# Here is an example that prints out ever scalar found in a YAML document: -# -# # Handler for detecting scalar values -# class ScalarHandler < Psych::Handler -# def scalar value, anchor, tag, plain, quoted, style -# puts value -# end -# end -# -# parser = Psych::Parser.new(ScalarHandler.new) -# parser.parse(yaml_document) -# -# Here is an example that feeds the parser back in to Psych::Emitter. The -# YAML document is read from STDIN and written back out to STDERR: -# -# parser = Psych::Parser.new(Psych::Emitter.new($stderr)) -# parser.parse($stdin) -# -# Psych uses Psych::Parser in combination with Psych::TreeBuilder to -# construct an AST of the parsed YAML document. -# -# source://psych//lib/psych/parser.rb#33 -class Psych::Parser - # Creates a new Psych::Parser instance with +handler+. YAML events will - # be called on +handler+. See Psych::Parser for more details. - # - # @return [Parser] a new instance of Parser - # - # source://psych//lib/psych/parser.rb#47 - def initialize(handler = T.unsafe(nil)); end - - # Set the encoding for this parser to +encoding+ - # - # source://psych//lib/psych/parser.rb#41 - def external_encoding=(_arg0); end - - # The handler on which events will be called - # - # source://psych//lib/psych/parser.rb#38 - def handler; end - - # The handler on which events will be called - # - # source://psych//lib/psych/parser.rb#38 - def handler=(_arg0); end - - # call-seq: - # parser.parse(yaml) - # - # Parse the YAML document contained in +yaml+. Events will be called on - # the handler set on the parser instance. - # - # See Psych::Parser and Psych::Parser#handler - # - # source://psych//lib/psych/parser.rb#61 - def parse(yaml, path = T.unsafe(nil)); end -end - -# Scan scalars for built in types -# -# source://psych//lib/psych/scalar_scanner.rb#6 -class Psych::ScalarScanner - # Create a new scanner - # - # @return [ScalarScanner] a new instance of ScalarScanner - # - # source://psych//lib/psych/scalar_scanner.rb#30 - def initialize(class_loader, strict_integer: T.unsafe(nil)); end - - # Returns the value of attribute class_loader. - # - # source://psych//lib/psych/scalar_scanner.rb#27 - def class_loader; end - - # Parse and return an int from +string+ - # - # source://psych//lib/psych/scalar_scanner.rb#108 - def parse_int(string); end - - # Parse and return a Time from +string+ - # - # source://psych//lib/psych/scalar_scanner.rb#114 - def parse_time(string); end - - # Tokenize +string+ returning the Ruby object - # - # source://psych//lib/psych/scalar_scanner.rb#37 - def tokenize(string); end -end - -# Same as above, but allows commas. -# Not to YML spec, but kept for backwards compatibility -# -# source://psych//lib/psych/scalar_scanner.rb#22 -Psych::ScalarScanner::INTEGER_LEGACY = T.let(T.unsafe(nil), Regexp) - -# Taken from http://yaml.org/type/int.html and modified to ensure at least one numerical symbol exists -# -# source://psych//lib/psych/scalar_scanner.rb#15 -Psych::ScalarScanner::INTEGER_STRICT = T.let(T.unsafe(nil), Regexp) - -# Psych::Stream is a streaming YAML emitter. It will not buffer your YAML, -# but send it straight to an IO. -# -# Here is an example use: -# -# stream = Psych::Stream.new($stdout) -# stream.start -# stream.push({:foo => 'bar'}) -# stream.finish -# -# YAML will be immediately emitted to $stdout with no buffering. -# -# Psych::Stream#start will take a block and ensure that Psych::Stream#finish -# is called, so you can do this form: -# -# stream = Psych::Stream.new($stdout) -# stream.start do |em| -# em.push(:foo => 'bar') -# end -# -# source://psych//lib/psych/stream.rb#24 -class Psych::Stream < ::Psych::Visitors::YAMLTree - include ::Psych::Streaming - extend ::Psych::Streaming::ClassMethods -end - -# source://psych//lib/psych/stream.rb#25 -class Psych::Stream::Emitter < ::Psych::Emitter - # source://psych//lib/psych/stream.rb#26 - def end_document(implicit_end = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://psych//lib/psych/stream.rb#30 - def streaming?; end -end - -# source://psych//lib/psych/streaming.rb#3 -module Psych::Streaming - # Start streaming using +encoding+ - # - # source://psych//lib/psych/streaming.rb#18 - def start(encoding = T.unsafe(nil)); end - - private - - # source://psych//lib/psych/streaming.rb#25 - def register(target, obj); end -end - -# source://psych//lib/psych/streaming.rb#4 -module Psych::Streaming::ClassMethods - # Create a new streaming emitter. Emitter will print to +io+. See - # Psych::Stream for an example. - # - # source://psych//lib/psych/streaming.rb#8 - def new(io); end -end - -# source://psych//lib/psych/syntax_error.rb#5 -class Psych::SyntaxError < ::Psych::Exception - # @return [SyntaxError] a new instance of SyntaxError - # - # source://psych//lib/psych/syntax_error.rb#8 - def initialize(file, line, col, offset, problem, context); end - - # Returns the value of attribute column. - # - # source://psych//lib/psych/syntax_error.rb#6 - def column; end - - # Returns the value of attribute context. - # - # source://psych//lib/psych/syntax_error.rb#6 - def context; end - - # Returns the value of attribute file. - # - # source://psych//lib/psych/syntax_error.rb#6 - def file; end - - # Returns the value of attribute line. - # - # source://psych//lib/psych/syntax_error.rb#6 - def line; end - - # Returns the value of attribute offset. - # - # source://psych//lib/psych/syntax_error.rb#6 - def offset; end - - # Returns the value of attribute problem. - # - # source://psych//lib/psych/syntax_error.rb#6 - def problem; end -end - -# This class works in conjunction with Psych::Parser to build an in-memory -# parse tree that represents a YAML document. -# -# == Example -# -# parser = Psych::Parser.new Psych::TreeBuilder.new -# parser.parse('--- foo') -# tree = parser.handler.root -# -# See Psych::Handler for documentation on the event methods used in this -# class. -# -# source://psych//lib/psych/tree_builder.rb#17 -class Psych::TreeBuilder < ::Psych::Handler - # Create a new TreeBuilder instance - # - # @return [TreeBuilder] a new instance of TreeBuilder - # - # source://psych//lib/psych/tree_builder.rb#22 - def initialize; end - - # source://psych//lib/psych/tree_builder.rb#103 - def alias(anchor); end - - # Handles end_document events with +version+, +tag_directives+, - # and +implicit+ styling. - # - # See Psych::Handler#start_document - # - # source://psych//lib/psych/tree_builder.rb#77 - def end_document(implicit_end = T.unsafe(nil)); end - - # source://psych//lib/psych/tree_builder.rb#52 - def end_mapping; end - - # source://psych//lib/psych/tree_builder.rb#52 - def end_sequence; end - - # source://psych//lib/psych/tree_builder.rb#90 - def end_stream; end - - # source://psych//lib/psych/tree_builder.rb#33 - def event_location(start_line, start_column, end_line, end_column); end - - # Returns the root node for the built tree - # - # source://psych//lib/psych/tree_builder.rb#19 - def root; end - - # source://psych//lib/psych/tree_builder.rb#96 - def scalar(value, anchor, tag, plain, quoted, style); end - - # Handles start_document events with +version+, +tag_directives+, - # and +implicit+ styling. - # - # See Psych::Handler#start_document - # - # source://psych//lib/psych/tree_builder.rb#65 - def start_document(version, tag_directives, implicit); end - - # source://psych//lib/psych/tree_builder.rb#45 - def start_mapping(anchor, tag, implicit, style); end - - # source://psych//lib/psych/tree_builder.rb#45 - def start_sequence(anchor, tag, implicit, style); end - - # source://psych//lib/psych/tree_builder.rb#84 - def start_stream(encoding); end - - private - - # source://psych//lib/psych/tree_builder.rb#116 - def pop; end - - # source://psych//lib/psych/tree_builder.rb#111 - def push(value); end - - # source://psych//lib/psych/tree_builder.rb#132 - def set_end_location(node); end - - # source://psych//lib/psych/tree_builder.rb#122 - def set_location(node); end - - # source://psych//lib/psych/tree_builder.rb#127 - def set_start_location(node); end -end - -# The version of Psych you are using -# -# source://psych//lib/psych/versions.rb#5 -Psych::VERSION = T.let(T.unsafe(nil), String) - -# source://psych//lib/psych/visitors/depth_first.rb#4 -class Psych::Visitors::DepthFirst < ::Psych::Visitors::Visitor - # @return [DepthFirst] a new instance of DepthFirst - # - # source://psych//lib/psych/visitors/depth_first.rb#5 - def initialize(block); end - - private - - # source://psych//lib/psych/visitors/depth_first.rb#11 - def nary(o); end - - # source://psych//lib/psych/visitors/depth_first.rb#20 - def terminal(o); end - - # source://psych//lib/psych/visitors/depth_first.rb#20 - def visit_Psych_Nodes_Alias(o); end - - # source://psych//lib/psych/visitors/depth_first.rb#11 - def visit_Psych_Nodes_Document(o); end - - # source://psych//lib/psych/visitors/depth_first.rb#11 - def visit_Psych_Nodes_Mapping(o); end - - # source://psych//lib/psych/visitors/depth_first.rb#20 - def visit_Psych_Nodes_Scalar(o); end - - # source://psych//lib/psych/visitors/depth_first.rb#11 - def visit_Psych_Nodes_Sequence(o); end - - # source://psych//lib/psych/visitors/depth_first.rb#11 - def visit_Psych_Nodes_Stream(o); end -end - -# source://psych//lib/psych/visitors/emitter.rb#4 -class Psych::Visitors::Emitter < ::Psych::Visitors::Visitor - # @return [Emitter] a new instance of Emitter - # - # source://psych//lib/psych/visitors/emitter.rb#5 - def initialize(io, options = T.unsafe(nil)); end - - # source://psych//lib/psych/visitors/emitter.rb#47 - def visit_Psych_Nodes_Alias(o); end - - # source://psych//lib/psych/visitors/emitter.rb#25 - def visit_Psych_Nodes_Document(o); end - - # source://psych//lib/psych/visitors/emitter.rb#41 - def visit_Psych_Nodes_Mapping(o); end - - # source://psych//lib/psych/visitors/emitter.rb#31 - def visit_Psych_Nodes_Scalar(o); end - - # source://psych//lib/psych/visitors/emitter.rb#35 - def visit_Psych_Nodes_Sequence(o); end - - # source://psych//lib/psych/visitors/emitter.rb#19 - def visit_Psych_Nodes_Stream(o); end -end - -# source://psych//lib/psych/visitors/json_tree.rb#6 -class Psych::Visitors::JSONTree < ::Psych::Visitors::YAMLTree - include ::Psych::JSON::RubyEvents - - # source://psych//lib/psych/visitors/json_tree.rb#16 - def accept(target); end - - class << self - # source://psych//lib/psych/visitors/json_tree.rb#9 - def create(options = T.unsafe(nil)); end - end -end - -# source://psych//lib/psych/visitors/to_ruby.rb#429 -class Psych::Visitors::NoAliasRuby < ::Psych::Visitors::ToRuby - # @raise [AliasesNotEnabled] - # - # source://psych//lib/psych/visitors/to_ruby.rb#430 - def visit_Psych_Nodes_Alias(o); end -end - -# source://psych//lib/psych/visitors/yaml_tree.rb#537 -class Psych::Visitors::RestrictedYAMLTree < ::Psych::Visitors::YAMLTree - # @return [RestrictedYAMLTree] a new instance of RestrictedYAMLTree - # - # source://psych//lib/psych/visitors/yaml_tree.rb#549 - def initialize(emitter, ss, options); end - - # source://psych//lib/psych/visitors/yaml_tree.rb#562 - def accept(target); end - - # source://psych//lib/psych/visitors/yaml_tree.rb#574 - def visit_Symbol(sym); end -end - -# source://psych//lib/psych/visitors/yaml_tree.rb#538 -Psych::Visitors::RestrictedYAMLTree::DEFAULT_PERMITTED_CLASSES = T.let(T.unsafe(nil), Hash) - -# This class walks a YAML AST, converting each node to Ruby -# -# source://psych//lib/psych/visitors/to_ruby.rb#14 -class Psych::Visitors::ToRuby < ::Psych::Visitors::Visitor - # @return [ToRuby] a new instance of ToRuby - # - # source://psych//lib/psych/visitors/to_ruby.rb#23 - def initialize(ss, class_loader, symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil)); end - - # source://psych//lib/psych/visitors/to_ruby.rb#34 - def accept(target); end - - # Returns the value of attribute class_loader. - # - # source://psych//lib/psych/visitors/to_ruby.rb#21 - def class_loader; end - - # source://psych//lib/psych/visitors/to_ruby.rb#326 - def visit_Psych_Nodes_Alias(o); end - - # source://psych//lib/psych/visitors/to_ruby.rb#318 - def visit_Psych_Nodes_Document(o); end - - # source://psych//lib/psych/visitors/to_ruby.rb#164 - def visit_Psych_Nodes_Mapping(o); end - - # source://psych//lib/psych/visitors/to_ruby.rb#128 - def visit_Psych_Nodes_Scalar(o); end - - # source://psych//lib/psych/visitors/to_ruby.rb#132 - def visit_Psych_Nodes_Sequence(o); end - - # source://psych//lib/psych/visitors/to_ruby.rb#322 - def visit_Psych_Nodes_Stream(o); end - - private - - # source://psych//lib/psych/visitors/to_ruby.rb#394 - def deduplicate(key); end - - # source://psych//lib/psych/visitors/to_ruby.rb#51 - def deserialize(o); end - - # source://psych//lib/psych/visitors/to_ruby.rb#411 - def init_with(o, h, node); end - - # source://psych//lib/psych/visitors/to_ruby.rb#403 - def merge_key(hash, key, val); end - - # source://psych//lib/psych/visitors/to_ruby.rb#332 - def register(node, object); end - - # source://psych//lib/psych/visitors/to_ruby.rb#337 - def register_empty(object); end - - # Convert +klassname+ to a Class - # - # source://psych//lib/psych/visitors/to_ruby.rb#424 - def resolve_class(klassname); end - - # source://psych//lib/psych/visitors/to_ruby.rb#406 - def revive(klass, node); end - - # source://psych//lib/psych/visitors/to_ruby.rb#343 - def revive_hash(hash, o, tagged = T.unsafe(nil)); end - - class << self - # source://psych//lib/psych/visitors/to_ruby.rb#15 - def create(symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end - end -end - -# source://psych//lib/psych/visitors/visitor.rb#4 -class Psych::Visitors::Visitor - # source://psych//lib/psych/visitors/visitor.rb#5 - def accept(target); end - - private - - # source://psych//lib/psych/visitors/visitor.rb#19 - def dispatch; end - - # source://psych//lib/psych/visitors/visitor.rb#29 - def visit(target); end - - class << self - # @api private - # - # source://psych//lib/psych/visitors/visitor.rb#12 - def dispatch_cache; end - end -end - -# YAMLTree builds a YAML ast given a Ruby object. For example: -# -# builder = Psych::Visitors::YAMLTree.new -# builder << { :foo => 'bar' } -# builder.tree # => # ['a', 'b', 'c'] # - # source://rake//lib/rake/file_utils.rb#126 + # pkg:gem/rake#lib/rake/file_utils.rb:131 def split_all(path); end private - # source://rake//lib/rake/file_utils.rb#61 + # pkg:gem/rake#lib/rake/file_utils.rb:61 def create_shell_runner(cmd); end - # source://rake//lib/rake/file_utils.rb#84 + # pkg:gem/rake#lib/rake/file_utils.rb:89 def set_verbose_option(options); end - # source://rake//lib/rake/file_utils.rb#71 - def sh_show_command(cmd); end + # pkg:gem/rake#lib/rake/file_utils.rb:71 + def sh_show_command(cmd, options = T.unsafe(nil)); end end -# source://rake//lib/rake/file_utils.rb#106 +# pkg:gem/rake#lib/rake/file_utils.rb:111 FileUtils::LN_SUPPORTED = T.let(T.unsafe(nil), Array) # Path to the currently running Ruby program # -# source://rake//lib/rake/file_utils.rb#10 +# pkg:gem/rake#lib/rake/file_utils.rb:10 FileUtils::RUBY = T.let(T.unsafe(nil), String) -# source://rake//lib/rake/ext/core.rb#2 +# pkg:gem/rake#lib/rake/ext/core.rb:2 class Module # Check for an existing method in the current class before extending. If # the method already exists, then a warning is printed and the extension is @@ -108,11 +108,34 @@ class Module # end # end # - # source://rake//lib/rake/ext/core.rb#18 + # pkg:gem/rake#lib/rake/ext/core.rb:18 def rake_extension(method); end end -# source://rake//lib/rake.rb#24 +# -- +# Copyright 2003-2010 by Jim Weirich (jim.weirich@gmail.com) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# ++ +# :stopdoc: +# +# pkg:gem/rake#lib/rake.rb:24 module Rake extend ::FileUtils::StreamUtils_ extend ::FileUtils @@ -121,41 +144,41 @@ module Rake class << self # Add files to the rakelib list # - # source://rake//lib/rake/rake_module.rb#33 + # pkg:gem/rake#lib/rake/rake_module.rb:33 def add_rakelib(*files); end # Current Rake Application # - # source://rake//lib/rake/rake_module.rb#8 + # pkg:gem/rake#lib/rake/rake_module.rb:8 def application; end # Set the current Rake application object. # - # source://rake//lib/rake/rake_module.rb#13 + # pkg:gem/rake#lib/rake/rake_module.rb:13 def application=(app); end # Yield each file or directory component. # - # source://rake//lib/rake/file_list.rb#418 + # pkg:gem/rake#lib/rake/file_list.rb:418 def each_dir_parent(dir); end # Convert Pathname and Pathname-like objects to strings; # leave everything else alone # - # source://rake//lib/rake/file_list.rb#429 + # pkg:gem/rake#lib/rake/file_list.rb:429 def from_pathname(path); end # Load a rakefile. # - # source://rake//lib/rake/rake_module.rb#28 + # pkg:gem/rake#lib/rake/rake_module.rb:28 def load_rakefile(path); end # Return the original directory where the Rake application was started. # - # source://rake//lib/rake/rake_module.rb#23 + # pkg:gem/rake#lib/rake/rake_module.rb:23 def original_dir; end - # source://rake//lib/rake/rake_module.rb#17 + # pkg:gem/rake#lib/rake/rake_module.rb:17 def suggested_thread_count; end # Make +block_application+ the default rake application inside a block so @@ -174,7 +197,7 @@ module Rake # # puts other_rake.tasks # - # source://rake//lib/rake/rake_module.rb#54 + # pkg:gem/rake#lib/rake/rake_module.rb:54 def with_application(block_application = T.unsafe(nil)); end end end @@ -182,27 +205,25 @@ end # Rake main application object. When invoking +rake+ from the # command line, a Rake::Application object is created and run. # -# source://rake//lib/rake/application.rb#19 +# pkg:gem/rake#lib/rake/application.rb:20 class Rake::Application include ::Rake::TaskManager include ::Rake::TraceOutput # Initialize a Rake::Application object. # - # @return [Application] a new instance of Application - # - # source://rake//lib/rake/application.rb#49 + # pkg:gem/rake#lib/rake/application.rb:50 def initialize; end # Add a file to the list of files to be imported. # - # source://rake//lib/rake/application.rb#807 + # pkg:gem/rake#lib/rake/application.rb:793 def add_import(fn); end # Add a loader to handle imported files ending in the extension # +ext+. # - # source://rake//lib/rake/application.rb#161 + # pkg:gem/rake#lib/rake/application.rb:162 def add_loader(ext, loader); end # Collect the list of tasks on the command line. If no tasks are @@ -214,13 +235,13 @@ class Rake::Application # recognised command-line options, which OptionParser.parse will # have taken care of already. # - # source://rake//lib/rake/application.rb#788 + # pkg:gem/rake#lib/rake/application.rb:774 def collect_command_line_tasks(args); end # Default task name ("default"). # (May be overridden by subclasses) # - # source://rake//lib/rake/application.rb#802 + # pkg:gem/rake#lib/rake/application.rb:788 def default_task_name; end # Warn about deprecated usage. @@ -228,133 +249,131 @@ class Rake::Application # Example: # Rake.application.deprecate("import", "Rake.import", caller.first) # - # source://rake//lib/rake/application.rb#288 + # pkg:gem/rake#lib/rake/application.rb:283 def deprecate(old_usage, new_usage, call_site); end - # source://rake//lib/rake/application.rb#250 + # pkg:gem/rake#lib/rake/application.rb:245 def display_cause_details(ex); end # Display the error message that caused the exception. # - # source://rake//lib/rake/application.rb#234 + # pkg:gem/rake#lib/rake/application.rb:229 def display_error_message(ex); end - # source://rake//lib/rake/application.rb#275 + # pkg:gem/rake#lib/rake/application.rb:270 def display_exception_backtrace(ex); end - # source://rake//lib/rake/application.rb#242 + # pkg:gem/rake#lib/rake/application.rb:237 def display_exception_details(ex); end - # source://rake//lib/rake/application.rb#257 + # pkg:gem/rake#lib/rake/application.rb:252 def display_exception_details_seen; end - # source://rake//lib/rake/application.rb#265 + # pkg:gem/rake#lib/rake/application.rb:260 def display_exception_message_details(ex); end # Display the tasks and prerequisites # - # source://rake//lib/rake/application.rb#411 + # pkg:gem/rake#lib/rake/application.rb:406 def display_prerequisites; end # Display the tasks and comments. # - # source://rake//lib/rake/application.rb#328 + # pkg:gem/rake#lib/rake/application.rb:323 def display_tasks_and_comments; end # Calculate the dynamic width of the # - # source://rake//lib/rake/application.rb#379 + # pkg:gem/rake#lib/rake/application.rb:374 def dynamic_width; end - # source://rake//lib/rake/application.rb#383 + # pkg:gem/rake#lib/rake/application.rb:378 def dynamic_width_stty; end - # source://rake//lib/rake/application.rb#387 + # pkg:gem/rake#lib/rake/application.rb:382 def dynamic_width_tput; end # Exit the program because of an unhandled exception. # (may be overridden by subclasses) # - # source://rake//lib/rake/application.rb#229 + # pkg:gem/rake#lib/rake/application.rb:224 def exit_because_of_exception(ex); end - # source://rake//lib/rake/application.rb#708 + # pkg:gem/rake#lib/rake/application.rb:703 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#674 + # pkg:gem/rake#lib/rake/application.rb:669 def handle_options(argv); end - # @return [Boolean] - # - # source://rake//lib/rake/application.rb#261 + # pkg:gem/rake#lib/rake/application.rb:256 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#304 + # pkg:gem/rake#lib/rake/application.rb:299 def have_rakefile; end # Initialize the command line parameters and app name. # - # source://rake//lib/rake/application.rb#88 + # pkg:gem/rake#lib/rake/application.rb:89 def init(app_name = T.unsafe(nil), argv = T.unsafe(nil)); end # Invokes a task with arguments that are extracted from +task_string+ # - # source://rake//lib/rake/application.rb#185 + # pkg:gem/rake#lib/rake/application.rb:180 def invoke_task(task_string); end # Load the pending list of imported files. # - # source://rake//lib/rake/application.rb#812 + # pkg:gem/rake#lib/rake/application.rb:798 def load_imports; end # Find the rakefile and then load it and any pending imports. # - # source://rake//lib/rake/application.rb#124 + # pkg:gem/rake#lib/rake/application.rb:125 def load_rakefile; end # The name of the application (typically 'rake') # - # source://rake//lib/rake/application.rb#24 + # pkg:gem/rake#lib/rake/application.rb:25 def name; end # Application options from the command line # - # source://rake//lib/rake/application.rb#167 + # pkg:gem/rake#lib/rake/application.rb:168 def options; end # The original directory where rake was invoked. # - # source://rake//lib/rake/application.rb#27 + # pkg:gem/rake#lib/rake/application.rb:28 def original_dir; end - # source://rake//lib/rake/application.rb#191 + # pkg:gem/rake#lib/rake/application.rb:186 def parse_task_string(string); end - # source://rake//lib/rake/application.rb#720 + # pkg:gem/rake#lib/rake/application.rb:715 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#694 + # pkg:gem/rake#lib/rake/application.rb:689 def rake_require(file_name, paths = T.unsafe(nil), loaded = T.unsafe(nil)); end # Name of the actual rakefile used. # - # source://rake//lib/rake/application.rb#30 + # pkg:gem/rake#lib/rake/application.rb:31 def rakefile; end - # source://rake//lib/rake/application.rb#828 + # pkg:gem/rake#lib/rake/application.rb:814 def rakefile_location(backtrace = T.unsafe(nil)); end - # source://rake//lib/rake/application.rb#725 + # pkg:gem/rake#lib/rake/application.rb:720 def raw_load_rakefile; end # Run the Rake application. The run method performs the following @@ -368,179 +387,171 @@ class Rake::Application # +init+ on your application. Then define any tasks. Finally, # call +top_level+ to run your top level tasks. # - # source://rake//lib/rake/application.rb#79 + # pkg:gem/rake#lib/rake/application.rb:80 def run(argv = T.unsafe(nil)); end # Run the given block with the thread startup and shutdown. # - # source://rake//lib/rake/application.rb#144 + # pkg:gem/rake#lib/rake/application.rb:145 def run_with_threads; end - # source://rake//lib/rake/application.rb#837 + # pkg:gem/rake#lib/rake/application.rb:823 def set_default_options; end # Provide standard exception handling for the given block. # - # source://rake//lib/rake/application.rb#213 + # pkg:gem/rake#lib/rake/application.rb:208 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#432 + # pkg:gem/rake#lib/rake/application.rb:427 def standard_rake_options; end # The directory path containing the system wide rakefiles. # - # source://rake//lib/rake/application.rb#757 + # pkg:gem/rake#lib/rake/application.rb:752 def system_dir; end # Number of columns on the terminal # - # source://rake//lib/rake/application.rb#33 + # pkg:gem/rake#lib/rake/application.rb:34 def terminal_columns; end # Number of columns on the terminal # - # source://rake//lib/rake/application.rb#33 + # pkg:gem/rake#lib/rake/application.rb:34 def terminal_columns=(_arg0); end - # source://rake//lib/rake/application.rb#367 + # pkg:gem/rake#lib/rake/application.rb:362 def terminal_width; end # Return the thread pool used for multithreaded processing. # - # source://rake//lib/rake/application.rb#178 + # pkg:gem/rake#lib/rake/application.rb:173 def thread_pool; end # Run the top level tasks of a Rake application. # - # source://rake//lib/rake/application.rb#131 + # pkg:gem/rake#lib/rake/application.rb:132 def top_level; end # List of the top level task names (task names from the command line). # - # source://rake//lib/rake/application.rb#36 + # pkg:gem/rake#lib/rake/application.rb:37 def top_level_tasks; end - # source://rake//lib/rake/application.rb#418 + # pkg:gem/rake#lib/rake/application.rb:413 def trace(*strings); end - # source://rake//lib/rake/application.rb#400 + # pkg:gem/rake#lib/rake/application.rb:395 def truncate(string, width); end # We will truncate output if we are outputting to a TTY or if we've been # given an explicit column width to honor # - # @return [Boolean] - # - # source://rake//lib/rake/application.rb#323 + # pkg:gem/rake#lib/rake/application.rb:318 def truncate_output?; end # Override the detected TTY output state (mostly for testing) # - # source://rake//lib/rake/application.rb#39 + # pkg:gem/rake#lib/rake/application.rb:40 def tty_output=(_arg0); end # True if we are outputting to TTY, false otherwise # - # @return [Boolean] - # - # source://rake//lib/rake/application.rb#317 + # pkg:gem/rake#lib/rake/application.rb:312 def tty_output?; end - # @return [Boolean] - # - # source://rake//lib/rake/application.rb#391 + # pkg:gem/rake#lib/rake/application.rb:386 def unix?; end - # @return [Boolean] - # - # source://rake//lib/rake/application.rb#396 + # pkg:gem/rake#lib/rake/application.rb:391 def windows?; end private - # source://rake//lib/rake/application.rb#751 + # pkg:gem/rake#lib/rake/application.rb:746 def glob(path, &block); end # Does the exception have a task invocation chain? # - # @return [Boolean] - # - # source://rake//lib/rake/application.rb#297 + # pkg:gem/rake#lib/rake/application.rb:292 def has_chain?(exception); end - # source://rake//lib/rake/application.rb#102 + # pkg:gem/rake#lib/rake/application.rb:103 def load_debug_at_stop_feature; end - # source://rake//lib/rake/application.rb#650 + # pkg:gem/rake#lib/rake/application.rb:645 def select_tasks_to_show(options, show_tasks, value); end - # source://rake//lib/rake/application.rb#657 + # pkg:gem/rake#lib/rake/application.rb:652 def select_trace_output(options, trace_option, value); end - # source://rake//lib/rake/application.rb#423 + # pkg:gem/rake#lib/rake/application.rb:418 def sort_options(options); end - # source://rake//lib/rake/application.rb#774 + # The standard directory containing system wide rake files. + # + # pkg:gem/rake#lib/rake/application.rb:757 def standard_system_dir; end end -# source://rake//lib/rake/application.rb#41 +# pkg:gem/rake#lib/rake/application.rb:42 Rake::Application::DEFAULT_RAKEFILES = T.let(T.unsafe(nil), Array) -# source://rake//lib/rake/backtrace.rb#3 +# pkg:gem/rake#lib/rake/backtrace.rb:3 module Rake::Backtrace class << self - # source://rake//lib/rake/backtrace.rb#19 + # pkg:gem/rake#lib/rake/backtrace.rb:19 def collapse(backtrace); end end end -# source://rake//lib/rake/backtrace.rb#8 +# pkg:gem/rake#lib/rake/backtrace.rb:8 Rake::Backtrace::SUPPRESSED_PATHS = T.let(T.unsafe(nil), Array) -# source://rake//lib/rake/backtrace.rb#12 +# pkg:gem/rake#lib/rake/backtrace.rb:12 Rake::Backtrace::SUPPRESSED_PATHS_RE = T.let(T.unsafe(nil), String) -# source://rake//lib/rake/backtrace.rb#17 +# pkg:gem/rake#lib/rake/backtrace.rb:17 Rake::Backtrace::SUPPRESS_PATTERN = T.let(T.unsafe(nil), Regexp) -# source://rake//lib/rake/backtrace.rb#4 +# pkg:gem/rake#lib/rake/backtrace.rb:4 Rake::Backtrace::SYS_KEYS = T.let(T.unsafe(nil), Array) -# source://rake//lib/rake/backtrace.rb#5 +# pkg:gem/rake#lib/rake/backtrace.rb:5 Rake::Backtrace::SYS_PATHS = T.let(T.unsafe(nil), Array) # Mixin for creating easily cloned objects. # -# source://rake//lib/rake/cloneable.rb#6 +# pkg:gem/rake#lib/rake/cloneable.rb:6 module Rake::Cloneable private # The hook that is invoked by 'clone' and 'dup' methods. # - # source://rake//lib/rake/cloneable.rb#8 + # pkg:gem/rake#lib/rake/cloneable.rb:8 def initialize_copy(source); end end -# source://rake//lib/rake/application.rb#13 +# pkg:gem/rake#lib/rake/application.rb:14 class Rake::CommandLineOptionError < ::StandardError; end # Based on a script at: # http://stackoverflow.com/questions/891537/ruby-detect-number-of-cpus-installed # -# source://rake//lib/rake/cpu_counter.rb#6 +# pkg:gem/rake#lib/rake/cpu_counter.rb:6 class Rake::CpuCounter - # source://rake//lib/rake/cpu_counter.rb#22 + # pkg:gem/rake#lib/rake/cpu_counter.rb:22 def count; end - # source://rake//lib/rake/cpu_counter.rb#11 + # pkg:gem/rake#lib/rake/cpu_counter.rb:11 def count_with_default(default = T.unsafe(nil)); end class << self - # source://rake//lib/rake/cpu_counter.rb#7 + # pkg:gem/rake#lib/rake/cpu_counter.rb:7 def count; end end end @@ -551,7 +562,7 @@ end # For a Rakefile you run from the command line this module is automatically # included. # -# source://rake//lib/rake/dsl_definition.rb#14 +# pkg:gem/rake#lib/rake/dsl_definition.rb:14 module Rake::DSL include ::FileUtils::StreamUtils_ include ::FileUtils @@ -559,34 +570,34 @@ module Rake::DSL private - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def cd(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def chdir(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def chmod(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def chmod_R(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def chown(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def chown_R(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def copy(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def cp(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def cp_lr(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def cp_r(*args, **options, &block); end # Describes the next rake task. Duplicate descriptions are discarded. @@ -599,7 +610,7 @@ module Rake::DSL # # ... run tests # end # - # source://rake//lib/rake/dsl_definition.rb#166 + # pkg:gem/rake#lib/rake/dsl_definition.rb:166 def desc(description); end # Declare a set of files tasks to create the given directories on @@ -608,7 +619,7 @@ module Rake::DSL # Example: # directory "testdata/doc" # - # source://rake//lib/rake/dsl_definition.rb#92 + # pkg:gem/rake#lib/rake/dsl_definition.rb:92 def directory(*args, &block); end # Declare a file task. @@ -624,13 +635,13 @@ module Rake::DSL # end # end # - # source://rake//lib/rake/dsl_definition.rb#76 + # pkg:gem/rake#lib/rake/dsl_definition.rb:76 def file(*args, &block); end # Declare a file creation task. # (Mainly used for the directory command). # - # source://rake//lib/rake/dsl_definition.rb#82 + # pkg:gem/rake#lib/rake/dsl_definition.rb:82 def file_create(*args, &block); end # Import the partial Rakefiles +fn+. Imported files are loaded @@ -647,40 +658,40 @@ module Rake::DSL # Example: # import ".depend", "my_rules" # - # source://rake//lib/rake/dsl_definition.rb#184 + # pkg:gem/rake#lib/rake/dsl_definition.rb:184 def import(*fns); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def install(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def link(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def ln(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def ln_s(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def ln_sf(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def ln_sr(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def makedirs(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def mkdir(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def mkdir_p(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def mkpath(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def move(*args, **options, &block); end # Declare a task that performs its prerequisites in @@ -691,10 +702,10 @@ module Rake::DSL # Example: # multitask deploy: %w[deploy_gem deploy_rdoc] # - # source://rake//lib/rake/dsl_definition.rb#113 + # pkg:gem/rake#lib/rake/dsl_definition.rb:113 def multitask(*args, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def mv(*args, **options, &block); end # Create a new rake namespace and use it for evaluating the given @@ -716,40 +727,40 @@ module Rake::DSL # # ... # end # - # source://rake//lib/rake/dsl_definition.rb#136 + # pkg:gem/rake#lib/rake/dsl_definition.rb:136 def namespace(name = T.unsafe(nil), &block); end - # source://rake//lib/rake/file_utils_ext.rb#77 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def nowrite(value = T.unsafe(nil)); end - # source://rake//lib/rake/file_utils_ext.rb#123 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def rake_check_options(options, *optdecl); end - # source://rake//lib/rake/file_utils_ext.rb#116 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def rake_output_message(message); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def remove(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def rm(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def rm_f(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def rm_r(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def rm_rf(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def rmdir(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def rmtree(*args, **options, &block); end - # source://rake//lib/rake/file_utils.rb#98 + # pkg:gem/rake#lib/rake/dsl_definition.rb:23 def ruby(*args, **options, &block); end # Declare a rule for auto-tasks. @@ -759,22 +770,22 @@ module Rake::DSL # sh 'cc', '-c', '-o', t.name, t.source # end # - # source://rake//lib/rake/dsl_definition.rb#152 + # pkg:gem/rake#lib/rake/dsl_definition.rb:152 def rule(*args, &block); end - # source://rake//lib/rake/file_utils.rb#110 + # pkg:gem/rake#lib/rake/dsl_definition.rb:23 def safe_ln(*args, **options); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def safe_unlink(*args, **options, &block); end - # source://rake//lib/rake/file_utils.rb#43 + # pkg:gem/rake#lib/rake/dsl_definition.rb:23 def sh(*cmd, &block); end - # source://rake//lib/rake/file_utils.rb#126 + # pkg:gem/rake#lib/rake/dsl_definition.rb:23 def split_all(path); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def symlink(*args, **options, &block); end # :call-seq: @@ -808,38 +819,38 @@ module Rake::DSL # # $ rake package[1.2.3] # - # source://rake//lib/rake/dsl_definition.rb#59 + # pkg:gem/rake#lib/rake/dsl_definition.rb:59 def task(*args, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def touch(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#53 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def verbose(value = T.unsafe(nil)); end - # source://rake//lib/rake/file_utils_ext.rb#107 + # pkg:gem/rake#lib/rake/dsl_definition.rb:24 def when_writing(msg = T.unsafe(nil)); end end # Default Rakefile loader used by +import+. # -# source://rake//lib/rake/default_loader.rb#5 +# pkg:gem/rake#lib/rake/default_loader.rb:5 class Rake::DefaultLoader # Loads a rakefile into the current application from +fn+ # - # source://rake//lib/rake/default_loader.rb#10 + # pkg:gem/rake#lib/rake/default_loader.rb:10 def load(fn); end end -# source://rake//lib/rake/early_time.rb#21 +# pkg:gem/rake#lib/rake/early_time.rb:21 Rake::EARLY = T.let(T.unsafe(nil), Rake::EarlyTime) -# source://rake//lib/rake/task_arguments.rb#108 +# pkg:gem/rake#lib/rake/task_arguments.rb:112 Rake::EMPTY_TASK_ARGS = T.let(T.unsafe(nil), Rake::TaskArguments) # EarlyTime is a fake timestamp that occurs _before_ any other time value. # -# source://rake//lib/rake/early_time.rb#5 +# pkg:gem/rake#lib/rake/early_time.rb:5 class Rake::EarlyTime include ::Comparable include ::Singleton::SingletonInstanceMethods @@ -848,16 +859,19 @@ class Rake::EarlyTime # The EarlyTime always comes before +other+! # - # source://rake//lib/rake/early_time.rb#12 + # pkg:gem/rake#lib/rake/early_time.rb:12 def <=>(other); end - # source://rake//lib/rake/early_time.rb#16 + # pkg:gem/rake#lib/rake/early_time.rb:16 def to_s; end class << self private + # pkg:gem/rake#lib/rake/early_time.rb:7 def allocate; end + + # pkg:gem/rake#lib/rake/early_time.rb:7 def new(*_arg0); end end end @@ -867,19 +881,17 @@ end # not re-triggered if any of its dependencies are newer, nor does trigger # any rebuilds of tasks that depend on it whenever it is updated. # -# source://rake//lib/rake/file_creation_task.rb#12 +# pkg:gem/rake#lib/rake/file_creation_task.rb:12 class Rake::FileCreationTask < ::Rake::FileTask # Is this file task needed? Yes if it doesn't exist. # - # @return [Boolean] - # - # source://rake//lib/rake/file_creation_task.rb#14 + # pkg:gem/rake#lib/rake/file_creation_task.rb:14 def needed?; end # Time stamp for file creation task. This time stamp is earlier # than any other time stamp. # - # source://rake//lib/rake/file_creation_task.rb#20 + # pkg:gem/rake#lib/rake/file_creation_task.rb:20 def timestamp; end end @@ -896,7 +908,7 @@ end # FileList/Array is requested, the pending patterns are resolved into a real # list of file names. # -# source://rake//lib/rake/file_list.rb#22 +# pkg:gem/rake#lib/rake/file_list.rb:22 class Rake::FileList include ::Rake::Cloneable @@ -911,165 +923,154 @@ class Rake::FileList # fl.exclude(/\bCVS\b/) # end # - # @return [FileList] a new instance of FileList - # @yield [_self] - # @yieldparam _self [Rake::FileList] the object that the method was called on - # - # source://rake//lib/rake/file_list.rb#99 + # pkg:gem/rake#lib/rake/file_list.rb:99 def initialize(*patterns); end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def &(*args, &block); end # Redefine * to return either a string or a new file list. # - # source://rake//lib/rake/file_list.rb#193 + # pkg:gem/rake#lib/rake/file_list.rb:193 def *(other); end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def +(*args, &block); end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def -(*args, &block); end - # source://rake//lib/rake/file_list.rb#203 + # pkg:gem/rake#lib/rake/file_list.rb:203 def <<(obj); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def <=>(*args, &block); end # A FileList is equal through array equality. # - # source://rake//lib/rake/file_list.rb#171 + # pkg:gem/rake#lib/rake/file_list.rb:171 def ==(array); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def [](*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def []=(*args, &block); end - # Add file names defined by glob patterns to the file list. If an array - # is given, add each element of the array. - # - # Example: - # file_list.include("*.java", "*.cfg") - # file_list.include %w( math.c lib.h *.o ) - # - # source://rake//lib/rake/file_list.rb#116 + # pkg:gem/rake#lib/rake/file_list.rb:128 def add(*filenames); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def all?(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def any?(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def append(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def assoc(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def at(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def bsearch(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def bsearch_index(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def chain(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def chunk(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def chunk_while(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def clear(*args, &block); end # Clear all the exclude patterns so that we exclude nothing. # - # source://rake//lib/rake/file_list.rb#164 + # pkg:gem/rake#lib/rake/file_list.rb:164 def clear_exclude; end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def collect(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def collect!(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def collect_concat(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def combination(*args, &block); end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def compact(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def compact!(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def concat(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def count(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def cycle(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def deconstruct(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def delete(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def delete_at(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def delete_if(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def detect(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def difference(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def dig(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def drop(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def drop_while(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def each(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def each_cons(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def each_entry(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def each_index(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def each_slice(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def each_with_index(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def each_with_object(*args, &block); end # Grep each of the files in the filelist using the given pattern. If a @@ -1078,13 +1079,13 @@ class Rake::FileList # a standard emacs style file:linenumber:line message will be printed to # standard out. Returns the number of matched items. # - # source://rake//lib/rake/file_list.rb#293 + # pkg:gem/rake#lib/rake/file_list.rb:293 def egrep(pattern, *options); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def empty?(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def entries(*args, &block); end # Register a list of file name patterns that should be excluded from the @@ -1107,7 +1108,7 @@ class Rake::FileList # If "a.c" is not a file, then ... # FileList['a.c', 'b.c'].exclude("a.*") => ['a.c', 'b.c'] # - # source://rake//lib/rake/file_list.rb#150 + # pkg:gem/rake#lib/rake/file_list.rb:150 def exclude(*patterns, &block); end # Should the given file name be excluded from the list? @@ -1118,21 +1119,19 @@ class Rake::FileList # confusion. If you were using "FileList#exclude?" in your user # code, you will need to update. # - # @return [Boolean] - # - # source://rake//lib/rake/file_list.rb#364 + # pkg:gem/rake#lib/rake/file_list.rb:364 def excluded_from_list?(fn); end # Return a new file list that only contains file names from the current # file list that exist on the file system. # - # source://rake//lib/rake/file_list.rb#320 + # pkg:gem/rake#lib/rake/file_list.rb:320 def existing; end # Modify the current file list so that it contains only file name that # exist on the file system. # - # source://rake//lib/rake/file_list.rb#326 + # pkg:gem/rake#lib/rake/file_list.rb:326 def existing!; end # Return a new FileList with String#ext method applied to @@ -1144,55 +1143,55 @@ class Rake::FileList # # +ext+ is a user added method for the Array class. # - # source://rake//lib/rake/file_list.rb#284 + # pkg:gem/rake#lib/rake/file_list.rb:284 def ext(newext = T.unsafe(nil)); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def fetch(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def fetch_values(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def fill(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def filter(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def filter!(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def filter_map(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def find(*args, &block); end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def find_all(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def find_index(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def first(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def flat_map(*args, &block); end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def flatten(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def flatten!(*args, &block); end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def grep(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def grep_v(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def group_by(*args, &block); end # Return a new FileList with the results of running +gsub+ against each @@ -1202,15 +1201,15 @@ class Rake::FileList # FileList['lib/test/file', 'x/y'].gsub(/\//, "\\") # => ['lib\\test\\file', 'x\\y'] # - # source://rake//lib/rake/file_list.rb#253 + # pkg:gem/rake#lib/rake/file_list.rb:253 def gsub(pat, rep); end # Same as +gsub+ except that the original file list is modified. # - # source://rake//lib/rake/file_list.rb#264 + # pkg:gem/rake#lib/rake/file_list.rb:264 def gsub!(pat, rep); end - # source://rake//lib/rake/file_list.rb#391 + # pkg:gem/rake#lib/rake/file_list.rb:391 def import(array); end # Add file names defined by glob patterns to the file list. If an array @@ -1220,219 +1219,213 @@ class Rake::FileList # file_list.include("*.java", "*.cfg") # file_list.include %w( math.c lib.h *.o ) # - # source://rake//lib/rake/file_list.rb#116 + # pkg:gem/rake#lib/rake/file_list.rb:116 def include(*filenames); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def include?(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def index(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def inject(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def insert(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def inspect(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def intersect?(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def intersection(*args, &block); end # Lie about our class. # - # @return [Boolean] - # - # source://rake//lib/rake/file_list.rb#187 + # pkg:gem/rake#lib/rake/file_list.rb:187 def is_a?(klass); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def join(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def keep_if(*args, &block); end - # Lie about our class. - # - # @return [Boolean] - # - # source://rake//lib/rake/file_list.rb#187 + # pkg:gem/rake#lib/rake/file_list.rb:190 def kind_of?(klass); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def last(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def lazy(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def length(*args, &block); end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def map(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def map!(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def max(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def max_by(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def member?(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def min(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def min_by(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def minmax(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def minmax_by(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def none?(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def one?(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def pack(*args, &block); end # FileList version of partition. Needed because the nested arrays should # be FileLists in this version. # - # source://rake//lib/rake/file_list.rb#334 + # pkg:gem/rake#lib/rake/file_list.rb:334 def partition(&block); end # Apply the pathmap spec to each of the included file names, returning a # new file list with the modified paths. (See String#pathmap for # details.) # - # source://rake//lib/rake/file_list.rb#272 + # pkg:gem/rake#lib/rake/file_list.rb:272 def pathmap(spec = T.unsafe(nil), &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def permutation(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 - def place(*args, &block); end - - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def pop(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def prepend(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def product(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def push(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def rassoc(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def reduce(*args, &block); end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def reject(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def reject!(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def repeated_combination(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def repeated_permutation(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def replace(*args, &block); end # Resolve all the pending adds now. # - # source://rake//lib/rake/file_list.rb#210 + # pkg:gem/rake#lib/rake/file_list.rb:210 def resolve; end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def reverse(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def reverse!(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def reverse_each(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 + def rfind(*args, &block); end + + # pkg:gem/rake#lib/rake/file_list.rb:76 def rindex(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def rotate(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def rotate!(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def sample(*args, &block); end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def select(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def select!(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def shelljoin(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def shift(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def shuffle(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def shuffle!(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def size(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def slice(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def slice!(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def slice_after(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def slice_before(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def slice_when(*args, &block); end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def sort(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def sort!(*args, &block); end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def sort_by(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def sort_by!(*args, &block); end # Return a new FileList with the results of running +sub+ against each @@ -1441,82 +1434,82 @@ class Rake::FileList # Example: # FileList['a.c', 'b.c'].sub(/\.c$/, '.o') => ['a.o', 'b.o'] # - # source://rake//lib/rake/file_list.rb#242 + # pkg:gem/rake#lib/rake/file_list.rb:242 def sub(pat, rep); end # Same as +sub+ except that the original file list is modified. # - # source://rake//lib/rake/file_list.rb#258 + # pkg:gem/rake#lib/rake/file_list.rb:258 def sub!(pat, rep); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def sum(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def take(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def take_while(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def tally(*args, &block); end # Return the internal array object. # - # source://rake//lib/rake/file_list.rb#176 + # pkg:gem/rake#lib/rake/file_list.rb:176 def to_a; end # Return the internal array object. # - # source://rake//lib/rake/file_list.rb#182 + # pkg:gem/rake#lib/rake/file_list.rb:182 def to_ary; end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def to_h(*args, &block); end # Convert a FileList to a string by joining all elements with a space. # - # source://rake//lib/rake/file_list.rb#344 + # pkg:gem/rake#lib/rake/file_list.rb:344 def to_s; end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def to_set(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def transpose(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def union(*args, &block); end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def uniq(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def uniq!(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def unshift(*args, &block); end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def values_at(*args, &block); end - # source://rake//lib/rake/file_list.rb#77 + # pkg:gem/rake#lib/rake/file_list.rb:76 def zip(*args, &block); end - # source://rake//lib/rake/file_list.rb#68 + # pkg:gem/rake#lib/rake/file_list.rb:67 def |(*args, &block); end private # Add matching glob patterns. # - # source://rake//lib/rake/file_list.rb#350 + # pkg:gem/rake#lib/rake/file_list.rb:350 def add_matching(pattern); end - # source://rake//lib/rake/file_list.rb#220 + # pkg:gem/rake#lib/rake/file_list.rb:220 def resolve_add(fn); end - # source://rake//lib/rake/file_list.rb#230 + # pkg:gem/rake#lib/rake/file_list.rb:230 def resolve_exclude; end class << self @@ -1524,14 +1517,14 @@ class Rake::FileList # # FileList.new(*args) # - # source://rake//lib/rake/file_list.rb#400 + # pkg:gem/rake#lib/rake/file_list.rb:400 def [](*args); end # Get a sorted list of files matching the pattern. This method # should be preferred to Dir[pattern] and Dir.glob(pattern) because # the files returned are guaranteed to be sorted. # - # source://rake//lib/rake/file_list.rb#407 + # pkg:gem/rake#lib/rake/file_list.rb:407 def glob(pattern, *args); end end end @@ -1539,36 +1532,36 @@ end # List of array methods (that are not in +Object+) that need to be # delegated. # -# source://rake//lib/rake/file_list.rb#44 +# pkg:gem/rake#lib/rake/file_list.rb:44 Rake::FileList::ARRAY_METHODS = T.let(T.unsafe(nil), Array) -# source://rake//lib/rake/file_list.rb#381 +# pkg:gem/rake#lib/rake/file_list.rb:381 Rake::FileList::DEFAULT_IGNORE_PATTERNS = T.let(T.unsafe(nil), Array) -# source://rake//lib/rake/file_list.rb#387 +# pkg:gem/rake#lib/rake/file_list.rb:387 Rake::FileList::DEFAULT_IGNORE_PROCS = T.let(T.unsafe(nil), Array) -# source://rake//lib/rake/file_list.rb#61 +# pkg:gem/rake#lib/rake/file_list.rb:61 Rake::FileList::DELEGATING_METHODS = T.let(T.unsafe(nil), Array) -# source://rake//lib/rake/file_list.rb#86 +# pkg:gem/rake#lib/rake/file_list.rb:86 Rake::FileList::GLOB_PATTERN = T.let(T.unsafe(nil), Regexp) # List of additional methods that must be delegated. # -# source://rake//lib/rake/file_list.rb#47 +# pkg:gem/rake#lib/rake/file_list.rb:47 Rake::FileList::MUST_DEFINE = T.let(T.unsafe(nil), Array) # List of methods that should not be delegated here (we define special # versions of them explicitly below). # -# source://rake//lib/rake/file_list.rb#51 +# pkg:gem/rake#lib/rake/file_list.rb:51 Rake::FileList::MUST_NOT_DEFINE = T.let(T.unsafe(nil), Array) # List of delegated methods that return new array values which need # wrapping. # -# source://rake//lib/rake/file_list.rb#55 +# pkg:gem/rake#lib/rake/file_list.rb:55 Rake::FileList::SPECIAL_RETURN = T.let(T.unsafe(nil), Array) # A FileTask is a task that includes time based dependencies. If any of a @@ -1576,35 +1569,31 @@ Rake::FileList::SPECIAL_RETURN = T.let(T.unsafe(nil), Array) # represented by this task, then the file must be rebuilt (using the # supplied actions). # -# source://rake//lib/rake/file_task.rb#12 +# pkg:gem/rake#lib/rake/file_task.rb:12 class Rake::FileTask < ::Rake::Task # Is this file task needed? Yes if it doesn't exist, or if its time stamp # is out of date. # - # @return [Boolean] - # - # source://rake//lib/rake/file_task.rb#16 + # pkg:gem/rake#lib/rake/file_task.rb:16 def needed?; end # Time stamp for file task. # - # source://rake//lib/rake/file_task.rb#25 + # pkg:gem/rake#lib/rake/file_task.rb:25 def timestamp; end private # Are there any prerequisites with a later time than the given time stamp? # - # @return [Boolean] - # - # source://rake//lib/rake/file_task.rb#36 + # pkg:gem/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#53 + # pkg:gem/rake#lib/rake/file_task.rb:53 def scope_name(scope, task_name); end end end @@ -1613,7 +1602,7 @@ end # that respond to the verbose and nowrite # commands. # -# source://rake//lib/rake/file_utils_ext.rb#10 +# pkg:gem/rake#lib/rake/file_utils_ext.rb:10 module Rake::FileUtilsExt include ::FileUtils::StreamUtils_ include ::FileUtils @@ -1621,70 +1610,70 @@ module Rake::FileUtilsExt extend ::FileUtils extend ::Rake::FileUtilsExt - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def cd(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def chdir(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def chmod(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def chmod_R(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def chown(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def chown_R(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def copy(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def cp(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def cp_lr(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def cp_r(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def install(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def link(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def ln(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def ln_s(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def ln_sf(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def ln_sr(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def makedirs(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def mkdir(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def mkdir_p(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def mkpath(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def move(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def mv(*args, **options, &block); end # Get/set the nowrite flag controlling output from the FileUtils @@ -1699,51 +1688,49 @@ module Rake::FileUtilsExt # # temporarily to _v_. Return to the # # original value when code is done. # - # source://rake//lib/rake/file_utils_ext.rb#77 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:78 def nowrite(value = T.unsafe(nil)); end # Check that the options do not contain options not listed in # +optdecl+. An ArgumentError exception is thrown if non-declared # options are found. # - # @raise [ArgumentError] - # - # source://rake//lib/rake/file_utils_ext.rb#123 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:124 def rake_check_options(options, *optdecl); end # Send the message to the default rake output (which is $stderr). # - # source://rake//lib/rake/file_utils_ext.rb#116 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:117 def rake_output_message(message); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def remove(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def rm(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def rm_f(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def rm_r(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def rm_rf(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def rmdir(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def rmtree(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def safe_unlink(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def symlink(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 def touch(*args, **options, &block); end # Get/set the verbose flag controlling output from the FileUtils @@ -1758,7 +1745,7 @@ module Rake::FileUtilsExt # # temporarily to _v_. Return to the # # original value when code is done. # - # source://rake//lib/rake/file_utils_ext.rb#53 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:53 def verbose(value = T.unsafe(nil)); end # Use this function to prevent potentially destructive ruby code @@ -1778,132 +1765,119 @@ module Rake::FileUtilsExt # # instead of actually building the project. # - # source://rake//lib/rake/file_utils_ext.rb#107 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:108 def when_writing(msg = T.unsafe(nil)); end class << self - # Returns the value of attribute nowrite_flag. - # - # source://rake//lib/rake/file_utils_ext.rb#14 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:14 def nowrite_flag; end - # Sets the attribute nowrite_flag - # - # @param value the value to set the attribute nowrite_flag to. - # - # source://rake//lib/rake/file_utils_ext.rb#14 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:14 def nowrite_flag=(_arg0); end - # Returns the value of attribute verbose_flag. - # - # source://rake//lib/rake/file_utils_ext.rb#14 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:14 def verbose_flag; end - # Sets the attribute verbose_flag - # - # @param value the value to set the attribute verbose_flag to. - # - # source://rake//lib/rake/file_utils_ext.rb#14 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:14 def verbose_flag=(_arg0); end end end -# source://rake//lib/rake/file_utils_ext.rb#17 +# pkg:gem/rake#lib/rake/file_utils_ext.rb:17 Rake::FileUtilsExt::DEFAULT = T.let(T.unsafe(nil), Object) # InvocationChain tracks the chain of task invocations to detect # circular dependencies. # -# source://rake//lib/rake/invocation_chain.rb#6 +# pkg:gem/rake#lib/rake/invocation_chain.rb:6 class Rake::InvocationChain < ::Rake::LinkedList # Append an invocation to the chain of invocations. It is an error # if the invocation already listed. # - # source://rake//lib/rake/invocation_chain.rb#15 + # pkg:gem/rake#lib/rake/invocation_chain.rb:15 def append(invocation); end # Is the invocation already in the chain? # - # @return [Boolean] - # - # source://rake//lib/rake/invocation_chain.rb#9 + # pkg:gem/rake#lib/rake/invocation_chain.rb:9 def member?(invocation); end # Convert to string, ie: TOP => invocation => invocation # - # source://rake//lib/rake/invocation_chain.rb#23 + # pkg:gem/rake#lib/rake/invocation_chain.rb:23 def to_s; end private - # source://rake//lib/rake/invocation_chain.rb#34 + # pkg:gem/rake#lib/rake/invocation_chain.rb:34 def prefix; end class << self # Class level append. # - # source://rake//lib/rake/invocation_chain.rb#28 + # pkg:gem/rake#lib/rake/invocation_chain.rb:28 def append(invocation, chain); end end end -# source://rake//lib/rake/invocation_chain.rb#55 +# pkg:gem/rake#lib/rake/invocation_chain.rb:55 Rake::InvocationChain::EMPTY = T.let(T.unsafe(nil), Rake::InvocationChain::EmptyInvocationChain) # Null object for an empty chain. # -# source://rake//lib/rake/invocation_chain.rb#39 +# pkg:gem/rake#lib/rake/invocation_chain.rb:39 class Rake::InvocationChain::EmptyInvocationChain < ::Rake::LinkedList::EmptyLinkedList - # source://rake//lib/rake/invocation_chain.rb#46 + # pkg:gem/rake#lib/rake/invocation_chain.rb:46 def append(invocation); end - # @return [Boolean] - # - # source://rake//lib/rake/invocation_chain.rb#42 + # pkg:gem/rake#lib/rake/invocation_chain.rb:42 def member?(obj); end - # source://rake//lib/rake/invocation_chain.rb#50 + # pkg:gem/rake#lib/rake/invocation_chain.rb:50 def to_s; end end -# source://rake//lib/rake/invocation_exception_mixin.rb#3 +# pkg:gem/rake#lib/rake/invocation_exception_mixin.rb:3 module Rake::InvocationExceptionMixin # Return the invocation chain (list of Rake tasks) that were in # effect when this exception was detected by rake. May be null if # no tasks were active. # - # source://rake//lib/rake/invocation_exception_mixin.rb#7 + # pkg:gem/rake#lib/rake/invocation_exception_mixin.rb:7 def chain; end # Set the invocation chain in effect when this exception was # detected. # - # source://rake//lib/rake/invocation_exception_mixin.rb#13 + # pkg:gem/rake#lib/rake/invocation_exception_mixin.rb:13 def chain=(value); end end -# source://rake//lib/rake/late_time.rb#17 +# pkg:gem/rake#lib/rake/late_time.rb:17 Rake::LATE = T.let(T.unsafe(nil), Rake::LateTime) # LateTime is a fake timestamp that occurs _after_ any other time value. # -# source://rake//lib/rake/late_time.rb#4 +# pkg:gem/rake#lib/rake/late_time.rb:4 class Rake::LateTime include ::Comparable include ::Singleton::SingletonInstanceMethods include ::Singleton extend ::Singleton::SingletonClassMethods - # source://rake//lib/rake/late_time.rb#8 + # pkg:gem/rake#lib/rake/late_time.rb:8 def <=>(other); end - # source://rake//lib/rake/late_time.rb#12 + # pkg:gem/rake#lib/rake/late_time.rb:12 def to_s; end class << self private + # pkg:gem/rake#lib/rake/late_time.rb:6 def allocate; end + + # pkg:gem/rake#lib/rake/late_time.rb:6 def new(*_arg0); end end end @@ -1911,29 +1885,27 @@ end # Polylithic linked list structure used to implement several data # structures in Rake. # -# source://rake//lib/rake/linked_list.rb#6 +# pkg:gem/rake#lib/rake/linked_list.rb:6 class Rake::LinkedList include ::Enumerable - # @return [LinkedList] a new instance of LinkedList - # - # source://rake//lib/rake/linked_list.rb#84 + # pkg:gem/rake#lib/rake/linked_list.rb:84 def initialize(head, tail = T.unsafe(nil)); end # Lists are structurally equivalent. # - # source://rake//lib/rake/linked_list.rb#25 + # pkg:gem/rake#lib/rake/linked_list.rb:25 def ==(other); end # Polymorphically add a new element to the head of a list. The # type of head node will be the same list type as the tail. # - # source://rake//lib/rake/linked_list.rb#12 + # pkg:gem/rake#lib/rake/linked_list.rb:12 def conj(item); end # For each item in the list. # - # source://rake//lib/rake/linked_list.rb#48 + # pkg:gem/rake#lib/rake/linked_list.rb:48 def each; end # Is the list empty? @@ -1941,51 +1913,45 @@ class Rake::LinkedList # object not empty by default # You should consider overriding this method if you implement your own .make method # - # @return [Boolean] - # - # source://rake//lib/rake/linked_list.rb#20 + # pkg:gem/rake#lib/rake/linked_list.rb:20 def empty?; end - # Returns the value of attribute head. - # - # source://rake//lib/rake/linked_list.rb#8 + # pkg:gem/rake#lib/rake/linked_list.rb:8 def head; end # Same as +to_s+, but with inspected items. # - # source://rake//lib/rake/linked_list.rb#42 + # pkg:gem/rake#lib/rake/linked_list.rb:42 def inspect; end - # Returns the value of attribute tail. - # - # source://rake//lib/rake/linked_list.rb#8 + # pkg:gem/rake#lib/rake/linked_list.rb:8 def tail; end # Convert to string: LL(item, item...) # - # source://rake//lib/rake/linked_list.rb#36 + # pkg:gem/rake#lib/rake/linked_list.rb:36 def to_s; end class << self # Cons a new head onto the tail list. # - # source://rake//lib/rake/linked_list.rb#73 + # pkg:gem/rake#lib/rake/linked_list.rb:73 def cons(head, tail); end # The standard empty list class for the given LinkedList class. # - # source://rake//lib/rake/linked_list.rb#78 + # pkg:gem/rake#lib/rake/linked_list.rb:78 def empty; end # Make a list out of the given arguments. This method is # polymorphic # - # source://rake//lib/rake/linked_list.rb#59 + # pkg:gem/rake#lib/rake/linked_list.rb:59 def make(*args); end end end -# source://rake//lib/rake/linked_list.rb#110 +# pkg:gem/rake#lib/rake/linked_list.rb:110 Rake::LinkedList::EMPTY = T.let(T.unsafe(nil), Rake::LinkedList::EmptyLinkedList) # Represent an empty list, using the Null Object Pattern. @@ -1995,20 +1961,16 @@ Rake::LinkedList::EMPTY = T.let(T.unsafe(nil), Rake::LinkedList::EmptyLinkedList # instance variable @parent to the associated list class (this # allows conj, cons and make to work polymorphically). # -# source://rake//lib/rake/linked_list.rb#95 +# pkg:gem/rake#lib/rake/linked_list.rb:95 class Rake::LinkedList::EmptyLinkedList < ::Rake::LinkedList - # @return [EmptyLinkedList] a new instance of EmptyLinkedList - # - # source://rake//lib/rake/linked_list.rb#98 + # pkg:gem/rake#lib/rake/linked_list.rb:98 def initialize; end - # @return [Boolean] - # - # source://rake//lib/rake/linked_list.rb#101 + # pkg:gem/rake#lib/rake/linked_list.rb:101 def empty?; end class << self - # source://rake//lib/rake/linked_list.rb#105 + # pkg:gem/rake#lib/rake/linked_list.rb:105 def cons(head, tail); end end end @@ -2016,60 +1978,183 @@ end # Same as a regular task, but the immediate prerequisites are done in # parallel using Ruby threads. # -# source://rake//lib/rake/multi_task.rb#7 +# pkg:gem/rake#lib/rake/multi_task.rb:7 class Rake::MultiTask < ::Rake::Task private - # source://rake//lib/rake/multi_task.rb#10 + # pkg:gem/rake#lib/rake/multi_task.rb:10 def invoke_prerequisites(task_args, invocation_chain); end end # The NameSpace class will lookup task names in the scope defined by a # +namespace+ command. # -# source://rake//lib/rake/name_space.rb#6 +# pkg:gem/rake#lib/rake/name_space.rb:6 class Rake::NameSpace # Create a namespace lookup object using the given task manager # and the list of scopes. # - # @return [NameSpace] a new instance of NameSpace - # - # source://rake//lib/rake/name_space.rb#12 + # pkg:gem/rake#lib/rake/name_space.rb:12 def initialize(task_manager, scope_list); end # Lookup a task named +name+ in the namespace. # - # source://rake//lib/rake/name_space.rb#20 + # pkg:gem/rake#lib/rake/name_space.rb:20 def [](name); end # The scope of the namespace (a LinkedList) # - # source://rake//lib/rake/name_space.rb#27 + # pkg:gem/rake#lib/rake/name_space.rb:27 def scope; end # Return the list of tasks defined in this and nested namespaces. # - # source://rake//lib/rake/name_space.rb#34 + # pkg:gem/rake#lib/rake/name_space.rb:34 def tasks; end end +# Options used by the Rake command line application. +# +# pkg:gem/rake#lib/rake/options.rb:8 +class Rake::Options + # pkg:gem/rake#lib/rake/options.rb:9 + def always_multitask; end + + # pkg:gem/rake#lib/rake/options.rb:9 + def always_multitask=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:10 + def backtrace; end + + # pkg:gem/rake#lib/rake/options.rb:10 + def backtrace=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:11 + def build_all; end + + # pkg:gem/rake#lib/rake/options.rb:11 + def build_all=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:12 + def dryrun; end + + # pkg:gem/rake#lib/rake/options.rb:12 + def dryrun=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:13 + def ignore_deprecate; end + + # pkg:gem/rake#lib/rake/options.rb:13 + def ignore_deprecate=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:14 + def ignore_system; end + + # pkg:gem/rake#lib/rake/options.rb:14 + def ignore_system=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:15 + def job_stats; end + + # pkg:gem/rake#lib/rake/options.rb:15 + def job_stats=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:16 + def load_system; end + + # pkg:gem/rake#lib/rake/options.rb:16 + def load_system=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:17 + def nosearch; end + + # pkg:gem/rake#lib/rake/options.rb:17 + def nosearch=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:18 + def rakelib; end + + # pkg:gem/rake#lib/rake/options.rb:18 + def rakelib=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:19 + def show_all_tasks; end + + # pkg:gem/rake#lib/rake/options.rb:19 + def show_all_tasks=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:20 + def show_prereqs; end + + # pkg:gem/rake#lib/rake/options.rb:20 + def show_prereqs=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:21 + def show_task_pattern; end + + # pkg:gem/rake#lib/rake/options.rb:21 + def show_task_pattern=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:22 + def show_tasks; end + + # pkg:gem/rake#lib/rake/options.rb:22 + def show_tasks=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:23 + def silent; end + + # pkg:gem/rake#lib/rake/options.rb:23 + def silent=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:24 + def suppress_backtrace_pattern; end + + # pkg:gem/rake#lib/rake/options.rb:24 + def suppress_backtrace_pattern=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:25 + def thread_pool_size; end + + # pkg:gem/rake#lib/rake/options.rb:25 + def thread_pool_size=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:26 + def trace; end + + # pkg:gem/rake#lib/rake/options.rb:26 + def trace=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:27 + def trace_output; end + + # pkg:gem/rake#lib/rake/options.rb:27 + def trace_output=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:28 + def trace_rules; end + + # pkg:gem/rake#lib/rake/options.rb:28 + def trace_rules=(_arg0); end +end + # Include PrivateReader to use +private_reader+. # -# source://rake//lib/rake/private_reader.rb#5 +# pkg:gem/rake#lib/rake/private_reader.rb:5 module Rake::PrivateReader mixes_in_class_methods ::Rake::PrivateReader::ClassMethods class << self - # source://rake//lib/rake/private_reader.rb#7 + # pkg:gem/rake#lib/rake/private_reader.rb:7 def included(base); end end end -# source://rake//lib/rake/private_reader.rb#11 +# pkg:gem/rake#lib/rake/private_reader.rb:11 module Rake::PrivateReader::ClassMethods # Declare a list of private accessors # - # source://rake//lib/rake/private_reader.rb#14 + # pkg:gem/rake#lib/rake/private_reader.rb:14 def private_reader(*names); end end @@ -2080,19 +2165,17 @@ end # # Used by ThreadPool. # -# source://rake//lib/rake/promise.rb#11 +# pkg:gem/rake#lib/rake/promise.rb:11 class Rake::Promise # Create a promise to do the chore specified by the block. # - # @return [Promise] a new instance of Promise - # - # source://rake//lib/rake/promise.rb#17 + # pkg:gem/rake#lib/rake/promise.rb:17 def initialize(args, &block); end - # source://rake//lib/rake/promise.rb#14 + # pkg:gem/rake#lib/rake/promise.rb:14 def recorder; end - # source://rake//lib/rake/promise.rb#14 + # pkg:gem/rake#lib/rake/promise.rb:14 def recorder=(_arg0); end # Return the value of this promise. @@ -2100,134 +2183,120 @@ class Rake::Promise # If the promised chore is not yet complete, then do the work # synchronously. We will wait. # - # source://rake//lib/rake/promise.rb#29 + # pkg:gem/rake#lib/rake/promise.rb:29 def value; end # If no one else is working this promise, go ahead and do the chore. # - # source://rake//lib/rake/promise.rb#42 + # pkg:gem/rake#lib/rake/promise.rb:42 def work; end private # Perform the chore promised # - # source://rake//lib/rake/promise.rb#57 + # pkg:gem/rake#lib/rake/promise.rb:57 def chore; end # Are we done with the promise # - # @return [Boolean] - # - # source://rake//lib/rake/promise.rb#83 + # pkg:gem/rake#lib/rake/promise.rb:83 def complete?; end # free up these items for the GC # - # source://rake//lib/rake/promise.rb#88 + # pkg:gem/rake#lib/rake/promise.rb:88 def discard; end # Did the promise throw an error # - # @return [Boolean] - # - # source://rake//lib/rake/promise.rb#78 + # pkg:gem/rake#lib/rake/promise.rb:78 def error?; end # Do we have a result for the promise # - # @return [Boolean] - # - # source://rake//lib/rake/promise.rb#73 + # pkg:gem/rake#lib/rake/promise.rb:73 def result?; end # Record execution statistics if there is a recorder # - # source://rake//lib/rake/promise.rb#94 + # pkg:gem/rake#lib/rake/promise.rb:94 def stat(*args); end end -# source://rake//lib/rake/promise.rb#12 +# pkg:gem/rake#lib/rake/promise.rb:12 Rake::Promise::NOT_SET = T.let(T.unsafe(nil), Object) # Exit status class for times the system just gives us a nil. # -# source://rake//lib/rake/pseudo_status.rb#6 +# pkg:gem/rake#lib/rake/pseudo_status.rb:6 class Rake::PseudoStatus - # @return [PseudoStatus] a new instance of PseudoStatus - # - # source://rake//lib/rake/pseudo_status.rb#9 + # pkg:gem/rake#lib/rake/pseudo_status.rb:9 def initialize(code = T.unsafe(nil)); end - # source://rake//lib/rake/pseudo_status.rb#17 + # pkg:gem/rake#lib/rake/pseudo_status.rb:17 def >>(n); end - # @return [Boolean] - # - # source://rake//lib/rake/pseudo_status.rb#25 + # pkg:gem/rake#lib/rake/pseudo_status.rb:25 def exited?; end - # source://rake//lib/rake/pseudo_status.rb#7 + # pkg:gem/rake#lib/rake/pseudo_status.rb:7 def exitstatus; end - # @return [Boolean] - # - # source://rake//lib/rake/pseudo_status.rb#21 + # pkg:gem/rake#lib/rake/pseudo_status.rb:21 def stopped?; end - # source://rake//lib/rake/pseudo_status.rb#13 + # pkg:gem/rake#lib/rake/pseudo_status.rb:13 def to_i; end end # Error indicating a recursion overflow error in task selection. # -# source://rake//lib/rake/rule_recursion_overflow_error.rb#5 +# pkg:gem/rake#lib/rake/rule_recursion_overflow_error.rb:5 class Rake::RuleRecursionOverflowError < ::StandardError - # @return [RuleRecursionOverflowError] a new instance of RuleRecursionOverflowError - # - # source://rake//lib/rake/rule_recursion_overflow_error.rb#6 + # pkg:gem/rake#lib/rake/rule_recursion_overflow_error.rb:6 def initialize(*args); end - # source://rake//lib/rake/rule_recursion_overflow_error.rb#11 + # pkg:gem/rake#lib/rake/rule_recursion_overflow_error.rb:11 def add_target(target); end - # source://rake//lib/rake/rule_recursion_overflow_error.rb#15 + # pkg:gem/rake#lib/rake/rule_recursion_overflow_error.rb:15 def message; end end -# source://rake//lib/rake/scope.rb#3 +# pkg:gem/rake#lib/rake/scope.rb:3 class Rake::Scope < ::Rake::LinkedList # Path for the scope. # - # source://rake//lib/rake/scope.rb#6 + # pkg:gem/rake#lib/rake/scope.rb:6 def path; end # Path for the scope + the named path. # - # source://rake//lib/rake/scope.rb#11 + # pkg:gem/rake#lib/rake/scope.rb:11 def path_with_task_name(task_name); end # Trim +n+ innermost scope levels from the scope. In no case will # this trim beyond the toplevel scope. # - # source://rake//lib/rake/scope.rb#17 + # pkg:gem/rake#lib/rake/scope.rb:17 def trim(n); end end # Singleton null object for an empty scope. # -# source://rake//lib/rake/scope.rb#41 +# pkg:gem/rake#lib/rake/scope.rb:41 Rake::Scope::EMPTY = T.let(T.unsafe(nil), Rake::Scope::EmptyScope) # Scope lists always end with an EmptyScope object. See Null # Object Pattern) # -# source://rake//lib/rake/scope.rb#28 +# pkg:gem/rake#lib/rake/scope.rb:28 class Rake::Scope::EmptyScope < ::Rake::LinkedList::EmptyLinkedList - # source://rake//lib/rake/scope.rb#31 + # pkg:gem/rake#lib/rake/scope.rb:31 def path; end - # source://rake//lib/rake/scope.rb#35 + # pkg:gem/rake#lib/rake/scope.rb:35 def path_with_task_name(task_name); end end @@ -2239,227 +2308,223 @@ end # Tasks are not usually created directly using the new method, but rather # use the +file+ and +task+ convenience methods. # -# source://rake//lib/rake/task.rb#15 +# pkg:gem/rake#lib/rake/task.rb:15 class Rake::Task # Create a task named +task_name+ with no actions or prerequisites. Use # +enhance+ to add actions and prerequisites. # - # @return [Task] a new instance of Task - # - # source://rake//lib/rake/task.rb#99 + # pkg:gem/rake#lib/rake/task.rb:99 def initialize(task_name, app); end # List of actions attached to a task. # - # source://rake//lib/rake/task.rb#24 + # pkg:gem/rake#lib/rake/task.rb:24 def actions; end # Add a description to the task. The description can consist of an option # argument list (enclosed brackets) and an optional comment. # - # source://rake//lib/rake/task.rb#298 + # pkg:gem/rake#lib/rake/task.rb:298 def add_description(description); end # List of all unique prerequisite tasks including prerequisite tasks' # prerequisites. # Includes self when cyclic dependencies are found. # - # source://rake//lib/rake/task.rb#77 + # pkg:gem/rake#lib/rake/task.rb:77 def all_prerequisite_tasks; end # Has this task already been invoked? Already invoked tasks # will be skipped unless you reenable them. # - # source://rake//lib/rake/task.rb#39 + # pkg:gem/rake#lib/rake/task.rb:39 def already_invoked; end # Application owning this task. # - # source://rake//lib/rake/task.rb#27 + # pkg:gem/rake#lib/rake/task.rb:27 def application; end # Application owning this task. # - # source://rake//lib/rake/task.rb#27 + # pkg:gem/rake#lib/rake/task.rb:27 def application=(_arg0); end # Argument description (nil if none). # - # source://rake//lib/rake/task.rb#136 + # pkg:gem/rake#lib/rake/task.rb:136 def arg_description; end # Name of arguments for this task. # - # source://rake//lib/rake/task.rb#141 + # pkg:gem/rake#lib/rake/task.rb:141 def arg_names; end # Clear the existing prerequisites, actions, comments, and arguments of a rake task. # - # source://rake//lib/rake/task.rb#153 + # pkg:gem/rake#lib/rake/task.rb:153 def clear; end # Clear the existing actions on a rake task. # - # source://rake//lib/rake/task.rb#168 + # pkg:gem/rake#lib/rake/task.rb:168 def clear_actions; end # Clear the existing arguments on a rake task. # - # source://rake//lib/rake/task.rb#180 + # pkg:gem/rake#lib/rake/task.rb:180 def clear_args; end # Clear the existing comments on a rake task. # - # source://rake//lib/rake/task.rb#174 + # pkg:gem/rake#lib/rake/task.rb:174 def clear_comments; end # Clear the existing prerequisites of a rake task. # - # source://rake//lib/rake/task.rb#162 + # pkg:gem/rake#lib/rake/task.rb:162 def clear_prerequisites; end # First line (or sentence) of all comments. Multiple comments are # separated by a "/". # - # source://rake//lib/rake/task.rb#322 + # pkg:gem/rake#lib/rake/task.rb:322 def comment; end - # source://rake//lib/rake/task.rb#304 + # pkg:gem/rake#lib/rake/task.rb:304 def comment=(comment); end # Enhance a task with prerequisites or actions. Returns self. # - # source://rake//lib/rake/task.rb#115 + # pkg:gem/rake#lib/rake/task.rb:115 def enhance(deps = T.unsafe(nil), &block); end # Execute the actions associated with this task. # - # source://rake//lib/rake/task.rb#270 + # pkg:gem/rake#lib/rake/task.rb:270 def execute(args = T.unsafe(nil)); end # Full collection of comments. Multiple comments are separated by # newlines. # - # source://rake//lib/rake/task.rb#316 + # pkg:gem/rake#lib/rake/task.rb:316 def full_comment; end - # source://rake//lib/rake/task.rb#46 + # pkg:gem/rake#lib/rake/task.rb:46 def inspect; end # Return a string describing the internal state of a task. Useful for # debugging. # - # source://rake//lib/rake/task.rb#354 + # pkg:gem/rake#lib/rake/task.rb:354 def investigation; end # Invoke the task if it is needed. Prerequisites are invoked first. # - # source://rake//lib/rake/task.rb#186 + # pkg:gem/rake#lib/rake/task.rb:186 def invoke(*args); end # Invoke all the prerequisites of a task. # - # source://rake//lib/rake/task.rb#237 + # pkg:gem/rake#lib/rake/task.rb:237 def invoke_prerequisites(task_args, invocation_chain); end # Invoke all the prerequisites of a task in parallel. # - # source://rake//lib/rake/task.rb#249 + # pkg:gem/rake#lib/rake/task.rb:249 def invoke_prerequisites_concurrently(task_args, invocation_chain); end # File/Line locations of each of the task definitions for this # task (only valid if the task was defined with the detect # location option set). # - # source://rake//lib/rake/task.rb#35 + # pkg:gem/rake#lib/rake/task.rb:35 def locations; end # Name of the task, including any namespace qualifiers. # - # source://rake//lib/rake/task.rb#122 + # pkg:gem/rake#lib/rake/task.rb:122 def name; end # Name of task with argument list description. # - # source://rake//lib/rake/task.rb#127 + # pkg:gem/rake#lib/rake/task.rb:127 def name_with_args; end # Is this task needed? # - # @return [Boolean] - # - # source://rake//lib/rake/task.rb#286 + # pkg:gem/rake#lib/rake/task.rb:286 def needed?; end # List of order only prerequisites for a task. # - # source://rake//lib/rake/task.rb#21 + # pkg:gem/rake#lib/rake/task.rb:21 def order_only_prerequisites; end - # List of prerequisites for a task. - # - # source://rake//lib/rake/task.rb#17 + # pkg:gem/rake#lib/rake/task.rb:18 def prereqs; end # List of prerequisite tasks # - # source://rake//lib/rake/task.rb#61 + # pkg:gem/rake#lib/rake/task.rb:61 def prerequisite_tasks; end # List of prerequisites for a task. # - # source://rake//lib/rake/task.rb#17 + # pkg:gem/rake#lib/rake/task.rb:17 def prerequisites; end # Reenable the task, allowing its tasks to be executed if the task # is invoked again. # - # source://rake//lib/rake/task.rb#147 + # pkg:gem/rake#lib/rake/task.rb:147 def reenable; end # Array of nested namespaces names used for task lookup by this task. # - # source://rake//lib/rake/task.rb#30 + # pkg:gem/rake#lib/rake/task.rb:30 def scope; end # Set the names of the arguments for this task. +args+ should be # an array of symbols, one for each argument name. # - # source://rake//lib/rake/task.rb#348 + # pkg:gem/rake#lib/rake/task.rb:348 def set_arg_names(args); end # First source from a rule (nil if no sources) # - # source://rake//lib/rake/task.rb#93 + # pkg:gem/rake#lib/rake/task.rb:93 def source; end - # source://rake//lib/rake/task.rb#52 + # List of sources for task. + # + # pkg:gem/rake#lib/rake/task.rb:52 def sources; end # List of sources for task. # - # source://rake//lib/rake/task.rb#51 + # pkg:gem/rake#lib/rake/task.rb:51 def sources=(_arg0); end # Timestamp for this task. Basic tasks return the current time for their # time stamp. Other tasks can be more sophisticated. # - # source://rake//lib/rake/task.rb#292 + # pkg:gem/rake#lib/rake/task.rb:292 def timestamp; end # Return task name # - # source://rake//lib/rake/task.rb#42 + # pkg:gem/rake#lib/rake/task.rb:42 def to_s; end # Add order only dependencies. # - # source://rake//lib/rake/task.rb#379 + # pkg:gem/rake#lib/rake/task.rb:379 def |(deps); end protected - # source://rake//lib/rake/task.rb#83 + # pkg:gem/rake#lib/rake/task.rb:83 def collect_prerequisites(seen); end # Same as invoke, but explicitly pass a call chain to detect @@ -2469,36 +2534,36 @@ class Rake::Task # one in parallel, they will all fail if the first execution of # this task fails. # - # source://rake//lib/rake/task.rb#197 + # pkg:gem/rake#lib/rake/task.rb:197 def invoke_with_call_chain(task_args, invocation_chain); end private - # source://rake//lib/rake/task.rb#229 + # pkg:gem/rake#lib/rake/task.rb:229 def add_chain_to(exception, new_chain); end - # source://rake//lib/rake/task.rb#308 + # pkg:gem/rake#lib/rake/task.rb:308 def add_comment(comment); end # Get the first sentence in a string. The sentence is terminated # by the first period, exclamation mark, or the end of the line. # Decimal points do not count as periods. # - # source://rake//lib/rake/task.rb#341 + # pkg:gem/rake#lib/rake/task.rb:341 def first_sentence(string); end # Format the trace flags for display. # - # source://rake//lib/rake/task.rb#261 + # pkg:gem/rake#lib/rake/task.rb:261 def format_trace_flags; end - # source://rake//lib/rake/task.rb#65 + # pkg:gem/rake#lib/rake/task.rb:65 def lookup_prerequisite(prerequisite_name); end # Transform the list of comments as specified by the block and # join with the separator. # - # source://rake//lib/rake/task.rb#328 + # pkg:gem/rake#lib/rake/task.rb:328 def transform_comments(separator, &block); end class << self @@ -2507,192 +2572,174 @@ class Rake::Task # found, but an existing file matches the task name, assume it is a file # task with no dependencies or actions. # - # source://rake//lib/rake/task.rb#404 + # pkg:gem/rake#lib/rake/task.rb:404 def [](task_name); end # Clear the task list. This cause rake to immediately forget all the # tasks that have been assigned. (Normally used in the unit tests.) # - # source://rake//lib/rake/task.rb#391 + # pkg:gem/rake#lib/rake/task.rb:391 def clear; end # Define a rule for synthesizing tasks. # - # source://rake//lib/rake/task.rb#421 + # pkg:gem/rake#lib/rake/task.rb:421 def create_rule(*args, &block); end # Define a task given +args+ and an option block. If a rule with the # given name already exists, the prerequisites and actions are added to # the existing task. Returns the defined task. # - # source://rake//lib/rake/task.rb#416 + # pkg:gem/rake#lib/rake/task.rb:416 def define_task(*args, &block); end # Format dependencies parameter to pass to task. # - # source://rake//lib/rake/task.rb#373 + # pkg:gem/rake#lib/rake/task.rb:373 def format_deps(deps); end # Apply the scope to the task name according to the rules for # this kind of task. Generic tasks will accept the scope as # part of the name. # - # source://rake//lib/rake/task.rb#428 + # pkg:gem/rake#lib/rake/task.rb:428 def scope_name(scope, task_name); end # TRUE if the task name is already defined. # - # @return [Boolean] - # - # source://rake//lib/rake/task.rb#409 + # pkg:gem/rake#lib/rake/task.rb:409 def task_defined?(task_name); end # List of all defined tasks. # - # source://rake//lib/rake/task.rb#396 + # pkg:gem/rake#lib/rake/task.rb:396 def tasks; end end end # Error indicating an ill-formed task declaration. # -# source://rake//lib/rake/task_argument_error.rb#5 +# pkg:gem/rake#lib/rake/task_argument_error.rb:5 class Rake::TaskArgumentError < ::ArgumentError; end # TaskArguments manage the arguments passed to a task. # -# source://rake//lib/rake/task_arguments.rb#7 +# pkg:gem/rake#lib/rake/task_arguments.rb:7 class Rake::TaskArguments include ::Enumerable # Create a TaskArgument object with a list of argument +names+ and a set # of associated +values+. +parent+ is the parent argument object. # - # @return [TaskArguments] a new instance of TaskArguments - # - # source://rake//lib/rake/task_arguments.rb#15 + # pkg:gem/rake#lib/rake/task_arguments.rb:15 def initialize(names, values, parent = T.unsafe(nil)); end # Find an argument value by name or index. # - # source://rake//lib/rake/task_arguments.rb#44 + # pkg:gem/rake#lib/rake/task_arguments.rb:44 def [](index); end + # pkg:gem/rake#lib/rake/task_arguments.rb:97 + def deconstruct_keys(keys); end + # Enumerates the arguments and their values # - # source://rake//lib/rake/task_arguments.rb#56 + # pkg:gem/rake#lib/rake/task_arguments.rb:56 def each(&block); end # Retrieve the list of values not associated with named arguments # - # source://rake//lib/rake/task_arguments.rb#32 + # pkg:gem/rake#lib/rake/task_arguments.rb:32 def extras; end - # source://rake//lib/rake/task_arguments.rb#93 + # pkg:gem/rake#lib/rake/task_arguments.rb:93 def fetch(*args, &block); end # Returns true if +key+ is one of the arguments # - # @return [Boolean] - # - # source://rake//lib/rake/task_arguments.rb#88 + # pkg:gem/rake#lib/rake/task_arguments.rb:88 def has_key?(key); end - # source://rake//lib/rake/task_arguments.rb#79 + # pkg:gem/rake#lib/rake/task_arguments.rb:79 def inspect; end - # Returns true if +key+ is one of the arguments - # - # @return [Boolean] - # - # source://rake//lib/rake/task_arguments.rb#88 + # pkg:gem/rake#lib/rake/task_arguments.rb:91 def key?(key); end # Returns the value of the given argument via method_missing # - # source://rake//lib/rake/task_arguments.rb#66 + # pkg:gem/rake#lib/rake/task_arguments.rb:66 def method_missing(sym, *args); end # Argument names # - # source://rake//lib/rake/task_arguments.rb#11 + # pkg:gem/rake#lib/rake/task_arguments.rb:11 def names; end # Create a new argument scope using the prerequisite argument # names. # - # source://rake//lib/rake/task_arguments.rb#38 + # pkg:gem/rake#lib/rake/task_arguments.rb:38 def new_scope(names); end # Retrieve the complete array of sequential values # - # source://rake//lib/rake/task_arguments.rb#27 + # pkg:gem/rake#lib/rake/task_arguments.rb:27 def to_a; end # Returns a Hash of arguments and their values # - # source://rake//lib/rake/task_arguments.rb#71 + # pkg:gem/rake#lib/rake/task_arguments.rb:71 def to_hash; end - # source://rake//lib/rake/task_arguments.rb#75 + # pkg:gem/rake#lib/rake/task_arguments.rb:75 def to_s; end # Extracts the argument values at +keys+ # - # source://rake//lib/rake/task_arguments.rb#61 + # pkg:gem/rake#lib/rake/task_arguments.rb:61 def values_at(*keys); end # Specify a hash of default values for task arguments. Use the # defaults only if there is no specific value for the given # argument. # - # source://rake//lib/rake/task_arguments.rb#51 + # pkg:gem/rake#lib/rake/task_arguments.rb:51 def with_defaults(defaults); end protected - # source://rake//lib/rake/task_arguments.rb#99 + # pkg:gem/rake#lib/rake/task_arguments.rb:103 def lookup(name); end end -# Base class for Task Libraries. -# -# source://rake//lib/rake/tasklib.rb#7 -class Rake::TaskLib - include ::Rake::Cloneable - include ::FileUtils::StreamUtils_ - include ::FileUtils - include ::Rake::FileUtilsExt - include ::Rake::DSL -end - # The TaskManager module is a mixin for managing tasks. # -# source://rake//lib/rake/task_manager.rb#5 +# pkg:gem/rake#lib/rake/task_manager.rb:5 module Rake::TaskManager - # source://rake//lib/rake/task_manager.rb#9 + # pkg:gem/rake#lib/rake/task_manager.rb:9 def initialize; end # Find a matching task for +task_name+. # - # source://rake//lib/rake/task_manager.rb#54 + # pkg:gem/rake#lib/rake/task_manager.rb:54 def [](task_name, scopes = T.unsafe(nil)); end # Clear all tasks in this application. # - # source://rake//lib/rake/task_manager.rb#182 + # pkg:gem/rake#lib/rake/task_manager.rb:182 def clear; end - # source://rake//lib/rake/task_manager.rb#17 + # pkg:gem/rake#lib/rake/task_manager.rb:17 def create_rule(*args, &block); end # Return the list of scope names currently active in the task # manager. # - # source://rake//lib/rake/task_manager.rb#222 + # pkg:gem/rake#lib/rake/task_manager.rb:222 def current_scope; end - # source://rake//lib/rake/task_manager.rb#23 + # pkg:gem/rake#lib/rake/task_manager.rb:23 def define_task(task_class, *args, &block); end # If a rule can be found that matches the task name, enhance the @@ -2700,35 +2747,35 @@ module Rake::TaskManager # source attribute of the task appropriately for the rule. Return # the enhanced task or nil of no rule was found. # - # source://rake//lib/rake/task_manager.rb#151 + # pkg:gem/rake#lib/rake/task_manager.rb:151 def enhance_with_matching_rule(task_name, level = T.unsafe(nil)); end - # source://rake//lib/rake/task_manager.rb#68 + # pkg:gem/rake#lib/rake/task_manager.rb:68 def generate_did_you_mean_suggestions(task_name); end - # source://rake//lib/rake/task_manager.rb#62 + # pkg:gem/rake#lib/rake/task_manager.rb:62 def generate_message_for_undefined_task(task_name); end # Evaluate the block in a nested namespace named +name+. Create # an anonymous namespace if +name+ is nil. # - # source://rake//lib/rake/task_manager.rb#228 + # pkg:gem/rake#lib/rake/task_manager.rb:228 def in_namespace(name); end # Lookup a task. Return an existing task if found, otherwise # create a task of the current type. # - # source://rake//lib/rake/task_manager.rb#49 + # pkg:gem/rake#lib/rake/task_manager.rb:49 def intern(task_class, task_name); end # Track the last comment made in the Rakefile. # - # source://rake//lib/rake/task_manager.rb#7 + # pkg:gem/rake#lib/rake/task_manager.rb:7 def last_description; end # Track the last comment made in the Rakefile. # - # source://rake//lib/rake/task_manager.rb#7 + # pkg:gem/rake#lib/rake/task_manager.rb:7 def last_description=(_arg0); end # Lookup a task, using scope and the scope hints in the task name. @@ -2737,65 +2784,65 @@ module Rake::TaskManager # are recognized. If no scope argument is supplied, use the # current scope. Return nil if the task cannot be found. # - # source://rake//lib/rake/task_manager.rb#192 + # pkg:gem/rake#lib/rake/task_manager.rb:192 def lookup(task_name, initial_scope = T.unsafe(nil)); end # Resolve the arguments for a task/rule. Returns a tuple of # [task_name, arg_name_list, prerequisites, order_only_prerequisites]. # - # source://rake//lib/rake/task_manager.rb#88 + # pkg:gem/rake#lib/rake/task_manager.rb:88 def resolve_args(args); end - # source://rake//lib/rake/task_manager.rb#81 + # pkg:gem/rake#lib/rake/task_manager.rb:81 def synthesize_file_task(task_name); end # List of all defined tasks in this application. # - # source://rake//lib/rake/task_manager.rb#168 + # pkg:gem/rake#lib/rake/task_manager.rb:168 def tasks; end # List of all the tasks defined in the given scope (and its # sub-scopes). # - # source://rake//lib/rake/task_manager.rb#174 + # pkg:gem/rake#lib/rake/task_manager.rb:174 def tasks_in_scope(scope); end private # Add a location to the locations field of the given task. # - # source://rake//lib/rake/task_manager.rb#241 + # pkg:gem/rake#lib/rake/task_manager.rb:241 def add_location(task); end # Attempt to create a rule given the list of prerequisites. # - # source://rake//lib/rake/task_manager.rb#271 + # pkg:gem/rake#lib/rake/task_manager.rb:271 def attempt_rule(task_name, task_pattern, args, extensions, block, level); end # Find the location that called into the dsl layer. # - # source://rake//lib/rake/task_manager.rb#248 + # pkg:gem/rake#lib/rake/task_manager.rb:248 def find_location; end # Generate an anonymous namespace name. # - # source://rake//lib/rake/task_manager.rb#259 + # pkg:gem/rake#lib/rake/task_manager.rb:259 def generate_name; end # Return the current description, clearing it in the process. # - # source://rake//lib/rake/task_manager.rb#319 - def get_description(task); end + # pkg:gem/rake#lib/rake/task_manager.rb:321 + def get_description; end # Lookup the task name # - # source://rake//lib/rake/task_manager.rb#208 + # pkg:gem/rake#lib/rake/task_manager.rb:208 def lookup_in_scope(name, scope); end # Make a list of sources from the list of file name extensions / # translation procs. # - # source://rake//lib/rake/task_manager.rb#293 + # pkg:gem/rake#lib/rake/task_manager.rb:293 def make_sources(task_name, task_pattern, extensions); end # Resolve task arguments for a task or rule when there are @@ -2809,7 +2856,7 @@ module Rake::TaskManager # task :t, [a] => [:d] # task :t, [a] => [:d], order_only: [:e] # - # source://rake//lib/rake/task_manager.rb#127 + # pkg:gem/rake#lib/rake/task_manager.rb:127 def resolve_args_with_dependencies(args, hash); end # Resolve task arguments for a task or rule when there are no @@ -2820,57 +2867,53 @@ module Rake::TaskManager # task :t # task :t, [:a] # - # source://rake//lib/rake/task_manager.rb#105 + # pkg:gem/rake#lib/rake/task_manager.rb:105 def resolve_args_without_dependencies(args); end - # source://rake//lib/rake/task_manager.rb#265 + # pkg:gem/rake#lib/rake/task_manager.rb:265 def trace_rule(level, message); end class << self - # source://rake//lib/rake/task_manager.rb#326 + # pkg:gem/rake#lib/rake/task_manager.rb:328 def record_task_metadata; end - # source://rake//lib/rake/task_manager.rb#326 + # pkg:gem/rake#lib/rake/task_manager.rb:328 def record_task_metadata=(_arg0); end end end -# source://rake//lib/rake/thread_history_display.rb#6 +# pkg:gem/rake#lib/rake/thread_history_display.rb:6 class Rake::ThreadHistoryDisplay include ::Rake::PrivateReader extend ::Rake::PrivateReader::ClassMethods - # @return [ThreadHistoryDisplay] a new instance of ThreadHistoryDisplay - # - # source://rake//lib/rake/thread_history_display.rb#11 + # pkg:gem/rake#lib/rake/thread_history_display.rb:11 def initialize(stats); end - # source://rake//lib/rake/thread_history_display.rb#17 + # pkg:gem/rake#lib/rake/thread_history_display.rb:17 def show; end private - # source://rake//lib/rake/private_reader.rb#15 + # pkg:gem/rake#lib/rake/thread_history_display.rb:9 def items; end - # source://rake//lib/rake/thread_history_display.rb#35 + # pkg:gem/rake#lib/rake/thread_history_display.rb:35 def rename(hash, key, renames); end - # source://rake//lib/rake/private_reader.rb#15 + # pkg:gem/rake#lib/rake/thread_history_display.rb:9 def stats; end - # source://rake//lib/rake/private_reader.rb#15 + # pkg:gem/rake#lib/rake/thread_history_display.rb:9 def threads; end end -# source://rake//lib/rake/thread_pool.rb#8 +# pkg:gem/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#12 + # pkg:gem/rake#lib/rake/thread_pool.rb:12 def initialize(thread_count); end # Creates a future executed by the +ThreadPool+. @@ -2882,12 +2925,12 @@ class Rake::ThreadPool # current thread until the future is finished and will return the # result (or raise an exception thrown from the future) # - # source://rake//lib/rake/thread_pool.rb#33 + # pkg:gem/rake#lib/rake/thread_pool.rb:33 def future(*args, &block); end # Enable the gathering of history events. # - # source://rake//lib/rake/thread_pool.rb#68 + # pkg:gem/rake#lib/rake/thread_pool.rb:68 def gather_history; end # Return a array of history events for the thread pool. @@ -2896,43 +2939,40 @@ class Rake::ThreadPool # (see #gather_history). Best to call this when the job is # complete (i.e. after ThreadPool#join is called). # - # source://rake//lib/rake/thread_pool.rb#77 + # pkg:gem/rake#lib/rake/thread_pool.rb:77 def history; end # Waits until the queue of futures is empty and all threads have exited. # - # source://rake//lib/rake/thread_pool.rb#44 + # pkg:gem/rake#lib/rake/thread_pool.rb:44 def join; end # Return a hash of always collected statistics for the thread pool. # - # source://rake//lib/rake/thread_pool.rb#84 + # pkg:gem/rake#lib/rake/thread_pool.rb:84 def statistics; end private # for testing only # - # source://rake//lib/rake/thread_pool.rb#158 + # pkg:gem/rake#lib/rake/thread_pool.rb:152 def __queue__; end # processes one item on the queue. Returns true if there was an # item to process, false if there was no item # - # source://rake//lib/rake/thread_pool.rb#95 + # pkg:gem/rake#lib/rake/thread_pool.rb:95 def process_queue_item; end - # source://rake//lib/rake/thread_pool.rb#111 - def safe_thread_count; end - - # source://rake//lib/rake/thread_pool.rb#117 + # pkg:gem/rake#lib/rake/thread_pool.rb:111 def start_thread; end - # source://rake//lib/rake/thread_pool.rb#145 + # pkg:gem/rake#lib/rake/thread_pool.rb:139 def stat(event, data = T.unsafe(nil)); end end -# source://rake//lib/rake/trace_output.rb#3 +# pkg:gem/rake#lib/rake/trace_output.rb:3 module Rake::TraceOutput # Write trace output to output stream +out+. # @@ -2940,94 +2980,151 @@ module Rake::TraceOutput # chance that the trace output is interrupted by other tasks also # producing output. # - # source://rake//lib/rake/trace_output.rb#10 + # pkg:gem/rake#lib/rake/trace_output.rb:10 def trace_on(out, *strings); end end -# source://rake//lib/rake/version.rb#3 +# pkg:gem/rake#lib/rake/version.rb:3 Rake::VERSION = T.let(T.unsafe(nil), String) -# source://rake//lib/rake/version.rb#5 +# pkg:gem/rake#lib/rake/version.rb:5 module Rake::Version; end -# source://rake//lib/rake/version.rb#6 +# pkg:gem/rake#lib/rake/version.rb:6 Rake::Version::BUILD = T.let(T.unsafe(nil), String) -# source://rake//lib/rake/version.rb#6 +# pkg:gem/rake#lib/rake/version.rb:6 Rake::Version::MAJOR = T.let(T.unsafe(nil), String) -# source://rake//lib/rake/version.rb#6 +# pkg:gem/rake#lib/rake/version.rb:6 Rake::Version::MINOR = T.let(T.unsafe(nil), String) -# source://rake//lib/rake/version.rb#8 +# pkg:gem/rake#lib/rake/version.rb:8 Rake::Version::NUMBERS = T.let(T.unsafe(nil), Array) -# source://rake//lib/rake/version.rb#6 +# pkg:gem/rake#lib/rake/version.rb:6 Rake::Version::OTHER = T.let(T.unsafe(nil), Array) # Win 32 interface methods for Rake. Windows specific functionality # will be placed here to collect that knowledge in one spot. # -# source://rake//lib/rake/win32.rb#7 +# pkg:gem/rake#lib/rake/win32.rb:7 module Rake::Win32 class << self - # Normalize a win32 path so that the slashes are all forward slashes. - # - # source://rake//lib/rake/win32.rb#45 - def normalize(path); end - - # The standard directory containing system wide rake files on - # Win 32 systems. Try the following environment variables (in - # order): - # - # * HOME - # * HOMEDRIVE + HOMEPATH - # * APPDATA - # * USERPROFILE - # - # If the above are not defined, the return nil. - # - # @raise [Win32HomeError] - # - # source://rake//lib/rake/win32.rb#30 - def win32_system_dir; end - # True if running on a windows system. # - # @return [Boolean] - # - # source://rake//lib/rake/win32.rb#16 + # pkg:gem/rake#lib/rake/win32.rb:11 def windows?; end end end -# Error indicating a problem in locating the home directory on a -# Win32 system. -# -# source://rake//lib/rake/win32.rb#11 -class Rake::Win32::Win32HomeError < ::RuntimeError; end - -# source://rake//lib/rake.rb#70 +# pkg:gem/rake#lib/rake.rb:69 RakeFileUtils = Rake::FileUtilsExt -# source://rake//lib/rake/ext/string.rb#4 +# pkg:gem/rake#lib/rake/ext/string.rb:4 class String include ::Comparable - # source://rake//lib/rake/ext/string.rb#14 + # Replace the file extension with +newext+. If there is no extension on + # the string, append the new extension to the end. If the new extension + # is not given, or is the empty string, remove any existing extension. + # + # +ext+ is a user added method for the String class. + # + # This String extension comes from Rake + # + # pkg:gem/rake#lib/rake/ext/string.rb:14 def ext(newext = T.unsafe(nil)); end - # source://rake//lib/rake/ext/string.rb#138 + # Map the path according to the given specification. The specification + # controls the details of the mapping. The following special patterns are + # recognized: + # + # %p :: The complete path. + # %f :: The base file name of the path, with its file extension, + # but without any directories. + # %n :: The file name of the path without its file extension. + # %d :: The directory list of the path. + # %x :: The file extension of the path. An empty string if there + # is no extension. + # %X :: Everything *but* the file extension. + # %s :: The alternate file separator if defined, otherwise use # + # the standard file separator. + # %% :: A percent sign. + # + # The %d specifier can also have a numeric prefix (e.g. '%2d'). + # If the number is positive, only return (up to) +n+ directories in the + # path, starting from the left hand side. If +n+ is negative, return (up + # to) +n+ directories from the right hand side of the path. + # + # Examples: + # + # 'a/b/c/d/file.txt'.pathmap("%2d") => 'a/b' + # 'a/b/c/d/file.txt'.pathmap("%-2d") => 'c/d' + # + # Also the %d, %p, %f, %n, + # %x, and %X operators can take a pattern/replacement + # argument to perform simple string substitutions on a particular part of + # the path. The pattern and replacement are separated by a comma and are + # enclosed by curly braces. The replacement spec comes after the % + # character but before the operator letter. (e.g. "%{old,new}d"). + # Multiple replacement specs should be separated by semi-colons (e.g. + # "%{old,new;src,bin}d"). + # + # Regular expressions may be used for the pattern, and back refs may be + # used in the replacement text. Curly braces, commas and semi-colons are + # excluded from both the pattern and replacement text (let's keep parsing + # reasonable). + # + # For example: + # + # "src/org/onestepback/proj/A.java".pathmap("%{^src,class}X.class") + # + # returns: + # + # "class/org/onestepback/proj/A.class" + # + # If the replacement text is '*', then a block may be provided to perform + # some arbitrary calculation for the replacement. + # + # For example: + # + # "/path/to/file.TXT".pathmap("%X%{.*,*}x") { |ext| + # ext.downcase + # } + # + # Returns: + # + # "/path/to/file.txt" + # + # This String extension comes from Rake + # + # pkg:gem/rake#lib/rake/ext/string.rb:138 def pathmap(spec = T.unsafe(nil), &block); end protected - # source://rake//lib/rake/ext/string.rb#27 + # Explode a path into individual components. Used by +pathmap+. + # + # This String extension comes from Rake + # + # pkg:gem/rake#lib/rake/ext/string.rb:27 def pathmap_explode; end - # source://rake//lib/rake/ext/string.rb#41 + # Extract a partial path from the path. Include +n+ directories from the + # front end (left hand side) if +n+ is positive. Include |+n+| + # directories from the back end (right hand side) if +n+ is negative. + # + # This String extension comes from Rake + # + # pkg:gem/rake#lib/rake/ext/string.rb:41 def pathmap_partial(n); end - # source://rake//lib/rake/ext/string.rb#59 + # Perform the pathmap replacement operations on the given path. The + # patterns take the form 'pat1,rep1;pat2,rep2...'. + # + # This String extension comes from Rake + # + # pkg:gem/rake#lib/rake/ext/string.rb:59 def pathmap_replace(patterns, &block); end end diff --git a/sorbet/rbi/gems/rbi@0.3.1.rbi b/sorbet/rbi/gems/rbi@0.3.1.rbi deleted file mode 100644 index 272a5d1..0000000 --- a/sorbet/rbi/gems/rbi@0.3.1.rbi +++ /dev/null @@ -1,6599 +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`. - - -# 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 `spoom srb sigs export`. - -# source://rbi//lib/rbi.rb#8 -module RBI; end - -# source://rbi//lib/rbi/model.rb#802 -class RBI::Arg < ::RBI::Node - # : (String value, ?loc: Loc?) -> void - # - # @return [Arg] a new instance of Arg - # - # source://rbi//lib/rbi/model.rb#807 - sig { params(value: ::String, loc: T.nilable(::RBI::Loc)).void } - def initialize(value, loc: T.unsafe(nil)); end - - # : (Object? other) -> bool - # - # source://rbi//lib/rbi/model.rb#813 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # : -> String - # - # source://rbi//lib/rbi/model.rb#818 - sig { returns(::String) } - def to_s; end - - # : String - # - # source://rbi//lib/rbi/model.rb#804 - 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#298 -class RBI::Attr < ::RBI::NodeWithComments - include ::RBI::Indexable - - abstract! - - # : (Symbol name, Array[Symbol] names, ?visibility: Visibility, ?sigs: Array[Sig], ?loc: Loc?, ?comments: Array[Comment]) -> void - # - # @return [Attr] a new instance of Attr - # - # source://rbi//lib/rbi/model.rb#314 - 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 - - # : (Node other) -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#394 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # @abstract - # - # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#58 - sig { abstract.returns(T::Array[::RBI::Method]) } - def convert_to_methods; end - - # @abstract - # - # source://rbi//lib/rbi/model.rb#322 - sig { abstract.returns(T::Array[::String]) } - def fully_qualified_names; end - - # : -> Array[String] - # - # source://rbi//lib/rbi/index.rb#109 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # : (Node other) -> void - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#403 - sig { override.params(other: ::RBI::Node).void } - def merge_with(other); end - - # : Array[Symbol] - # - # source://rbi//lib/rbi/model.rb#305 - sig { returns(T::Array[::Symbol]) } - def names; end - - # : Array[Sig] - # - # source://rbi//lib/rbi/model.rb#311 - sig { returns(T::Array[::RBI::Sig]) } - def sigs; end - - # : Visibility - # - # source://rbi//lib/rbi/model.rb#308 - sig { returns(::RBI::Visibility) } - def visibility; end - - # : Visibility - # - # source://rbi//lib/rbi/model.rb#308 - # @return [Visibility] - def visibility=(_arg0); end - - private - - # : (String name, Sig? sig, Visibility visibility, Loc? loc, Array[Comment] comments) -> Method - # - # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#79 - sig do - params( - name: ::String, - sig: T.nilable(::RBI::Sig), - visibility: ::RBI::Visibility, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment] - ).returns(::RBI::Method) - end - def create_getter_method(name, sig, visibility, loc, comments); end - - # : (String name, Sig? sig, (Type | String)? attribute_type, Visibility visibility, Loc? loc, Array[Comment] comments) -> Method - # - # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#91 - sig do - params( - name: ::String, - sig: T.nilable(::RBI::Sig), - attribute_type: T.nilable(T.any(::RBI::Type, ::String)), - visibility: ::RBI::Visibility, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment] - ).returns(::RBI::Method) - end - def create_setter_method(name, sig, attribute_type, visibility, loc, comments); end - - # : -> [Sig?, (Type | String)?] - # - # @raise [UnexpectedMultipleSigsError] - # - # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#64 - sig(:final) { returns([T.nilable(::RBI::Sig), T.nilable(T.any(::RBI::Type, ::String))]) } - def parse_sig; end -end - -# source://rbi//lib/rbi/model.rb#325 -class RBI::AttrAccessor < ::RBI::Attr - # : (Symbol name, *Symbol names, ?visibility: Visibility, ?sigs: Array[Sig], ?loc: Loc?, ?comments: Array[Comment]) ?{ (AttrAccessor node) -> void } -> void - # - # @return [AttrAccessor] a new instance of AttrAccessor - # - # source://rbi//lib/rbi/model.rb#327 - 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 - - # : (Node other) -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#432 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # : -> Array[Method] - # - # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#122 - sig { override.returns(T::Array[::RBI::Method]) } - def convert_to_methods; end - - # : -> Array[String] - # - # source://rbi//lib/rbi/model.rb#334 - sig { override.returns(T::Array[::String]) } - def fully_qualified_names; end - - # : -> String - # - # source://rbi//lib/rbi/model.rb#341 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#347 -class RBI::AttrReader < ::RBI::Attr - # : (Symbol name, *Symbol names, ?visibility: Visibility, ?sigs: Array[Sig], ?loc: Loc?, ?comments: Array[Comment]) ?{ (AttrReader node) -> void } -> void - # - # @return [AttrReader] a new instance of AttrReader - # - # source://rbi//lib/rbi/model.rb#349 - 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 - - # : (Node other) -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#416 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # : -> Array[Method] - # - # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#137 - sig { override.returns(T::Array[::RBI::Method]) } - def convert_to_methods; end - - # : -> Array[String] - # - # source://rbi//lib/rbi/model.rb#356 - sig { override.returns(T::Array[::String]) } - def fully_qualified_names; end - - # : -> String - # - # source://rbi//lib/rbi/model.rb#363 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#369 -class RBI::AttrWriter < ::RBI::Attr - # : (Symbol name, *Symbol names, ?visibility: Visibility, ?sigs: Array[Sig], ?loc: Loc?, ?comments: Array[Comment]) ?{ (AttrWriter node) -> void } -> void - # - # @return [AttrWriter] a new instance of AttrWriter - # - # source://rbi//lib/rbi/model.rb#371 - 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 - - # : (Node other) -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#424 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # : -> Array[Method] - # - # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#147 - sig { override.returns(T::Array[::RBI::Method]) } - def convert_to_methods; end - - # : -> Array[String] - # - # source://rbi//lib/rbi/model.rb#378 - sig { override.returns(T::Array[::String]) } - def fully_qualified_names; end - - # : -> String - # - # source://rbi//lib/rbi/model.rb#385 - 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#73 -class RBI::BlankLine < ::RBI::Comment - # : (?loc: Loc?) -> void - # - # @return [BlankLine] a new instance of BlankLine - # - # source://rbi//lib/rbi/model.rb#75 - sig { params(loc: T.nilable(::RBI::Loc)).void } - def initialize(loc: T.unsafe(nil)); end -end - -# source://rbi//lib/rbi/model.rb#642 -class RBI::BlockParam < ::RBI::Param - # : (String name, ?loc: Loc?, ?comments: Array[Comment]) ?{ (BlockParam node) -> void } -> void - # - # @return [BlockParam] a new instance of BlockParam - # - # source://rbi//lib/rbi/model.rb#644 - 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 - - # : (Object? other) -> bool - # - # source://rbi//lib/rbi/model.rb#656 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # : -> String - # - # source://rbi//lib/rbi/model.rb#651 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#202 -class RBI::Class < ::RBI::Scope - # : (String name, ?superclass_name: String?, ?loc: Loc?, ?comments: Array[Comment]) ?{ (Class node) -> void } -> void - # - # @return [Class] a new instance of Class - # - # source://rbi//lib/rbi/model.rb#210 - 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 - - # : (Node other) -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#362 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # : -> String - # - # source://rbi//lib/rbi/model.rb#219 - sig { override.returns(::String) } - def fully_qualified_name; end - - # : String - # - # source://rbi//lib/rbi/model.rb#204 - sig { returns(::String) } - def name; end - - # : String - # - # source://rbi//lib/rbi/model.rb#204 - # @return [String] - def name=(_arg0); end - - # : String? - # - # source://rbi//lib/rbi/model.rb#207 - sig { returns(T.nilable(::String)) } - def superclass_name; end - - # : String? - # - # source://rbi//lib/rbi/model.rb#207 - # @return [String, nil] - def superclass_name=(_arg0); end -end - -# source://rbi//lib/rbi/model.rb#54 -class RBI::Comment < ::RBI::Node - # : (String text, ?loc: Loc?) -> void - # - # @return [Comment] a new instance of Comment - # - # source://rbi//lib/rbi/model.rb#59 - sig { params(text: ::String, loc: T.nilable(::RBI::Loc)).void } - def initialize(text, loc: T.unsafe(nil)); end - - # : (Object other) -> bool - # - # source://rbi//lib/rbi/model.rb#65 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # : String - # - # source://rbi//lib/rbi/model.rb#56 - sig { returns(::String) } - def text; end - - # : String - # - # source://rbi//lib/rbi/model.rb#56 - # @return [String] - 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#546 -# 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 -class RBI::ConflictTree < ::RBI::Tree - # : (?left_name: String, ?right_name: String) -> void - # - # @return [ConflictTree] a new instance of ConflictTree - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#554 - sig { params(left_name: ::String, right_name: ::String).void } - def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end - - # : Tree - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#548 - sig { returns(::RBI::Tree) } - def left; end - - # : String - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#551 - sig { returns(::String) } - def left_name; end - - # : Tree - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#548 - # @return [Tree] - def right; end - - # : String - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#551 - # @return [String] - def right_name; end -end - -# Consts -# -# source://rbi//lib/rbi/model.rb#270 -class RBI::Const < ::RBI::NodeWithComments - include ::RBI::Indexable - - # : (String name, String value, ?loc: Loc?, ?comments: Array[Comment]) ?{ (Const node) -> void } -> void - # - # @return [Const] a new instance of Const - # - # source://rbi//lib/rbi/model.rb#275 - 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 - - # : (Node other) -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#386 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # : -> String - # - # source://rbi//lib/rbi/model.rb#283 - sig { returns(::String) } - def fully_qualified_name; end - - # : -> Array[String] - # - # source://rbi//lib/rbi/index.rb#99 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # : String - # - # source://rbi//lib/rbi/model.rb#272 - sig { returns(::String) } - def name; end - - # : -> String - # - # source://rbi//lib/rbi/model.rb#291 - sig { override.returns(::String) } - def to_s; end - - # : String - # - # source://rbi//lib/rbi/model.rb#272 - # @return [String] - def value; end -end - -# source://rbi//lib/rbi/rewriters/merge_trees.rb#332 -class RBI::DuplicateNodeError < ::RBI::Error; end - -# source://rbi//lib/rbi.rb#9 -class RBI::Error < ::StandardError; end - -# source://rbi//lib/rbi/model.rb#692 -class RBI::Extend < ::RBI::Mixin - include ::RBI::Indexable - - # : (String name, *String names, ?loc: Loc?, ?comments: Array[Comment]) ?{ (Extend node) -> void } -> void - # - # @return [Extend] a new instance of Extend - # - # source://rbi//lib/rbi/model.rb#694 - 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 - - # : (Node other) -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#479 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # : -> Array[String] - # - # source://rbi//lib/rbi/index.rb#139 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # : -> String - # - # source://rbi//lib/rbi/model.rb#701 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#135 -class RBI::File - # : (?strictness: String?, ?comments: Array[Comment]) ?{ (File file) -> void } -> void - # - # @return [File] a new instance of File - # - # source://rbi//lib/rbi/model.rb#146 - 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 - - # : (Node node) -> void - # - # source://rbi//lib/rbi/model.rb#154 - sig { params(node: ::RBI::Node).void } - def <<(node); end - - # : Array[Comment] - # - # source://rbi//lib/rbi/model.rb#143 - sig { returns(T::Array[::RBI::Comment]) } - def comments; end - - # : Array[Comment] - # - # source://rbi//lib/rbi/model.rb#143 - # @return [Array] - def comments=(_arg0); end - - # : -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#159 - sig { returns(T::Boolean) } - def empty?; end - - # : (?out: (IO | StringIO), ?indent: Integer, ?print_locs: bool, ?max_line_length: Integer?) -> void - # - # source://rbi//lib/rbi/printer.rb#794 - 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 - - # : (?out: (IO | StringIO), ?indent: Integer, ?print_locs: bool) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#1106 - sig { params(out: T.any(::IO, ::StringIO), indent: ::Integer, print_locs: T::Boolean).void } - def rbs_print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end - - # : (?indent: Integer, ?print_locs: bool) -> String - # - # source://rbi//lib/rbi/rbs_printer.rb#1112 - sig { params(indent: ::Integer, print_locs: T::Boolean).returns(::String) } - def rbs_string(indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end - - # : Tree - # - # source://rbi//lib/rbi/model.rb#137 - sig { returns(::RBI::Tree) } - def root; end - - # : Tree - # - # source://rbi//lib/rbi/model.rb#137 - # @return [Tree] - def root=(_arg0); end - - # : String? - # - # source://rbi//lib/rbi/model.rb#140 - sig { returns(T.nilable(::String)) } - def strictness; end - - # : String? - # - # source://rbi//lib/rbi/model.rb#140 - # @return [String, nil] - def strictness=(_arg0); end - - # : (?indent: Integer, ?print_locs: bool, ?max_line_length: Integer?) -> String - # - # source://rbi//lib/rbi/printer.rb#800 - 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 - # : (?add_sig_templates: bool, ?group_nodes: bool, ?max_line_length: Integer?, ?nest_singleton_methods: bool, ?nest_non_public_members: bool, ?sort_nodes: bool) -> void - # - # @return [Formatter] a new instance of Formatter - # - # source://rbi//lib/rbi/formatter.rb#10 - 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_members: 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_members: T.unsafe(nil), sort_nodes: T.unsafe(nil)); end - - # : (RBI::File file) -> void - # - # source://rbi//lib/rbi/formatter.rb#33 - sig { params(file: ::RBI::File).void } - def format_file(file); end - - # : (RBI::Tree tree) -> void - # - # source://rbi//lib/rbi/formatter.rb#38 - sig { params(tree: ::RBI::Tree).void } - def format_tree(tree); end - - # : Integer? - # - # source://rbi//lib/rbi/formatter.rb#7 - sig { returns(T.nilable(::Integer)) } - def max_line_length; end - - # : Integer? - # - # source://rbi//lib/rbi/formatter.rb#7 - # @return [Integer, nil] - def max_line_length=(_arg0); end - - # : (RBI::File file) -> String - # - # source://rbi//lib/rbi/formatter.rb#27 - sig { params(file: ::RBI::File).returns(::String) } - def print_file(file); end -end - -# source://rbi//lib/rbi/rewriters/group_nodes.rb#84 -class RBI::Group < ::RBI::Tree - # : (Kind kind) -> void - # - # @return [Group] a new instance of Group - # - # source://rbi//lib/rbi/rewriters/group_nodes.rb#89 - sig { params(kind: ::RBI::Group::Kind).void } - def initialize(kind); end - - # : Kind - # - # source://rbi//lib/rbi/rewriters/group_nodes.rb#86 - sig { returns(::RBI::Group::Kind) } - def kind; end -end - -# source://rbi//lib/rbi/rewriters/group_nodes.rb#94 -class RBI::Group::Kind < ::T::Enum - enums do - Attrs = new - Consts = new - Helpers = new - Inits = new - Methods = new - MixesInClassMethods = new - Mixins = new - RequiredAncestors = new - Sends = new - SingletonClasses = new - TEnums = new - TStructFields = new - TypeMembers = new - end -end - -# source://rbi//lib/rbi/rewriters/group_nodes.rb#5 -class RBI::GroupNodesError < ::RBI::Error; end - -# Sorbet's misc. -# -# source://rbi//lib/rbi/model.rb#1042 -class RBI::Helper < ::RBI::NodeWithComments - include ::RBI::Indexable - - # : (String name, ?loc: Loc?, ?comments: Array[Comment]) ?{ (Helper node) -> void } -> void - # - # @return [Helper] a new instance of Helper - # - # source://rbi//lib/rbi/model.rb#1047 - 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 - - # : (Node other) -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#495 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # : -> Array[String] - # - # source://rbi//lib/rbi/index.rb#169 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # : String - # - # source://rbi//lib/rbi/model.rb#1044 - sig { returns(::String) } - def name; end - - # : -> String - # - # source://rbi//lib/rbi/model.rb#1055 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#678 -class RBI::Include < ::RBI::Mixin - include ::RBI::Indexable - - # : (String name, *String names, ?loc: Loc?, ?comments: Array[Comment]) ?{ (Include node) -> void } -> void - # - # @return [Include] a new instance of Include - # - # source://rbi//lib/rbi/model.rb#680 - 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 - - # : (Node other) -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#471 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # : -> Array[String] - # - # source://rbi//lib/rbi/index.rb#129 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # : -> String - # - # source://rbi//lib/rbi/model.rb#687 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/index.rb#5 -class RBI::Index < ::RBI::Visitor - # : -> void - # - # @return [Index] a new instance of Index - # - # source://rbi//lib/rbi/index.rb#18 - sig { void } - def initialize; end - - # : (String id) -> Array[Node] - # - # source://rbi//lib/rbi/index.rb#29 - sig { params(id: ::String).returns(T::Array[::RBI::Node]) } - def [](id); end - - # : (*Node nodes) -> void - # - # source://rbi//lib/rbi/index.rb#34 - sig { params(nodes: ::RBI::Node).void } - def index(*nodes); end - - # : -> Array[String] - # - # source://rbi//lib/rbi/index.rb#24 - sig { returns(T::Array[::String]) } - def keys; end - - # : (Node? node) -> void - # - # source://rbi//lib/rbi/index.rb#40 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # : ((Indexable & Node) node) -> void - # - # source://rbi//lib/rbi/index.rb#57 - sig { params(node: T.all(::RBI::Indexable, ::RBI::Node)).void } - def index_node(node); end - - class << self - # : (*Node node) -> Index - # - # 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 referred 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 - # Unique IDs that refer to this node. - # Some nodes can have multiple ids, for example an attribute accessor matches the ID of the - sig { abstract.returns(T::Array[::String]) } - def index_ids; end -end - -# source://rbi//lib/rbi/model.rb#823 -class RBI::KwArg < ::RBI::Arg - # : (String keyword, String value, ?loc: Loc?) -> void - # - # @return [KwArg] a new instance of KwArg - # - # source://rbi//lib/rbi/model.rb#828 - sig { params(keyword: ::String, value: ::String, loc: T.nilable(::RBI::Loc)).void } - def initialize(keyword, value, loc: T.unsafe(nil)); end - - # : (Object? other) -> bool - # - # source://rbi//lib/rbi/model.rb#834 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # : String - # - # source://rbi//lib/rbi/model.rb#825 - sig { returns(::String) } - def keyword; end - - # : -> String - # - # source://rbi//lib/rbi/model.rb#839 - sig { returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#600 -class RBI::KwOptParam < ::RBI::Param - # : (String name, String value, ?loc: Loc?, ?comments: Array[Comment]) ?{ (KwOptParam node) -> void } -> void - # - # @return [KwOptParam] a new instance of KwOptParam - # - # source://rbi//lib/rbi/model.rb#605 - 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 - - # : (Object? other) -> bool - # - # source://rbi//lib/rbi/model.rb#618 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # : -> String - # - # source://rbi//lib/rbi/model.rb#613 - sig { override.returns(::String) } - def to_s; end - - # : String - # - # source://rbi//lib/rbi/model.rb#602 - sig { returns(::String) } - def value; end -end - -# source://rbi//lib/rbi/model.rb#581 -class RBI::KwParam < ::RBI::Param - # : (String name, ?loc: Loc?, ?comments: Array[Comment]) ?{ (KwParam node) -> void } -> void - # - # @return [KwParam] a new instance of KwParam - # - # source://rbi//lib/rbi/model.rb#583 - 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 - - # : (Object? other) -> bool - # - # source://rbi//lib/rbi/model.rb#595 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # : -> String - # - # source://rbi//lib/rbi/model.rb#590 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#623 -class RBI::KwRestParam < ::RBI::Param - # : (String name, ?loc: Loc?, ?comments: Array[Comment]) ?{ (KwRestParam node) -> void } -> void - # - # @return [KwRestParam] a new instance of KwRestParam - # - # source://rbi//lib/rbi/model.rb#625 - 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 - - # : (Object? other) -> bool - # - # source://rbi//lib/rbi/model.rb#637 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # : -> String - # - # source://rbi//lib/rbi/model.rb#632 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/loc.rb#5 -class RBI::Loc - # : (?file: String?, ?begin_line: Integer?, ?end_line: Integer?, ?begin_column: Integer?, ?end_column: Integer?) -> void - # - # @return [Loc] a new instance of Loc - # - # source://rbi//lib/rbi/loc.rb#26 - 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 - - # : Integer? - # - # source://rbi//lib/rbi/loc.rb#23 - # @return [Integer, nil] - def begin_column; end - - # : Integer? - # - # source://rbi//lib/rbi/loc.rb#23 - sig { returns(T.nilable(::Integer)) } - def begin_line; end - - # : Integer? - # - # source://rbi//lib/rbi/loc.rb#23 - # @return [Integer, nil] - def end_column; end - - # : Integer? - # - # source://rbi//lib/rbi/loc.rb#23 - # @return [Integer, nil] - def end_line; end - - # : String? - # - # source://rbi//lib/rbi/loc.rb#20 - sig { returns(T.nilable(::String)) } - def file; end - - # : -> String? - # - # source://rbi//lib/rbi/loc.rb#44 - sig { returns(T.nilable(::String)) } - def source; end - - # : -> String - # - # source://rbi//lib/rbi/loc.rb#35 - sig { returns(::String) } - def to_s; end - - class << self - # : (String file, Prism::Location prism_location) -> Loc - # - # source://rbi//lib/rbi/loc.rb#8 - sig { params(file: ::String, prism_location: ::Prism::Location).returns(::RBI::Loc) } - def from_prism(file, prism_location); end - end -end - -# A tree that _might_ contain conflicts -# -# source://rbi//lib/rbi/rewriters/merge_trees.rb#320 -class RBI::MergeTree < ::RBI::Tree - # : (?loc: Loc?, ?comments: Array[Comment], ?conflicts: Array[Rewriters::Merge::Conflict]) ?{ (Tree node) -> void } -> void - # - # @return [MergeTree] a new instance of MergeTree - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#325 - 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 - - # : Array[Rewriters::Merge::Conflict] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#322 - sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } - def conflicts; end -end - -# Methods and args -# -# source://rbi//lib/rbi/model.rb#393 -class RBI::Method < ::RBI::NodeWithComments - include ::RBI::Indexable - - # : (String name, ?params: Array[Param], ?is_singleton: bool, ?visibility: Visibility, ?sigs: Array[Sig], ?loc: Loc?, ?comments: Array[Comment]) ?{ (Method node) -> void } -> void - # - # @return [Method] a new instance of Method - # - # source://rbi//lib/rbi/model.rb#410 - 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 - - # : (Param param) -> void - # - # source://rbi//lib/rbi/model.rb#430 - sig { params(param: ::RBI::Param).void } - def <<(param); end - - # : (String name) -> void - # - # source://rbi//lib/rbi/model.rb#465 - sig { params(name: ::String).void } - def add_block_param(name); end - - # : (String name, String default_value) -> void - # - # source://rbi//lib/rbi/model.rb#455 - sig { params(name: ::String, default_value: ::String).void } - def add_kw_opt_param(name, default_value); end - - # : (String name) -> void - # - # source://rbi//lib/rbi/model.rb#450 - sig { params(name: ::String).void } - def add_kw_param(name); end - - # : (String name) -> void - # - # source://rbi//lib/rbi/model.rb#460 - sig { params(name: ::String).void } - def add_kw_rest_param(name); end - - # : (String name, String default_value) -> void - # - # source://rbi//lib/rbi/model.rb#440 - sig { params(name: ::String, default_value: ::String).void } - def add_opt_param(name, default_value); end - - # : (String name) -> void - # - # source://rbi//lib/rbi/model.rb#435 - sig { params(name: ::String).void } - def add_param(name); end - - # : (String name) -> void - # - # source://rbi//lib/rbi/model.rb#445 - sig { params(name: ::String).void } - def add_rest_param(name); end - - # : (?params: Array[SigParam], ?return_type: (String | Type), ?is_abstract: bool, ?is_override: bool, ?is_overridable: bool, ?is_final: bool, ?type_params: Array[String], ?checked: Symbol?) ?{ (Sig node) -> void } -> void - # - # source://rbi//lib/rbi/model.rb#470 - sig do - params( - params: T::Array[::RBI::SigParam], - return_type: T.any(::RBI::Type, ::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), - block: T.nilable(T.proc.params(node: ::RBI::Sig).void) - ).void - end - def add_sig(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), &block); end - - # : (Node other) -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#440 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # : -> String - # - # source://rbi//lib/rbi/model.rb#496 - sig { returns(::String) } - def fully_qualified_name; end - - # : -> Array[String] - # - # source://rbi//lib/rbi/index.rb#119 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # : bool - # - # source://rbi//lib/rbi/model.rb#401 - sig { returns(T::Boolean) } - def is_singleton; end - - # : bool - # - # source://rbi//lib/rbi/model.rb#401 - # @return [Boolean] - def is_singleton=(_arg0); end - - # : (Node other) -> void - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#450 - sig { override.params(other: ::RBI::Node).void } - def merge_with(other); end - - # : String - # - # source://rbi//lib/rbi/model.rb#395 - sig { returns(::String) } - def name; end - - # : String - # - # source://rbi//lib/rbi/model.rb#395 - # @return [String] - def name=(_arg0); end - - # : Array[Param] - # - # source://rbi//lib/rbi/model.rb#398 - sig { returns(T::Array[::RBI::Param]) } - def params; end - - # : Array[Sig] - # - # source://rbi//lib/rbi/model.rb#407 - sig { returns(T::Array[::RBI::Sig]) } - def sigs; end - - # : Array[Sig] - # - # source://rbi//lib/rbi/model.rb#407 - # @return [Array] - def sigs=(_arg0); end - - # : -> String - # - # source://rbi//lib/rbi/model.rb#506 - sig { override.returns(::String) } - def to_s; end - - # : Visibility - # - # source://rbi//lib/rbi/model.rb#404 - sig { returns(::RBI::Visibility) } - def visibility; end - - # : Visibility - # - # source://rbi//lib/rbi/model.rb#404 - # @return [Visibility] - def visibility=(_arg0); end -end - -# source://rbi//lib/rbi/model.rb#1086 -class RBI::MixesInClassMethods < ::RBI::Mixin - include ::RBI::Indexable - - # : (String name, *String names, ?loc: Loc?, ?comments: Array[Comment]) ?{ (MixesInClassMethods node) -> void } -> void - # - # @return [MixesInClassMethods] a new instance of MixesInClassMethods - # - # source://rbi//lib/rbi/model.rb#1088 - 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 - - # : (Node other) -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#487 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # : -> Array[String] - # - # source://rbi//lib/rbi/index.rb#149 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # : -> String - # - # source://rbi//lib/rbi/model.rb#1095 - 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#663 -class RBI::Mixin < ::RBI::NodeWithComments - abstract! - - # : (String name, Array[String] names, ?loc: Loc?, ?comments: Array[Comment]) -> void - # - # @return [Mixin] a new instance of Mixin - # - # source://rbi//lib/rbi/model.rb#672 - 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 - - # : (Node other) -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#463 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # : Array[String] - # - # source://rbi//lib/rbi/model.rb#669 - sig { returns(T::Array[::String]) } - def names; end -end - -# source://rbi//lib/rbi/model.rb#182 -class RBI::Module < ::RBI::Scope - # : (String name, ?loc: Loc?, ?comments: Array[Comment]) ?{ (Module node) -> void } -> void - # - # @return [Module] a new instance of Module - # - # source://rbi//lib/rbi/model.rb#187 - 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 - - # : (Node other) -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#370 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # : -> String - # - # source://rbi//lib/rbi/model.rb#195 - sig { override.returns(::String) } - def fully_qualified_name; end - - # : String - # - # source://rbi//lib/rbi/model.rb#184 - sig { returns(::String) } - def name; end - - # : String - # - # source://rbi//lib/rbi/model.rb#184 - # @return [String] - def name=(_arg0); end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/model.rb#7 -class RBI::Node - abstract! - - # : (?loc: Loc?) -> void - # - # @return [Node] a new instance of Node - # - # source://rbi//lib/rbi/model.rb#19 - sig { params(loc: T.nilable(::RBI::Loc)).void } - def initialize(loc: T.unsafe(nil)); end - - # Can `self` and `_other` be merged into a single definition? - # : (Node _other) -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#280 - # Can `self` and `_other` be merged into a single definition? - sig { params(_other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(_other); end - - # : -> void - # - # source://rbi//lib/rbi/model.rb#25 - sig { void } - def detach; end - - # : Loc? - # - # source://rbi//lib/rbi/model.rb#16 - sig { returns(T.nilable(::RBI::Loc)) } - def loc; end - - # : Loc? - # - # source://rbi//lib/rbi/model.rb#16 - # @return [Loc, nil] - def loc=(_arg0); end - - # Merge `self` and `other` into a single definition - # : (Node other) -> void - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#286 - # Merge `self` and `other` into a single definition - sig { params(other: ::RBI::Node).void } - def merge_with(other); end - - # : -> ConflictTree? - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#289 - sig { returns(T.nilable(::RBI::ConflictTree)) } - def parent_conflict_tree; end - - # : -> Scope? - # - # source://rbi//lib/rbi/model.rb#47 - sig { returns(T.nilable(::RBI::Scope)) } - def parent_scope; end - - # : Tree? - # - # source://rbi//lib/rbi/model.rb#13 - sig { returns(T.nilable(::RBI::Tree)) } - def parent_tree; end - - # : Tree? - # - # source://rbi//lib/rbi/model.rb#13 - # @return [Tree, nil] - def parent_tree=(_arg0); end - - # : (?out: (IO | StringIO), ?indent: Integer, ?print_locs: bool, ?max_line_length: Integer?) -> void - # - # source://rbi//lib/rbi/printer.rb#809 - 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 - - # : (?out: (IO | StringIO), ?indent: Integer, ?print_locs: bool, ?positional_names: bool) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#1121 - sig do - params( - out: T.any(::IO, ::StringIO), - indent: ::Integer, - print_locs: T::Boolean, - positional_names: T::Boolean - ).void - end - def rbs_print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), positional_names: T.unsafe(nil)); end - - # : (?indent: Integer, ?print_locs: bool, ?positional_names: bool) -> String - # - # source://rbi//lib/rbi/rbs_printer.rb#1127 - sig { params(indent: ::Integer, print_locs: T::Boolean, positional_names: T::Boolean).returns(::String) } - def rbs_string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), positional_names: T.unsafe(nil)); end - - # : (Node node) -> void - # - # @raise [ReplaceNodeError] - # - # source://rbi//lib/rbi/model.rb#34 - sig { params(node: ::RBI::Node).void } - def replace(node); end - - # : (Gem::Version version) -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/rewriters/filter_versions.rb#91 - sig { params(version: ::Gem::Version).returns(T::Boolean) } - def satisfies_version?(version); end - - # : (?indent: Integer, ?print_locs: bool, ?max_line_length: Integer?) -> String - # - # source://rbi//lib/rbi/printer.rb#815 - 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#90 -class RBI::NodeWithComments < ::RBI::Node - abstract! - - # : (?loc: Loc?, ?comments: Array[Comment]) -> void - # - # @return [NodeWithComments] a new instance of NodeWithComments - # - # source://rbi//lib/rbi/model.rb#99 - sig { params(loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - # : -> Array[String] - # - # source://rbi//lib/rbi/model.rb#105 - sig { returns(T::Array[::String]) } - def annotations; end - - # : Array[Comment] - # - # source://rbi//lib/rbi/model.rb#96 - sig { returns(T::Array[::RBI::Comment]) } - def comments; end - - # : Array[Comment] - # - # source://rbi//lib/rbi/model.rb#96 - # @return [Array] - def comments=(_arg0); end - - # : (Node other) -> void - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#303 - sig { override.params(other: ::RBI::Node).void } - def merge_with(other); end - - # : -> Array[Gem::Requirement] - # - # source://rbi//lib/rbi/rewriters/filter_versions.rb#101 - sig { returns(T::Array[::Gem::Requirement]) } - def version_requirements; end -end - -# source://rbi//lib/rbi/model.rb#545 -class RBI::OptParam < ::RBI::Param - # : (String name, String value, ?loc: Loc?, ?comments: Array[Comment]) ?{ (OptParam node) -> void } -> void - # - # @return [OptParam] a new instance of OptParam - # - # source://rbi//lib/rbi/model.rb#550 - 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 - - # : (Object? other) -> bool - # - # source://rbi//lib/rbi/model.rb#557 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # : String - # - # source://rbi//lib/rbi/model.rb#547 - 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#511 -class RBI::Param < ::RBI::NodeWithComments - abstract! - - # : (String name, ?loc: Loc?, ?comments: Array[Comment]) -> void - # - # @return [Param] a new instance of Param - # - # source://rbi//lib/rbi/model.rb#520 - 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 - - # : String - # - # source://rbi//lib/rbi/model.rb#517 - sig { returns(::String) } - def name; end - - # : -> String - # - # source://rbi//lib/rbi/model.rb#527 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/parser.rb#7 -class RBI::ParseError < ::RBI::Error - # : (String message, Loc location) -> void - # - # @return [ParseError] a new instance of ParseError - # - # source://rbi//lib/rbi/parser.rb#12 - sig { params(message: ::String, location: ::RBI::Loc).void } - def initialize(message, location); end - - # : Loc - # - # source://rbi//lib/rbi/parser.rb#9 - sig { returns(::RBI::Loc) } - def location; end -end - -# source://rbi//lib/rbi/parser.rb#49 -class RBI::Parser - # : (String path) -> Tree - # - # source://rbi//lib/rbi/parser.rb#80 - sig { params(path: ::String).returns(::RBI::Tree) } - def parse_file(path); end - - # : (String string) -> Tree - # - # source://rbi//lib/rbi/parser.rb#75 - sig { params(string: ::String).returns(::RBI::Tree) } - def parse_string(string); end - - private - - # : (String source, file: String) -> Tree - # - # source://rbi//lib/rbi/parser.rb#87 - sig { params(source: ::String, file: ::String).returns(::RBI::Tree) } - def parse(source, file:); end - - class << self - # : (String path) -> Tree - # - # source://rbi//lib/rbi/parser.rb#57 - sig { params(path: ::String).returns(::RBI::Tree) } - def parse_file(path); end - - # : (Array[String] paths) -> Array[Tree] - # - # source://rbi//lib/rbi/parser.rb#62 - sig { params(paths: T::Array[::String]).returns(T::Array[::RBI::Tree]) } - def parse_files(paths); end - - # : (String string) -> Tree - # - # source://rbi//lib/rbi/parser.rb#52 - sig { params(string: ::String).returns(::RBI::Tree) } - def parse_string(string); end - - # : (Array[String] strings) -> Array[Tree] - # - # source://rbi//lib/rbi/parser.rb#68 - sig { params(strings: T::Array[::String]).returns(T::Array[::RBI::Tree]) } - def parse_strings(strings); end - end -end - -# source://rbi//lib/rbi/parser.rb#824 -class RBI::Parser::SigBuilder < ::RBI::Parser::Visitor - # : (String content, file: String) -> void - # - # @return [SigBuilder] a new instance of SigBuilder - # - # source://rbi//lib/rbi/parser.rb#829 - sig { params(content: ::String, file: ::String).void } - def initialize(content, file:); end - - # : Sig - # - # source://rbi//lib/rbi/parser.rb#826 - sig { returns(::RBI::Sig) } - def current; end - - # : (Prism::AssocNode node) -> void - # - # source://rbi//lib/rbi/parser.rb#899 - sig { override.params(node: ::Prism::AssocNode).void } - def visit_assoc_node(node); end - - # : (Prism::CallNode node) -> void - # - # source://rbi//lib/rbi/parser.rb#837 - sig { override.params(node: ::Prism::CallNode).void } - def visit_call_node(node); end -end - -# source://rbi//lib/rbi/parser.rb#143 -class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor - # : (String source, comments: Array[Prism::Comment], file: String) -> void - # - # @return [TreeBuilder] a new instance of TreeBuilder - # - # source://rbi//lib/rbi/parser.rb#151 - sig { params(source: ::String, comments: T::Array[::Prism::Comment], file: ::String).void } - def initialize(source, comments:, file:); end - - # : Prism::Node? - # - # source://rbi//lib/rbi/parser.rb#148 - sig { returns(T.nilable(::Prism::Node)) } - def last_node; end - - # : Tree - # - # source://rbi//lib/rbi/parser.rb#145 - sig { returns(::RBI::Tree) } - def tree; end - - # : (Prism::CallNode node) -> void - # - # source://rbi//lib/rbi/parser.rb#319 - sig { params(node: ::Prism::CallNode).void } - def visit_call_node(node); end - - # : (Prism::ClassNode node) -> void - # - # source://rbi//lib/rbi/parser.rb#164 - sig { override.params(node: ::Prism::ClassNode).void } - def visit_class_node(node); end - - # : ((Prism::ConstantWriteNode | Prism::ConstantPathWriteNode) node) -> void - # - # source://rbi//lib/rbi/parser.rb#215 - sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).void } - def visit_constant_assign(node); end - - # : (Prism::ConstantPathWriteNode node) -> void - # - # source://rbi//lib/rbi/parser.rb#208 - sig { override.params(node: ::Prism::ConstantPathWriteNode).void } - def visit_constant_path_write_node(node); end - - # : (Prism::ConstantWriteNode node) -> void - # - # source://rbi//lib/rbi/parser.rb#200 - sig { override.params(node: ::Prism::ConstantWriteNode).void } - def visit_constant_write_node(node); end - - # : (Prism::DefNode node) -> void - # - # source://rbi//lib/rbi/parser.rb#249 - sig { override.params(node: ::Prism::DefNode).void } - def visit_def_node(node); end - - # : (Prism::ModuleNode node) -> void - # - # source://rbi//lib/rbi/parser.rb#271 - sig { override.params(node: ::Prism::ModuleNode).void } - def visit_module_node(node); end - - # : (Prism::ProgramNode node) -> void - # - # source://rbi//lib/rbi/parser.rb#290 - sig { override.params(node: ::Prism::ProgramNode).void } - def visit_program_node(node); end - - # : (Prism::SingletonClassNode node) -> void - # - # source://rbi//lib/rbi/parser.rb#302 - sig { override.params(node: ::Prism::SingletonClassNode).void } - def visit_singleton_class_node(node); end - - private - - # Collect all the remaining comments within a node - # : (Prism::Node node) -> void - # - # source://rbi//lib/rbi/parser.rb#493 - # Collect all the remaining comments within a node - sig { params(node: ::Prism::Node).void } - def collect_dangling_comments(node); end - - # Collect all the remaining comments after visiting the tree - # : -> void - # - # source://rbi//lib/rbi/parser.rb#511 - # Collect all the remaining comments after visiting the tree - sig { void } - def collect_orphan_comments; end - - # : -> Tree - # - # source://rbi//lib/rbi/parser.rb#534 - sig { returns(::RBI::Tree) } - def current_scope; end - - # : -> Array[Sig] - # - # source://rbi//lib/rbi/parser.rb#539 - sig { returns(T::Array[::RBI::Sig]) } - def current_sigs; end - - # : (Array[Sig] sigs) -> Array[Comment] - # - # source://rbi//lib/rbi/parser.rb#546 - sig { params(sigs: T::Array[::RBI::Sig]).returns(T::Array[::RBI::Comment]) } - def detach_comments_from_sigs(sigs); end - - # : (Prism::Node node) -> Array[Comment] - # - # source://rbi//lib/rbi/parser.rb#558 - sig { params(node: ::Prism::Node).returns(T::Array[::RBI::Comment]) } - def node_comments(node); end - - # : (Prism::Comment node) -> Comment - # - # source://rbi//lib/rbi/parser.rb#576 - sig { params(node: ::Prism::Comment).returns(::RBI::Comment) } - def parse_comment(node); end - - # : (Prism::Node? node) -> Array[Param] - # - # source://rbi//lib/rbi/parser.rb#613 - sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Param]) } - def parse_params(node); end - - # : (Prism::Node? node) -> Array[Arg] - # - # source://rbi//lib/rbi/parser.rb#589 - sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Arg]) } - def parse_send_args(node); end - - # : (Prism::CallNode node) -> Sig - # - # source://rbi//lib/rbi/parser.rb#687 - sig { params(node: ::Prism::CallNode).returns(::RBI::Sig) } - def parse_sig(node); end - - # : ((Prism::ConstantWriteNode | Prism::ConstantPathWriteNode) node) -> Struct? - # - # source://rbi//lib/rbi/parser.rb#696 - sig do - params( - node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode) - ).returns(T.nilable(::RBI::Struct)) - end - def parse_struct(node); end - - # : (Prism::CallNode send) -> void - # - # source://rbi//lib/rbi/parser.rb#744 - sig { params(send: ::Prism::CallNode).void } - def parse_tstruct_field(send); end - - # : (String name, Prism::Node node) -> Visibility - # - # source://rbi//lib/rbi/parser.rb#781 - sig { params(name: ::String, node: ::Prism::Node).returns(::RBI::Visibility) } - def parse_visibility(name, node); end - - # : -> void - # - # source://rbi//lib/rbi/parser.rb#795 - sig { void } - def separate_header_comments; end - - # : -> void - # - # source://rbi//lib/rbi/parser.rb#805 - sig { void } - def set_root_tree_loc; end - - # : (Prism::Node? node) -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/parser.rb#819 - sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } - def type_variable_definition?(node); end -end - -# source://rbi//lib/rbi/parser.rb#114 -class RBI::Parser::Visitor < ::Prism::Visitor - # : (String source, file: String) -> void - # - # @return [Visitor] a new instance of Visitor - # - # source://rbi//lib/rbi/parser.rb#116 - sig { params(source: ::String, file: ::String).void } - def initialize(source, file:); end - - private - - # : (Prism::Node node) -> Loc - # - # source://rbi//lib/rbi/parser.rb#126 - sig { params(node: ::Prism::Node).returns(::RBI::Loc) } - def node_loc(node); end - - # : (Prism::Node? node) -> String? - # - # source://rbi//lib/rbi/parser.rb#131 - sig { params(node: T.nilable(::Prism::Node)).returns(T.nilable(::String)) } - def node_string(node); end - - # : (Prism::Node node) -> String - # - # source://rbi//lib/rbi/parser.rb#138 - sig { params(node: ::Prism::Node).returns(::String) } - def node_string!(node); end -end - -# source://rbi//lib/rbi/printer.rb#7 -class RBI::Printer < ::RBI::Visitor - # : (?out: (IO | StringIO), ?indent: Integer, ?print_locs: bool, ?max_line_length: Integer?) -> void - # - # @return [Printer] a new instance of Printer - # - # source://rbi//lib/rbi/printer.rb#21 - 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 - - # : Integer - # - # source://rbi//lib/rbi/printer.rb#15 - sig { returns(::Integer) } - def current_indent; end - - # : -> void - # - # source://rbi//lib/rbi/printer.rb#39 - sig { void } - def dedent; end - - # : bool - # - # source://rbi//lib/rbi/printer.rb#9 - # @return [Boolean] - def in_visibility_group; end - - # : bool - # - # source://rbi//lib/rbi/printer.rb#9 - # @return [Boolean] - def in_visibility_group=(_arg0); end - - # : -> void - # - # source://rbi//lib/rbi/printer.rb#34 - # Printing - sig { void } - def indent; end - - # : Integer? - # - # source://rbi//lib/rbi/printer.rb#18 - sig { returns(T.nilable(::Integer)) } - def max_line_length; end - - # : Node? - # - # 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. - # : (String string) -> void - # - # source://rbi//lib/rbi/printer.rb#45 - # Print a string without indentation nor `\n` at the end. - sig { params(string: ::String).void } - def print(string); end - - # : bool - # - # source://rbi//lib/rbi/printer.rb#9 - sig { returns(T::Boolean) } - def print_locs; end - - # : bool - # - # source://rbi//lib/rbi/printer.rb#9 - # @return [Boolean] - def print_locs=(_arg0); end - - # Print a string with indentation and `\n` at the end. - # : (String string) -> void - # - # source://rbi//lib/rbi/printer.rb#65 - # Print a string with indentation and `\n` at the end. - sig { params(string: ::String).void } - def printl(string); end - - # Print a string without indentation but with a `\n` at the end. - # : (?String? string) -> void - # - # source://rbi//lib/rbi/printer.rb#51 - # Print a string without indentation but with a `\n` at the end. - 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. - # : (?String? string) -> void - # - # source://rbi//lib/rbi/printer.rb#58 - # Print a string with indentation but without a `\n` at the end. - sig { params(string: T.nilable(::String)).void } - def printt(string = T.unsafe(nil)); end - - # : (Array[Node] nodes) -> void - # - # source://rbi//lib/rbi/printer.rb#72 - sig { override.params(nodes: T::Array[::RBI::Node]).void } - def visit_all(nodes); end - - # : (File file) -> void - # - # source://rbi//lib/rbi/printer.rb#84 - sig { override.params(file: ::RBI::File).void } - def visit_file(file); end - - private - - # : (Node node) -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/printer.rb#670 - sig { params(node: ::RBI::Node).returns(T::Boolean) } - def oneline?(node); end - - # : (Node node) -> void - # - # source://rbi//lib/rbi/printer.rb#628 - sig { params(node: ::RBI::Node).void } - def print_blank_line_before(node); end - - # : (Node node) -> void - # - # source://rbi//lib/rbi/printer.rb#638 - sig { params(node: ::RBI::Node).void } - def print_loc(node); end - - # : (Param node, last: bool) -> void - # - # source://rbi//lib/rbi/printer.rb#644 - sig { params(node: ::RBI::Param, last: T::Boolean).void } - def print_param_comment_leading_space(node, last:); end - - # : (Sig node) -> void - # - # source://rbi//lib/rbi/printer.rb#717 - sig { params(node: ::RBI::Sig).void } - def print_sig_as_block(node); end - - # : (Sig node) -> void - # - # source://rbi//lib/rbi/printer.rb#692 - sig { params(node: ::RBI::Sig).void } - def print_sig_as_line(node); end - - # : (SigParam node, last: bool) -> void - # - # source://rbi//lib/rbi/printer.rb#662 - sig { params(node: ::RBI::SigParam, last: T::Boolean).void } - def print_sig_param_comment_leading_space(node, last:); end - - # : (Sig node) -> Array[String] - # - # source://rbi//lib/rbi/printer.rb#773 - sig { params(node: ::RBI::Sig).returns(T::Array[::String]) } - def sig_modifiers(node); end - - # : (Arg node) -> void - # - # source://rbi//lib/rbi/printer.rb#453 - sig { override.params(node: ::RBI::Arg).void } - def visit_arg(node); end - - # : (Attr node) -> void - # - # source://rbi//lib/rbi/printer.rb#258 - sig { params(node: ::RBI::Attr).void } - def visit_attr(node); end - - # : (AttrAccessor node) -> void - # - # source://rbi//lib/rbi/printer.rb#241 - sig { override.params(node: ::RBI::AttrAccessor).void } - def visit_attr_accessor(node); end - - # : (AttrReader node) -> void - # - # source://rbi//lib/rbi/printer.rb#247 - sig { override.params(node: ::RBI::AttrReader).void } - def visit_attr_reader(node); end - - # : (AttrWriter node) -> void - # - # source://rbi//lib/rbi/printer.rb#253 - sig { override.params(node: ::RBI::AttrWriter).void } - def visit_attr_writer(node); end - - # : (BlankLine node) -> void - # - # source://rbi//lib/rbi/printer.rb#138 - sig { override.params(node: ::RBI::BlankLine).void } - def visit_blank_line(node); end - - # : (BlockParam node) -> void - # - # source://rbi//lib/rbi/printer.rb#373 - sig { override.params(node: ::RBI::BlockParam).void } - def visit_block_param(node); end - - # : (Class node) -> void - # - # source://rbi//lib/rbi/printer.rb#158 - sig { override.params(node: ::RBI::Class).void } - def visit_class(node); end - - # : (Comment node) -> void - # - # source://rbi//lib/rbi/printer.rb#121 - sig { override.params(node: ::RBI::Comment).void } - def visit_comment(node); end - - # : (ConflictTree node) -> void - # - # source://rbi//lib/rbi/printer.rb#604 - sig { override.params(node: ::RBI::ConflictTree).void } - def visit_conflict_tree(node); end - - # : (Const node) -> void - # - # source://rbi//lib/rbi/printer.rb#231 - sig { override.params(node: ::RBI::Const).void } - def visit_const(node); end - - # : (Extend node) -> void - # - # source://rbi//lib/rbi/printer.rb#385 - sig { override.params(node: ::RBI::Extend).void } - def visit_extend(node); end - - # : (Group node) -> void - # - # source://rbi//lib/rbi/printer.rb#573 - sig { override.params(node: ::RBI::Group).void } - def visit_group(node); end - - # : (Helper node) -> void - # - # source://rbi//lib/rbi/printer.rb#557 - sig { override.params(node: ::RBI::Helper).void } - def visit_helper(node); end - - # : (Include node) -> void - # - # source://rbi//lib/rbi/printer.rb#379 - sig { override.params(node: ::RBI::Include).void } - def visit_include(node); end - - # : (KwArg node) -> void - # - # source://rbi//lib/rbi/printer.rb#459 - sig { override.params(node: ::RBI::KwArg).void } - def visit_kw_arg(node); end - - # : (KwOptParam node) -> void - # - # source://rbi//lib/rbi/printer.rb#361 - sig { override.params(node: ::RBI::KwOptParam).void } - def visit_kw_opt_param(node); end - - # : (KwParam node) -> void - # - # source://rbi//lib/rbi/printer.rb#355 - sig { override.params(node: ::RBI::KwParam).void } - def visit_kw_param(node); end - - # : (KwRestParam node) -> void - # - # source://rbi//lib/rbi/printer.rb#367 - sig { override.params(node: ::RBI::KwRestParam).void } - def visit_kw_rest_param(node); end - - # : (Method node) -> void - # - # source://rbi//lib/rbi/printer.rb#287 - sig { override.params(node: ::RBI::Method).void } - def visit_method(node); end - - # : (MixesInClassMethods node) -> void - # - # source://rbi//lib/rbi/printer.rb#567 - sig { override.params(node: ::RBI::MixesInClassMethods).void } - def visit_mixes_in_class_methods(node); end - - # : (Mixin node) -> void - # - # source://rbi//lib/rbi/printer.rb#390 - sig { params(node: ::RBI::Mixin).void } - def visit_mixin(node); end - - # : (Module node) -> void - # - # source://rbi//lib/rbi/printer.rb#152 - sig { override.params(node: ::RBI::Module).void } - def visit_module(node); end - - # : (OptParam node) -> void - # - # source://rbi//lib/rbi/printer.rb#343 - sig { override.params(node: ::RBI::OptParam).void } - def visit_opt_param(node); end - - # : (Private node) -> void - # - # source://rbi//lib/rbi/printer.rb#420 - sig { override.params(node: ::RBI::Private).void } - def visit_private(node); end - - # : (Protected node) -> void - # - # source://rbi//lib/rbi/printer.rb#414 - sig { override.params(node: ::RBI::Protected).void } - def visit_protected(node); end - - # : (Public node) -> void - # - # source://rbi//lib/rbi/printer.rb#408 - sig { override.params(node: ::RBI::Public).void } - def visit_public(node); end - - # : (RBSComment node) -> void - # - # source://rbi//lib/rbi/printer.rb#104 - sig { override.params(node: ::RBI::RBSComment).void } - def visit_rbs_comment(node); end - - # : (ReqParam node) -> void - # - # source://rbi//lib/rbi/printer.rb#337 - sig { override.params(node: ::RBI::ReqParam).void } - def visit_req_param(node); end - - # : (RequiresAncestor node) -> void - # - # source://rbi//lib/rbi/printer.rb#594 - sig { override.params(node: ::RBI::RequiresAncestor).void } - def visit_requires_ancestor(node); end - - # : (RestParam node) -> void - # - # source://rbi//lib/rbi/printer.rb#349 - sig { override.params(node: ::RBI::RestParam).void } - def visit_rest_param(node); end - - # : (Scope node) -> void - # - # source://rbi//lib/rbi/printer.rb#175 - sig { params(node: ::RBI::Scope).void } - def visit_scope(node); end - - # : (Scope node) -> void - # - # source://rbi//lib/rbi/printer.rb#220 - sig { params(node: ::RBI::Scope).void } - def visit_scope_body(node); end - - # : (ScopeConflict node) -> void - # - # source://rbi//lib/rbi/printer.rb#614 - sig { override.params(node: ::RBI::ScopeConflict).void } - def visit_scope_conflict(node); end - - # : (Scope node) -> void - # - # source://rbi//lib/rbi/printer.rb#185 - sig { params(node: ::RBI::Scope).void } - def visit_scope_header(node); end - - # : (Send node) -> void - # - # source://rbi//lib/rbi/printer.rb#435 - sig { override.params(node: ::RBI::Send).void } - def visit_send(node); end - - # : (Sig node) -> void - # - # source://rbi//lib/rbi/printer.rb#465 - sig { override.params(node: ::RBI::Sig).void } - def visit_sig(node); end - - # : (SigParam node) -> void - # - # source://rbi//lib/rbi/printer.rb#486 - sig { override.params(node: ::RBI::SigParam).void } - def visit_sig_param(node); end - - # : (SingletonClass node) -> void - # - # source://rbi//lib/rbi/printer.rb#170 - sig { override.params(node: ::RBI::SingletonClass).void } - def visit_singleton_class(node); end - - # : (Struct node) -> void - # - # source://rbi//lib/rbi/printer.rb#164 - sig { override.params(node: ::RBI::Struct).void } - def visit_struct(node); end - - # : (TStructField node) -> void - # - # source://rbi//lib/rbi/printer.rb#509 - sig { params(node: ::RBI::TStructField).void } - def visit_t_struct_field(node); end - - # : (TEnum node) -> void - # - # source://rbi//lib/rbi/printer.rb#528 - sig { override.params(node: ::RBI::TEnum).void } - def visit_tenum(node); end - - # : (TEnumBlock node) -> void - # - # source://rbi//lib/rbi/printer.rb#534 - sig { override.params(node: ::RBI::TEnumBlock).void } - def visit_tenum_block(node); end - - # : (Tree node) -> void - # - # source://rbi//lib/rbi/printer.rb#144 - sig { override.params(node: ::RBI::Tree).void } - def visit_tree(node); end - - # : (TStruct node) -> void - # - # source://rbi//lib/rbi/printer.rb#492 - sig { override.params(node: ::RBI::TStruct).void } - def visit_tstruct(node); end - - # : (TStructConst node) -> void - # - # source://rbi//lib/rbi/printer.rb#498 - sig { override.params(node: ::RBI::TStructConst).void } - def visit_tstruct_const(node); end - - # : (TStructProp node) -> void - # - # source://rbi//lib/rbi/printer.rb#504 - sig { override.params(node: ::RBI::TStructProp).void } - def visit_tstruct_prop(node); end - - # : (TypeMember node) -> void - # - # source://rbi//lib/rbi/printer.rb#547 - sig { override.params(node: ::RBI::TypeMember).void } - def visit_type_member(node); end - - # : (Visibility node) -> void - # - # source://rbi//lib/rbi/printer.rb#425 - sig { params(node: ::RBI::Visibility).void } - def visit_visibility(node); end - - # : (VisibilityGroup node) -> void - # - # source://rbi//lib/rbi/printer.rb#580 - sig { override.params(node: ::RBI::VisibilityGroup).void } - def visit_visibility_group(node); end -end - -# source://rbi//lib/rbi/printer.rb#5 -class RBI::PrinterError < ::RBI::Error; end - -# source://rbi//lib/rbi/model.rb#761 -class RBI::Private < ::RBI::Visibility - # : (?loc: Loc?, ?comments: Array[Comment]) ?{ (Private node) -> void } -> void - # - # @return [Private] a new instance of Private - # - # source://rbi//lib/rbi/model.rb#763 - 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#753 -class RBI::Protected < ::RBI::Visibility - # : (?loc: Loc?, ?comments: Array[Comment]) ?{ (Protected node) -> void } -> void - # - # @return [Protected] a new instance of Protected - # - # source://rbi//lib/rbi/model.rb#755 - 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#745 -class RBI::Public < ::RBI::Visibility - # : (?loc: Loc?, ?comments: Array[Comment]) ?{ (Public node) -> void } -> void - # - # @return [Public] a new instance of Public - # - # source://rbi//lib/rbi/model.rb#747 - 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/rbs/method_type_translator.rb#5 -module RBI::RBS; end - -# source://rbi//lib/rbi/rbs/method_type_translator.rb#6 -class RBI::RBS::MethodTypeTranslator - # : (Method) -> void - # - # @return [MethodTypeTranslator] a new instance of MethodTypeTranslator - # - # source://rbi//lib/rbi/rbs/method_type_translator.rb#22 - sig { params(method: ::RBI::Method).void } - def initialize(method); end - - # : Sig - # - # source://rbi//lib/rbi/rbs/method_type_translator.rb#19 - sig { returns(::RBI::Sig) } - def result; end - - # : (::RBS::MethodType) -> void - # - # source://rbi//lib/rbi/rbs/method_type_translator.rb#28 - sig { params(type: ::RBS::MethodType).void } - def visit(type); end - - private - - # : (::RBS::Types::Function::Param, Integer) -> SigParam - # - # source://rbi//lib/rbi/rbs/method_type_translator.rb#100 - sig { params(param: ::RBS::Types::Function::Param, index: ::Integer).returns(::RBI::SigParam) } - def translate_function_param(param, index); end - - # : (untyped) -> Type - # - # source://rbi//lib/rbi/rbs/method_type_translator.rb#115 - sig { params(type: T.untyped).returns(::RBI::Type) } - def translate_type(type); end - - # : (::RBS::Types::Block) -> void - # - # @raise [Error] - # - # source://rbi//lib/rbi/rbs/method_type_translator.rb#42 - sig { params(type: ::RBS::Types::Block).void } - def visit_block_type(type); end - - # : (::RBS::Types::Function) -> void - # - # source://rbi//lib/rbi/rbs/method_type_translator.rb#57 - sig { params(type: ::RBS::Types::Function).void } - def visit_function_type(type); end - - class << self - # : (Method, ::RBS::MethodType) -> Sig - # - # source://rbi//lib/rbi/rbs/method_type_translator.rb#11 - sig { params(method: ::RBI::Method, type: ::RBS::MethodType).returns(::RBI::Sig) } - def translate(method, type); end - end -end - -# source://rbi//lib/rbi/rbs/method_type_translator.rb#7 -class RBI::RBS::MethodTypeTranslator::Error < ::RBI::Error; end - -# source://rbi//lib/rbi/rbs/type_translator.rb#6 -class RBI::RBS::TypeTranslator - class << self - # : (NodeType) -> Type - # - # source://rbi//lib/rbi/rbs/type_translator.rb#37 - sig do - params( - type: T.any(::RBS::Types::Alias, ::RBS::Types::Bases::Any, ::RBS::Types::Bases::Bool, ::RBS::Types::Bases::Bottom, ::RBS::Types::Bases::Class, ::RBS::Types::Bases::Instance, ::RBS::Types::Bases::Nil, ::RBS::Types::Bases::Self, ::RBS::Types::Bases::Top, ::RBS::Types::Bases::Void, ::RBS::Types::ClassInstance, ::RBS::Types::ClassSingleton, ::RBS::Types::Function, ::RBS::Types::Interface, ::RBS::Types::Intersection, ::RBS::Types::Literal, ::RBS::Types::Optional, ::RBS::Types::Proc, ::RBS::Types::Record, ::RBS::Types::Tuple, ::RBS::Types::Union, ::RBS::Types::UntypedFunction, ::RBS::Types::Variable) - ).returns(::RBI::Type) - end - def translate(type); end - - private - - # : (::RBS::Types::ClassInstance) -> Type - # - # source://rbi//lib/rbi/rbs/type_translator.rb#99 - sig { params(type: ::RBS::Types::ClassInstance).returns(::RBI::Type) } - def translate_class_instance(type); end - - # : (::RBS::Types::Function) -> Type - # - # source://rbi//lib/rbi/rbs/type_translator.rb#107 - sig { params(type: ::RBS::Types::Function).returns(::RBI::Type) } - def translate_function(type); end - - # : (String type_name) -> String - # - # source://rbi//lib/rbi/rbs/type_translator.rb#154 - sig { params(type_name: ::String).returns(::String) } - def translate_t_generic_type(type_name); end - end -end - -# A comment representing a RBS type prefixed with `#:` -# -# source://rbi//lib/rbi/model.rb#81 -class RBI::RBSComment < ::RBI::Comment - # : (Object other) -> bool - # - # source://rbi//lib/rbi/model.rb#83 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end -end - -# source://rbi//lib/rbi/rbs_printer.rb#5 -class RBI::RBSPrinter < ::RBI::Visitor - # : (?out: (IO | StringIO), ?indent: Integer, ?print_locs: bool, ?positional_names: bool) -> void - # - # @return [RBSPrinter] a new instance of RBSPrinter - # - # source://rbi//lib/rbi/rbs_printer.rb#21 - sig do - params( - out: T.any(::IO, ::StringIO), - indent: ::Integer, - print_locs: T::Boolean, - positional_names: T::Boolean - ).void - end - def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), positional_names: T.unsafe(nil)); end - - # : Integer - # - # source://rbi//lib/rbi/rbs_printer.rb#15 - sig { returns(::Integer) } - def current_indent; end - - # : -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#39 - sig { void } - def dedent; end - - # : bool - # - # source://rbi//lib/rbi/rbs_printer.rb#9 - # @return [Boolean] - def in_visibility_group; end - - # : bool - # - # source://rbi//lib/rbi/rbs_printer.rb#9 - # @return [Boolean] - def in_visibility_group=(_arg0); end - - # : -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#34 - # Printing - sig { void } - def indent; end - - # : bool - # - # source://rbi//lib/rbi/rbs_printer.rb#18 - sig { returns(T::Boolean) } - def positional_names; end - - # : bool - # - # source://rbi//lib/rbi/rbs_printer.rb#18 - # @return [Boolean] - def positional_names=(_arg0); end - - # : Node? - # - # source://rbi//lib/rbi/rbs_printer.rb#12 - sig { returns(T.nilable(::RBI::Node)) } - def previous_node; end - - # Print a string without indentation nor `\n` at the end. - # : (String string) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#45 - # Print a string without indentation nor `\n` at the end. - sig { params(string: ::String).void } - def print(string); end - - # : (RBI::Attr node, Sig sig) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#292 - sig { params(node: ::RBI::Attr, sig: ::RBI::Sig).void } - def print_attr_sig(node, sig); end - - # : bool - # - # source://rbi//lib/rbi/rbs_printer.rb#9 - sig { returns(T::Boolean) } - def print_locs; end - - # : bool - # - # source://rbi//lib/rbi/rbs_printer.rb#9 - # @return [Boolean] - def print_locs=(_arg0); end - - # : (RBI::Method node, Sig sig) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#381 - sig { params(node: ::RBI::Method, sig: ::RBI::Sig).void } - def print_method_sig(node, sig); end - - # Print a string with indentation and `\n` at the end. - # : (String string) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#65 - # Print a string with indentation and `\n` at the end. - sig { params(string: ::String).void } - def printl(string); end - - # Print a string without indentation but with a `\n` at the end. - # : (?String? string) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#51 - # Print a string without indentation but with a `\n` at the end. - 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. - # : (?String? string) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#58 - # Print a string with indentation but without a `\n` at the end. - sig { params(string: T.nilable(::String)).void } - def printt(string = T.unsafe(nil)); end - - # : (Array[Node] nodes) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#72 - sig { override.params(nodes: T::Array[::RBI::Node]).void } - def visit_all(nodes); end - - # : (Arg node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#578 - sig { override.params(node: ::RBI::Arg).void } - def visit_arg(node); end - - # : (Attr node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#260 - sig { params(node: ::RBI::Attr).void } - def visit_attr(node); end - - # : (AttrAccessor node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#243 - sig { override.params(node: ::RBI::AttrAccessor).void } - def visit_attr_accessor(node); end - - # : (AttrReader node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#249 - sig { override.params(node: ::RBI::AttrReader).void } - def visit_attr_reader(node); end - - # : (AttrWriter node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#255 - sig { override.params(node: ::RBI::AttrWriter).void } - def visit_attr_writer(node); end - - # : (BlankLine node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#114 - sig { override.params(node: ::RBI::BlankLine).void } - def visit_blank_line(node); end - - # : (BlockParam node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#510 - sig { override.params(node: ::RBI::BlockParam).void } - def visit_block_param(node); end - - # : (Class node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#134 - sig { override.params(node: ::RBI::Class).void } - def visit_class(node); end - - # : (Comment node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#97 - sig { override.params(node: ::RBI::Comment).void } - def visit_comment(node); end - - # : (ConflictTree node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#711 - sig { override.params(node: ::RBI::ConflictTree).void } - def visit_conflict_tree(node); end - - # : (Const node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#227 - sig { override.params(node: ::RBI::Const).void } - def visit_const(node); end - - # : (Extend node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#522 - sig { override.params(node: ::RBI::Extend).void } - def visit_extend(node); end - - # : (File file) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#84 - sig { override.params(file: ::RBI::File).void } - def visit_file(file); end - - # : (Group node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#684 - sig { override.params(node: ::RBI::Group).void } - def visit_group(node); end - - # : (Helper node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#672 - sig { override.params(node: ::RBI::Helper).void } - def visit_helper(node); end - - # : (Include node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#516 - sig { override.params(node: ::RBI::Include).void } - def visit_include(node); end - - # : (KwArg node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#584 - sig { override.params(node: ::RBI::KwArg).void } - def visit_kw_arg(node); end - - # : (KwOptParam node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#498 - sig { override.params(node: ::RBI::KwOptParam).void } - def visit_kw_opt_param(node); end - - # : (KwParam node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#492 - sig { override.params(node: ::RBI::KwParam).void } - def visit_kw_param(node); end - - # : (KwRestParam node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#504 - sig { override.params(node: ::RBI::KwRestParam).void } - def visit_kw_rest_param(node); end - - # : (Method node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#315 - sig { override.params(node: ::RBI::Method).void } - def visit_method(node); end - - # : (MixesInClassMethods node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#678 - sig { override.params(node: ::RBI::MixesInClassMethods).void } - def visit_mixes_in_class_methods(node); end - - # : (Mixin node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#527 - sig { params(node: ::RBI::Mixin).void } - def visit_mixin(node); end - - # : (Module node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#128 - sig { override.params(node: ::RBI::Module).void } - def visit_module(node); end - - # : (OptParam node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#472 - sig { override.params(node: ::RBI::OptParam).void } - def visit_opt_param(node); end - - # : (Private node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#557 - sig { override.params(node: ::RBI::Private).void } - def visit_private(node); end - - # : (Protected node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#551 - sig { override.params(node: ::RBI::Protected).void } - def visit_protected(node); end - - # : (Public node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#545 - sig { override.params(node: ::RBI::Public).void } - def visit_public(node); end - - # : (ReqParam node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#462 - sig { override.params(node: ::RBI::ReqParam).void } - def visit_req_param(node); end - - # : (RequiresAncestor node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#705 - sig { override.params(node: ::RBI::RequiresAncestor).void } - def visit_requires_ancestor(node); end - - # : (RestParam node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#482 - sig { override.params(node: ::RBI::RestParam).void } - def visit_rest_param(node); end - - # : (Scope node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#151 - sig { params(node: ::RBI::Scope).void } - def visit_scope(node); end - - # : (Scope node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#214 - sig { params(node: ::RBI::Scope).void } - def visit_scope_body(node); end - - # : (ScopeConflict node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#721 - sig { override.params(node: ::RBI::ScopeConflict).void } - def visit_scope_conflict(node); end - - # : (Scope node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#161 - sig { params(node: ::RBI::Scope).void } - def visit_scope_header(node); end - - # : (Send node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#572 - sig { override.params(node: ::RBI::Send).void } - def visit_send(node); end - - # : (Sig node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#443 - sig { params(node: ::RBI::Sig).void } - def visit_sig(node); end - - # : (SigParam node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#456 - sig { params(node: ::RBI::SigParam).void } - def visit_sig_param(node); end - - # : (SingletonClass node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#146 - sig { override.params(node: ::RBI::SingletonClass).void } - def visit_singleton_class(node); end - - # : (Struct node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#140 - sig { override.params(node: ::RBI::Struct).void } - def visit_struct(node); end - - # : (TEnum node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#641 - sig { override.params(node: ::RBI::TEnum).void } - def visit_tenum(node); end - - # : (TEnumBlock node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#647 - sig { override.params(node: ::RBI::TEnumBlock).void } - def visit_tenum_block(node); end - - # : (Tree node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#120 - sig { override.params(node: ::RBI::Tree).void } - def visit_tree(node); end - - # : (TStruct node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#590 - sig { override.params(node: ::RBI::TStruct).void } - def visit_tstruct(node); end - - # : (TStructConst node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#625 - sig { override.params(node: ::RBI::TStructConst).void } - def visit_tstruct_const(node); end - - # : (TStructProp node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#633 - sig { override.params(node: ::RBI::TStructProp).void } - def visit_tstruct_prop(node); end - - # : (TypeMember node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#666 - sig { override.params(node: ::RBI::TypeMember).void } - def visit_type_member(node); end - - # : (Visibility node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#562 - sig { params(node: ::RBI::Visibility).void } - def visit_visibility(node); end - - # : (VisibilityGroup node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#691 - sig { override.params(node: ::RBI::VisibilityGroup).void } - def visit_visibility_group(node); end - - private - - # : (Node node) -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/rbs_printer.rb#824 - sig { params(node: ::RBI::Node).returns(T::Boolean) } - def oneline?(node); end - - # Parse a string containing a `T.let(x, X)` and extract the type - # - # Returns `nil` is the string is not a `T.let`. - # : (String? code) -> String? - # - # source://rbi//lib/rbi/rbs_printer.rb#858 - # Parse a string containing a `T.let(x, X)` and extract the type - # Returns `nil` is the string is not a `T.let`. - sig { params(code: T.nilable(::String)).returns(T.nilable(::String)) } - def parse_t_let(code); end - - # : ((Type | String) type) -> Type - # - # source://rbi//lib/rbi/rbs_printer.rb#846 - sig { params(type: T.any(::RBI::Type, ::String)).returns(::RBI::Type) } - def parse_type(type); end - - # : (Node node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#737 - sig { params(node: ::RBI::Node).void } - def print_blank_line_before(node); end - - # : (Node node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#756 - sig { params(node: ::RBI::Node).void } - def print_loc(node); end - - # : (Param node, last: bool) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#798 - sig { params(node: ::RBI::Param, last: T::Boolean).void } - def print_param_comment_leading_space(node, last:); end - - # : (Method node, SigParam param) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#762 - sig { params(node: ::RBI::Method, param: ::RBI::SigParam).void } - def print_sig_param(node, param); end - - # : (SigParam node, last: bool) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#816 - sig { params(node: ::RBI::SigParam, last: T::Boolean).void } - def print_sig_param_comment_leading_space(node, last:); end -end - -# source://rbi//lib/rbi/rbs_printer.rb#6 -class RBI::RBSPrinter::Error < ::RBI::Error; end - -# source://rbi//lib/rbi/model.rb#5 -class RBI::ReplaceNodeError < ::RBI::Error; end - -# source://rbi//lib/rbi/model.rb#532 -class RBI::ReqParam < ::RBI::Param - # : (String name, ?loc: Loc?, ?comments: Array[Comment]) ?{ (ReqParam node) -> void } -> void - # - # @return [ReqParam] a new instance of ReqParam - # - # source://rbi//lib/rbi/model.rb#534 - 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 - - # : (Object? other) -> bool - # - # source://rbi//lib/rbi/model.rb#540 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end -end - -# source://rbi//lib/rbi/model.rb#1100 -class RBI::RequiresAncestor < ::RBI::NodeWithComments - include ::RBI::Indexable - - # : (String name, ?loc: Loc?, ?comments: Array[Comment]) -> void - # - # @return [RequiresAncestor] a new instance of RequiresAncestor - # - # source://rbi//lib/rbi/model.rb#1105 - 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 - - # : -> Array[String] - # - # source://rbi//lib/rbi/index.rb#159 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # : String - # - # source://rbi//lib/rbi/model.rb#1102 - sig { returns(::String) } - def name; end - - # : -> String - # - # source://rbi//lib/rbi/model.rb#1112 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#562 -class RBI::RestParam < ::RBI::Param - # : (String name, ?loc: Loc?, ?comments: Array[Comment]) ?{ (RestParam node) -> void } -> void - # - # @return [RestParam] a new instance of RestParam - # - # source://rbi//lib/rbi/model.rb#564 - 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 - - # : (Object? other) -> bool - # - # source://rbi//lib/rbi/model.rb#576 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # : -> String - # - # source://rbi//lib/rbi/model.rb#571 - 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 - # : (?with_todo_comment: bool) -> void - # - # @return [AddSigTemplates] a new instance of AddSigTemplates - # - # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#8 - sig { params(with_todo_comment: T::Boolean).void } - def initialize(with_todo_comment: T.unsafe(nil)); end - - # : (Node? node) -> void - # - # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#15 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # : (Attr attr) -> void - # - # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#29 - sig { params(attr: ::RBI::Attr).void } - def add_attr_sig(attr); end - - # : (Method method) -> void - # - # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#44 - sig { params(method: ::RBI::Method).void } - def add_method_sig(method); end - - # : (NodeWithComments node) -> void - # - # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#55 - 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 - # : (String annotation, ?annotate_scopes: bool, ?annotate_properties: bool) -> void - # - # @return [Annotate] a new instance of Annotate - # - # source://rbi//lib/rbi/rewriters/annotate.rb#8 - 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 - - # : (Node? node) -> void - # - # source://rbi//lib/rbi/rewriters/annotate.rb#17 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # : (NodeWithComments node) -> void - # - # source://rbi//lib/rbi/rewriters/annotate.rb#30 - sig { params(node: ::RBI::NodeWithComments).void } - def annotate_node(node); end - - # : (Node node) -> bool - # - # @return [Boolean] - # - # 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/attr_to_methods.rb#22 -class RBI::Rewriters::AttrToMethods < ::RBI::Visitor - # : (Node? node) -> void - # - # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#25 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # : (Node node, with: Array[Node]) -> void - # - # @raise [ReplaceNodeError] - # - # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#38 - sig { params(node: ::RBI::Node, with: T::Array[::RBI::Node]).void } - def replace(node, with:); end -end - -# source://rbi//lib/rbi/rewriters/deannotate.rb#6 -class RBI::Rewriters::Deannotate < ::RBI::Visitor - # : (String annotation) -> void - # - # @return [Deannotate] a new instance of Deannotate - # - # source://rbi//lib/rbi/rewriters/deannotate.rb#8 - sig { params(annotation: ::String).void } - def initialize(annotation); end - - # : (Node? node) -> void - # - # source://rbi//lib/rbi/rewriters/deannotate.rb#15 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # : (NodeWithComments node) -> void - # - # source://rbi//lib/rbi/rewriters/deannotate.rb#26 - sig { params(node: ::RBI::NodeWithComments).void } - def deannotate_node(node); end -end - -# Take a gem version and filter out all RBI that is not relevant to that version based on @version annotations -# in comments. As an example: -# -# ~~~rb -# tree = Parser.parse_string(<<~RBI) -# class Foo -# # @version > 0.3.0 -# def bar -# end -# -# # @version <= 0.3.0 -# def bar(arg1) -# end -# end -# RBI -# -# Rewriters::FilterVersions.filter(tree, Gem::Version.new("0.3.1")) -# -# assert_equal(<<~RBI, tree.string) -# class Foo -# # @version > 0.3.0 -# def bar -# end -# end -# RBI -# ~~~ -# -# Supported operators: -# - equals `=` -# - not equals `!=` -# - greater than `>` -# - greater than or equal to `>=` -# - less than `<` -# - less than or equal to `<=` -# - pessimistic or twiddle-wakka`~>` -# -# And/or logic: -# - "And" logic: put multiple versions on the same line -# - e.g. `@version > 0.3.0, <1.0.0` means version must be greater than 0.3.0 AND less than 1.0.0 -# - "Or" logic: put multiple versions on subsequent lines -# - e.g. the following means version must be less than 0.3.0 OR greater than 1.0.0 -# ``` -# # @version < 0.3.0 -# # @version > 1.0.0 -# ``` -# Prerelease versions: -# - Prerelease versions are considered less than their non-prerelease counterparts -# - e.g. `0.4.0-prerelease` is less than `0.4.0` -# -# RBI with no versions: -# - RBI with no version annotations are automatically counted towards ALL versions -# -# source://rbi//lib/rbi/rewriters/filter_versions.rb#57 -# Take a gem version and filter out all RBI that is not relevant to that version based on @version annotations -# in comments. As an example: -# ~~~rb -# tree = Parser.parse_string(<<~RBI) -# class Foo -# # @version > 0.3.0 -# def bar -# end -# # @version <= 0.3.0 -# def bar(arg1) -# end -# RBI -# Rewriters::FilterVersions.filter(tree, Gem::Version.new("0.3.1")) -# assert_equal(<<~RBI, tree.string) -# ~~~ -# Supported operators: -# - equals `=` -# - not equals `!=` -# - greater than `>` -# - greater than or equal to `>=` -# - less than `<` -# - less than or equal to `<=` -# - pessimistic or twiddle-wakka`~>` -# And/or logic: -# - "And" logic: put multiple versions on the same line -# - e.g. `@version > 0.3.0, <1.0.0` means version must be greater than 0.3.0 AND less than 1.0.0 -# - "Or" logic: put multiple versions on subsequent lines -# - e.g. the following means version must be less than 0.3.0 OR greater than 1.0.0 -# ``` -# # @version < 0.3.0 -# # @version > 1.0.0 -# Prerelease versions: -# - Prerelease versions are considered less than their non-prerelease counterparts -# - e.g. `0.4.0-prerelease` is less than `0.4.0` -# RBI with no versions: -class RBI::Rewriters::FilterVersions < ::RBI::Visitor - # : (Gem::Version version) -> void - # - # @return [FilterVersions] a new instance of FilterVersions - # - # source://rbi//lib/rbi/rewriters/filter_versions.rb#69 - sig { params(version: ::Gem::Version).void } - def initialize(version); end - - # : (Node? node) -> void - # - # source://rbi//lib/rbi/rewriters/filter_versions.rb#76 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - class << self - # : (Tree tree, Gem::Version version) -> void - # - # source://rbi//lib/rbi/rewriters/filter_versions.rb#62 - sig { params(tree: ::RBI::Tree, version: ::Gem::Version).void } - def filter(tree, version); end - end -end - -# source://rbi//lib/rbi/rewriters/filter_versions.rb#58 -RBI::Rewriters::FilterVersions::VERSION_PREFIX = T.let(T.unsafe(nil), String) - -# Rewrite non-singleton methods inside singleton classes to singleton methods -# -# Example: -# ~~~rb -# class << self -# def m1; end -# def self.m2; end -# -# class << self -# def m3; end -# end -# end -# ~~~ -# -# will be rewritten to: -# -# ~~~rb -# def self.m1; end -# -# class << self -# def self.m2; end -# def self.m3; end -# end -# ~~~ -# -# source://rbi//lib/rbi/rewriters/flatten_singleton_methods.rb#30 -# Rewrite non-singleton methods inside singleton classes to singleton methods -# Example: -# ~~~rb -# class << self -# def m1; end -# def self.m2; end -# class << self -# def m3; end -# end -# end -# will be rewritten to: -# def self.m1; end -# def self.m2; end -# def self.m3; end -class RBI::Rewriters::FlattenSingletonMethods < ::RBI::Visitor - # : (Node? node) -> void - # - # source://rbi//lib/rbi/rewriters/flatten_singleton_methods.rb#33 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end -end - -# Flattens visibility nodes into method nodes -# -# Example: -# ~~~rb -# class A -# def m1; end -# private -# def m2; end -# def m3; end -# end -# ~~~ -# -# will be transformed into: -# -# ~~~rb -# class A -# def m1; end -# private def m2; end -# private def m3; end -# end -# ~~~ -# -# source://rbi//lib/rbi/rewriters/flatten_visibilities.rb#27 -# Flattens visibility nodes into method nodes -# Example: -# ~~~rb -# class A -# def m1; end -# private -# def m2; end -# def m3; end -# end -# will be transformed into: -# private def m2; end -# private def m3; end -class RBI::Rewriters::FlattenVisibilities < ::RBI::Visitor - # : -> void - # - # @return [FlattenVisibilities] a new instance of FlattenVisibilities - # - # source://rbi//lib/rbi/rewriters/flatten_visibilities.rb#29 - sig { void } - def initialize; end - - # : (Node? node) -> void - # - # source://rbi//lib/rbi/rewriters/flatten_visibilities.rb#37 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end -end - -# source://rbi//lib/rbi/rewriters/group_nodes.rb#8 -class RBI::Rewriters::GroupNodes < ::RBI::Visitor - # : (Node? node) -> void - # - # source://rbi//lib/rbi/rewriters/group_nodes.rb#11 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # : (Node node) -> Group::Kind - # - # source://rbi//lib/rbi/rewriters/group_nodes.rb#35 - sig { params(node: ::RBI::Node).returns(::RBI::Group::Kind) } - def group_kind(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 -# Merge two RBI trees together -# Be this `Tree`: -# ~~~rb -# class Foo -# attr_accessor :a -# def m; end -# C = 10 -# end -# Merged with this one: -# attr_reader :a -# def m(x); end -# Compatible definitions are merged together while incompatible definitions are moved into a `ConflictTree`: -# <<<<<<< left -# ======= -# >>>>>>> right -class RBI::Rewriters::Merge - # : (?left_name: String, ?right_name: String, ?keep: Keep) -> void - # - # @return [Merge] a new instance of 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 - - # : (Tree tree) -> void - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#75 - sig { params(tree: ::RBI::Tree).void } - def merge(tree); end - - # : MergeTree - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#63 - sig { returns(::RBI::MergeTree) } - def tree; end - - class << self - # : (Tree left, Tree right, ?left_name: String, ?right_name: String, ?keep: Keep) -> MergeTree - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#50 - 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 - - # : -> String - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#89 - sig { returns(::String) } - def to_s; end - - class << self - # source://sorbet-runtime/0.5.11953/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#238 -# Merge adjacent conflict trees -# Transform this: -# ~~~rb -# class Foo -# <<<<<<< left -# def m1; end -# ======= -# def m1(a); end -# >>>>>>> right -# def m2(a); end -# def m2; end -# end -# Into this: -class RBI::Rewriters::Merge::ConflictTreeMerger < ::RBI::Visitor - # : (Node? node) -> void - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#241 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - # : (Array[Node] nodes) -> void - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#247 - sig { override.params(nodes: T::Array[::RBI::Node]).void } - def visit_all(nodes); end - - private - - # : (Tree left, Tree right) -> void - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#268 - 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#40 -class RBI::Rewriters::Merge::Keep < ::T::Enum - enums do - LEFT = new - NONE = new - RIGHT = new - end -end - -# source://rbi//lib/rbi/rewriters/merge_trees.rb#94 -class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor - # : (Tree output, ?left_name: String, ?right_name: String, ?keep: Keep) -> void - # - # @return [TreeMerger] a new instance of TreeMerger - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#99 - 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 - - # : Array[Conflict] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#96 - sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } - def conflicts; end - - # : (Node? node) -> void - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#112 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # : -> Tree - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#161 - sig { returns(::RBI::Tree) } - def current_scope; end - - # : (Scope left, Scope right) -> void - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#178 - sig { params(left: ::RBI::Scope, right: ::RBI::Scope).void } - def make_conflict_scope(left, right); end - - # : (Node left, Node right) -> void - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#185 - sig { params(left: ::RBI::Node, right: ::RBI::Node).void } - def make_conflict_tree(left, right); end - - # : (Node node) -> Node? - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#166 - sig { params(node: ::RBI::Node).returns(T.nilable(::RBI::Node)) } - def previous_definition(node); end - - # : (Scope left, Scope right) -> Scope - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#197 - 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_members.rb#6 -class RBI::Rewriters::NestNonPublicMembers < ::RBI::Visitor - # : (Node? node) -> void - # - # source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#9 - 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 - # : (Node? node) -> void - # - # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#9 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end -end - -# This rewriter moves top-level members into a top-level Object class -# -# Example: -# ~~~rb -# def foo; end -# attr_reader :bar -# ~~~ -# -# will be rewritten to: -# -# ~~~rb -# class Object -# def foo; end -# attr_reader :bar -# end -# ~~~ -# -# source://rbi//lib/rbi/rewriters/nest_top_level_members.rb#22 -# This rewriter moves top-level members into a top-level Object class -# Example: -# ~~~rb -# def foo; end -# attr_reader :bar -# will be rewritten to: -# class Object -# def foo; end -# attr_reader :bar -# end -class RBI::Rewriters::NestTopLevelMembers < ::RBI::Visitor - # : -> void - # - # @return [NestTopLevelMembers] a new instance of NestTopLevelMembers - # - # source://rbi//lib/rbi/rewriters/nest_top_level_members.rb#24 - sig { void } - def initialize; end - - # : (Node? node) -> void - # - # source://rbi//lib/rbi/rewriters/nest_top_level_members.rb#32 - 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 -# 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 -# index = Index.index(tree1, tree2) -# We can use `RemoveKnownDefinitions` to remove the definitions found in the `index` from the `Tree` to clean: -# tree_to_clean = Parser.parse_string(<<~RBI) -# def bar; end -# BAR = 42 -# cleaned_tree, operations = RemoveKnownDefinitions.remove(tree_to_clean, index) -# assert_equal(<<~RBI, cleaned_tree) -# 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 -class RBI::Rewriters::RemoveKnownDefinitions < ::RBI::Visitor - # : (Index index) -> void - # - # @return [RemoveKnownDefinitions] a new instance of RemoveKnownDefinitions - # - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#53 - sig { params(index: ::RBI::Index).void } - def initialize(index); end - - # : Array[Operation] - # - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#50 - sig { returns(T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]) } - def operations; end - - # : (Node? node) -> void - # - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#75 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - # : (Array[Node] nodes) -> void - # - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#69 - sig { params(nodes: T::Array[::RBI::Node]).void } - def visit_all(nodes); end - - private - - # : (Node node, Node previous) -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#103 - sig { params(node: ::RBI::Node, previous: ::RBI::Node).returns(T::Boolean) } - def can_delete_node?(node, previous); end - - # : (Node node, Node previous) -> void - # - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#121 - sig { params(node: ::RBI::Node, previous: ::RBI::Node).void } - def delete_node(node, previous); end - - # : (Indexable node) -> Node? - # - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#94 - sig { params(node: ::RBI::Indexable).returns(T.nilable(::RBI::Node)) } - def previous_definition_for(node); end - - class << self - # : (Tree tree, Index index) -> [Tree, Array[Operation]] - # - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#61 - 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#126 -class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct - const :deleted_node, ::RBI::Node - const :duplicate_of, ::RBI::Node - - # : -> String - # - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#131 - sig { returns(::String) } - def to_s; end - - class << self - # source://sorbet-runtime/0.5.11953/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 - # : (Node? node) -> void - # - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#9 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # : (Group::Kind kind) -> Integer - # - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#72 - sig { params(kind: ::RBI::Group::Kind).returns(::Integer) } - def group_rank(kind); end - - # : (Node node) -> String? - # - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#93 - sig { params(node: ::RBI::Node).returns(T.nilable(::String)) } - def node_name(node); end - - # : (Node node) -> Integer - # - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#44 - sig { params(node: ::RBI::Node).returns(::Integer) } - def node_rank(node); end - - # : (Node node) -> void - # - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#105 - sig { params(node: ::RBI::Node).void } - def sort_node_names!(node); end -end - -# Translate all RBS signature comments to Sorbet RBI signatures -# -# source://rbi//lib/rbi/rewriters/translate_rbs_sigs.rb#7 -class RBI::Rewriters::TranslateRBSSigs < ::RBI::Visitor - # : (Node? node) -> void - # - # source://rbi//lib/rbi/rewriters/translate_rbs_sigs.rb#12 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # : (Method | Attr) -> Array[RBSComment] - # - # source://rbi//lib/rbi/rewriters/translate_rbs_sigs.rb#34 - sig { params(node: T.any(::RBI::Attr, ::RBI::Method)).returns(T::Array[::RBI::RBSComment]) } - def extract_rbs_comments(node); end - - # : (Attr, RBSComment) -> Sig - # - # source://rbi//lib/rbi/rewriters/translate_rbs_sigs.rb#61 - sig { params(node: ::RBI::Attr, comment: ::RBI::RBSComment).returns(::RBI::Sig) } - def translate_rbs_attr_type(node, comment); end - - # : (Method, RBSComment) -> Sig - # - # source://rbi//lib/rbi/rewriters/translate_rbs_sigs.rb#53 - sig { params(node: ::RBI::Method, comment: ::RBI::RBSComment).returns(::RBI::Sig) } - def translate_rbs_method_type(node, comment); end -end - -# source://rbi//lib/rbi/rewriters/translate_rbs_sigs.rb#8 -class RBI::Rewriters::TranslateRBSSigs::Error < ::RBI::Error; end - -# Scopes -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/model.rb#166 -class RBI::Scope < ::RBI::Tree - include ::RBI::Indexable - - abstract! - - # Duplicate `self` scope without its body - # : -> self - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#337 - # Duplicate `self` scope without its body - sig { returns(T.self_type) } - def dup_empty; end - - # @abstract - # - # source://rbi//lib/rbi/model.rb#173 - sig { abstract.returns(::String) } - def fully_qualified_name; end - - # : -> Array[String] - # - # source://rbi//lib/rbi/index.rb#89 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # : -> String - # - # source://rbi//lib/rbi/model.rb#177 - 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#577 -# 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 -class RBI::ScopeConflict < ::RBI::Tree - # : (left: Scope, right: Scope, ?left_name: String, ?right_name: String) -> void - # - # @return [ScopeConflict] a new instance of ScopeConflict - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#585 - 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 - - # : Scope - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#579 - sig { returns(::RBI::Scope) } - def left; end - - # : String - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#582 - sig { returns(::String) } - def left_name; end - - # : Scope - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#579 - # @return [Scope] - def right; end - - # : String - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#582 - # @return [String] - def right_name; end -end - -# Sends -# -# source://rbi//lib/rbi/model.rb#771 -class RBI::Send < ::RBI::NodeWithComments - include ::RBI::Indexable - - # : (String method, ?Array[Arg] args, ?loc: Loc?, ?comments: Array[Comment]) ?{ (Send node) -> void } -> void - # - # @return [Send] a new instance of Send - # - # source://rbi//lib/rbi/model.rb#779 - 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 - - # : (Arg arg) -> void - # - # source://rbi//lib/rbi/model.rb#787 - sig { params(arg: ::RBI::Arg).void } - def <<(arg); end - - # : (Object? other) -> bool - # - # source://rbi//lib/rbi/model.rb#792 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # : Array[Arg] - # - # source://rbi//lib/rbi/model.rb#776 - sig { returns(T::Array[::RBI::Arg]) } - def args; end - - # : (Node other) -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#503 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # : -> Array[String] - # - # source://rbi//lib/rbi/index.rb#189 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # : String - # - # source://rbi//lib/rbi/model.rb#773 - sig { returns(::String) } - def method; end - - # : -> String - # - # source://rbi//lib/rbi/model.rb#797 - sig { returns(::String) } - def to_s; end -end - -# Sorbet's sigs -# -# source://rbi//lib/rbi/model.rb#846 -class RBI::Sig < ::RBI::NodeWithComments - # : (?params: Array[SigParam], ?return_type: (Type | String), ?is_abstract: bool, ?is_override: bool, ?is_overridable: bool, ?is_final: bool, ?allow_incompatible_override: bool, ?type_params: Array[String], ?checked: Symbol?, ?loc: Loc?, ?comments: Array[Comment]) ?{ (Sig node) -> void } -> void - # - # @return [Sig] a new instance of Sig - # - # source://rbi//lib/rbi/model.rb#863 - sig do - params( - params: T::Array[::RBI::SigParam], - return_type: T.any(::RBI::Type, ::String), - is_abstract: T::Boolean, - is_override: T::Boolean, - is_overridable: T::Boolean, - is_final: T::Boolean, - allow_incompatible_override: T::Boolean, - type_params: T::Array[::String], - checked: T.nilable(::Symbol), - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - 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), allow_incompatible_override: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # : (SigParam param) -> void - # - # source://rbi//lib/rbi/model.rb#891 - sig { params(param: ::RBI::SigParam).void } - def <<(param); end - - # : (Object other) -> bool - # - # source://rbi//lib/rbi/model.rb#901 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # : (String name, (Type | String) type) -> void - # - # source://rbi//lib/rbi/model.rb#896 - sig { params(name: ::String, type: T.any(::RBI::Type, ::String)).void } - def add_param(name, type); end - - # : bool - # - # source://rbi//lib/rbi/model.rb#854 - # @return [Boolean] - def allow_incompatible_override; end - - # : bool - # - # source://rbi//lib/rbi/model.rb#854 - # @return [Boolean] - def allow_incompatible_override=(_arg0); end - - # : Symbol? - # - # source://rbi//lib/rbi/model.rb#860 - sig { returns(T.nilable(::Symbol)) } - def checked; end - - # : Symbol? - # - # source://rbi//lib/rbi/model.rb#860 - # @return [Symbol, nil] - def checked=(_arg0); end - - # : bool - # - # source://rbi//lib/rbi/model.rb#854 - sig { returns(T::Boolean) } - def is_abstract; end - - # : bool - # - # source://rbi//lib/rbi/model.rb#854 - # @return [Boolean] - def is_abstract=(_arg0); end - - # : bool - # - # source://rbi//lib/rbi/model.rb#854 - # @return [Boolean] - def is_final; end - - # : bool - # - # source://rbi//lib/rbi/model.rb#854 - # @return [Boolean] - def is_final=(_arg0); end - - # : bool - # - # source://rbi//lib/rbi/model.rb#854 - # @return [Boolean] - def is_overridable; end - - # : bool - # - # source://rbi//lib/rbi/model.rb#854 - # @return [Boolean] - def is_overridable=(_arg0); end - - # : bool - # - # source://rbi//lib/rbi/model.rb#854 - # @return [Boolean] - def is_override; end - - # : bool - # - # source://rbi//lib/rbi/model.rb#854 - # @return [Boolean] - def is_override=(_arg0); end - - # : Array[SigParam] - # - # source://rbi//lib/rbi/model.rb#848 - sig { returns(T::Array[::RBI::SigParam]) } - def params; end - - # : (Type | String) - # - # source://rbi//lib/rbi/model.rb#851 - sig { returns(T.any(::RBI::Type, ::String)) } - def return_type; end - - # : (Type | String) - # - # source://rbi//lib/rbi/model.rb#851 - # @return [Type, String] - def return_type=(_arg0); end - - # : Array[String] - # - # source://rbi//lib/rbi/model.rb#857 - sig { returns(T::Array[::String]) } - def type_params; end -end - -# source://rbi//lib/rbi/model.rb#910 -class RBI::SigParam < ::RBI::NodeWithComments - # : (String name, (Type | String) type, ?loc: Loc?, ?comments: Array[Comment]) ?{ (SigParam node) -> void } -> void - # - # @return [SigParam] a new instance of SigParam - # - # source://rbi//lib/rbi/model.rb#918 - sig do - params( - name: ::String, - type: T.any(::RBI::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 - - # : (Object other) -> bool - # - # source://rbi//lib/rbi/model.rb#926 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # : String - # - # source://rbi//lib/rbi/model.rb#912 - sig { returns(::String) } - def name; end - - # : (Type | String) - # - # source://rbi//lib/rbi/model.rb#915 - sig { returns(T.any(::RBI::Type, ::String)) } - def type; end -end - -# source://rbi//lib/rbi/model.rb#226 -class RBI::SingletonClass < ::RBI::Scope - # : (?loc: Loc?, ?comments: Array[Comment]) ?{ (SingletonClass node) -> void } -> void - # - # @return [SingletonClass] a new instance of SingletonClass - # - # source://rbi//lib/rbi/model.rb#228 - 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 - - # : -> String - # - # source://rbi//lib/rbi/model.rb#235 - sig { override.returns(::String) } - def fully_qualified_name; end -end - -# source://rbi//lib/rbi/model.rb#240 -class RBI::Struct < ::RBI::Scope - # : (String name, ?members: Array[Symbol], ?keyword_init: bool, ?loc: Loc?, ?comments: Array[Comment]) ?{ (Struct struct) -> void } -> void - # - # @return [Struct] a new instance of Struct - # - # source://rbi//lib/rbi/model.rb#251 - 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 - - # : (Node other) -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#378 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # : -> String - # - # source://rbi//lib/rbi/model.rb#261 - sig { override.returns(::String) } - def fully_qualified_name; end - - # : bool - # - # source://rbi//lib/rbi/model.rb#248 - sig { returns(T::Boolean) } - def keyword_init; end - - # : bool - # - # source://rbi//lib/rbi/model.rb#248 - # @return [Boolean] - def keyword_init=(_arg0); end - - # : Array[Symbol] - # - # source://rbi//lib/rbi/model.rb#245 - sig { returns(T::Array[::Symbol]) } - def members; end - - # : Array[Symbol] - # - # source://rbi//lib/rbi/model.rb#245 - # @return [Array] - def members=(_arg0); end - - # : String - # - # source://rbi//lib/rbi/model.rb#242 - sig { returns(::String) } - def name; end - - # : String - # - # source://rbi//lib/rbi/model.rb#242 - # @return [String] - def name=(_arg0); end -end - -# Sorbet's T::Enum -# -# source://rbi//lib/rbi/model.rb#1012 -class RBI::TEnum < ::RBI::Class - # : (String name, ?loc: Loc?, ?comments: Array[Comment]) ?{ (TEnum klass) -> void } -> void - # - # @return [TEnum] a new instance of TEnum - # - # source://rbi//lib/rbi/model.rb#1014 - 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#1020 -class RBI::TEnumBlock < ::RBI::Scope - # : (?loc: Loc?, ?comments: Array[Comment]) ?{ (TEnumBlock node) -> void } -> void - # - # @return [TEnumBlock] a new instance of TEnumBlock - # - # source://rbi//lib/rbi/model.rb#1022 - sig do - params( - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::TEnumBlock).void) - ).void - end - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # : -> String - # - # source://rbi//lib/rbi/model.rb#1029 - sig { override.returns(::String) } - def fully_qualified_name; end - - # : -> Array[String] - # - # source://rbi//lib/rbi/index.rb#219 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # : -> String - # - # source://rbi//lib/rbi/model.rb#1035 - sig { override.returns(::String) } - def to_s; end -end - -# Sorbet's T::Struct -# -# source://rbi//lib/rbi/model.rb#933 -class RBI::TStruct < ::RBI::Class - # : (String name, ?loc: Loc?, ?comments: Array[Comment]) ?{ (TStruct klass) -> void } -> void - # - # @return [TStruct] a new instance of TStruct - # - # source://rbi//lib/rbi/model.rb#935 - 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#968 -class RBI::TStructConst < ::RBI::TStructField - include ::RBI::Indexable - - # : (String name, (Type | String) type, ?default: String?, ?loc: Loc?, ?comments: Array[Comment]) ?{ (TStructConst node) -> void } -> void - # - # @return [TStructConst] a new instance of TStructConst - # - # source://rbi//lib/rbi/model.rb#970 - sig do - params( - name: ::String, - type: T.any(::RBI::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 - - # : (Node other) -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#519 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # : -> Array[String] - # - # source://rbi//lib/rbi/model.rb#977 - sig { override.returns(T::Array[::String]) } - def fully_qualified_names; end - - # : -> Array[String] - # - # source://rbi//lib/rbi/index.rb#199 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # : -> String - # - # source://rbi//lib/rbi/model.rb#984 - 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#941 -class RBI::TStructField < ::RBI::NodeWithComments - abstract! - - # : (String name, (Type | String) type, ?default: String?, ?loc: Loc?, ?comments: Array[Comment]) -> void - # - # @return [TStructField] a new instance of TStructField - # - # source://rbi//lib/rbi/model.rb#957 - sig do - params( - name: ::String, - type: T.any(::RBI::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 - - # : (Node other) -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#511 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # : String? - # - # source://rbi//lib/rbi/model.rb#954 - sig { returns(T.nilable(::String)) } - def default; end - - # : String? - # - # source://rbi//lib/rbi/model.rb#954 - # @return [String, nil] - def default=(_arg0); end - - # @abstract - # - # source://rbi//lib/rbi/model.rb#965 - sig { abstract.returns(T::Array[::String]) } - def fully_qualified_names; end - - # : String - # - # source://rbi//lib/rbi/model.rb#948 - sig { returns(::String) } - def name; end - - # : String - # - # source://rbi//lib/rbi/model.rb#948 - # @return [String] - def name=(_arg0); end - - # : (Type | String) - # - # source://rbi//lib/rbi/model.rb#951 - sig { returns(T.any(::RBI::Type, ::String)) } - def type; end - - # : (Type | String) - # - # source://rbi//lib/rbi/model.rb#951 - # @return [Type, String] - def type=(_arg0); end -end - -# source://rbi//lib/rbi/model.rb#989 -class RBI::TStructProp < ::RBI::TStructField - include ::RBI::Indexable - - # : (String name, (Type | String) type, ?default: String?, ?loc: Loc?, ?comments: Array[Comment]) ?{ (TStructProp node) -> void } -> void - # - # @return [TStructProp] a new instance of TStructProp - # - # source://rbi//lib/rbi/model.rb#991 - sig do - params( - name: ::String, - type: T.any(::RBI::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 - - # : (Node other) -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#527 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # : -> Array[String] - # - # source://rbi//lib/rbi/model.rb#998 - sig { override.returns(T::Array[::String]) } - def fully_qualified_names; end - - # : -> Array[String] - # - # source://rbi//lib/rbi/index.rb#209 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # : -> String - # - # source://rbi//lib/rbi/model.rb#1005 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#112 -class RBI::Tree < ::RBI::NodeWithComments - # : (?loc: Loc?, ?comments: Array[Comment]) ?{ (Tree node) -> void } -> void - # - # @return [Tree] a new instance of Tree - # - # source://rbi//lib/rbi/model.rb#117 - 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 - - # : (Node node) -> void - # - # source://rbi//lib/rbi/model.rb#124 - sig { params(node: ::RBI::Node).void } - def <<(node); end - - # : (?with_todo_comment: bool) -> void - # - # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#63 - sig { params(with_todo_comment: T::Boolean).void } - def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end - - # : (String annotation, ?annotate_scopes: bool, ?annotate_properties: bool) -> void - # - # source://rbi//lib/rbi/rewriters/annotate.rb#46 - 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.16.11/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.16.11/lib/tapioca/rbi_ext/model.rb#45 - sig { params(name: ::String, value: ::String).void } - def create_constant(name, value:); end - - # source://tapioca/0.16.11/lib/tapioca/rbi_ext/model.rb#55 - sig { params(name: ::String).void } - def create_extend(name); end - - # source://tapioca/0.16.11/lib/tapioca/rbi_ext/model.rb#50 - sig { params(name: ::String).void } - def create_include(name); end - - # source://tapioca/0.16.11/lib/tapioca/rbi_ext/model.rb#90 - sig do - params( - name: ::String, - parameters: T::Array[::RBI::TypedParam], - return_type: T.nilable(::String), - class_method: T::Boolean, - visibility: ::RBI::Visibility, - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Method).void) - ).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), &block); end - - # source://tapioca/0.16.11/lib/tapioca/rbi_ext/model.rb#60 - sig { params(name: ::String).void } - def create_mixes_in_class_methods(name); end - - # source://tapioca/0.16.11/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.16.11/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.16.11/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 - - # : (String annotation) -> void - # - # source://rbi//lib/rbi/rewriters/deannotate.rb#38 - sig { params(annotation: ::String).void } - def deannotate!(annotation); end - - # : -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#130 - sig { returns(T::Boolean) } - def empty?; end - - # : (Gem::Version version) -> void - # - # source://rbi//lib/rbi/rewriters/filter_versions.rb#113 - sig { params(version: ::Gem::Version).void } - def filter_versions!(version); end - - # : -> void - # - # source://rbi//lib/rbi/rewriters/flatten_singleton_methods.rb#57 - sig { void } - def flatten_singleton_methods!; end - - # : -> void - # - # source://rbi//lib/rbi/rewriters/flatten_visibilities.rb#57 - sig { void } - def flatten_visibilities!; end - - # : -> void - # - # source://rbi//lib/rbi/rewriters/group_nodes.rb#78 - sig { void } - def group_nodes!; end - - # : -> Index - # - # source://rbi//lib/rbi/index.rb#64 - sig { returns(::RBI::Index) } - def index; end - - # : (Tree other, ?left_name: String, ?right_name: String, ?keep: Rewriters::Merge::Keep) -> MergeTree - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#314 - 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 - - # : -> void - # - # source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#43 - sig { void } - def nest_non_public_members!; end - - # : -> void - # - # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#33 - sig { void } - def nest_singleton_methods!; end - - # : -> void - # - # source://rbi//lib/rbi/rewriters/nest_top_level_members.rb#60 - sig { void } - def nest_top_level_members!; end - - # : Array[Node] - # - # source://rbi//lib/rbi/model.rb#114 - sig { returns(T::Array[::RBI::Node]) } - def nodes; end - - # : -> void - # - # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#50 - sig { void } - def replace_attributes_with_methods!; end - - # : -> void - # - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#116 - sig { void } - def sort_nodes!; end - - # : -> void - # - # source://rbi//lib/rbi/rewriters/translate_rbs_sigs.rb#82 - sig { void } - def translate_rbs_sigs!; end - - private - - # source://tapioca/0.16.11/lib/tapioca/rbi_ext/model.rb#123 - sig { params(node: ::RBI::Node).returns(::RBI::Node) } - def create_node(node); end - - # source://tapioca/0.16.11/lib/tapioca/rbi_ext/model.rb#118 - sig { returns(T::Hash[::String, ::RBI::Node]) } - def nodes_cache; end -end - -# The base class for all RBI types. -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/type.rb#6 -class RBI::Type - abstract! - - # : -> void - # - # @return [Type] a new instance of Type - # - # source://rbi//lib/rbi/type.rb#695 - sig { void } - def initialize; end - - # @abstract - # - # source://rbi//lib/rbi/type.rb#741 - sig { abstract.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # : (BasicObject other) -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/type.rb#744 - sig { params(other: ::BasicObject).returns(T::Boolean) } - def eql?(other); end - - # : -> Integer - # - # source://rbi//lib/rbi/type.rb#750 - sig { override.returns(::Integer) } - def hash; end - - # Returns a new type that is `nilable` if it is not already. - # - # If the type is already nilable, it returns itself. - # ```ruby - # type = RBI::Type.simple("String") - # type.to_rbi # => "String" - # type.nilable.to_rbi # => "T.nilable(String)" - # type.nilable.nilable.to_rbi # => "T.nilable(String)" - # ``` - # : -> Type - # - # source://rbi//lib/rbi/type.rb#709 - # Returns a new type that is `nilable` if it is not already. - # If the type is already nilable, it returns itself. - # ```ruby - # type = RBI::Type.simple("String") - # type.to_rbi # => "String" - # type.nilable.to_rbi # => "T.nilable(String)" - # type.nilable.nilable.to_rbi # => "T.nilable(String)" - # ``` - sig { returns(::RBI::Type) } - def nilable; end - - # Returns whether the type is nilable. - # : -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/type.rb#736 - # Returns whether the type is nilable. - sig { returns(T::Boolean) } - def nilable?; end - - # Returns the non-nilable version of the type. - # If the type is already non-nilable, it returns itself. - # If the type is nilable, it returns the inner type. - # - # ```ruby - # type = RBI::Type.nilable(RBI::Type.simple("String")) - # type.to_rbi # => "T.nilable(String)" - # type.non_nilable.to_rbi # => "String" - # type.non_nilable.non_nilable.to_rbi # => "String" - # ``` - # : -> Type - # - # source://rbi//lib/rbi/type.rb#724 - # Returns the non-nilable version of the type. - # If the type is already non-nilable, it returns itself. - # If the type is nilable, it returns the inner type. - # ```ruby - # type = RBI::Type.nilable(RBI::Type.simple("String")) - # type.to_rbi # => "T.nilable(String)" - # type.non_nilable.to_rbi # => "String" - # type.non_nilable.non_nilable.to_rbi # => "String" - # ``` - sig { returns(::RBI::Type) } - def non_nilable; end - - # : -> String - # - # source://rbi//lib/rbi/rbs_printer.rb#1136 - sig { returns(::String) } - def rbs_string; end - - # @abstract - # - # source://rbi//lib/rbi/type.rb#755 - sig { abstract.returns(::String) } - def to_rbi; end - - # : -> String - # - # source://rbi//lib/rbi/type.rb#759 - sig { override.returns(::String) } - def to_s; end - - class << self - # Builds a type that represents an intersection of multiple types like `T.all(String, Integer)`. - # - # Note that this method transforms types such as `T.all(String, String)` into `String`, so - # it may return something other than a `All`. - # : (Type type1, Type type2, *Type types) -> Type - # - # source://rbi//lib/rbi/type.rb#559 - # Builds a type that represents an intersection of multiple types like `T.all(String, Integer)`. - # Note that this method transforms types such as `T.all(String, String)` into `String`, so - # it may return something other than a `All`. - sig { params(type1: ::RBI::Type, type2: ::RBI::Type, types: ::RBI::Type).returns(::RBI::Type) } - def all(type1, type2, *types); end - - # Builds a type that represents a union of multiple types like `T.any(String, Integer)`. - # - # Note that this method transforms types such as `T.any(String, NilClass)` into `T.nilable(String)`, so - # it may return something other than a `Any`. - # : (Type type1, Type type2, *Type types) -> Type - # - # source://rbi//lib/rbi/type.rb#586 - # Builds a type that represents a union of multiple types like `T.any(String, Integer)`. - # Note that this method transforms types such as `T.any(String, NilClass)` into `T.nilable(String)`, so - # it may return something other than a `Any`. - sig { params(type1: ::RBI::Type, type2: ::RBI::Type, types: ::RBI::Type).returns(::RBI::Type) } - def any(type1, type2, *types); end - - # Builds a type that represents `T.anything`. - # : -> Anything - # - # source://rbi//lib/rbi/type.rb#484 - # Builds a type that represents `T.anything`. - sig { returns(::RBI::Type::Anything) } - def anything; end - - # Builds a type that represents `T.attached_class`. - # : -> AttachedClass - # - # source://rbi//lib/rbi/type.rb#490 - # Builds a type that represents `T.attached_class`. - sig { returns(::RBI::Type::AttachedClass) } - def attached_class; end - - # Builds a type that represents `T::Boolean`. - # : -> Boolean - # - # source://rbi//lib/rbi/type.rb#496 - # Builds a type that represents `T::Boolean`. - sig { returns(::RBI::Type::Boolean) } - def boolean; end - - # Builds a type that represents the singleton class of another type like `T.class_of(Foo)`. - # : (Simple type, ?Type? type_parameter) -> ClassOf - # - # source://rbi//lib/rbi/type.rb#534 - # Builds a type that represents the singleton class of another type like `T.class_of(Foo)`. - sig { params(type: ::RBI::Type::Simple, type_parameter: T.nilable(::RBI::Type)).returns(::RBI::Type::ClassOf) } - def class_of(type, type_parameter = T.unsafe(nil)); end - - # Builds a type that represents a generic type like `T::Array[String]` or `T::Hash[Symbol, Integer]`. - # : (String name, *(Type | Array[Type]) params) -> Generic - # - # source://rbi//lib/rbi/type.rb#651 - # Builds a type that represents a generic type like `T::Array[String]` or `T::Hash[Symbol, Integer]`. - sig { params(name: ::String, params: T.any(::RBI::Type, T::Array[::RBI::Type])).returns(::RBI::Type::Generic) } - def generic(name, *params); end - - # Builds a type that represents a nilable of another type like `T.nilable(String)`. - # - # Note that this method transforms types such as `T.nilable(T.untyped)` into `T.untyped`, so - # it may return something other than a `RBI::Type::Nilable`. - # : (Type type) -> Type - # - # source://rbi//lib/rbi/type.rb#543 - # Builds a type that represents a nilable of another type like `T.nilable(String)`. - # Note that this method transforms types such as `T.nilable(T.untyped)` into `T.untyped`, so - # it may return something other than a `RBI::Type::Nilable`. - sig { params(type: ::RBI::Type).returns(::RBI::Type) } - def nilable(type); end - - # Builds a type that represents `T.noreturn`. - # : -> NoReturn - # - # source://rbi//lib/rbi/type.rb#502 - # Builds a type that represents `T.noreturn`. - sig { returns(::RBI::Type::NoReturn) } - def noreturn; end - - # : (Prism::Node node) -> Type - # - # source://rbi//lib/rbi/type_parser.rb#26 - sig { params(node: ::Prism::Node).returns(::RBI::Type) } - def parse_node(node); end - - # : (String string) -> Type - # - # @raise [Error] - # - # source://rbi//lib/rbi/type_parser.rb#10 - sig { params(string: ::String).returns(::RBI::Type) } - def parse_string(string); end - - # Builds a type that represents a proc type like `T.proc.void`. - # : -> Proc - # - # source://rbi//lib/rbi/type.rb#679 - # Builds a type that represents a proc type like `T.proc.void`. - sig { returns(::RBI::Type::Proc) } - def proc; end - - # Builds a type that represents `T.self_type`. - # : -> SelfType - # - # source://rbi//lib/rbi/type.rb#508 - # Builds a type that represents `T.self_type`. - sig { returns(::RBI::Type::SelfType) } - def self_type; end - - # Builds a type that represents a shape type like `{name: String, age: Integer}`. - # : (?Hash[(String | Symbol), Type] types) -> Shape - # - # source://rbi//lib/rbi/type.rb#671 - # Builds a type that represents a shape type like `{name: String, age: Integer}`. - sig { params(types: T::Hash[T.any(::String, ::Symbol), ::RBI::Type]).returns(::RBI::Type::Shape) } - def shape(types = T.unsafe(nil)); end - - # Builds a simple type like `String` or `::Foo::Bar`. - # - # It raises a `NameError` if the name is not a valid Ruby class identifier. - # : (String name) -> Simple - # - # @raise [NameError] - # - # source://rbi//lib/rbi/type.rb#473 - # Builds a simple type like `String` or `::Foo::Bar`. - # It raises a `NameError` if the name is not a valid Ruby class identifier. - sig { params(name: ::String).returns(::RBI::Type::Simple) } - def simple(name); end - - # Builds a type that represents the class of another type like `T::Class[Foo]`. - # : (Type type) -> Class - # - # source://rbi//lib/rbi/type.rb#528 - # Builds a type that represents the class of another type like `T::Class[Foo]`. - sig { params(type: ::RBI::Type).returns(::RBI::Type::Class) } - def t_class(type); end - - # Builds a type that represents a tuple type like `[String, Integer]`. - # : (*(Type | Array[Type]) types) -> Tuple - # - # source://rbi//lib/rbi/type.rb#665 - # Builds a type that represents a tuple type like `[String, Integer]`. - sig { params(types: T.any(::RBI::Type, T::Array[::RBI::Type])).returns(::RBI::Type::Tuple) } - def tuple(*types); end - - # Builds a type that represents a type parameter like `T.type_parameter(:U)`. - # : (Symbol name) -> TypeParameter - # - # source://rbi//lib/rbi/type.rb#657 - # Builds a type that represents a type parameter like `T.type_parameter(:U)`. - sig { params(name: ::Symbol).returns(::RBI::Type::TypeParameter) } - def type_parameter(name); end - - # Builds a type that represents `T.untyped`. - # : -> Untyped - # - # source://rbi//lib/rbi/type.rb#514 - # Builds a type that represents `T.untyped`. - sig { returns(::RBI::Type::Untyped) } - def untyped; end - - # Builds a type that represents `void`. - # : -> Void - # - # source://rbi//lib/rbi/type.rb#520 - # Builds a type that represents `void`. - sig { returns(::RBI::Type::Void) } - def void; end - - private - - # : (Prism::CallNode node) -> Array[Prism::Node] - # - # source://rbi//lib/rbi/type_parser.rb#263 - sig { params(node: ::Prism::CallNode).returns(T::Array[::Prism::Node]) } - def call_chain(node); end - - # : (Prism::CallNode node, Integer count) -> Array[Prism::Node] - # - # source://rbi//lib/rbi/type_parser.rb#250 - sig { params(node: ::Prism::CallNode, count: ::Integer).returns(T::Array[::Prism::Node]) } - def check_arguments_at_least!(node, count); end - - # : (Prism::CallNode node, Integer count) -> Array[Prism::Node] - # - # source://rbi//lib/rbi/type_parser.rb#235 - sig { params(node: ::Prism::CallNode, count: ::Integer).returns(T::Array[::Prism::Node]) } - def check_arguments_exactly!(node, count); end - - # : (Prism::CallNode node) -> Type - # - # @raise [Error] - # - # source://rbi//lib/rbi/type_parser.rb#69 - sig { params(node: ::Prism::CallNode).returns(::RBI::Type) } - def parse_call(node); end - - # : ((Prism::ConstantReadNode | Prism::ConstantPathNode) node) -> Type - # - # source://rbi//lib/rbi/type_parser.rb#52 - sig { params(node: T.any(::Prism::ConstantPathNode, ::Prism::ConstantReadNode)).returns(::RBI::Type) } - def parse_constant(node); end - - # : (Prism::CallNode node) -> Type - # - # @raise [Error] - # - # source://rbi//lib/rbi/type_parser.rb#195 - sig { params(node: ::Prism::CallNode).returns(::RBI::Type) } - def parse_proc(node); end - - # : ((Prism::HashNode | Prism::KeywordHashNode) node) -> Type - # - # source://rbi//lib/rbi/type_parser.rb#176 - sig { params(node: T.any(::Prism::HashNode, ::Prism::KeywordHashNode)).returns(::RBI::Type) } - def parse_shape(node); end - - # : (Prism::ArrayNode node) -> Type - # - # source://rbi//lib/rbi/type_parser.rb#171 - sig { params(node: ::Prism::ArrayNode).returns(::RBI::Type) } - def parse_tuple(node); end - - # : (Prism::Node? node) -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/type_parser.rb#276 - sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } - def t?(node); end - - # : (Prism::Node? node) -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/type_parser.rb#288 - sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } - def t_boolean?(node); end - - # : (Prism::ConstantPathNode node) -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/type_parser.rb#295 - sig { params(node: ::Prism::ConstantPathNode).returns(T::Boolean) } - def t_class?(node); end - - # : (Prism::Node? node) -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/type_parser.rb#300 - sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } - def t_class_of?(node); end - - # : (Prism::CallNode node) -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/type_parser.rb#307 - sig { params(node: ::Prism::CallNode).returns(T::Boolean) } - def t_proc?(node); end - - # : (String name) -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/type.rb#689 - sig { params(name: ::String).returns(T::Boolean) } - def valid_identifier?(name); end - end -end - -# A type that is intersection of multiple types like `T.all(String, Integer)`. -# -# source://rbi//lib/rbi/type.rb#252 -class RBI::Type::All < ::RBI::Type::Composite - # : -> String - # - # source://rbi//lib/rbi/type.rb#255 - sig { override.returns(::String) } - def to_rbi; end -end - -# A type that is union of multiple types like `T.any(String, Integer)`. -# -# source://rbi//lib/rbi/type.rb#261 -class RBI::Type::Any < ::RBI::Type::Composite - # : -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/type.rb#269 - sig { returns(T::Boolean) } - def nilable?; end - - # : -> String - # - # source://rbi//lib/rbi/type.rb#264 - sig { override.returns(::String) } - def to_rbi; end -end - -# `T.anything`. -# -# source://rbi//lib/rbi/type.rb#43 -class RBI::Type::Anything < ::RBI::Type - # : (BasicObject other) -> bool - # - # source://rbi//lib/rbi/type.rb#46 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # : -> String - # - # source://rbi//lib/rbi/type.rb#52 - sig { override.returns(::String) } - def to_rbi; end -end - -# `T.attached_class`. -# -# source://rbi//lib/rbi/type.rb#58 -class RBI::Type::AttachedClass < ::RBI::Type - # : (BasicObject other) -> bool - # - # source://rbi//lib/rbi/type.rb#61 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # : -> String - # - # source://rbi//lib/rbi/type.rb#67 - sig { override.returns(::String) } - def to_rbi; end -end - -# `T::Boolean`. -# -# source://rbi//lib/rbi/type.rb#73 -class RBI::Type::Boolean < ::RBI::Type - # : (BasicObject other) -> bool - # - # source://rbi//lib/rbi/type.rb#76 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # : -> String - # - # source://rbi//lib/rbi/type.rb#82 - sig { override.returns(::String) } - def to_rbi; end -end - -# The class of another type like `T::Class[Foo]`. -# -# source://rbi//lib/rbi/type.rb#150 -class RBI::Type::Class < ::RBI::Type - # : (Type type) -> void - # - # @return [Class] a new instance of Class - # - # source://rbi//lib/rbi/type.rb#155 - sig { params(type: ::RBI::Type).void } - def initialize(type); end - - # : (BasicObject other) -> bool - # - # source://rbi//lib/rbi/type.rb#162 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # : -> String - # - # source://rbi//lib/rbi/type.rb#168 - sig { override.returns(::String) } - def to_rbi; end - - # : Type - # - # source://rbi//lib/rbi/type.rb#152 - sig { returns(::RBI::Type) } - def type; end -end - -# The singleton class of another type like `T.class_of(Foo)`. -# -# source://rbi//lib/rbi/type.rb#174 -class RBI::Type::ClassOf < ::RBI::Type - # : (Simple type, ?Type? type_parameter) -> void - # - # @return [ClassOf] a new instance of ClassOf - # - # source://rbi//lib/rbi/type.rb#182 - sig { params(type: ::RBI::Type::Simple, type_parameter: T.nilable(::RBI::Type)).void } - def initialize(type, type_parameter = T.unsafe(nil)); end - - # : (BasicObject other) -> bool - # - # source://rbi//lib/rbi/type.rb#190 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # : -> String - # - # source://rbi//lib/rbi/type.rb#196 - sig { override.returns(::String) } - def to_rbi; end - - # : Simple - # - # source://rbi//lib/rbi/type.rb#176 - sig { returns(::RBI::Type::Simple) } - def type; end - - # : Type? - # - # source://rbi//lib/rbi/type.rb#179 - sig { returns(T.nilable(::RBI::Type)) } - def type_parameter; end -end - -# A type that is composed of multiple types like `T.all(String, Integer)`. -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/type.rb#230 -class RBI::Type::Composite < ::RBI::Type - abstract! - - # : (Array[Type] types) -> void - # - # @return [Composite] a new instance of Composite - # - # source://rbi//lib/rbi/type.rb#239 - sig { params(types: T::Array[::RBI::Type]).void } - def initialize(types); end - - # : (BasicObject other) -> bool - # - # source://rbi//lib/rbi/type.rb#246 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # : Array[Type] - # - # source://rbi//lib/rbi/type.rb#236 - sig { returns(T::Array[::RBI::Type]) } - def types; end -end - -# source://rbi//lib/rbi/type_parser.rb#6 -class RBI::Type::Error < ::RBI::Error; end - -# A generic type like `T::Array[String]` or `T::Hash[Symbol, Integer]`. -# -# source://rbi//lib/rbi/type.rb#277 -class RBI::Type::Generic < ::RBI::Type - # : (String name, *Type params) -> void - # - # @return [Generic] a new instance of Generic - # - # source://rbi//lib/rbi/type.rb#285 - sig { params(name: ::String, params: ::RBI::Type).void } - def initialize(name, *params); end - - # : (BasicObject other) -> bool - # - # source://rbi//lib/rbi/type.rb#293 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # : String - # - # source://rbi//lib/rbi/type.rb#279 - sig { returns(::String) } - def name; end - - # : Array[Type] - # - # source://rbi//lib/rbi/type.rb#282 - sig { returns(T::Array[::RBI::Type]) } - def params; end - - # : -> String - # - # source://rbi//lib/rbi/type.rb#299 - sig { override.returns(::String) } - def to_rbi; end -end - -# A type that can be `nil` like `T.nilable(String)`. -# -# source://rbi//lib/rbi/type.rb#206 -class RBI::Type::Nilable < ::RBI::Type - # : (Type type) -> void - # - # @return [Nilable] a new instance of Nilable - # - # source://rbi//lib/rbi/type.rb#211 - sig { params(type: ::RBI::Type).void } - def initialize(type); end - - # : (BasicObject other) -> bool - # - # source://rbi//lib/rbi/type.rb#218 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # : -> String - # - # source://rbi//lib/rbi/type.rb#224 - sig { override.returns(::String) } - def to_rbi; end - - # : Type - # - # source://rbi//lib/rbi/type.rb#208 - sig { returns(::RBI::Type) } - def type; end -end - -# `T.noreturn`. -# -# source://rbi//lib/rbi/type.rb#88 -class RBI::Type::NoReturn < ::RBI::Type - # : (BasicObject other) -> bool - # - # source://rbi//lib/rbi/type.rb#91 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # : -> String - # - # source://rbi//lib/rbi/type.rb#97 - sig { override.returns(::String) } - def to_rbi; end -end - -# A proc type like `T.proc.void`. -# -# source://rbi//lib/rbi/type.rb#385 -class RBI::Type::Proc < ::RBI::Type - # : -> void - # - # @return [Proc] a new instance of Proc - # - # source://rbi//lib/rbi/type.rb#396 - sig { void } - def initialize; end - - # : (BasicObject other) -> bool - # - # source://rbi//lib/rbi/type.rb#405 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # : (untyped type) -> self - # - # source://rbi//lib/rbi/type.rb#433 - sig { params(type: T.untyped).returns(T.self_type) } - def bind(type); end - - # : (**Type params) -> self - # - # source://rbi//lib/rbi/type.rb#415 - sig { params(params: ::RBI::Type).returns(T.self_type) } - def params(**params); end - - # : Type? - # - # source://rbi//lib/rbi/type.rb#393 - sig { returns(T.nilable(::RBI::Type)) } - def proc_bind; end - - # : Hash[Symbol, Type] - # - # source://rbi//lib/rbi/type.rb#387 - sig { returns(T::Hash[::Symbol, ::RBI::Type]) } - def proc_params; end - - # : Type - # - # source://rbi//lib/rbi/type.rb#390 - sig { returns(::RBI::Type) } - def proc_returns; end - - # : (untyped type) -> self - # - # source://rbi//lib/rbi/type.rb#421 - sig { params(type: T.untyped).returns(T.self_type) } - def returns(type); end - - # : -> String - # - # source://rbi//lib/rbi/type.rb#440 - sig { override.returns(::String) } - def to_rbi; end - - # : -> self - # - # source://rbi//lib/rbi/type.rb#427 - sig { returns(T.self_type) } - def void; end -end - -# `T.self_type`. -# -# source://rbi//lib/rbi/type.rb#103 -class RBI::Type::SelfType < ::RBI::Type - # : (BasicObject other) -> bool - # - # source://rbi//lib/rbi/type.rb#106 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # : -> String - # - # source://rbi//lib/rbi/type.rb#112 - sig { override.returns(::String) } - def to_rbi; end -end - -# A shape type like `{name: String, age: Integer}`. -# -# source://rbi//lib/rbi/type.rb#355 -class RBI::Type::Shape < ::RBI::Type - # : (Hash[(String | Symbol), Type] types) -> void - # - # @return [Shape] a new instance of Shape - # - # source://rbi//lib/rbi/type.rb#360 - sig { params(types: T::Hash[T.any(::String, ::Symbol), ::RBI::Type]).void } - def initialize(types); end - - # : (BasicObject other) -> bool - # - # source://rbi//lib/rbi/type.rb#367 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # : -> String - # - # source://rbi//lib/rbi/type.rb#373 - sig { override.returns(::String) } - def to_rbi; end - - # : Hash[(String | Symbol), Type] - # - # source://rbi//lib/rbi/type.rb#357 - sig { returns(T::Hash[T.any(::String, ::Symbol), ::RBI::Type]) } - def types; end -end - -# A type that represents a simple class name like `String` or `Foo`. -# -# It can also be a qualified name like `::Foo` or `Foo::Bar`. -# -# source://rbi//lib/rbi/type.rb#17 -# A type that represents a simple class name like `String` or `Foo`. -class RBI::Type::Simple < ::RBI::Type - # : (String name) -> void - # - # @return [Simple] a new instance of Simple - # - # source://rbi//lib/rbi/type.rb#22 - sig { params(name: ::String).void } - def initialize(name); end - - # : (BasicObject other) -> bool - # - # source://rbi//lib/rbi/type.rb#29 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # : String - # - # source://rbi//lib/rbi/type.rb#19 - sig { returns(::String) } - def name; end - - # : -> String - # - # source://rbi//lib/rbi/type.rb#35 - sig { override.returns(::String) } - def to_rbi; end -end - -# A tuple type like `[String, Integer]`. -# -# source://rbi//lib/rbi/type.rb#331 -class RBI::Type::Tuple < ::RBI::Type - # : (Array[Type] types) -> void - # - # @return [Tuple] a new instance of Tuple - # - # source://rbi//lib/rbi/type.rb#336 - sig { params(types: T::Array[::RBI::Type]).void } - def initialize(types); end - - # : (BasicObject other) -> bool - # - # source://rbi//lib/rbi/type.rb#343 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # : -> String - # - # source://rbi//lib/rbi/type.rb#349 - sig { override.returns(::String) } - def to_rbi; end - - # : Array[Type] - # - # source://rbi//lib/rbi/type.rb#333 - sig { returns(T::Array[::RBI::Type]) } - def types; end -end - -# A type parameter like `T.type_parameter(:U)`. -# -# source://rbi//lib/rbi/type.rb#305 -class RBI::Type::TypeParameter < ::RBI::Type - # : (Symbol name) -> void - # - # @return [TypeParameter] a new instance of TypeParameter - # - # source://rbi//lib/rbi/type.rb#310 - sig { params(name: ::Symbol).void } - def initialize(name); end - - # : (BasicObject other) -> bool - # - # source://rbi//lib/rbi/type.rb#317 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # : Symbol - # - # source://rbi//lib/rbi/type.rb#307 - sig { returns(::Symbol) } - def name; end - - # : -> String - # - # source://rbi//lib/rbi/type.rb#323 - sig { override.returns(::String) } - def to_rbi; end -end - -# `T.untyped`. -# -# source://rbi//lib/rbi/type.rb#118 -class RBI::Type::Untyped < ::RBI::Type - # : (BasicObject other) -> bool - # - # source://rbi//lib/rbi/type.rb#121 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # : -> String - # - # source://rbi//lib/rbi/type.rb#127 - sig { override.returns(::String) } - def to_rbi; end -end - -# source://rbi//lib/rbi/type_visitor.rb#6 -class RBI::Type::Visitor - # : (Type node) -> void - # - # source://rbi//lib/rbi/type_visitor.rb#10 - sig { params(node: ::RBI::Type).void } - def visit(node); end - - private - - # : (Type::All type) -> void - # - # source://rbi//lib/rbi/type_visitor.rb#56 - sig { params(type: ::RBI::Type::All).void } - def visit_all(type); end - - # : (Type::Any type) -> void - # - # source://rbi//lib/rbi/type_visitor.rb#59 - sig { params(type: ::RBI::Type::Any).void } - def visit_any(type); end - - # : (Type::Anything type) -> void - # - # source://rbi//lib/rbi/type_visitor.rb#62 - sig { params(type: ::RBI::Type::Anything).void } - def visit_anything(type); end - - # : (Type::AttachedClass type) -> void - # - # source://rbi//lib/rbi/type_visitor.rb#65 - sig { params(type: ::RBI::Type::AttachedClass).void } - def visit_attached_class(type); end - - # : (Type::Boolean type) -> void - # - # source://rbi//lib/rbi/type_visitor.rb#68 - sig { params(type: ::RBI::Type::Boolean).void } - def visit_boolean(type); end - - # : (Type::Class type) -> void - # - # source://rbi//lib/rbi/type_visitor.rb#71 - sig { params(type: ::RBI::Type::Class).void } - def visit_class(type); end - - # : (Type::ClassOf type) -> void - # - # source://rbi//lib/rbi/type_visitor.rb#74 - sig { params(type: ::RBI::Type::ClassOf).void } - def visit_class_of(type); end - - # : (Type::Generic type) -> void - # - # source://rbi//lib/rbi/type_visitor.rb#77 - sig { params(type: ::RBI::Type::Generic).void } - def visit_generic(type); end - - # : (Type::Nilable type) -> void - # - # source://rbi//lib/rbi/type_visitor.rb#80 - sig { params(type: ::RBI::Type::Nilable).void } - def visit_nilable(type); end - - # : (Type::NoReturn type) -> void - # - # source://rbi//lib/rbi/type_visitor.rb#86 - sig { params(type: ::RBI::Type::NoReturn).void } - def visit_no_return(type); end - - # : (Type::Proc type) -> void - # - # source://rbi//lib/rbi/type_visitor.rb#89 - sig { params(type: ::RBI::Type::Proc).void } - def visit_proc(type); end - - # : (Type::SelfType type) -> void - # - # source://rbi//lib/rbi/type_visitor.rb#92 - sig { params(type: ::RBI::Type::SelfType).void } - def visit_self_type(type); end - - # : (Type::Shape type) -> void - # - # source://rbi//lib/rbi/type_visitor.rb#98 - sig { params(type: ::RBI::Type::Shape).void } - def visit_shape(type); end - - # : (Type::Simple type) -> void - # - # source://rbi//lib/rbi/type_visitor.rb#83 - sig { params(type: ::RBI::Type::Simple).void } - def visit_simple(type); end - - # : (Type::Tuple type) -> void - # - # source://rbi//lib/rbi/type_visitor.rb#101 - sig { params(type: ::RBI::Type::Tuple).void } - def visit_tuple(type); end - - # : (Type::TypeParameter type) -> void - # - # source://rbi//lib/rbi/type_visitor.rb#104 - sig { params(type: ::RBI::Type::TypeParameter).void } - def visit_type_parameter(type); end - - # : (Type::Untyped type) -> void - # - # source://rbi//lib/rbi/type_visitor.rb#107 - sig { params(type: ::RBI::Type::Untyped).void } - def visit_untyped(type); end - - # : (Type::Void type) -> void - # - # source://rbi//lib/rbi/type_visitor.rb#95 - sig { params(type: ::RBI::Type::Void).void } - def visit_void(type); end -end - -# source://rbi//lib/rbi/type_visitor.rb#7 -class RBI::Type::Visitor::Error < ::RBI::Error; end - -# `void`. -# -# source://rbi//lib/rbi/type.rb#133 -class RBI::Type::Void < ::RBI::Type - # : (BasicObject other) -> bool - # - # source://rbi//lib/rbi/type.rb#136 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # : -> String - # - # source://rbi//lib/rbi/type.rb#142 - sig { override.returns(::String) } - def to_rbi; end -end - -# source://rbi//lib/rbi/model.rb#1060 -class RBI::TypeMember < ::RBI::NodeWithComments - include ::RBI::Indexable - - # : (String name, String value, ?loc: Loc?, ?comments: Array[Comment]) ?{ (TypeMember node) -> void } -> void - # - # @return [TypeMember] a new instance of TypeMember - # - # source://rbi//lib/rbi/model.rb#1065 - 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 - - # : -> String - # - # source://rbi//lib/rbi/model.rb#1073 - sig { returns(::String) } - def fully_qualified_name; end - - # : -> Array[String] - # - # source://rbi//lib/rbi/index.rb#179 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # : String - # - # source://rbi//lib/rbi/model.rb#1062 - sig { returns(::String) } - def name; end - - # : -> String - # - # source://rbi//lib/rbi/model.rb#1081 - sig { override.returns(::String) } - def to_s; end - - # : String - # - # source://rbi//lib/rbi/model.rb#1062 - # @return [String] - def value; end -end - -# source://rbi//lib/rbi/rbs_printer.rb#879 -class RBI::TypePrinter - # : -> void - # - # @return [TypePrinter] a new instance of TypePrinter - # - # source://rbi//lib/rbi/rbs_printer.rb#884 - sig { void } - def initialize; end - - # : String - # - # source://rbi//lib/rbi/rbs_printer.rb#881 - sig { returns(::String) } - def string; end - - # : (Type node) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#889 - sig { params(node: ::RBI::Type).void } - def visit(node); end - - # : (Type::All type) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#1004 - sig { params(type: ::RBI::Type::All).void } - def visit_all(type); end - - # : (Type::Any type) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#1014 - sig { params(type: ::RBI::Type::Any).void } - def visit_any(type); end - - # : (Type::Anything type) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#954 - sig { params(type: ::RBI::Type::Anything).void } - def visit_anything(type); end - - # : (Type::AttachedClass type) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#979 - sig { params(type: ::RBI::Type::AttachedClass).void } - def visit_attached_class(type); end - - # : (Type::Boolean type) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#938 - sig { params(type: ::RBI::Type::Boolean).void } - def visit_boolean(type); end - - # : (Type::Class type) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#1081 - sig { params(type: ::RBI::Type::Class).void } - def visit_class(type); end - - # : (Type::ClassOf type) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#997 - sig { params(type: ::RBI::Type::ClassOf).void } - def visit_class_of(type); end - - # : (Type::Generic type) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#943 - sig { params(type: ::RBI::Type::Generic).void } - def visit_generic(type); end - - # : (Type::Nilable type) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#984 - sig { params(type: ::RBI::Type::Nilable).void } - def visit_nilable(type); end - - # : (Type::NoReturn type) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#964 - sig { params(type: ::RBI::Type::NoReturn).void } - def visit_no_return(type); end - - # : (Type::Proc type) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#1054 - sig { params(type: ::RBI::Type::Proc).void } - def visit_proc(type); end - - # : (Type::SelfType type) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#974 - sig { params(type: ::RBI::Type::SelfType).void } - def visit_self_type(type); end - - # : (Type::Shape type) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#1034 - sig { params(type: ::RBI::Type::Shape).void } - def visit_shape(type); end - - # : (Type::Simple type) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#933 - sig { params(type: ::RBI::Type::Simple).void } - def visit_simple(type); end - - # : (Type::Tuple type) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#1024 - sig { params(type: ::RBI::Type::Tuple).void } - def visit_tuple(type); end - - # : (Type::TypeParameter type) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#1076 - sig { params(type: ::RBI::Type::TypeParameter).void } - def visit_type_parameter(type); end - - # : (Type::Untyped type) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#969 - sig { params(type: ::RBI::Type::Untyped).void } - def visit_untyped(type); end - - # : (Type::Void type) -> void - # - # source://rbi//lib/rbi/rbs_printer.rb#959 - sig { params(type: ::RBI::Type::Void).void } - def visit_void(type); end - - private - - # : (String type_name) -> String - # - # source://rbi//lib/rbi/rbs_printer.rb#1090 - sig { params(type_name: ::String).returns(::String) } - def translate_t_type(type_name); end -end - -# source://rbi//lib/rbi/rewriters/attr_to_methods.rb#5 -class RBI::UnexpectedMultipleSigsError < ::RBI::Error - # : (Node node) -> void - # - # @return [UnexpectedMultipleSigsError] a new instance of UnexpectedMultipleSigsError - # - # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#10 - sig { params(node: ::RBI::Node).void } - def initialize(node); end - - # : Node - # - # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#7 - sig { returns(::RBI::Node) } - def node; end -end - -# source://rbi//lib/rbi/parser.rb#18 -class RBI::UnexpectedParserError < ::RBI::Error - # : (Exception parent_exception, Loc last_location) -> void - # - # @return [UnexpectedParserError] a new instance of UnexpectedParserError - # - # source://rbi//lib/rbi/parser.rb#23 - sig { params(parent_exception: ::Exception, last_location: ::RBI::Loc).void } - def initialize(parent_exception, last_location); end - - # : Loc - # - # source://rbi//lib/rbi/parser.rb#20 - sig { returns(::RBI::Loc) } - def last_location; end - - # : (?io: (IO | StringIO)) -> void - # - # source://rbi//lib/rbi/parser.rb#30 - 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#708 -class RBI::Visibility < ::RBI::NodeWithComments - abstract! - - # : (Symbol visibility, ?loc: Loc?, ?comments: Array[Comment]) -> void - # - # @return [Visibility] a new instance of Visibility - # - # source://rbi//lib/rbi/model.rb#717 - 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 - - # : (Object? other) -> bool - # - # source://rbi//lib/rbi/model.rb#723 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # : -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#740 - sig { returns(T::Boolean) } - def private?; end - - # : -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#735 - sig { returns(T::Boolean) } - def protected?; end - - # : -> bool - # - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#730 - sig { returns(T::Boolean) } - def public?; end - - # : Symbol - # - # source://rbi//lib/rbi/model.rb#714 - sig { returns(::Symbol) } - def visibility; end -end - -# source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#49 -class RBI::VisibilityGroup < ::RBI::Tree - # : (Visibility visibility) -> void - # - # @return [VisibilityGroup] a new instance of VisibilityGroup - # - # source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#54 - sig { params(visibility: ::RBI::Visibility).void } - def initialize(visibility); end - - # : Visibility - # - # source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#51 - 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#7 -class RBI::Visitor - abstract! - - # : (Node? node) -> void - # - # source://rbi//lib/rbi/visitor.rb#13 - sig { params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - # : (Array[Node] nodes) -> void - # - # source://rbi//lib/rbi/visitor.rb#109 - sig { params(nodes: T::Array[::RBI::Node]).void } - def visit_all(nodes); end - - # : (File file) -> void - # - # source://rbi//lib/rbi/visitor.rb#114 - sig { params(file: ::RBI::File).void } - def visit_file(file); end - - private - - # : (Arg node) -> void - # - # source://rbi//lib/rbi/visitor.rb#199 - sig { params(node: ::RBI::Arg).void } - def visit_arg(node); end - - # : (AttrAccessor node) -> void - # - # source://rbi//lib/rbi/visitor.rb#148 - sig { params(node: ::RBI::AttrAccessor).void } - def visit_attr_accessor(node); end - - # : (AttrReader node) -> void - # - # source://rbi//lib/rbi/visitor.rb#151 - sig { params(node: ::RBI::AttrReader).void } - def visit_attr_reader(node); end - - # : (AttrWriter node) -> void - # - # source://rbi//lib/rbi/visitor.rb#154 - sig { params(node: ::RBI::AttrWriter).void } - def visit_attr_writer(node); end - - # : (BlankLine node) -> void - # - # source://rbi//lib/rbi/visitor.rb#127 - sig { params(node: ::RBI::BlankLine).void } - def visit_blank_line(node); end - - # : (BlockParam node) -> void - # - # source://rbi//lib/rbi/visitor.rb#178 - sig { params(node: ::RBI::BlockParam).void } - def visit_block_param(node); end - - # : (Class node) -> void - # - # source://rbi//lib/rbi/visitor.rb#133 - sig { params(node: ::RBI::Class).void } - def visit_class(node); end - - # : (Comment node) -> void - # - # source://rbi//lib/rbi/visitor.rb#121 - sig { params(node: ::RBI::Comment).void } - def visit_comment(node); end - - # : (ConflictTree node) -> void - # - # source://rbi//lib/rbi/visitor.rb#244 - sig { params(node: ::RBI::ConflictTree).void } - def visit_conflict_tree(node); end - - # : (Const node) -> void - # - # source://rbi//lib/rbi/visitor.rb#145 - sig { params(node: ::RBI::Const).void } - def visit_const(node); end - - # : (Extend node) -> void - # - # source://rbi//lib/rbi/visitor.rb#184 - sig { params(node: ::RBI::Extend).void } - def visit_extend(node); end - - # : (Group node) -> void - # - # source://rbi//lib/rbi/visitor.rb#238 - sig { params(node: ::RBI::Group).void } - def visit_group(node); end - - # : (Helper node) -> void - # - # source://rbi//lib/rbi/visitor.rb#226 - sig { params(node: ::RBI::Helper).void } - def visit_helper(node); end - - # : (Include node) -> void - # - # source://rbi//lib/rbi/visitor.rb#181 - sig { params(node: ::RBI::Include).void } - def visit_include(node); end - - # : (KwArg node) -> void - # - # source://rbi//lib/rbi/visitor.rb#202 - sig { params(node: ::RBI::KwArg).void } - def visit_kw_arg(node); end - - # : (KwOptParam node) -> void - # - # source://rbi//lib/rbi/visitor.rb#172 - sig { params(node: ::RBI::KwOptParam).void } - def visit_kw_opt_param(node); end - - # : (KwParam node) -> void - # - # source://rbi//lib/rbi/visitor.rb#169 - sig { params(node: ::RBI::KwParam).void } - def visit_kw_param(node); end - - # : (KwRestParam node) -> void - # - # source://rbi//lib/rbi/visitor.rb#175 - sig { params(node: ::RBI::KwRestParam).void } - def visit_kw_rest_param(node); end - - # : (Method node) -> void - # - # source://rbi//lib/rbi/visitor.rb#157 - sig { params(node: ::RBI::Method).void } - def visit_method(node); end - - # : (MixesInClassMethods node) -> void - # - # source://rbi//lib/rbi/visitor.rb#232 - sig { params(node: ::RBI::MixesInClassMethods).void } - def visit_mixes_in_class_methods(node); end - - # : (Module node) -> void - # - # source://rbi//lib/rbi/visitor.rb#130 - sig { params(node: ::RBI::Module).void } - def visit_module(node); end - - # : (OptParam node) -> void - # - # source://rbi//lib/rbi/visitor.rb#163 - sig { params(node: ::RBI::OptParam).void } - def visit_opt_param(node); end - - # : (Private node) -> void - # - # source://rbi//lib/rbi/visitor.rb#193 - sig { params(node: ::RBI::Private).void } - def visit_private(node); end - - # : (Protected node) -> void - # - # source://rbi//lib/rbi/visitor.rb#190 - sig { params(node: ::RBI::Protected).void } - def visit_protected(node); end - - # : (Public node) -> void - # - # source://rbi//lib/rbi/visitor.rb#187 - sig { params(node: ::RBI::Public).void } - def visit_public(node); end - - # : (RBSComment node) -> void - # - # source://rbi//lib/rbi/visitor.rb#124 - sig { params(node: ::RBI::RBSComment).void } - def visit_rbs_comment(node); end - - # : (ReqParam node) -> void - # - # source://rbi//lib/rbi/visitor.rb#160 - sig { params(node: ::RBI::ReqParam).void } - def visit_req_param(node); end - - # : (RequiresAncestor node) -> void - # - # source://rbi//lib/rbi/visitor.rb#235 - sig { params(node: ::RBI::RequiresAncestor).void } - def visit_requires_ancestor(node); end - - # : (RestParam node) -> void - # - # source://rbi//lib/rbi/visitor.rb#166 - sig { params(node: ::RBI::RestParam).void } - def visit_rest_param(node); end - - # : (ScopeConflict node) -> void - # - # source://rbi//lib/rbi/visitor.rb#247 - sig { params(node: ::RBI::ScopeConflict).void } - def visit_scope_conflict(node); end - - # : (Send node) -> void - # - # source://rbi//lib/rbi/visitor.rb#196 - sig { params(node: ::RBI::Send).void } - def visit_send(node); end - - # : (Sig node) -> void - # - # source://rbi//lib/rbi/visitor.rb#205 - sig { params(node: ::RBI::Sig).void } - def visit_sig(node); end - - # : (SigParam node) -> void - # - # source://rbi//lib/rbi/visitor.rb#208 - sig { params(node: ::RBI::SigParam).void } - def visit_sig_param(node); end - - # : (SingletonClass node) -> void - # - # source://rbi//lib/rbi/visitor.rb#136 - sig { params(node: ::RBI::SingletonClass).void } - def visit_singleton_class(node); end - - # : (Struct node) -> void - # - # source://rbi//lib/rbi/visitor.rb#139 - sig { params(node: ::RBI::Struct).void } - def visit_struct(node); end - - # : (TEnum node) -> void - # - # source://rbi//lib/rbi/visitor.rb#220 - sig { params(node: ::RBI::TEnum).void } - def visit_tenum(node); end - - # : (TEnumBlock node) -> void - # - # source://rbi//lib/rbi/visitor.rb#223 - sig { params(node: ::RBI::TEnumBlock).void } - def visit_tenum_block(node); end - - # : (Tree node) -> void - # - # source://rbi//lib/rbi/visitor.rb#142 - sig { params(node: ::RBI::Tree).void } - def visit_tree(node); end - - # : (TStruct node) -> void - # - # source://rbi//lib/rbi/visitor.rb#211 - sig { params(node: ::RBI::TStruct).void } - def visit_tstruct(node); end - - # : (TStructConst node) -> void - # - # source://rbi//lib/rbi/visitor.rb#214 - sig { params(node: ::RBI::TStructConst).void } - def visit_tstruct_const(node); end - - # : (TStructProp node) -> void - # - # source://rbi//lib/rbi/visitor.rb#217 - sig { params(node: ::RBI::TStructProp).void } - def visit_tstruct_prop(node); end - - # : (TypeMember node) -> void - # - # source://rbi//lib/rbi/visitor.rb#229 - sig { params(node: ::RBI::TypeMember).void } - def visit_type_member(node); end - - # : (VisibilityGroup node) -> void - # - # source://rbi//lib/rbi/visitor.rb#241 - sig { params(node: ::RBI::VisibilityGroup).void } - def visit_visibility_group(node); end -end - -# source://rbi//lib/rbi/visitor.rb#5 -class RBI::VisitorError < ::RBI::Error; end diff --git a/sorbet/rbi/gems/rbi@0.4.3-40f1046d18efa4d268b46df4df79efd36f15b681.rbi b/sorbet/rbi/gems/rbi@0.4.3-40f1046d18efa4d268b46df4df79efd36f15b681.rbi new file mode 100644 index 0000000..c8e2967 --- /dev/null +++ b/sorbet/rbi/gems/rbi@0.4.3-40f1046d18efa4d268b46df4df79efd36f15b681.rbi @@ -0,0 +1,5869 @@ +# 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`. + + +# 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 `bundle exec spoom srb sigs export`. + +# pkg:gem/rbi#lib/rbi.rb:7 +module RBI; end + +# pkg:gem/rbi#lib/rbi/model.rb:1048 +class RBI::Arg < ::RBI::Node + # pkg:gem/rbi#lib/rbi/model.rb:1053 + sig { params(value: ::String, loc: T.nilable(::RBI::Loc)).void } + def initialize(value, loc: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/model.rb:1059 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:1064 + sig { returns(::String) } + def to_s; end + + # pkg:gem/rbi#lib/rbi/model.rb:1050 + sig { returns(::String) } + def value; end +end + +# @abstract +# +# pkg:gem/rbi#lib/rbi/model.rb:325 +class RBI::Attr < ::RBI::NodeWithComments + include ::RBI::Indexable + + abstract! + + # pkg:gem/rbi#lib/rbi/model.rb:353 + sig do + params( + name: ::Symbol, + names: T::Array[::Symbol], + visibility: ::RBI::Visibility, + sigs: T.nilable(T::Array[::RBI::Sig]), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:420 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @abstract + # + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:59 + sig { abstract.returns(T::Array[::RBI::Method]) } + def convert_to_methods; end + + # @abstract + # + # pkg:gem/rbi#lib/rbi/model.rb:362 + sig { abstract.returns(T::Array[::String]) } + def fully_qualified_names; end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:104 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:429 + sig { override.params(other: ::RBI::Node).void } + def merge_with(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:327 + sig { returns(T::Array[::Symbol]) } + def names; end + + # pkg:gem/rbi#lib/rbi/model.rb:333 + sig { returns(T::Array[::RBI::Sig]) } + def sigs; end + + # pkg:gem/rbi#lib/rbi/model.rb:343 + sig { params(sigs: T::Array[::RBI::Sig]).returns(T::Array[::RBI::Sig]) } + def sigs=(sigs); end + + # pkg:gem/rbi#lib/rbi/model.rb:338 + sig { returns(T::Boolean) } + def sigs?; end + + # pkg:gem/rbi#lib/rbi/model.rb:330 + sig { returns(::RBI::Visibility) } + def visibility; end + + # pkg:gem/rbi#lib/rbi/model.rb:330 + sig { params(visibility: ::RBI::Visibility).returns(::RBI::Visibility) } + def visibility=(visibility); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:80 + sig do + params( + name: ::String, + sig: T.nilable(::RBI::Sig), + visibility: ::RBI::Visibility, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment] + ).returns(::RBI::Method) + end + def create_getter_method(name, sig, visibility, loc, comments); end + + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:99 + sig do + params( + name: ::String, + sig: T.nilable(::RBI::Sig), + attribute_type: T.nilable(T.any(::RBI::Type, ::String)), + visibility: ::RBI::Visibility, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment] + ).returns(::RBI::Method) + end + def create_setter_method(name, sig, attribute_type, visibility, loc, comments); end + + # @final + # + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:65 + sig(:final) { returns([T.nilable(::RBI::Sig), T.nilable(T.any(::RBI::Type, ::String))]) } + def parse_sig; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:365 +class RBI::AttrAccessor < ::RBI::Attr + # pkg:gem/rbi#lib/rbi/model.rb:374 + sig do + params( + name: ::Symbol, + names: ::Symbol, + visibility: ::RBI::Visibility, + sigs: T.nilable(T::Array[::RBI::Sig]), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:458 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:131 + sig { override.returns(T::Array[::RBI::Method]) } + def convert_to_methods; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:381 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:388 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:394 +class RBI::AttrReader < ::RBI::Attr + # pkg:gem/rbi#lib/rbi/model.rb:403 + sig do + params( + name: ::Symbol, + names: ::Symbol, + visibility: ::RBI::Visibility, + sigs: T.nilable(T::Array[::RBI::Sig]), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:442 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:146 + sig { override.returns(T::Array[::RBI::Method]) } + def convert_to_methods; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:410 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:417 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:423 +class RBI::AttrWriter < ::RBI::Attr + # pkg:gem/rbi#lib/rbi/model.rb:432 + sig do + params( + name: ::Symbol, + names: ::Symbol, + visibility: ::RBI::Visibility, + sigs: T.nilable(T::Array[::RBI::Sig]), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:450 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:156 + sig { override.returns(T::Array[::RBI::Method]) } + def convert_to_methods; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:439 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:446 + sig { override.returns(::String) } + def to_s; end +end + +# An arbitrary blank line that can be added both in trees and comments +# +# pkg:gem/rbi#lib/rbi/model.rb:70 +class RBI::BlankLine < ::RBI::Comment + # pkg:gem/rbi#lib/rbi/model.rb:72 + sig { params(loc: T.nilable(::RBI::Loc)).void } + def initialize(loc: T.unsafe(nil)); end +end + +# pkg:gem/rbi#lib/rbi/model.rb:848 +class RBI::BlockParam < ::RBI::Param + # pkg:gem/rbi#lib/rbi/model.rb:854 + sig do + params( + name: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # pkg:gem/rbi#lib/rbi/model.rb:873 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:868 + sig { override.returns(T::Boolean) } + def anonymous?; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:851 + sig { override.returns(T.nilable(::String)) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:862 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:217 +class RBI::Class < ::RBI::Scope + # pkg:gem/rbi#lib/rbi/model.rb:230 + sig do + params( + name: ::String, + superclass_name: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:388 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:239 + sig { override.returns(::String) } + def fully_qualified_name; end + + # pkg:gem/rbi#lib/rbi/model.rb:219 + sig { returns(::String) } + def name; end + + # pkg:gem/rbi#lib/rbi/model.rb:222 + sig { returns(T.nilable(::String)) } + def superclass_name; end + + # pkg:gem/rbi#lib/rbi/model.rb:222 + sig { params(superclass_name: T.nilable(::String)).returns(T.nilable(::String)) } + def superclass_name=(superclass_name); end +end + +# pkg:gem/rbi#lib/rbi/model.rb:51 +class RBI::Comment < ::RBI::Node + # pkg:gem/rbi#lib/rbi/model.rb:56 + sig { params(text: ::String, loc: T.nilable(::RBI::Loc)).void } + def initialize(text, loc: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/model.rb:62 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:53 + sig { returns(::String) } + def text; end + + # pkg:gem/rbi#lib/rbi/model.rb:53 + sig { params(text: ::String).returns(::String) } + def text=(text); 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 +# ~~~ +# +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:646 +class RBI::ConflictTree < ::RBI::Tree + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:654 + sig { params(left_name: ::String, right_name: ::String).void } + def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:648 + sig { returns(::RBI::Tree) } + def left; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:651 + sig { returns(::String) } + def left_name; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:648 + def right; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:651 + def right_name; end +end + +# Consts +# +# pkg:gem/rbi#lib/rbi/model.rb:296 +class RBI::Const < ::RBI::NodeWithComments + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:301 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:412 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:309 + sig { returns(::String) } + def fully_qualified_name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:94 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # pkg:gem/rbi#lib/rbi/model.rb:298 + sig { returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:317 + sig { override.returns(::String) } + def to_s; end + + # pkg:gem/rbi#lib/rbi/model.rb:298 + def value; end +end + +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:358 +class RBI::DuplicateNodeError < ::RBI::Error; end + +# pkg:gem/rbi#lib/rbi.rb:8 +class RBI::Error < ::StandardError; end + +# pkg:gem/rbi#lib/rbi/model.rb:938 +class RBI::Extend < ::RBI::Mixin + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:940 + sig do + params( + name: ::String, + names: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:579 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:134 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:947 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:143 +class RBI::File + # pkg:gem/rbi#lib/rbi/model.rb:164 + sig do + params( + strictness: T.nilable(::String), + comments: T.nilable(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 + + # pkg:gem/rbi#lib/rbi/model.rb:172 + sig { params(node: ::RBI::Node).void } + def <<(node); end + + # pkg:gem/rbi#lib/rbi/model.rb:154 + sig { returns(T::Array[::RBI::Comment]) } + def comments; end + + # pkg:gem/rbi#lib/rbi/model.rb:151 + sig { params(comments: T::Array[::RBI::Comment]).returns(T::Array[::RBI::Comment]) } + def comments=(comments); end + + # pkg:gem/rbi#lib/rbi/model.rb:159 + sig { returns(T::Boolean) } + def comments?; end + + # pkg:gem/rbi#lib/rbi/model.rb:177 + sig { returns(T::Boolean) } + def empty?; end + + # pkg:gem/rbi#lib/rbi/printer.rb:872 + 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 + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1224 + sig { params(out: T.any(::IO, ::StringIO), indent: ::Integer, print_locs: T::Boolean).void } + def rbs_print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1230 + sig { params(indent: ::Integer, print_locs: T::Boolean).returns(::String) } + def rbs_string(indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/model.rb:145 + sig { returns(::RBI::Tree) } + def root; end + + # pkg:gem/rbi#lib/rbi/model.rb:145 + sig { params(root: ::RBI::Tree).returns(::RBI::Tree) } + def root=(root); end + + # pkg:gem/rbi#lib/rbi/model.rb:148 + sig { returns(T.nilable(::String)) } + def strictness; end + + # pkg:gem/rbi#lib/rbi/model.rb:148 + sig { params(strictness: T.nilable(::String)).returns(T.nilable(::String)) } + def strictness=(strictness); end + + # pkg:gem/rbi#lib/rbi/printer.rb:878 + 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 + +# pkg:gem/rbi#lib/rbi/formatter.rb:5 +class RBI::Formatter + # pkg:gem/rbi#lib/rbi/formatter.rb:18 + 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_members: T::Boolean, + sort_nodes: T::Boolean, + replace_attributes_with_methods: 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_members: T.unsafe(nil), sort_nodes: T.unsafe(nil), replace_attributes_with_methods: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/formatter.rb:43 + sig { params(file: ::RBI::File).void } + def format_file(file); end + + # pkg:gem/rbi#lib/rbi/formatter.rb:48 + sig { params(tree: ::RBI::Tree).void } + def format_tree(tree); end + + # pkg:gem/rbi#lib/rbi/formatter.rb:7 + sig { returns(T.nilable(::Integer)) } + def max_line_length; end + + # pkg:gem/rbi#lib/rbi/formatter.rb:7 + sig { params(max_line_length: T.nilable(::Integer)).returns(T.nilable(::Integer)) } + def max_line_length=(max_line_length); end + + # pkg:gem/rbi#lib/rbi/formatter.rb:37 + sig { params(file: ::RBI::File).returns(::String) } + def print_file(file); end +end + +# The `...` in `def m(...)` +# +# pkg:gem/rbi#lib/rbi/model.rb:879 +class RBI::ForwardingParam < ::RBI::Param + # pkg:gem/rbi#lib/rbi/model.rb:887 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::ForwardingParam).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # pkg:gem/rbi#lib/rbi/model.rb:905 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:900 + sig { override.returns(T::Boolean) } + def anonymous?; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:882 + sig { override.returns(::NilClass) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:894 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:86 +class RBI::Group < ::RBI::Tree + # pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:91 + sig { params(kind: ::RBI::Group::Kind).void } + def initialize(kind); end + + # pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:88 + sig { returns(::RBI::Group::Kind) } + def kind; end +end + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:96 +class RBI::Group::Kind + class << self + private + + # pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:111 + def new(*_arg0); end + end +end + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:103 +RBI::Group::Kind::Attrs = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:109 +RBI::Group::Kind::Consts = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:99 +RBI::Group::Kind::Helpers = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:106 +RBI::Group::Kind::Inits = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:107 +RBI::Group::Kind::Methods = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:101 +RBI::Group::Kind::MixesInClassMethods = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:97 +RBI::Group::Kind::Mixins = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:98 +RBI::Group::Kind::RequiredAncestors = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:102 +RBI::Group::Kind::Sends = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:108 +RBI::Group::Kind::SingletonClasses = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:105 +RBI::Group::Kind::TEnums = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:104 +RBI::Group::Kind::TStructFields = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:100 +RBI::Group::Kind::TypeMembers = T.let(T.unsafe(nil), RBI::Group::Kind) + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:5 +class RBI::GroupNodesError < ::RBI::Error; end + +# Sorbet's misc. +# +# pkg:gem/rbi#lib/rbi/model.rb:1386 +class RBI::Helper < ::RBI::NodeWithComments + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:1391 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:595 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:164 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # pkg:gem/rbi#lib/rbi/model.rb:1388 + sig { returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1399 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:924 +class RBI::Include < ::RBI::Mixin + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:926 + sig do + params( + name: ::String, + names: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:571 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:124 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:933 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/index.rb:5 +class RBI::Index < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/index.rb:16 + sig { void } + def initialize; end + + # pkg:gem/rbi#lib/rbi/index.rb:27 + sig { params(id: ::String).returns(T::Array[::RBI::Node]) } + def [](id); end + + # pkg:gem/rbi#lib/rbi/index.rb:32 + sig { params(nodes: ::RBI::Node).void } + def index(*nodes); end + + # pkg:gem/rbi#lib/rbi/index.rb:22 + sig { returns(T::Array[::String]) } + def keys; end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:38 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # pkg:gem/rbi#lib/rbi/index.rb:55 + sig { params(node: T.all(::RBI::Indexable, ::RBI::Node)).void } + def index_node(node); end + + class << self + # pkg:gem/rbi#lib/rbi/index.rb:8 + sig { params(node: ::RBI::Node).returns(::RBI::Index) } + def index(*node); end + end +end + +# A Node that can be referred to by a unique ID inside an index +# @interface +# +# pkg:gem/rbi#lib/rbi/index.rb:69 +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 + # + # pkg:gem/rbi#lib/rbi/index.rb:76 + sig { abstract.returns(T::Array[::String]) } + def index_ids; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:1069 +class RBI::KwArg < ::RBI::Arg + # pkg:gem/rbi#lib/rbi/model.rb:1074 + sig { params(keyword: ::String, value: ::String, loc: T.nilable(::RBI::Loc)).void } + def initialize(keyword, value, loc: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/model.rb:1080 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:1071 + sig { returns(::String) } + def keyword; end + + # pkg:gem/rbi#lib/rbi/model.rb:1085 + sig { returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:759 +class RBI::KwOptParam < ::RBI::Param + # pkg:gem/rbi#lib/rbi/model.rb:768 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # pkg:gem/rbi#lib/rbi/model.rb:788 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:783 + sig { override.returns(T::Boolean) } + def anonymous?; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:762 + sig { override.returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:777 + sig { override.returns(::String) } + def to_s; end + + # pkg:gem/rbi#lib/rbi/model.rb:765 + sig { returns(::String) } + def value; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:729 +class RBI::KwParam < ::RBI::Param + # pkg:gem/rbi#lib/rbi/model.rb:735 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # pkg:gem/rbi#lib/rbi/model.rb:754 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:749 + sig { override.returns(T::Boolean) } + def anonymous?; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:732 + sig { override.returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:743 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:793 +class RBI::KwRestParam < ::RBI::Param + # pkg:gem/rbi#lib/rbi/model.rb:799 + sig do + params( + name: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # pkg:gem/rbi#lib/rbi/model.rb:818 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:813 + sig { override.returns(T::Boolean) } + def anonymous?; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:796 + sig { override.returns(T.nilable(::String)) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:807 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/loc.rb:5 +class RBI::Loc + # pkg:gem/rbi#lib/rbi/loc.rb:32 + 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 + + # pkg:gem/rbi#lib/rbi/loc.rb:23 + def begin_column; end + + # pkg:gem/rbi#lib/rbi/loc.rb:23 + sig { returns(T.nilable(::Integer)) } + def begin_line; end + + # pkg:gem/rbi#lib/rbi/loc.rb:23 + def end_column; end + + # pkg:gem/rbi#lib/rbi/loc.rb:23 + def end_line; end + + # pkg:gem/rbi#lib/rbi/loc.rb:20 + sig { returns(T.nilable(::String)) } + def file; end + + # pkg:gem/rbi#lib/rbi/loc.rb:41 + sig { params(other: ::RBI::Loc).returns(::RBI::Loc) } + def join(other); end + + # pkg:gem/rbi#lib/rbi/loc.rb:52 + sig { returns(T::Boolean) } + def multiline?; end + + # pkg:gem/rbi#lib/rbi/loc.rb:68 + sig { returns(T.nilable(::String)) } + def source; end + + # pkg:gem/rbi#lib/rbi/loc.rb:59 + sig { returns(::String) } + def to_s; end + + class << self + # pkg:gem/rbi#lib/rbi/loc.rb:8 + sig { params(file: ::String, prism_location: ::Prism::Location).returns(::RBI::Loc) } + def from_prism(file, prism_location); end + end +end + +# A tree that _might_ contain conflicts +# +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:342 +class RBI::MergeTree < ::RBI::Tree + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:351 + 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 + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:344 + sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } + def conflicts; end +end + +# Methods and args +# +# pkg:gem/rbi#lib/rbi/model.rb:454 +class RBI::Method < ::RBI::NodeWithComments + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:491 + sig do + params( + name: ::String, + params: T.nilable(T::Array[::RBI::Param]), + is_singleton: T::Boolean, + visibility: ::RBI::Visibility, + sigs: T.nilable(T::Array[::RBI::Sig]), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # pkg:gem/rbi#lib/rbi/model.rb:511 + sig { params(param: ::RBI::Param).void } + def <<(param); end + + # pkg:gem/rbi#lib/rbi/model.rb:551 + sig { params(name: ::String).void } + def add_block_param(name); end + + # pkg:gem/rbi#lib/rbi/model.rb:556 + sig { void } + def add_forwarding_param; end + + # pkg:gem/rbi#lib/rbi/model.rb:536 + sig { params(name: ::String, default_value: ::String).void } + def add_kw_opt_param(name, default_value); end + + # pkg:gem/rbi#lib/rbi/model.rb:531 + sig { params(name: ::String).void } + def add_kw_param(name); end + + # pkg:gem/rbi#lib/rbi/model.rb:541 + sig { params(name: ::String).void } + def add_kw_rest_param(name); end + + # pkg:gem/rbi#lib/rbi/model.rb:546 + sig { void } + def add_no_kw_param; end + + # pkg:gem/rbi#lib/rbi/model.rb:521 + sig { params(name: ::String, default_value: ::String).void } + def add_opt_param(name, default_value); end + + # pkg:gem/rbi#lib/rbi/model.rb:516 + sig { params(name: ::String).void } + def add_param(name); end + + # pkg:gem/rbi#lib/rbi/model.rb:526 + sig { params(name: ::String).void } + def add_rest_param(name); end + + # pkg:gem/rbi#lib/rbi/model.rb:570 + sig do + params( + params: T.nilable(T::Array[::RBI::SigParam]), + return_type: T.any(::RBI::Type, ::String), + bind_type: T.nilable(T.any(::RBI::Type, ::String)), + is_abstract: T::Boolean, + is_override: T::Boolean, + is_overridable: T::Boolean, + is_final: T::Boolean, + type_params: T.nilable(T::Array[::String]), + checked: T.nilable(::Symbol), + block: T.nilable(T.proc.params(node: ::RBI::Sig).void) + ).void + end + def add_sig(params: T.unsafe(nil), return_type: T.unsafe(nil), bind_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), &block); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:466 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:598 + sig { returns(::String) } + def fully_qualified_name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:114 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # pkg:gem/rbi#lib/rbi/model.rb:464 + sig { returns(T::Boolean) } + def is_singleton; end + + # pkg:gem/rbi#lib/rbi/model.rb:464 + sig { params(is_singleton: T::Boolean).returns(T::Boolean) } + def is_singleton=(is_singleton); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:485 + sig { override.params(other: ::RBI::Node).void } + def merge_with(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:456 + sig { returns(::String) } + def name; end + + # pkg:gem/rbi#lib/rbi/model.rb:459 + sig { returns(T::Array[::RBI::Param]) } + def params; end + + # pkg:gem/rbi#lib/rbi/model.rb:470 + sig { returns(T::Array[::RBI::Sig]) } + def sigs; end + + # pkg:gem/rbi#lib/rbi/model.rb:480 + sig { params(sigs: T::Array[::RBI::Sig]).returns(T::Array[::RBI::Sig]) } + def sigs=(sigs); end + + # pkg:gem/rbi#lib/rbi/model.rb:475 + sig { returns(T::Boolean) } + def sigs?; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:608 + sig { override.returns(::String) } + def to_s; end + + # pkg:gem/rbi#lib/rbi/model.rb:467 + sig { returns(::RBI::Visibility) } + def visibility; end + + # pkg:gem/rbi#lib/rbi/model.rb:467 + sig { params(visibility: ::RBI::Visibility).returns(::RBI::Visibility) } + def visibility=(visibility); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:508 + sig { params(other: ::RBI::Method).returns(T::Boolean) } + def compatible_params?(other); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:519 + sig { params(preferred: T::Array[::RBI::Param], fallback: T::Array[::RBI::Param]).returns(T::Array[::RBI::Param]) } + def merge_params(preferred, fallback); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:531 + sig { params(params: T::Array[::RBI::Param]).returns(T::Boolean) } + def params_have_forwarding?(params); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:536 + sig { params(sigs: T::Array[::RBI::Sig], params: T::Array[::RBI::Param]).void } + def rename_sigs_params(sigs, params); end +end + +# pkg:gem/rbi#lib/rbi/model.rb:1430 +class RBI::MixesInClassMethods < ::RBI::Mixin + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:1437 + sig do + params( + name: ::String, + names: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:587 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:144 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1444 + sig { override.returns(::String) } + def to_s; end +end + +# @abstract +# +# pkg:gem/rbi#lib/rbi/model.rb:913 +class RBI::Mixin < ::RBI::NodeWithComments + abstract! + + # pkg:gem/rbi#lib/rbi/model.rb:918 + sig do + params( + name: ::String, + names: T::Array[::String], + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]) + ).void + end + def initialize(name, names, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:563 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:915 + sig { returns(T::Array[::String]) } + def names; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:197 +class RBI::Module < ::RBI::Scope + # pkg:gem/rbi#lib/rbi/model.rb:202 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:396 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:210 + sig { override.returns(::String) } + def fully_qualified_name; end + + # pkg:gem/rbi#lib/rbi/model.rb:199 + sig { returns(::String) } + def name; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:823 +class RBI::NoKwParam < ::RBI::Param + # pkg:gem/rbi#lib/rbi/model.rb:825 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::NoKwParam).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # pkg:gem/rbi#lib/rbi/model.rb:843 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:838 + sig { override.returns(T::Boolean) } + def anonymous?; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:832 + sig { override.returns(::String) } + def to_s; end +end + +# @abstract +# +# pkg:gem/rbi#lib/rbi/model.rb:8 +class RBI::Node + abstract! + + # pkg:gem/rbi#lib/rbi/model.rb:16 + sig { params(loc: T.nilable(::RBI::Loc)).void } + def initialize(loc: T.unsafe(nil)); end + + # Can `self` and `_other` be merged into a single definition? + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:302 + sig { params(_other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(_other); end + + # pkg:gem/rbi#lib/rbi/model.rb:22 + sig { void } + def detach; end + + # pkg:gem/rbi#lib/rbi/model.rb:13 + sig { returns(T.nilable(::RBI::Loc)) } + def loc; end + + # pkg:gem/rbi#lib/rbi/model.rb:13 + sig { params(loc: T.nilable(::RBI::Loc)).returns(T.nilable(::RBI::Loc)) } + def loc=(loc); end + + # Merge `self` and `other` into a single definition + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:308 + sig { params(other: ::RBI::Node).void } + def merge_with(other); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:311 + sig { returns(T.nilable(::RBI::ConflictTree)) } + def parent_conflict_tree; end + + # pkg:gem/rbi#lib/rbi/model.rb:44 + sig { returns(T.nilable(::RBI::Scope)) } + def parent_scope; end + + # pkg:gem/rbi#lib/rbi/model.rb:10 + sig { returns(T.nilable(::RBI::Tree)) } + def parent_tree; end + + # pkg:gem/rbi#lib/rbi/model.rb:10 + sig { params(parent_tree: T.nilable(::RBI::Tree)).returns(T.nilable(::RBI::Tree)) } + def parent_tree=(parent_tree); end + + # pkg:gem/rbi#lib/rbi/printer.rb:890 + 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 + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1239 + sig do + params( + out: T.any(::IO, ::StringIO), + indent: ::Integer, + print_locs: T::Boolean, + positional_names: T::Boolean + ).void + end + def rbs_print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), positional_names: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1245 + sig { params(indent: ::Integer, print_locs: T::Boolean, positional_names: T::Boolean).returns(::String) } + def rbs_string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), positional_names: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/model.rb:31 + sig { params(node: ::RBI::Node).void } + def replace(node); end + + # pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:91 + sig { params(version: ::Gem::Version).returns(T::Boolean) } + def satisfies_version?(version); end + + # pkg:gem/rbi#lib/rbi/printer.rb:896 + 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 +# +# pkg:gem/rbi#lib/rbi/model.rb:88 +class RBI::NodeWithComments < ::RBI::Node + abstract! + + # pkg:gem/rbi#lib/rbi/model.rb:105 + sig { params(loc: T.nilable(::RBI::Loc), comments: T.nilable(T::Array[::RBI::Comment])).void } + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/model.rb:111 + sig { returns(T::Array[::String]) } + def annotations; end + + # pkg:gem/rbi#lib/rbi/model.rb:93 + sig { returns(T::Array[::RBI::Comment]) } + def comments; end + + # pkg:gem/rbi#lib/rbi/model.rb:90 + sig { params(comments: T::Array[::RBI::Comment]).returns(T::Array[::RBI::Comment]) } + def comments=(comments); end + + # Returns true if this node has any comments, without allocating + # an empty array for nodes that have never had comments set. + # + # pkg:gem/rbi#lib/rbi/model.rb:100 + sig { returns(T::Boolean) } + def comments?; end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:325 + sig { override.params(other: ::RBI::Node).void } + def merge_with(other); end + + # pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:101 + sig { returns(T::Array[::Gem::Requirement]) } + def version_requirements; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:665 +class RBI::OptParam < ::RBI::Param + # pkg:gem/rbi#lib/rbi/model.rb:674 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # pkg:gem/rbi#lib/rbi/model.rb:694 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:689 + sig { override.returns(T::Boolean) } + def anonymous?; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:668 + sig { override.returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:683 + sig { override.returns(::String) } + def to_s; end + + # pkg:gem/rbi#lib/rbi/model.rb:671 + sig { returns(::String) } + def value; end +end + +# @abstract +# +# pkg:gem/rbi#lib/rbi/model.rb:614 +class RBI::Param < ::RBI::NodeWithComments + abstract! + + # pkg:gem/rbi#lib/rbi/model.rb:616 + sig { params(loc: T.nilable(::RBI::Loc), comments: T.nilable(T::Array[::RBI::Comment])).void } + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # @abstract + # + # pkg:gem/rbi#lib/rbi/model.rb:630 + sig { abstract.returns(T::Boolean) } + def anonymous?; end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:555 + sig { override.params(other: T.nilable(::RBI::Node)).returns(T::Boolean) } + def compatible_with?(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:621 + sig { returns(T.nilable(::String)) } + def name; end +end + +# pkg:gem/rbi#lib/rbi/parser.rb:7 +class RBI::ParseError < ::RBI::Error + # pkg:gem/rbi#lib/rbi/parser.rb:12 + sig { params(message: ::String, location: ::RBI::Loc).void } + def initialize(message, location); end + + # pkg:gem/rbi#lib/rbi/parser.rb:9 + sig { returns(::RBI::Loc) } + def location; end +end + +# pkg:gem/rbi#lib/rbi/parser.rb:49 +class RBI::Parser + # pkg:gem/rbi#lib/rbi/parser.rb:80 + sig { params(path: ::String).returns(::RBI::Tree) } + def parse_file(path); end + + # pkg:gem/rbi#lib/rbi/parser.rb:75 + sig { params(string: ::String).returns(::RBI::Tree) } + def parse_string(string); end + + private + + # pkg:gem/rbi#lib/rbi/parser.rb:87 + sig { params(source: ::String, file: ::String).returns(::RBI::Tree) } + def parse(source, file:); end + + class << self + # pkg:gem/rbi#lib/rbi/parser.rb:57 + sig { params(path: ::String).returns(::RBI::Tree) } + def parse_file(path); end + + # pkg:gem/rbi#lib/rbi/parser.rb:62 + sig { params(paths: T::Array[::String]).returns(T::Array[::RBI::Tree]) } + def parse_files(paths); end + + # pkg:gem/rbi#lib/rbi/parser.rb:52 + sig { params(string: ::String).returns(::RBI::Tree) } + def parse_string(string); end + + # pkg:gem/rbi#lib/rbi/parser.rb:68 + sig { params(strings: T::Array[::String]).returns(T::Array[::RBI::Tree]) } + def parse_strings(strings); end + end +end + +# pkg:gem/rbi#lib/rbi/parser.rb:1049 +class RBI::Parser::HeredocLocationVisitor < ::Prism::Visitor + # pkg:gem/rbi#lib/rbi/parser.rb:1051 + sig { params(source: ::Prism::Source, begin_offset: ::Integer, end_offset: ::Integer).void } + def initialize(source, begin_offset, end_offset); end + + # pkg:gem/rbi#lib/rbi/parser.rb:1082 + sig { returns(::Prism::Location) } + def location; end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:1072 + sig { override.params(node: ::Prism::InterpolatedStringNode).void } + def visit_interpolated_string_node(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:1061 + sig { override.params(node: ::Prism::StringNode).void } + def visit_string_node(node); end + + private + + # pkg:gem/rbi#lib/rbi/parser.rb:1093 + sig { params(node: T.any(::Prism::InterpolatedStringNode, ::Prism::StringNode)).void } + def handle_string_node(node); end +end + +# pkg:gem/rbi#lib/rbi/parser.rb:940 +class RBI::Parser::SigBuilder < ::RBI::Parser::Visitor + # pkg:gem/rbi#lib/rbi/parser.rb:945 + sig { params(content: ::String, file: ::String).void } + def initialize(content, file:); end + + # pkg:gem/rbi#lib/rbi/parser.rb:1032 + sig { params(node: ::Prism::CallNode, value: ::String).returns(T::Boolean) } + def allow_incompatible_override?(node, value); end + + # pkg:gem/rbi#lib/rbi/parser.rb:942 + sig { returns(::RBI::Sig) } + def current; end + + # pkg:gem/rbi#lib/rbi/parser.rb:1022 + sig { params(node: ::Prism::Node).returns(::String) } + def sig_param_name(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:1011 + sig { params(node: ::Prism::CallNode).returns(T.nilable(::String)) } + def sig_type_argument(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:1003 + sig { override.params(node: ::Prism::AssocNode).void } + def visit_assoc_node(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:953 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end +end + +# pkg:gem/rbi#lib/rbi/parser.rb:179 +class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor + # pkg:gem/rbi#lib/rbi/parser.rb:187 + sig { params(source: ::String, comments: T::Array[::Prism::Comment], file: ::String).void } + def initialize(source, comments:, file:); end + + # pkg:gem/rbi#lib/rbi/parser.rb:184 + sig { returns(T.nilable(::Prism::Node)) } + def last_node; end + + # pkg:gem/rbi#lib/rbi/parser.rb:181 + sig { returns(::RBI::Tree) } + def tree; end + + # pkg:gem/rbi#lib/rbi/parser.rb:376 + sig { params(node: ::Prism::CallNode).void } + def visit_call_node(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:200 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:251 + sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).void } + def visit_constant_assign(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:244 + sig { override.params(node: ::Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:236 + sig { override.params(node: ::Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:306 + sig { override.params(node: ::Prism::DefNode).void } + def visit_def_node(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:328 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:347 + sig { override.params(node: ::Prism::ProgramNode).void } + def visit_program_node(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/parser.rb:359 + sig { override.params(node: ::Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + private + + # Collect all the remaining comments within a node + # + # pkg:gem/rbi#lib/rbi/parser.rb:554 + sig { params(node: ::Prism::Node).void } + def collect_dangling_comments(node); end + + # Collect all the remaining comments after visiting the tree + # + # pkg:gem/rbi#lib/rbi/parser.rb:572 + sig { void } + def collect_orphan_comments; end + + # pkg:gem/rbi#lib/rbi/parser.rb:595 + sig { returns(::RBI::Tree) } + def current_scope; end + + # pkg:gem/rbi#lib/rbi/parser.rb:600 + sig { returns(T::Array[::RBI::Sig]) } + def current_sigs; end + + # pkg:gem/rbi#lib/rbi/parser.rb:607 + sig { params(sigs: T::Array[::RBI::Sig]).returns(T::Array[::RBI::Comment]) } + def detach_comments_from_sigs(sigs); end + + # pkg:gem/rbi#lib/rbi/parser.rb:619 + sig { params(node: ::Prism::Node).returns(T::Array[::RBI::Comment]) } + def node_comments(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:681 + sig { params(node: ::Prism::Comment).returns(::RBI::Comment) } + def parse_comment(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:714 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Param]) } + def parse_params(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:688 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Arg]) } + def parse_send_args(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:790 + sig { params(node: ::Prism::CallNode).returns(::RBI::Sig) } + def parse_sig(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:799 + sig do + params( + node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode) + ).returns(T.nilable(::RBI::Struct)) + end + def parse_struct(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:847 + sig { params(send: ::Prism::CallNode).void } + def parse_tstruct_field(send); end + + # pkg:gem/rbi#lib/rbi/parser.rb:884 + sig { params(name: ::String, node: ::Prism::Node).returns(::RBI::Visibility) } + def parse_visibility(name, node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:898 + sig { void } + def separate_header_comments; end + + # pkg:gem/rbi#lib/rbi/parser.rb:908 + sig { void } + def set_root_tree_loc; end + + # pkg:gem/rbi#lib/rbi/parser.rb:927 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t_enum_value?(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:922 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def type_variable_definition?(node); end +end + +# pkg:gem/rbi#lib/rbi/parser.rb:114 +class RBI::Parser::Visitor < ::Prism::Visitor + # pkg:gem/rbi#lib/rbi/parser.rb:116 + sig { params(source: ::String, file: ::String).void } + def initialize(source, file:); end + + private + + # pkg:gem/rbi#lib/rbi/parser.rb:158 + sig { params(node: ::Prism::Node).returns(::Prism::Location) } + def adjust_prism_location_for_heredoc(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:149 + sig { params(node: ::Prism::Node).returns(T::Boolean) } + def braceless_shape?(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:126 + sig { params(node: ::Prism::Node).returns(::RBI::Loc) } + def node_loc(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:131 + sig { params(node: T.nilable(::Prism::Node)).returns(T.nilable(::String)) } + def node_string(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:138 + sig { params(node: ::Prism::Node).returns(::String) } + def node_string!(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:169 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def self?(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:174 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t_sig_without_runtime?(node); end + + # pkg:gem/rbi#lib/rbi/parser.rb:143 + sig { params(node: ::Prism::Node).returns(::String) } + def type_string(node); end +end + +# pkg:gem/rbi#lib/rbi/printer.rb:7 +class RBI::Printer < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/printer.rb:25 + sig do + params( + out: T.any(::IO, ::String, ::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 + + # pkg:gem/rbi#lib/rbi/printer.rb:19 + sig { returns(::Integer) } + def current_indent; end + + # pkg:gem/rbi#lib/rbi/printer.rb:48 + sig { returns(::String) } + def current_indent_string; end + + # pkg:gem/rbi#lib/rbi/printer.rb:43 + sig { void } + def dedent; end + + # pkg:gem/rbi#lib/rbi/printer.rb:13 + def in_visibility_group; end + + # pkg:gem/rbi#lib/rbi/printer.rb:13 + def in_visibility_group=(_arg0); end + + # pkg:gem/rbi#lib/rbi/printer.rb:38 + sig { void } + def indent; end + + # pkg:gem/rbi#lib/rbi/printer.rb:22 + sig { returns(T.nilable(::Integer)) } + def max_line_length; end + + # pkg:gem/rbi#lib/rbi/printer.rb:16 + sig { returns(T.nilable(::RBI::Node)) } + def previous_node; end + + # Print a string without indentation nor `\n` at the end. + # + # pkg:gem/rbi#lib/rbi/printer.rb:54 + sig { params(string: ::String).void } + def print(string); end + + # pkg:gem/rbi#lib/rbi/printer.rb:13 + sig { returns(T::Boolean) } + def print_locs; end + + # pkg:gem/rbi#lib/rbi/printer.rb:13 + sig { params(print_locs: T::Boolean).returns(T::Boolean) } + def print_locs=(print_locs); end + + # Print a string with indentation and `\n` at the end. + # + # pkg:gem/rbi#lib/rbi/printer.rb:76 + sig { params(string: ::String).void } + def printl(string); end + + # Print a string without indentation but with a `\n` at the end. + # + # pkg:gem/rbi#lib/rbi/printer.rb:60 + 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. + # + # pkg:gem/rbi#lib/rbi/printer.rb:69 + sig { params(string: T.nilable(::String)).void } + def printt(string = T.unsafe(nil)); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:84 + sig { override.params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:98 + sig { override.params(file: ::RBI::File).void } + def visit_file(file); end + + private + + # pkg:gem/rbi#lib/rbi/printer.rb:714 + sig { params(node: ::RBI::Node).returns(T::Boolean) } + def oneline?(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:682 + sig { params(node: ::RBI::Node).void } + def print_blank_line_before(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:692 + sig { params(node: ::RBI::Node).void } + def print_loc(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:698 + sig { params(node: ::RBI::Param, last: T::Boolean).void } + def print_param_comment_leading_space(node, last:); end + + # pkg:gem/rbi#lib/rbi/printer.rb:773 + sig { params(node: ::RBI::Sig).void } + def print_sig_as_block(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:743 + sig { params(node: ::RBI::Sig).void } + def print_sig_as_line(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:706 + sig { params(node: ::RBI::SigParam, last: T::Boolean).void } + def print_sig_param_comment_leading_space(node, last:); end + + # pkg:gem/rbi#lib/rbi/printer.rb:843 + sig { params(node: ::RBI::Sig).returns(T::Array[::String]) } + def sig_modifiers(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:493 + sig { override.params(node: ::RBI::Arg).void } + def visit_arg(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:280 + sig { params(node: ::RBI::Attr).void } + def visit_attr(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:263 + sig { override.params(node: ::RBI::AttrAccessor).void } + def visit_attr_accessor(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:269 + sig { override.params(node: ::RBI::AttrReader).void } + def visit_attr_reader(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:275 + sig { override.params(node: ::RBI::AttrWriter).void } + def visit_attr_writer(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:160 + sig { override.params(node: ::RBI::BlankLine).void } + def visit_blank_line(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:407 + sig { override.params(node: ::RBI::BlockParam).void } + def visit_block_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:180 + sig { override.params(node: ::RBI::Class).void } + def visit_class(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:139 + sig { override.params(node: ::RBI::Comment).void } + def visit_comment(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:658 + sig { override.params(node: ::RBI::ConflictTree).void } + def visit_conflict_tree(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:253 + sig { override.params(node: ::RBI::Const).void } + def visit_const(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:425 + sig { override.params(node: ::RBI::Extend).void } + def visit_extend(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:413 + sig { override.params(node: ::RBI::ForwardingParam).void } + def visit_forwarding_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:627 + sig { override.params(node: ::RBI::Group).void } + def visit_group(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:611 + sig { override.params(node: ::RBI::Helper).void } + def visit_helper(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:419 + sig { override.params(node: ::RBI::Include).void } + def visit_include(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:499 + sig { override.params(node: ::RBI::KwArg).void } + def visit_kw_arg(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:389 + sig { override.params(node: ::RBI::KwOptParam).void } + def visit_kw_opt_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:383 + sig { override.params(node: ::RBI::KwParam).void } + def visit_kw_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:395 + sig { override.params(node: ::RBI::KwRestParam).void } + def visit_kw_rest_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:315 + sig { override.params(node: ::RBI::Method).void } + def visit_method(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:621 + sig { override.params(node: ::RBI::MixesInClassMethods).void } + def visit_mixes_in_class_methods(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:430 + sig { params(node: ::RBI::Mixin).void } + def visit_mixin(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:174 + sig { override.params(node: ::RBI::Module).void } + def visit_module(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:401 + sig { override.params(node: ::RBI::NoKwParam).void } + def visit_no_kw_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:371 + sig { override.params(node: ::RBI::OptParam).void } + def visit_opt_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:460 + sig { override.params(node: ::RBI::Private).void } + def visit_private(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:454 + sig { override.params(node: ::RBI::Protected).void } + def visit_protected(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:448 + sig { override.params(node: ::RBI::Public).void } + def visit_public(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:118 + sig { override.params(node: ::RBI::RBSComment).void } + def visit_rbs_comment(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:365 + sig { override.params(node: ::RBI::ReqParam).void } + def visit_req_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:648 + sig { override.params(node: ::RBI::RequiresAncestor).void } + def visit_requires_ancestor(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:377 + sig { override.params(node: ::RBI::RestParam).void } + def visit_rest_param(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:197 + sig { params(node: ::RBI::Scope).void } + def visit_scope(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:242 + sig { params(node: ::RBI::Scope).void } + def visit_scope_body(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:668 + sig { override.params(node: ::RBI::ScopeConflict).void } + def visit_scope_conflict(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:207 + sig { params(node: ::RBI::Scope).void } + def visit_scope_header(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:475 + sig { override.params(node: ::RBI::Send).void } + def visit_send(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:507 + sig { override.params(node: ::RBI::Sig).void } + def visit_sig(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:528 + sig { override.params(node: ::RBI::SigParam).void } + def visit_sig_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:192 + sig { override.params(node: ::RBI::SingletonClass).void } + def visit_singleton_class(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:186 + sig { override.params(node: ::RBI::Struct).void } + def visit_struct(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:553 + sig { params(node: ::RBI::TStructField).void } + def visit_t_struct_field(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:572 + sig { override.params(node: ::RBI::TEnum).void } + def visit_tenum(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:578 + sig { override.params(node: ::RBI::TEnumBlock).void } + def visit_tenum_block(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:591 + sig { override.params(node: ::RBI::TEnumValue).void } + def visit_tenum_value(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:166 + sig { override.params(node: ::RBI::Tree).void } + def visit_tree(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:536 + sig { override.params(node: ::RBI::TStruct).void } + def visit_tstruct(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:542 + sig { override.params(node: ::RBI::TStructConst).void } + def visit_tstruct_const(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:548 + sig { override.params(node: ::RBI::TStructProp).void } + def visit_tstruct_prop(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:601 + sig { override.params(node: ::RBI::TypeMember).void } + def visit_type_member(node); end + + # pkg:gem/rbi#lib/rbi/printer.rb:465 + sig { params(node: ::RBI::Visibility).void } + def visit_visibility(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/printer.rb:634 + sig { override.params(node: ::RBI::VisibilityGroup).void } + def visit_visibility_group(node); end +end + +# pkg:gem/rbi#lib/rbi/printer.rb:840 +RBI::Printer::EMPTY_MODIFIERS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rbi#lib/rbi/printer.rb:10 +RBI::Printer::INDENT_CACHE = T.let(T.unsafe(nil), Array) + +# Pre-computed indentation strings to avoid allocating " " * indent on every line. +# +# pkg:gem/rbi#lib/rbi/printer.rb:9 +RBI::Printer::MAX_CACHED_INDENT = T.let(T.unsafe(nil), Integer) + +# pkg:gem/rbi#lib/rbi/printer.rb:5 +class RBI::PrinterError < ::RBI::Error; end + +# pkg:gem/rbi#lib/rbi/model.rb:1007 +class RBI::Private < ::RBI::Visibility + # pkg:gem/rbi#lib/rbi/model.rb:1009 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + +# pkg:gem/rbi#lib/rbi/model.rb:999 +class RBI::Protected < ::RBI::Visibility + # pkg:gem/rbi#lib/rbi/model.rb:1001 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + +# pkg:gem/rbi#lib/rbi/model.rb:988 +class RBI::Public < ::RBI::Visibility + # pkg:gem/rbi#lib/rbi/model.rb:990 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + +# Shared default instance to avoid allocating a new Public on every Method/Attr creation. +# +# pkg:gem/rbi#lib/rbi/model.rb:996 +RBI::Public::DEFAULT = T.let(T.unsafe(nil), RBI::Public) + +# pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:5 +module RBI::RBS; end + +# pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:6 +class RBI::RBS::MethodTypeTranslator + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:38 + sig { params(method: ::RBI::Method, options: ::RBI::RBS::MethodTypeTranslator::Options).void } + def initialize(method, options: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:35 + sig { returns(::RBI::Sig) } + def result; end + + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:47 + sig { params(type: ::RBS::MethodType).void } + def visit(type); end + + private + + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:136 + sig { params(param: ::RBI::Param).returns(T.nilable(::String)) } + def anonymous_param_name(param); end + + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:121 + sig { params(param: ::RBS::Types::Function::Param, index: ::Integer).returns(::RBI::SigParam) } + def translate_function_param(param, index); end + + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:148 + sig { params(type: T.untyped).returns(::RBI::Type) } + def translate_type(type); end + + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:63 + sig { params(type: ::RBS::Types::Block).void } + def visit_block_type(type); end + + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:78 + sig { params(type: ::RBS::Types::Function).void } + def visit_function_type(type); end + + class << self + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:11 + sig { params(method: ::RBI::Method, type: ::RBS::MethodType).returns(::RBI::Sig) } + def translate(method, type); end + end +end + +# pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:7 +class RBI::RBS::MethodTypeTranslator::Error < ::RBI::Error; end + +# pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:18 +class RBI::RBS::MethodTypeTranslator::Options + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:23 + sig { params(erase_generic_types: T::Boolean).void } + def initialize(erase_generic_types: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:20 + sig { returns(T::Boolean) } + def erase_generic_types; end + + class << self + # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:30 + sig { returns(::RBI::RBS::MethodTypeTranslator::Options) } + def default; end + end +end + +# pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:6 +class RBI::RBS::TypeTranslator + # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:41 + sig { params(options: ::RBI::RBS::MethodTypeTranslator::Options).void } + def initialize(options: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:46 + sig do + params( + type: T.any(::RBS::Types::Alias, ::RBS::Types::Bases::Any, ::RBS::Types::Bases::Bool, ::RBS::Types::Bases::Bottom, ::RBS::Types::Bases::Class, ::RBS::Types::Bases::Instance, ::RBS::Types::Bases::Nil, ::RBS::Types::Bases::Self, ::RBS::Types::Bases::Top, ::RBS::Types::Bases::Void, ::RBS::Types::ClassInstance, ::RBS::Types::ClassSingleton, ::RBS::Types::Function, ::RBS::Types::Interface, ::RBS::Types::Intersection, ::RBS::Types::Literal, ::RBS::Types::Optional, ::RBS::Types::Proc, ::RBS::Types::Record, ::RBS::Types::Tuple, ::RBS::Types::Union, ::RBS::Types::UntypedFunction, ::RBS::Types::Variable) + ).returns(::RBI::Type) + end + def translate(type); end + + private + + # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:225 + sig { params(type_name: ::String).returns(::String) } + def erase_t_generic_type(type_name); end + + # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:138 + sig { params(type: ::RBS::Types::ClassInstance).returns(::RBI::Type) } + def translate_class_instance(type); end + + # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:152 + sig { params(type: ::RBS::Types::Function).returns(::RBI::Type) } + def translate_function(type); end + + # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:220 + sig { params(type_name: ::String).returns(::String) } + def translate_t_generic_type(type_name); end + + # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:126 + sig { params(type: ::RBS::Types::Alias).returns(::RBI::Type) } + def translate_type_alias(type); end + + class << self + # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:33 + sig do + params( + type: T.any(::RBS::Types::Alias, ::RBS::Types::Bases::Any, ::RBS::Types::Bases::Bool, ::RBS::Types::Bases::Bottom, ::RBS::Types::Bases::Class, ::RBS::Types::Bases::Instance, ::RBS::Types::Bases::Nil, ::RBS::Types::Bases::Self, ::RBS::Types::Bases::Top, ::RBS::Types::Bases::Void, ::RBS::Types::ClassInstance, ::RBS::Types::ClassSingleton, ::RBS::Types::Function, ::RBS::Types::Interface, ::RBS::Types::Intersection, ::RBS::Types::Literal, ::RBS::Types::Optional, ::RBS::Types::Proc, ::RBS::Types::Record, ::RBS::Types::Tuple, ::RBS::Types::Union, ::RBS::Types::UntypedFunction, ::RBS::Types::Variable) + ).returns(::RBI::Type) + end + def translate(type); end + end +end + +# pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:211 +RBI::RBS::TypeTranslator::GENERIC_TYPE_TO_SORBET_GENERIC_TYPE = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:38 +RBI::RBS::TypeTranslator::Options = RBI::RBS::MethodTypeTranslator::Options + +# pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:198 +RBI::RBS::TypeTranslator::RUNTIME_GENERIC_TYPES = T.let(T.unsafe(nil), Array) + +RBI::RBS::TypeTranslator::RbsType = T.type_alias { T.any(::RBS::Types::Alias, ::RBS::Types::Bases::Any, ::RBS::Types::Bases::Bool, ::RBS::Types::Bases::Bottom, ::RBS::Types::Bases::Class, ::RBS::Types::Bases::Instance, ::RBS::Types::Bases::Nil, ::RBS::Types::Bases::Self, ::RBS::Types::Bases::Top, ::RBS::Types::Bases::Void, ::RBS::Types::ClassInstance, ::RBS::Types::ClassSingleton, ::RBS::Types::Function, ::RBS::Types::Interface, ::RBS::Types::Intersection, ::RBS::Types::Literal, ::RBS::Types::Optional, ::RBS::Types::Proc, ::RBS::Types::Record, ::RBS::Types::Tuple, ::RBS::Types::Union, ::RBS::Types::UntypedFunction, ::RBS::Types::Variable) } + +# pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:215 +RBI::RBS::TypeTranslator::SORBET_GENERIC_TYPE_TO_GENERIC_TYPE = T.let(T.unsafe(nil), Hash) + +# A comment representing a RBS type prefixed with `#:` +# +# pkg:gem/rbi#lib/rbi/model.rb:78 +class RBI::RBSComment < ::RBI::Comment + # pkg:gem/rbi#lib/rbi/model.rb:80 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end +end + +# pkg:gem/rbi#lib/rbi/rbs_printer.rb:5 +class RBI::RBSPrinter < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:31 + sig do + params( + out: T.any(::IO, ::StringIO), + indent: ::Integer, + print_locs: T::Boolean, + positional_names: T::Boolean, + max_line_length: T.nilable(::Integer), + force_multiline_signatures: T::Boolean + ).void + end + def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), positional_names: T.unsafe(nil), max_line_length: T.unsafe(nil), force_multiline_signatures: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:15 + sig { returns(::Integer) } + def current_indent; end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:58 + sig { void } + def dedent; end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:9 + def in_visibility_group; end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:9 + def in_visibility_group=(_arg0); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:53 + sig { void } + def indent; end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:21 + sig { returns(T.nilable(::Integer)) } + def max_line_length; end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:18 + sig { returns(T::Boolean) } + def positional_names; end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:18 + sig { params(positional_names: T::Boolean).returns(T::Boolean) } + def positional_names=(positional_names); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:12 + sig { returns(T.nilable(::RBI::Node)) } + def previous_node; end + + # Print a string without indentation nor `\n` at the end. + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:64 + sig { params(string: ::String).void } + def print(string); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:311 + sig { params(node: ::RBI::Attr, sig: ::RBI::Sig).void } + def print_attr_sig(node, sig); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:9 + sig { returns(T::Boolean) } + def print_locs; end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:9 + sig { params(print_locs: T::Boolean).returns(T::Boolean) } + def print_locs=(print_locs); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:409 + sig { params(node: ::RBI::Method, sig: ::RBI::Sig).void } + def print_method_sig(node, sig); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:491 + sig { params(sig_param: T.nilable(::RBI::SigParam)).void } + def print_method_sig_block(sig_param); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:426 + sig { params(node: ::RBI::Method, sig: ::RBI::Sig, multiline: T::Boolean).void } + def print_method_sig_content(node, sig, multiline:); end + + # Print a string with indentation and `\n` at the end. + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:84 + sig { params(string: ::String).void } + def printl(string); end + + # Print a string without indentation but with a `\n` at the end. + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:70 + 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. + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:77 + sig { params(string: T.nilable(::String)).void } + def printt(string = T.unsafe(nil)); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:91 + sig { override.params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:668 + sig { override.params(node: ::RBI::Arg).void } + def visit_arg(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:279 + sig { params(node: ::RBI::Attr).void } + def visit_attr(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:262 + sig { override.params(node: ::RBI::AttrAccessor).void } + def visit_attr_accessor(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:268 + sig { override.params(node: ::RBI::AttrReader).void } + def visit_attr_reader(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:274 + sig { override.params(node: ::RBI::AttrWriter).void } + def visit_attr_writer(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:133 + sig { override.params(node: ::RBI::BlankLine).void } + def visit_blank_line(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:594 + sig { override.params(node: ::RBI::BlockParam).void } + def visit_block_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:153 + sig { override.params(node: ::RBI::Class).void } + def visit_class(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:116 + sig { override.params(node: ::RBI::Comment).void } + def visit_comment(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:804 + sig { override.params(node: ::RBI::ConflictTree).void } + def visit_conflict_tree(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:246 + sig { override.params(node: ::RBI::Const).void } + def visit_const(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:612 + sig { override.params(node: ::RBI::Extend).void } + def visit_extend(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:103 + sig { override.params(file: ::RBI::File).void } + def visit_file(file); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:600 + sig { override.params(node: ::RBI::ForwardingParam).void } + def visit_forwarding_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:777 + sig { override.params(node: ::RBI::Group).void } + def visit_group(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:765 + sig { override.params(node: ::RBI::Helper).void } + def visit_helper(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:606 + sig { override.params(node: ::RBI::Include).void } + def visit_include(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:674 + sig { override.params(node: ::RBI::KwArg).void } + def visit_kw_arg(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:575 + sig { override.params(node: ::RBI::KwOptParam).void } + def visit_kw_opt_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:569 + sig { override.params(node: ::RBI::KwParam).void } + def visit_kw_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:581 + sig { override.params(node: ::RBI::KwRestParam).void } + def visit_kw_rest_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:334 + sig { override.params(node: ::RBI::Method).void } + def visit_method(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:771 + sig { override.params(node: ::RBI::MixesInClassMethods).void } + def visit_mixes_in_class_methods(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:617 + sig { params(node: ::RBI::Mixin).void } + def visit_mixin(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:147 + sig { override.params(node: ::RBI::Module).void } + def visit_module(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:588 + sig { override.params(node: ::RBI::NoKwParam).void } + def visit_no_kw_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:552 + sig { override.params(node: ::RBI::OptParam).void } + def visit_opt_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:647 + sig { override.params(node: ::RBI::Private).void } + def visit_private(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:641 + sig { override.params(node: ::RBI::Protected).void } + def visit_protected(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:635 + sig { override.params(node: ::RBI::Public).void } + def visit_public(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:542 + sig { override.params(node: ::RBI::ReqParam).void } + def visit_req_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:798 + sig { override.params(node: ::RBI::RequiresAncestor).void } + def visit_requires_ancestor(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:562 + sig { override.params(node: ::RBI::RestParam).void } + def visit_rest_param(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:170 + sig { params(node: ::RBI::Scope).void } + def visit_scope(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:233 + sig { params(node: ::RBI::Scope).void } + def visit_scope_body(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:814 + sig { override.params(node: ::RBI::ScopeConflict).void } + def visit_scope_conflict(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:180 + sig { params(node: ::RBI::Scope).void } + def visit_scope_header(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:662 + sig { override.params(node: ::RBI::Send).void } + def visit_send(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:523 + sig { params(node: ::RBI::Sig).void } + def visit_sig(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:536 + sig { params(node: ::RBI::SigParam).void } + def visit_sig_param(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:165 + sig { override.params(node: ::RBI::SingletonClass).void } + def visit_singleton_class(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:159 + sig { override.params(node: ::RBI::Struct).void } + def visit_struct(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:731 + sig { override.params(node: ::RBI::TEnum).void } + def visit_tenum(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:737 + sig { override.params(node: ::RBI::TEnumBlock).void } + def visit_tenum_block(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:743 + sig { override.params(node: ::RBI::TEnumValue).void } + def visit_tenum_value(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:139 + sig { override.params(node: ::RBI::Tree).void } + def visit_tree(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:680 + sig { override.params(node: ::RBI::TStruct).void } + def visit_tstruct(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:715 + sig { override.params(node: ::RBI::TStructConst).void } + def visit_tstruct_const(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:723 + sig { override.params(node: ::RBI::TStructProp).void } + def visit_tstruct_prop(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:759 + sig { override.params(node: ::RBI::TypeMember).void } + def visit_type_member(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:652 + sig { params(node: ::RBI::Visibility).void } + def visit_visibility(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:784 + sig { override.params(node: ::RBI::VisibilityGroup).void } + def visit_visibility_group(node); end + + private + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:914 + sig { params(node: ::RBI::Node).returns(T::Boolean) } + def oneline?(node); end + + # Parse a string containing a `T.let(x, X)` and extract the type + # + # Returns `nil` is the string is not a `T.let`. + # + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:948 + sig { params(code: T.nilable(::String)).returns(T.nilable(::String)) } + def parse_t_let(code); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:936 + sig { params(type: T.any(::RBI::Type, ::String)).returns(::RBI::Type) } + def parse_type(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:830 + sig { params(node: ::RBI::Node).void } + def print_blank_line_before(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:849 + sig { params(node: ::RBI::Node).void } + def print_loc(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:898 + sig { params(node: ::RBI::Param, last: T::Boolean).void } + def print_param_comment_leading_space(node, last:); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:855 + sig { params(sig_param: ::RBI::SigParam, method_param: ::RBI::Param).void } + def print_sig_param(sig_param, method_param); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:906 + sig { params(node: ::RBI::SigParam, last: T::Boolean).void } + def print_sig_param_comment_leading_space(node, last:); end +end + +# pkg:gem/rbi#lib/rbi/rbs_printer.rb:6 +class RBI::RBSPrinter::Error < ::RBI::Error; end + +# pkg:gem/rbi#lib/rbi/model.rb:5 +class RBI::ReplaceNodeError < ::RBI::Error; end + +# pkg:gem/rbi#lib/rbi/model.rb:635 +class RBI::ReqParam < ::RBI::Param + # pkg:gem/rbi#lib/rbi/model.rb:641 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # pkg:gem/rbi#lib/rbi/model.rb:660 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:655 + sig { override.returns(T::Boolean) } + def anonymous?; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:638 + sig { override.returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:649 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:1449 +class RBI::RequiresAncestor < ::RBI::NodeWithComments + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:1454 + sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T.nilable(T::Array[::RBI::Comment])).void } + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:154 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # pkg:gem/rbi#lib/rbi/model.rb:1451 + sig { returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1461 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:699 +class RBI::RestParam < ::RBI::Param + # pkg:gem/rbi#lib/rbi/model.rb:705 + sig do + params( + name: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # pkg:gem/rbi#lib/rbi/model.rb:724 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:719 + sig { override.returns(T::Boolean) } + def anonymous?; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:702 + sig { override.returns(T.nilable(::String)) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:713 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:5 +module RBI::Rewriters; end + +# pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:6 +class RBI::Rewriters::AddSigTemplates < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:8 + sig { params(with_todo_comment: T::Boolean).void } + def initialize(with_todo_comment: T.unsafe(nil)); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:15 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:29 + sig { params(attr: ::RBI::Attr).void } + def add_attr_sig(attr); end + + # pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:44 + sig { params(method: ::RBI::Method).void } + def add_method_sig(method); end + + # pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:74 + sig { params(node: ::RBI::NodeWithComments).void } + def add_todo_comment(node); end +end + +# pkg:gem/rbi#lib/rbi/rewriters/annotate.rb:6 +class RBI::Rewriters::Annotate < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/rewriters/annotate.rb:8 + 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 + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/annotate.rb:17 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/annotate.rb:30 + sig { params(node: ::RBI::NodeWithComments).void } + def annotate_node(node); end + + # pkg:gem/rbi#lib/rbi/rewriters/annotate.rb:37 + sig { params(node: ::RBI::Node).returns(T::Boolean) } + def root?(node); end +end + +# pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:22 +class RBI::Rewriters::AttrToMethods < ::RBI::Visitor + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:25 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:38 + sig { params(node: ::RBI::Node, with: T::Array[::RBI::Node]).void } + def replace(node, with:); end +end + +# pkg:gem/rbi#lib/rbi/rewriters/deannotate.rb:6 +class RBI::Rewriters::Deannotate < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/rewriters/deannotate.rb:8 + sig { params(annotation: ::String).void } + def initialize(annotation); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/deannotate.rb:15 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/deannotate.rb:26 + sig { params(node: ::RBI::NodeWithComments).void } + def deannotate_node(node); end +end + +# Take a gem version and filter out all RBI that is not relevant to that version based on @version annotations +# in comments. As an example: +# +# ~~~rb +# tree = Parser.parse_string(<<~RBI) +# class Foo +# # @version > 0.3.0 +# def bar +# end +# +# # @version <= 0.3.0 +# def bar(arg1) +# end +# end +# RBI +# +# Rewriters::FilterVersions.filter(tree, Gem::Version.new("0.3.1")) +# +# assert_equal(<<~RBI, tree.string) +# class Foo +# # @version > 0.3.0 +# def bar +# end +# end +# RBI +# ~~~ +# +# Supported operators: +# - equals `=` +# - not equals `!=` +# - greater than `>` +# - greater than or equal to `>=` +# - less than `<` +# - less than or equal to `<=` +# - pessimistic or twiddle-wakka`~>` +# +# And/or logic: +# - "And" logic: put multiple versions on the same line +# - e.g. `@version > 0.3.0, <1.0.0` means version must be greater than 0.3.0 AND less than 1.0.0 +# - "Or" logic: put multiple versions on subsequent lines +# - e.g. the following means version must be less than 0.3.0 OR greater than 1.0.0 +# ``` +# # @version < 0.3.0 +# # @version > 1.0.0 +# ``` +# Prerelease versions: +# - Prerelease versions are considered less than their non-prerelease counterparts +# - e.g. `0.4.0-prerelease` is less than `0.4.0` +# +# RBI with no versions: +# - RBI with no version annotations are automatically counted towards ALL versions +# +# pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:57 +class RBI::Rewriters::FilterVersions < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:69 + sig { params(version: ::Gem::Version).void } + def initialize(version); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:76 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + class << self + # pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:62 + sig { params(tree: ::RBI::Tree, version: ::Gem::Version).void } + def filter(tree, version); end + end +end + +# pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:58 +RBI::Rewriters::FilterVersions::VERSION_PREFIX = T.let(T.unsafe(nil), String) + +# Rewrite non-singleton methods inside singleton classes to singleton methods +# +# Example: +# ~~~rb +# class << self +# def m1; end +# def self.m2; end +# +# class << self +# def m3; end +# end +# end +# ~~~ +# +# will be rewritten to: +# +# ~~~rb +# def self.m1; end +# +# class << self +# def self.m2; end +# def self.m3; end +# end +# ~~~ +# +# pkg:gem/rbi#lib/rbi/rewriters/flatten_singleton_methods.rb:30 +class RBI::Rewriters::FlattenSingletonMethods < ::RBI::Visitor + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/flatten_singleton_methods.rb:33 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# Flattens visibility nodes into method nodes +# +# Example: +# ~~~rb +# class A +# def m1; end +# private +# def m2; end +# def m3; end +# end +# ~~~ +# +# will be transformed into: +# +# ~~~rb +# class A +# def m1; end +# private def m2; end +# private def m3; end +# end +# ~~~ +# +# pkg:gem/rbi#lib/rbi/rewriters/flatten_visibilities.rb:27 +class RBI::Rewriters::FlattenVisibilities < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/rewriters/flatten_visibilities.rb:29 + sig { void } + def initialize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/flatten_visibilities.rb:37 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:8 +class RBI::Rewriters::GroupNodes < ::RBI::Visitor + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:11 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:37 + sig { params(node: ::RBI::Node).returns(::RBI::Group::Kind) } + def group_kind(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 +# ~~~ +# +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:39 +class RBI::Rewriters::Merge + # pkg:gem/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 + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:75 + sig { params(tree: ::RBI::Tree).void } + def merge(tree); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:63 + sig { returns(::RBI::MergeTree) } + def tree; end + + class << self + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:50 + 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 +# +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:82 +class RBI::Rewriters::Merge::Conflict + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:90 + sig { params(left: ::RBI::Node, right: ::RBI::Node, left_name: ::String, right_name: ::String).void } + def initialize(left:, right:, left_name:, right_name:); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:84 + sig { returns(::RBI::Node) } + def left; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:87 + sig { returns(::String) } + def left_name; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:84 + def right; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:87 + def right_name; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:98 + sig { returns(::String) } + def to_s; 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 +# ~~~ +# +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:258 +class RBI::Rewriters::Merge::ConflictTreeMerger < ::RBI::Visitor + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:261 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:267 + sig { override.params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:290 + sig { params(left: ::RBI::Tree, right: ::RBI::Tree).void } + def merge_conflict_trees(left, right); end +end + +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:40 +class RBI::Rewriters::Merge::Keep + class << self + private + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:45 + def new(*_arg0); end + end +end + +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:42 +RBI::Rewriters::Merge::Keep::LEFT = T.let(T.unsafe(nil), RBI::Rewriters::Merge::Keep) + +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:41 +RBI::Rewriters::Merge::Keep::NONE = T.let(T.unsafe(nil), RBI::Rewriters::Merge::Keep) + +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:43 +RBI::Rewriters::Merge::Keep::RIGHT = T.let(T.unsafe(nil), RBI::Rewriters::Merge::Keep) + +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:103 +class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:108 + 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 + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:105 + sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } + def conflicts; end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:121 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:181 + sig { returns(::RBI::Tree) } + def current_scope; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:198 + sig { params(left: ::RBI::Scope, right: ::RBI::Scope).void } + def make_conflict_scope(left, right); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:205 + sig { params(left: ::RBI::Node, right: ::RBI::Node).void } + def make_conflict_tree(left, right); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:186 + sig { params(node: ::RBI::Node).returns(T.nilable(::RBI::Node)) } + def previous_definition(node); end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:217 + sig { params(left: ::RBI::Scope, right: ::RBI::Scope).returns(::RBI::Scope) } + def replace_scope_header(left, right); end +end + +# pkg:gem/rbi#lib/rbi/rewriters/nest_non_public_members.rb:6 +class RBI::Rewriters::NestNonPublicMembers < ::RBI::Visitor + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/nest_non_public_members.rb:9 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# pkg:gem/rbi#lib/rbi/rewriters/nest_singleton_methods.rb:6 +class RBI::Rewriters::NestSingletonMethods < ::RBI::Visitor + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/nest_singleton_methods.rb:9 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# This rewriter moves top-level members into a top-level Object class +# +# Example: +# ~~~rb +# def foo; end +# attr_reader :bar +# ~~~ +# +# will be rewritten to: +# +# ~~~rb +# class Object +# def foo; end +# attr_reader :bar +# end +# ~~~ +# +# pkg:gem/rbi#lib/rbi/rewriters/nest_top_level_members.rb:22 +class RBI::Rewriters::NestTopLevelMembers < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/rewriters/nest_top_level_members.rb:24 + sig { void } + def initialize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/nest_top_level_members.rb:32 + 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 +# ~~~ +# +# pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:48 +class RBI::Rewriters::RemoveKnownDefinitions < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:53 + sig { params(index: ::RBI::Index).void } + def initialize(index); end + + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:50 + sig { returns(T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]) } + def operations; end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:75 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:69 + sig { params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:103 + sig { params(node: ::RBI::Node, previous: ::RBI::Node).returns(T::Boolean) } + def can_delete_node?(node, previous); end + + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:121 + sig { params(node: ::RBI::Node, previous: ::RBI::Node).void } + def delete_node(node, previous); end + + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:94 + sig { params(node: ::RBI::Indexable).returns(T.nilable(::RBI::Node)) } + def previous_definition_for(node); end + + class << self + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:61 + 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 + +# pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:126 +class RBI::Rewriters::RemoveKnownDefinitions::Operation + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:131 + sig { params(deleted_node: ::RBI::Node, duplicate_of: ::RBI::Node).void } + def initialize(deleted_node:, duplicate_of:); end + + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:128 + sig { returns(::RBI::Node) } + def deleted_node; end + + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:128 + def duplicate_of; end + + # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:137 + sig { returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/rewriters/sort_nodes.rb:6 +class RBI::Rewriters::SortNodes < ::RBI::Visitor + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/sort_nodes.rb:9 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/sort_nodes.rb:71 + sig { params(kind: ::RBI::Group::Kind).returns(::Integer) } + def group_rank(kind); end + + # pkg:gem/rbi#lib/rbi/rewriters/sort_nodes.rb:92 + sig { params(node: ::RBI::Node).returns(T.nilable(::String)) } + def node_name(node); end + + # pkg:gem/rbi#lib/rbi/rewriters/sort_nodes.rb:43 + sig { params(node: ::RBI::Node).returns(::Integer) } + def node_rank(node); end + + # pkg:gem/rbi#lib/rbi/rewriters/sort_nodes.rb:104 + sig { params(node: ::RBI::Node).void } + def sort_node_names!(node); end +end + +# Translate all RBS signature comments to Sorbet RBI signatures +# +# pkg:gem/rbi#lib/rbi/rewriters/translate_rbs_sigs.rb:7 +class RBI::Rewriters::TranslateRBSSigs < ::RBI::Visitor + # pkg:gem/rbi#lib/rbi/rewriters/translate_rbs_sigs.rb:11 + sig { void } + def initialize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/translate_rbs_sigs.rb:18 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # pkg:gem/rbi#lib/rbi/rewriters/translate_rbs_sigs.rb:40 + sig { params(node: T.any(::RBI::Attr, ::RBI::Method)).returns(T::Array[::RBI::RBSComment]) } + def extract_rbs_comments(node); end + + # pkg:gem/rbi#lib/rbi/rewriters/translate_rbs_sigs.rb:67 + sig { params(node: ::RBI::Attr, comment: ::RBI::RBSComment).returns(::RBI::Sig) } + def translate_rbs_attr_type(node, comment); end + + # pkg:gem/rbi#lib/rbi/rewriters/translate_rbs_sigs.rb:59 + sig { params(node: ::RBI::Method, comment: ::RBI::RBSComment).returns(::RBI::Sig) } + def translate_rbs_method_type(node, comment); end +end + +# pkg:gem/rbi#lib/rbi/rewriters/translate_rbs_sigs.rb:8 +class RBI::Rewriters::TranslateRBSSigs::Error < ::RBI::Error; end + +# @abstract +# +# pkg:gem/rbi#lib/rbi/model.rb:185 +class RBI::Scope < ::RBI::Tree + include ::RBI::Indexable + + abstract! + + # Duplicate `self` scope without its body + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:363 + sig { returns(T.self_type) } + def dup_empty; end + + # @abstract + # + # pkg:gem/rbi#lib/rbi/model.rb:188 + sig { abstract.returns(::String) } + def fully_qualified_name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:84 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:192 + 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 +# ~~~ +# +# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:677 +class RBI::ScopeConflict < ::RBI::Tree + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:685 + 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 + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:679 + sig { returns(::RBI::Scope) } + def left; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:682 + sig { returns(::String) } + def left_name; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:679 + def right; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:682 + def right_name; end +end + +# Sends +# +# pkg:gem/rbi#lib/rbi/model.rb:1017 +class RBI::Send < ::RBI::NodeWithComments + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:1025 + sig do + params( + method: ::String, + args: T::Array[::RBI::Arg], + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # pkg:gem/rbi#lib/rbi/model.rb:1033 + sig { params(arg: ::RBI::Arg).void } + def <<(arg); end + + # pkg:gem/rbi#lib/rbi/model.rb:1038 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:1022 + sig { returns(T::Array[::RBI::Arg]) } + def args; end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:603 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:184 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # pkg:gem/rbi#lib/rbi/model.rb:1019 + sig { returns(::String) } + def method; end + + # pkg:gem/rbi#lib/rbi/model.rb:1043 + sig { returns(::String) } + def to_s; end +end + +# Sorbet's sigs +# +# pkg:gem/rbi#lib/rbi/model.rb:1092 +class RBI::Sig < ::RBI::NodeWithComments + # pkg:gem/rbi#lib/rbi/model.rb:1154 + sig do + params( + params: T.nilable(T::Array[::RBI::SigParam]), + return_type: T.any(::RBI::Type, ::String), + bind_type: T.nilable(T.any(::RBI::Type, ::String)), + is_abstract: T::Boolean, + is_override: T::Boolean, + is_overridable: T::Boolean, + is_final: T::Boolean, + allow_incompatible_override: T::Boolean, + allow_incompatible_override_visibility: T::Boolean, + without_runtime: T::Boolean, + type_params: T.nilable(T::Array[::String]), + checked: T.nilable(::Symbol), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::Sig).void) + ).void + end + def initialize(params: T.unsafe(nil), return_type: T.unsafe(nil), bind_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), allow_incompatible_override: T.unsafe(nil), allow_incompatible_override_visibility: T.unsafe(nil), without_runtime: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # pkg:gem/rbi#lib/rbi/model.rb:1188 + sig { params(param: ::RBI::SigParam).void } + def <<(param); end + + # pkg:gem/rbi#lib/rbi/model.rb:1198 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:1193 + sig { params(name: ::String, type: T.any(::RBI::Type, ::String)).void } + def add_param(name, type); end + + # pkg:gem/rbi#lib/rbi/model.rb:1117 + sig { returns(T::Boolean) } + def allow_incompatible_override; end + + # pkg:gem/rbi#lib/rbi/model.rb:1117 + sig { params(allow_incompatible_override: T::Boolean).returns(T::Boolean) } + def allow_incompatible_override=(allow_incompatible_override); end + + # pkg:gem/rbi#lib/rbi/model.rb:1120 + sig { returns(T::Boolean) } + def allow_incompatible_override_visibility; end + + # pkg:gem/rbi#lib/rbi/model.rb:1120 + sig { params(allow_incompatible_override_visibility: T::Boolean).returns(T::Boolean) } + def allow_incompatible_override_visibility=(allow_incompatible_override_visibility); end + + # pkg:gem/rbi#lib/rbi/model.rb:1102 + sig { returns(T.nilable(T.any(::RBI::Type, ::String))) } + def bind_type; end + + # pkg:gem/rbi#lib/rbi/model.rb:1102 + sig { params(bind_type: T.nilable(T.any(::RBI::Type, ::String))).returns(T.nilable(T.any(::RBI::Type, ::String))) } + def bind_type=(bind_type); end + + # pkg:gem/rbi#lib/rbi/model.rb:1136 + sig { returns(T.nilable(::Symbol)) } + def checked; end + + # pkg:gem/rbi#lib/rbi/model.rb:1136 + sig { params(checked: T.nilable(::Symbol)).returns(T.nilable(::Symbol)) } + def checked=(checked); end + + # pkg:gem/rbi#lib/rbi/model.rb:1105 + sig { returns(T::Boolean) } + def is_abstract; end + + # pkg:gem/rbi#lib/rbi/model.rb:1105 + sig { params(is_abstract: T::Boolean).returns(T::Boolean) } + def is_abstract=(is_abstract); end + + # pkg:gem/rbi#lib/rbi/model.rb:1114 + sig { returns(T::Boolean) } + def is_final; end + + # pkg:gem/rbi#lib/rbi/model.rb:1114 + sig { params(is_final: T::Boolean).returns(T::Boolean) } + def is_final=(is_final); end + + # pkg:gem/rbi#lib/rbi/model.rb:1111 + sig { returns(T::Boolean) } + def is_overridable; end + + # pkg:gem/rbi#lib/rbi/model.rb:1111 + sig { params(is_overridable: T::Boolean).returns(T::Boolean) } + def is_overridable=(is_overridable); end + + # pkg:gem/rbi#lib/rbi/model.rb:1108 + sig { returns(T::Boolean) } + def is_override; end + + # pkg:gem/rbi#lib/rbi/model.rb:1108 + sig { params(is_override: T::Boolean).returns(T::Boolean) } + def is_override=(is_override); end + + # pkg:gem/rbi#lib/rbi/model.rb:1094 + sig { returns(T::Array[::RBI::SigParam]) } + def params; end + + # pkg:gem/rbi#lib/rbi/model.rb:1099 + sig { returns(T.any(::RBI::Type, ::String)) } + def return_type; end + + # pkg:gem/rbi#lib/rbi/model.rb:1099 + sig { params(return_type: T.any(::RBI::Type, ::String)).returns(T.any(::RBI::Type, ::String)) } + def return_type=(return_type); end + + # pkg:gem/rbi#lib/rbi/model.rb:1126 + sig { returns(T::Array[::String]) } + def type_params; end + + # pkg:gem/rbi#lib/rbi/model.rb:1131 + sig { returns(T::Boolean) } + def type_params?; end + + # pkg:gem/rbi#lib/rbi/model.rb:1123 + sig { returns(T::Boolean) } + def without_runtime; end + + # pkg:gem/rbi#lib/rbi/model.rb:1123 + sig { params(without_runtime: T::Boolean).returns(T::Boolean) } + def without_runtime=(without_runtime); end +end + +# pkg:gem/rbi#lib/rbi/model.rb:1208 +class RBI::SigParam < ::RBI::NodeWithComments + # pkg:gem/rbi#lib/rbi/model.rb:1216 + sig do + params( + name: ::String, + type: T.any(::RBI::Type, ::String), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # pkg:gem/rbi#lib/rbi/model.rb:1236 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:1231 + sig { returns(T::Boolean) } + def anonymous?; end + + # pkg:gem/rbi#lib/rbi/model.rb:1210 + sig { returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1226 + sig { override.returns(::String) } + def to_s; end + + # pkg:gem/rbi#lib/rbi/model.rb:1213 + sig { returns(T.any(::RBI::Type, ::String)) } + def type; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:246 +class RBI::SingletonClass < ::RBI::Scope + # pkg:gem/rbi#lib/rbi/model.rb:248 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:255 + sig { override.returns(::String) } + def fully_qualified_name; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:260 +class RBI::Struct < ::RBI::Scope + # pkg:gem/rbi#lib/rbi/model.rb:277 + sig do + params( + name: ::String, + members: T::Array[::Symbol], + keyword_init: T::Boolean, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:404 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:287 + sig { override.returns(::String) } + def fully_qualified_name; end + + # pkg:gem/rbi#lib/rbi/model.rb:268 + sig { returns(T::Boolean) } + def keyword_init; end + + # pkg:gem/rbi#lib/rbi/model.rb:268 + sig { params(keyword_init: T::Boolean).returns(T::Boolean) } + def keyword_init=(keyword_init); end + + # pkg:gem/rbi#lib/rbi/model.rb:265 + sig { returns(T::Array[::Symbol]) } + def members; end + + # pkg:gem/rbi#lib/rbi/model.rb:265 + sig { params(members: T::Array[::Symbol]).returns(T::Array[::Symbol]) } + def members=(members); end + + # pkg:gem/rbi#lib/rbi/model.rb:262 + sig { returns(::String) } + def name; end +end + +# Sorbet's T::Enum +# +# pkg:gem/rbi#lib/rbi/model.rb:1333 +class RBI::TEnum < ::RBI::Class + # pkg:gem/rbi#lib/rbi/model.rb:1335 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + +# pkg:gem/rbi#lib/rbi/model.rb:1341 +class RBI::TEnumBlock < ::RBI::Scope + # pkg:gem/rbi#lib/rbi/model.rb:1343 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::TEnumBlock).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1350 + sig { override.returns(::String) } + def fully_qualified_name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:214 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1356 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:1361 +class RBI::TEnumValue < ::RBI::NodeWithComments + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:1366 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]), + block: T.nilable(T.proc.params(node: ::RBI::TEnumValue).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # pkg:gem/rbi#lib/rbi/model.rb:1373 + sig { returns(::String) } + def fully_qualified_name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:224 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # pkg:gem/rbi#lib/rbi/model.rb:1363 + sig { returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1379 + sig { override.returns(::String) } + def to_s; end +end + +# Sorbet's T::Struct +# +# pkg:gem/rbi#lib/rbi/model.rb:1245 +class RBI::TStruct < ::RBI::Class + # pkg:gem/rbi#lib/rbi/model.rb:1247 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + +# pkg:gem/rbi#lib/rbi/model.rb:1277 +class RBI::TStructConst < ::RBI::TStructField + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:1285 + sig do + params( + name: ::String, + type: T.any(::RBI::Type, ::String), + default: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:619 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1292 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:194 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1299 + sig { override.returns(::String) } + def to_s; end +end + +# @abstract +# +# pkg:gem/rbi#lib/rbi/model.rb:1254 +class RBI::TStructField < ::RBI::NodeWithComments + abstract! + + # pkg:gem/rbi#lib/rbi/model.rb:1265 + sig do + params( + name: ::String, + type: T.any(::RBI::Type, ::String), + default: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(T::Array[::RBI::Comment]) + ).void + end + def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:611 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:1262 + sig { returns(T.nilable(::String)) } + def default; end + + # pkg:gem/rbi#lib/rbi/model.rb:1262 + sig { params(default: T.nilable(::String)).returns(T.nilable(::String)) } + def default=(default); end + + # @abstract + # + # pkg:gem/rbi#lib/rbi/model.rb:1274 + sig { abstract.returns(T::Array[::String]) } + def fully_qualified_names; end + + # pkg:gem/rbi#lib/rbi/model.rb:1256 + sig { returns(::String) } + def name; end + + # pkg:gem/rbi#lib/rbi/model.rb:1259 + sig { returns(T.any(::RBI::Type, ::String)) } + def type; end + + # pkg:gem/rbi#lib/rbi/model.rb:1259 + sig { params(type: T.any(::RBI::Type, ::String)).returns(T.any(::RBI::Type, ::String)) } + def type=(type); end +end + +# pkg:gem/rbi#lib/rbi/model.rb:1304 +class RBI::TStructProp < ::RBI::TStructField + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:1312 + sig do + params( + name: ::String, + type: T.any(::RBI::Type, ::String), + default: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # @override + # + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:627 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1319 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:204 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1326 + sig { override.returns(::String) } + def to_s; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:120 +class RBI::Tree < ::RBI::NodeWithComments + # pkg:gem/rbi#lib/rbi/model.rb:125 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # pkg:gem/rbi#lib/rbi/model.rb:132 + sig { params(node: ::RBI::Node).void } + def <<(node); end + + # pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:82 + sig { params(with_todo_comment: T::Boolean).void } + def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rewriters/annotate.rb:46 + 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 + + # pkg:gem/rbi#lib/rbi/rewriters/deannotate.rb:38 + sig { params(annotation: ::String).void } + def deannotate!(annotation); end + + # pkg:gem/rbi#lib/rbi/model.rb:138 + sig { returns(T::Boolean) } + def empty?; end + + # pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:113 + sig { params(version: ::Gem::Version).void } + def filter_versions!(version); end + + # pkg:gem/rbi#lib/rbi/rewriters/flatten_singleton_methods.rb:58 + sig { void } + def flatten_singleton_methods!; end + + # pkg:gem/rbi#lib/rbi/rewriters/flatten_visibilities.rb:57 + sig { void } + def flatten_visibilities!; end + + # pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:80 + sig { void } + def group_nodes!; end + + # pkg:gem/rbi#lib/rbi/index.rb:62 + sig { returns(::RBI::Index) } + def index; end + + # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:336 + 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 + + # pkg:gem/rbi#lib/rbi/rewriters/nest_non_public_members.rb:52 + sig { void } + def nest_non_public_members!; end + + # pkg:gem/rbi#lib/rbi/rewriters/nest_singleton_methods.rb:41 + sig { void } + def nest_singleton_methods!; end + + # pkg:gem/rbi#lib/rbi/rewriters/nest_top_level_members.rb:60 + sig { void } + def nest_top_level_members!; end + + # pkg:gem/rbi#lib/rbi/model.rb:122 + sig { returns(T::Array[::RBI::Node]) } + def nodes; end + + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:50 + sig { void } + def replace_attributes_with_methods!; end + + # pkg:gem/rbi#lib/rbi/rewriters/sort_nodes.rb:115 + sig { void } + def sort_nodes!; end + + # pkg:gem/rbi#lib/rbi/rewriters/translate_rbs_sigs.rb:88 + sig { void } + def translate_rbs_sigs!; end +end + +# The base class for all RBI types. +# @abstract +# +# pkg:gem/rbi#lib/rbi/type.rb:7 +class RBI::Type + abstract! + + # pkg:gem/rbi#lib/rbi/type.rb:1000 + sig { void } + def initialize; end + + # @abstract + # + # pkg:gem/rbi#lib/rbi/type.rb:1071 + sig { abstract.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/type.rb:1074 + sig { params(other: ::BasicObject).returns(T::Boolean) } + def eql?(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:1080 + sig { override.returns(::Integer) } + def hash; end + + # Returns a new type that is `nilable` if it is not already. + # + # If the type is already nilable, it returns itself. + # ```ruby + # type = RBI::Type.simple("String") + # type.to_rbi # => "String" + # type.nilable.to_rbi # => "::T.nilable(String)" + # type.nilable.nilable.to_rbi # => "::T.nilable(String)" + # ``` + # + # pkg:gem/rbi#lib/rbi/type.rb:1014 + sig { returns(::RBI::Type) } + def nilable; end + + # Returns whether the type is nilable. + # + # pkg:gem/rbi#lib/rbi/type.rb:1041 + sig { returns(T::Boolean) } + def nilable?; end + + # Returns the non-nilable version of the type. + # If the type is already non-nilable, it returns itself. + # If the type is nilable, it returns the inner type. + # + # ```ruby + # type = RBI::Type.nilable(RBI::Type.simple("String")) + # type.to_rbi # => "::T.nilable(String)" + # type.non_nilable.to_rbi # => "String" + # type.non_nilable.non_nilable.to_rbi # => "String" + # ``` + # + # pkg:gem/rbi#lib/rbi/type.rb:1029 + sig { returns(::RBI::Type) } + def non_nilable; end + + # Returns a normalized version of the type. + # + # Normalized types are meant to be easier to process, not to read. + # For example, `T.any(TrueClass, FalseClass)` instead of `T::Boolean` or + # `T.any(String, NilClass)` instead of `T.nilable(String)`. + # + # This is the inverse of `#simplify`. + # + # @abstract + # + # pkg:gem/rbi#lib/rbi/type.rb:1055 + sig { abstract.returns(::RBI::Type) } + def normalize; end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1254 + sig { returns(::String) } + def rbs_string; end + + # Returns a simplified version of the type. + # + # Simplified types are meant to be easier to read, not to process. + # For example, `T::Boolean` instead of `T.any(TrueClass, FalseClass)` or + # `T.nilable(String)` instead of `T.any(String, NilClass)`. + # + # This is the inverse of `#normalize`. + # + # @abstract + # + # pkg:gem/rbi#lib/rbi/type.rb:1067 + sig { abstract.returns(::RBI::Type) } + def simplify; end + + # @abstract + # + # pkg:gem/rbi#lib/rbi/type.rb:1086 + sig { abstract.returns(::String) } + def to_rbi; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:1090 + sig { override.returns(::String) } + def to_s; end + + class << self + # Builds a type that represents an intersection of multiple types like `T.all(String, Integer)`. + # + # Note that this method transforms types such as `T.all(String, String)` into `String`, so + # it may return something other than a `All`. + # + # pkg:gem/rbi#lib/rbi/type.rb:936 + sig { params(type1: ::RBI::Type, type2: ::RBI::Type, types: ::RBI::Type).returns(::RBI::Type) } + def all(type1, type2, *types); end + + # Builds a type that represents a union of multiple types like `T.any(String, Integer)`. + # + # Note that this method transforms types such as `T.any(String, NilClass)` into `T.nilable(String)`, so + # it may return something other than a `Any`. + # + # pkg:gem/rbi#lib/rbi/type.rb:945 + sig { params(type1: ::RBI::Type, type2: ::RBI::Type, types: ::RBI::Type).returns(::RBI::Type) } + def any(type1, type2, *types); end + + # Builds a type that represents `T.anything`. + # + # pkg:gem/rbi#lib/rbi/type.rb:861 + sig { returns(::RBI::Type::Anything) } + def anything; end + + # Builds a type that represents `T.attached_class`. + # + # pkg:gem/rbi#lib/rbi/type.rb:867 + sig { returns(::RBI::Type::AttachedClass) } + def attached_class; end + + # Builds a type that represents `T::Boolean`. + # + # pkg:gem/rbi#lib/rbi/type.rb:873 + sig { returns(::RBI::Type::Boolean) } + def boolean; end + + # Builds a type that represents the singleton class of another type like `T.class_of(Foo)`. + # + # pkg:gem/rbi#lib/rbi/type.rb:917 + sig do + params( + type: ::RBI::Type::Simple, + type_parameters: T.any(::RBI::Type, T::Array[::RBI::Type]) + ).returns(::RBI::Type::ClassOf) + end + def class_of(type, *type_parameters); end + + # Builds a type that represents a generic type like `T::Array[String]` or `T::Hash[Symbol, Integer]`. + # + # pkg:gem/rbi#lib/rbi/type.rb:953 + sig { params(name: ::String, params: T.any(::RBI::Type, T::Array[::RBI::Type])).returns(::RBI::Type::Generic) } + def generic(name, *params); end + + # Builds a type that represents a nilable of another type like `T.nilable(String)`. + # + # Note that this method transforms types such as `T.nilable(T.untyped)` into `T.untyped`, so + # it may return something other than a `RBI::Type::Nilable`. + # + # pkg:gem/rbi#lib/rbi/type.rb:926 + sig { params(type: ::RBI::Type).returns(::RBI::Type) } + def nilable(type); end + + # Builds a type that represents `T.noreturn`. + # + # pkg:gem/rbi#lib/rbi/type.rb:879 + sig { returns(::RBI::Type::NoReturn) } + def noreturn; end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:26 + sig { params(node: ::Prism::Node).returns(::RBI::Type) } + def parse_node(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:10 + sig { params(string: ::String).returns(::RBI::Type) } + def parse_string(string); end + + # Builds a type that represents a proc type like `T.proc.void`. + # + # pkg:gem/rbi#lib/rbi/type.rb:987 + sig { returns(::RBI::Type::Proc) } + def proc; end + + # Builds a type that represents `T.self_type`. + # + # pkg:gem/rbi#lib/rbi/type.rb:885 + sig { returns(::RBI::Type::SelfType) } + def self_type; end + + # Builds a type that represents a shape type like `{name: String, age: Integer}`. + # + # pkg:gem/rbi#lib/rbi/type.rb:979 + sig { params(types: T::Hash[T.any(::String, ::Symbol), ::RBI::Type]).returns(::RBI::Type::Shape) } + def shape(types = T.unsafe(nil)); end + + # Builds a simple type like `String` or `::Foo::Bar`. + # + # It raises a `NameError` if the name is not a valid Ruby class identifier. + # + # pkg:gem/rbi#lib/rbi/type.rb:850 + sig { params(name: ::String).returns(::RBI::Type::Simple) } + def simple(name); end + + # Builds a type that represents the class of another type like `T::Class[Foo]`. + # + # pkg:gem/rbi#lib/rbi/type.rb:905 + sig { params(type: ::RBI::Type).returns(::RBI::Type::Class) } + def t_class(type); end + + # Builds a type that represents the module of another type like `T::Module[Foo]`. + # + # pkg:gem/rbi#lib/rbi/type.rb:911 + sig { params(type: ::RBI::Type).returns(::RBI::Type::Module) } + def t_module(type); end + + # Builds a type that represents a tuple type like `[String, Integer]`. + # + # pkg:gem/rbi#lib/rbi/type.rb:973 + sig { params(types: T.any(::RBI::Type, T::Array[::RBI::Type])).returns(::RBI::Type::Tuple) } + def tuple(*types); end + + # Builds a type that represents a type alias like `MyTypeAlias`. + # + # pkg:gem/rbi#lib/rbi/type.rb:965 + sig { params(name: ::String, aliased_type: ::RBI::Type).returns(::RBI::Type::TypeAlias) } + def type_alias(name, aliased_type); end + + # Builds a type that represents a type parameter like `T.type_parameter(:U)`. + # + # pkg:gem/rbi#lib/rbi/type.rb:959 + sig { params(name: ::Symbol).returns(::RBI::Type::TypeParameter) } + def type_parameter(name); end + + # Builds a type that represents `T.untyped`. + # + # pkg:gem/rbi#lib/rbi/type.rb:891 + sig { returns(::RBI::Type::Untyped) } + def untyped; end + + # Builds a type that represents `void`. + # + # pkg:gem/rbi#lib/rbi/type.rb:897 + sig { returns(::RBI::Type::Void) } + def void; end + + private + + # pkg:gem/rbi#lib/rbi/type_parser.rb:320 + sig { params(node: ::Prism::CallNode).returns(T::Array[::Prism::Node]) } + def call_chain(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:307 + sig { params(node: ::Prism::CallNode, count: ::Integer).returns(T::Array[::Prism::Node]) } + def check_arguments_at_least!(node, count); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:292 + sig { params(node: ::Prism::CallNode, count: ::Integer).returns(T::Array[::Prism::Node]) } + def check_arguments_exactly!(node, count); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:96 + sig { params(node: ::Prism::CallNode).returns(::RBI::Type) } + def parse_call(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:56 + sig { params(node: T.any(::Prism::ConstantPathNode, ::Prism::ConstantReadNode)).returns(::RBI::Type) } + def parse_constant(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:73 + sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).returns(::RBI::Type) } + def parse_constant_assignment(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:242 + sig { params(node: ::Prism::CallNode).returns(::RBI::Type) } + def parse_proc(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:221 + sig { params(node: T.any(::Prism::HashNode, ::Prism::KeywordHashNode)).returns(::RBI::Type) } + def parse_shape(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:216 + sig { params(node: ::Prism::ArrayNode).returns(::RBI::Type) } + def parse_tuple(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:333 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t?(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:352 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t_boolean?(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:359 + sig { params(node: ::Prism::ConstantPathNode).returns(T::Boolean) } + def t_class?(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:369 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t_class_of?(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:364 + sig { params(node: ::Prism::ConstantPathNode).returns(T::Boolean) } + def t_module?(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:376 + sig { params(node: ::Prism::CallNode).returns(T::Boolean) } + def t_proc?(node); end + + # pkg:gem/rbi#lib/rbi/type_parser.rb:345 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t_type_alias?(node); end + + # pkg:gem/rbi#lib/rbi/type.rb:994 + sig { params(name: ::String).returns(T::Boolean) } + def valid_identifier?(name); end + end +end + +# A type that is intersection of multiple types like `T.all(String, Integer)`. +# +# pkg:gem/rbi#lib/rbi/type.rb:420 +class RBI::Type::All < ::RBI::Type::Composite + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:429 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:449 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:423 + sig { override.returns(::String) } + def to_rbi; end +end + +# A type that is union of multiple types like `T.any(String, Integer)`. +# +# pkg:gem/rbi#lib/rbi/type.rb:462 +class RBI::Type::Any < ::RBI::Type::Composite + # pkg:gem/rbi#lib/rbi/type.rb:470 + sig { returns(T::Boolean) } + def nilable?; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:476 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:496 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:465 + sig { override.returns(::String) } + def to_rbi; end +end + +# `T.anything`. +# +# pkg:gem/rbi#lib/rbi/type.rb:51 +class RBI::Type::Anything < ::RBI::Type + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:54 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:66 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:72 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:60 + sig { override.returns(::String) } + def to_rbi; end +end + +# `T.attached_class`. +# +# pkg:gem/rbi#lib/rbi/type.rb:78 +class RBI::Type::AttachedClass < ::RBI::Type + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:81 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:93 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:99 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:87 + sig { override.returns(::String) } + def to_rbi; end +end + +# `T::Boolean`. +# +# pkg:gem/rbi#lib/rbi/type.rb:105 +class RBI::Type::Boolean < ::RBI::Type + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:108 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:120 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:126 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:114 + sig { override.returns(::String) } + def to_rbi; end +end + +# The class of another type like `T::Class[Foo]`. +# +# pkg:gem/rbi#lib/rbi/type.rb:242 +class RBI::Type::Class < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:247 + sig { params(type: ::RBI::Type).void } + def initialize(type); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:254 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:266 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:272 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:260 + sig { override.returns(::String) } + def to_rbi; end + + # pkg:gem/rbi#lib/rbi/type.rb:244 + sig { returns(::RBI::Type) } + def type; end +end + +# The singleton class of another type like `T.class_of(Foo)`. +# +# pkg:gem/rbi#lib/rbi/type.rb:314 +class RBI::Type::ClassOf < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:322 + sig { params(type: ::RBI::Type::Simple, type_parameters: ::RBI::Type).void } + def initialize(type, *type_parameters); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:330 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:346 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:352 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:336 + sig { override.returns(::String) } + def to_rbi; end + + # pkg:gem/rbi#lib/rbi/type.rb:316 + sig { returns(::RBI::Type::Simple) } + def type; end + + # pkg:gem/rbi#lib/rbi/type.rb:319 + sig { returns(T::Array[::RBI::Type]) } + def type_parameters; end +end + +# A type that is composed of multiple types like `T.all(String, Integer)`. +# @abstract +# +# pkg:gem/rbi#lib/rbi/type.rb:402 +class RBI::Type::Composite < ::RBI::Type + abstract! + + # pkg:gem/rbi#lib/rbi/type.rb:407 + sig { params(types: T::Array[::RBI::Type]).void } + def initialize(types); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:414 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/type.rb:404 + sig { returns(T::Array[::RBI::Type]) } + def types; end +end + +# pkg:gem/rbi#lib/rbi/type_parser.rb:6 +class RBI::Type::Error < ::RBI::Error; end + +# A generic type like `T::Array[String]` or `T::Hash[Symbol, Integer]`. +# +# pkg:gem/rbi#lib/rbi/type.rb:547 +class RBI::Type::Generic < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:555 + sig { params(name: ::String, params: ::RBI::Type).void } + def initialize(name, *params); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:563 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/type.rb:549 + sig { returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:575 + sig { override.returns(::RBI::Type) } + def normalize; end + + # pkg:gem/rbi#lib/rbi/type.rb:552 + sig { returns(T::Array[::RBI::Type]) } + def params; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:581 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:569 + sig { override.returns(::String) } + def to_rbi; end +end + +# The module of another type like `T::Module[Foo]`. +# +# pkg:gem/rbi#lib/rbi/type.rb:278 +class RBI::Type::Module < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:283 + sig { params(type: ::RBI::Type).void } + def initialize(type); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:290 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:302 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:308 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:296 + sig { override.returns(::String) } + def to_rbi; end + + # pkg:gem/rbi#lib/rbi/type.rb:280 + sig { returns(::RBI::Type) } + def type; end +end + +# A type that can be `nil` like `T.nilable(String)`. +# +# pkg:gem/rbi#lib/rbi/type.rb:358 +class RBI::Type::Nilable < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:363 + sig { params(type: ::RBI::Type).void } + def initialize(type); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:370 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:382 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:388 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:376 + sig { override.returns(::String) } + def to_rbi; end + + # pkg:gem/rbi#lib/rbi/type.rb:360 + sig { returns(::RBI::Type) } + def type; end +end + +# `T.noreturn`. +# +# pkg:gem/rbi#lib/rbi/type.rb:132 +class RBI::Type::NoReturn < ::RBI::Type + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:135 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:147 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:153 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:141 + sig { override.returns(::String) } + def to_rbi; end +end + +# A proc type like `T.proc.void`. +# +# pkg:gem/rbi#lib/rbi/type.rb:750 +class RBI::Type::Proc < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:761 + sig { void } + def initialize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:770 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/type.rb:798 + sig { params(type: T.untyped).returns(T.self_type) } + def bind(type); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:830 + sig { override.returns(::RBI::Type) } + def normalize; end + + # pkg:gem/rbi#lib/rbi/type.rb:780 + sig { params(params: ::RBI::Type).returns(T.self_type) } + def params(**params); end + + # pkg:gem/rbi#lib/rbi/type.rb:758 + sig { returns(T.nilable(::RBI::Type)) } + def proc_bind; end + + # pkg:gem/rbi#lib/rbi/type.rb:752 + sig { returns(T::Hash[::Symbol, ::RBI::Type]) } + def proc_params; end + + # pkg:gem/rbi#lib/rbi/type.rb:755 + sig { returns(::RBI::Type) } + def proc_returns; end + + # pkg:gem/rbi#lib/rbi/type.rb:786 + sig { params(type: T.untyped).returns(T.self_type) } + def returns(type); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:836 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:805 + sig { override.returns(::String) } + def to_rbi; end + + # pkg:gem/rbi#lib/rbi/type.rb:792 + sig { returns(T.self_type) } + def void; end +end + +# `T.self_type`. +# +# pkg:gem/rbi#lib/rbi/type.rb:159 +class RBI::Type::SelfType < ::RBI::Type + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:162 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:174 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:180 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:168 + sig { override.returns(::String) } + def to_rbi; end +end + +# A shape type like `{name: String, age: Integer}`. +# +# pkg:gem/rbi#lib/rbi/type.rb:701 +class RBI::Type::Shape < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:706 + sig { params(types: T::Hash[T.any(::String, ::Symbol), ::RBI::Type]).void } + def initialize(types); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:713 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:736 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:742 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:719 + sig { override.returns(::String) } + def to_rbi; end + + # pkg:gem/rbi#lib/rbi/type.rb:703 + sig { returns(T::Hash[T.any(::String, ::Symbol), ::RBI::Type]) } + def types; end +end + +# A type that represents a simple class name like `String` or `Foo`. +# +# It can also be a qualified name like `::Foo` or `Foo::Bar`. +# +# pkg:gem/rbi#lib/rbi/type.rb:13 +class RBI::Type::Simple < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:18 + sig { params(name: ::String).void } + def initialize(name); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:25 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/type.rb:15 + sig { returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:37 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:43 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:31 + sig { override.returns(::String) } + def to_rbi; end +end + +# A tuple type like `[String, Integer]`. +# +# pkg:gem/rbi#lib/rbi/type.rb:665 +class RBI::Type::Tuple < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:670 + sig { params(types: T::Array[::RBI::Type]).void } + def initialize(types); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:677 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:689 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:695 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:683 + sig { override.returns(::String) } + def to_rbi; end + + # pkg:gem/rbi#lib/rbi/type.rb:667 + sig { returns(T::Array[::RBI::Type]) } + def types; end +end + +# A type alias that references another type by name like `MyTypeAlias`. +# +# pkg:gem/rbi#lib/rbi/type.rb:623 +class RBI::Type::TypeAlias < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:631 + sig { params(name: ::String, aliased_type: ::RBI::Type).void } + def initialize(name, aliased_type); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:639 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/type.rb:628 + sig { returns(::RBI::Type) } + def aliased_type; end + + # pkg:gem/rbi#lib/rbi/type.rb:625 + sig { returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:651 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:657 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:645 + sig { override.returns(::String) } + def to_rbi; end +end + +# A type parameter like `T.type_parameter(:U)`. +# +# pkg:gem/rbi#lib/rbi/type.rb:587 +class RBI::Type::TypeParameter < ::RBI::Type + # pkg:gem/rbi#lib/rbi/type.rb:592 + sig { params(name: ::Symbol).void } + def initialize(name); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:599 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/type.rb:589 + sig { returns(::Symbol) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:611 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:617 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:605 + sig { override.returns(::String) } + def to_rbi; end +end + +# `T.untyped`. +# +# pkg:gem/rbi#lib/rbi/type.rb:186 +class RBI::Type::Untyped < ::RBI::Type + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:189 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:201 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:207 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:195 + sig { override.returns(::String) } + def to_rbi; end +end + +# pkg:gem/rbi#lib/rbi/type_visitor.rb:6 +class RBI::Type::Visitor + # pkg:gem/rbi#lib/rbi/type_visitor.rb:10 + sig { params(node: ::RBI::Type).void } + def visit(node); end + + private + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:58 + sig { params(type: ::RBI::Type::All).void } + def visit_all(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:61 + sig { params(type: ::RBI::Type::Any).void } + def visit_any(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:64 + sig { params(type: ::RBI::Type::Anything).void } + def visit_anything(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:67 + sig { params(type: ::RBI::Type::AttachedClass).void } + def visit_attached_class(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:70 + sig { params(type: ::RBI::Type::Boolean).void } + def visit_boolean(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:73 + sig { params(type: ::RBI::Type::Class).void } + def visit_class(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:76 + sig { params(type: ::RBI::Type::ClassOf).void } + def visit_class_of(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:79 + sig { params(type: ::RBI::Type::Generic).void } + def visit_generic(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:82 + sig { params(type: ::RBI::Type::Nilable).void } + def visit_nilable(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:88 + sig { params(type: ::RBI::Type::NoReturn).void } + def visit_no_return(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:91 + sig { params(type: ::RBI::Type::Proc).void } + def visit_proc(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:94 + sig { params(type: ::RBI::Type::SelfType).void } + def visit_self_type(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:100 + sig { params(type: ::RBI::Type::Shape).void } + def visit_shape(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:85 + sig { params(type: ::RBI::Type::Simple).void } + def visit_simple(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:103 + sig { params(type: ::RBI::Type::Tuple).void } + def visit_tuple(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:112 + sig { params(type: ::RBI::Type::TypeAlias).void } + def visit_type_alias(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:106 + sig { params(type: ::RBI::Type::TypeParameter).void } + def visit_type_parameter(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:109 + sig { params(type: ::RBI::Type::Untyped).void } + def visit_untyped(type); end + + # pkg:gem/rbi#lib/rbi/type_visitor.rb:97 + sig { params(type: ::RBI::Type::Void).void } + def visit_void(type); end +end + +# pkg:gem/rbi#lib/rbi/type_visitor.rb:7 +class RBI::Type::Visitor::Error < ::RBI::Error; end + +# `void`. +# +# pkg:gem/rbi#lib/rbi/type.rb:213 +class RBI::Type::Void < ::RBI::Type + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:216 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:228 + sig { override.returns(::RBI::Type) } + def normalize; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:234 + sig { override.returns(::RBI::Type) } + def simplify; end + + # @override + # + # pkg:gem/rbi#lib/rbi/type.rb:222 + sig { override.returns(::String) } + def to_rbi; end +end + +# pkg:gem/rbi#lib/rbi/model.rb:1404 +class RBI::TypeMember < ::RBI::NodeWithComments + include ::RBI::Indexable + + # pkg:gem/rbi#lib/rbi/model.rb:1409 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T.nilable(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 + + # pkg:gem/rbi#lib/rbi/model.rb:1417 + sig { returns(::String) } + def fully_qualified_name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/index.rb:174 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # pkg:gem/rbi#lib/rbi/model.rb:1406 + sig { returns(::String) } + def name; end + + # @override + # + # pkg:gem/rbi#lib/rbi/model.rb:1425 + sig { override.returns(::String) } + def to_s; end + + # pkg:gem/rbi#lib/rbi/model.rb:1406 + def value; end +end + +# pkg:gem/rbi#lib/rbi/rbs_printer.rb:969 +class RBI::TypePrinter + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:974 + sig { params(max_line_length: T.nilable(::Integer)).void } + def initialize(max_line_length: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:971 + sig { returns(::String) } + def string; end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:980 + sig { params(node: ::RBI::Type).void } + def visit(node); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1105 + sig { params(type: ::RBI::Type::All).void } + def visit_all(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1115 + sig { params(type: ::RBI::Type::Any).void } + def visit_any(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1047 + sig { params(type: ::RBI::Type::Anything).void } + def visit_anything(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1072 + sig { params(type: ::RBI::Type::AttachedClass).void } + def visit_attached_class(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1031 + sig { params(type: ::RBI::Type::Boolean).void } + def visit_boolean(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1182 + sig { params(type: ::RBI::Type::Class).void } + def visit_class(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1090 + sig { params(type: ::RBI::Type::ClassOf).void } + def visit_class_of(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1036 + sig { params(type: ::RBI::Type::Generic).void } + def visit_generic(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1189 + sig { params(type: ::RBI::Type::Module).void } + def visit_module(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1077 + sig { params(type: ::RBI::Type::Nilable).void } + def visit_nilable(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1057 + sig { params(type: ::RBI::Type::NoReturn).void } + def visit_no_return(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1155 + sig { params(type: ::RBI::Type::Proc).void } + def visit_proc(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1067 + sig { params(type: ::RBI::Type::SelfType).void } + def visit_self_type(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1135 + sig { params(type: ::RBI::Type::Shape).void } + def visit_shape(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1026 + sig { params(type: ::RBI::Type::Simple).void } + def visit_simple(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1125 + sig { params(type: ::RBI::Type::Tuple).void } + def visit_tuple(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1177 + sig { params(type: ::RBI::Type::TypeParameter).void } + def visit_type_parameter(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1062 + sig { params(type: ::RBI::Type::Untyped).void } + def visit_untyped(type); end + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1052 + sig { params(type: ::RBI::Type::Void).void } + def visit_void(type); end + + private + + # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1198 + sig { params(type_name: ::String).returns(::String) } + def translate_t_type(type_name); end +end + +# pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:5 +class RBI::UnexpectedMultipleSigsError < ::RBI::Error + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:10 + sig { params(node: ::RBI::Node).void } + def initialize(node); end + + # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:7 + sig { returns(::RBI::Node) } + def node; end +end + +# pkg:gem/rbi#lib/rbi/parser.rb:18 +class RBI::UnexpectedParserError < ::RBI::Error + # pkg:gem/rbi#lib/rbi/parser.rb:23 + sig { params(parent_exception: ::Exception, last_location: ::RBI::Loc).void } + def initialize(parent_exception, last_location); end + + # pkg:gem/rbi#lib/rbi/parser.rb:20 + sig { returns(::RBI::Loc) } + def last_location; end + + # pkg:gem/rbi#lib/rbi/parser.rb:30 + sig { params(io: T.any(::IO, ::StringIO)).void } + def print_debug(io: T.unsafe(nil)); end +end + +# pkg:gem/rbi#lib/rbi/version.rb:5 +RBI::VERSION = T.let(T.unsafe(nil), String) + +# @abstract +# +# pkg:gem/rbi#lib/rbi/model.rb:955 +class RBI::Visibility < ::RBI::NodeWithComments + abstract! + + # pkg:gem/rbi#lib/rbi/model.rb:960 + sig { params(visibility: ::Symbol, loc: T.nilable(::RBI::Loc), comments: T.nilable(T::Array[::RBI::Comment])).void } + def initialize(visibility, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # pkg:gem/rbi#lib/rbi/model.rb:966 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # pkg:gem/rbi#lib/rbi/model.rb:983 + sig { returns(T::Boolean) } + def private?; end + + # pkg:gem/rbi#lib/rbi/model.rb:978 + sig { returns(T::Boolean) } + def protected?; end + + # pkg:gem/rbi#lib/rbi/model.rb:973 + sig { returns(T::Boolean) } + def public?; end + + # pkg:gem/rbi#lib/rbi/model.rb:957 + sig { returns(::Symbol) } + def visibility; end +end + +# pkg:gem/rbi#lib/rbi/rewriters/nest_non_public_members.rb:58 +class RBI::VisibilityGroup < ::RBI::Tree + # pkg:gem/rbi#lib/rbi/rewriters/nest_non_public_members.rb:63 + sig { params(visibility: ::RBI::Visibility).void } + def initialize(visibility); end + + # pkg:gem/rbi#lib/rbi/rewriters/nest_non_public_members.rb:60 + sig { returns(::RBI::Visibility) } + def visibility; end +end + +# @abstract +# +# pkg:gem/rbi#lib/rbi/visitor.rb:8 +class RBI::Visitor + abstract! + + # pkg:gem/rbi#lib/rbi/visitor.rb:10 + sig { params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:112 + sig { params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:117 + sig { params(file: ::RBI::File).void } + def visit_file(file); end + + private + + # pkg:gem/rbi#lib/rbi/visitor.rb:208 + sig { params(node: ::RBI::Arg).void } + def visit_arg(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:151 + sig { params(node: ::RBI::AttrAccessor).void } + def visit_attr_accessor(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:154 + sig { params(node: ::RBI::AttrReader).void } + def visit_attr_reader(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:157 + sig { params(node: ::RBI::AttrWriter).void } + def visit_attr_writer(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:130 + sig { params(node: ::RBI::BlankLine).void } + def visit_blank_line(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:184 + sig { params(node: ::RBI::BlockParam).void } + def visit_block_param(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:136 + sig { params(node: ::RBI::Class).void } + def visit_class(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:124 + sig { params(node: ::RBI::Comment).void } + def visit_comment(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:256 + sig { params(node: ::RBI::ConflictTree).void } + def visit_conflict_tree(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:148 + sig { params(node: ::RBI::Const).void } + def visit_const(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:193 + sig { params(node: ::RBI::Extend).void } + def visit_extend(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:187 + sig { params(node: ::RBI::ForwardingParam).void } + def visit_forwarding_param(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:250 + sig { params(node: ::RBI::Group).void } + def visit_group(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:238 + sig { params(node: ::RBI::Helper).void } + def visit_helper(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:190 + sig { params(node: ::RBI::Include).void } + def visit_include(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:211 + sig { params(node: ::RBI::KwArg).void } + def visit_kw_arg(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:175 + sig { params(node: ::RBI::KwOptParam).void } + def visit_kw_opt_param(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:172 + sig { params(node: ::RBI::KwParam).void } + def visit_kw_param(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:178 + sig { params(node: ::RBI::KwRestParam).void } + def visit_kw_rest_param(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:160 + sig { params(node: ::RBI::Method).void } + def visit_method(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:244 + sig { params(node: ::RBI::MixesInClassMethods).void } + def visit_mixes_in_class_methods(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:133 + sig { params(node: ::RBI::Module).void } + def visit_module(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:181 + sig { params(node: ::RBI::NoKwParam).void } + def visit_no_kw_param(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:166 + sig { params(node: ::RBI::OptParam).void } + def visit_opt_param(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:202 + sig { params(node: ::RBI::Private).void } + def visit_private(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:199 + sig { params(node: ::RBI::Protected).void } + def visit_protected(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:196 + sig { params(node: ::RBI::Public).void } + def visit_public(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:127 + sig { params(node: ::RBI::RBSComment).void } + def visit_rbs_comment(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:163 + sig { params(node: ::RBI::ReqParam).void } + def visit_req_param(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:247 + sig { params(node: ::RBI::RequiresAncestor).void } + def visit_requires_ancestor(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:169 + sig { params(node: ::RBI::RestParam).void } + def visit_rest_param(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:259 + sig { params(node: ::RBI::ScopeConflict).void } + def visit_scope_conflict(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:205 + sig { params(node: ::RBI::Send).void } + def visit_send(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:214 + sig { params(node: ::RBI::Sig).void } + def visit_sig(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:217 + sig { params(node: ::RBI::SigParam).void } + def visit_sig_param(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:139 + sig { params(node: ::RBI::SingletonClass).void } + def visit_singleton_class(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:142 + sig { params(node: ::RBI::Struct).void } + def visit_struct(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:229 + sig { params(node: ::RBI::TEnum).void } + def visit_tenum(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:232 + sig { params(node: ::RBI::TEnumBlock).void } + def visit_tenum_block(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:235 + sig { params(node: ::RBI::TEnumValue).void } + def visit_tenum_value(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:145 + sig { params(node: ::RBI::Tree).void } + def visit_tree(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:220 + sig { params(node: ::RBI::TStruct).void } + def visit_tstruct(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:223 + sig { params(node: ::RBI::TStructConst).void } + def visit_tstruct_const(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:226 + sig { params(node: ::RBI::TStructProp).void } + def visit_tstruct_prop(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:241 + sig { params(node: ::RBI::TypeMember).void } + def visit_type_member(node); end + + # pkg:gem/rbi#lib/rbi/visitor.rb:253 + sig { params(node: ::RBI::VisibilityGroup).void } + def visit_visibility_group(node); end +end + +# pkg:gem/rbi#lib/rbi/visitor.rb:5 +class RBI::VisitorError < ::RBI::Error; end diff --git a/sorbet/rbi/gems/rbs@3.9.0.rbi b/sorbet/rbi/gems/rbs@3.9.0.rbi deleted file mode 100644 index 681f778..0000000 --- a/sorbet/rbi/gems/rbs@3.9.0.rbi +++ /dev/null @@ -1,6978 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rbs` gem. -# Please instead update this file by running `bin/tapioca gem rbs`. - - -# source://rbs//lib/rbs/namespace.rb#120 -module Kernel - # source://rbs//lib/rbs/namespace.rb#121 - def Namespace(name); end - - # source://rbs//lib/rbs/type_name.rb#105 - def TypeName(string); end -end - -# source://rbs//lib/rbs/version.rb#3 -module RBS - class << self - # source://rbs//lib/rbs.rb#69 - def logger; end - - # Returns the value of attribute logger_level. - # - # source://rbs//lib/rbs.rb#66 - def logger_level; end - - # source://rbs//lib/rbs.rb#78 - def logger_level=(level); end - - # Returns the value of attribute logger_output. - # - # source://rbs//lib/rbs.rb#67 - def logger_output; end - - # source://rbs//lib/rbs.rb#73 - def logger_output=(val); end - - # source://rbs//lib/rbs.rb#83 - def print_warning; end - end -end - -# source://rbs//lib/rbs/ast/type_param.rb#4 -module RBS::AST; end - -# source://rbs//lib/rbs/ast/annotation.rb#5 -class RBS::AST::Annotation - # @return [Annotation] a new instance of Annotation - # - # source://rbs//lib/rbs/ast/annotation.rb#9 - def initialize(string:, location:); end - - # source://rbs//lib/rbs/ast/annotation.rb#14 - def ==(other); end - - # source://rbs//lib/rbs/ast/annotation.rb#14 - def eql?(other); end - - # source://rbs//lib/rbs/ast/annotation.rb#20 - def hash; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/ast/annotation.rb#7 - def location; end - - # Returns the value of attribute string. - # - # source://rbs//lib/rbs/ast/annotation.rb#6 - def string; end - - # source://rbs//lib/rbs/ast/annotation.rb#24 - def to_json(state = T.unsafe(nil)); end -end - -# source://rbs//lib/rbs/ast/comment.rb#5 -class RBS::AST::Comment - # @return [Comment] a new instance of Comment - # - # source://rbs//lib/rbs/ast/comment.rb#9 - def initialize(string:, location:); end - - # source://rbs//lib/rbs/ast/comment.rb#14 - def ==(other); end - - # source://rbs//lib/rbs/ast/comment.rb#14 - def eql?(other); end - - # source://rbs//lib/rbs/ast/comment.rb#20 - def hash; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/ast/comment.rb#7 - def location; end - - # Returns the value of attribute string. - # - # source://rbs//lib/rbs/ast/comment.rb#6 - def string; end - - # source://rbs//lib/rbs/ast/comment.rb#24 - def to_json(state = T.unsafe(nil)); end -end - -# source://rbs//lib/rbs/ast/declarations.rb#5 -module RBS::AST::Declarations; end - -# source://rbs//lib/rbs/ast/declarations.rb#423 -class RBS::AST::Declarations::AliasDecl < ::RBS::AST::Declarations::Base - # @return [AliasDecl] a new instance of AliasDecl - # - # source://rbs//lib/rbs/ast/declarations.rb#426 - def initialize(new_name:, old_name:, location:, comment:, annotations: T.unsafe(nil)); end - - # source://rbs//lib/rbs/ast/declarations.rb#434 - def ==(other); end - - # Returns the value of attribute annotations. - # - # source://rbs//lib/rbs/ast/declarations.rb#424 - def annotations; end - - # Returns the value of attribute comment. - # - # source://rbs//lib/rbs/ast/declarations.rb#424 - def comment; end - - # source://rbs//lib/rbs/ast/declarations.rb#434 - def eql?(other); end - - # source://rbs//lib/rbs/ast/declarations.rb#442 - def hash; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/ast/declarations.rb#424 - def location; end - - # Returns the value of attribute new_name. - # - # source://rbs//lib/rbs/ast/declarations.rb#424 - def new_name; end - - # Returns the value of attribute old_name. - # - # source://rbs//lib/rbs/ast/declarations.rb#424 - def old_name; end -end - -# source://rbs//lib/rbs/ast/declarations.rb#6 -class RBS::AST::Declarations::Base; end - -# source://rbs//lib/rbs/ast/declarations.rb#55 -class RBS::AST::Declarations::Class < ::RBS::AST::Declarations::Base - include ::RBS::AST::Declarations::NestedDeclarationHelper - include ::RBS::AST::Declarations::MixinHelper - - # @return [Class] a new instance of Class - # - # source://rbs//lib/rbs/ast/declarations.rb#97 - def initialize(name:, type_params:, super_class:, members:, annotations:, location:, comment:); end - - # source://rbs//lib/rbs/ast/declarations.rb#119 - def ==(other); end - - # Returns the value of attribute annotations. - # - # source://rbs//lib/rbs/ast/declarations.rb#93 - def annotations; end - - # Returns the value of attribute comment. - # - # source://rbs//lib/rbs/ast/declarations.rb#95 - def comment; end - - # source://rbs//lib/rbs/ast/declarations.rb#119 - def eql?(other); end - - # source://rbs//lib/rbs/ast/declarations.rb#129 - def hash; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/ast/declarations.rb#94 - def location; end - - # Returns the value of attribute members. - # - # source://rbs//lib/rbs/ast/declarations.rb#91 - def members; end - - # Returns the value of attribute name. - # - # source://rbs//lib/rbs/ast/declarations.rb#89 - def name; end - - # Returns the value of attribute super_class. - # - # source://rbs//lib/rbs/ast/declarations.rb#92 - def super_class; end - - # source://rbs//lib/rbs/ast/declarations.rb#133 - def to_json(state = T.unsafe(nil)); end - - # Returns the value of attribute type_params. - # - # source://rbs//lib/rbs/ast/declarations.rb#90 - def type_params; end - - # source://rbs//lib/rbs/ast/declarations.rb#107 - def update(name: T.unsafe(nil), type_params: T.unsafe(nil), super_class: T.unsafe(nil), members: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil)); end -end - -# source://rbs//lib/rbs/ast/declarations.rb#56 -class RBS::AST::Declarations::Class::Super - # @return [Super] a new instance of Super - # - # source://rbs//lib/rbs/ast/declarations.rb#61 - def initialize(name:, args:, location:); end - - # source://rbs//lib/rbs/ast/declarations.rb#67 - def ==(other); end - - # Returns the value of attribute args. - # - # source://rbs//lib/rbs/ast/declarations.rb#58 - def args; end - - # source://rbs//lib/rbs/ast/declarations.rb#67 - def eql?(other); end - - # source://rbs//lib/rbs/ast/declarations.rb#73 - def hash; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/ast/declarations.rb#59 - def location; end - - # Returns the value of attribute name. - # - # source://rbs//lib/rbs/ast/declarations.rb#57 - def name; end - - # source://rbs//lib/rbs/ast/declarations.rb#77 - def to_json(state = T.unsafe(nil)); end -end - -# source://rbs//lib/rbs/ast/declarations.rb#447 -class RBS::AST::Declarations::ClassAlias < ::RBS::AST::Declarations::AliasDecl - # source://rbs//lib/rbs/ast/declarations.rb#448 - def to_json(state = T.unsafe(nil)); end -end - -# source://rbs//lib/rbs/ast/declarations.rb#347 -class RBS::AST::Declarations::Constant < ::RBS::AST::Declarations::Base - # @return [Constant] a new instance of Constant - # - # source://rbs//lib/rbs/ast/declarations.rb#354 - def initialize(name:, type:, location:, comment:, annotations: T.unsafe(nil)); end - - # source://rbs//lib/rbs/ast/declarations.rb#362 - def ==(other); end - - # Returns the value of attribute annotations. - # - # source://rbs//lib/rbs/ast/declarations.rb#352 - def annotations; end - - # Returns the value of attribute comment. - # - # source://rbs//lib/rbs/ast/declarations.rb#351 - def comment; end - - # source://rbs//lib/rbs/ast/declarations.rb#362 - def eql?(other); end - - # source://rbs//lib/rbs/ast/declarations.rb#370 - def hash; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/ast/declarations.rb#350 - def location; end - - # Returns the value of attribute name. - # - # source://rbs//lib/rbs/ast/declarations.rb#348 - def name; end - - # source://rbs//lib/rbs/ast/declarations.rb#374 - def to_json(state = T.unsafe(nil)); end - - # Returns the value of attribute type. - # - # source://rbs//lib/rbs/ast/declarations.rb#349 - def type; end -end - -# source://rbs//lib/rbs/ast/declarations.rb#385 -class RBS::AST::Declarations::Global < ::RBS::AST::Declarations::Base - # @return [Global] a new instance of Global - # - # source://rbs//lib/rbs/ast/declarations.rb#392 - def initialize(name:, type:, location:, comment:, annotations: T.unsafe(nil)); end - - # source://rbs//lib/rbs/ast/declarations.rb#400 - def ==(other); end - - # Returns the value of attribute annotations. - # - # source://rbs//lib/rbs/ast/declarations.rb#390 - def annotations; end - - # Returns the value of attribute comment. - # - # source://rbs//lib/rbs/ast/declarations.rb#389 - def comment; end - - # source://rbs//lib/rbs/ast/declarations.rb#400 - def eql?(other); end - - # source://rbs//lib/rbs/ast/declarations.rb#408 - def hash; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/ast/declarations.rb#388 - def location; end - - # Returns the value of attribute name. - # - # source://rbs//lib/rbs/ast/declarations.rb#386 - def name; end - - # source://rbs//lib/rbs/ast/declarations.rb#412 - def to_json(state = T.unsafe(nil)); end - - # Returns the value of attribute type. - # - # source://rbs//lib/rbs/ast/declarations.rb#387 - def type; end -end - -# source://rbs//lib/rbs/ast/declarations.rb#248 -class RBS::AST::Declarations::Interface < ::RBS::AST::Declarations::Base - include ::RBS::AST::Declarations::MixinHelper - - # @return [Interface] a new instance of Interface - # - # source://rbs//lib/rbs/ast/declarations.rb#258 - def initialize(name:, type_params:, members:, annotations:, location:, comment:); end - - # source://rbs//lib/rbs/ast/declarations.rb#278 - def ==(other); end - - # Returns the value of attribute annotations. - # - # source://rbs//lib/rbs/ast/declarations.rb#252 - def annotations; end - - # Returns the value of attribute comment. - # - # source://rbs//lib/rbs/ast/declarations.rb#254 - def comment; end - - # source://rbs//lib/rbs/ast/declarations.rb#278 - def eql?(other); end - - # source://rbs//lib/rbs/ast/declarations.rb#287 - def hash; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/ast/declarations.rb#253 - def location; end - - # Returns the value of attribute members. - # - # source://rbs//lib/rbs/ast/declarations.rb#251 - def members; end - - # Returns the value of attribute name. - # - # source://rbs//lib/rbs/ast/declarations.rb#249 - def name; end - - # source://rbs//lib/rbs/ast/declarations.rb#291 - def to_json(state = T.unsafe(nil)); end - - # Returns the value of attribute type_params. - # - # source://rbs//lib/rbs/ast/declarations.rb#250 - def type_params; end - - # source://rbs//lib/rbs/ast/declarations.rb#267 - def update(name: T.unsafe(nil), type_params: T.unsafe(nil), members: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil)); end -end - -# source://rbs//lib/rbs/ast/declarations.rb#35 -module RBS::AST::Declarations::MixinHelper - # source://rbs//lib/rbs/ast/declarations.rb#36 - def each_mixin(&block); end -end - -# source://rbs//lib/rbs/ast/declarations.rb#147 -class RBS::AST::Declarations::Module < ::RBS::AST::Declarations::Base - include ::RBS::AST::Declarations::NestedDeclarationHelper - include ::RBS::AST::Declarations::MixinHelper - - # @return [Module] a new instance of Module - # - # source://rbs//lib/rbs/ast/declarations.rb#197 - def initialize(name:, type_params:, members:, self_types:, annotations:, location:, comment:); end - - # source://rbs//lib/rbs/ast/declarations.rb#220 - def ==(other); end - - # Returns the value of attribute annotations. - # - # source://rbs//lib/rbs/ast/declarations.rb#193 - def annotations; end - - # Returns the value of attribute comment. - # - # source://rbs//lib/rbs/ast/declarations.rb#195 - def comment; end - - # source://rbs//lib/rbs/ast/declarations.rb#220 - def eql?(other); end - - # source://rbs//lib/rbs/ast/declarations.rb#230 - def hash; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/ast/declarations.rb#192 - def location; end - - # Returns the value of attribute members. - # - # source://rbs//lib/rbs/ast/declarations.rb#191 - def members; end - - # Returns the value of attribute name. - # - # source://rbs//lib/rbs/ast/declarations.rb#189 - def name; end - - # Returns the value of attribute self_types. - # - # source://rbs//lib/rbs/ast/declarations.rb#194 - def self_types; end - - # source://rbs//lib/rbs/ast/declarations.rb#234 - def to_json(state = T.unsafe(nil)); end - - # Returns the value of attribute type_params. - # - # source://rbs//lib/rbs/ast/declarations.rb#190 - def type_params; end - - # source://rbs//lib/rbs/ast/declarations.rb#207 - def update(name: T.unsafe(nil), type_params: T.unsafe(nil), members: T.unsafe(nil), self_types: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil)); end -end - -# source://rbs//lib/rbs/ast/declarations.rb#148 -class RBS::AST::Declarations::Module::Self - # @return [Self] a new instance of Self - # - # source://rbs//lib/rbs/ast/declarations.rb#153 - def initialize(name:, args:, location:); end - - # source://rbs//lib/rbs/ast/declarations.rb#159 - def ==(other); end - - # Returns the value of attribute args. - # - # source://rbs//lib/rbs/ast/declarations.rb#150 - def args; end - - # source://rbs//lib/rbs/ast/declarations.rb#159 - def eql?(other); end - - # source://rbs//lib/rbs/ast/declarations.rb#165 - def hash; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/ast/declarations.rb#151 - def location; end - - # Returns the value of attribute name. - # - # source://rbs//lib/rbs/ast/declarations.rb#149 - def name; end - - # source://rbs//lib/rbs/ast/declarations.rb#169 - def to_json(state = T.unsafe(nil)); end - - # source://rbs//lib/rbs/ast/declarations.rb#177 - def to_s; end -end - -# source://rbs//lib/rbs/ast/declarations.rb#459 -class RBS::AST::Declarations::ModuleAlias < ::RBS::AST::Declarations::AliasDecl - # source://rbs//lib/rbs/ast/declarations.rb#460 - def to_json(state = T.unsafe(nil)); end -end - -# source://rbs//lib/rbs/ast/declarations.rb#9 -module RBS::AST::Declarations::NestedDeclarationHelper - # source://rbs//lib/rbs/ast/declarations.rb#22 - def each_decl; end - - # source://rbs//lib/rbs/ast/declarations.rb#10 - def each_member; end -end - -# source://rbs//lib/rbs/ast/declarations.rb#304 -class RBS::AST::Declarations::TypeAlias < ::RBS::AST::Declarations::Base - # @return [TypeAlias] a new instance of TypeAlias - # - # source://rbs//lib/rbs/ast/declarations.rb#312 - def initialize(name:, type_params:, type:, annotations:, location:, comment:); end - - # source://rbs//lib/rbs/ast/declarations.rb#321 - def ==(other); end - - # Returns the value of attribute annotations. - # - # source://rbs//lib/rbs/ast/declarations.rb#308 - def annotations; end - - # Returns the value of attribute comment. - # - # source://rbs//lib/rbs/ast/declarations.rb#310 - def comment; end - - # source://rbs//lib/rbs/ast/declarations.rb#321 - def eql?(other); end - - # source://rbs//lib/rbs/ast/declarations.rb#330 - def hash; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/ast/declarations.rb#309 - def location; end - - # Returns the value of attribute name. - # - # source://rbs//lib/rbs/ast/declarations.rb#305 - def name; end - - # source://rbs//lib/rbs/ast/declarations.rb#334 - def to_json(state = T.unsafe(nil)); end - - # Returns the value of attribute type. - # - # source://rbs//lib/rbs/ast/declarations.rb#307 - def type; end - - # Returns the value of attribute type_params. - # - # source://rbs//lib/rbs/ast/declarations.rb#306 - def type_params; end -end - -# source://rbs//lib/rbs/ast/directives.rb#5 -module RBS::AST::Directives; end - -# source://rbs//lib/rbs/ast/directives.rb#6 -class RBS::AST::Directives::Base; end - -# source://rbs//lib/rbs/ast/directives.rb#37 -class RBS::AST::Directives::ResolveTypeNames < ::RBS::AST::Directives::Base - # @return [ResolveTypeNames] a new instance of ResolveTypeNames - # - # source://rbs//lib/rbs/ast/directives.rb#42 - def initialize(value:, location:); end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/ast/directives.rb#38 - def location; end - - # Returns the value of attribute value. - # - # source://rbs//lib/rbs/ast/directives.rb#40 - def value; end -end - -# source://rbs//lib/rbs/ast/directives.rb#9 -class RBS::AST::Directives::Use < ::RBS::AST::Directives::Base - # @return [Use] a new instance of Use - # - # source://rbs//lib/rbs/ast/directives.rb#31 - def initialize(clauses:, location:); end - - # Returns the value of attribute clauses. - # - # source://rbs//lib/rbs/ast/directives.rb#29 - def clauses; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/ast/directives.rb#29 - def location; end -end - -# source://rbs//lib/rbs/ast/directives.rb#10 -class RBS::AST::Directives::Use::SingleClause - # @return [SingleClause] a new instance of SingleClause - # - # source://rbs//lib/rbs/ast/directives.rb#13 - def initialize(type_name:, new_name:, location:); end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/ast/directives.rb#11 - def location; end - - # Returns the value of attribute new_name. - # - # source://rbs//lib/rbs/ast/directives.rb#11 - def new_name; end - - # Returns the value of attribute type_name. - # - # source://rbs//lib/rbs/ast/directives.rb#11 - def type_name; end -end - -# source://rbs//lib/rbs/ast/directives.rb#20 -class RBS::AST::Directives::Use::WildcardClause - # @return [WildcardClause] a new instance of WildcardClause - # - # source://rbs//lib/rbs/ast/directives.rb#23 - def initialize(namespace:, location:); end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/ast/directives.rb#21 - def location; end - - # Returns the value of attribute namespace. - # - # source://rbs//lib/rbs/ast/directives.rb#21 - def namespace; end -end - -# source://rbs//lib/rbs/ast/members.rb#5 -module RBS::AST::Members; end - -# source://rbs//lib/rbs/ast/members.rb#399 -class RBS::AST::Members::Alias < ::RBS::AST::Members::Base - # @return [Alias] a new instance of Alias - # - # source://rbs//lib/rbs/ast/members.rb#407 - def initialize(new_name:, old_name:, kind:, annotations:, location:, comment:); end - - # source://rbs//lib/rbs/ast/members.rb#416 - def ==(other); end - - # Returns the value of attribute annotations. - # - # source://rbs//lib/rbs/ast/members.rb#403 - def annotations; end - - # Returns the value of attribute comment. - # - # source://rbs//lib/rbs/ast/members.rb#405 - def comment; end - - # source://rbs//lib/rbs/ast/members.rb#416 - def eql?(other); end - - # source://rbs//lib/rbs/ast/members.rb#425 - def hash; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/ast/members.rb#441 - def instance?; end - - # Returns the value of attribute kind. - # - # source://rbs//lib/rbs/ast/members.rb#402 - def kind; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/ast/members.rb#404 - def location; end - - # Returns the value of attribute new_name. - # - # source://rbs//lib/rbs/ast/members.rb#400 - def new_name; end - - # Returns the value of attribute old_name. - # - # source://rbs//lib/rbs/ast/members.rb#401 - def old_name; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/ast/members.rb#445 - def singleton?; end - - # source://rbs//lib/rbs/ast/members.rb#429 - def to_json(state = T.unsafe(nil)); end -end - -# source://rbs//lib/rbs/ast/members.rb#329 -class RBS::AST::Members::AttrAccessor < ::RBS::AST::Members::Base - include ::RBS::AST::Members::Attribute - - # source://rbs//lib/rbs/ast/members.rb#332 - def to_json(state = T.unsafe(nil)); end -end - -# source://rbs//lib/rbs/ast/members.rb#311 -class RBS::AST::Members::AttrReader < ::RBS::AST::Members::Base - include ::RBS::AST::Members::Attribute - - # source://rbs//lib/rbs/ast/members.rb#314 - def to_json(state = T.unsafe(nil)); end -end - -# source://rbs//lib/rbs/ast/members.rb#347 -class RBS::AST::Members::AttrWriter < ::RBS::AST::Members::Base - include ::RBS::AST::Members::Attribute - - # source://rbs//lib/rbs/ast/members.rb#350 - def to_json(state = T.unsafe(nil)); end -end - -# source://rbs//lib/rbs/ast/members.rb#260 -module RBS::AST::Members::Attribute - # source://rbs//lib/rbs/ast/members.rb#270 - def initialize(name:, type:, ivar_name:, kind:, annotations:, location:, comment:, visibility: T.unsafe(nil)); end - - # source://rbs//lib/rbs/ast/members.rb#281 - def ==(other); end - - # Returns the value of attribute annotations. - # - # source://rbs//lib/rbs/ast/members.rb#265 - def annotations; end - - # Returns the value of attribute comment. - # - # source://rbs//lib/rbs/ast/members.rb#267 - def comment; end - - # source://rbs//lib/rbs/ast/members.rb#281 - def eql?(other); end - - # source://rbs//lib/rbs/ast/members.rb#292 - def hash; end - - # Returns the value of attribute ivar_name. - # - # source://rbs//lib/rbs/ast/members.rb#264 - def ivar_name; end - - # Returns the value of attribute kind. - # - # source://rbs//lib/rbs/ast/members.rb#263 - def kind; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/ast/members.rb#266 - def location; end - - # Returns the value of attribute name. - # - # source://rbs//lib/rbs/ast/members.rb#261 - def name; end - - # Returns the value of attribute type. - # - # source://rbs//lib/rbs/ast/members.rb#262 - def type; end - - # source://rbs//lib/rbs/ast/members.rb#296 - def update(name: T.unsafe(nil), type: T.unsafe(nil), ivar_name: T.unsafe(nil), kind: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil), visibility: T.unsafe(nil)); end - - # Returns the value of attribute visibility. - # - # source://rbs//lib/rbs/ast/members.rb#268 - def visibility; end -end - -# source://rbs//lib/rbs/ast/members.rb#6 -class RBS::AST::Members::Base; end - -# source://rbs//lib/rbs/ast/members.rb#159 -class RBS::AST::Members::ClassInstanceVariable < ::RBS::AST::Members::Base - include ::RBS::AST::Members::Var - - # source://rbs//lib/rbs/ast/members.rb#162 - def to_json(state = T.unsafe(nil)); end -end - -# source://rbs//lib/rbs/ast/members.rb#173 -class RBS::AST::Members::ClassVariable < ::RBS::AST::Members::Base - include ::RBS::AST::Members::Var - - # source://rbs//lib/rbs/ast/members.rb#176 - def to_json(state = T.unsafe(nil)); end -end - -# source://rbs//lib/rbs/ast/members.rb#230 -class RBS::AST::Members::Extend < ::RBS::AST::Members::Base - include ::RBS::AST::Members::Mixin - - # source://rbs//lib/rbs/ast/members.rb#233 - def to_json(state = T.unsafe(nil)); end -end - -# source://rbs//lib/rbs/ast/members.rb#215 -class RBS::AST::Members::Include < ::RBS::AST::Members::Base - include ::RBS::AST::Members::Mixin - - # source://rbs//lib/rbs/ast/members.rb#218 - def to_json(state = T.unsafe(nil)); end -end - -# source://rbs//lib/rbs/ast/members.rb#145 -class RBS::AST::Members::InstanceVariable < ::RBS::AST::Members::Base - include ::RBS::AST::Members::Var - - # source://rbs//lib/rbs/ast/members.rb#148 - def to_json(state = T.unsafe(nil)); end -end - -# source://rbs//lib/rbs/ast/members.rb#365 -module RBS::AST::Members::LocationOnly - # source://rbs//lib/rbs/ast/members.rb#368 - def initialize(location:); end - - # source://rbs//lib/rbs/ast/members.rb#372 - def ==(other); end - - # source://rbs//lib/rbs/ast/members.rb#372 - def eql?(other); end - - # source://rbs//lib/rbs/ast/members.rb#378 - def hash; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/ast/members.rb#366 - def location; end -end - -# source://rbs//lib/rbs/ast/members.rb#9 -class RBS::AST::Members::MethodDefinition < ::RBS::AST::Members::Base - # @return [MethodDefinition] a new instance of MethodDefinition - # - # source://rbs//lib/rbs/ast/members.rb#55 - def initialize(name:, kind:, overloads:, annotations:, location:, comment:, overloading:, visibility:); end - - # source://rbs//lib/rbs/ast/members.rb#66 - def ==(other); end - - # Returns the value of attribute annotations. - # - # source://rbs//lib/rbs/ast/members.rb#49 - def annotations; end - - # Returns the value of attribute comment. - # - # source://rbs//lib/rbs/ast/members.rb#51 - def comment; end - - # source://rbs//lib/rbs/ast/members.rb#66 - def eql?(other); end - - # source://rbs//lib/rbs/ast/members.rb#77 - def hash; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/ast/members.rb#81 - def instance?; end - - # Returns the value of attribute kind. - # - # source://rbs//lib/rbs/ast/members.rb#47 - def kind; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/ast/members.rb#50 - def location; end - - # Returns the value of attribute name. - # - # source://rbs//lib/rbs/ast/members.rb#46 - def name; end - - # Returns the value of attribute overloading. - # - # source://rbs//lib/rbs/ast/members.rb#52 - def overloading; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/ast/members.rb#89 - def overloading?; end - - # Returns the value of attribute overloads. - # - # source://rbs//lib/rbs/ast/members.rb#48 - def overloads; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/ast/members.rb#85 - def singleton?; end - - # source://rbs//lib/rbs/ast/members.rb#106 - def to_json(state = T.unsafe(nil)); end - - # source://rbs//lib/rbs/ast/members.rb#93 - def update(name: T.unsafe(nil), kind: T.unsafe(nil), overloads: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil), overloading: T.unsafe(nil), visibility: T.unsafe(nil)); end - - # Returns the value of attribute visibility. - # - # source://rbs//lib/rbs/ast/members.rb#53 - def visibility; end -end - -# source://rbs//lib/rbs/ast/members.rb#10 -class RBS::AST::Members::MethodDefinition::Overload - # @return [Overload] a new instance of Overload - # - # source://rbs//lib/rbs/ast/members.rb#13 - def initialize(method_type:, annotations:); end - - # source://rbs//lib/rbs/ast/members.rb#18 - def ==(other); end - - # Returns the value of attribute annotations. - # - # source://rbs//lib/rbs/ast/members.rb#11 - def annotations; end - - # source://rbs//lib/rbs/ast/members.rb#18 - def eql?(other); end - - # source://rbs//lib/rbs/ast/members.rb#22 - def hash; end - - # Returns the value of attribute method_type. - # - # source://rbs//lib/rbs/ast/members.rb#11 - def method_type; end - - # source://rbs//lib/rbs/ast/members.rb#32 - def sub(subst); end - - # source://rbs//lib/rbs/ast/members.rb#38 - def to_json(state = T.unsafe(nil)); end - - # source://rbs//lib/rbs/ast/members.rb#28 - def update(annotations: T.unsafe(nil), method_type: T.unsafe(nil)); end -end - -# source://rbs//lib/rbs/ast/members.rb#187 -module RBS::AST::Members::Mixin - # source://rbs//lib/rbs/ast/members.rb#194 - def initialize(name:, args:, annotations:, location:, comment:); end - - # source://rbs//lib/rbs/ast/members.rb#202 - def ==(other); end - - # Returns the value of attribute annotations. - # - # source://rbs//lib/rbs/ast/members.rb#190 - def annotations; end - - # Returns the value of attribute args. - # - # source://rbs//lib/rbs/ast/members.rb#189 - def args; end - - # Returns the value of attribute comment. - # - # source://rbs//lib/rbs/ast/members.rb#192 - def comment; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/ast/members.rb#206 - def eql?(other); end - - # source://rbs//lib/rbs/ast/members.rb#210 - def hash; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/ast/members.rb#191 - def location; end - - # Returns the value of attribute name. - # - # source://rbs//lib/rbs/ast/members.rb#188 - def name; end -end - -# source://rbs//lib/rbs/ast/members.rb#245 -class RBS::AST::Members::Prepend < ::RBS::AST::Members::Base - include ::RBS::AST::Members::Mixin - - # source://rbs//lib/rbs/ast/members.rb#248 - def to_json(state = T.unsafe(nil)); end -end - -# source://rbs//lib/rbs/ast/members.rb#391 -class RBS::AST::Members::Private < ::RBS::AST::Members::Base - include ::RBS::AST::Members::LocationOnly - - # source://rbs//lib/rbs/ast/members.rb#394 - def to_json(state = T.unsafe(nil)); end -end - -# source://rbs//lib/rbs/ast/members.rb#383 -class RBS::AST::Members::Public < ::RBS::AST::Members::Base - include ::RBS::AST::Members::LocationOnly - - # source://rbs//lib/rbs/ast/members.rb#386 - def to_json(state = T.unsafe(nil)); end -end - -# source://rbs//lib/rbs/ast/members.rb#121 -module RBS::AST::Members::Var - # source://rbs//lib/rbs/ast/members.rb#127 - def initialize(name:, type:, location:, comment:); end - - # source://rbs//lib/rbs/ast/members.rb#134 - def ==(other); end - - # Returns the value of attribute comment. - # - # source://rbs//lib/rbs/ast/members.rb#125 - def comment; end - - # source://rbs//lib/rbs/ast/members.rb#134 - def eql?(other); end - - # source://rbs//lib/rbs/ast/members.rb#140 - def hash; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/ast/members.rb#124 - def location; end - - # Returns the value of attribute name. - # - # source://rbs//lib/rbs/ast/members.rb#122 - def name; end - - # Returns the value of attribute type. - # - # source://rbs//lib/rbs/ast/members.rb#123 - def type; end -end - -# source://rbs//lib/rbs/ast/type_param.rb#5 -class RBS::AST::TypeParam - # @return [TypeParam] a new instance of TypeParam - # - # source://rbs//lib/rbs/ast/type_param.rb#8 - def initialize(name:, variance:, upper_bound:, location:, default_type: T.unsafe(nil), unchecked: T.unsafe(nil)); end - - # source://rbs//lib/rbs/ast/type_param.rb#33 - def ==(other); end - - # Returns the value of attribute default_type. - # - # source://rbs//lib/rbs/ast/type_param.rb#6 - def default_type; end - - # source://rbs//lib/rbs/ast/type_param.rb#33 - def eql?(other); end - - # source://rbs//lib/rbs/ast/type_param.rb#44 - def hash; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/ast/type_param.rb#6 - def location; end - - # source://rbs//lib/rbs/ast/type_param.rb#59 - def map_type(&block); end - - # Returns the value of attribute name. - # - # source://rbs//lib/rbs/ast/type_param.rb#6 - def name; end - - # source://rbs//lib/rbs/ast/type_param.rb#48 - def to_json(state = T.unsafe(nil)); end - - # source://rbs//lib/rbs/ast/type_param.rb#117 - def to_s; end - - # source://rbs//lib/rbs/ast/type_param.rb#24 - def unchecked!(value = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/ast/type_param.rb#29 - def unchecked?; end - - # source://rbs//lib/rbs/ast/type_param.rb#17 - def upper_bound; end - - # Returns the value of attribute upper_bound_type. - # - # source://rbs//lib/rbs/ast/type_param.rb#6 - def upper_bound_type; end - - # Returns the value of attribute variance. - # - # source://rbs//lib/rbs/ast/type_param.rb#6 - def variance; end - - class << self - # source://rbs//lib/rbs/ast/type_param.rb#146 - def application(params, args); end - - # source://rbs//lib/rbs/ast/type_param.rb#178 - def normalize_args(params, args); end - - # source://rbs//lib/rbs/ast/type_param.rb#99 - def rename(params, new_names:); end - - # source://rbs//lib/rbs/ast/type_param.rb#77 - def resolve_variables(params); end - - # source://rbs//lib/rbs/ast/type_param.rb#87 - def subst_var(vars, type); end - - # source://rbs//lib/rbs/ast/type_param.rb#199 - def validate(type_params); end - end -end - -# The Visitor class implements the Visitor pattern for traversing the RBS Abstract Syntax Tree (AST). -# -# It provides methods to visit each type of node in the AST, allowing for custom processing of each node type. -# -# This class is designed to be subclassed, with specific visit methods overridden to implement custom behavior for -# different node types. -# -# Example usage: -# -# ~~~rb -# class MyVisitor < RBS::AST::Visitor -# def visit_declaration_class(node) -# puts "Visiting class: #{node.name}" -# -# super # call `super` to run the default visiting behavior -# end -# end -# -# visitor = MyVisitor.new -# visitor.visit(ast_node) -# ~~~ -# -# source://rbs//lib/rbs/ast/visitor.rb#26 -class RBS::AST::Visitor - # source://rbs//lib/rbs/ast/visitor.rb#27 - def visit(node); end - - # source://rbs//lib/rbs/ast/visitor.rb#70 - def visit_all(nodes); end - - # source://rbs//lib/rbs/ast/visitor.rb#79 - def visit_declaration_class(node); end - - # source://rbs//lib/rbs/ast/visitor.rb#87 - def visit_declaration_constant(node); end - - # source://rbs//lib/rbs/ast/visitor.rb#76 - def visit_declaration_global(node); end - - # source://rbs//lib/rbs/ast/visitor.rb#93 - def visit_declaration_interface(node); end - - # source://rbs//lib/rbs/ast/visitor.rb#83 - def visit_declaration_module(node); end - - # source://rbs//lib/rbs/ast/visitor.rb#90 - def visit_declaration_type_alias(node); end - - # source://rbs//lib/rbs/ast/visitor.rb#97 - def visit_member_alias(node); end - - # source://rbs//lib/rbs/ast/visitor.rb#124 - def visit_member_attr_accessor(node); end - - # source://rbs//lib/rbs/ast/visitor.rb#118 - def visit_member_attr_reader(node); end - - # source://rbs//lib/rbs/ast/visitor.rb#121 - def visit_member_attr_writer(node); end - - # source://rbs//lib/rbs/ast/visitor.rb#100 - def visit_member_class_instance_variable(node); end - - # source://rbs//lib/rbs/ast/visitor.rb#103 - def visit_member_class_variable(node); end - - # source://rbs//lib/rbs/ast/visitor.rb#133 - def visit_member_extend(node); end - - # source://rbs//lib/rbs/ast/visitor.rb#127 - def visit_member_include(node); end - - # source://rbs//lib/rbs/ast/visitor.rb#106 - def visit_member_instance_variable(node); end - - # source://rbs//lib/rbs/ast/visitor.rb#115 - def visit_member_method_definition(node); end - - # source://rbs//lib/rbs/ast/visitor.rb#130 - def visit_member_prepend(node); end - - # source://rbs//lib/rbs/ast/visitor.rb#109 - def visit_member_private(node); end - - # source://rbs//lib/rbs/ast/visitor.rb#112 - def visit_member_public(node); end -end - -# source://rbs//lib/rbs/ancestor_graph.rb#4 -class RBS::AncestorGraph - # @return [AncestorGraph] a new instance of AncestorGraph - # - # source://rbs//lib/rbs/ancestor_graph.rb#13 - def initialize(env:, ancestor_builder: T.unsafe(nil)); end - - # Returns the value of attribute ancestor_builder. - # - # source://rbs//lib/rbs/ancestor_graph.rb#9 - def ancestor_builder; end - - # source://rbs//lib/rbs/ancestor_graph.rb#19 - def build; end - - # source://rbs//lib/rbs/ancestor_graph.rb#32 - def build_ancestors(node, ancestors); end - - # Returns the value of attribute children. - # - # source://rbs//lib/rbs/ancestor_graph.rb#11 - def children; end - - # source://rbs//lib/rbs/ancestor_graph.rb#64 - def each_ancestor(node, yielded: T.unsafe(nil), &block); end - - # source://rbs//lib/rbs/ancestor_graph.rb#56 - def each_child(node, &block); end - - # source://rbs//lib/rbs/ancestor_graph.rb#78 - def each_descendant(node, yielded: T.unsafe(nil), &block); end - - # source://rbs//lib/rbs/ancestor_graph.rb#48 - def each_parent(node, &block); end - - # Returns the value of attribute env. - # - # source://rbs//lib/rbs/ancestor_graph.rb#8 - def env; end - - # Returns the value of attribute parents. - # - # source://rbs//lib/rbs/ancestor_graph.rb#10 - def parents; end - - # source://rbs//lib/rbs/ancestor_graph.rb#43 - def register(parent:, child:); end -end - -# source://rbs//lib/rbs/ancestor_graph.rb#5 -class RBS::AncestorGraph::InstanceNode < ::Struct - def type_name; end - def type_name=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://rbs//lib/rbs/ancestor_graph.rb#6 -class RBS::AncestorGraph::SingletonNode < ::Struct - def type_name; end - def type_name=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://rbs//lib/rbs/errors.rb#19 -class RBS::BaseError < ::StandardError; end - -# source://rbs//lib/rbs/buffer.rb#4 -class RBS::Buffer - # @return [Buffer] a new instance of Buffer - # - # source://rbs//lib/rbs/buffer.rb#8 - def initialize(name:, content:); end - - # Returns the value of attribute content. - # - # source://rbs//lib/rbs/buffer.rb#6 - def content; end - - # source://rbs//lib/rbs/buffer.rb#63 - def inspect; end - - # source://rbs//lib/rbs/buffer.rb#59 - def last_position; end - - # source://rbs//lib/rbs/buffer.rb#13 - def lines; end - - # source://rbs//lib/rbs/buffer.rb#49 - def loc_to_pos(loc); end - - # Returns the value of attribute name. - # - # source://rbs//lib/rbs/buffer.rb#5 - def name; end - - # source://rbs//lib/rbs/buffer.rb#37 - def pos_to_loc(pos); end - - # source://rbs//lib/rbs/buffer.rb#17 - def ranges; end -end - -# source://rbs//lib/rbs/builtin_names.rb#4 -module RBS::BuiltinNames; end - -# source://rbs//lib/rbs/builtin_names.rb#45 -RBS::BuiltinNames::Array = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) - -# source://rbs//lib/rbs/builtin_names.rb#37 -RBS::BuiltinNames::BasicObject = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) - -# source://rbs//lib/rbs/builtin_names.rb#43 -RBS::BuiltinNames::Class = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) - -# source://rbs//lib/rbs/builtin_names.rb#41 -RBS::BuiltinNames::Comparable = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) - -# source://rbs//lib/rbs/builtin_names.rb#42 -RBS::BuiltinNames::Enumerable = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) - -# source://rbs//lib/rbs/builtin_names.rb#48 -RBS::BuiltinNames::Enumerator = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) - -# source://rbs//lib/rbs/builtin_names.rb#55 -RBS::BuiltinNames::FalseClass = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) - -# source://rbs//lib/rbs/builtin_names.rb#52 -RBS::BuiltinNames::Float = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) - -# source://rbs//lib/rbs/builtin_names.rb#46 -RBS::BuiltinNames::Hash = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) - -# source://rbs//lib/rbs/builtin_names.rb#51 -RBS::BuiltinNames::Integer = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) - -# source://rbs//lib/rbs/builtin_names.rb#39 -RBS::BuiltinNames::Kernel = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) - -# source://rbs//lib/rbs/builtin_names.rb#44 -RBS::BuiltinNames::Module = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) - -# source://rbs//lib/rbs/builtin_names.rb#5 -class RBS::BuiltinNames::Name - # @return [Name] a new instance of Name - # - # source://rbs//lib/rbs/builtin_names.rb#8 - def initialize(name:); end - - # source://rbs//lib/rbs/builtin_names.rb#16 - def instance_type(*args); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/builtin_names.rb#20 - def instance_type?(type); end - - # Returns the value of attribute name. - # - # source://rbs//lib/rbs/builtin_names.rb#6 - def name; end - - # source://rbs//lib/rbs/builtin_names.rb#24 - def singleton_type; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/builtin_names.rb#28 - def singleton_type?(type); end - - # source://rbs//lib/rbs/builtin_names.rb#12 - def to_s; end - - class << self - # source://rbs//lib/rbs/builtin_names.rb#32 - def define(name, namespace: T.unsafe(nil)); end - end -end - -# source://rbs//lib/rbs/builtin_names.rb#56 -RBS::BuiltinNames::Numeric = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) - -# source://rbs//lib/rbs/builtin_names.rb#38 -RBS::BuiltinNames::Object = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) - -# source://rbs//lib/rbs/builtin_names.rb#47 -RBS::BuiltinNames::Range = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) - -# source://rbs//lib/rbs/builtin_names.rb#53 -RBS::BuiltinNames::Regexp = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) - -# source://rbs//lib/rbs/builtin_names.rb#49 -RBS::BuiltinNames::Set = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) - -# source://rbs//lib/rbs/builtin_names.rb#40 -RBS::BuiltinNames::String = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) - -# source://rbs//lib/rbs/builtin_names.rb#50 -RBS::BuiltinNames::Symbol = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) - -# source://rbs//lib/rbs/builtin_names.rb#54 -RBS::BuiltinNames::TrueClass = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) - -# source://rbs//lib/rbs/cli/colored_io.rb#4 -class RBS::CLI; end - -# source://rbs//lib/rbs/cli/colored_io.rb#5 -class RBS::CLI::ColoredIO - # @return [ColoredIO] a new instance of ColoredIO - # - # source://rbs//lib/rbs/cli/colored_io.rb#8 - def initialize(stdout:); end - - # source://rbs//lib/rbs/cli/colored_io.rb#28 - def puts(*_arg0, **_arg1, &_arg2); end - - # source://rbs//lib/rbs/cli/colored_io.rb#20 - def puts_green(string); end - - # source://rbs//lib/rbs/cli/colored_io.rb#12 - def puts_red(string); end - - # Returns the value of attribute stdout. - # - # source://rbs//lib/rbs/cli/colored_io.rb#6 - def stdout; end - - private - - # @return [Boolean] - # - # source://rbs//lib/rbs/cli/colored_io.rb#43 - def are_colors_disabled?; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/cli/colored_io.rb#39 - def are_colors_supported?; end - - # https://github.com/rubygems/rubygems/blob/ed65279100234a17d65d71fe26de5083984ac5b8/bundler/lib/bundler/vendor/thor/lib/thor/shell/color.rb#L99-L109 - # - # @return [Boolean] - # - # source://rbs//lib/rbs/cli/colored_io.rb#35 - def can_display_colors?; end -end - -# source://rbs//lib/rbs/errors.rb#345 -class RBS::ClassInstanceVariableDuplicationError < ::RBS::VariableDuplicationError - # source://rbs//lib/rbs/errors.rb#346 - def kind; end -end - -# source://rbs//lib/rbs/collection/sources/base.rb#4 -module RBS::Collection; end - -# source://rbs//lib/rbs/collection/cleaner.rb#5 -class RBS::Collection::Cleaner - # @return [Cleaner] a new instance of Cleaner - # - # source://rbs//lib/rbs/collection/cleaner.rb#8 - def initialize(lockfile_path:); end - - # source://rbs//lib/rbs/collection/cleaner.rb#12 - def clean; end - - # Returns the value of attribute lock. - # - # source://rbs//lib/rbs/collection/cleaner.rb#6 - def lock; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/collection/cleaner.rb#30 - def needed?(gem_name, version); end -end - -# This class represent the configuration file. -# -# source://rbs//lib/rbs/collection/config.rb#7 -class RBS::Collection::Config - # @return [Config] a new instance of Config - # - # source://rbs//lib/rbs/collection/config.rb#49 - def initialize(data, config_path:); end - - # Returns the value of attribute config_path. - # - # source://rbs//lib/rbs/collection/config.rb#19 - def config_path; end - - # Returns the value of attribute data. - # - # source://rbs//lib/rbs/collection/config.rb#19 - def data; end - - # source://rbs//lib/rbs/collection/config.rb#54 - def gem(gem_name); end - - # source://rbs//lib/rbs/collection/config.rb#74 - def gems; end - - # source://rbs//lib/rbs/collection/config.rb#58 - def repo_path; end - - # source://rbs//lib/rbs/collection/config.rb#62 - def repo_path_data; end - - # source://rbs//lib/rbs/collection/config.rb#66 - def sources; end - - class << self - # source://rbs//lib/rbs/collection/config.rb#21 - def find_config_path; end - - # source://rbs//lib/rbs/collection/config.rb#41 - def from_path(path); end - - # Generate a rbs lockfile from Gemfile.lock to `config_path`. - # If `with_lockfile` is true, it respects existing rbs lockfile. - # - # source://rbs//lib/rbs/collection/config.rb#34 - def generate_lockfile(config_path:, definition:, with_lockfile: T.unsafe(nil)); end - - # source://rbs//lib/rbs/collection/config.rb#45 - def to_lockfile_path(config_path); end - end -end - -# source://rbs//lib/rbs/collection/config.rb#8 -class RBS::Collection::Config::CollectionNotAvailable < ::StandardError - # @return [CollectionNotAvailable] a new instance of CollectionNotAvailable - # - # source://rbs//lib/rbs/collection/config.rb#9 - def initialize; end -end - -# source://rbs//lib/rbs/collection/config/lockfile.rb#6 -class RBS::Collection::Config::Lockfile - # @return [Lockfile] a new instance of Lockfile - # - # source://rbs//lib/rbs/collection/config/lockfile.rb#9 - def initialize(lockfile_path:, path:, gemfile_lock_path:); end - - # @raise [CollectionNotAvailable] - # - # source://rbs//lib/rbs/collection/config/lockfile.rb#73 - def check_rbs_availability!; end - - # source://rbs//lib/rbs/collection/config/lockfile.rb#18 - def fullpath; end - - # source://rbs//lib/rbs/collection/config/lockfile.rb#22 - def gemfile_lock_fullpath; end - - # Returns the value of attribute gemfile_lock_path. - # - # source://rbs//lib/rbs/collection/config/lockfile.rb#7 - def gemfile_lock_path; end - - # Returns the value of attribute gems. - # - # source://rbs//lib/rbs/collection/config/lockfile.rb#7 - def gems; end - - # source://rbs//lib/rbs/collection/config/lockfile.rb#65 - def library_data(lib); end - - # Returns the value of attribute lockfile_dir. - # - # source://rbs//lib/rbs/collection/config/lockfile.rb#7 - def lockfile_dir; end - - # Returns the value of attribute lockfile_path. - # - # source://rbs//lib/rbs/collection/config/lockfile.rb#7 - def lockfile_path; end - - # Returns the value of attribute path. - # - # source://rbs//lib/rbs/collection/config/lockfile.rb#7 - def path; end - - # Returns the value of attribute sources. - # - # source://rbs//lib/rbs/collection/config/lockfile.rb#7 - def sources; end - - # source://rbs//lib/rbs/collection/config/lockfile.rb#28 - def to_lockfile; end - - class << self - # source://rbs//lib/rbs/collection/config/lockfile.rb#42 - def from_lockfile(lockfile_path:, data:); end - end -end - -# source://rbs//lib/rbs/collection/config/lockfile_generator.rb#6 -class RBS::Collection::Config::LockfileGenerator - # @return [LockfileGenerator] a new instance of LockfileGenerator - # - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#43 - def initialize(config:, definition:, with_lockfile:); end - - # Returns the value of attribute config. - # - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#35 - def config; end - - # Returns the value of attribute definition. - # - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#35 - def definition; end - - # Returns the value of attribute existing_lockfile. - # - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#35 - def existing_lockfile; end - - # Returns the value of attribute gem_entries. - # - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#35 - def gem_entries; end - - # Returns the value of attribute gem_hash. - # - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#35 - def gem_hash; end - - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#71 - def generate; end - - # Returns the value of attribute lockfile. - # - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#35 - def lockfile; end - - private - - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#104 - def assign_gem(name:, version:, skip: T.unsafe(nil)); end - - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#170 - def assign_stdlib(name:, from_gem: T.unsafe(nil)); end - - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#234 - def find_best_version(version:, versions:); end - - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#228 - def find_source(name:); end - - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#96 - def validate_gemfile_lock_path!(lock:, gemfile_lock_path:); end - - class << self - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#37 - def generate(config:, definition:, with_lockfile: T.unsafe(nil)); end - end -end - -# source://rbs//lib/rbs/collection/config/lockfile_generator.rb#7 -RBS::Collection::Config::LockfileGenerator::ALUMNI_STDLIBS = T.let(T.unsafe(nil), Hash) - -# source://rbs//lib/rbs/collection/config/lockfile_generator.rb#19 -class RBS::Collection::Config::LockfileGenerator::GemfileLockMismatchError < ::StandardError - # @return [GemfileLockMismatchError] a new instance of GemfileLockMismatchError - # - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#20 - def initialize(expected:, actual:); end - - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#25 - def message; end -end - -# source://rbs//lib/rbs/collection/config.rb#17 -RBS::Collection::Config::PATH = T.let(T.unsafe(nil), Pathname) - -# source://rbs//lib/rbs/collection/installer.rb#5 -class RBS::Collection::Installer - # @return [Installer] a new instance of Installer - # - # source://rbs//lib/rbs/collection/installer.rb#9 - def initialize(lockfile_path:, stdout: T.unsafe(nil)); end - - # source://rbs//lib/rbs/collection/installer.rb#14 - def install_from_lockfile; end - - # Returns the value of attribute lockfile. - # - # source://rbs//lib/rbs/collection/installer.rb#6 - def lockfile; end - - # Returns the value of attribute stdout. - # - # source://rbs//lib/rbs/collection/installer.rb#7 - def stdout; end -end - -# source://rbs//lib/rbs/collection/sources/base.rb#5 -module RBS::Collection::Sources - class << self - # source://rbs//lib/rbs/collection/sources.rb#12 - def from_config_entry(source_entry, base_directory:); end - end -end - -# source://rbs//lib/rbs/collection/sources/base.rb#6 -module RBS::Collection::Sources::Base - # source://rbs//lib/rbs/collection/sources/base.rb#7 - def dependencies_of(name, version); end -end - -# source://rbs//lib/rbs/collection/sources/git.rb#10 -class RBS::Collection::Sources::Git - include ::RBS::Collection::Sources::Base - - # @return [Git] a new instance of Git - # - # source://rbs//lib/rbs/collection/sources/git.rb#18 - def initialize(name:, revision:, remote:, repo_dir:); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/collection/sources/git.rb#26 - def has?(name, version); end - - # source://rbs//lib/rbs/collection/sources/git.rb#43 - def install(dest:, name:, version:, stdout:); end - - # source://rbs//lib/rbs/collection/sources/git.rb#223 - def load_metadata(dir:); end - - # source://rbs//lib/rbs/collection/sources/git.rb#73 - def manifest_of(name, version); end - - # source://rbs//lib/rbs/collection/sources/git.rb#207 - def metadata_content(name:, version:); end - - # Returns the value of attribute name. - # - # source://rbs//lib/rbs/collection/sources/git.rb#16 - def name; end - - # Returns the value of attribute remote. - # - # source://rbs//lib/rbs/collection/sources/git.rb#16 - def remote; end - - # Returns the value of attribute repo_dir. - # - # source://rbs//lib/rbs/collection/sources/git.rb#16 - def repo_dir; end - - # source://rbs//lib/rbs/collection/sources/git.rb#172 - def resolved_revision; end - - # Returns the value of attribute revision. - # - # source://rbs//lib/rbs/collection/sources/git.rb#16 - def revision; end - - # source://rbs//lib/rbs/collection/sources/git.rb#113 - def to_lockfile; end - - # source://rbs//lib/rbs/collection/sources/git.rb#36 - def versions(name); end - - # source://rbs//lib/rbs/collection/sources/git.rb#215 - def write_metadata(dir:, name:, version:); end - - private - - # source://rbs//lib/rbs/collection/sources/git.rb#87 - def _install(dest:, name:, version:); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/collection/sources/git.rb#183 - def commit_hash?; end - - # source://rbs//lib/rbs/collection/sources/git.rb#99 - def cp_r(src, dest); end - - # source://rbs//lib/rbs/collection/sources/git.rb#123 - def format_config_entry(name, version); end - - # source://rbs//lib/rbs/collection/sources/git.rb#168 - def gem_repo_dir; end - - # source://rbs//lib/rbs/collection/sources/git.rb#229 - def gems_versions; end - - # source://rbs//lib/rbs/collection/sources/git.rb#187 - def git(*cmd, **opt); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/collection/sources/git.rb#191 - def git?(*cmd, **opt); end - - # source://rbs//lib/rbs/collection/sources/git.rb#158 - def git_dir; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/collection/sources/git.rb#152 - def need_to_fetch?(revision); end - - # source://rbs//lib/rbs/collection/sources/git.rb#130 - def setup!; end - - # source://rbs//lib/rbs/collection/sources/git.rb#197 - def sh!(*cmd, **opt); end -end - -# source://rbs//lib/rbs/collection/sources/git.rb#14 -class RBS::Collection::Sources::Git::CommandError < ::StandardError; end - -# source://rbs//lib/rbs/collection/sources/git.rb#12 -RBS::Collection::Sources::Git::METADATA_FILENAME = T.let(T.unsafe(nil), String) - -# source://rbs//lib/rbs/collection/sources/local.rb#6 -class RBS::Collection::Sources::Local - include ::RBS::Collection::Sources::Base - - # @return [Local] a new instance of Local - # - # source://rbs//lib/rbs/collection/sources/local.rb#11 - def initialize(path:, base_directory:); end - - # Returns the value of attribute full_path. - # - # source://rbs//lib/rbs/collection/sources/local.rb#9 - def full_path; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/collection/sources/local.rb#17 - def has?(name, version); end - - # Create a symlink instead of copying file to refer files in @path. - # By avoiding copying RBS files, the users do not need re-run `rbs collection install` - # when the RBS files are updated. - # - # source://rbs//lib/rbs/collection/sources/local.rb#32 - def install(dest:, name:, version:, stdout:); end - - # source://rbs//lib/rbs/collection/sources/local.rb#64 - def manifest_of(name, version); end - - # Returns the value of attribute path. - # - # source://rbs//lib/rbs/collection/sources/local.rb#9 - def path; end - - # source://rbs//lib/rbs/collection/sources/local.rb#72 - def to_lockfile; end - - # source://rbs//lib/rbs/collection/sources/local.rb#25 - def versions(name); end - - private - - # source://rbs//lib/rbs/collection/sources/local.rb#59 - def _install(src, dst); end -end - -# Signatures that are included in gem package as sig/ directory. -# -# source://rbs//lib/rbs/collection/sources/rubygems.rb#9 -class RBS::Collection::Sources::Rubygems - include ::RBS::Collection::Sources::Base - include ::Singleton::SingletonInstanceMethods - include ::Singleton - extend ::Singleton::SingletonClassMethods - - # @return [Boolean] - # - # source://rbs//lib/rbs/collection/sources/rubygems.rb#13 - def has?(name, version); end - - # source://rbs//lib/rbs/collection/sources/rubygems.rb#23 - def install(dest:, name:, version:, stdout:); end - - # source://rbs//lib/rbs/collection/sources/rubygems.rb#29 - def manifest_of(name, version); end - - # source://rbs//lib/rbs/collection/sources/rubygems.rb#36 - def to_lockfile; end - - # source://rbs//lib/rbs/collection/sources/rubygems.rb#17 - def versions(name); end - - private - - # source://rbs//lib/rbs/collection/sources/rubygems.rb#42 - def gem_sig_path(name, version); end - - class << self - private - - def allocate; end - def new(*_arg0); end - end -end - -# signatures that are bundled in rbs gem under the stdlib/ directory -# -# source://rbs//lib/rbs/collection/sources/stdlib.rb#9 -class RBS::Collection::Sources::Stdlib - include ::RBS::Collection::Sources::Base - include ::Singleton::SingletonInstanceMethods - include ::Singleton - extend ::Singleton::SingletonClassMethods - - # @return [Boolean] - # - # source://rbs//lib/rbs/collection/sources/stdlib.rb#15 - def has?(name, version); end - - # source://rbs//lib/rbs/collection/sources/stdlib.rb#23 - def install(dest:, name:, version:, stdout:); end - - # source://rbs//lib/rbs/collection/sources/stdlib.rb#29 - def manifest_of(name, version); end - - # source://rbs//lib/rbs/collection/sources/stdlib.rb#38 - def to_lockfile; end - - # source://rbs//lib/rbs/collection/sources/stdlib.rb#19 - def versions(name); end - - private - - # source://rbs//lib/rbs/collection/sources/stdlib.rb#44 - def lookup(name, version); end - - class << self - private - - def allocate; end - def new(*_arg0); end - end -end - -# source://rbs//lib/rbs/collection/sources/stdlib.rb#13 -RBS::Collection::Sources::Stdlib::REPO = T.let(T.unsafe(nil), RBS::Repository) - -# source://rbs//lib/rbs/constant.rb#4 -class RBS::Constant - # @return [Constant] a new instance of Constant - # - # source://rbs//lib/rbs/constant.rb#9 - def initialize(name:, type:, entry:); end - - # source://rbs//lib/rbs/constant.rb#15 - def ==(other); end - - # Returns the value of attribute entry. - # - # source://rbs//lib/rbs/constant.rb#7 - def entry; end - - # source://rbs//lib/rbs/constant.rb#15 - def eql?(other); end - - # source://rbs//lib/rbs/constant.rb#24 - def hash; end - - # Returns the value of attribute name. - # - # source://rbs//lib/rbs/constant.rb#5 - def name; end - - # Returns the value of attribute type. - # - # source://rbs//lib/rbs/constant.rb#6 - def type; end -end - -# source://rbs//lib/rbs/errors.rb#577 -class RBS::CyclicClassAliasDefinitionError < ::RBS::BaseError - include ::RBS::DetailedMessageable - - # @return [CyclicClassAliasDefinitionError] a new instance of CyclicClassAliasDefinitionError - # - # source://rbs//lib/rbs/errors.rb#582 - def initialize(entry); end - - # Returns the value of attribute alias_entry. - # - # source://rbs//lib/rbs/errors.rb#580 - def alias_entry; end - - # source://rbs//lib/rbs/errors.rb#588 - def location; end -end - -# source://rbs//lib/rbs/errors.rb#538 -class RBS::CyclicTypeParameterBound < ::RBS::BaseError - include ::RBS::DetailedMessageable - - # @return [CyclicTypeParameterBound] a new instance of CyclicTypeParameterBound - # - # source://rbs//lib/rbs/errors.rb#543 - def initialize(type_name:, method_name:, params:, location:); end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/errors.rb#541 - def location; end - - # Returns the value of attribute method_name. - # - # source://rbs//lib/rbs/errors.rb#541 - def method_name; end - - # Returns the value of attribute params. - # - # source://rbs//lib/rbs/errors.rb#541 - def params; end - - # Returns the value of attribute type_name. - # - # source://rbs//lib/rbs/errors.rb#541 - def type_name; end -end - -# source://rbs//lib/rbs/definition.rb#4 -class RBS::Definition - # @return [Definition] a new instance of Definition - # - # source://rbs//lib/rbs/definition.rb#297 - def initialize(type_name:, entry:, self_type:, ancestors:); end - - # Returns the value of attribute ancestors. - # - # source://rbs//lib/rbs/definition.rb#291 - def ancestors; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/definition.rb#320 - def class?; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/definition.rb#337 - def class_type?; end - - # Returns the value of attribute class_variables. - # - # source://rbs//lib/rbs/definition.rb#295 - def class_variables; end - - # source://rbs//lib/rbs/definition.rb#384 - def each_type(&block); end - - # Returns the value of attribute entry. - # - # source://rbs//lib/rbs/definition.rb#290 - def entry; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/definition.rb#341 - def instance_type?; end - - # Returns the value of attribute instance_variables. - # - # source://rbs//lib/rbs/definition.rb#294 - def instance_variables; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/definition.rb#328 - def interface?; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/definition.rb#345 - def interface_type?; end - - # source://rbs//lib/rbs/definition.rb#374 - def map_method_type(&block); end - - # Returns the value of attribute methods. - # - # source://rbs//lib/rbs/definition.rb#293 - def methods; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/definition.rb#324 - def module?; end - - # Returns the value of attribute self_type. - # - # source://rbs//lib/rbs/definition.rb#292 - def self_type; end - - # source://rbs//lib/rbs/definition.rb#362 - def sub(s); end - - # Returns the value of attribute type_name. - # - # source://rbs//lib/rbs/definition.rb#289 - def type_name; end - - # source://rbs//lib/rbs/definition.rb#349 - def type_params; end - - # source://rbs//lib/rbs/definition.rb#353 - def type_params_decl; end -end - -# source://rbs//lib/rbs/definition.rb#204 -module RBS::Definition::Ancestor; end - -# source://rbs//lib/rbs/definition.rb#205 -class RBS::Definition::Ancestor::Instance - # @return [Instance] a new instance of Instance - # - # source://rbs//lib/rbs/definition.rb#208 - def initialize(name:, args:, source:); end - - # source://rbs//lib/rbs/definition.rb#214 - def ==(other); end - - # Returns the value of attribute args. - # - # source://rbs//lib/rbs/definition.rb#206 - def args; end - - # source://rbs//lib/rbs/definition.rb#214 - def eql?(other); end - - # source://rbs//lib/rbs/definition.rb#220 - def hash; end - - # Returns the value of attribute name. - # - # source://rbs//lib/rbs/definition.rb#206 - def name; end - - # Returns the value of attribute source. - # - # source://rbs//lib/rbs/definition.rb#206 - def source; end -end - -# source://rbs//lib/rbs/definition.rb#225 -class RBS::Definition::Ancestor::Singleton - # @return [Singleton] a new instance of Singleton - # - # source://rbs//lib/rbs/definition.rb#228 - def initialize(name:); end - - # source://rbs//lib/rbs/definition.rb#232 - def ==(other); end - - # source://rbs//lib/rbs/definition.rb#232 - def eql?(other); end - - # source://rbs//lib/rbs/definition.rb#238 - def hash; end - - # Returns the value of attribute name. - # - # source://rbs//lib/rbs/definition.rb#226 - def name; end -end - -# source://rbs//lib/rbs/definition.rb#244 -class RBS::Definition::InstanceAncestors - # @return [InstanceAncestors] a new instance of InstanceAncestors - # - # source://rbs//lib/rbs/definition.rb#249 - def initialize(type_name:, params:, ancestors:); end - - # Returns the value of attribute ancestors. - # - # source://rbs//lib/rbs/definition.rb#247 - def ancestors; end - - # source://rbs//lib/rbs/definition.rb#255 - def apply(args, env:, location:); end - - # Returns the value of attribute params. - # - # source://rbs//lib/rbs/definition.rb#246 - def params; end - - # Returns the value of attribute type_name. - # - # source://rbs//lib/rbs/definition.rb#245 - def type_name; end -end - -# source://rbs//lib/rbs/definition.rb#30 -class RBS::Definition::Method - # @return [Method] a new instance of Method - # - # source://rbs//lib/rbs/definition.rb#102 - def initialize(super_method:, defs:, accessibility:, alias_of:, annotations: T.unsafe(nil), alias_member: T.unsafe(nil)); end - - # source://rbs//lib/rbs/definition.rb#112 - def ==(other); end - - # Returns the value of attribute accessibility. - # - # source://rbs//lib/rbs/definition.rb#96 - def accessibility; end - - # Returns the value of attribute alias_member. - # - # source://rbs//lib/rbs/definition.rb#100 - def alias_member; end - - # Returns the value of attribute alias_of. - # - # source://rbs//lib/rbs/definition.rb#99 - def alias_of; end - - # Returns the value of attribute annotations. - # - # source://rbs//lib/rbs/definition.rb#98 - def annotations; end - - # source://rbs//lib/rbs/definition.rb#146 - def comments; end - - # source://rbs//lib/rbs/definition.rb#128 - def defined_in; end - - # Returns the value of attribute defs. - # - # source://rbs//lib/rbs/definition.rb#95 - def defs; end - - # source://rbs//lib/rbs/definition.rb#112 - def eql?(other); end - - # Returns the value of attribute extra_annotations. - # - # source://rbs//lib/rbs/definition.rb#97 - def extra_annotations; end - - # source://rbs//lib/rbs/definition.rb#124 - def hash; end - - # source://rbs//lib/rbs/definition.rb#135 - def implemented_in; end - - # source://rbs//lib/rbs/definition.rb#185 - def map_method_type(&block); end - - # source://rbs//lib/rbs/definition.rb#171 - def map_type(&block); end - - # source://rbs//lib/rbs/definition.rb#178 - def map_type_bound(&block); end - - # source://rbs//lib/rbs/definition.rb#150 - def members; end - - # source://rbs//lib/rbs/definition.rb#142 - def method_types; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/definition.rb#158 - def private?; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/definition.rb#154 - def public?; end - - # source://rbs//lib/rbs/definition.rb#162 - def sub(s); end - - # Returns the value of attribute super_method. - # - # source://rbs//lib/rbs/definition.rb#94 - def super_method; end - - # source://rbs//lib/rbs/definition.rb#191 - def update(super_method: T.unsafe(nil), defs: T.unsafe(nil), accessibility: T.unsafe(nil), alias_of: T.unsafe(nil), annotations: T.unsafe(nil), alias_member: T.unsafe(nil)); end -end - -# source://rbs//lib/rbs/definition.rb#31 -class RBS::Definition::Method::TypeDef - # @return [TypeDef] a new instance of TypeDef - # - # source://rbs//lib/rbs/definition.rb#40 - def initialize(type:, member:, defined_in:, implemented_in:, overload_annotations: T.unsafe(nil)); end - - # source://rbs//lib/rbs/definition.rb#50 - def ==(other); end - - # Returns the value of attribute annotations. - # - # source://rbs//lib/rbs/definition.rb#38 - def annotations; end - - # source://rbs//lib/rbs/definition.rb#64 - def comment; end - - # Returns the value of attribute defined_in. - # - # source://rbs//lib/rbs/definition.rb#34 - def defined_in; end - - # source://rbs//lib/rbs/definition.rb#84 - def each_annotation(&block); end - - # source://rbs//lib/rbs/definition.rb#50 - def eql?(other); end - - # source://rbs//lib/rbs/definition.rb#60 - def hash; end - - # Returns the value of attribute implemented_in. - # - # source://rbs//lib/rbs/definition.rb#35 - def implemented_in; end - - # Returns the value of attribute member. - # - # source://rbs//lib/rbs/definition.rb#33 - def member; end - - # Returns the value of attribute member_annotations. - # - # source://rbs//lib/rbs/definition.rb#36 - def member_annotations; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/definition.rb#75 - def overload?; end - - # Returns the value of attribute overload_annotations. - # - # source://rbs//lib/rbs/definition.rb#37 - def overload_annotations; end - - # Returns the value of attribute type. - # - # source://rbs//lib/rbs/definition.rb#32 - def type; end - - # source://rbs//lib/rbs/definition.rb#68 - def update(type: T.unsafe(nil), member: T.unsafe(nil), defined_in: T.unsafe(nil), implemented_in: T.unsafe(nil)); end -end - -# source://rbs//lib/rbs/definition.rb#279 -class RBS::Definition::SingletonAncestors - # @return [SingletonAncestors] a new instance of SingletonAncestors - # - # source://rbs//lib/rbs/definition.rb#283 - def initialize(type_name:, ancestors:); end - - # Returns the value of attribute ancestors. - # - # source://rbs//lib/rbs/definition.rb#281 - def ancestors; end - - # Returns the value of attribute type_name. - # - # source://rbs//lib/rbs/definition.rb#280 - def type_name; end -end - -# source://rbs//lib/rbs/definition.rb#5 -class RBS::Definition::Variable - # @return [Variable] a new instance of Variable - # - # source://rbs//lib/rbs/definition.rb#11 - def initialize(parent_variable:, type:, declared_in:, source:); end - - # Returns the value of attribute declared_in. - # - # source://rbs//lib/rbs/definition.rb#8 - def declared_in; end - - # Returns the value of attribute parent_variable. - # - # source://rbs//lib/rbs/definition.rb#6 - def parent_variable; end - - # Returns the value of attribute source. - # - # source://rbs//lib/rbs/definition.rb#9 - def source; end - - # source://rbs//lib/rbs/definition.rb#18 - def sub(s); end - - # Returns the value of attribute type. - # - # source://rbs//lib/rbs/definition.rb#7 - def type; end -end - -# source://rbs//lib/rbs/definition_builder.rb#4 -class RBS::DefinitionBuilder - # @return [DefinitionBuilder] a new instance of DefinitionBuilder - # - # source://rbs//lib/rbs/definition_builder.rb#14 - def initialize(env:, ancestor_builder: T.unsafe(nil), method_builder: T.unsafe(nil)); end - - # Returns the value of attribute ancestor_builder. - # - # source://rbs//lib/rbs/definition_builder.rb#6 - def ancestor_builder; end - - # source://rbs//lib/rbs/definition_builder.rb#172 - def build_instance(type_name); end - - # source://rbs//lib/rbs/definition_builder.rb#43 - def build_interface(type_name); end - - # source://rbs//lib/rbs/definition_builder.rb#304 - def build_singleton(type_name); end - - # Builds a definition for singleton without .new method. - # - # source://rbs//lib/rbs/definition_builder.rb#234 - def build_singleton0(type_name); end - - # source://rbs//lib/rbs/definition_builder.rb#85 - def define_instance(definition, type_name, subst, define_class_vars:); end - - # source://rbs//lib/rbs/definition_builder.rb#33 - def define_interface(definition, type_name, subst); end - - # source://rbs//lib/rbs/definition_builder.rb#642 - def define_method(methods, definition, method, subst, self_type_methods, defined_in:, implemented_in: T.unsafe(nil)); end - - # source://rbs//lib/rbs/definition_builder.rb#25 - def ensure_namespace!(namespace, location:); end - - # Returns the value of attribute env. - # - # source://rbs//lib/rbs/definition_builder.rb#5 - def env; end - - # source://rbs//lib/rbs/definition_builder.rb#826 - def expand_alias(type_name); end - - # source://rbs//lib/rbs/definition_builder.rb#830 - def expand_alias1(type_name); end - - # source://rbs//lib/rbs/definition_builder.rb#837 - def expand_alias2(type_name, args); end - - # source://rbs//lib/rbs/definition_builder.rb#581 - def import_methods(definition, module_name, module_methods, interfaces_methods, subst, self_type_methods); end - - # source://rbs//lib/rbs/definition_builder.rb#543 - def insert_variable(type_name, variables, name:, type:, source:); end - - # Returns the value of attribute instance_cache. - # - # source://rbs//lib/rbs/definition_builder.rb#9 - def instance_cache; end - - # Returns the value of attribute interface_cache. - # - # source://rbs//lib/rbs/definition_builder.rb#12 - def interface_cache; end - - # source://rbs//lib/rbs/definition_builder.rb#417 - def interface_methods(interface_ancestors); end - - # Returns the value of attribute method_builder. - # - # source://rbs//lib/rbs/definition_builder.rb#7 - def method_builder; end - - # Returns the value of attribute singleton0_cache. - # - # source://rbs//lib/rbs/definition_builder.rb#11 - def singleton0_cache; end - - # Returns the value of attribute singleton_cache. - # - # source://rbs//lib/rbs/definition_builder.rb#10 - def singleton_cache; end - - # source://rbs//lib/rbs/definition_builder.rb#447 - def source_location(source, decl); end - - # source://rbs//lib/rbs/definition_builder.rb#66 - def tapp_subst(name, args); end - - # source://rbs//lib/rbs/definition_builder.rb#822 - def try_cache(type_name, cache:); end - - # source://rbs//lib/rbs/definition_builder.rb#861 - def update(env:, except:, ancestor_builder:); end - - # source://rbs//lib/rbs/definition_builder.rb#437 - def validate_params_with(type_params, result:); end - - # @raise [NoTypeFoundError] - # - # source://rbs//lib/rbs/definition_builder.rb#890 - def validate_type_name(name, location); end - - # source://rbs//lib/rbs/definition_builder.rb#461 - def validate_type_params(definition, ancestors:, methods:); end - - # source://rbs//lib/rbs/definition_builder.rb#879 - def validate_type_presence(type); end - - # source://rbs//lib/rbs/definition_builder.rb#553 - def validate_variable(var); end -end - -# source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#5 -class RBS::DefinitionBuilder::AncestorBuilder - # @return [AncestorBuilder] a new instance of AncestorBuilder - # - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#162 - def initialize(env:); end - - # Returns the value of attribute env. - # - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#151 - def env; end - - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#608 - def fill_ancestor_source(ancestor, name:, source:, &block); end - - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#436 - def instance_ancestors(type_name, building_ancestors: T.unsafe(nil)); end - - # Returns the value of attribute instance_ancestors_cache. - # - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#154 - def instance_ancestors_cache; end - - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#572 - def interface_ancestors(type_name, building_ancestors: T.unsafe(nil)); end - - # Returns the value of attribute interface_ancestors_cache. - # - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#160 - def interface_ancestors_cache; end - - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#416 - def mixin_ancestors(entry, type_name, included_modules:, included_interfaces:, extended_modules:, prepended_modules:, extended_interfaces:); end - - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#350 - def mixin_ancestors0(decl, type_name, align_params:, included_modules:, included_interfaces:, extended_modules:, prepended_modules:, extended_interfaces:); end - - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#192 - def one_instance_ancestors(type_name); end - - # Returns the value of attribute one_instance_ancestors_cache. - # - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#153 - def one_instance_ancestors_cache; end - - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#331 - def one_interface_ancestors(type_name); end - - # Returns the value of attribute one_interface_ancestors_cache. - # - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#159 - def one_interface_ancestors_cache; end - - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#277 - def one_singleton_ancestors(type_name); end - - # Returns the value of attribute one_singleton_ancestors_cache. - # - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#156 - def one_singleton_ancestors_cache; end - - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#517 - def singleton_ancestors(type_name, building_ancestors: T.unsafe(nil)); end - - # Returns the value of attribute singleton_ancestors_cache. - # - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#157 - def singleton_ancestors_cache; end - - # @raise [SuperclassMismatchError] - # - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#175 - def validate_super_class!(type_name, entry); end -end - -# source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#6 -class RBS::DefinitionBuilder::AncestorBuilder::OneAncestors - # @return [OneAncestors] a new instance of OneAncestors - # - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#17 - def initialize(type_name:, params:, super_class:, self_types:, included_modules:, included_interfaces:, prepended_modules:, extended_modules:, extended_interfaces:); end - - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#29 - def each_ancestor(&block); end - - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#86 - def each_extended_interface(&block); end - - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#78 - def each_extended_module(&block); end - - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#62 - def each_included_interface(&block); end - - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#54 - def each_included_module(&block); end - - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#70 - def each_prepended_module(&block); end - - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#46 - def each_self_type(&block); end - - # Returns the value of attribute extended_interfaces. - # - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#15 - def extended_interfaces; end - - # Returns the value of attribute extended_modules. - # - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#14 - def extended_modules; end - - # Returns the value of attribute included_interfaces. - # - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#12 - def included_interfaces; end - - # Returns the value of attribute included_modules. - # - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#11 - def included_modules; end - - # Returns the value of attribute params. - # - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#8 - def params; end - - # Returns the value of attribute prepended_modules. - # - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#13 - def prepended_modules; end - - # Returns the value of attribute self_types. - # - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#10 - def self_types; end - - # Returns the value of attribute super_class. - # - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#9 - def super_class; end - - # Returns the value of attribute type_name. - # - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#7 - def type_name; end - - class << self - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#94 - def class_instance(type_name:, params:, super_class:); end - - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#136 - def interface(type_name:, params:); end - - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#122 - def module_instance(type_name:, params:); end - - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#108 - def singleton(type_name:, super_class:); end - end -end - -# source://rbs//lib/rbs/definition_builder/method_builder.rb#5 -class RBS::DefinitionBuilder::MethodBuilder - # @return [MethodBuilder] a new instance of MethodBuilder - # - # source://rbs//lib/rbs/definition_builder/method_builder.rb#91 - def initialize(env:); end - - # source://rbs//lib/rbs/definition_builder/method_builder.rb#194 - def build_alias(methods, type, member:); end - - # source://rbs//lib/rbs/definition_builder/method_builder.rb#199 - def build_attribute(methods, type, member:, accessibility:); end - - # source://rbs//lib/rbs/definition_builder/method_builder.rb#99 - def build_instance(type_name); end - - # source://rbs//lib/rbs/definition_builder/method_builder.rb#174 - def build_interface(type_name); end - - # source://rbs//lib/rbs/definition_builder/method_builder.rb#215 - def build_method(methods, type, member:, accessibility:); end - - # source://rbs//lib/rbs/definition_builder/method_builder.rb#145 - def build_singleton(type_name); end - - # source://rbs//lib/rbs/definition_builder/method_builder.rb#226 - def each_member_with_accessibility(members, accessibility: T.unsafe(nil)); end - - # Returns the value of attribute env. - # - # source://rbs//lib/rbs/definition_builder/method_builder.rb#86 - def env; end - - # Returns the value of attribute instance_methods. - # - # source://rbs//lib/rbs/definition_builder/method_builder.rb#87 - def instance_methods; end - - # Returns the value of attribute interface_methods. - # - # source://rbs//lib/rbs/definition_builder/method_builder.rb#89 - def interface_methods; end - - # Returns the value of attribute singleton_methods. - # - # source://rbs//lib/rbs/definition_builder/method_builder.rb#88 - def singleton_methods; end - - # source://rbs//lib/rbs/definition_builder/method_builder.rb#239 - def update(env:, except:); end -end - -# source://rbs//lib/rbs/definition_builder/method_builder.rb#6 -class RBS::DefinitionBuilder::MethodBuilder::Methods - # @return [Methods] a new instance of Methods - # - # source://rbs//lib/rbs/definition_builder/method_builder.rb#30 - def initialize(type:); end - - # source://rbs//lib/rbs/definition_builder/method_builder.rb#49 - def each; end - - # Returns the value of attribute methods. - # - # source://rbs//lib/rbs/definition_builder/method_builder.rb#28 - def methods; end - - # Returns the value of attribute type. - # - # source://rbs//lib/rbs/definition_builder/method_builder.rb#27 - def type; end - - # source://rbs//lib/rbs/definition_builder/method_builder.rb#35 - def validate!; end -end - -# source://rbs//lib/rbs/definition_builder/method_builder.rb#7 -class RBS::DefinitionBuilder::MethodBuilder::Methods::Definition < ::Struct - # source://rbs//lib/rbs/definition_builder/method_builder.rb#14 - def accessibility; end - - # source://rbs//lib/rbs/definition_builder/method_builder.rb#10 - def original; end - - class << self - # source://rbs//lib/rbs/definition_builder/method_builder.rb#22 - def empty(name:, type:); end - end -end - -# source://rbs//lib/rbs/definition_builder/method_builder.rb#63 -class RBS::DefinitionBuilder::MethodBuilder::Methods::Sorter - include ::TSort - - # @return [Sorter] a new instance of Sorter - # - # source://rbs//lib/rbs/definition_builder/method_builder.rb#68 - def initialize(methods); end - - # Returns the value of attribute methods. - # - # source://rbs//lib/rbs/definition_builder/method_builder.rb#66 - def methods; end - - # source://rbs//lib/rbs/definition_builder/method_builder.rb#76 - def tsort_each_child(defn); end - - # source://rbs//lib/rbs/definition_builder/method_builder.rb#72 - def tsort_each_node(&block); end -end - -# source://rbs//lib/rbs/errors.rb#21 -class RBS::DefinitionError < ::RBS::BaseError; end - -# source://rbs//lib/rbs/errors.rb#23 -module RBS::DetailedMessageable - # source://rbs//lib/rbs/errors.rb#24 - def detailed_message(highlight: T.unsafe(nil), **_arg1); end -end - -# source://rbs//lib/rbs/diff.rb#4 -class RBS::Diff - # @return [Diff] a new instance of Diff - # - # source://rbs//lib/rbs/diff.rb#5 - def initialize(type_name:, library_options:, after_path: T.unsafe(nil), before_path: T.unsafe(nil), detail: T.unsafe(nil)); end - - # source://rbs//lib/rbs/diff.rb#13 - def each_diff(&block); end - - private - - # source://rbs//lib/rbs/diff.rb#96 - def build_builder(env); end - - # source://rbs//lib/rbs/diff.rb#77 - def build_env(path); end - - # source://rbs//lib/rbs/diff.rb#49 - def build_methods(path); end - - # source://rbs//lib/rbs/diff.rb#116 - def constant_to_s(constant); end - - # source://rbs//lib/rbs/diff.rb#100 - def definition_method_to_s(key, kind, definition_method); end - - # source://rbs//lib/rbs/diff.rb#38 - def each_diff_constants(before_constant_children, after_constant_children); end - - # source://rbs//lib/rbs/diff.rb#27 - def each_diff_methods(kind, before_methods, after_methods); end -end - -# source://rbs//lib/rbs/errors.rb#418 -class RBS::DuplicatedDeclarationError < ::RBS::LoadingError - # @return [DuplicatedDeclarationError] a new instance of DuplicatedDeclarationError - # - # source://rbs//lib/rbs/errors.rb#422 - def initialize(name, *decls); end - - # Returns the value of attribute decls. - # - # source://rbs//lib/rbs/errors.rb#420 - def decls; end - - # Returns the value of attribute name. - # - # source://rbs//lib/rbs/errors.rb#419 - def name; end -end - -# source://rbs//lib/rbs/errors.rb#292 -class RBS::DuplicatedInterfaceMethodDefinitionError < ::RBS::DefinitionError - include ::RBS::DetailedMessageable - - # @return [DuplicatedInterfaceMethodDefinitionError] a new instance of DuplicatedInterfaceMethodDefinitionError - # - # source://rbs//lib/rbs/errors.rb#299 - def initialize(type:, method_name:, member:); end - - # source://rbs//lib/rbs/errors.rb#307 - def location; end - - # Returns the value of attribute member. - # - # source://rbs//lib/rbs/errors.rb#297 - def member; end - - # Returns the value of attribute method_name. - # - # source://rbs//lib/rbs/errors.rb#296 - def method_name; end - - # source://rbs//lib/rbs/errors.rb#311 - def qualified_method_name; end - - # Returns the value of attribute type. - # - # source://rbs//lib/rbs/errors.rb#295 - def type; end - - # source://rbs//lib/rbs/errors.rb#320 - def type_name; end -end - -# source://rbs//lib/rbs/errors.rb#251 -class RBS::DuplicatedMethodDefinitionError < ::RBS::DefinitionError - include ::RBS::DetailedMessageable - - # @return [DuplicatedMethodDefinitionError] a new instance of DuplicatedMethodDefinitionError - # - # source://rbs//lib/rbs/errors.rb#258 - def initialize(type:, method_name:, members:); end - - # source://rbs//lib/rbs/errors.rb#283 - def location; end - - # Returns the value of attribute members. - # - # source://rbs//lib/rbs/errors.rb#256 - def members; end - - # Returns the value of attribute method_name. - # - # source://rbs//lib/rbs/errors.rb#255 - def method_name; end - - # source://rbs//lib/rbs/errors.rb#287 - def other_locations; end - - # source://rbs//lib/rbs/errors.rb#270 - def qualified_method_name; end - - # Returns the value of attribute type. - # - # source://rbs//lib/rbs/errors.rb#254 - def type; end - - # source://rbs//lib/rbs/errors.rb#279 - def type_name; end -end - -# source://rbs//lib/rbs/environment.rb#4 -class RBS::Environment - # @return [Environment] a new instance of Environment - # - # source://rbs//lib/rbs/environment.rb#145 - def initialize; end - - # source://rbs//lib/rbs/environment.rb#470 - def <<(decl); end - - # source://rbs//lib/rbs/environment.rb#807 - def absolute_type(resolver, map, type, context:); end - - # source://rbs//lib/rbs/environment.rb#802 - def absolute_type_name(resolver, map, type_name, context:); end - - # source://rbs//lib/rbs/environment.rb#476 - def add_signature(buffer:, directives:, decls:); end - - # source://rbs//lib/rbs/environment.rb#539 - def append_context(context, decl); end - - # source://rbs//lib/rbs/environment.rb#818 - def buffers; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/environment.rb#218 - def class_alias?(name); end - - # Returns the value of attribute class_alias_decls. - # - # source://rbs//lib/rbs/environment.rb#12 - def class_alias_decls; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/environment.rb#202 - def class_decl?(name); end - - # Returns the value of attribute class_decls. - # - # source://rbs//lib/rbs/environment.rb#7 - def class_decls; end - - # source://rbs//lib/rbs/environment.rb#226 - def class_entry(type_name); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/environment.rb#198 - def constant_decl?(name); end - - # Returns the value of attribute constant_decls. - # - # source://rbs//lib/rbs/environment.rb#10 - def constant_decls; end - - # source://rbs//lib/rbs/environment.rb#274 - def constant_entry(type_name); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/environment.rb#194 - def constant_name?(name); end - - # Returns the value of attribute declarations. - # - # source://rbs//lib/rbs/environment.rb#5 - def declarations; end - - # Returns the value of attribute global_decls. - # - # source://rbs//lib/rbs/environment.rb#11 - def global_decls; end - - # source://rbs//lib/rbs/environment.rb#373 - def insert_decl(decl, outer:, namespace:); end - - # source://rbs//lib/rbs/environment.rb#813 - def inspect; end - - # Returns the value of attribute interface_decls. - # - # source://rbs//lib/rbs/environment.rb#8 - def interface_decls; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/environment.rb#176 - def interface_name?(name); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/environment.rb#210 - def module_alias?(name); end - - # source://rbs//lib/rbs/environment.rb#266 - def module_class_entry(type_name); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/environment.rb#206 - def module_decl?(name); end - - # source://rbs//lib/rbs/environment.rb#235 - def module_entry(type_name); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/environment.rb#184 - def module_name?(name); end - - # source://rbs//lib/rbs/environment.rb#332 - def normalize_module_name(name); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/environment.rb#336 - def normalize_module_name?(name); end - - # source://rbs//lib/rbs/environment.rb#328 - def normalize_type_name(name); end - - # source://rbs//lib/rbs/environment.rb#297 - def normalize_type_name!(name); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/environment.rb#278 - def normalize_type_name?(name); end - - # source://rbs//lib/rbs/environment.rb#244 - def normalized_class_entry(type_name); end - - # source://rbs//lib/rbs/environment.rb#270 - def normalized_module_class_entry(type_name); end - - # source://rbs//lib/rbs/environment.rb#255 - def normalized_module_entry(type_name); end - - # source://rbs//lib/rbs/environment.rb#323 - def normalized_type_name!(name); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/environment.rb#310 - def normalized_type_name?(type_name); end - - # source://rbs//lib/rbs/environment.rb#548 - def resolve_declaration(resolver, map, decl, outer:, prefix:); end - - # source://rbs//lib/rbs/environment.rb#688 - def resolve_member(resolver, map, member, context:); end - - # source://rbs//lib/rbs/environment.rb#788 - def resolve_method_type(resolver, map, type, context:); end - - # source://rbs//lib/rbs/environment.rb#489 - def resolve_signature(resolver, table, dirs, decls, only: T.unsafe(nil)); end - - # source://rbs//lib/rbs/environment.rb#511 - def resolve_type_names(only: T.unsafe(nil)); end - - # source://rbs//lib/rbs/environment.rb#796 - def resolve_type_params(resolver, map, params, context:); end - - # source://rbs//lib/rbs/environment.rb#533 - def resolver_context(*nesting); end - - # Returns the value of attribute signatures. - # - # source://rbs//lib/rbs/environment.rb#14 - def signatures; end - - # Returns the value of attribute type_alias_decls. - # - # source://rbs//lib/rbs/environment.rb#9 - def type_alias_decls; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/environment.rb#180 - def type_alias_name?(name); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/environment.rb#188 - def type_name?(name); end - - # source://rbs//lib/rbs/environment.rb#822 - def unload(buffers); end - - # source://rbs//lib/rbs/environment.rb#483 - def validate_type_params; end - - private - - # source://rbs//lib/rbs/environment.rb#158 - def initialize_copy(other); end - - class << self - # source://rbs//lib/rbs/environment.rb#170 - def from_loader(loader); end - end -end - -# source://rbs//lib/rbs/environment.rb#130 -class RBS::Environment::ClassAliasEntry < ::RBS::Environment::SingleEntry; end - -# source://rbs//lib/rbs/environment.rb#100 -class RBS::Environment::ClassEntry < ::RBS::Environment::MultiEntry - # source://rbs//lib/rbs/environment.rb#101 - def primary; end -end - -# source://rbs//lib/rbs/environment.rb#139 -class RBS::Environment::ConstantEntry < ::RBS::Environment::SingleEntry; end - -# source://rbs//lib/rbs/environment.rb#16 -module RBS::Environment::ContextUtil - # source://rbs//lib/rbs/environment.rb#17 - def calculate_context(decls); end -end - -# source://rbs//lib/rbs/environment.rb#142 -class RBS::Environment::GlobalEntry < ::RBS::Environment::SingleEntry; end - -# source://rbs//lib/rbs/environment.rb#133 -class RBS::Environment::InterfaceEntry < ::RBS::Environment::SingleEntry; end - -# source://rbs//lib/rbs/environment.rb#127 -class RBS::Environment::ModuleAliasEntry < ::RBS::Environment::SingleEntry; end - -# source://rbs//lib/rbs/environment.rb#85 -class RBS::Environment::ModuleEntry < ::RBS::Environment::MultiEntry - # source://rbs//lib/rbs/environment.rb#92 - def primary; end - - # source://rbs//lib/rbs/environment.rb#86 - def self_types; end -end - -# source://rbs//lib/rbs/environment.rb#29 -class RBS::Environment::MultiEntry - # @return [MultiEntry] a new instance of MultiEntry - # - # source://rbs//lib/rbs/environment.rb#43 - def initialize(name:); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/environment.rb#70 - def compatible_params?(ps1, ps2); end - - # Returns the value of attribute decls. - # - # source://rbs//lib/rbs/environment.rb#41 - def decls; end - - # source://rbs//lib/rbs/environment.rb#48 - def insert(decl:, outer:); end - - # Returns the value of attribute name. - # - # source://rbs//lib/rbs/environment.rb#40 - def name; end - - # source://rbs//lib/rbs/environment.rb#80 - def primary; end - - # source://rbs//lib/rbs/environment.rb#76 - def type_params; end - - # source://rbs//lib/rbs/environment.rb#53 - def validate_type_params; end -end - -# source://rbs//lib/rbs/environment.rb#30 -class RBS::Environment::MultiEntry::D < ::Struct - include ::RBS::Environment::ContextUtil - - # source://rbs//lib/rbs/environment.rb#35 - def context; end - - def decl; end - def decl=(_); end - def outer; end - def outer=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://rbs//lib/rbs/environment.rb#109 -class RBS::Environment::SingleEntry - include ::RBS::Environment::ContextUtil - - # @return [SingleEntry] a new instance of SingleEntry - # - # source://rbs//lib/rbs/environment.rb#114 - def initialize(name:, decl:, outer:); end - - # source://rbs//lib/rbs/environment.rb#122 - def context; end - - # Returns the value of attribute decl. - # - # source://rbs//lib/rbs/environment.rb#112 - def decl; end - - # Returns the value of attribute name. - # - # source://rbs//lib/rbs/environment.rb#110 - def name; end - - # Returns the value of attribute outer. - # - # source://rbs//lib/rbs/environment.rb#111 - def outer; end -end - -# source://rbs//lib/rbs/environment.rb#136 -class RBS::Environment::TypeAliasEntry < ::RBS::Environment::SingleEntry; end - -# source://rbs//lib/rbs/environment/use_map.rb#5 -class RBS::Environment::UseMap - # @return [UseMap] a new instance of UseMap - # - # source://rbs//lib/rbs/environment/use_map.rb#30 - def initialize(table:); end - - # source://rbs//lib/rbs/environment/use_map.rb#36 - def build_map(clause); end - - # source://rbs//lib/rbs/environment/use_map.rb#72 - def resolve(type_name); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/environment/use_map.rb#53 - def resolve?(type_name); end - - # Returns the value of attribute use_dirs. - # - # source://rbs//lib/rbs/environment/use_map.rb#28 - def use_dirs; end -end - -# source://rbs//lib/rbs/environment/use_map.rb#6 -class RBS::Environment::UseMap::Table - # @return [Table] a new instance of Table - # - # source://rbs//lib/rbs/environment/use_map.rb#9 - def initialize; end - - # Returns the value of attribute children. - # - # source://rbs//lib/rbs/environment/use_map.rb#7 - def children; end - - # source://rbs//lib/rbs/environment/use_map.rb#14 - def compute_children; end - - # Returns the value of attribute known_types. - # - # source://rbs//lib/rbs/environment/use_map.rb#7 - def known_types; end -end - -# source://rbs//lib/rbs/environment_loader.rb#4 -class RBS::EnvironmentLoader - include ::RBS::FileFinder - - # @return [EnvironmentLoader] a new instance of EnvironmentLoader - # - # source://rbs//lib/rbs/environment_loader.rb#40 - def initialize(core_root: T.unsafe(nil), repository: T.unsafe(nil)); end - - # source://rbs//lib/rbs/environment_loader.rb#48 - def add(path: T.unsafe(nil), library: T.unsafe(nil), version: T.unsafe(nil), resolve_dependencies: T.unsafe(nil)); end - - # source://rbs//lib/rbs/environment_loader.rb#80 - def add_collection(lockfile); end - - # Returns the value of attribute core_root. - # - # source://rbs//lib/rbs/environment_loader.rb#20 - def core_root; end - - # Returns the value of attribute dirs. - # - # source://rbs//lib/rbs/environment_loader.rb#24 - def dirs; end - - # source://rbs//lib/rbs/environment_loader.rb#131 - def each_dir; end - - # source://rbs//lib/rbs/environment_loader.rb#154 - def each_signature; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/environment_loader.rb#104 - def has_library?(library:, version:); end - - # Returns the value of attribute libs. - # - # source://rbs//lib/rbs/environment_loader.rb#23 - def libs; end - - # source://rbs//lib/rbs/environment_loader.rb#112 - def load(env:); end - - # Returns the value of attribute repository. - # - # source://rbs//lib/rbs/environment_loader.rb#21 - def repository; end - - # source://rbs//lib/rbs/environment_loader.rb#65 - def resolve_dependencies(library:, version:); end - - class << self - # source://rbs//lib/rbs/environment_loader.rb#28 - def gem_sig_path(name, version); end - end -end - -# source://rbs//lib/rbs/environment_loader.rb#26 -RBS::EnvironmentLoader::DEFAULT_CORE_ROOT = T.let(T.unsafe(nil), Pathname) - -# source://rbs//lib/rbs/environment_loader.rb#17 -class RBS::EnvironmentLoader::Library < ::Struct; end - -# source://rbs//lib/rbs/environment_loader.rb#5 -class RBS::EnvironmentLoader::UnknownLibraryError < ::StandardError - # @return [UnknownLibraryError] a new instance of UnknownLibraryError - # - # source://rbs//lib/rbs/environment_loader.rb#8 - def initialize(lib:); end - - # Returns the value of attribute library. - # - # source://rbs//lib/rbs/environment_loader.rb#6 - def library; end -end - -# source://rbs//lib/rbs/environment_walker.rb#4 -class RBS::EnvironmentWalker - include ::TSort - - # @return [EnvironmentWalker] a new instance of EnvironmentWalker - # - # source://rbs//lib/rbs/environment_walker.rb#11 - def initialize(env:); end - - # source://rbs//lib/rbs/environment_walker.rb#16 - def builder; end - - # source://rbs//lib/rbs/environment_walker.rb#99 - def each_type_name(type, &block); end - - # source://rbs//lib/rbs/environment_walker.rb#105 - def each_type_node(type, &block); end - - # Returns the value of attribute env. - # - # source://rbs//lib/rbs/environment_walker.rb#9 - def env; end - - # source://rbs//lib/rbs/environment_walker.rb#20 - def only_ancestors!(only = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/environment_walker.rb#25 - def only_ancestors?; end - - # source://rbs//lib/rbs/environment_walker.rb#44 - def tsort_each_child(node, &block); end - - # source://rbs//lib/rbs/environment_walker.rb#31 - def tsort_each_node(&block); end -end - -# source://rbs//lib/rbs/environment_walker.rb#5 -class RBS::EnvironmentWalker::InstanceNode < ::Struct - def type_name; end - def type_name=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://rbs//lib/rbs/environment_walker.rb#6 -class RBS::EnvironmentWalker::SingletonNode < ::Struct - def type_name; end - def type_name=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://rbs//lib/rbs/environment_walker.rb#7 -class RBS::EnvironmentWalker::TypeNameNode < ::Struct - def type_name; end - def type_name=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://rbs//lib/rbs/factory.rb#4 -class RBS::Factory - # source://rbs//lib/rbs/factory.rb#5 - def type_name(string); end -end - -# source://rbs//lib/rbs/file_finder.rb#4 -module RBS::FileFinder - class << self - # source://rbs//lib/rbs/file_finder.rb#7 - def each_file(path, skip_hidden:, immediate: T.unsafe(nil), &block); end - end -end - -# source://rbs//lib/rbs/errors.rb#407 -class RBS::GenericParameterMismatchError < ::RBS::LoadingError - # @return [GenericParameterMismatchError] a new instance of GenericParameterMismatchError - # - # source://rbs//lib/rbs/errors.rb#411 - def initialize(name:, decl:); end - - # Returns the value of attribute decl. - # - # source://rbs//lib/rbs/errors.rb#409 - def decl; end - - # Returns the value of attribute name. - # - # source://rbs//lib/rbs/errors.rb#408 - def name; end -end - -# source://rbs//lib/rbs/errors.rb#553 -class RBS::InconsistentClassModuleAliasError < ::RBS::BaseError - include ::RBS::DetailedMessageable - - # @return [InconsistentClassModuleAliasError] a new instance of InconsistentClassModuleAliasError - # - # source://rbs//lib/rbs/errors.rb#558 - def initialize(entry); end - - # Returns the value of attribute alias_entry. - # - # source://rbs//lib/rbs/errors.rb#556 - def alias_entry; end - - # source://rbs//lib/rbs/errors.rb#572 - def location; end -end - -# source://rbs//lib/rbs/errors.rb#187 -class RBS::InheritModuleError < ::RBS::DefinitionError - include ::RBS::DetailedMessageable - - # @return [InheritModuleError] a new instance of InheritModuleError - # - # source://rbs//lib/rbs/errors.rb#192 - def initialize(super_decl); end - - # source://rbs//lib/rbs/errors.rb#198 - def location; end - - # Returns the value of attribute super_decl. - # - # source://rbs//lib/rbs/errors.rb#190 - def super_decl; end - - class << self - # source://rbs//lib/rbs/errors.rb#202 - def check!(super_decl, env:); end - end -end - -# source://rbs//lib/rbs/errors.rb#341 -class RBS::InstanceVariableDuplicationError < ::RBS::VariableDuplicationError - # source://rbs//lib/rbs/errors.rb#342 - def kind; end -end - -# source://rbs//lib/rbs/errors.rb#378 -class RBS::InvalidOverloadMethodError < ::RBS::DefinitionError - include ::RBS::DetailedMessageable - - # @return [InvalidOverloadMethodError] a new instance of InvalidOverloadMethodError - # - # source://rbs//lib/rbs/errors.rb#386 - def initialize(type_name:, method_name:, kind:, members:); end - - # Returns the value of attribute kind. - # - # source://rbs//lib/rbs/errors.rb#383 - def kind; end - - # source://rbs//lib/rbs/errors.rb#402 - def location; end - - # Returns the value of attribute members. - # - # source://rbs//lib/rbs/errors.rb#384 - def members; end - - # Returns the value of attribute method_name. - # - # source://rbs//lib/rbs/errors.rb#382 - def method_name; end - - # Returns the value of attribute type_name. - # - # source://rbs//lib/rbs/errors.rb#381 - def type_name; end -end - -# source://rbs//lib/rbs/errors.rb#67 -class RBS::InvalidTypeApplicationError < ::RBS::DefinitionError - # @return [InvalidTypeApplicationError] a new instance of InvalidTypeApplicationError - # - # source://rbs//lib/rbs/errors.rb#74 - def initialize(type_name:, args:, params:, location:); end - - # Returns the value of attribute args. - # - # source://rbs//lib/rbs/errors.rb#69 - def args; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/errors.rb#72 - def location; end - - # Returns the value of attribute params. - # - # source://rbs//lib/rbs/errors.rb#70 - def params; end - - # Returns the value of attribute type_name. - # - # source://rbs//lib/rbs/errors.rb#68 - def type_name; end - - # Returns the value of attribute type_params. - # - # source://rbs//lib/rbs/errors.rb#71 - def type_params; end - - class << self - # source://rbs//lib/rbs/errors.rb#83 - def check!(type_name:, args:, params:, location:); end - - # source://rbs//lib/rbs/errors.rb#92 - def check2!(env:, type_name:, args:, location:); end - end -end - -# source://rbs//lib/rbs/errors.rb#431 -class RBS::InvalidVarianceAnnotationError < ::RBS::DefinitionError - include ::RBS::DetailedMessageable - - # @return [InvalidVarianceAnnotationError] a new instance of InvalidVarianceAnnotationError - # - # source://rbs//lib/rbs/errors.rb#438 - def initialize(type_name:, param:, location:); end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/errors.rb#436 - def location; end - - # Returns the value of attribute param. - # - # source://rbs//lib/rbs/errors.rb#435 - def param; end - - # Returns the value of attribute type_name. - # - # source://rbs//lib/rbs/errors.rb#434 - def type_name; end -end - -# source://rbs//lib/rbs/errors.rb#20 -class RBS::LoadingError < ::RBS::BaseError; end - -# source://rbs//lib/rbs/location_aux.rb#4 -class RBS::Location - def initialize(_arg0, _arg1, _arg2); end - - # source://rbs//lib/rbs/location_aux.rb#71 - def ==(other); end - - def [](_arg0); end - def _add_optional_child(_arg0, _arg1, _arg2); end - def _add_optional_no_child(_arg0); end - def _add_required_child(_arg0, _arg1, _arg2); end - def _optional_keys; end - def _required_keys; end - - # source://rbs//lib/rbs/location_aux.rb#102 - def add_optional_child(name, range); end - - # source://rbs//lib/rbs/location_aux.rb#98 - def add_required_child(name, range); end - - def aref(_arg0); end - def buffer; end - - # source://rbs//lib/rbs/location_aux.rb#110 - def each_optional_key(&block); end - - # source://rbs//lib/rbs/location_aux.rb#118 - def each_required_key(&block); end - - # source://rbs//lib/rbs/location_aux.rb#47 - def end_column; end - - # source://rbs//lib/rbs/location_aux.rb#43 - def end_line; end - - # source://rbs//lib/rbs/location_aux.rb#55 - def end_loc; end - - def end_pos; end - - # source://rbs//lib/rbs/location_aux.rb#5 - def inspect; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/location_aux.rb#126 - def key?(name); end - - # source://rbs//lib/rbs/location_aux.rb#31 - def name; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/location_aux.rb#130 - def optional_key?(name); end - - # source://rbs//lib/rbs/location_aux.rb#59 - def range; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/location_aux.rb#134 - def required_key?(name); end - - # source://rbs//lib/rbs/location_aux.rb#63 - def source; end - - # source://rbs//lib/rbs/location_aux.rb#39 - def start_column; end - - # source://rbs//lib/rbs/location_aux.rb#35 - def start_line; end - - # source://rbs//lib/rbs/location_aux.rb#51 - def start_loc; end - - def start_pos; end - - # source://rbs//lib/rbs/location_aux.rb#78 - def to_json(state = T.unsafe(nil)); end - - # source://rbs//lib/rbs/location_aux.rb#67 - def to_s; end - - private - - def initialize_copy(_arg0); end - - class << self - # source://rbs//lib/rbs/location_aux.rb#16 - def new(buffer_ = T.unsafe(nil), start_pos_ = T.unsafe(nil), end_pos_ = T.unsafe(nil), buffer: T.unsafe(nil), start_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end - - # source://rbs//lib/rbs/location_aux.rb#94 - def to_string(location, default: T.unsafe(nil)); end - end -end - -# source://rbs//lib/rbs/location_aux.rb#29 -RBS::Location::WithChildren = RBS::Location - -# source://rbs//lib/rbs/locator.rb#4 -class RBS::Locator - # @return [Locator] a new instance of Locator - # - # source://rbs//lib/rbs/locator.rb#7 - def initialize(buffer:, dirs:, decls:); end - - # Returns the value of attribute buffer. - # - # source://rbs//lib/rbs/locator.rb#5 - def buffer; end - - # Returns the value of attribute decls. - # - # source://rbs//lib/rbs/locator.rb#5 - def decls; end - - # Returns the value of attribute dirs. - # - # source://rbs//lib/rbs/locator.rb#5 - def dirs; end - - # source://rbs//lib/rbs/locator.rb#13 - def find(line:, column:); end - - # source://rbs//lib/rbs/locator.rb#29 - def find2(line:, column:); end - - # source://rbs//lib/rbs/locator.rb#60 - def find_in_decl(pos, decl:, array:); end - - # source://rbs//lib/rbs/locator.rb#42 - def find_in_directive(pos, dir, array); end - - # source://rbs//lib/rbs/locator.rb#208 - def find_in_loc(pos, location:, array:); end - - # source://rbs//lib/rbs/locator.rb#131 - def find_in_member(pos, member:, array:); end - - # source://rbs//lib/rbs/locator.rb#154 - def find_in_method_type(pos, method_type:, array:); end - - # source://rbs//lib/rbs/locator.rb#192 - def find_in_type(pos, type:, array:); end - - # source://rbs//lib/rbs/locator.rb#172 - def find_in_type_param(pos, type_param:, array:); end - - # source://rbs//lib/rbs/locator.rb#235 - def test_loc(pos, location:); end -end - -# source://rbs//lib/rbs/errors.rb#4 -module RBS::MethodNameHelper - # source://rbs//lib/rbs/errors.rb#5 - def method_name_string; end -end - -# source://rbs//lib/rbs/method_type.rb#4 -class RBS::MethodType - # @return [MethodType] a new instance of MethodType - # - # source://rbs//lib/rbs/method_type.rb#10 - def initialize(type_params:, type:, block:, location:); end - - # source://rbs//lib/rbs/method_type.rb#17 - def ==(other); end - - # Returns the value of attribute block. - # - # source://rbs//lib/rbs/method_type.rb#7 - def block; end - - # source://rbs//lib/rbs/method_type.rb#86 - def each_type(&block); end - - # source://rbs//lib/rbs/method_type.rb#59 - def free_variables(set = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/method_type.rb#127 - def has_classish_type?; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/method_type.rb#123 - def has_self_type?; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/method_type.rb#8 - def location; end - - # source://rbs//lib/rbs/method_type.rb#65 - def map_type(&block); end - - # source://rbs//lib/rbs/method_type.rb#74 - def map_type_bound(&block); end - - # source://rbs//lib/rbs/method_type.rb#33 - def sub(s); end - - # source://rbs//lib/rbs/method_type.rb#24 - def to_json(state = T.unsafe(nil)); end - - # source://rbs//lib/rbs/method_type.rb#100 - def to_s; end - - # Returns the value of attribute type. - # - # source://rbs//lib/rbs/method_type.rb#6 - def type; end - - # source://rbs//lib/rbs/method_type.rb#119 - def type_param_names; end - - # Returns the value of attribute type_params. - # - # source://rbs//lib/rbs/method_type.rb#5 - def type_params; end - - # source://rbs//lib/rbs/method_type.rb#50 - def update(type_params: T.unsafe(nil), type: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/method_type.rb#131 - def with_nonreturn_void?; end -end - -# source://rbs//lib/rbs/errors.rb#467 -class RBS::MixinClassError < ::RBS::DefinitionError - include ::RBS::DetailedMessageable - - # @return [MixinClassError] a new instance of MixinClassError - # - # source://rbs//lib/rbs/errors.rb#473 - def initialize(type_name:, member:); end - - # source://rbs//lib/rbs/errors.rb#480 - def location; end - - # Returns the value of attribute member. - # - # source://rbs//lib/rbs/errors.rb#471 - def member; end - - # Returns the value of attribute type_name. - # - # source://rbs//lib/rbs/errors.rb#470 - def type_name; end - - private - - # source://rbs//lib/rbs/errors.rb#492 - def mixin_name; end - - class << self - # source://rbs//lib/rbs/errors.rb#484 - def check!(type_name:, env:, member:); end - end -end - -# source://rbs//lib/rbs/namespace.rb#4 -class RBS::Namespace - # @return [Namespace] a new instance of Namespace - # - # source://rbs//lib/rbs/namespace.rb#7 - def initialize(path:, absolute:); end - - # source://rbs//lib/rbs/namespace.rb#20 - def +(other); end - - # source://rbs//lib/rbs/namespace.rb#59 - def ==(other); end - - # source://rbs//lib/rbs/namespace.rb#47 - def absolute!; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/namespace.rb#39 - def absolute?; end - - # source://rbs//lib/rbs/namespace.rb#28 - def append(component); end - - # source://rbs//lib/rbs/namespace.rb#101 - def ascend; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/namespace.rb#55 - def empty?; end - - # source://rbs//lib/rbs/namespace.rb#59 - def eql?(other); end - - # source://rbs//lib/rbs/namespace.rb#65 - def hash; end - - # source://rbs//lib/rbs/namespace.rb#32 - def parent; end - - # Returns the value of attribute path. - # - # source://rbs//lib/rbs/namespace.rb#5 - def path; end - - # source://rbs//lib/rbs/namespace.rb#51 - def relative!; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/namespace.rb#43 - def relative?; end - - # source://rbs//lib/rbs/namespace.rb#69 - def split; end - - # source://rbs//lib/rbs/namespace.rb#75 - def to_s; end - - # source://rbs//lib/rbs/namespace.rb#84 - def to_type_name; end - - class << self - # source://rbs//lib/rbs/namespace.rb#12 - def empty; end - - # source://rbs//lib/rbs/namespace.rb#93 - def parse(string); end - - # source://rbs//lib/rbs/namespace.rb#16 - def root; end - end -end - -# source://rbs//lib/rbs/errors.rb#229 -class RBS::NoMixinFoundError < ::RBS::DefinitionError - include ::RBS::DetailedMessageable - - # @return [NoMixinFoundError] a new instance of NoMixinFoundError - # - # source://rbs//lib/rbs/errors.rb#235 - def initialize(type_name:, member:); end - - # source://rbs//lib/rbs/errors.rb#242 - def location; end - - # Returns the value of attribute member. - # - # source://rbs//lib/rbs/errors.rb#233 - def member; end - - # Returns the value of attribute type_name. - # - # source://rbs//lib/rbs/errors.rb#232 - def type_name; end - - class << self - # source://rbs//lib/rbs/errors.rb#246 - def check!(type_name, env:, member:); end - end -end - -# source://rbs//lib/rbs/errors.rb#210 -class RBS::NoSelfTypeFoundError < ::RBS::DefinitionError - include ::RBS::DetailedMessageable - - # @return [NoSelfTypeFoundError] a new instance of NoSelfTypeFoundError - # - # source://rbs//lib/rbs/errors.rb#216 - def initialize(type_name:, location:); end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/errors.rb#214 - def location; end - - # Returns the value of attribute type_name. - # - # source://rbs//lib/rbs/errors.rb#213 - def type_name; end - - class << self - # source://rbs//lib/rbs/errors.rb#223 - def check!(self_type, env:); end - end -end - -# source://rbs//lib/rbs/errors.rb#167 -class RBS::NoSuperclassFoundError < ::RBS::DefinitionError - # @return [NoSuperclassFoundError] a new instance of NoSuperclassFoundError - # - # source://rbs//lib/rbs/errors.rb#171 - def initialize(type_name:, location:); end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/errors.rb#169 - def location; end - - # Returns the value of attribute type_name. - # - # source://rbs//lib/rbs/errors.rb#168 - def type_name; end - - class << self - # source://rbs//lib/rbs/errors.rb#178 - def check!(type_name, env:, location:); end - end -end - -# source://rbs//lib/rbs/errors.rb#148 -class RBS::NoTypeFoundError < ::RBS::DefinitionError - include ::RBS::DetailedMessageable - - # @return [NoTypeFoundError] a new instance of NoTypeFoundError - # - # source://rbs//lib/rbs/errors.rb#154 - def initialize(type_name:, location:); end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/errors.rb#152 - def location; end - - # Returns the value of attribute type_name. - # - # source://rbs//lib/rbs/errors.rb#151 - def type_name; end - - class << self - # source://rbs//lib/rbs/errors.rb#161 - def check!(type_name, env:, location:); end - end -end - -# source://rbs//lib/rbs/errors.rb#524 -class RBS::NonregularTypeAliasError < ::RBS::BaseError - include ::RBS::DetailedMessageable - - # @return [NonregularTypeAliasError] a new instance of NonregularTypeAliasError - # - # source://rbs//lib/rbs/errors.rb#530 - def initialize(diagnostic:, location:); end - - # Returns the value of attribute diagnostic. - # - # source://rbs//lib/rbs/errors.rb#527 - def diagnostic; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/errors.rb#528 - def location; end -end - -# source://rbs//lib/rbs/parser/lex_result.rb#4 -class RBS::Parser - class << self - def _lex(_arg0, _arg1); end - def _parse_method_type(_arg0, _arg1, _arg2, _arg3, _arg4); end - def _parse_signature(_arg0, _arg1, _arg2); end - def _parse_type(_arg0, _arg1, _arg2, _arg3, _arg4); end - - # source://rbs//lib/rbs/parser_aux.rb#71 - def buffer(source); end - - # source://rbs//lib/rbs/parser_aux.rb#62 - def lex(source); end - - # source://rbs//lib/rbs/parser_aux.rb#38 - def magic_comment(buf); end - - # source://rbs//lib/rbs/parser_aux.rb#13 - def parse_method_type(source, range: T.unsafe(nil), variables: T.unsafe(nil), require_eof: T.unsafe(nil)); end - - # source://rbs//lib/rbs/parser_aux.rb#18 - def parse_signature(source); end - - # source://rbs//lib/rbs/parser_aux.rb#8 - def parse_type(source, range: T.unsafe(nil), variables: T.unsafe(nil), require_eof: T.unsafe(nil)); end - end -end - -# source://rbs//lib/rbs/parser_aux.rb#80 -RBS::Parser::KEYWORDS = T.let(T.unsafe(nil), Hash) - -# source://rbs//lib/rbs/parser/lex_result.rb#5 -class RBS::Parser::LexResult - # @return [LexResult] a new instance of LexResult - # - # source://rbs//lib/rbs/parser/lex_result.rb#9 - def initialize(buffer:, value:); end - - # Returns the value of attribute buffer. - # - # source://rbs//lib/rbs/parser/lex_result.rb#6 - def buffer; end - - # Returns the value of attribute value. - # - # source://rbs//lib/rbs/parser/lex_result.rb#7 - def value; end -end - -# source://rbs//lib/rbs/parser/token.rb#5 -class RBS::Parser::Token - # @return [Token] a new instance of Token - # - # source://rbs//lib/rbs/parser/token.rb#9 - def initialize(type:, location:); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/parser/token.rb#18 - def comment?; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/parser/token.rb#7 - def location; end - - # Returns the value of attribute type. - # - # source://rbs//lib/rbs/parser/token.rb#6 - def type; end - - # source://rbs//lib/rbs/parser/token.rb#14 - def value; end -end - -# source://rbs//lib/rbs/errors.rb#51 -class RBS::ParsingError < ::RBS::BaseError - include ::RBS::DetailedMessageable - - # @return [ParsingError] a new instance of ParsingError - # - # source://rbs//lib/rbs/errors.rb#58 - def initialize(location, error_message, token_type); end - - # Returns the value of attribute error_message. - # - # source://rbs//lib/rbs/errors.rb#55 - def error_message; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/errors.rb#54 - def location; end - - # Returns the value of attribute token_type. - # - # source://rbs//lib/rbs/errors.rb#56 - def token_type; end -end - -# source://rbs//lib/rbs/prototype/helpers.rb#4 -module RBS::Prototype; end - -# source://rbs//lib/rbs/prototype/helpers.rb#5 -module RBS::Prototype::Helpers - private - - # @return [Boolean] - # - # source://rbs//lib/rbs/prototype/helpers.rb#96 - def any_node?(node, nodes: T.unsafe(nil), &block); end - - # NOTE: args_node may be a nil by a bug - # https://bugs.ruby-lang.org/issues/17495 - # - # source://rbs//lib/rbs/prototype/helpers.rb#120 - def args_from_node(args_node); end - - # source://rbs//lib/rbs/prototype/helpers.rb#8 - def block_from_body(node); end - - # source://rbs//lib/rbs/prototype/helpers.rb#84 - def each_child(node, &block); end - - # source://rbs//lib/rbs/prototype/helpers.rb#88 - def each_node(nodes); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/prototype/helpers.rb#108 - def keyword_hash?(node); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/prototype/helpers.rb#124 - def symbol_literal_node?(node); end - - # source://rbs//lib/rbs/prototype/helpers.rb#135 - def untyped; end -end - -# source://rbs//lib/rbs/prototype/node_usage.rb#5 -class RBS::Prototype::NodeUsage - include ::RBS::Prototype::Helpers - - # @return [NodeUsage] a new instance of NodeUsage - # - # source://rbs//lib/rbs/prototype/node_usage.rb#10 - def initialize(node); end - - # source://rbs//lib/rbs/prototype/node_usage.rb#25 - def calculate(node, conditional:); end - - # Returns the value of attribute conditional_nodes. - # - # source://rbs//lib/rbs/prototype/node_usage.rb#8 - def conditional_nodes; end - - # source://rbs//lib/rbs/prototype/node_usage.rb#17 - def each_conditional_node(&block); end -end - -# source://rbs//lib/rbs/prototype/rb.rb#5 -class RBS::Prototype::RB - include ::RBS::Prototype::Helpers - - # @return [RB] a new instance of RB - # - # source://rbs//lib/rbs/prototype/rb.rb#45 - def initialize; end - - # source://rbs//lib/rbs/prototype/rb.rb#561 - def block_type(node); end - - # source://rbs//lib/rbs/prototype/rb.rb#541 - def body_type(node); end - - # source://rbs//lib/rbs/prototype/rb.rb#456 - def const_to_name(node, context:); end - - # source://rbs//lib/rbs/prototype/rb.rb#433 - def const_to_name!(node, context: T.unsafe(nil)); end - - # source://rbs//lib/rbs/prototype/rb.rb#772 - def current_accessibility(decls, index = T.unsafe(nil)); end - - # source://rbs//lib/rbs/prototype/rb.rb#49 - def decls; end - - # source://rbs//lib/rbs/prototype/rb.rb#812 - def find_def_index_by_name(decls, name); end - - # source://rbs//lib/rbs/prototype/rb.rb#536 - def function_return_type_from_body(node); end - - # source://rbs//lib/rbs/prototype/rb.rb#478 - def function_type_from_body(node, def_name); end - - # source://rbs//lib/rbs/prototype/rb.rb#554 - def if_unless_type(node); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/prototype/rb.rb#808 - def is_accessibility?(decl); end - - # source://rbs//lib/rbs/prototype/rb.rb#467 - def literal_to_symbol(node); end - - # source://rbs//lib/rbs/prototype/rb.rb#575 - def literal_to_type(node); end - - # backward compatible - # - # source://rbs//lib/rbs/prototype/rb.rb#719 - def node_type(node, default: T.unsafe(nil)); end - - # source://rbs//lib/rbs/prototype/rb.rb#719 - def param_type(node, default: T.unsafe(nil)); end - - # source://rbs//lib/rbs/prototype/rb.rb#75 - def parse(string); end - - # source://rbs//lib/rbs/prototype/rb.rb#764 - def private; end - - # source://rbs//lib/rbs/prototype/rb.rb#107 - def process(node, decls:, comments:, context:); end - - # source://rbs//lib/rbs/prototype/rb.rb#427 - def process_children(node, decls:, comments:, context:); end - - # source://rbs//lib/rbs/prototype/rb.rb#768 - def public; end - - # source://rbs//lib/rbs/prototype/rb.rb#699 - def range_element_type(types); end - - # source://rbs//lib/rbs/prototype/rb.rb#782 - def remove_unnecessary_accessibility_methods!(decls); end - - # source://rbs//lib/rbs/prototype/rb.rb#830 - def sort_members!(decls); end - - # Returns the value of attribute source_decls. - # - # source://rbs//lib/rbs/prototype/rb.rb#42 - def source_decls; end - - # Returns the value of attribute toplevel_members. - # - # source://rbs//lib/rbs/prototype/rb.rb#43 - def toplevel_members; end - - # source://rbs//lib/rbs/prototype/rb.rb#688 - def types_to_union_type(types); end -end - -# source://rbs//lib/rbs/prototype/rb.rb#8 -class RBS::Prototype::RB::Context < ::Struct - # source://rbs//lib/rbs/prototype/rb.rb#25 - def attribute_kind; end - - # source://rbs//lib/rbs/prototype/rb.rb#33 - def enter_namespace(namespace); end - - # source://rbs//lib/rbs/prototype/rb.rb#15 - def method_kind; end - - # source://rbs//lib/rbs/prototype/rb.rb#37 - def update(module_function: T.unsafe(nil), singleton: T.unsafe(nil), in_def: T.unsafe(nil)); end - - class << self - # source://rbs//lib/rbs/prototype/rb.rb#11 - def initial(namespace: T.unsafe(nil)); end - end -end - -# source://rbs//lib/rbs/prototype/rbi.rb#5 -class RBS::Prototype::RBI - include ::RBS::Prototype::Helpers - - # @return [RBI] a new instance of RBI - # - # source://rbs//lib/rbs/prototype/rbi.rb#12 - def initialize; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/prototype/rbi.rb#562 - def call_node?(node, name:, receiver: T.unsafe(nil), args: T.unsafe(nil)); end - - # source://rbs//lib/rbs/prototype/rbi.rb#566 - def const_to_name(node); end - - # source://rbs//lib/rbs/prototype/rbi.rb#90 - def current_module; end - - # source://rbs//lib/rbs/prototype/rbi.rb#94 - def current_module!; end - - # source://rbs//lib/rbs/prototype/rbi.rb#46 - def current_namespace; end - - # Returns the value of attribute decls. - # - # source://rbs//lib/rbs/prototype/rbi.rb#8 - def decls; end - - # source://rbs//lib/rbs/prototype/rbi.rb#602 - def each_arg(array, &block); end - - # source://rbs//lib/rbs/prototype/rbi.rb#616 - def each_child(node); end - - # source://rbs//lib/rbs/prototype/rbi.rb#112 - def join_comments(nodes, comments); end - - # Returns the value of attribute last_sig. - # - # source://rbs//lib/rbs/prototype/rbi.rb#10 - def last_sig; end - - # source://rbs//lib/rbs/prototype/rbi.rb#280 - def method_type(args_node, type_node, variables:, overloads:); end - - # Returns the value of attribute modules. - # - # source://rbs//lib/rbs/prototype/rbi.rb#9 - def modules; end - - # source://rbs//lib/rbs/prototype/rbi.rb#42 - def nested_name(name); end - - # source://rbs//lib/rbs/prototype/rbi.rb#624 - def node_to_hash(node); end - - # source://rbs//lib/rbs/prototype/rbi.rb#18 - def parse(string); end - - # source://rbs//lib/rbs/prototype/rbi.rb#352 - def parse_params(args_node, args, method_type, variables:, overloads:); end - - # source://rbs//lib/rbs/prototype/rbi.rb#106 - def pop_sig; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/prototype/rbi.rb#554 - def proc_type?(type_node); end - - # source://rbs//lib/rbs/prototype/rbi.rb#117 - def process(node, comments:, outer: T.unsafe(nil)); end - - # source://rbs//lib/rbs/prototype/rbi.rb#52 - def push_class(name, super_class, comment:); end - - # source://rbs//lib/rbs/prototype/rbi.rb#71 - def push_module(name, comment:); end - - # source://rbs//lib/rbs/prototype/rbi.rb#98 - def push_sig(node); end - - # source://rbs//lib/rbs/prototype/rbi.rb#477 - def type_of(type_node, variables:); end - - # source://rbs//lib/rbs/prototype/rbi.rb#490 - def type_of0(type_node, variables:); end -end - -# source://rbs//lib/rbs/prototype/runtime/helpers.rb#5 -class RBS::Prototype::Runtime - include ::RBS::Prototype::Helpers - include ::RBS::Prototype::Runtime::Helpers - - # @return [Runtime] a new instance of Runtime - # - # source://rbs//lib/rbs/prototype/runtime.rb#71 - def initialize(patterns:, env:, merge:, todo: T.unsafe(nil), owners_included: T.unsafe(nil)); end - - # source://rbs//lib/rbs/prototype/runtime.rb#654 - def block_from_ast_of(method); end - - # source://rbs//lib/rbs/prototype/runtime.rb#101 - def builder; end - - # source://rbs//lib/rbs/prototype/runtime.rb#109 - def decls; end - - # Generate/find outer module declarations - # This is broken down into another method to comply with `DRY` - # This generates/finds declarations in nested form & returns the last array of declarations - # - # source://rbs//lib/rbs/prototype/runtime.rb#583 - def ensure_outer_module_declarations(mod); end - - # Returns the value of attribute env. - # - # source://rbs//lib/rbs/prototype/runtime.rb#65 - def env; end - - # source://rbs//lib/rbs/prototype/runtime.rb#488 - def generate_class(mod); end - - # source://rbs//lib/rbs/prototype/runtime.rb#425 - def generate_constants(mod, decls); end - - # source://rbs//lib/rbs/prototype/runtime.rb#301 - def generate_methods(mod, module_name, members); end - - # source://rbs//lib/rbs/prototype/runtime.rb#565 - def generate_mixin(mod, decl, type_name, type_name_absolute); end - - # source://rbs//lib/rbs/prototype/runtime.rb#527 - def generate_module(mod); end - - # source://rbs//lib/rbs/prototype/runtime.rb#473 - def generate_super_class(mod); end - - # Returns the value of attribute merge. - # - # source://rbs//lib/rbs/prototype/runtime.rb#66 - def merge; end - - # source://rbs//lib/rbs/prototype/runtime.rb#240 - def merge_rbs(module_name, members, instance: T.unsafe(nil), singleton: T.unsafe(nil)); end - - # source://rbs//lib/rbs/prototype/runtime.rb#171 - def method_type(method); end - - # Returns the value of attribute outline. - # - # source://rbs//lib/rbs/prototype/runtime.rb#69 - def outline; end - - # Sets the attribute outline - # - # @param value the value to set the attribute outline to. - # - # source://rbs//lib/rbs/prototype/runtime.rb#69 - def outline=(_arg0); end - - # Returns the value of attribute owners_included. - # - # source://rbs//lib/rbs/prototype/runtime.rb#68 - def owners_included; end - - # source://rbs//lib/rbs/prototype/runtime.rb#105 - def parse(file); end - - # Returns the value of attribute patterns. - # - # source://rbs//lib/rbs/prototype/runtime.rb#64 - def patterns; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/prototype/runtime.rb#84 - def target?(const); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/prototype/runtime.rb#288 - def target_method?(mod, instance: T.unsafe(nil), singleton: T.unsafe(nil)); end - - # Returns the value of attribute todo. - # - # source://rbs//lib/rbs/prototype/runtime.rb#67 - def todo; end - - # source://rbs//lib/rbs/prototype/runtime.rb#97 - def todo_object; end - - # source://rbs//lib/rbs/prototype/runtime.rb#637 - def type_args(type_name); end - - # source://rbs//lib/rbs/prototype/runtime.rb#645 - def type_params(mod); end - - private - - # @return [Boolean] - # - # source://rbs//lib/rbs/prototype/runtime.rb#415 - def can_alias?(mod, method); end - - # source://rbs//lib/rbs/prototype/runtime.rb#129 - def each_mixined_module(type_name, mod); end - - # source://rbs//lib/rbs/prototype/runtime.rb#138 - def each_mixined_module_one(type_name, mod); end -end - -# source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#213 -class RBS::Prototype::Runtime::DataGenerator < ::RBS::Prototype::Runtime::ValueObjectBase - private - - # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#229 - def add_decl_members(decl); end - - # def self.new: (untyped foo, untyped bar) -> instance - # | (foo: untyped, bar: untyped) -> instance - # - # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#237 - def build_s_new; end - - # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#225 - def build_super_class; end - - class << self - # @return [Boolean] - # - # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#214 - def generatable?(target); end - end -end - -# source://rbs//lib/rbs/prototype/runtime/helpers.rb#6 -module RBS::Prototype::Runtime::Helpers - private - - # source://rbs//lib/rbs/prototype/runtime/helpers.rb#19 - def const_name(const); end - - # source://rbs//lib/rbs/prototype/runtime/helpers.rb#15 - def const_name!(const); end - - # Returns the exact name & not compactly declared name - # - # source://rbs//lib/rbs/prototype/runtime/helpers.rb#10 - def only_name(mod); end - - # source://rbs//lib/rbs/prototype/runtime/helpers.rb#37 - def to_type_name(name, full_name: T.unsafe(nil)); end - - # source://rbs//lib/rbs/prototype/runtime/helpers.rb#53 - def untyped; end -end - -# source://rbs//lib/rbs/prototype/runtime/reflection.rb#6 -module RBS::Prototype::Runtime::Reflection - class << self - # source://rbs//lib/rbs/prototype/runtime/reflection.rb#12 - def constants_of(mod, inherit = T.unsafe(nil)); end - - # source://rbs//lib/rbs/prototype/runtime/reflection.rb#7 - def object_class(value); end - end -end - -# source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#91 -class RBS::Prototype::Runtime::StructGenerator < ::RBS::Prototype::Runtime::ValueObjectBase - private - - # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#108 - def add_decl_members(decl); end - - # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#165 - def build_overload_for_keyword_arguments; end - - # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#151 - def build_overload_for_positional_arguments; end - - # def self.keyword_init?: () -> bool? - # - # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#180 - def build_s_keyword_init_p; end - - # def self.new: (?untyped foo, ?untyped bar) -> instance - # | (?foo: untyped, ?bar: untyped) -> instance - # - # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#117 - def build_s_new; end - - # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#104 - def build_super_class; end - - class << self - # @return [Boolean] - # - # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#92 - def generatable?(target); end - end -end - -# source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#102 -RBS::Prototype::Runtime::StructGenerator::CAN_CALL_KEYWORD_INIT_P = T.let(T.unsafe(nil), TrueClass) - -# source://rbs//lib/rbs/prototype/runtime.rb#10 -class RBS::Prototype::Runtime::Todo - # @return [Todo] a new instance of Todo - # - # source://rbs//lib/rbs/prototype/runtime.rb#11 - def initialize(builder:); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/prototype/runtime.rb#42 - def skip_constant?(module_name:, name:); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/prototype/runtime.rb#33 - def skip_instance_method?(module_name:, method:, accessibility:); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/prototype/runtime.rb#15 - def skip_mixin?(type_name:, module_name:, mixin_class:); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/prototype/runtime.rb#24 - def skip_singleton_method?(module_name:, method:, accessibility:); end - - private - - # source://rbs//lib/rbs/prototype/runtime.rb#49 - def mixin_decls(type_name); end -end - -# source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#8 -class RBS::Prototype::Runtime::ValueObjectBase - include ::RBS::Prototype::Runtime::Helpers - - # @return [ValueObjectBase] a new instance of ValueObjectBase - # - # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#11 - def initialize(target_class); end - - # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#15 - def build_decl; end - - private - - # attr_accessor foo: untyped - # - # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#74 - def build_member_accessors(ast_members_class); end - - # def self.members: () -> [ :foo, :bar ] - # def members: () -> [ :foo, :bar ] - # - # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#35 - def build_s_members; end -end - -# source://rbs//lib/rdoc_plugin/parser.rb#6 -module RBS::RDocPlugin; end - -# source://rbs//lib/rdoc_plugin/parser.rb#7 -class RBS::RDocPlugin::Parser - # @return [Parser] a new instance of Parser - # - # source://rbs//lib/rdoc_plugin/parser.rb#11 - def initialize(top_level, content); end - - # Returns the value of attribute content. - # - # source://rbs//lib/rdoc_plugin/parser.rb#9 - def content; end - - # Sets the attribute content - # - # @param value the value to set the attribute content to. - # - # source://rbs//lib/rdoc_plugin/parser.rb#9 - def content=(_arg0); end - - # source://rbs//lib/rdoc_plugin/parser.rb#94 - def parse_attr_decl(decl:, context:, outer_name: T.unsafe(nil)); end - - # source://rbs//lib/rdoc_plugin/parser.rb#53 - def parse_class_decl(decl:, context:, outer_name: T.unsafe(nil)); end - - # source://rbs//lib/rdoc_plugin/parser.rb#67 - def parse_constant_decl(decl:, context:, outer_name: T.unsafe(nil)); end - - # source://rbs//lib/rdoc_plugin/parser.rb#125 - def parse_extend_decl(decl:, context:, outer_name: T.unsafe(nil)); end - - # source://rbs//lib/rdoc_plugin/parser.rb#109 - def parse_include_decl(decl:, context:, outer_name: T.unsafe(nil)); end - - # source://rbs//lib/rdoc_plugin/parser.rb#24 - def parse_member(decl:, context:, outer_name: T.unsafe(nil)); end - - # source://rbs//lib/rdoc_plugin/parser.rb#88 - def parse_method_alias_decl(decl:, context:, outer_name: T.unsafe(nil)); end - - # source://rbs//lib/rdoc_plugin/parser.rb#73 - def parse_method_decl(decl:, context:, outer_name: T.unsafe(nil)); end - - # source://rbs//lib/rdoc_plugin/parser.rb#60 - def parse_module_decl(decl:, context:, outer_name: T.unsafe(nil)); end - - # source://rbs//lib/rdoc_plugin/parser.rb#16 - def scan; end - - # Returns the value of attribute top_level. - # - # source://rbs//lib/rdoc_plugin/parser.rb#9 - def top_level; end - - # Sets the attribute top_level - # - # @param value the value to set the attribute top_level to. - # - # source://rbs//lib/rdoc_plugin/parser.rb#9 - def top_level=(_arg0); end - - private - - # source://rbs//lib/rdoc_plugin/parser.rb#149 - def comment_string(with_comment); end - - # source://rbs//lib/rdoc_plugin/parser.rb#143 - def construct_comment(context:, comment:); end - - # source://rbs//lib/rdoc_plugin/parser.rb#154 - def fully_qualified_name(outer_name:, decl:); end -end - -# source://rbs//lib/rbs/errors.rb#447 -class RBS::RecursiveAliasDefinitionError < ::RBS::DefinitionError - include ::RBS::DetailedMessageable - - # @return [RecursiveAliasDefinitionError] a new instance of RecursiveAliasDefinitionError - # - # source://rbs//lib/rbs/errors.rb#453 - def initialize(type:, defs:); end - - # Returns the value of attribute defs. - # - # source://rbs//lib/rbs/errors.rb#451 - def defs; end - - # source://rbs//lib/rbs/errors.rb#460 - def location; end - - # Returns the value of attribute type. - # - # source://rbs//lib/rbs/errors.rb#450 - def type; end -end - -# source://rbs//lib/rbs/errors.rb#110 -class RBS::RecursiveAncestorError < ::RBS::DefinitionError - # @return [RecursiveAncestorError] a new instance of RecursiveAncestorError - # - # source://rbs//lib/rbs/errors.rb#114 - def initialize(ancestors:, location:); end - - # Returns the value of attribute ancestors. - # - # source://rbs//lib/rbs/errors.rb#111 - def ancestors; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/errors.rb#112 - def location; end - - class << self - # source://rbs//lib/rbs/errors.rb#134 - def check!(self_ancestor, ancestors:, location:); end - end -end - -# source://rbs//lib/rbs/errors.rb#506 -class RBS::RecursiveTypeAliasError < ::RBS::BaseError - include ::RBS::DetailedMessageable - - # @return [RecursiveTypeAliasError] a new instance of RecursiveTypeAliasError - # - # source://rbs//lib/rbs/errors.rb#512 - def initialize(alias_names:, location:); end - - # Returns the value of attribute alias_names. - # - # source://rbs//lib/rbs/errors.rb#509 - def alias_names; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/errors.rb#510 - def location; end - - # source://rbs//lib/rbs/errors.rb#519 - def name; end -end - -# source://rbs//lib/rbs/repository.rb#4 -class RBS::Repository - # @return [Repository] a new instance of Repository - # - # source://rbs//lib/rbs/repository.rb#74 - def initialize(no_stdlib: T.unsafe(nil)); end - - # source://rbs//lib/rbs/repository.rb#98 - def add(dir); end - - # Returns the value of attribute dirs. - # - # source://rbs//lib/rbs/repository.rb#71 - def dirs; end - - # Returns the value of attribute gems. - # - # source://rbs//lib/rbs/repository.rb#72 - def gems; end - - # source://rbs//lib/rbs/repository.rb#108 - def lookup(gem, version); end - - # source://rbs//lib/rbs/repository.rb#113 - def lookup_path(gem, version); end - - class << self - # source://rbs//lib/rbs/repository.rb#83 - def default; end - - # source://rbs//lib/rbs/repository.rb#87 - def find_best_version(version, candidates); end - end -end - -# source://rbs//lib/rbs/repository.rb#5 -RBS::Repository::DEFAULT_STDLIB_ROOT = T.let(T.unsafe(nil), Pathname) - -# source://rbs//lib/rbs/repository.rb#7 -class RBS::Repository::GemRBS - # @return [GemRBS] a new instance of GemRBS - # - # source://rbs//lib/rbs/repository.rb#11 - def initialize(name:); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/repository.rb#64 - def empty?; end - - # source://rbs//lib/rbs/repository.rb#59 - def find_best_version(version); end - - # source://rbs//lib/rbs/repository.rb#54 - def latest_version; end - - # source://rbs//lib/rbs/repository.rb#22 - def load!; end - - # Returns the value of attribute name. - # - # source://rbs//lib/rbs/repository.rb#8 - def name; end - - # source://rbs//lib/rbs/repository.rb#49 - def oldest_version; end - - # Returns the value of attribute paths. - # - # source://rbs//lib/rbs/repository.rb#9 - def paths; end - - # source://rbs//lib/rbs/repository.rb#45 - def version_names; end - - # source://rbs//lib/rbs/repository.rb#17 - def versions; end -end - -# source://rbs//lib/rbs/repository.rb#69 -class RBS::Repository::VersionPath < ::Struct - def gem; end - def gem=(_); end - def path; end - def path=(_); end - def version; end - def version=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://rbs//lib/rbs/resolver/constant_resolver.rb#4 -module RBS::Resolver; end - -# source://rbs//lib/rbs/resolver/constant_resolver.rb#5 -class RBS::Resolver::ConstantResolver - # @return [ConstantResolver] a new instance of ConstantResolver - # - # source://rbs//lib/rbs/resolver/constant_resolver.rb#88 - def initialize(builder:); end - - # Returns the value of attribute builder. - # - # source://rbs//lib/rbs/resolver/constant_resolver.rb#85 - def builder; end - - # Returns the value of attribute child_constants_cache. - # - # source://rbs//lib/rbs/resolver/constant_resolver.rb#86 - def child_constants_cache; end - - # source://rbs//lib/rbs/resolver/constant_resolver.rb#112 - def children(module_name); end - - # source://rbs//lib/rbs/resolver/constant_resolver.rb#100 - def constants(context); end - - # source://rbs//lib/rbs/resolver/constant_resolver.rb#178 - def constants_from_ancestors(module_name, constants:); end - - # source://rbs//lib/rbs/resolver/constant_resolver.rb#163 - def constants_from_context(context, constants:); end - - # source://rbs//lib/rbs/resolver/constant_resolver.rb#201 - def constants_itself(context, constants:); end - - # Returns the value of attribute context_constants_cache. - # - # source://rbs//lib/rbs/resolver/constant_resolver.rb#86 - def context_constants_cache; end - - # source://rbs//lib/rbs/resolver/constant_resolver.rb#138 - def load_child_constants(name); end - - # source://rbs//lib/rbs/resolver/constant_resolver.rb#122 - def load_context_constants(context); end - - # source://rbs//lib/rbs/resolver/constant_resolver.rb#95 - def resolve(name, context:); end - - # source://rbs//lib/rbs/resolver/constant_resolver.rb#108 - def resolve_child(module_name, name); end - - # Returns the value of attribute table. - # - # source://rbs//lib/rbs/resolver/constant_resolver.rb#85 - def table; end -end - -# source://rbs//lib/rbs/resolver/constant_resolver.rb#6 -class RBS::Resolver::ConstantResolver::Table - # @return [Table] a new instance of Table - # - # source://rbs//lib/rbs/resolver/constant_resolver.rb#10 - def initialize(environment); end - - # source://rbs//lib/rbs/resolver/constant_resolver.rb#63 - def children(name); end - - # Returns the value of attribute children_table. - # - # source://rbs//lib/rbs/resolver/constant_resolver.rb#7 - def children_table; end - - # source://rbs//lib/rbs/resolver/constant_resolver.rb#67 - def constant(name); end - - # source://rbs//lib/rbs/resolver/constant_resolver.rb#80 - def constant_of_constant(name, entry); end - - # source://rbs//lib/rbs/resolver/constant_resolver.rb#71 - def constant_of_module(name, entry); end - - # Returns the value of attribute constants_table. - # - # source://rbs//lib/rbs/resolver/constant_resolver.rb#8 - def constants_table; end - - # Returns the value of attribute toplevel. - # - # source://rbs//lib/rbs/resolver/constant_resolver.rb#7 - def toplevel; end -end - -# source://rbs//lib/rbs/resolver/type_name_resolver.rb#5 -class RBS::Resolver::TypeNameResolver - # @return [TypeNameResolver] a new instance of TypeNameResolver - # - # source://rbs//lib/rbs/resolver/type_name_resolver.rb#10 - def initialize(env); end - - # Returns the value of attribute all_names. - # - # source://rbs//lib/rbs/resolver/type_name_resolver.rb#6 - def all_names; end - - # Returns the value of attribute cache. - # - # source://rbs//lib/rbs/resolver/type_name_resolver.rb#7 - def cache; end - - # Returns the value of attribute env. - # - # source://rbs//lib/rbs/resolver/type_name_resolver.rb#8 - def env; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/resolver/type_name_resolver.rb#84 - def has_name?(full_name); end - - # source://rbs//lib/rbs/resolver/type_name_resolver.rb#51 - def partition(type_name); end - - # source://rbs//lib/rbs/resolver/type_name_resolver.rb#28 - def resolve(type_name, context:); end - - # source://rbs//lib/rbs/resolver/type_name_resolver.rb#69 - def resolve_in(head, context); end - - # source://rbs//lib/rbs/resolver/type_name_resolver.rb#21 - def try_cache(query); end -end - -# source://rbs//lib/rbs/substitution.rb#4 -class RBS::Substitution - # @return [Substitution] a new instance of Substitution - # - # source://rbs//lib/rbs/substitution.rb#12 - def initialize; end - - # source://rbs//lib/rbs/substitution.rb#66 - def +(other); end - - # source://rbs//lib/rbs/substitution.rb#37 - def [](ty); end - - # source://rbs//lib/rbs/substitution.rb#16 - def add(from:, to:); end - - # source://rbs//lib/rbs/substitution.rb#37 - def apply(ty); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/substitution.rb#8 - def empty?; end - - # Returns the value of attribute instance_type. - # - # source://rbs//lib/rbs/substitution.rb#6 - def instance_type; end - - # Sets the attribute instance_type - # - # @param value the value to set the attribute instance_type to. - # - # source://rbs//lib/rbs/substitution.rb#6 - def instance_type=(_arg0); end - - # Returns the value of attribute mapping. - # - # source://rbs//lib/rbs/substitution.rb#5 - def mapping; end - - # source://rbs//lib/rbs/substitution.rb#55 - def without(*vars); end - - class << self - # source://rbs//lib/rbs/substitution.rb#20 - def build(variables, types, instance_type: T.unsafe(nil), &block); end - end -end - -# source://rbs//lib/rbs/subtractor.rb#4 -class RBS::Subtractor - # @return [Subtractor] a new instance of Subtractor - # - # source://rbs//lib/rbs/subtractor.rb#5 - def initialize(minuend, subtrahend); end - - # source://rbs//lib/rbs/subtractor.rb#10 - def call(minuend = T.unsafe(nil), context: T.unsafe(nil)); end - - private - - # source://rbs//lib/rbs/subtractor.rb#177 - def absolute_typename(name, context:); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/subtractor.rb#160 - def access_modifier?(decl); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/subtractor.rb#118 - def cvar_exist?(owner, name); end - - # source://rbs//lib/rbs/subtractor.rb#127 - def each_member(owner, &block); end - - # source://rbs//lib/rbs/subtractor.rb#48 - def filter_members(decl, context:); end - - # source://rbs//lib/rbs/subtractor.rb#148 - def filter_redundant_access_modifiers(decls); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/subtractor.rb#106 - def ivar_exist?(owner, name, kind); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/subtractor.rb#60 - def member_exist?(owner, member, context:); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/subtractor.rb#89 - def method_exist?(owner, method_name, kind); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/subtractor.rb#137 - def mixin_exist?(owner, mixin, context:); end - - # source://rbs//lib/rbs/subtractor.rb#186 - def typename_candidates(name, context:); end - - # source://rbs//lib/rbs/subtractor.rb#164 - def update_decl(decl, members:); end -end - -# source://rbs//lib/rbs/errors.rb#367 -class RBS::SuperclassMismatchError < ::RBS::DefinitionError - # @return [SuperclassMismatchError] a new instance of SuperclassMismatchError - # - # source://rbs//lib/rbs/errors.rb#371 - def initialize(name:, entry:); end - - # Returns the value of attribute entry. - # - # source://rbs//lib/rbs/errors.rb#369 - def entry; end - - # Returns the value of attribute name. - # - # source://rbs//lib/rbs/errors.rb#368 - def name; end -end - -# source://rbs//lib/rbs/type_alias_dependency.rb#4 -class RBS::TypeAliasDependency - # @return [TypeAliasDependency] a new instance of TypeAliasDependency - # - # source://rbs//lib/rbs/type_alias_dependency.rb#14 - def initialize(env:); end - - # source://rbs//lib/rbs/type_alias_dependency.rb#27 - def build_dependencies; end - - # Check if an alias type definition is circular & prohibited - # - # @return [Boolean] - # - # source://rbs//lib/rbs/type_alias_dependency.rb#19 - def circular_definition?(alias_name); end - - # A hash which stores the transitive closure - # of the directed graph - # - # source://rbs//lib/rbs/type_alias_dependency.rb#12 - def dependencies; end - - # source://rbs//lib/rbs/type_alias_dependency.rb#57 - def dependencies_of(name); end - - # Direct dependencies corresponds to a directed graph - # with vertices as types and directions based on assignment of types - # - # source://rbs//lib/rbs/type_alias_dependency.rb#9 - def direct_dependencies; end - - # source://rbs//lib/rbs/type_alias_dependency.rb#52 - def direct_dependencies_of(name); end - - # Returns the value of attribute env. - # - # source://rbs//lib/rbs/type_alias_dependency.rb#5 - def env; end - - # source://rbs//lib/rbs/type_alias_dependency.rb#43 - def transitive_closure; end - - private - - # Recursive function to construct transitive closure - # - # source://rbs//lib/rbs/type_alias_dependency.rb#81 - def dependency(start, vertex, nested = T.unsafe(nil)); end - - # Constructs directed graph recursively - # - # source://rbs//lib/rbs/type_alias_dependency.rb#65 - def direct_dependency(type, result = T.unsafe(nil)); end -end - -# source://rbs//lib/rbs/type_alias_regularity.rb#4 -class RBS::TypeAliasRegularity - # @return [TypeAliasRegularity] a new instance of TypeAliasRegularity - # - # source://rbs//lib/rbs/type_alias_regularity.rb#16 - def initialize(env:); end - - # source://rbs//lib/rbs/type_alias_regularity.rb#61 - def build_alias_type(name); end - - # Returns the value of attribute builder. - # - # source://rbs//lib/rbs/type_alias_regularity.rb#14 - def builder; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/type_alias_regularity.rb#69 - def compatible_args?(args1, args2); end - - # Returns the value of attribute diagnostics. - # - # source://rbs//lib/rbs/type_alias_regularity.rb#14 - def diagnostics; end - - # source://rbs//lib/rbs/type_alias_regularity.rb#110 - def each_alias_type(type, &block); end - - # source://rbs//lib/rbs/type_alias_regularity.rb#83 - def each_mutual_alias_defs(&block); end - - # Returns the value of attribute env. - # - # source://rbs//lib/rbs/type_alias_regularity.rb#14 - def env; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/type_alias_regularity.rb#79 - def nonregular?(type_name); end - - # source://rbs//lib/rbs/type_alias_regularity.rb#22 - def validate; end - - # source://rbs//lib/rbs/type_alias_regularity.rb#39 - def validate_alias_type(alias_type, names, types); end - - class << self - # source://rbs//lib/rbs/type_alias_regularity.rb#120 - def validate(env:); end - end -end - -# source://rbs//lib/rbs/type_alias_regularity.rb#5 -class RBS::TypeAliasRegularity::Diagnostic - # @return [Diagnostic] a new instance of Diagnostic - # - # source://rbs//lib/rbs/type_alias_regularity.rb#8 - def initialize(type_name:, nonregular_type:); end - - # Returns the value of attribute nonregular_type. - # - # source://rbs//lib/rbs/type_alias_regularity.rb#6 - def nonregular_type; end - - # Returns the value of attribute type_name. - # - # source://rbs//lib/rbs/type_alias_regularity.rb#6 - def type_name; end -end - -# source://rbs//lib/rbs/type_name.rb#4 -class RBS::TypeName - # @return [TypeName] a new instance of TypeName - # - # source://rbs//lib/rbs/type_name.rb#9 - def initialize(namespace:, name:); end - - # source://rbs//lib/rbs/type_name.rb#79 - def +(other); end - - # source://rbs//lib/rbs/type_name.rb#25 - def ==(other); end - - # source://rbs//lib/rbs/type_name.rb#55 - def absolute!; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/type_name.rb#59 - def absolute?; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/type_name.rb#51 - def alias?; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/type_name.rb#47 - def class?; end - - # source://rbs//lib/rbs/type_name.rb#25 - def eql?(other); end - - # source://rbs//lib/rbs/type_name.rb#31 - def hash; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/type_name.rb#67 - def interface?; end - - # Returns the value of attribute kind. - # - # source://rbs//lib/rbs/type_name.rb#7 - def kind; end - - # Returns the value of attribute name. - # - # source://rbs//lib/rbs/type_name.rb#6 - def name; end - - # Returns the value of attribute namespace. - # - # source://rbs//lib/rbs/type_name.rb#5 - def namespace; end - - # source://rbs//lib/rbs/type_name.rb#63 - def relative!; end - - # source://rbs//lib/rbs/type_name.rb#75 - def split; end - - # source://rbs//lib/rbs/type_name.rb#39 - def to_json(state = T.unsafe(nil)); end - - # source://rbs//lib/rbs/type_name.rb#43 - def to_namespace; end - - # source://rbs//lib/rbs/type_name.rb#35 - def to_s; end - - # source://rbs//lib/rbs/type_name.rb#71 - def with_prefix(namespace); end - - class << self - # source://rbs//lib/rbs/type_name.rb#90 - def parse(string); end - end -end - -# source://rbs//lib/rbs/errors.rb#604 -class RBS::TypeParamDefaultReferenceError < ::RBS::DefinitionError - include ::RBS::DetailedMessageable - - # @return [TypeParamDefaultReferenceError] a new instance of TypeParamDefaultReferenceError - # - # source://rbs//lib/rbs/errors.rb#610 - def initialize(type_param, location:); end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/errors.rb#608 - def location; end - - # Returns the value of attribute type_param. - # - # source://rbs//lib/rbs/errors.rb#607 - def type_param; end - - class << self - # source://rbs//lib/rbs/errors.rb#616 - def check!(type_params); end - end -end - -# source://rbs//lib/rbs/types.rb#4 -module RBS::Types; end - -# source://rbs//lib/rbs/types.rb#400 -class RBS::Types::Alias - include ::RBS::Types::Application - - # @return [Alias] a new instance of Alias - # - # source://rbs//lib/rbs/types.rb#405 - def initialize(name:, args:, location:); end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/types.rb#401 - def location; end - - # source://rbs//lib/rbs/types.rb#429 - def map_type(&block); end - - # source://rbs//lib/rbs/types.rb#421 - def map_type_name(&block); end - - # source://rbs//lib/rbs/types.rb#415 - def sub(s); end - - # source://rbs//lib/rbs/types.rb#411 - def to_json(state = T.unsafe(nil)); end -end - -# source://rbs//lib/rbs/types.rb#254 -module RBS::Types::Application - # source://rbs//lib/rbs/types.rb#258 - def ==(other); end - - # Returns the value of attribute args. - # - # source://rbs//lib/rbs/types.rb#256 - def args; end - - # source://rbs//lib/rbs/types.rb#284 - def each_type(&block); end - - # source://rbs//lib/rbs/types.rb#258 - def eql?(other); end - - # source://rbs//lib/rbs/types.rb#268 - def free_variables(set = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#296 - def has_classish_type?; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#292 - def has_self_type?; end - - # source://rbs//lib/rbs/types.rb#264 - def hash; end - - # Returns the value of attribute name. - # - # source://rbs//lib/rbs/types.rb#255 - def name; end - - # source://rbs//lib/rbs/types.rb#276 - def to_s(level = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#300 - def with_nonreturn_void?; end -end - -# source://rbs//lib/rbs/types.rb#41 -module RBS::Types::Bases; end - -# source://rbs//lib/rbs/types.rb#109 -class RBS::Types::Bases::Any < ::RBS::Types::Bases::Base - # @return [Any] a new instance of Any - # - # source://rbs//lib/rbs/types.rb#110 - def initialize(location:, todo: T.unsafe(nil)); end - - # source://rbs//lib/rbs/types.rb#117 - def to_s(level = T.unsafe(nil)); end -end - -# source://rbs//lib/rbs/types.rb#42 -class RBS::Types::Bases::Base - include ::RBS::Types::NoFreeVariables - include ::RBS::Types::NoSubst - include ::RBS::Types::EmptyEachType - include ::RBS::Types::NoTypeName - - # @return [Base] a new instance of Base - # - # source://rbs//lib/rbs/types.rb#45 - def initialize(location:); end - - # source://rbs//lib/rbs/types.rb#49 - def ==(other); end - - # source://rbs//lib/rbs/types.rb#49 - def eql?(other); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#98 - def has_classish_type?; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#94 - def has_self_type?; end - - # source://rbs//lib/rbs/types.rb#53 - def hash; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/types.rb#43 - def location; end - - # source://rbs//lib/rbs/types.rb#64 - def to_json(state = T.unsafe(nil)); end - - # source://rbs//lib/rbs/types.rb#69 - def to_s(level = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#102 - def with_nonreturn_void?; end -end - -# source://rbs//lib/rbs/types.rb#107 -class RBS::Types::Bases::Bool < ::RBS::Types::Bases::Base; end - -# source://rbs//lib/rbs/types.rb#123 -class RBS::Types::Bases::Bottom < ::RBS::Types::Bases::Base; end - -# source://rbs//lib/rbs/types.rb#130 -class RBS::Types::Bases::Class < ::RBS::Types::Bases::Base; end - -# source://rbs//lib/rbs/types.rb#125 -class RBS::Types::Bases::Instance < ::RBS::Types::Bases::Base - # source://rbs//lib/rbs/types.rb#126 - def sub(s); end -end - -# source://rbs//lib/rbs/types.rb#121 -class RBS::Types::Bases::Nil < ::RBS::Types::Bases::Base; end - -# source://rbs//lib/rbs/types.rb#124 -class RBS::Types::Bases::Self < ::RBS::Types::Bases::Base; end - -# source://rbs//lib/rbs/types.rb#122 -class RBS::Types::Bases::Top < ::RBS::Types::Bases::Base; end - -# source://rbs//lib/rbs/types.rb#108 -class RBS::Types::Bases::Void < ::RBS::Types::Bases::Base; end - -# source://rbs//lib/rbs/types.rb#1338 -class RBS::Types::Block - # @return [Block] a new instance of Block - # - # source://rbs//lib/rbs/types.rb#1343 - def initialize(type:, required:, self_type: T.unsafe(nil)); end - - # source://rbs//lib/rbs/types.rb#1349 - def ==(other); end - - # source://rbs//lib/rbs/types.rb#1374 - def map_type(&block); end - - # Returns the value of attribute required. - # - # source://rbs//lib/rbs/types.rb#1340 - def required; end - - # Returns the value of attribute self_type. - # - # source://rbs//lib/rbs/types.rb#1341 - def self_type; end - - # source://rbs//lib/rbs/types.rb#1364 - def sub(s); end - - # source://rbs//lib/rbs/types.rb#1356 - def to_json(state = T.unsafe(nil)); end - - # Returns the value of attribute type. - # - # source://rbs//lib/rbs/types.rb#1339 - def type; end -end - -# source://rbs//lib/rbs/types.rb#356 -class RBS::Types::ClassInstance - include ::RBS::Types::Application - - # @return [ClassInstance] a new instance of ClassInstance - # - # source://rbs//lib/rbs/types.rb#361 - def initialize(name:, args:, location:); end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/types.rb#357 - def location; end - - # source://rbs//lib/rbs/types.rb#387 - def map_type(&block); end - - # source://rbs//lib/rbs/types.rb#379 - def map_type_name(&block); end - - # source://rbs//lib/rbs/types.rb#371 - def sub(s); end - - # source://rbs//lib/rbs/types.rb#367 - def to_json(state = T.unsafe(nil)); end -end - -# source://rbs//lib/rbs/types.rb#202 -class RBS::Types::ClassSingleton - include ::RBS::Types::NoFreeVariables - include ::RBS::Types::NoSubst - include ::RBS::Types::EmptyEachType - - # @return [ClassSingleton] a new instance of ClassSingleton - # - # source://rbs//lib/rbs/types.rb#206 - def initialize(name:, location:); end - - # source://rbs//lib/rbs/types.rb#211 - def ==(other); end - - # source://rbs//lib/rbs/types.rb#211 - def eql?(other); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#245 - def has_classish_type?; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#241 - def has_self_type?; end - - # source://rbs//lib/rbs/types.rb#217 - def hash; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/types.rb#204 - def location; end - - # source://rbs//lib/rbs/types.rb#234 - def map_type_name(&_arg0); end - - # Returns the value of attribute name. - # - # source://rbs//lib/rbs/types.rb#203 - def name; end - - # source://rbs//lib/rbs/types.rb#224 - def to_json(state = T.unsafe(nil)); end - - # source://rbs//lib/rbs/types.rb#228 - def to_s(level = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#249 - def with_nonreturn_void?; end -end - -# source://rbs//lib/rbs/types.rb#23 -module RBS::Types::EmptyEachType - # source://rbs//lib/rbs/types.rb#24 - def each_type; end - - # source://rbs//lib/rbs/types.rb#32 - def map_type(&block); end -end - -# source://rbs//lib/rbs/types.rb#905 -class RBS::Types::Function - # @return [Function] a new instance of Function - # - # source://rbs//lib/rbs/types.rb#961 - def initialize(required_positionals:, optional_positionals:, rest_positionals:, trailing_positionals:, required_keywords:, optional_keywords:, rest_keywords:, return_type:); end - - # source://rbs//lib/rbs/types.rb#972 - def ==(other); end - - # source://rbs//lib/rbs/types.rb#1043 - def amap(array, &block); end - - # source://rbs//lib/rbs/types.rb#1182 - def drop_head; end - - # source://rbs//lib/rbs/types.rb#1199 - def drop_tail; end - - # source://rbs//lib/rbs/types.rb#1080 - def each_param(&block); end - - # source://rbs//lib/rbs/types.rb#1065 - def each_type; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#1153 - def empty?; end - - # source://rbs//lib/rbs/types.rb#972 - def eql?(other); end - - # source://rbs//lib/rbs/types.rb#998 - def free_variables(set = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#1224 - def has_classish_type?; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#1212 - def has_keyword?; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#1220 - def has_self_type?; end - - # source://rbs//lib/rbs/types.rb#986 - def hash; end - - # source://rbs//lib/rbs/types.rb#1051 - def hmapv(hash, &block); end - - # source://rbs//lib/rbs/types.rb#1026 - def map_type(&block); end - - # source://rbs//lib/rbs/types.rb#1059 - def map_type_name(&block); end - - # Returns the value of attribute optional_keywords. - # - # source://rbs//lib/rbs/types.rb#957 - def optional_keywords; end - - # Returns the value of attribute optional_positionals. - # - # source://rbs//lib/rbs/types.rb#953 - def optional_positionals; end - - # source://rbs//lib/rbs/types.rb#1163 - def param_to_s; end - - # Returns the value of attribute required_keywords. - # - # source://rbs//lib/rbs/types.rb#956 - def required_keywords; end - - # Returns the value of attribute required_positionals. - # - # source://rbs//lib/rbs/types.rb#952 - def required_positionals; end - - # Returns the value of attribute rest_keywords. - # - # source://rbs//lib/rbs/types.rb#958 - def rest_keywords; end - - # Returns the value of attribute rest_positionals. - # - # source://rbs//lib/rbs/types.rb#954 - def rest_positionals; end - - # source://rbs//lib/rbs/types.rb#1178 - def return_to_s; end - - # Returns the value of attribute return_type. - # - # source://rbs//lib/rbs/types.rb#959 - def return_type; end - - # source://rbs//lib/rbs/types.rb#1107 - def sub(s); end - - # source://rbs//lib/rbs/types.rb#1094 - def to_json(state = T.unsafe(nil)); end - - # Returns the value of attribute trailing_positionals. - # - # source://rbs//lib/rbs/types.rb#955 - def trailing_positionals; end - - # source://rbs//lib/rbs/types.rb#1139 - def update(required_positionals: T.unsafe(nil), optional_positionals: T.unsafe(nil), rest_positionals: T.unsafe(nil), trailing_positionals: T.unsafe(nil), required_keywords: T.unsafe(nil), optional_keywords: T.unsafe(nil), rest_keywords: T.unsafe(nil), return_type: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#1228 - def with_nonreturn_void?; end - - # source://rbs//lib/rbs/types.rb#1126 - def with_return_type(type); end - - class << self - # source://rbs//lib/rbs/types.rb#1113 - def empty(return_type); end - end -end - -# source://rbs//lib/rbs/types.rb#906 -class RBS::Types::Function::Param - # @return [Param] a new instance of Param - # - # source://rbs//lib/rbs/types.rb#911 - def initialize(type:, name:, location: T.unsafe(nil)); end - - # source://rbs//lib/rbs/types.rb#917 - def ==(other); end - - # source://rbs//lib/rbs/types.rb#917 - def eql?(other); end - - # source://rbs//lib/rbs/types.rb#923 - def hash; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/types.rb#909 - def location; end - - # source://rbs//lib/rbs/types.rb#927 - def map_type(&block); end - - # Returns the value of attribute name. - # - # source://rbs//lib/rbs/types.rb#908 - def name; end - - # source://rbs//lib/rbs/types.rb#935 - def to_json(state = T.unsafe(nil)); end - - # source://rbs//lib/rbs/types.rb#939 - def to_s; end - - # Returns the value of attribute type. - # - # source://rbs//lib/rbs/types.rb#907 - def type; end -end - -# source://rbs//lib/rbs/types.rb#312 -class RBS::Types::Interface - include ::RBS::Types::Application - - # @return [Interface] a new instance of Interface - # - # source://rbs//lib/rbs/types.rb#317 - def initialize(name:, args:, location:); end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/types.rb#313 - def location; end - - # source://rbs//lib/rbs/types.rb#343 - def map_type(&block); end - - # source://rbs//lib/rbs/types.rb#335 - def map_type_name(&block); end - - # source://rbs//lib/rbs/types.rb#327 - def sub(s); end - - # source://rbs//lib/rbs/types.rb#323 - def to_json(state = T.unsafe(nil)); end -end - -# source://rbs//lib/rbs/types.rb#822 -class RBS::Types::Intersection - # @return [Intersection] a new instance of Intersection - # - # source://rbs//lib/rbs/types.rb#826 - def initialize(types:, location:); end - - # source://rbs//lib/rbs/types.rb#831 - def ==(other); end - - # source://rbs//lib/rbs/types.rb#869 - def each_type(&block); end - - # source://rbs//lib/rbs/types.rb#831 - def eql?(other); end - - # source://rbs//lib/rbs/types.rb#841 - def free_variables(set = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#896 - def has_classish_type?; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#892 - def has_self_type?; end - - # source://rbs//lib/rbs/types.rb#837 - def hash; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/types.rb#824 - def location; end - - # source://rbs//lib/rbs/types.rb#877 - def map_type(&block); end - - # source://rbs//lib/rbs/types.rb#885 - def map_type_name(&block); end - - # source://rbs//lib/rbs/types.rb#853 - def sub(s); end - - # source://rbs//lib/rbs/types.rb#849 - def to_json(state = T.unsafe(nil)); end - - # source://rbs//lib/rbs/types.rb#860 - def to_s(level = T.unsafe(nil)); end - - # Returns the value of attribute types. - # - # source://rbs//lib/rbs/types.rb#823 - def types; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#900 - def with_nonreturn_void?; end -end - -# source://rbs//lib/rbs/types.rb#1518 -class RBS::Types::Literal - include ::RBS::Types::NoFreeVariables - include ::RBS::Types::NoSubst - include ::RBS::Types::EmptyEachType - include ::RBS::Types::NoTypeName - - # @return [Literal] a new instance of Literal - # - # source://rbs//lib/rbs/types.rb#1522 - def initialize(literal:, location:); end - - # source://rbs//lib/rbs/types.rb#1527 - def ==(other); end - - # source://rbs//lib/rbs/types.rb#1527 - def eql?(other); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#1554 - def has_classish_type?; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#1550 - def has_self_type?; end - - # source://rbs//lib/rbs/types.rb#1533 - def hash; end - - # Returns the value of attribute literal. - # - # source://rbs//lib/rbs/types.rb#1519 - def literal; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/types.rb#1520 - def location; end - - # source://rbs//lib/rbs/types.rb#1542 - def to_json(state = T.unsafe(nil)); end - - # source://rbs//lib/rbs/types.rb#1546 - def to_s(level = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#1558 - def with_nonreturn_void?; end - - class << self - # source://rbs//lib/rbs/types.rb#1578 - def unescape_string(string, is_double_quote); end - end -end - -# source://rbs//lib/rbs/types.rb#1562 -RBS::Types::Literal::TABLE = T.let(T.unsafe(nil), Hash) - -# source://rbs//lib/rbs/types.rb#5 -module RBS::Types::NoFreeVariables - # source://rbs//lib/rbs/types.rb#6 - def free_variables(set = T.unsafe(nil)); end -end - -# source://rbs//lib/rbs/types.rb#11 -module RBS::Types::NoSubst - # source://rbs//lib/rbs/types.rb#12 - def sub(s); end -end - -# source://rbs//lib/rbs/types.rb#17 -module RBS::Types::NoTypeName - # source://rbs//lib/rbs/types.rb#18 - def map_type_name(&_arg0); end -end - -# source://rbs//lib/rbs/types.rb#645 -class RBS::Types::Optional - # @return [Optional] a new instance of Optional - # - # source://rbs//lib/rbs/types.rb#649 - def initialize(type:, location:); end - - # source://rbs//lib/rbs/types.rb#654 - def ==(other); end - - # source://rbs//lib/rbs/types.rb#692 - def each_type; end - - # source://rbs//lib/rbs/types.rb#654 - def eql?(other); end - - # source://rbs//lib/rbs/types.rb#664 - def free_variables(set = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#722 - def has_classish_type?; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#718 - def has_self_type?; end - - # source://rbs//lib/rbs/types.rb#660 - def hash; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/types.rb#647 - def location; end - - # source://rbs//lib/rbs/types.rb#707 - def map_type(&block); end - - # source://rbs//lib/rbs/types.rb#700 - def map_type_name(&block); end - - # source://rbs//lib/rbs/types.rb#672 - def sub(s); end - - # source://rbs//lib/rbs/types.rb#668 - def to_json(state = T.unsafe(nil)); end - - # source://rbs//lib/rbs/types.rb#678 - def to_s(level = T.unsafe(nil)); end - - # Returns the value of attribute type. - # - # source://rbs//lib/rbs/types.rb#646 - def type; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#726 - def with_nonreturn_void?; end -end - -# source://rbs//lib/rbs/types.rb#1395 -class RBS::Types::Proc - # @return [Proc] a new instance of Proc - # - # source://rbs//lib/rbs/types.rb#1401 - def initialize(location:, type:, block:, self_type: T.unsafe(nil)); end - - # source://rbs//lib/rbs/types.rb#1408 - def ==(other); end - - # Returns the value of attribute block. - # - # source://rbs//lib/rbs/types.rb#1397 - def block; end - - # source://rbs//lib/rbs/types.rb#1462 - def each_type(&block); end - - # source://rbs//lib/rbs/types.rb#1408 - def eql?(other); end - - # source://rbs//lib/rbs/types.rb#1418 - def free_variables(set = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#1501 - def has_classish_type?; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#1497 - def has_self_type?; end - - # source://rbs//lib/rbs/types.rb#1414 - def hash; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/types.rb#1399 - def location; end - - # source://rbs//lib/rbs/types.rb#1484 - def map_type(&block); end - - # source://rbs//lib/rbs/types.rb#1475 - def map_type_name(&block); end - - # Returns the value of attribute self_type. - # - # source://rbs//lib/rbs/types.rb#1398 - def self_type; end - - # source://rbs//lib/rbs/types.rb#1435 - def sub(s); end - - # source://rbs//lib/rbs/types.rb#1425 - def to_json(state = T.unsafe(nil)); end - - # source://rbs//lib/rbs/types.rb#1446 - def to_s(level = T.unsafe(nil)); end - - # Returns the value of attribute type. - # - # source://rbs//lib/rbs/types.rb#1396 - def type; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#1505 - def with_nonreturn_void?; end -end - -# source://rbs//lib/rbs/types.rb#527 -class RBS::Types::Record - # @return [Record] a new instance of Record - # - # source://rbs//lib/rbs/types.rb#531 - def initialize(location:, all_fields: T.unsafe(nil), fields: T.unsafe(nil)); end - - # source://rbs//lib/rbs/types.rb#555 - def ==(other); end - - # Returns the value of attribute all_fields. - # - # source://rbs//lib/rbs/types.rb#528 - def all_fields; end - - # source://rbs//lib/rbs/types.rb#605 - def each_type(&block); end - - # source://rbs//lib/rbs/types.rb#555 - def eql?(other); end - - # Returns the value of attribute fields. - # - # source://rbs//lib/rbs/types.rb#528 - def fields; end - - # source://rbs//lib/rbs/types.rb#565 - def free_variables(set = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#636 - def has_classish_type?; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#632 - def has_self_type?; end - - # source://rbs//lib/rbs/types.rb#561 - def hash; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/types.rb#529 - def location; end - - # source://rbs//lib/rbs/types.rb#621 - def map_type(&block); end - - # source://rbs//lib/rbs/types.rb#614 - def map_type_name(&block); end - - # Returns the value of attribute optional_fields. - # - # source://rbs//lib/rbs/types.rb#528 - def optional_fields; end - - # source://rbs//lib/rbs/types.rb#580 - def sub(s); end - - # source://rbs//lib/rbs/types.rb#576 - def to_json(state = T.unsafe(nil)); end - - # source://rbs//lib/rbs/types.rb#589 - def to_s(level = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#640 - def with_nonreturn_void?; end -end - -# source://rbs//lib/rbs/types.rb#1383 -module RBS::Types::SelfTypeBindingHelper - private - - # source://rbs//lib/rbs/types.rb#1386 - def self_type_binding_to_s(t); end - - class << self - # source://rbs//lib/rbs/types.rb#1386 - def self_type_binding_to_s(t); end - end -end - -# source://rbs//lib/rbs/types.rb#442 -class RBS::Types::Tuple - # @return [Tuple] a new instance of Tuple - # - # source://rbs//lib/rbs/types.rb#446 - def initialize(types:, location:); end - - # source://rbs//lib/rbs/types.rb#451 - def ==(other); end - - # source://rbs//lib/rbs/types.rb#488 - def each_type(&block); end - - # source://rbs//lib/rbs/types.rb#451 - def eql?(other); end - - # source://rbs//lib/rbs/types.rb#461 - def free_variables(set = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#518 - def has_classish_type?; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#514 - def has_self_type?; end - - # source://rbs//lib/rbs/types.rb#457 - def hash; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/types.rb#444 - def location; end - - # source://rbs//lib/rbs/types.rb#503 - def map_type(&block); end - - # source://rbs//lib/rbs/types.rb#496 - def map_type_name(&block); end - - # source://rbs//lib/rbs/types.rb#473 - def sub(s); end - - # source://rbs//lib/rbs/types.rb#469 - def to_json(state = T.unsafe(nil)); end - - # source://rbs//lib/rbs/types.rb#480 - def to_s(level = T.unsafe(nil)); end - - # Returns the value of attribute types. - # - # source://rbs//lib/rbs/types.rb#443 - def types; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#522 - def with_nonreturn_void?; end -end - -# source://rbs//lib/rbs/types.rb#731 -class RBS::Types::Union - # @return [Union] a new instance of Union - # - # source://rbs//lib/rbs/types.rb#735 - def initialize(types:, location:); end - - # source://rbs//lib/rbs/types.rb#740 - def ==(other); end - - # source://rbs//lib/rbs/types.rb#786 - def each_type(&block); end - - # source://rbs//lib/rbs/types.rb#740 - def eql?(other); end - - # source://rbs//lib/rbs/types.rb#750 - def free_variables(set = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#813 - def has_classish_type?; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#809 - def has_self_type?; end - - # source://rbs//lib/rbs/types.rb#746 - def hash; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/types.rb#733 - def location; end - - # source://rbs//lib/rbs/types.rb#794 - def map_type(&block); end - - # source://rbs//lib/rbs/types.rb#802 - def map_type_name(&block); end - - # source://rbs//lib/rbs/types.rb#762 - def sub(s); end - - # source://rbs//lib/rbs/types.rb#758 - def to_json(state = T.unsafe(nil)); end - - # source://rbs//lib/rbs/types.rb#769 - def to_s(level = T.unsafe(nil)); end - - # Returns the value of attribute types. - # - # source://rbs//lib/rbs/types.rb#732 - def types; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#817 - def with_nonreturn_void?; end -end - -# source://rbs//lib/rbs/types.rb#1241 -class RBS::Types::UntypedFunction - # @return [UntypedFunction] a new instance of UntypedFunction - # - # source://rbs//lib/rbs/types.rb#1244 - def initialize(return_type:); end - - # source://rbs//lib/rbs/types.rb#1326 - def ==(other); end - - # source://rbs//lib/rbs/types.rb#1274 - def each_param(&block); end - - # source://rbs//lib/rbs/types.rb#1266 - def each_type(&block); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#1302 - def empty?; end - - # source://rbs//lib/rbs/types.rb#1326 - def eql?(other); end - - # source://rbs//lib/rbs/types.rb#1248 - def free_variables(acc = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#1310 - def has_classish_type?; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#1306 - def has_self_type?; end - - # source://rbs//lib/rbs/types.rb#1332 - def hash; end - - # source://rbs//lib/rbs/types.rb#1252 - def map_type(&block); end - - # source://rbs//lib/rbs/types.rb#1260 - def map_type_name(&block); end - - # source://rbs//lib/rbs/types.rb#1318 - def param_to_s; end - - # source://rbs//lib/rbs/types.rb#1322 - def return_to_s; end - - # Returns the value of attribute return_type. - # - # source://rbs//lib/rbs/types.rb#1242 - def return_type; end - - # source://rbs//lib/rbs/types.rb#1288 - def sub(subst); end - - # source://rbs//lib/rbs/types.rb#1282 - def to_json(state = T.unsafe(nil)); end - - # source://rbs//lib/rbs/types.rb#1298 - def update(return_type: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#1314 - def with_nonreturn_void?; end - - # source://rbs//lib/rbs/types.rb#1294 - def with_return_type(ty); end -end - -# source://rbs//lib/rbs/types.rb#133 -class RBS::Types::Variable - include ::RBS::Types::NoTypeName - include ::RBS::Types::EmptyEachType - - # @return [Variable] a new instance of Variable - # - # source://rbs//lib/rbs/types.rb#139 - def initialize(name:, location:); end - - # source://rbs//lib/rbs/types.rb#144 - def ==(other); end - - # source://rbs//lib/rbs/types.rb#144 - def eql?(other); end - - # source://rbs//lib/rbs/types.rb#154 - def free_variables(set = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#193 - def has_classish_type?; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#189 - def has_self_type?; end - - # source://rbs//lib/rbs/types.rb#150 - def hash; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/types.rb#135 - def location; end - - # Returns the value of attribute name. - # - # source://rbs//lib/rbs/types.rb#134 - def name; end - - # source://rbs//lib/rbs/types.rb#164 - def sub(s); end - - # source://rbs//lib/rbs/types.rb#160 - def to_json(state = T.unsafe(nil)); end - - # source://rbs//lib/rbs/types.rb#183 - def to_s(level = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#197 - def with_nonreturn_void?; end - - class << self - # source://rbs//lib/rbs/types.rb#168 - def build(v); end - - # source://rbs//lib/rbs/types.rb#178 - def fresh(v = T.unsafe(nil)); end - end -end - -# source://rbs//lib/rbs/errors.rb#349 -class RBS::UnknownMethodAliasError < ::RBS::DefinitionError - include ::RBS::DetailedMessageable - - # @return [UnknownMethodAliasError] a new instance of UnknownMethodAliasError - # - # source://rbs//lib/rbs/errors.rb#357 - def initialize(type_name:, original_name:, aliased_name:, location:); end - - # Returns the value of attribute aliased_name. - # - # source://rbs//lib/rbs/errors.rb#354 - def aliased_name; end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/errors.rb#355 - def location; end - - # Returns the value of attribute original_name. - # - # source://rbs//lib/rbs/errors.rb#353 - def original_name; end - - # Returns the value of attribute type_name. - # - # source://rbs//lib/rbs/errors.rb#352 - def type_name; end -end - -# source://rbs//lib/rbs/version.rb#4 -RBS::VERSION = T.let(T.unsafe(nil), String) - -# source://rbs//lib/rbs/validator.rb#4 -class RBS::Validator - # @return [Validator] a new instance of Validator - # - # source://rbs//lib/rbs/validator.rb#9 - def initialize(env:, resolver: T.unsafe(nil)); end - - # source://rbs//lib/rbs/validator.rb#15 - def absolute_type(type, context:, &block); end - - # Returns the value of attribute definition_builder. - # - # source://rbs//lib/rbs/validator.rb#7 - def definition_builder; end - - # Returns the value of attribute env. - # - # source://rbs//lib/rbs/validator.rb#5 - def env; end - - # Returns the value of attribute resolver. - # - # source://rbs//lib/rbs/validator.rb#6 - def resolver; end - - # source://rbs//lib/rbs/validator.rb#178 - def type_alias_dependency; end - - # source://rbs//lib/rbs/validator.rb#182 - def type_alias_regularity; end - - # source://rbs//lib/rbs/validator.rb#158 - def validate_class_alias(entry:); end - - # source://rbs//lib/rbs/validator.rb#104 - def validate_method_definition(method_def, type_name:); end - - # Validates presence of the relative type, and application arity match. - # - # source://rbs//lib/rbs/validator.rb#24 - def validate_type(type, context:); end - - # source://rbs//lib/rbs/validator.rb#63 - def validate_type_alias(entry:); end - - # source://rbs//lib/rbs/validator.rb#120 - def validate_type_params(params, type_name:, location:, method_name: T.unsafe(nil)); end - - # source://rbs//lib/rbs/validator.rb#154 - def validate_variable(var); end -end - -# source://rbs//lib/rbs/errors.rb#325 -class RBS::VariableDuplicationError < ::RBS::DefinitionError - include ::RBS::DetailedMessageable - - # @return [VariableDuplicationError] a new instance of VariableDuplicationError - # - # source://rbs//lib/rbs/errors.rb#332 - def initialize(type_name:, variable_name:, location:); end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/errors.rb#330 - def location; end - - # Returns the value of attribute type_name. - # - # source://rbs//lib/rbs/errors.rb#328 - def type_name; end - - # Returns the value of attribute variable_name. - # - # source://rbs//lib/rbs/errors.rb#329 - def variable_name; end -end - -# source://rbs//lib/rbs/variance_calculator.rb#4 -class RBS::VarianceCalculator - # @return [VarianceCalculator] a new instance of VarianceCalculator - # - # source://rbs//lib/rbs/variance_calculator.rb#78 - def initialize(builder:); end - - # Returns the value of attribute builder. - # - # source://rbs//lib/rbs/variance_calculator.rb#76 - def builder; end - - # source://rbs//lib/rbs/variance_calculator.rb#82 - def env; end - - # source://rbs//lib/rbs/variance_calculator.rb#169 - def function(type, result:, context:); end - - # source://rbs//lib/rbs/variance_calculator.rb#98 - def in_inherit(name:, args:, variables:); end - - # source://rbs//lib/rbs/variance_calculator.rb#86 - def in_method_type(method_type:, variables:); end - - # source://rbs//lib/rbs/variance_calculator.rb#110 - def in_type_alias(name:); end - - # source://rbs//lib/rbs/variance_calculator.rb#176 - def negate(variance); end - - # source://rbs//lib/rbs/variance_calculator.rb#121 - def type(type, result:, context:); end -end - -# source://rbs//lib/rbs/variance_calculator.rb#5 -class RBS::VarianceCalculator::Result - # @return [Result] a new instance of Result - # - # source://rbs//lib/rbs/variance_calculator.rb#8 - def initialize(variables:); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/variance_calculator.rb#45 - def compatible?(var, with_annotation:); end - - # source://rbs//lib/rbs/variance_calculator.rb#24 - def contravariant(x); end - - # source://rbs//lib/rbs/variance_calculator.rb#15 - def covariant(x); end - - # source://rbs//lib/rbs/variance_calculator.rb#37 - def each(&block); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/variance_calculator.rb#41 - def include?(name); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/variance_calculator.rb#60 - def incompatible?(params); end - - # source://rbs//lib/rbs/variance_calculator.rb#33 - def invariant(x); end - - # Returns the value of attribute result. - # - # source://rbs//lib/rbs/variance_calculator.rb#6 - def result; end -end - -# source://rbs//lib/rbs/vendorer.rb#4 -class RBS::Vendorer - # @return [Vendorer] a new instance of Vendorer - # - # source://rbs//lib/rbs/vendorer.rb#8 - def initialize(vendor_dir:, loader:); end - - # source://rbs//lib/rbs/vendorer.rb#21 - def clean!; end - - # source://rbs//lib/rbs/vendorer.rb#28 - def copy!; end - - # source://rbs//lib/rbs/vendorer.rb#13 - def ensure_dir; end - - # Returns the value of attribute loader. - # - # source://rbs//lib/rbs/vendorer.rb#6 - def loader; end - - # Returns the value of attribute vendor_dir. - # - # source://rbs//lib/rbs/vendorer.rb#5 - def vendor_dir; end -end - -# source://rbs//lib/rbs/errors.rb#593 -class RBS::WillSyntaxError < ::RBS::DefinitionError - include ::RBS::DetailedMessageable - - # @return [WillSyntaxError] a new instance of WillSyntaxError - # - # source://rbs//lib/rbs/errors.rb#598 - def initialize(message, location:); end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/errors.rb#596 - def location; end -end - -# source://rbs//lib/rbs/writer.rb#4 -class RBS::Writer - # @return [Writer] a new instance of Writer - # - # source://rbs//lib/rbs/writer.rb#8 - def initialize(out:); end - - # source://rbs//lib/rbs/writer.rb#366 - def attribute(kind, attr); end - - # source://rbs//lib/rbs/writer.rb#42 - def format_annotation(annotation); end - - # source://rbs//lib/rbs/writer.rb#23 - def indent(size = T.unsafe(nil)); end - - # Returns the value of attribute indentation. - # - # source://rbs//lib/rbs/writer.rb#6 - def indentation; end - - # source://rbs//lib/rbs/writer.rb#293 - def method_name(name); end - - # source://rbs//lib/rbs/writer.rb#219 - def name_and_args(name, args); end - - # source://rbs//lib/rbs/writer.rb#207 - def name_and_params(name, params); end - - # Returns the value of attribute out. - # - # source://rbs//lib/rbs/writer.rb#5 - def out; end - - # source://rbs//lib/rbs/writer.rb#30 - def prefix; end - - # source://rbs//lib/rbs/writer.rb#18 - def preserve!(preserve: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/writer.rb#14 - def preserve?; end - - # source://rbs//lib/rbs/writer.rb#396 - def preserve_empty_line(prev, decl); end - - # source://rbs//lib/rbs/writer.rb#229 - def put_lines(lines, leading_spaces:); end - - # source://rbs//lib/rbs/writer.rb#34 - def puts(string = T.unsafe(nil)); end - - # source://rbs//lib/rbs/writer.rb#79 - def write(contents); end - - # source://rbs//lib/rbs/writer.rb#60 - def write_annotation(annotations); end - - # source://rbs//lib/rbs/writer.rb#66 - def write_comment(comment); end - - # source://rbs//lib/rbs/writer.rb#119 - def write_decl(decl); end - - # source://rbs//lib/rbs/writer.rb#314 - def write_def(member); end - - # source://rbs//lib/rbs/writer.rb#306 - def write_loc_source(located); end - - # source://rbs//lib/rbs/writer.rb#239 - def write_member(member); end - - # source://rbs//lib/rbs/writer.rb#102 - def write_use_directive(dir); end -end - -# source://rbs//lib/rdoc/discover.rb#8 -class RDoc::Parser::RBS < ::RDoc::Parser - # source://rbs//lib/rdoc/discover.rb#10 - def scan; end -end diff --git a/sorbet/rbi/gems/rbs@4.2.0.rbi b/sorbet/rbi/gems/rbs@4.2.0.rbi new file mode 100644 index 0000000..d3b73ff --- /dev/null +++ b/sorbet/rbi/gems/rbs@4.2.0.rbi @@ -0,0 +1,7133 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rbs` gem. +# Please instead update this file by running `bin/tapioca gem rbs`. + + +# This file is generated by the templates/template.rb script and should not be +# modified manually. To change the template see +# templates/lib/rbs/wasm/serialization_schema.rb.erb +# +# pkg:gem/rbs#lib/rbs/version.rb:3 +module RBS + class << self + # pkg:gem/rbs#lib/rbs.rb:92 + def logger; end + + # pkg:gem/rbs#lib/rbs.rb:89 + def logger_level; end + + # pkg:gem/rbs#lib/rbs.rb:101 + def logger_level=(level); end + + # pkg:gem/rbs#lib/rbs.rb:90 + def logger_output; end + + # pkg:gem/rbs#lib/rbs.rb:96 + def logger_output=(val); end + + # pkg:gem/rbs#lib/rbs.rb:106 + def print_warning; end + end +end + +# pkg:gem/rbs#lib/rbs/ast/type_param.rb:4 +module RBS::AST; end + +# pkg:gem/rbs#lib/rbs/ast/annotation.rb:5 +class RBS::AST::Annotation + # pkg:gem/rbs#lib/rbs/ast/annotation.rb:9 + def initialize(string:, location:); end + + # pkg:gem/rbs#lib/rbs/ast/annotation.rb:14 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/annotation.rb:18 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/annotation.rb:20 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/annotation.rb:7 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/annotation.rb:6 + def string; end + + # pkg:gem/rbs#lib/rbs/ast/annotation.rb:24 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/comment.rb:5 +class RBS::AST::Comment + # pkg:gem/rbs#lib/rbs/ast/comment.rb:9 + def initialize(string:, location:); end + + # pkg:gem/rbs#lib/rbs/ast/comment.rb:14 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/comment.rb:18 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/comment.rb:20 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/comment.rb:7 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/comment.rb:6 + def string; end + + # pkg:gem/rbs#lib/rbs/ast/comment.rb:24 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:5 +module RBS::AST::Declarations; end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:423 +class RBS::AST::Declarations::AliasDecl < ::RBS::AST::Declarations::Base + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:426 + def initialize(new_name:, old_name:, location:, comment:, annotations: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:434 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:424 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:424 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:440 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:442 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:424 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:424 + def new_name; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:424 + def old_name; end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:6 +class RBS::AST::Declarations::Base; end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:55 +class RBS::AST::Declarations::Class < ::RBS::AST::Declarations::Base + include ::RBS::AST::Declarations::NestedDeclarationHelper + include ::RBS::AST::Declarations::MixinHelper + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:97 + def initialize(name:, type_params:, super_class:, members:, annotations:, location:, comment:); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:119 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:93 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:95 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:127 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:129 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:94 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:91 + def members; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:89 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:92 + def super_class; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:133 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:90 + def type_params; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:107 + def update(name: T.unsafe(nil), type_params: T.unsafe(nil), super_class: T.unsafe(nil), members: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:56 +class RBS::AST::Declarations::Class::Super + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:61 + def initialize(name:, args:, location:); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:67 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:58 + def args; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:71 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:73 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:59 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:57 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:77 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:447 +class RBS::AST::Declarations::ClassAlias < ::RBS::AST::Declarations::AliasDecl + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:448 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:347 +class RBS::AST::Declarations::Constant < ::RBS::AST::Declarations::Base + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:354 + def initialize(name:, type:, location:, comment:, annotations: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:362 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:352 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:351 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:368 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:370 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:350 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:348 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:374 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:349 + def type; end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:385 +class RBS::AST::Declarations::Global < ::RBS::AST::Declarations::Base + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:392 + def initialize(name:, type:, location:, comment:, annotations: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:400 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:390 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:389 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:406 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:408 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:388 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:386 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:412 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:387 + def type; end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:248 +class RBS::AST::Declarations::Interface < ::RBS::AST::Declarations::Base + include ::RBS::AST::Declarations::MixinHelper + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:258 + def initialize(name:, type_params:, members:, annotations:, location:, comment:); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:278 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:252 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:254 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:285 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:287 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:253 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:251 + def members; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:249 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:291 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:250 + def type_params; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:267 + def update(name: T.unsafe(nil), type_params: T.unsafe(nil), members: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:35 +module RBS::AST::Declarations::MixinHelper + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:36 + def each_mixin(&block); end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:147 +class RBS::AST::Declarations::Module < ::RBS::AST::Declarations::Base + include ::RBS::AST::Declarations::NestedDeclarationHelper + include ::RBS::AST::Declarations::MixinHelper + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:197 + def initialize(name:, type_params:, members:, self_types:, annotations:, location:, comment:); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:220 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:193 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:195 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:228 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:230 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:192 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:191 + def members; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:189 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:194 + def self_types; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:234 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:190 + def type_params; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:207 + def update(name: T.unsafe(nil), type_params: T.unsafe(nil), members: T.unsafe(nil), self_types: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:148 +class RBS::AST::Declarations::Module::Self + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:153 + def initialize(name:, args:, location:); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:159 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:150 + def args; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:163 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:165 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:151 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:149 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:169 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:177 + def to_s; end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:459 +class RBS::AST::Declarations::ModuleAlias < ::RBS::AST::Declarations::AliasDecl + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:460 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:9 +module RBS::AST::Declarations::NestedDeclarationHelper + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:22 + def each_decl; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:10 + def each_member; end +end + +# pkg:gem/rbs#lib/rbs/ast/declarations.rb:304 +class RBS::AST::Declarations::TypeAlias < ::RBS::AST::Declarations::Base + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:312 + def initialize(name:, type_params:, type:, annotations:, location:, comment:); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:321 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:308 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:310 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:328 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:330 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:309 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:305 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:334 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:307 + def type; end + + # pkg:gem/rbs#lib/rbs/ast/declarations.rb:306 + def type_params; end +end + +# pkg:gem/rbs#lib/rbs/ast/directives.rb:5 +module RBS::AST::Directives; end + +# pkg:gem/rbs#lib/rbs/ast/directives.rb:6 +class RBS::AST::Directives::Base; end + +# pkg:gem/rbs#lib/rbs/ast/directives.rb:37 +class RBS::AST::Directives::ResolveTypeNames < ::RBS::AST::Directives::Base + # pkg:gem/rbs#lib/rbs/ast/directives.rb:42 + def initialize(value:, location:); end + + # pkg:gem/rbs#lib/rbs/ast/directives.rb:38 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/directives.rb:40 + def value; end +end + +# pkg:gem/rbs#lib/rbs/ast/directives.rb:9 +class RBS::AST::Directives::Use < ::RBS::AST::Directives::Base + # pkg:gem/rbs#lib/rbs/ast/directives.rb:31 + def initialize(clauses:, location:); end + + # pkg:gem/rbs#lib/rbs/ast/directives.rb:29 + def clauses; end + + # pkg:gem/rbs#lib/rbs/ast/directives.rb:29 + def location; end +end + +# pkg:gem/rbs#lib/rbs/ast/directives.rb:10 +class RBS::AST::Directives::Use::SingleClause + # pkg:gem/rbs#lib/rbs/ast/directives.rb:13 + def initialize(type_name:, new_name:, location:); end + + # pkg:gem/rbs#lib/rbs/ast/directives.rb:11 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/directives.rb:11 + def new_name; end + + # pkg:gem/rbs#lib/rbs/ast/directives.rb:11 + def type_name; end +end + +# pkg:gem/rbs#lib/rbs/ast/directives.rb:20 +class RBS::AST::Directives::Use::WildcardClause + # pkg:gem/rbs#lib/rbs/ast/directives.rb:23 + def initialize(namespace:, location:); end + + # pkg:gem/rbs#lib/rbs/ast/directives.rb:21 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/directives.rb:21 + def namespace; end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:5 +module RBS::AST::Members; end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:399 +class RBS::AST::Members::Alias < ::RBS::AST::Members::Base + # pkg:gem/rbs#lib/rbs/ast/members.rb:407 + def initialize(new_name:, old_name:, kind:, annotations:, location:, comment:); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:416 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:403 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:405 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:423 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:425 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:441 + def instance?; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:402 + def kind; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:404 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:400 + def new_name; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:401 + def old_name; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:445 + def singleton?; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:429 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:329 +class RBS::AST::Members::AttrAccessor < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Attribute + + # pkg:gem/rbs#lib/rbs/ast/members.rb:332 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:311 +class RBS::AST::Members::AttrReader < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Attribute + + # pkg:gem/rbs#lib/rbs/ast/members.rb:314 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:347 +class RBS::AST::Members::AttrWriter < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Attribute + + # pkg:gem/rbs#lib/rbs/ast/members.rb:350 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:260 +module RBS::AST::Members::Attribute + # pkg:gem/rbs#lib/rbs/ast/members.rb:270 + def initialize(name:, type:, ivar_name:, kind:, annotations:, location:, comment:, visibility: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:281 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:265 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:267 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:290 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:292 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:264 + def ivar_name; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:263 + def kind; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:266 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:261 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:262 + def type; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:296 + def update(name: T.unsafe(nil), type: T.unsafe(nil), ivar_name: T.unsafe(nil), kind: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil), visibility: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:268 + def visibility; end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:6 +class RBS::AST::Members::Base; end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:159 +class RBS::AST::Members::ClassInstanceVariable < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Var + + # pkg:gem/rbs#lib/rbs/ast/members.rb:162 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:173 +class RBS::AST::Members::ClassVariable < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Var + + # pkg:gem/rbs#lib/rbs/ast/members.rb:176 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:230 +class RBS::AST::Members::Extend < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Mixin + + # pkg:gem/rbs#lib/rbs/ast/members.rb:233 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:215 +class RBS::AST::Members::Include < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Mixin + + # pkg:gem/rbs#lib/rbs/ast/members.rb:218 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:145 +class RBS::AST::Members::InstanceVariable < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Var + + # pkg:gem/rbs#lib/rbs/ast/members.rb:148 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:365 +module RBS::AST::Members::LocationOnly + # pkg:gem/rbs#lib/rbs/ast/members.rb:368 + def initialize(location:); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:372 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:376 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:378 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:366 + def location; end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:9 +class RBS::AST::Members::MethodDefinition < ::RBS::AST::Members::Base + # pkg:gem/rbs#lib/rbs/ast/members.rb:55 + def initialize(name:, kind:, overloads:, annotations:, location:, comment:, overloading:, visibility:); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:66 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:49 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:51 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:75 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:77 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:81 + def instance?; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:47 + def kind; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:50 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:46 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:52 + def overloading; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:89 + def overloading?; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:48 + def overloads; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:85 + def singleton?; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:106 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:93 + def update(name: T.unsafe(nil), kind: T.unsafe(nil), overloads: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil), overloading: T.unsafe(nil), visibility: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:53 + def visibility; end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:10 +class RBS::AST::Members::MethodDefinition::Overload + # pkg:gem/rbs#lib/rbs/ast/members.rb:13 + def initialize(method_type:, annotations:); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:18 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:11 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:26 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:22 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:11 + def method_type; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:32 + def sub(subst); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:38 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:28 + def update(annotations: T.unsafe(nil), method_type: T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:187 +module RBS::AST::Members::Mixin + # pkg:gem/rbs#lib/rbs/ast/members.rb:194 + def initialize(name:, args:, annotations:, location:, comment:); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:202 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:190 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:189 + def args; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:192 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:206 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:210 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:191 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:188 + def name; end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:245 +class RBS::AST::Members::Prepend < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Mixin + + # pkg:gem/rbs#lib/rbs/ast/members.rb:248 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:391 +class RBS::AST::Members::Private < ::RBS::AST::Members::Base + include ::RBS::AST::Members::LocationOnly + + # pkg:gem/rbs#lib/rbs/ast/members.rb:394 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:383 +class RBS::AST::Members::Public < ::RBS::AST::Members::Base + include ::RBS::AST::Members::LocationOnly + + # pkg:gem/rbs#lib/rbs/ast/members.rb:386 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/ast/members.rb:121 +module RBS::AST::Members::Var + # pkg:gem/rbs#lib/rbs/ast/members.rb:127 + def initialize(name:, type:, location:, comment:); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:134 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:125 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:138 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:140 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:124 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:122 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/members.rb:123 + def type; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:5 +module RBS::AST::Ruby; end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:6 +module RBS::AST::Ruby::Annotations; end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:43 +class RBS::AST::Ruby::Annotations::AliasAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:46 + def initialize(location:, prefix_location:, keyword_location:, type_name:, type_name_location:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:44 + def keyword_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:53 + def map_type_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:44 + def type_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:44 + def type_name_location; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:7 +class RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:10 + def initialize(location, prefix_location); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:15 + def buffer; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:8 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:8 + def prefix_location; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:398 +class RBS::AST::Ruby::Annotations::BlockParamTypeAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:401 + def initialize(location:, prefix_location:, ampersand_location:, name_location:, colon_location:, question_location:, type_location:, type:, comment_location:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:399 + def ampersand_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:399 + def colon_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:399 + def comment_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:412 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:426 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:399 + def name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:430 + def optional?; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:399 + def question_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:434 + def required?; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:399 + def type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:438 + def type_fingerprint; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:399 + def type_location; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:64 +class RBS::AST::Ruby::Annotations::ClassAliasAnnotation < ::RBS::AST::Ruby::Annotations::AliasAnnotation + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:65 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:82 +class RBS::AST::Ruby::Annotations::ColonMethodTypeAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:85 + def initialize(location:, prefix_location:, annotations:, method_type:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:83 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:91 + def map_type_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:83 + def method_type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:100 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:322 +class RBS::AST::Ruby::Annotations::DoubleSplatParamTypeAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:325 + def initialize(location:, prefix_location:, star2_location:, name_location:, colon_location:, param_type:, comment_location:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:323 + def colon_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:323 + def comment_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:334 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:323 + def name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:323 + def param_type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:323 + def star2_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:346 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:222 +class RBS::AST::Ruby::Annotations::InstanceVariableAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:225 + def initialize(location:, prefix_location:, ivar_name:, ivar_name_location:, colon_location:, type:, comment_location:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:223 + def colon_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:223 + def comment_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:223 + def ivar_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:223 + def ivar_name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:234 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:223 + def type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:246 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:109 +class RBS::AST::Ruby::Annotations::MethodTypesAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:114 + def initialize(location:, prefix_location:, overloads:, vertical_bar_locations:, dot3_location:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:112 + def dot3_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:121 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:112 + def overloads; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:132 + def type_fingerprint; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:112 + def vertical_bar_locations; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:110 +RBS::AST::Ruby::Annotations::MethodTypesAnnotation::Overload = RBS::AST::Members::MethodDefinition::Overload + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:73 +class RBS::AST::Ruby::Annotations::ModuleAliasAnnotation < ::RBS::AST::Ruby::Annotations::AliasAnnotation + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:74 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:356 +class RBS::AST::Ruby::Annotations::ModuleSelfAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:359 + def initialize(location:, prefix_location:, keyword_location:, colon_location:, name:, args:, open_bracket_location:, close_bracket_location:, args_comma_locations:, comment_location:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:357 + def args; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:357 + def args_comma_locations; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:357 + def close_bracket_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:357 + def colon_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:357 + def comment_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:357 + def keyword_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:371 + def map_type_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:357 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:357 + def open_bracket_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:388 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:20 +class RBS::AST::Ruby::Annotations::NodeTypeAssertion < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:23 + def initialize(location:, prefix_location:, type:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:28 + def map_type_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:21 + def type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:35 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:256 +class RBS::AST::Ruby::Annotations::ParamTypeAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:259 + def initialize(location:, prefix_location:, name_location:, colon_location:, param_type:, comment_location:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:257 + def colon_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:257 + def comment_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:267 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:257 + def name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:257 + def param_type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:278 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:155 +class RBS::AST::Ruby::Annotations::ReturnTypeAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:164 + def initialize(location:, prefix_location:, return_location:, colon_location:, return_type:, comment_location:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:158 + def colon_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:162 + def comment_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:172 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:156 + def return_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:160 + def return_type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:183 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:141 +class RBS::AST::Ruby::Annotations::SkipAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:144 + def initialize(location:, prefix_location:, skip_location:, comment_location:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:142 + def comment_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:142 + def skip_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:150 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:288 +class RBS::AST::Ruby::Annotations::SplatParamTypeAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:291 + def initialize(location:, prefix_location:, star_location:, name_location:, colon_location:, param_type:, comment_location:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:289 + def colon_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:289 + def comment_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:300 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:289 + def name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:289 + def param_type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:289 + def star_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:312 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:192 +class RBS::AST::Ruby::Annotations::TypeApplicationAnnotation < ::RBS::AST::Ruby::Annotations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:195 + def initialize(location:, prefix_location:, type_args:, close_bracket_location:, comma_locations:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:193 + def close_bracket_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:193 + def comma_locations; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:202 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:193 + def type_args; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/annotations.rb:214 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:6 +class RBS::AST::Ruby::CommentBlock + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:9 + def initialize(source_buffer, comments); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:228 + def as_comment; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:7 + def comment_buffer; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:213 + def comments; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:100 + def each_paragraph(variables, &block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:52 + def end_line; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:38 + def leading?; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:217 + def leading_annotation?(index); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:176 + def line_location(start_line, end_line); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:56 + def line_starts; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:182 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:7 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:7 + def offsets; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:189 + def parse_annotation_lines(start_line, end_line, variables); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:48 + def start_line; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:171 + def text(comment_index); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:43 + def trailing?; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:199 + def trailing_annotation(variables); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:132 + def yield_annotation(start_line, end_line, current_line, variables, &block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:112 + def yield_paragraph(start_line, current_line, variables, &block); end + + class << self + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:62 + def build(buffer, comments); end + end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:98 +class RBS::AST::Ruby::CommentBlock::AnnotationSyntaxError < ::Struct + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:98 + def error; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:98 + def error=(_); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:98 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:98 + def location=(_); end + + class << self + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:98 + def [](*_arg0); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:98 + def inspect; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:98 + def keyword_init?; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:98 + def members; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/comment_block.rb:98 + def new(*_arg0); end + end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:6 +module RBS::AST::Ruby::Declarations; end + +# pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:7 +class RBS::AST::Ruby::Declarations::Base + include ::RBS::AST::Ruby::Helpers::ConstantHelper + include ::RBS::AST::Ruby::Helpers::LocationHelper + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:13 + def initialize(buffer); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:8 + def buffer; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:18 +class RBS::AST::Ruby::Declarations::ClassDecl < ::RBS::AST::Ruby::Declarations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:74 + def initialize(buffer, name, node, super_class); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:66 + def class_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:82 + def each_decl(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:94 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:68 + def members; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:98 + def name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:70 + def node; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:72 + def super_class; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:102 + def type_fingerprint; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:92 + def type_params; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:19 +class RBS::AST::Ruby::Declarations::ClassDecl::SuperClass + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:28 + def initialize(type_name_location, operator_location, type_name, type_annotation); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:56 + def args; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:43 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:55 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:22 + def operator_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:26 + def type_annotation; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:35 + def type_args; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:58 + def type_fingerprint; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:24 + def type_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:20 + def type_name_location; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:233 +class RBS::AST::Ruby::Declarations::ClassModuleAliasDecl < ::RBS::AST::Ruby::Declarations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:240 + def initialize(buffer, node, new_name, infered_old_name, leading_comment, annotation); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:238 + def annotation; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:274 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:237 + def infered_old_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:235 + def leading_comment; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:249 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:253 + def name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:236 + def new_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:234 + def node; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:262 + def old_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:278 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:171 +class RBS::AST::Ruby::Declarations::ConstantDecl < ::RBS::AST::Ruby::Declarations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:177 + def initialize(buffer, constant_name, node, leading_comment, type_annotation); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:219 + def comment; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:173 + def constant_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:172 + def leading_comment; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:185 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:189 + def name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:174 + def node; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:198 + def type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:175 + def type_annotation; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:223 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:114 +class RBS::AST::Ruby::Declarations::ModuleDecl < ::RBS::AST::Ruby::Declarations::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:121 + def initialize(buffer, name, node); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:128 + def each_decl(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:152 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:117 + def members; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:115 + def module_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:156 + def name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:119 + def node; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:140 + def self_types; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:160 + def type_fingerprint; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/declarations.rb:138 + def type_params; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/helpers/constant_helper.rb:6 +module RBS::AST::Ruby::Helpers; end + +# pkg:gem/rbs#lib/rbs/ast/ruby/helpers/constant_helper.rb:7 +module RBS::AST::Ruby::Helpers::ConstantHelper + private + + # pkg:gem/rbs#lib/rbs/ast/ruby/helpers/constant_helper.rb:10 + def constant_as_type_name(node); end + + class << self + # pkg:gem/rbs#lib/rbs/ast/ruby/helpers/constant_helper.rb:10 + def constant_as_type_name(node); end + end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/helpers/location_helper.rb:7 +module RBS::AST::Ruby::Helpers::LocationHelper + # pkg:gem/rbs#lib/rbs/ast/ruby/helpers/location_helper.rb:8 + def rbs_location(location); end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:6 +module RBS::AST::Ruby::Members; end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:701 +class RBS::AST::Ruby::Members::AttrAccessorMember < ::RBS::AST::Ruby::Members::AttributeMember; end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:695 +class RBS::AST::Ruby::Members::AttrReaderMember < ::RBS::AST::Ruby::Members::AttributeMember; end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:698 +class RBS::AST::Ruby::Members::AttrWriterMember < ::RBS::AST::Ruby::Members::AttributeMember; end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:650 +class RBS::AST::Ruby::Members::AttributeMember < ::RBS::AST::Ruby::Members::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:656 + def initialize(buffer, node, name_nodes, leading_comment, type_annotation); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:654 + def leading_comment; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:670 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:674 + def name_locations; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:652 + def name_nodes; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:664 + def names; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:651 + def node; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:680 + def type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:653 + def type_annotation; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:684 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:7 +class RBS::AST::Ruby::Members::Base + include ::RBS::AST::Ruby::Helpers::LocationHelper + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:10 + def initialize(buffer); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:8 + def buffer; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:547 +class RBS::AST::Ruby::Members::DefMember < ::RBS::AST::Ruby::Members::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:556 + def initialize(buffer, name, node, method_type, leading_comment, kind: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:585 + def annotations; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:569 + def instance?; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:552 + def kind; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:554 + def leading_comment; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:573 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:553 + def method_type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:550 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:589 + def name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:551 + def node; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:581 + def overloading?; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:577 + def overloads; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:565 + def singleton?; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:593 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:548 +RBS::AST::Ruby::Members::DefMember::Overload = RBS::AST::Members::MethodDefinition::Overload + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:644 +class RBS::AST::Ruby::Members::ExtendMember < ::RBS::AST::Ruby::Members::MixinMember; end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:641 +class RBS::AST::Ruby::Members::IncludeMember < ::RBS::AST::Ruby::Members::MixinMember; end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:704 +class RBS::AST::Ruby::Members::InstanceVariableMember < ::RBS::AST::Ruby::Members::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:707 + def initialize(buffer, annotation); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:705 + def annotation; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:720 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:712 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:716 + def type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:724 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:17 +class RBS::AST::Ruby::Members::MethodTypeAnnotation + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:403 + def initialize(type_annotations:); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:484 + def empty?; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:407 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:524 + def overloading?; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:488 + def overloads; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:401 + def type_annotations; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:535 + def type_fingerprint; end + + class << self + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:420 + def build(leading_block, trailing_block, variables, node); end + end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:18 +class RBS::AST::Ruby::Members::MethodTypeAnnotation::DocStyle + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:29 + def initialize; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:181 + def all_param_annotations; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:27 + def block; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:27 + def block=(_arg0); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:196 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:287 + def method_type; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:25 + def optional_keywords; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:21 + def optional_positionals; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:24 + def required_keywords; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:20 + def required_positionals; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:26 + def rest_keywords; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:26 + def rest_keywords=(_arg0); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:22 + def rest_positionals; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:22 + def rest_positionals=(_arg0); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:19 + def return_type_annotation; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:19 + def return_type_annotation=(_arg0); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:23 + def trailing_positionals; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:273 + def type_fingerprint; end + + class << self + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:41 + def build(param_type_annotations, return_type_annotation, node); end + end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:604 +class RBS::AST::Ruby::Members::MixinMember < ::RBS::AST::Ruby::Members::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:609 + def initialize(buffer, node, module_name, annotation); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:607 + def annotation; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:616 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:606 + def module_name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:620 + def name_location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:605 + def node; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:627 + def type_args; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:631 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:732 +class RBS::AST::Ruby::Members::ModuleSelfMember < ::RBS::AST::Ruby::Members::Base + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:735 + def initialize(buffer, annotation); end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:733 + def annotation; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:744 + def args; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:748 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:740 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:752 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/ast/ruby/members.rb:647 +class RBS::AST::Ruby::Members::PrependMember < ::RBS::AST::Ruby::Members::MixinMember; end + +# pkg:gem/rbs#lib/rbs/ast/type_param.rb:5 +class RBS::AST::TypeParam + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:8 + def initialize(name:, variance:, upper_bound:, lower_bound:, location:, default_type: T.unsafe(nil), unchecked: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:41 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:6 + def default_type; end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:51 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:53 + def hash; end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:6 + def location; end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:25 + def lower_bound; end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:6 + def lower_bound_type; end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:69 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:6 + def name; end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:57 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:133 + def to_s; end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:32 + def unchecked!(value = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:37 + def unchecked?; end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:18 + def upper_bound; end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:6 + def upper_bound_type; end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:6 + def variance; end + + class << self + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:166 + def application(params, args); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:198 + def normalize_args(params, args); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:114 + def rename(params, new_names:); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:92 + def resolve_variables(params); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:102 + def subst_var(vars, type); end + + # pkg:gem/rbs#lib/rbs/ast/type_param.rb:219 + def validate(type_params); end + end +end + +# The Visitor class implements the Visitor pattern for traversing the RBS Abstract Syntax Tree (AST). +# +# It provides methods to visit each type of node in the AST, allowing for custom processing of each node type. +# +# This class is designed to be subclassed, with specific visit methods overridden to implement custom behavior for +# different node types. +# +# Example usage: +# +# ~~~rb +# class MyVisitor < RBS::AST::Visitor +# def visit_declaration_class(node) +# puts "Visiting class: #{node.name}" +# +# super # call `super` to run the default visiting behavior +# end +# end +# +# visitor = MyVisitor.new +# visitor.visit(ast_node) +# ~~~ +# +# pkg:gem/rbs#lib/rbs/ast/visitor.rb:26 +class RBS::AST::Visitor + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:27 + def visit(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:70 + def visit_all(nodes); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:79 + def visit_declaration_class(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:87 + def visit_declaration_constant(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:76 + def visit_declaration_global(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:93 + def visit_declaration_interface(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:83 + def visit_declaration_module(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:90 + def visit_declaration_type_alias(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:97 + def visit_member_alias(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:124 + def visit_member_attr_accessor(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:118 + def visit_member_attr_reader(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:121 + def visit_member_attr_writer(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:100 + def visit_member_class_instance_variable(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:103 + def visit_member_class_variable(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:133 + def visit_member_extend(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:127 + def visit_member_include(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:106 + def visit_member_instance_variable(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:115 + def visit_member_method_definition(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:130 + def visit_member_prepend(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:109 + def visit_member_private(node); end + + # pkg:gem/rbs#lib/rbs/ast/visitor.rb:112 + def visit_member_public(node); end +end + +# pkg:gem/rbs#lib/rbs/ancestor_graph.rb:4 +class RBS::AncestorGraph + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:13 + def initialize(env:, ancestor_builder: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:9 + def ancestor_builder; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:19 + def build; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:32 + def build_ancestors(node, ancestors); end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:11 + def children; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:64 + def each_ancestor(node, yielded: T.unsafe(nil), &block); end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:56 + def each_child(node, &block); end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:78 + def each_descendant(node, yielded: T.unsafe(nil), &block); end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:48 + def each_parent(node, &block); end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:8 + def env; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:10 + def parents; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:43 + def register(parent:, child:); end +end + +# pkg:gem/rbs#lib/rbs/ancestor_graph.rb:5 +class RBS::AncestorGraph::InstanceNode < ::Struct + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:5 + def type_name; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:5 + def type_name=(_); end + + class << self + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:5 + def [](*_arg0); end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:5 + def inspect; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:5 + def keyword_init?; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:5 + def members; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:5 + def new(*_arg0); end + end +end + +# pkg:gem/rbs#lib/rbs/ancestor_graph.rb:6 +class RBS::AncestorGraph::SingletonNode < ::Struct + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:6 + def type_name; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:6 + def type_name=(_); end + + class << self + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:6 + def [](*_arg0); end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:6 + def inspect; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:6 + def keyword_init?; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:6 + def members; end + + # pkg:gem/rbs#lib/rbs/ancestor_graph.rb:6 + def new(*_arg0); end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:19 +class RBS::BaseError < ::StandardError; end + +# pkg:gem/rbs#lib/rbs/buffer.rb:4 +class RBS::Buffer + # pkg:gem/rbs#lib/rbs/buffer.rb:9 + def initialize(content:, name: T.unsafe(nil), parent: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/buffer.rb:168 + def absolute_position(position); end + + # pkg:gem/rbs#lib/rbs/buffer.rb:90 + def character_offset(byte_offset); end + + # pkg:gem/rbs#lib/rbs/buffer.rb:6 + def content; end + + # pkg:gem/rbs#lib/rbs/buffer.rb:185 + def detach; end + + # pkg:gem/rbs#lib/rbs/buffer.rb:86 + def inspect; end + + # pkg:gem/rbs#lib/rbs/buffer.rb:78 + def last_position; end + + # pkg:gem/rbs#lib/rbs/buffer.rb:26 + def line_count; end + + # pkg:gem/rbs#lib/rbs/buffer.rb:22 + def lines; end + + # pkg:gem/rbs#lib/rbs/buffer.rb:68 + def loc_to_pos(loc); end + + # pkg:gem/rbs#lib/rbs/buffer.rb:5 + def name; end + + # pkg:gem/rbs#lib/rbs/buffer.rb:7 + def parent; end + + # pkg:gem/rbs#lib/rbs/buffer.rb:153 + def parent_buffer; end + + # pkg:gem/rbs#lib/rbs/buffer.rb:159 + def parent_position(position); end + + # pkg:gem/rbs#lib/rbs/buffer.rb:56 + def pos_to_loc(pos); end + + # pkg:gem/rbs#lib/rbs/buffer.rb:30 + def ranges; end + + # pkg:gem/rbs#lib/rbs/buffer.rb:114 + def rbs_location(location, loc2 = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/buffer.rb:123 + def sub_buffer(lines:, byte_lines_hint: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/buffer.rb:177 + def top_buffer; end +end + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:4 +module RBS::BuiltinNames; end + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:45 +RBS::BuiltinNames::Array = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:37 +RBS::BuiltinNames::BasicObject = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:43 +RBS::BuiltinNames::Class = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:41 +RBS::BuiltinNames::Comparable = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:42 +RBS::BuiltinNames::Enumerable = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:48 +RBS::BuiltinNames::Enumerator = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:55 +RBS::BuiltinNames::FalseClass = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:52 +RBS::BuiltinNames::Float = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:46 +RBS::BuiltinNames::Hash = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:51 +RBS::BuiltinNames::Integer = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:39 +RBS::BuiltinNames::Kernel = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:44 +RBS::BuiltinNames::Module = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:5 +class RBS::BuiltinNames::Name + # pkg:gem/rbs#lib/rbs/builtin_names.rb:8 + def initialize(name:); end + + # pkg:gem/rbs#lib/rbs/builtin_names.rb:16 + def instance_type(*args); end + + # pkg:gem/rbs#lib/rbs/builtin_names.rb:20 + def instance_type?(type); end + + # pkg:gem/rbs#lib/rbs/builtin_names.rb:6 + def name; end + + # pkg:gem/rbs#lib/rbs/builtin_names.rb:24 + def singleton_type; end + + # pkg:gem/rbs#lib/rbs/builtin_names.rb:28 + def singleton_type?(type); end + + # pkg:gem/rbs#lib/rbs/builtin_names.rb:12 + def to_s; end + + class << self + # pkg:gem/rbs#lib/rbs/builtin_names.rb:32 + def define(name, namespace: T.unsafe(nil)); end + end +end + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:56 +RBS::BuiltinNames::Numeric = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:38 +RBS::BuiltinNames::Object = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:47 +RBS::BuiltinNames::Range = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:53 +RBS::BuiltinNames::Regexp = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:49 +RBS::BuiltinNames::Set = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:40 +RBS::BuiltinNames::String = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:50 +RBS::BuiltinNames::Symbol = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/builtin_names.rb:54 +RBS::BuiltinNames::TrueClass = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# pkg:gem/rbs#lib/rbs/cli/colored_io.rb:4 +class RBS::CLI; end + +# pkg:gem/rbs#lib/rbs/cli/colored_io.rb:5 +class RBS::CLI::ColoredIO + # pkg:gem/rbs#lib/rbs/cli/colored_io.rb:8 + def initialize(stdout:); end + + # pkg:gem/rbs#lib/rbs/cli/colored_io.rb:28 + def puts(*, **, &); end + + # pkg:gem/rbs#lib/rbs/cli/colored_io.rb:20 + def puts_green(string); end + + # pkg:gem/rbs#lib/rbs/cli/colored_io.rb:12 + def puts_red(string); end + + # pkg:gem/rbs#lib/rbs/cli/colored_io.rb:6 + def stdout; end + + private + + # pkg:gem/rbs#lib/rbs/cli/colored_io.rb:43 + def are_colors_disabled?; end + + # pkg:gem/rbs#lib/rbs/cli/colored_io.rb:39 + def are_colors_supported?; end + + # https://github.com/rubygems/rubygems/blob/ed65279100234a17d65d71fe26de5083984ac5b8/bundler/lib/bundler/vendor/thor/lib/thor/shell/color.rb#L99-L109 + # + # pkg:gem/rbs#lib/rbs/cli/colored_io.rb:35 + def can_display_colors?; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:345 +class RBS::ClassInstanceVariableDuplicationError < ::RBS::VariableDuplicationError + # pkg:gem/rbs#lib/rbs/errors.rb:346 + def kind; end +end + +# pkg:gem/rbs#lib/rbs/collection/sources/base.rb:4 +module RBS::Collection; end + +# pkg:gem/rbs#lib/rbs/collection/cleaner.rb:5 +class RBS::Collection::Cleaner + # pkg:gem/rbs#lib/rbs/collection/cleaner.rb:8 + def initialize(lockfile_path:); end + + # pkg:gem/rbs#lib/rbs/collection/cleaner.rb:12 + def clean; end + + # pkg:gem/rbs#lib/rbs/collection/cleaner.rb:6 + def lock; end + + # pkg:gem/rbs#lib/rbs/collection/cleaner.rb:30 + def needed?(gem_name, version); end +end + +# This class represent the configuration file. +# +# pkg:gem/rbs#lib/rbs/collection/config.rb:7 +class RBS::Collection::Config + # pkg:gem/rbs#lib/rbs/collection/config.rb:49 + def initialize(data, config_path:); end + + # pkg:gem/rbs#lib/rbs/collection/config.rb:19 + def config_path; end + + # pkg:gem/rbs#lib/rbs/collection/config.rb:19 + def data; end + + # pkg:gem/rbs#lib/rbs/collection/config.rb:54 + def gem(gem_name); end + + # pkg:gem/rbs#lib/rbs/collection/config.rb:74 + def gems; end + + # pkg:gem/rbs#lib/rbs/collection/config.rb:58 + def repo_path; end + + # pkg:gem/rbs#lib/rbs/collection/config.rb:62 + def repo_path_data; end + + # pkg:gem/rbs#lib/rbs/collection/config.rb:66 + def sources; end + + class << self + # pkg:gem/rbs#lib/rbs/collection/config.rb:21 + def find_config_path; end + + # pkg:gem/rbs#lib/rbs/collection/config.rb:41 + def from_path(path); end + + # Generate a rbs lockfile from Gemfile.lock to `config_path`. + # If `with_lockfile` is true, it respects existing rbs lockfile. + # + # pkg:gem/rbs#lib/rbs/collection/config.rb:34 + def generate_lockfile(config_path:, definition:, with_lockfile: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/collection/config.rb:45 + def to_lockfile_path(config_path); end + end +end + +# pkg:gem/rbs#lib/rbs/collection/config.rb:8 +class RBS::Collection::Config::CollectionNotAvailable < ::StandardError + # pkg:gem/rbs#lib/rbs/collection/config.rb:9 + def initialize; end +end + +# pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:6 +class RBS::Collection::Config::Lockfile + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:9 + def initialize(lockfile_path:, path:, gemfile_lock_path:); end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:73 + def check_rbs_availability!; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:18 + def fullpath; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:22 + def gemfile_lock_fullpath; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:7 + def gemfile_lock_path; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:7 + def gems; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:65 + def library_data(lib); end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:7 + def lockfile_dir; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:7 + def lockfile_path; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:7 + def path; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:7 + def sources; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:28 + def to_lockfile; end + + class << self + # pkg:gem/rbs#lib/rbs/collection/config/lockfile.rb:42 + def from_lockfile(lockfile_path:, data:); end + end +end + +# pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:6 +class RBS::Collection::Config::LockfileGenerator + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:59 + def initialize(config:, definition:, with_lockfile:); end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:51 + def config; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:51 + def definition; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:51 + def existing_lockfile; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:51 + def gem_entries; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:51 + def gem_hash; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:87 + def generate; end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:51 + def lockfile; end + + private + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:120 + def assign_gem(name:, version:, skip: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:188 + def assign_stdlib(name:, from_gem: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:259 + def find_best_version(version:, versions:); end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:253 + def find_source(name:); end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:112 + def validate_gemfile_lock_path!(lock:, gemfile_lock_path:); end + + class << self + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:53 + def generate(config:, definition:, with_lockfile: T.unsafe(nil)); end + end +end + +# pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:7 +RBS::Collection::Config::LockfileGenerator::ALUMNI_STDLIBS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:35 +class RBS::Collection::Config::LockfileGenerator::GemfileLockMismatchError < ::StandardError + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:36 + def initialize(expected:, actual:); end + + # pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:41 + def message; end +end + +# pkg:gem/rbs#lib/rbs/collection/config/lockfile_generator.rb:24 +RBS::Collection::Config::LockfileGenerator::NONGEM_STDLIBS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rbs#lib/rbs/collection/config.rb:17 +RBS::Collection::Config::PATH = T.let(T.unsafe(nil), Pathname) + +# pkg:gem/rbs#lib/rbs/collection/installer.rb:5 +class RBS::Collection::Installer + # pkg:gem/rbs#lib/rbs/collection/installer.rb:9 + def initialize(lockfile_path:, stdout: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/collection/installer.rb:14 + def install_from_lockfile; end + + # pkg:gem/rbs#lib/rbs/collection/installer.rb:6 + def lockfile; end + + # pkg:gem/rbs#lib/rbs/collection/installer.rb:7 + def stdout; end +end + +# pkg:gem/rbs#lib/rbs/collection/sources/base.rb:5 +module RBS::Collection::Sources + class << self + # pkg:gem/rbs#lib/rbs/collection/sources.rb:12 + def from_config_entry(source_entry, base_directory:); end + end +end + +# pkg:gem/rbs#lib/rbs/collection/sources/base.rb:6 +module RBS::Collection::Sources::Base + # pkg:gem/rbs#lib/rbs/collection/sources/base.rb:7 + def dependencies_of(name, version); end +end + +# pkg:gem/rbs#lib/rbs/collection/sources/git.rb:11 +class RBS::Collection::Sources::Git + include ::RBS::Collection::Sources::Base + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:19 + def initialize(name:, revision:, remote:, repo_dir:); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:27 + def has?(name, version); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:44 + def install(dest:, name:, version:, stdout:); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:230 + def load_metadata(dir:); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:74 + def manifest_of(name, version); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:214 + def metadata_content(name:, version:); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:17 + def name; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:17 + def remote; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:17 + def repo_dir; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:179 + def resolved_revision; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:17 + def revision; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:114 + def to_lockfile; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:37 + def versions(name); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:222 + def write_metadata(dir:, name:, version:); end + + private + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:88 + def _install(dest:, name:, version:); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:190 + def commit_hash?; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:100 + def cp_r(src, dest); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:124 + def format_config_entry(name, version); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:175 + def gem_repo_dir; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:236 + def gems_versions; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:194 + def git(*cmd, **opt); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:198 + def git?(*cmd, **opt); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:165 + def git_dir; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:159 + def need_to_fetch?(revision); end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:131 + def setup!; end + + # pkg:gem/rbs#lib/rbs/collection/sources/git.rb:204 + def sh!(*cmd, **opt); end +end + +# pkg:gem/rbs#lib/rbs/collection/sources/git.rb:15 +class RBS::Collection::Sources::Git::CommandError < ::StandardError; end + +# pkg:gem/rbs#lib/rbs/collection/sources/git.rb:13 +RBS::Collection::Sources::Git::METADATA_FILENAME = T.let(T.unsafe(nil), String) + +# pkg:gem/rbs#lib/rbs/collection/sources/local.rb:6 +class RBS::Collection::Sources::Local + include ::RBS::Collection::Sources::Base + + # pkg:gem/rbs#lib/rbs/collection/sources/local.rb:11 + def initialize(path:, base_directory:); end + + # pkg:gem/rbs#lib/rbs/collection/sources/local.rb:9 + def full_path; end + + # pkg:gem/rbs#lib/rbs/collection/sources/local.rb:17 + def has?(name, version); end + + # Create a symlink instead of copying file to refer files in @path. + # By avoiding copying RBS files, the users do not need re-run `rbs collection install` + # when the RBS files are updated. + # + # pkg:gem/rbs#lib/rbs/collection/sources/local.rb:32 + def install(dest:, name:, version:, stdout:); end + + # pkg:gem/rbs#lib/rbs/collection/sources/local.rb:64 + def manifest_of(name, version); end + + # pkg:gem/rbs#lib/rbs/collection/sources/local.rb:9 + def path; end + + # pkg:gem/rbs#lib/rbs/collection/sources/local.rb:72 + def to_lockfile; end + + # pkg:gem/rbs#lib/rbs/collection/sources/local.rb:25 + def versions(name); end + + private + + # pkg:gem/rbs#lib/rbs/collection/sources/local.rb:59 + def _install(src, dst); end +end + +# Signatures that are included in gem package as sig/ directory. +# +# pkg:gem/rbs#lib/rbs/collection/sources/rubygems.rb:9 +class RBS::Collection::Sources::Rubygems + include ::RBS::Collection::Sources::Base + include ::Singleton::SingletonInstanceMethods + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # pkg:gem/rbs#lib/rbs/collection/sources/rubygems.rb:13 + def has?(name, version); end + + # pkg:gem/rbs#lib/rbs/collection/sources/rubygems.rb:23 + def install(dest:, name:, version:, stdout:); end + + # pkg:gem/rbs#lib/rbs/collection/sources/rubygems.rb:29 + def manifest_of(name, version); end + + # pkg:gem/rbs#lib/rbs/collection/sources/rubygems.rb:36 + def to_lockfile; end + + # pkg:gem/rbs#lib/rbs/collection/sources/rubygems.rb:17 + def versions(name); end + + private + + # pkg:gem/rbs#lib/rbs/collection/sources/rubygems.rb:42 + def gem_sig_path(name, version); end + + class << self + private + + # pkg:gem/rbs#lib/rbs/collection/sources/rubygems.rb:11 + def allocate; end + + # pkg:gem/rbs#lib/rbs/collection/sources/rubygems.rb:11 + def new(*_arg0); end + end +end + +# signatures that are bundled in rbs gem under the stdlib/ directory +# +# pkg:gem/rbs#lib/rbs/collection/sources/stdlib.rb:9 +class RBS::Collection::Sources::Stdlib + include ::RBS::Collection::Sources::Base + include ::Singleton::SingletonInstanceMethods + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # pkg:gem/rbs#lib/rbs/collection/sources/stdlib.rb:15 + def has?(name, version); end + + # pkg:gem/rbs#lib/rbs/collection/sources/stdlib.rb:23 + def install(dest:, name:, version:, stdout:); end + + # pkg:gem/rbs#lib/rbs/collection/sources/stdlib.rb:29 + def manifest_of(name, version); end + + # pkg:gem/rbs#lib/rbs/collection/sources/stdlib.rb:38 + def to_lockfile; end + + # pkg:gem/rbs#lib/rbs/collection/sources/stdlib.rb:19 + def versions(name); end + + private + + # pkg:gem/rbs#lib/rbs/collection/sources/stdlib.rb:44 + def lookup(name, version); end + + class << self + private + + # pkg:gem/rbs#lib/rbs/collection/sources/stdlib.rb:11 + def allocate; end + + # pkg:gem/rbs#lib/rbs/collection/sources/stdlib.rb:11 + def new(*_arg0); end + end +end + +# pkg:gem/rbs#lib/rbs/collection/sources/stdlib.rb:13 +RBS::Collection::Sources::Stdlib::REPO = T.let(T.unsafe(nil), RBS::Repository) + +# pkg:gem/rbs#lib/rbs/constant.rb:4 +class RBS::Constant + # pkg:gem/rbs#lib/rbs/constant.rb:9 + def initialize(name:, type:, entry:); end + + # pkg:gem/rbs#lib/rbs/constant.rb:15 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/constant.rb:7 + def entry; end + + # pkg:gem/rbs#lib/rbs/constant.rb:22 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/constant.rb:24 + def hash; end + + # pkg:gem/rbs#lib/rbs/constant.rb:5 + def name; end + + # pkg:gem/rbs#lib/rbs/constant.rb:6 + def type; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:598 +class RBS::CyclicClassAliasDefinitionError < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:603 + def initialize(entry); end + + # pkg:gem/rbs#lib/rbs/errors.rb:601 + def alias_entry; end + + # pkg:gem/rbs#lib/rbs/errors.rb:609 + def location; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:559 +class RBS::CyclicTypeParameterBound < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:564 + def initialize(type_name:, method_name:, params:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:562 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:562 + def method_name; end + + # pkg:gem/rbs#lib/rbs/errors.rb:562 + def params; end + + # pkg:gem/rbs#lib/rbs/errors.rb:562 + def type_name; end +end + +# pkg:gem/rbs#lib/rbs/definition.rb:4 +class RBS::Definition + # pkg:gem/rbs#lib/rbs/definition.rb:302 + def initialize(type_name:, entry:, self_type:, ancestors:); end + + # pkg:gem/rbs#lib/rbs/definition.rb:296 + def ancestors; end + + # pkg:gem/rbs#lib/rbs/definition.rb:325 + def class?; end + + # pkg:gem/rbs#lib/rbs/definition.rb:342 + def class_type?; end + + # pkg:gem/rbs#lib/rbs/definition.rb:300 + def class_variables; end + + # pkg:gem/rbs#lib/rbs/definition.rb:389 + def each_type(&block); end + + # pkg:gem/rbs#lib/rbs/definition.rb:295 + def entry; end + + # pkg:gem/rbs#lib/rbs/definition.rb:346 + def instance_type?; end + + # pkg:gem/rbs#lib/rbs/definition.rb:299 + def instance_variables; end + + # pkg:gem/rbs#lib/rbs/definition.rb:333 + def interface?; end + + # pkg:gem/rbs#lib/rbs/definition.rb:350 + def interface_type?; end + + # pkg:gem/rbs#lib/rbs/definition.rb:379 + def map_method_type(&block); end + + # pkg:gem/rbs#lib/rbs/definition.rb:298 + def methods; end + + # pkg:gem/rbs#lib/rbs/definition.rb:329 + def module?; end + + # pkg:gem/rbs#lib/rbs/definition.rb:297 + def self_type; end + + # pkg:gem/rbs#lib/rbs/definition.rb:367 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/definition.rb:294 + def type_name; end + + # pkg:gem/rbs#lib/rbs/definition.rb:354 + def type_params; end + + # pkg:gem/rbs#lib/rbs/definition.rb:358 + def type_params_decl; end +end + +# pkg:gem/rbs#lib/rbs/definition.rb:209 +module RBS::Definition::Ancestor; end + +# pkg:gem/rbs#lib/rbs/definition.rb:210 +class RBS::Definition::Ancestor::Instance + # pkg:gem/rbs#lib/rbs/definition.rb:213 + def initialize(name:, args:, source:); end + + # pkg:gem/rbs#lib/rbs/definition.rb:219 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/definition.rb:211 + def args; end + + # pkg:gem/rbs#lib/rbs/definition.rb:223 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/definition.rb:225 + def hash; end + + # pkg:gem/rbs#lib/rbs/definition.rb:211 + def name; end + + # pkg:gem/rbs#lib/rbs/definition.rb:211 + def source; end +end + +# pkg:gem/rbs#lib/rbs/definition.rb:230 +class RBS::Definition::Ancestor::Singleton + # pkg:gem/rbs#lib/rbs/definition.rb:233 + def initialize(name:); end + + # pkg:gem/rbs#lib/rbs/definition.rb:237 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/definition.rb:241 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/definition.rb:243 + def hash; end + + # pkg:gem/rbs#lib/rbs/definition.rb:231 + def name; end +end + +# pkg:gem/rbs#lib/rbs/definition.rb:249 +class RBS::Definition::InstanceAncestors + # pkg:gem/rbs#lib/rbs/definition.rb:254 + def initialize(type_name:, params:, ancestors:); end + + # pkg:gem/rbs#lib/rbs/definition.rb:252 + def ancestors; end + + # pkg:gem/rbs#lib/rbs/definition.rb:260 + def apply(args, env:, location:); end + + # pkg:gem/rbs#lib/rbs/definition.rb:251 + def params; end + + # pkg:gem/rbs#lib/rbs/definition.rb:250 + def type_name; end +end + +# pkg:gem/rbs#lib/rbs/definition.rb:30 +class RBS::Definition::Method + # pkg:gem/rbs#lib/rbs/definition.rb:107 + def initialize(super_method:, defs:, accessibility:, alias_of:, annotations: T.unsafe(nil), alias_member: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/definition.rb:117 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/definition.rb:101 + def accessibility; end + + # pkg:gem/rbs#lib/rbs/definition.rb:105 + def alias_member; end + + # pkg:gem/rbs#lib/rbs/definition.rb:104 + def alias_of; end + + # pkg:gem/rbs#lib/rbs/definition.rb:103 + def annotations; end + + # pkg:gem/rbs#lib/rbs/definition.rb:151 + def comments; end + + # pkg:gem/rbs#lib/rbs/definition.rb:133 + def defined_in; end + + # pkg:gem/rbs#lib/rbs/definition.rb:100 + def defs; end + + # pkg:gem/rbs#lib/rbs/definition.rb:127 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/definition.rb:102 + def extra_annotations; end + + # pkg:gem/rbs#lib/rbs/definition.rb:129 + def hash; end + + # pkg:gem/rbs#lib/rbs/definition.rb:140 + def implemented_in; end + + # pkg:gem/rbs#lib/rbs/definition.rb:190 + def map_method_type(&block); end + + # pkg:gem/rbs#lib/rbs/definition.rb:176 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/definition.rb:183 + def map_type_bound(&block); end + + # pkg:gem/rbs#lib/rbs/definition.rb:155 + def members; end + + # pkg:gem/rbs#lib/rbs/definition.rb:147 + def method_types; end + + # pkg:gem/rbs#lib/rbs/definition.rb:163 + def private?; end + + # pkg:gem/rbs#lib/rbs/definition.rb:159 + def public?; end + + # pkg:gem/rbs#lib/rbs/definition.rb:167 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/definition.rb:99 + def super_method; end + + # pkg:gem/rbs#lib/rbs/definition.rb:196 + def update(super_method: T.unsafe(nil), defs: T.unsafe(nil), accessibility: T.unsafe(nil), alias_of: T.unsafe(nil), annotations: T.unsafe(nil), alias_member: T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/definition.rb:31 +class RBS::Definition::Method::TypeDef + # pkg:gem/rbs#lib/rbs/definition.rb:40 + def initialize(type:, member:, defined_in:, implemented_in:, overload_annotations: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/definition.rb:50 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/definition.rb:38 + def annotations; end + + # pkg:gem/rbs#lib/rbs/definition.rb:64 + def comment; end + + # pkg:gem/rbs#lib/rbs/definition.rb:34 + def defined_in; end + + # pkg:gem/rbs#lib/rbs/definition.rb:89 + def each_annotation(&block); end + + # pkg:gem/rbs#lib/rbs/definition.rb:58 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/definition.rb:60 + def hash; end + + # pkg:gem/rbs#lib/rbs/definition.rb:35 + def implemented_in; end + + # pkg:gem/rbs#lib/rbs/definition.rb:33 + def member; end + + # pkg:gem/rbs#lib/rbs/definition.rb:36 + def member_annotations; end + + # pkg:gem/rbs#lib/rbs/definition.rb:80 + def overload?; end + + # pkg:gem/rbs#lib/rbs/definition.rb:37 + def overload_annotations; end + + # pkg:gem/rbs#lib/rbs/definition.rb:32 + def type; end + + # pkg:gem/rbs#lib/rbs/definition.rb:73 + def update(type: T.unsafe(nil), member: T.unsafe(nil), defined_in: T.unsafe(nil), implemented_in: T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/definition.rb:284 +class RBS::Definition::SingletonAncestors + # pkg:gem/rbs#lib/rbs/definition.rb:288 + def initialize(type_name:, ancestors:); end + + # pkg:gem/rbs#lib/rbs/definition.rb:286 + def ancestors; end + + # pkg:gem/rbs#lib/rbs/definition.rb:285 + def type_name; end +end + +# pkg:gem/rbs#lib/rbs/definition.rb:5 +class RBS::Definition::Variable + # pkg:gem/rbs#lib/rbs/definition.rb:11 + def initialize(parent_variable:, type:, declared_in:, source:); end + + # pkg:gem/rbs#lib/rbs/definition.rb:8 + def declared_in; end + + # pkg:gem/rbs#lib/rbs/definition.rb:6 + def parent_variable; end + + # pkg:gem/rbs#lib/rbs/definition.rb:9 + def source; end + + # pkg:gem/rbs#lib/rbs/definition.rb:18 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/definition.rb:7 + def type; end +end + +# pkg:gem/rbs#lib/rbs/definition_builder.rb:4 +class RBS::DefinitionBuilder + # pkg:gem/rbs#lib/rbs/definition_builder.rb:14 + def initialize(env:, ancestor_builder: T.unsafe(nil), method_builder: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:6 + def ancestor_builder; end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:198 + def build_instance(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:43 + def build_interface(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:330 + def build_singleton(type_name); end + + # Builds a definition for singleton without .new method. + # + # pkg:gem/rbs#lib/rbs/definition_builder.rb:260 + def build_singleton0(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:85 + def define_instance(definition, type_name, subst, define_class_vars:); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:33 + def define_interface(definition, type_name, subst); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:698 + def define_method(methods, definition, method, subst, self_type_methods, defined_in:, implemented_in: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:25 + def ensure_namespace!(namespace, location:); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:5 + def env; end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:986 + def expand_alias(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:990 + def expand_alias1(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:997 + def expand_alias2(type_name, args); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:637 + def import_methods(definition, module_name, module_methods, interfaces_methods, subst, self_type_methods); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:586 + def insert_variable(type_name, variables, name:, type:, source:); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:9 + def instance_cache; end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:12 + def interface_cache; end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:456 + def interface_methods(interface_ancestors); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:7 + def method_builder; end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:11 + def singleton0_cache; end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:10 + def singleton_cache; end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:486 + def source_location(source, decl); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:976 + def special_accessibility(is_instance, method_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:66 + def tapp_subst(name, args); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:982 + def try_cache(type_name, cache:); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:1021 + def update(env:, except:, ancestor_builder:); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:476 + def validate_params_with(type_params, result:); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:1050 + def validate_type_name(name, location); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:504 + def validate_type_params(definition, ancestors:, methods:); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:1039 + def validate_type_presence(type); end + + # pkg:gem/rbs#lib/rbs/definition_builder.rb:597 + def validate_variable(var); end +end + +# pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:5 +class RBS::DefinitionBuilder::AncestorBuilder + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:162 + def initialize(env:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:151 + def env; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:667 + def fill_ancestor_source(ancestor, name:, source:, &block); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:495 + def instance_ancestors(type_name, building_ancestors: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:154 + def instance_ancestors_cache; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:631 + def interface_ancestors(type_name, building_ancestors: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:160 + def interface_ancestors_cache; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:480 + def mixin_ancestors(entry, type_name, included_modules:, included_interfaces:, extended_modules:, prepended_modules:, extended_interfaces:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:356 + def mixin_ancestors0(decl, type_name, align_params:, included_modules:, included_interfaces:, extended_modules:, prepended_modules:, extended_interfaces:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:198 + def one_instance_ancestors(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:153 + def one_instance_ancestors_cache; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:337 + def one_interface_ancestors(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:159 + def one_interface_ancestors_cache; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:283 + def one_singleton_ancestors(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:156 + def one_singleton_ancestors_cache; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:576 + def singleton_ancestors(type_name, building_ancestors: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:157 + def singleton_ancestors_cache; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:175 + def validate_super_class!(type_name, entry); end +end + +# pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:6 +class RBS::DefinitionBuilder::AncestorBuilder::OneAncestors + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:17 + def initialize(type_name:, params:, super_class:, self_types:, included_modules:, included_interfaces:, prepended_modules:, extended_modules:, extended_interfaces:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:29 + def each_ancestor(&block); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:86 + def each_extended_interface(&block); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:78 + def each_extended_module(&block); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:62 + def each_included_interface(&block); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:54 + def each_included_module(&block); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:70 + def each_prepended_module(&block); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:46 + def each_self_type(&block); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:15 + def extended_interfaces; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:14 + def extended_modules; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:12 + def included_interfaces; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:11 + def included_modules; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:8 + def params; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:13 + def prepended_modules; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:10 + def self_types; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:9 + def super_class; end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:7 + def type_name; end + + class << self + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:94 + def class_instance(type_name:, params:, super_class:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:136 + def interface(type_name:, params:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:122 + def module_instance(type_name:, params:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/ancestor_builder.rb:108 + def singleton(type_name:, super_class:); end + end +end + +# pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:5 +class RBS::DefinitionBuilder::MethodBuilder + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:91 + def initialize(env:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:217 + def build_alias(methods, type, member:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:222 + def build_attribute(methods, type, member:, accessibility:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:99 + def build_instance(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:197 + def build_interface(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:256 + def build_method(methods, type, member:, accessibility:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:238 + def build_ruby_attribute(methods, type, member:, accessibility:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:164 + def build_singleton(type_name); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:267 + def each_rbs_member_with_accessibility(members, accessibility: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:86 + def env; end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:87 + def instance_methods; end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:89 + def interface_methods; end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:88 + def singleton_methods; end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:280 + def update(env:, except:); end +end + +# pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:6 +class RBS::DefinitionBuilder::MethodBuilder::Methods + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:30 + def initialize(type:); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:49 + def each; end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:28 + def methods; end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:27 + def type; end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:35 + def validate!; end +end + +# pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:7 +class RBS::DefinitionBuilder::MethodBuilder::Methods::Definition < ::Struct + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:14 + def accessibility; end + + # @implements Definition + # + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:10 + def original; end + + class << self + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:22 + def empty(name:, type:); end + end +end + +# pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:63 +class RBS::DefinitionBuilder::MethodBuilder::Methods::Sorter + include ::TSort + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:68 + def initialize(methods); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:66 + def methods; end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:76 + def tsort_each_child(defn); end + + # pkg:gem/rbs#lib/rbs/definition_builder/method_builder.rb:72 + def tsort_each_node(&block); end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:21 +class RBS::DefinitionError < ::RBS::BaseError; end + +# pkg:gem/rbs#lib/rbs/errors.rb:23 +module RBS::DetailedMessageable + # pkg:gem/rbs#lib/rbs/errors.rb:24 + def detailed_message(highlight: T.unsafe(nil), **); end +end + +# pkg:gem/rbs#lib/rbs/diff.rb:4 +class RBS::Diff + # pkg:gem/rbs#lib/rbs/diff.rb:5 + def initialize(type_name:, library_options:, after_path: T.unsafe(nil), before_path: T.unsafe(nil), detail: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/diff.rb:13 + def each_diff(&block); end + + private + + # pkg:gem/rbs#lib/rbs/diff.rb:96 + def build_builder(env); end + + # pkg:gem/rbs#lib/rbs/diff.rb:77 + def build_env(path); end + + # pkg:gem/rbs#lib/rbs/diff.rb:49 + def build_methods(path); end + + # pkg:gem/rbs#lib/rbs/diff.rb:122 + def constant_to_s(constant); end + + # pkg:gem/rbs#lib/rbs/diff.rb:100 + def definition_method_to_s(key, kind, definition_method); end + + # pkg:gem/rbs#lib/rbs/diff.rb:38 + def each_diff_constants(before_constant_children, after_constant_children); end + + # pkg:gem/rbs#lib/rbs/diff.rb:27 + def each_diff_methods(kind, before_methods, after_methods); end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:419 +class RBS::DuplicatedDeclarationError < ::RBS::LoadingError + # pkg:gem/rbs#lib/rbs/errors.rb:423 + def initialize(name, *decls); end + + # pkg:gem/rbs#lib/rbs/errors.rb:421 + def decls; end + + # pkg:gem/rbs#lib/rbs/errors.rb:420 + def name; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:292 +class RBS::DuplicatedInterfaceMethodDefinitionError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:299 + def initialize(type:, method_name:, member:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:307 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:297 + def member; end + + # pkg:gem/rbs#lib/rbs/errors.rb:296 + def method_name; end + + # pkg:gem/rbs#lib/rbs/errors.rb:311 + def qualified_method_name; end + + # pkg:gem/rbs#lib/rbs/errors.rb:295 + def type; end + + # pkg:gem/rbs#lib/rbs/errors.rb:320 + def type_name; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:251 +class RBS::DuplicatedMethodDefinitionError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:258 + def initialize(type:, method_name:, members:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:283 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:256 + def members; end + + # pkg:gem/rbs#lib/rbs/errors.rb:255 + def method_name; end + + # pkg:gem/rbs#lib/rbs/errors.rb:287 + def other_locations; end + + # pkg:gem/rbs#lib/rbs/errors.rb:270 + def qualified_method_name; end + + # pkg:gem/rbs#lib/rbs/errors.rb:254 + def type; end + + # pkg:gem/rbs#lib/rbs/errors.rb:279 + def type_name; end +end + +# pkg:gem/rbs#lib/rbs/environment.rb:4 +class RBS::Environment + # pkg:gem/rbs#lib/rbs/environment.rb:48 + def initialize; end + + # pkg:gem/rbs#lib/rbs/environment.rb:988 + def absolute_type(resolver, map, type, context:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:983 + def absolute_type_name(resolver, map, type_name, context:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:455 + def add_source(source); end + + # pkg:gem/rbs#lib/rbs/environment.rb:568 + def append_context(context, decl); end + + # pkg:gem/rbs#lib/rbs/environment.rb:999 + def buffers; end + + # pkg:gem/rbs#lib/rbs/environment.rb:117 + def class_alias?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:10 + def class_alias_decls; end + + # pkg:gem/rbs#lib/rbs/environment.rb:101 + def class_decl?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:5 + def class_decls; end + + # pkg:gem/rbs#lib/rbs/environment.rb:125 + def class_entry(type_name, normalized: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/environment.rb:97 + def constant_decl?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:8 + def constant_decls; end + + # pkg:gem/rbs#lib/rbs/environment.rb:167 + def constant_entry(type_name, normalized: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/environment.rb:93 + def constant_name?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:14 + def declarations; end + + # pkg:gem/rbs#lib/rbs/environment.rb:470 + def each_rbs_source(&block); end + + # pkg:gem/rbs#lib/rbs/environment.rb:482 + def each_ruby_source(&block); end + + # pkg:gem/rbs#lib/rbs/environment.rb:9 + def global_decls; end + + # pkg:gem/rbs#lib/rbs/environment.rb:277 + def insert_rbs_decl(decl, context:, namespace:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:374 + def insert_ruby_decl(decl, context:, namespace:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:994 + def inspect; end + + # pkg:gem/rbs#lib/rbs/environment.rb:6 + def interface_decls; end + + # pkg:gem/rbs#lib/rbs/environment.rb:75 + def interface_name?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:109 + def module_alias?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:154 + def module_class_entry(type_name, normalized: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/environment.rb:105 + def module_decl?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:132 + def module_entry(type_name, normalized: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/environment.rb:83 + def module_name?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:269 + def normalize_module_name(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:273 + def normalize_module_name!(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:241 + def normalize_module_name?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:219 + def normalize_type_name(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:206 + def normalize_type_name!(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:187 + def normalize_type_name?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:139 + def normalized_class_entry(type_name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:163 + def normalized_module_class_entry(type_name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:150 + def normalized_module_entry(type_name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:236 + def normalized_type_name!(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:223 + def normalized_type_name?(type_name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:577 + def resolve_declaration(resolver, map, decl, context:, prefix:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:869 + def resolve_member(resolver, map, member, context:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:969 + def resolve_method_type(resolver, map, type, context:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:713 + def resolve_ruby_decl(resolver, decl, context:, prefix:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:790 + def resolve_ruby_member(resolver, member, context:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:500 + def resolve_signature(resolver, table, dirs, decls, only: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/environment.rb:522 + def resolve_type_names(only: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/environment.rb:977 + def resolve_type_params(resolver, map, params, context:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:562 + def resolver_context(*nesting); end + + # pkg:gem/rbs#lib/rbs/environment.rb:12 + def sources; end + + # pkg:gem/rbs#lib/rbs/environment.rb:7 + def type_alias_decls; end + + # pkg:gem/rbs#lib/rbs/environment.rb:79 + def type_alias_name?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:87 + def type_name?(name); end + + # pkg:gem/rbs#lib/rbs/environment.rb:1003 + def unload(paths); end + + # pkg:gem/rbs#lib/rbs/environment.rb:494 + def validate_type_params; end + + private + + # pkg:gem/rbs#lib/rbs/environment.rb:59 + def initialize_copy(other); end + + class << self + # pkg:gem/rbs#lib/rbs/environment.rb:69 + def from_loader(loader); end + end +end + +# pkg:gem/rbs#lib/rbs/environment.rb:33 +class RBS::Environment::ClassAliasEntry < ::RBS::Environment::SingleEntry; end + +# pkg:gem/rbs#lib/rbs/environment/class_entry.rb:5 +class RBS::Environment::ClassEntry + # pkg:gem/rbs#lib/rbs/environment/class_entry.rb:10 + def initialize(name); end + + # pkg:gem/rbs#lib/rbs/environment/class_entry.rb:15 + def <<(context_decl); end + + # pkg:gem/rbs#lib/rbs/environment/class_entry.rb:68 + def align_params(decl); end + + # pkg:gem/rbs#lib/rbs/environment/class_entry.rb:8 + def context_decls; end + + # pkg:gem/rbs#lib/rbs/environment/class_entry.rb:21 + def each_decl(&block); end + + # pkg:gem/rbs#lib/rbs/environment/class_entry.rb:31 + def empty?; end + + # pkg:gem/rbs#lib/rbs/environment/class_entry.rb:6 + def name; end + + # pkg:gem/rbs#lib/rbs/environment/class_entry.rb:35 + def primary_decl; end + + # pkg:gem/rbs#lib/rbs/environment/class_entry.rb:47 + def type_params; end + + # pkg:gem/rbs#lib/rbs/environment/class_entry.rb:52 + def validate_type_params; end +end + +# pkg:gem/rbs#lib/rbs/environment.rb:42 +class RBS::Environment::ConstantEntry < ::RBS::Environment::SingleEntry; end + +# pkg:gem/rbs#lib/rbs/environment.rb:45 +class RBS::Environment::GlobalEntry < ::RBS::Environment::SingleEntry; end + +# pkg:gem/rbs#lib/rbs/environment.rb:36 +class RBS::Environment::InterfaceEntry < ::RBS::Environment::SingleEntry; end + +# pkg:gem/rbs#lib/rbs/environment.rb:30 +class RBS::Environment::ModuleAliasEntry < ::RBS::Environment::SingleEntry; end + +# pkg:gem/rbs#lib/rbs/environment/module_entry.rb:5 +class RBS::Environment::ModuleEntry + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:10 + def initialize(name); end + + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:15 + def <<(context_decl); end + + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:62 + def align_params(decl); end + + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:8 + def context_decls; end + + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:20 + def each_decl(&block); end + + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:30 + def empty?; end + + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:6 + def name; end + + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:34 + def primary_decl; end + + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:43 + def self_types; end + + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:38 + def type_params; end + + # pkg:gem/rbs#lib/rbs/environment/module_entry.rb:74 + def validate_type_params; end +end + +# pkg:gem/rbs#lib/rbs/environment.rb:18 +class RBS::Environment::SingleEntry + # pkg:gem/rbs#lib/rbs/environment.rb:23 + def initialize(name:, decl:, context:); end + + # pkg:gem/rbs#lib/rbs/environment.rb:20 + def context; end + + # pkg:gem/rbs#lib/rbs/environment.rb:21 + def decl; end + + # pkg:gem/rbs#lib/rbs/environment.rb:19 + def name; end +end + +# pkg:gem/rbs#lib/rbs/environment.rb:39 +class RBS::Environment::TypeAliasEntry < ::RBS::Environment::SingleEntry; end + +# pkg:gem/rbs#lib/rbs/environment/use_map.rb:5 +class RBS::Environment::UseMap + # pkg:gem/rbs#lib/rbs/environment/use_map.rb:30 + def initialize(table:); end + + # pkg:gem/rbs#lib/rbs/environment/use_map.rb:36 + def build_map(clause); end + + # pkg:gem/rbs#lib/rbs/environment/use_map.rb:72 + def resolve(type_name); end + + # pkg:gem/rbs#lib/rbs/environment/use_map.rb:53 + def resolve?(type_name); end + + # pkg:gem/rbs#lib/rbs/environment/use_map.rb:28 + def use_dirs; end +end + +# pkg:gem/rbs#lib/rbs/environment/use_map.rb:6 +class RBS::Environment::UseMap::Table + # pkg:gem/rbs#lib/rbs/environment/use_map.rb:9 + def initialize; end + + # pkg:gem/rbs#lib/rbs/environment/use_map.rb:7 + def children; end + + # pkg:gem/rbs#lib/rbs/environment/use_map.rb:14 + def compute_children; end + + # pkg:gem/rbs#lib/rbs/environment/use_map.rb:7 + def known_types; end +end + +# pkg:gem/rbs#lib/rbs/environment_loader.rb:4 +class RBS::EnvironmentLoader + include ::RBS::FileFinder + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:40 + def initialize(core_root: T.unsafe(nil), repository: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:48 + def add(path: T.unsafe(nil), library: T.unsafe(nil), version: T.unsafe(nil), resolve_dependencies: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:74 + def add_collection(lockfile); end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:20 + def core_root; end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:24 + def dirs; end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:125 + def each_dir; end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:148 + def each_signature; end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:98 + def has_library?(library:, version:); end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:23 + def libs; end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:106 + def load(env:); end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:21 + def repository; end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:59 + def resolve_dependencies(library:, version:); end + + class << self + # pkg:gem/rbs#lib/rbs/environment_loader.rb:28 + def gem_sig_path(name, version); end + end +end + +# pkg:gem/rbs#lib/rbs/environment_loader.rb:26 +RBS::EnvironmentLoader::DEFAULT_CORE_ROOT = T.let(T.unsafe(nil), Pathname) + +# pkg:gem/rbs#lib/rbs/environment_loader.rb:17 +class RBS::EnvironmentLoader::Library < ::Struct; end + +# pkg:gem/rbs#lib/rbs/environment_loader.rb:5 +class RBS::EnvironmentLoader::UnknownLibraryError < ::StandardError + # pkg:gem/rbs#lib/rbs/environment_loader.rb:8 + def initialize(lib:); end + + # pkg:gem/rbs#lib/rbs/environment_loader.rb:6 + def library; end +end + +# pkg:gem/rbs#lib/rbs/environment_walker.rb:4 +class RBS::EnvironmentWalker + include ::TSort + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:11 + def initialize(env:); end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:16 + def builder; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:99 + def each_type_name(type, &block); end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:105 + def each_type_node(type, &block); end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:9 + def env; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:20 + def only_ancestors!(only = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:25 + def only_ancestors?; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:44 + def tsort_each_child(node, &block); end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:31 + def tsort_each_node(&block); end +end + +# pkg:gem/rbs#lib/rbs/environment_walker.rb:5 +class RBS::EnvironmentWalker::InstanceNode < ::Struct + # pkg:gem/rbs#lib/rbs/environment_walker.rb:5 + def type_name; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:5 + def type_name=(_); end + + class << self + # pkg:gem/rbs#lib/rbs/environment_walker.rb:5 + def [](*_arg0); end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:5 + def inspect; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:5 + def keyword_init?; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:5 + def members; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:5 + def new(*_arg0); end + end +end + +# pkg:gem/rbs#lib/rbs/environment_walker.rb:6 +class RBS::EnvironmentWalker::SingletonNode < ::Struct + # pkg:gem/rbs#lib/rbs/environment_walker.rb:6 + def type_name; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:6 + def type_name=(_); end + + class << self + # pkg:gem/rbs#lib/rbs/environment_walker.rb:6 + def [](*_arg0); end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:6 + def inspect; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:6 + def keyword_init?; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:6 + def members; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:6 + def new(*_arg0); end + end +end + +# pkg:gem/rbs#lib/rbs/environment_walker.rb:7 +class RBS::EnvironmentWalker::TypeNameNode < ::Struct + # pkg:gem/rbs#lib/rbs/environment_walker.rb:7 + def type_name; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:7 + def type_name=(_); end + + class << self + # pkg:gem/rbs#lib/rbs/environment_walker.rb:7 + def [](*_arg0); end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:7 + def inspect; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:7 + def keyword_init?; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:7 + def members; end + + # pkg:gem/rbs#lib/rbs/environment_walker.rb:7 + def new(*_arg0); end + end +end + +# pkg:gem/rbs#lib/rbs/factory.rb:4 +class RBS::Factory + # pkg:gem/rbs#lib/rbs/factory.rb:5 + def type_name(string); end +end + +# pkg:gem/rbs#lib/rbs/file_finder.rb:4 +module RBS::FileFinder + class << self + # pkg:gem/rbs#lib/rbs/file_finder.rb:7 + def each_file(path, skip_hidden:, immediate: T.unsafe(nil), &block); end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:407 +class RBS::GenericParameterMismatchError < ::RBS::LoadingError + # pkg:gem/rbs#lib/rbs/errors.rb:411 + def initialize(name:, decl:, location: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/errors.rb:409 + def decl; end + + # pkg:gem/rbs#lib/rbs/errors.rb:408 + def name; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:574 +class RBS::InconsistentClassModuleAliasError < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:579 + def initialize(entry); end + + # pkg:gem/rbs#lib/rbs/errors.rb:577 + def alias_entry; end + + # pkg:gem/rbs#lib/rbs/errors.rb:593 + def location; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:187 +class RBS::InheritModuleError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:192 + def initialize(super_decl); end + + # pkg:gem/rbs#lib/rbs/errors.rb:198 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:190 + def super_decl; end + + class << self + # pkg:gem/rbs#lib/rbs/errors.rb:202 + def check!(super_decl, env:); end + end +end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:4 +class RBS::InlineParser + class << self + # pkg:gem/rbs#lib/rbs/inline_parser.rb:45 + def parse(buffer, prism); end + end +end + +# pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:5 +class RBS::InlineParser::CommentAssociation + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:8 + def initialize(blocks); end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:6 + def associated_blocks; end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:6 + def blocks; end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:84 + def each_enclosed_block(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:104 + def each_unassociated_block; end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:6 + def end_line_map; end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:47 + def leading_block(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:55 + def leading_block!(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:6 + def start_line_map; end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:63 + def trailing_block(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:76 + def trailing_block!(node); end + + class << self + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:24 + def build(buffer, result); end + end +end + +# pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:29 +class RBS::InlineParser::CommentAssociation::Reference + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:32 + def initialize(block, association); end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:37 + def associate!; end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:42 + def associated?; end + + # pkg:gem/rbs#lib/rbs/inline_parser/comment_association.rb:30 + def block; end +end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:20 +module RBS::InlineParser::Diagnostic; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:38 +class RBS::InlineParser::Diagnostic::AnnotationSyntaxError < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:41 +class RBS::InlineParser::Diagnostic::AttributeNonSymbolName < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:21 +class RBS::InlineParser::Diagnostic::Base + # pkg:gem/rbs#lib/rbs/inline_parser.rb:24 + def initialize(location, message); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:22 + def location; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:22 + def message; end +end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:42 +class RBS::InlineParser::Diagnostic::ClassModuleAliasDeclarationMissingTypeName < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:39 +class RBS::InlineParser::Diagnostic::MixinMultipleArguments < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:40 +class RBS::InlineParser::Diagnostic::MixinNonConstantModule < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:31 +class RBS::InlineParser::Diagnostic::NonConstantClassName < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:36 +class RBS::InlineParser::Diagnostic::NonConstantConstantDeclaration < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:32 +class RBS::InlineParser::Diagnostic::NonConstantModuleName < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:33 +class RBS::InlineParser::Diagnostic::NonConstantSuperClassName < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:30 +class RBS::InlineParser::Diagnostic::NotImplementedYet < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:35 +class RBS::InlineParser::Diagnostic::TopLevelAttributeDefinition < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:34 +class RBS::InlineParser::Diagnostic::TopLevelMethodDefinition < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:37 +class RBS::InlineParser::Diagnostic::UnusedInlineAnnotation < ::RBS::InlineParser::Diagnostic::Base; end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:57 +class RBS::InlineParser::Parser < ::Prism::Visitor + include ::RBS::AST::Ruby::Helpers::ConstantHelper + include ::RBS::AST::Ruby::Helpers::LocationHelper + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:63 + def initialize(result); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:69 + def buffer; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:58 + def comments; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:73 + def current_module; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:77 + def current_module!; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:81 + def diagnostics; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:498 + def insert_declaration(decl); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:58 + def module_nesting; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:341 + def parse_attribute_call(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:401 + def parse_constant_declaration(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:285 + def parse_mixin_call(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:534 + def parse_super_class(super_class_expr, inheritance_operator_loc); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:85 + def push_module_nesting(mod); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:506 + def report_unused_annotation(*annotations); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:521 + def report_unused_block(block); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:58 + def result; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:92 + def skip_node?(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:243 + def visit_call_node(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:103 + def visit_class_node(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:167 + def visit_class_or_module_body(decl, node); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:279 + def visit_constant_path_write_node(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:272 + def visit_constant_write_node(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:202 + def visit_def_node(node); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:125 + def visit_module_node(node); end +end + +# pkg:gem/rbs#lib/rbs/inline_parser.rb:5 +class RBS::InlineParser::Result + # pkg:gem/rbs#lib/rbs/inline_parser.rb:8 + def initialize(buffer, prism); end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:6 + def buffer; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:6 + def declarations; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:6 + def diagnostics; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:6 + def prism_result; end + + # pkg:gem/rbs#lib/rbs/inline_parser.rb:15 + def type_fingerprint; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:341 +class RBS::InstanceVariableDuplicationError < ::RBS::VariableDuplicationError + # pkg:gem/rbs#lib/rbs/errors.rb:342 + def kind; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:378 +class RBS::InvalidOverloadMethodError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:386 + def initialize(type_name:, method_name:, kind:, members:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:383 + def kind; end + + # pkg:gem/rbs#lib/rbs/errors.rb:402 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:384 + def members; end + + # pkg:gem/rbs#lib/rbs/errors.rb:382 + def method_name; end + + # pkg:gem/rbs#lib/rbs/errors.rb:381 + def type_name; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:67 +class RBS::InvalidTypeApplicationError < ::RBS::DefinitionError + # pkg:gem/rbs#lib/rbs/errors.rb:74 + def initialize(type_name:, args:, params:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:69 + def args; end + + # pkg:gem/rbs#lib/rbs/errors.rb:72 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:70 + def params; end + + # pkg:gem/rbs#lib/rbs/errors.rb:68 + def type_name; end + + # pkg:gem/rbs#lib/rbs/errors.rb:71 + def type_params; end + + class << self + # pkg:gem/rbs#lib/rbs/errors.rb:83 + def check!(type_name:, args:, params:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:92 + def check2!(env:, type_name:, args:, location:); end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:432 +class RBS::InvalidVarianceAnnotationError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:439 + def initialize(type_name:, param:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:437 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:436 + def param; end + + # pkg:gem/rbs#lib/rbs/errors.rb:435 + def type_name; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:20 +class RBS::LoadingError < ::RBS::BaseError; end + +# Pure-Ruby implementation of the primitives that back RBS::Location. +# +# On CRuby these come from the C extension (ext/rbs_extension/legacy_location.c). +# JRuby loads this instead, before rbs/location_aux.rb layers the public API on +# top, so RBS::Location behaves identically without the native extension. +# +# pkg:gem/rbs#lib/rbs.rb:82 +class RBS::Location + # pkg:gem/rbs#lib/rbs.rb:82 + def initialize(_arg0, _arg1, _arg2); end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:79 + def ==(other); end + + # pkg:gem/rbs#lib/rbs.rb:82 + def [](_arg0); end + + # pkg:gem/rbs#lib/rbs.rb:82 + def _add_optional_child(_arg0, _arg1, _arg2); end + + # pkg:gem/rbs#lib/rbs.rb:82 + def _add_optional_no_child(_arg0); end + + # pkg:gem/rbs#lib/rbs.rb:82 + def _add_required_child(_arg0, _arg1, _arg2); end + + # pkg:gem/rbs#lib/rbs.rb:82 + def _end_pos; end + + # pkg:gem/rbs#lib/rbs.rb:82 + def _optional_keys; end + + # pkg:gem/rbs#lib/rbs.rb:82 + def _required_keys; end + + # pkg:gem/rbs#lib/rbs.rb:82 + def _start_pos; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:110 + def add_optional_child(name, range); end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:106 + def add_required_child(name, range); end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:27 + def aref(_arg0); end + + # pkg:gem/rbs#lib/rbs.rb:82 + def buffer; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:118 + def each_optional_key(&block); end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:126 + def each_required_key(&block); end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:55 + def end_column; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:51 + def end_line; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:63 + def end_loc; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:35 + def end_pos; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:5 + def inspect; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:134 + def key?(name); end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:146 + def local_location; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:166 + def local_source; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:39 + def name; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:138 + def optional_key?(name); end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:67 + def range; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:142 + def required_key?(name); end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:71 + def source; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:47 + def start_column; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:43 + def start_line; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:59 + def start_loc; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:31 + def start_pos; end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:86 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:75 + def to_s; end + + private + + # pkg:gem/rbs#lib/rbs.rb:82 + def initialize_copy(_arg0); end + + class << self + # pkg:gem/rbs#lib/rbs/location_aux.rb:16 + def new(buffer_ = T.unsafe(nil), start_pos_ = T.unsafe(nil), end_pos_ = T.unsafe(nil), buffer: T.unsafe(nil), start_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/location_aux.rb:102 + def to_string(location, default: T.unsafe(nil)); end + end +end + +# pkg:gem/rbs#lib/rbs/location_aux.rb:29 +RBS::Location::WithChildren = RBS::Location + +# pkg:gem/rbs#lib/rbs/locator.rb:4 +class RBS::Locator + # pkg:gem/rbs#lib/rbs/locator.rb:7 + def initialize(buffer:, dirs:, decls:); end + + # pkg:gem/rbs#lib/rbs/locator.rb:5 + def buffer; end + + # pkg:gem/rbs#lib/rbs/locator.rb:5 + def decls; end + + # pkg:gem/rbs#lib/rbs/locator.rb:5 + def dirs; end + + # pkg:gem/rbs#lib/rbs/locator.rb:13 + def find(line:, column:); end + + # pkg:gem/rbs#lib/rbs/locator.rb:29 + def find2(line:, column:); end + + # pkg:gem/rbs#lib/rbs/locator.rb:60 + def find_in_decl(pos, decl:, array:); end + + # pkg:gem/rbs#lib/rbs/locator.rb:42 + def find_in_directive(pos, dir, array); end + + # pkg:gem/rbs#lib/rbs/locator.rb:212 + def find_in_loc(pos, location:, array:); end + + # pkg:gem/rbs#lib/rbs/locator.rb:131 + def find_in_member(pos, member:, array:); end + + # pkg:gem/rbs#lib/rbs/locator.rb:154 + def find_in_method_type(pos, method_type:, array:); end + + # pkg:gem/rbs#lib/rbs/locator.rb:196 + def find_in_type(pos, type:, array:); end + + # pkg:gem/rbs#lib/rbs/locator.rb:172 + def find_in_type_param(pos, type_param:, array:); end + + # pkg:gem/rbs#lib/rbs/locator.rb:239 + def test_loc(pos, location:); end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:4 +module RBS::MethodNameHelper + # pkg:gem/rbs#lib/rbs/errors.rb:5 + def method_name_string; end +end + +# pkg:gem/rbs#lib/rbs/method_type.rb:4 +class RBS::MethodType + # pkg:gem/rbs#lib/rbs/method_type.rb:10 + def initialize(type_params:, type:, block:, location:); end + + # pkg:gem/rbs#lib/rbs/method_type.rb:17 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/method_type.rb:7 + def block; end + + # pkg:gem/rbs#lib/rbs/method_type.rb:86 + def each_type(&block); end + + # pkg:gem/rbs#lib/rbs/method_type.rb:59 + def free_variables(set = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/method_type.rb:127 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/method_type.rb:123 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/method_type.rb:8 + def location; end + + # pkg:gem/rbs#lib/rbs/method_type.rb:65 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/method_type.rb:74 + def map_type_bound(&block); end + + # pkg:gem/rbs#lib/rbs/method_type.rb:33 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/method_type.rb:24 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/method_type.rb:100 + def to_s; end + + # pkg:gem/rbs#lib/rbs/method_type.rb:6 + def type; end + + # pkg:gem/rbs#lib/rbs/method_type.rb:119 + def type_param_names; end + + # pkg:gem/rbs#lib/rbs/method_type.rb:5 + def type_params; end + + # pkg:gem/rbs#lib/rbs/method_type.rb:50 + def update(type_params: T.unsafe(nil), type: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/method_type.rb:131 + def with_nonreturn_void?; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:468 +class RBS::MixinClassError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:474 + def initialize(type_name:, member:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:481 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:472 + def member; end + + # pkg:gem/rbs#lib/rbs/errors.rb:471 + def type_name; end + + private + + # pkg:gem/rbs#lib/rbs/errors.rb:502 + def member_name(member); end + + # pkg:gem/rbs#lib/rbs/errors.rb:513 + def mixin_name; end + + class << self + # pkg:gem/rbs#lib/rbs/errors.rb:485 + def check!(type_name:, env:, member:); end + end +end + +# pkg:gem/rbs#lib/rbs/namespace.rb:4 +class RBS::Namespace + # pkg:gem/rbs#lib/rbs/namespace.rb:7 + def initialize(path:, absolute:); end + + # pkg:gem/rbs#lib/rbs/namespace.rb:55 + def +(other); end + + # pkg:gem/rbs#lib/rbs/namespace.rb:94 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/namespace.rb:82 + def absolute!; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:74 + def absolute?; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:63 + def append(component); end + + # pkg:gem/rbs#lib/rbs/namespace.rb:137 + def ascend; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:90 + def empty?; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:99 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/namespace.rb:101 + def hash; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:67 + def parent; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:5 + def path; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:86 + def relative!; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:78 + def relative?; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:105 + def split; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:111 + def to_s; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:120 + def to_type_name; end + + class << self + # Returns a canonical `Namespace` instance for the given `path` / + # `absolute` pair. Repeated calls with structurally equal arguments + # return the same object, so callers can rely on `equal?` for fast + # equality. The path Array is duplicated and frozen on insert. + # + # pkg:gem/rbs#lib/rbs/namespace.rb:24 + def [](path, absolute); end + + # pkg:gem/rbs#lib/rbs/namespace.rb:47 + def empty; end + + # pkg:gem/rbs#lib/rbs/namespace.rb:129 + def parse(string); end + + # pkg:gem/rbs#lib/rbs/namespace.rb:51 + def root; end + end +end + +# pkg:gem/rbs#lib/rbs/namespace.rb:18 +module RBS::Namespace::INTERN_LEAF; end + +# pkg:gem/rbs#lib/rbs/errors.rb:229 +class RBS::NoMixinFoundError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:235 + def initialize(type_name:, member:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:242 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:233 + def member; end + + # pkg:gem/rbs#lib/rbs/errors.rb:232 + def type_name; end + + class << self + # pkg:gem/rbs#lib/rbs/errors.rb:246 + def check!(type_name, env:, member:); end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:210 +class RBS::NoSelfTypeFoundError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:216 + def initialize(type_name:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:214 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:213 + def type_name; end + + class << self + # pkg:gem/rbs#lib/rbs/errors.rb:223 + def check!(self_type, env:); end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:167 +class RBS::NoSuperclassFoundError < ::RBS::DefinitionError + # pkg:gem/rbs#lib/rbs/errors.rb:171 + def initialize(type_name:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:169 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:168 + def type_name; end + + class << self + # pkg:gem/rbs#lib/rbs/errors.rb:178 + def check!(type_name, env:, location:); end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:148 +class RBS::NoTypeFoundError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:154 + def initialize(type_name:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:152 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:151 + def type_name; end + + class << self + # pkg:gem/rbs#lib/rbs/errors.rb:161 + def check!(type_name, env:, location:); end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:545 +class RBS::NonregularTypeAliasError < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:551 + def initialize(diagnostic:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:548 + def diagnostic; end + + # pkg:gem/rbs#lib/rbs/errors.rb:549 + def location; end +end + +# WebAssembly-backed implementation of the parser primitives. +# +# On CRuby these come from the C extension (ext/rbs_extension/main.c). JRuby +# loads this instead: it runs the parser inside WebAssembly, then rebuilds the +# AST with RBS::WASM::Deserializer. rbs/parser_aux.rb layers the public +# RBS::Parser API on top, exactly as it does for the C extension. +# +# pkg:gem/rbs#lib/rbs.rb:82 +class RBS::Parser + class << self + # pkg:gem/rbs#lib/rbs.rb:82 + def _lex(_arg0, _arg1); end + + # pkg:gem/rbs#lib/rbs.rb:82 + def _parse_inline_leading_annotation(_arg0, _arg1, _arg2, _arg3); end + + # pkg:gem/rbs#lib/rbs.rb:82 + def _parse_inline_trailing_annotation(_arg0, _arg1, _arg2, _arg3); end + + # pkg:gem/rbs#lib/rbs.rb:82 + def _parse_method_type(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5); end + + # pkg:gem/rbs#lib/rbs.rb:82 + def _parse_method_type_to_bytes(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5); end + + # pkg:gem/rbs#lib/rbs.rb:82 + def _parse_signature(_arg0, _arg1, _arg2, _arg3); end + + # pkg:gem/rbs#lib/rbs.rb:82 + def _parse_signature_to_bytes(_arg0, _arg1, _arg2, _arg3); end + + # pkg:gem/rbs#lib/rbs.rb:82 + def _parse_type(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7); end + + # pkg:gem/rbs#lib/rbs.rb:82 + def _parse_type_params(_arg0, _arg1, _arg2, _arg3); end + + # pkg:gem/rbs#lib/rbs.rb:82 + def _parse_type_to_bytes(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7); end + + # pkg:gem/rbs#lib/rbs/parser_aux.rb:79 + def buffer(source); end + + # pkg:gem/rbs#lib/rbs/parser_aux.rb:134 + def byte_range(char_range, content); end + + # pkg:gem/rbs#lib/rbs/parser_aux.rb:70 + def lex(source); end + + # pkg:gem/rbs#lib/rbs/parser_aux.rb:46 + def magic_comment(buf); end + + # pkg:gem/rbs#lib/rbs/parser_aux.rb:122 + def parse_inline_leading_annotation(source, range, variables: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/parser_aux.rb:128 + def parse_inline_trailing_annotation(source, range, variables: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/parser_aux.rb:14 + def parse_method_type(source, range: T.unsafe(nil), byte_range: T.unsafe(nil), variables: T.unsafe(nil), require_eof: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/parser_aux.rb:20 + def parse_signature(source); end + + # pkg:gem/rbs#lib/rbs/parser_aux.rb:8 + def parse_type(source, range: T.unsafe(nil), byte_range: T.unsafe(nil), variables: T.unsafe(nil), require_eof: T.unsafe(nil), void_allowed: T.unsafe(nil), self_allowed: T.unsafe(nil), classish_allowed: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/parser_aux.rb:41 + def parse_type_params(source, module_type_params: T.unsafe(nil)); end + end +end + +# pkg:gem/rbs#lib/rbs/parser_aux.rb:88 +RBS::Parser::KEYWORDS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rbs#lib/rbs/parser/lex_result.rb:5 +class RBS::Parser::LexResult + # pkg:gem/rbs#lib/rbs/parser/lex_result.rb:9 + def initialize(buffer:, value:); end + + # pkg:gem/rbs#lib/rbs/parser/lex_result.rb:6 + def buffer; end + + # pkg:gem/rbs#lib/rbs/parser/lex_result.rb:7 + def value; end +end + +# pkg:gem/rbs#lib/rbs/parser/token.rb:5 +class RBS::Parser::Token + # pkg:gem/rbs#lib/rbs/parser/token.rb:9 + def initialize(type:, location:); end + + # pkg:gem/rbs#lib/rbs/parser/token.rb:18 + def comment?; end + + # pkg:gem/rbs#lib/rbs/parser/token.rb:7 + def location; end + + # pkg:gem/rbs#lib/rbs/parser/token.rb:6 + def type; end + + # pkg:gem/rbs#lib/rbs/parser/token.rb:14 + def value; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:51 +class RBS::ParsingError < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:58 + def initialize(location, error_message, token_type); end + + # pkg:gem/rbs#lib/rbs/errors.rb:55 + def error_message; end + + # pkg:gem/rbs#lib/rbs/errors.rb:54 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:56 + def token_type; end +end + +# pkg:gem/rbs#lib/rbs/prototype/helpers.rb:4 +module RBS::Prototype; end + +# pkg:gem/rbs#lib/rbs/prototype/helpers.rb:5 +module RBS::Prototype::Helpers + private + + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:120 + def any_node?(node, nodes: T.unsafe(nil), &block); end + + # NOTE: args_node may be a nil by a bug + # https://bugs.ruby-lang.org/issues/17495 + # + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:144 + def args_from_node(args_node); end + + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:32 + def block_from_body(node); end + + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:108 + def each_child(node, &block); end + + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:112 + def each_node(nodes); end + + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:132 + def keyword_hash?(node); end + + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:8 + def parse_comments(string, include_trailing:); end + + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:148 + def symbol_literal_node?(node); end + + # pkg:gem/rbs#lib/rbs/prototype/helpers.rb:159 + def untyped; end +end + +# pkg:gem/rbs#lib/rbs/prototype/node_usage.rb:5 +class RBS::Prototype::NodeUsage + include ::RBS::Prototype::Helpers + + # pkg:gem/rbs#lib/rbs/prototype/node_usage.rb:10 + def initialize(node); end + + # pkg:gem/rbs#lib/rbs/prototype/node_usage.rb:25 + def calculate(node, conditional:); end + + # pkg:gem/rbs#lib/rbs/prototype/node_usage.rb:8 + def conditional_nodes; end + + # pkg:gem/rbs#lib/rbs/prototype/node_usage.rb:17 + def each_conditional_node(&block); end +end + +# pkg:gem/rbs#lib/rbs/prototype/rb.rb:5 +class RBS::Prototype::RB + include ::RBS::Prototype::Helpers + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:45 + def initialize; end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:536 + def block_type(node); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:516 + def body_type(node); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:431 + def const_to_name(node, context:); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:408 + def const_to_name!(node, context: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:747 + def current_accessibility(decls, index = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:49 + def decls; end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:787 + def find_def_index_by_name(decls, name); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:511 + def function_return_type_from_body(node); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:453 + def function_type_from_body(node, def_name); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:529 + def if_unless_type(node); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:783 + def is_accessibility?(decl); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:442 + def literal_to_symbol(node); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:550 + def literal_to_type(node); end + + # backward compatible + # + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:737 + def node_type(node, default: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:694 + def param_type(node, default: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:75 + def parse(string); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:739 + def private; end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:82 + def process(node, decls:, comments:, context:); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:402 + def process_children(node, decls:, comments:, context:); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:743 + def public; end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:674 + def range_element_type(types); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:757 + def remove_unnecessary_accessibility_methods!(decls); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:805 + def sort_members!(decls); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:42 + def source_decls; end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:43 + def toplevel_members; end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:663 + def types_to_union_type(types); end +end + +# pkg:gem/rbs#lib/rbs/prototype/rb.rb:8 +class RBS::Prototype::RB::Context < ::Struct + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:25 + def attribute_kind; end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:33 + def enter_namespace(namespace); end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:15 + def method_kind; end + + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:37 + def update(module_function: T.unsafe(nil), singleton: T.unsafe(nil), in_def: T.unsafe(nil)); end + + class << self + # @implements Context + # + # pkg:gem/rbs#lib/rbs/prototype/rb.rb:11 + def initial(namespace: T.unsafe(nil)); end + end +end + +# pkg:gem/rbs#lib/rbs/prototype/rbi.rb:5 +class RBS::Prototype::RBI + include ::RBS::Prototype::Helpers + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:22 + def initialize; end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:35 + def append_decl(decl); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:394 + def attribute_type(kind, sigs); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:713 + def call_node?(node, name:, receiver: T.unsafe(nil), args: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:717 + def const_to_name(node); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:95 + def current_context; end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:99 + def current_context!; end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:87 + def current_module; end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:91 + def current_module!; end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:8 + def decls; end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:753 + def each_arg(array, &block); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:767 + def each_child(node); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:150 + def join_comments(nodes, comments); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:10 + def last_sig; end + + # Visibility of a member, given as `private def ...` in RBS + # + # Returns `nil` for members in a visibility _section_, which `sync_visibility` emits instead. + # + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:106 + def member_visibility(context); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:423 + def method_type(args_node, type_node, variables:, overloads:); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:9 + def modules; end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:775 + def node_to_hash(node); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:30 + def parse(string); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:496 + def parse_params(args_node, args, method_type, variables:, overloads:); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:144 + def pop_sig; end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:705 + def proc_type?(type_node); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:155 + def process(node, comments:, outer: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:359 + def process_attribute(node, comments:); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:336 + def process_visibility(node, outer:, comments:); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:43 + def push_class(name, super_class, comment:); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:65 + def push_module(name, comment:); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:136 + def push_sig(node); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:113 + def sync_visibility(visibility); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:621 + def type_of(type_node, variables:); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:636 + def type_of0(type_node, variables:); end +end + +# pkg:gem/rbs#lib/rbs/prototype/rbi.rb:12 +class RBS::Prototype::RBI::Context + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:16 + def initialize(singleton:, visibility:); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:13 + def singleton; end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:13 + def singleton=(_arg0); end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:14 + def visibility; end + + # pkg:gem/rbs#lib/rbs/prototype/rbi.rb:14 + def visibility=(_arg0); end +end + +# pkg:gem/rbs#lib/rbs/prototype/runtime/helpers.rb:5 +class RBS::Prototype::Runtime + include ::RBS::Prototype::Helpers + include ::RBS::Prototype::Runtime::Helpers + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:79 + def initialize(patterns:, env:, merge:, todo: T.unsafe(nil), owners_included: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:664 + def block_from_ast_of(method); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:111 + def builder; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:119 + def decls; end + + # Generate/find outer module declarations + # This is broken down into another method to comply with `DRY` + # This generates/finds declarations in nested form & returns the last array of declarations + # + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:593 + def ensure_outer_module_declarations(mod); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:73 + def env; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:498 + def generate_class(mod); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:435 + def generate_constants(mod, decls); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:311 + def generate_methods(mod, module_name, members); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:575 + def generate_mixin(mod, decl, type_name, type_name_absolute); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:537 + def generate_module(mod); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:483 + def generate_super_class(mod); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:74 + def merge; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:250 + def merge_rbs(module_name, members, instance: T.unsafe(nil), singleton: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:181 + def method_type(method); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:77 + def outline; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:77 + def outline=(_arg0); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:76 + def owners_included; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:115 + def parse(file); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:72 + def patterns; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:94 + def target?(const); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:298 + def target_method?(mod, instance: T.unsafe(nil), singleton: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:75 + def todo; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:107 + def todo_object; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:647 + def type_args(type_name); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:655 + def type_params(mod); end + + private + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:425 + def can_alias?(mod, method); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:139 + def each_mixined_module(type_name, mod); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:148 + def each_mixined_module_one(type_name, mod); end +end + +# pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:213 +class RBS::Prototype::Runtime::DataGenerator < ::RBS::Prototype::Runtime::ValueObjectBase + private + + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:228 + def add_decl_members(decl); end + + # def self.new: (untyped foo, untyped bar) -> instance + # | (foo: untyped, bar: untyped) -> instance + # + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:236 + def build_s_new; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:224 + def build_super_class; end + + class << self + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:214 + def generatable?(target); end + end +end + +# pkg:gem/rbs#lib/rbs/prototype/runtime/helpers.rb:6 +module RBS::Prototype::Runtime::Helpers + private + + # pkg:gem/rbs#lib/rbs/prototype/runtime/helpers.rb:19 + def const_name(const); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime/helpers.rb:15 + def const_name!(const); end + + # Returns the exact name & not compactly declared name + # + # pkg:gem/rbs#lib/rbs/prototype/runtime/helpers.rb:10 + def only_name(mod); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime/helpers.rb:37 + def to_type_name(name, full_name: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime/helpers.rb:53 + def untyped; end +end + +# pkg:gem/rbs#lib/rbs/prototype/runtime/reflection.rb:6 +module RBS::Prototype::Runtime::Reflection + class << self + # pkg:gem/rbs#lib/rbs/prototype/runtime/reflection.rb:12 + def constants_of(mod, inherit = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime/reflection.rb:7 + def object_class(value); end + end +end + +# pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:91 +class RBS::Prototype::Runtime::StructGenerator < ::RBS::Prototype::Runtime::ValueObjectBase + private + + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:108 + def add_decl_members(decl); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:165 + def build_overload_for_keyword_arguments; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:151 + def build_overload_for_positional_arguments; end + + # def self.keyword_init?: () -> bool? + # + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:180 + def build_s_keyword_init_p; end + + # def self.new: (?untyped foo, ?untyped bar) -> instance + # | (?foo: untyped, ?bar: untyped) -> instance + # + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:117 + def build_s_new; end + + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:104 + def build_super_class; end + + class << self + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:92 + def generatable?(target); end + end +end + +# pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:102 +RBS::Prototype::Runtime::StructGenerator::CAN_CALL_KEYWORD_INIT_P = T.let(T.unsafe(nil), TrueClass) + +# pkg:gem/rbs#lib/rbs/prototype/runtime.rb:10 +class RBS::Prototype::Runtime::Todo + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:11 + def initialize(builder:); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:50 + def skip_constant?(module_name:, name:); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:37 + def skip_instance_method?(module_name:, method:, accessibility:); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:15 + def skip_mixin?(type_name:, module_name:, mixin_class:); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:24 + def skip_singleton_method?(module_name:, method:, accessibility:); end + + private + + # pkg:gem/rbs#lib/rbs/prototype/runtime.rb:57 + def mixin_decls(type_name); end +end + +# pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:8 +class RBS::Prototype::Runtime::ValueObjectBase + include ::RBS::Prototype::Runtime::Helpers + + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:11 + def initialize(target_class); end + + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:15 + def build_decl; end + + private + + # attr_accessor foo: untyped + # + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:74 + def build_member_accessors(ast_members_class); end + + # def self.members: () -> [ :foo, :bar ] + # def members: () -> [ :foo, :bar ] + # + # pkg:gem/rbs#lib/rbs/prototype/runtime/value_object_generator.rb:35 + def build_s_members; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:448 +class RBS::RecursiveAliasDefinitionError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:454 + def initialize(type:, defs:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:452 + def defs; end + + # pkg:gem/rbs#lib/rbs/errors.rb:461 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:451 + def type; end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:110 +class RBS::RecursiveAncestorError < ::RBS::DefinitionError + # pkg:gem/rbs#lib/rbs/errors.rb:114 + def initialize(ancestors:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:111 + def ancestors; end + + # pkg:gem/rbs#lib/rbs/errors.rb:112 + def location; end + + class << self + # pkg:gem/rbs#lib/rbs/errors.rb:134 + def check!(self_ancestor, ancestors:, location:); end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:527 +class RBS::RecursiveTypeAliasError < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:533 + def initialize(alias_names:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:530 + def alias_names; end + + # pkg:gem/rbs#lib/rbs/errors.rb:531 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:540 + def name; end +end + +# pkg:gem/rbs#lib/rbs/repository.rb:4 +class RBS::Repository + # pkg:gem/rbs#lib/rbs/repository.rb:74 + def initialize(no_stdlib: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/repository.rb:98 + def add(dir); end + + # pkg:gem/rbs#lib/rbs/repository.rb:71 + def dirs; end + + # pkg:gem/rbs#lib/rbs/repository.rb:72 + def gems; end + + # pkg:gem/rbs#lib/rbs/repository.rb:108 + def lookup(gem, version); end + + # pkg:gem/rbs#lib/rbs/repository.rb:113 + def lookup_path(gem, version); end + + class << self + # pkg:gem/rbs#lib/rbs/repository.rb:83 + def default; end + + # pkg:gem/rbs#lib/rbs/repository.rb:87 + def find_best_version(version, candidates); end + end +end + +# pkg:gem/rbs#lib/rbs/repository.rb:5 +RBS::Repository::DEFAULT_STDLIB_ROOT = T.let(T.unsafe(nil), Pathname) + +# pkg:gem/rbs#lib/rbs/repository.rb:7 +class RBS::Repository::GemRBS + # pkg:gem/rbs#lib/rbs/repository.rb:11 + def initialize(name:); end + + # pkg:gem/rbs#lib/rbs/repository.rb:64 + def empty?; end + + # pkg:gem/rbs#lib/rbs/repository.rb:59 + def find_best_version(version); end + + # pkg:gem/rbs#lib/rbs/repository.rb:54 + def latest_version; end + + # pkg:gem/rbs#lib/rbs/repository.rb:22 + def load!; end + + # pkg:gem/rbs#lib/rbs/repository.rb:8 + def name; end + + # pkg:gem/rbs#lib/rbs/repository.rb:49 + def oldest_version; end + + # pkg:gem/rbs#lib/rbs/repository.rb:9 + def paths; end + + # pkg:gem/rbs#lib/rbs/repository.rb:45 + def version_names; end + + # pkg:gem/rbs#lib/rbs/repository.rb:17 + def versions; end +end + +# pkg:gem/rbs#lib/rbs/repository.rb:69 +class RBS::Repository::VersionPath < ::Struct + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def gem; end + + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def gem=(_); end + + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def path; end + + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def path=(_); end + + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def version; end + + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def version=(_); end + + class << self + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def [](*_arg0); end + + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def inspect; end + + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def keyword_init?; end + + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def members; end + + # pkg:gem/rbs#lib/rbs/repository.rb:69 + def new(*_arg0); end + end +end + +# pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:4 +module RBS::Resolver; end + +# pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:5 +class RBS::Resolver::ConstantResolver + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:88 + def initialize(builder:); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:85 + def builder; end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:86 + def child_constants_cache; end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:112 + def children(module_name); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:100 + def constants(context); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:178 + def constants_from_ancestors(module_name, constants:); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:163 + def constants_from_context(context, constants:); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:201 + def constants_itself(context, constants:); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:86 + def context_constants_cache; end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:138 + def load_child_constants(name); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:122 + def load_context_constants(context); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:95 + def resolve(name, context:); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:108 + def resolve_child(module_name, name); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:85 + def table; end +end + +# pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:6 +class RBS::Resolver::ConstantResolver::Table + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:10 + def initialize(environment); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:63 + def children(name); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:7 + def children_table; end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:67 + def constant(name); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:80 + def constant_of_constant(name, entry); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:71 + def constant_of_module(name, entry); end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:8 + def constants_table; end + + # pkg:gem/rbs#lib/rbs/resolver/constant_resolver.rb:7 + def toplevel; end +end + +# pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:5 +class RBS::Resolver::TypeNameResolver + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:10 + def initialize(all_names, aliases); end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:80 + def aliased_name?(type_name); end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:8 + def aliases; end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:6 + def all_names; end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:7 + def cache; end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:74 + def has_type_name?(full_name); end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:119 + def normalize_namespace(type_name, rhs, context, visited); end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:37 + def resolve(type_name, context:); end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:102 + def resolve_head_namespace(head, context); end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:60 + def resolve_namespace(type_name, context:); end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:134 + def resolve_namespace0(type_name, context, visited); end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:86 + def resolve_type_name(type_name, context); end + + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:32 + def try_cache(type_name, context); end + + class << self + # pkg:gem/rbs#lib/rbs/resolver/type_name_resolver.rb:16 + def build(env); end + end +end + +# pkg:gem/rbs#lib/rbs/rewriter.rb:4 +class RBS::Rewriter + # pkg:gem/rbs#lib/rbs/rewriter.rb:7 + def initialize(buffer); end + + # pkg:gem/rbs#lib/rbs/rewriter.rb:25 + def add_comment(*locations, content:); end + + # pkg:gem/rbs#lib/rbs/rewriter.rb:5 + def buffer; end + + # pkg:gem/rbs#lib/rbs/rewriter.rb:43 + def delete_comment(comment); end + + # pkg:gem/rbs#lib/rbs/rewriter.rb:36 + def replace_comment(comment, content:); end + + # pkg:gem/rbs#lib/rbs/rewriter.rb:14 + def rewrite(location, string); end + + # pkg:gem/rbs#lib/rbs/rewriter.rb:51 + def string; end + + private + + # pkg:gem/rbs#lib/rbs/rewriter.rb:63 + def format_comment(content, indent); end +end + +# pkg:gem/rbs#lib/rbs/source.rb:4 +module RBS::Source; end + +# pkg:gem/rbs#lib/rbs/source.rb:5 +class RBS::Source::RBS + # pkg:gem/rbs#lib/rbs/source.rb:8 + def initialize(buffer, directives, decls); end + + # pkg:gem/rbs#lib/rbs/source.rb:6 + def buffer; end + + # pkg:gem/rbs#lib/rbs/source.rb:6 + def declarations; end + + # pkg:gem/rbs#lib/rbs/source.rb:6 + def directives; end + + # pkg:gem/rbs#lib/rbs/source.rb:25 + def each_declaration_type_name(names, decl, &block); end + + # pkg:gem/rbs#lib/rbs/source.rb:14 + def each_type_name(&block); end +end + +# pkg:gem/rbs#lib/rbs/source.rb:52 +class RBS::Source::Ruby + # pkg:gem/rbs#lib/rbs/source.rb:58 + def initialize(buffer, prism, declarations, diagnostics); end + + # pkg:gem/rbs#lib/rbs/source.rb:53 + def buffer; end + + # pkg:gem/rbs#lib/rbs/source.rb:55 + def declarations; end + + # pkg:gem/rbs#lib/rbs/source.rb:56 + def diagnostics; end + + # pkg:gem/rbs#lib/rbs/source.rb:76 + def each_declaration_type_name(names, decl, &block); end + + # pkg:gem/rbs#lib/rbs/source.rb:65 + def each_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/source.rb:54 + def prism_result; end +end + +# pkg:gem/rbs#lib/rbs/substitution.rb:4 +class RBS::Substitution + # pkg:gem/rbs#lib/rbs/substitution.rb:12 + def initialize; end + + # pkg:gem/rbs#lib/rbs/substitution.rb:66 + def +(other); end + + # pkg:gem/rbs#lib/rbs/substitution.rb:53 + def [](ty); end + + # pkg:gem/rbs#lib/rbs/substitution.rb:16 + def add(from:, to:); end + + # pkg:gem/rbs#lib/rbs/substitution.rb:37 + def apply(ty); end + + # pkg:gem/rbs#lib/rbs/substitution.rb:8 + def empty?; end + + # pkg:gem/rbs#lib/rbs/substitution.rb:6 + def instance_type; end + + # pkg:gem/rbs#lib/rbs/substitution.rb:6 + def instance_type=(_arg0); end + + # pkg:gem/rbs#lib/rbs/substitution.rb:5 + def mapping; end + + # pkg:gem/rbs#lib/rbs/substitution.rb:55 + def without(*vars); end + + class << self + # pkg:gem/rbs#lib/rbs/substitution.rb:20 + def build(variables, types, instance_type: T.unsafe(nil), &block); end + end +end + +# pkg:gem/rbs#lib/rbs/subtractor.rb:4 +class RBS::Subtractor + # pkg:gem/rbs#lib/rbs/subtractor.rb:5 + def initialize(minuend, subtrahend); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:10 + def call(minuend = T.unsafe(nil), context: T.unsafe(nil)); end + + private + + # pkg:gem/rbs#lib/rbs/subtractor.rb:180 + def absolute_typename(name, context:); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:163 + def access_modifier?(decl); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:120 + def cvar_exist?(owner, name); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:129 + def each_member(owner, &block); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:48 + def filter_members(decl, context:); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:151 + def filter_redundant_access_modifiers(decls); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:106 + def ivar_exist?(owner, name, kind); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:60 + def member_exist?(owner, member, context:); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:89 + def method_exist?(owner, method_name, kind); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:140 + def mixin_exist?(owner, mixin, context:); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:189 + def typename_candidates(name, context:); end + + # pkg:gem/rbs#lib/rbs/subtractor.rb:167 + def update_decl(decl, members:); end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:367 +class RBS::SuperclassMismatchError < ::RBS::DefinitionError + # pkg:gem/rbs#lib/rbs/errors.rb:371 + def initialize(name:, entry:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:369 + def entry; end + + # pkg:gem/rbs#lib/rbs/errors.rb:368 + def name; end +end + +# pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:4 +class RBS::TypeAliasDependency + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:14 + def initialize(env:); end + + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:27 + def build_dependencies; end + + # Check if an alias type definition is circular & prohibited + # + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:19 + def circular_definition?(alias_name); end + + # A hash which stores the transitive closure + # of the directed graph + # + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:12 + def dependencies; end + + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:57 + def dependencies_of(name); end + + # Direct dependencies corresponds to a directed graph + # with vertices as types and directions based on assignment of types + # + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:9 + def direct_dependencies; end + + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:52 + def direct_dependencies_of(name); end + + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:5 + def env; end + + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:43 + def transitive_closure; end + + private + + # Recursive function to construct transitive closure + # + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:81 + def dependency(start, vertex, nested = T.unsafe(nil)); end + + # Constructs directed graph recursively + # + # pkg:gem/rbs#lib/rbs/type_alias_dependency.rb:65 + def direct_dependency(type, result = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:4 +class RBS::TypeAliasRegularity + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:16 + def initialize(env:); end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:61 + def build_alias_type(name); end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:14 + def builder; end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:69 + def compatible_args?(args1, args2); end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:14 + def diagnostics; end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:110 + def each_alias_type(type, &block); end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:83 + def each_mutual_alias_defs(&block); end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:14 + def env; end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:79 + def nonregular?(type_name); end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:22 + def validate; end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:39 + def validate_alias_type(alias_type, names, types); end + + class << self + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:120 + def validate(env:); end + end +end + +# pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:5 +class RBS::TypeAliasRegularity::Diagnostic + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:8 + def initialize(type_name:, nonregular_type:); end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:6 + def nonregular_type; end + + # pkg:gem/rbs#lib/rbs/type_alias_regularity.rb:6 + def type_name; end +end + +# pkg:gem/rbs#lib/rbs/type_name.rb:4 +class RBS::TypeName + # pkg:gem/rbs#lib/rbs/type_name.rb:9 + def initialize(namespace:, name:); end + + # pkg:gem/rbs#lib/rbs/type_name.rb:105 + def +(other); end + + # pkg:gem/rbs#lib/rbs/type_name.rb:50 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/type_name.rb:81 + def absolute!; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:85 + def absolute?; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:77 + def alias?; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:73 + def class?; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:55 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/type_name.rb:57 + def hash; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:93 + def interface?; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:7 + def kind; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:6 + def name; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:5 + def namespace; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:89 + def relative!; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:101 + def split; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:65 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/type_name.rb:69 + def to_namespace; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:61 + def to_s; end + + # pkg:gem/rbs#lib/rbs/type_name.rb:97 + def with_prefix(namespace); end + + class << self + # Returns a canonical `TypeName` instance for the given `namespace` / + # `name` pair. The namespace is canonicalized through `Namespace.[]` + # so identity-based lookup works regardless of the caller passing a + # fresh `Namespace.new` or an already-interned instance. + # + # pkg:gem/rbs#lib/rbs/type_name.rb:36 + def [](namespace, name); end + + # pkg:gem/rbs#lib/rbs/type_name.rb:113 + def parse(string); end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:614 +class RBS::TypeParamDefaultReferenceError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:620 + def initialize(type_param, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:618 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:617 + def type_param; end + + class << self + # pkg:gem/rbs#lib/rbs/errors.rb:626 + def check!(type_params); end + end +end + +# pkg:gem/rbs#lib/rbs/types.rb:4 +module RBS::Types; end + +# pkg:gem/rbs#lib/rbs/types.rb:410 +class RBS::Types::Alias + include ::RBS::Types::Application + + # pkg:gem/rbs#lib/rbs/types.rb:415 + def initialize(name:, args:, location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:411 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:439 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:431 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:425 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:421 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:202 +module RBS::Types::Application + # pkg:gem/rbs#lib/rbs/types.rb:206 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:204 + def args; end + + # pkg:gem/rbs#lib/rbs/types.rb:232 + def each_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:210 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:216 + def free_variables(set = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:244 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:240 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:212 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:203 + def name; end + + # pkg:gem/rbs#lib/rbs/types.rb:224 + def to_s(level = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:248 + def with_nonreturn_void?; end +end + +# pkg:gem/rbs#lib/rbs/types.rb:41 +module RBS::Types::Bases; end + +# pkg:gem/rbs#lib/rbs/types.rb:109 +class RBS::Types::Bases::Any < ::RBS::Types::Bases::Base + # pkg:gem/rbs#lib/rbs/types.rb:110 + def initialize(location:, todo: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:117 + def to_s(level = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:42 +class RBS::Types::Bases::Base + include ::RBS::Types::NoFreeVariables + include ::RBS::Types::NoSubst + include ::RBS::Types::EmptyEachType + include ::RBS::Types::NoTypeName + + # pkg:gem/rbs#lib/rbs/types.rb:45 + def initialize(location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:49 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:57 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:98 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:94 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:53 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:43 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:64 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:69 + def to_s(level = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:102 + def with_nonreturn_void?; end +end + +# pkg:gem/rbs#lib/rbs/types.rb:107 +class RBS::Types::Bases::Bool < ::RBS::Types::Bases::Base; end + +# pkg:gem/rbs#lib/rbs/types.rb:123 +class RBS::Types::Bases::Bottom < ::RBS::Types::Bases::Base; end + +# pkg:gem/rbs#lib/rbs/types.rb:130 +class RBS::Types::Bases::Class < ::RBS::Types::Bases::Base; end + +# pkg:gem/rbs#lib/rbs/types.rb:125 +class RBS::Types::Bases::Instance < ::RBS::Types::Bases::Base + # pkg:gem/rbs#lib/rbs/types.rb:126 + def sub(s); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:121 +class RBS::Types::Bases::Nil < ::RBS::Types::Bases::Base; end + +# pkg:gem/rbs#lib/rbs/types.rb:124 +class RBS::Types::Bases::Self < ::RBS::Types::Bases::Base; end + +# pkg:gem/rbs#lib/rbs/types.rb:122 +class RBS::Types::Bases::Top < ::RBS::Types::Bases::Base; end + +# pkg:gem/rbs#lib/rbs/types.rb:108 +class RBS::Types::Bases::Void < ::RBS::Types::Bases::Base; end + +# pkg:gem/rbs#lib/rbs/types.rb:1390 +class RBS::Types::Block + # pkg:gem/rbs#lib/rbs/types.rb:1396 + def initialize(type:, required:, location: T.unsafe(nil), self_type: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1403 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:1394 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:1428 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1392 + def required; end + + # pkg:gem/rbs#lib/rbs/types.rb:1393 + def self_type; end + + # pkg:gem/rbs#lib/rbs/types.rb:1418 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:1410 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1391 + def type; end +end + +# pkg:gem/rbs#lib/rbs/types.rb:366 +class RBS::Types::ClassInstance + include ::RBS::Types::Application + + # pkg:gem/rbs#lib/rbs/types.rb:371 + def initialize(name:, args:, location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:367 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:397 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:389 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:381 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:377 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:260 +class RBS::Types::ClassSingleton + include ::RBS::Types::Application + + # pkg:gem/rbs#lib/rbs/types.rb:265 + def initialize(name:, location:, args: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:271 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:275 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:277 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:261 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:309 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:301 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:281 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:289 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:293 + def to_s(level = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:23 +module RBS::Types::EmptyEachType + # pkg:gem/rbs#lib/rbs/types.rb:24 + def each_type; end + + # pkg:gem/rbs#lib/rbs/types.rb:32 + def map_type(&block); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:915 +class RBS::Types::Function + # pkg:gem/rbs#lib/rbs/types.rb:999 + def initialize(required_positionals:, optional_positionals:, rest_positionals:, trailing_positionals:, required_keywords:, optional_keywords:, rest_keywords:, return_type:, forwarding: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1011 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:1085 + def amap(array, &block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1234 + def drop_head; end + + # pkg:gem/rbs#lib/rbs/types.rb:1251 + def drop_tail; end + + # pkg:gem/rbs#lib/rbs/types.rb:1122 + def each_param(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1107 + def each_type; end + + # pkg:gem/rbs#lib/rbs/types.rb:1199 + def empty?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1024 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:996 + def forwarding; end + + # pkg:gem/rbs#lib/rbs/types.rb:1226 + def forwarding?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1039 + def free_variables(set = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1276 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1264 + def has_keyword?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1272 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1026 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:1093 + def hmapv(hash, &block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1067 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1101 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:994 + def optional_keywords; end + + # pkg:gem/rbs#lib/rbs/types.rb:990 + def optional_positionals; end + + # pkg:gem/rbs#lib/rbs/types.rb:1210 + def param_to_s; end + + # pkg:gem/rbs#lib/rbs/types.rb:993 + def required_keywords; end + + # pkg:gem/rbs#lib/rbs/types.rb:989 + def required_positionals; end + + # pkg:gem/rbs#lib/rbs/types.rb:995 + def rest_keywords; end + + # pkg:gem/rbs#lib/rbs/types.rb:991 + def rest_positionals; end + + # pkg:gem/rbs#lib/rbs/types.rb:1230 + def return_to_s; end + + # pkg:gem/rbs#lib/rbs/types.rb:997 + def return_type; end + + # pkg:gem/rbs#lib/rbs/types.rb:1150 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:1136 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:992 + def trailing_positionals; end + + # pkg:gem/rbs#lib/rbs/types.rb:1184 + def update(required_positionals: T.unsafe(nil), optional_positionals: T.unsafe(nil), rest_positionals: T.unsafe(nil), trailing_positionals: T.unsafe(nil), required_keywords: T.unsafe(nil), optional_keywords: T.unsafe(nil), rest_keywords: T.unsafe(nil), forwarding: T.unsafe(nil), return_type: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1280 + def with_nonreturn_void?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1170 + def with_return_type(type); end + + class << self + # pkg:gem/rbs#lib/rbs/types.rb:1156 + def empty(return_type); end + end +end + +# pkg:gem/rbs#lib/rbs/types.rb:962 +class RBS::Types::Function::ForwardingParam + # pkg:gem/rbs#lib/rbs/types.rb:965 + def initialize(location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:969 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:973 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:975 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:963 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:979 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:984 + def to_s; end +end + +# pkg:gem/rbs#lib/rbs/types.rb:916 +class RBS::Types::Function::Param + # pkg:gem/rbs#lib/rbs/types.rb:921 + def initialize(type:, name:, location: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:927 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:931 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:933 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:919 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:937 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:918 + def name; end + + # pkg:gem/rbs#lib/rbs/types.rb:945 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:949 + def to_s; end + + # pkg:gem/rbs#lib/rbs/types.rb:917 + def type; end +end + +# pkg:gem/rbs#lib/rbs/types.rb:322 +class RBS::Types::Interface + include ::RBS::Types::Application + + # pkg:gem/rbs#lib/rbs/types.rb:327 + def initialize(name:, args:, location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:323 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:353 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:345 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:337 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:333 + def to_json(state = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:832 +class RBS::Types::Intersection + # pkg:gem/rbs#lib/rbs/types.rb:836 + def initialize(types:, location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:841 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:879 + def each_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:845 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:851 + def free_variables(set = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:906 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:902 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:847 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:834 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:887 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:895 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:863 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:859 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:870 + def to_s(level = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:833 + def types; end + + # pkg:gem/rbs#lib/rbs/types.rb:910 + def with_nonreturn_void?; end +end + +# pkg:gem/rbs#lib/rbs/types.rb:1572 +class RBS::Types::Literal + include ::RBS::Types::NoFreeVariables + include ::RBS::Types::NoSubst + include ::RBS::Types::EmptyEachType + include ::RBS::Types::NoTypeName + + # pkg:gem/rbs#lib/rbs/types.rb:1576 + def initialize(literal:, location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:1581 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:1585 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:1608 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1604 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1587 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:1573 + def literal; end + + # pkg:gem/rbs#lib/rbs/types.rb:1574 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:1596 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1600 + def to_s(level = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1612 + def with_nonreturn_void?; end + + class << self + # pkg:gem/rbs#lib/rbs/types.rb:1632 + def unescape_string(string, is_double_quote); end + end +end + +# pkg:gem/rbs#lib/rbs/types.rb:1616 +RBS::Types::Literal::TABLE = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rbs#lib/rbs/types.rb:5 +module RBS::Types::NoFreeVariables + # pkg:gem/rbs#lib/rbs/types.rb:6 + def free_variables(set = T.unsafe(nil)); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:11 +module RBS::Types::NoSubst + # pkg:gem/rbs#lib/rbs/types.rb:12 + def sub(s); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:17 +module RBS::Types::NoTypeName + # pkg:gem/rbs#lib/rbs/types.rb:18 + def map_type_name(&); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:655 +class RBS::Types::Optional + # pkg:gem/rbs#lib/rbs/types.rb:659 + def initialize(type:, location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:664 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:702 + def each_type; end + + # pkg:gem/rbs#lib/rbs/types.rb:668 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:674 + def free_variables(set = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:732 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:728 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:670 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:657 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:717 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:710 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:682 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:678 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:688 + def to_s(level = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:656 + def type; end + + # pkg:gem/rbs#lib/rbs/types.rb:736 + def with_nonreturn_void?; end +end + +# pkg:gem/rbs#lib/rbs/types.rb:1449 +class RBS::Types::Proc + # pkg:gem/rbs#lib/rbs/types.rb:1455 + def initialize(location:, type:, block:, self_type: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1462 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:1451 + def block; end + + # pkg:gem/rbs#lib/rbs/types.rb:1516 + def each_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1466 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:1472 + def free_variables(set = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1555 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1551 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1468 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:1453 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:1538 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1529 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1452 + def self_type; end + + # pkg:gem/rbs#lib/rbs/types.rb:1489 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:1479 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1500 + def to_s(level = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1450 + def type; end + + # pkg:gem/rbs#lib/rbs/types.rb:1559 + def with_nonreturn_void?; end +end + +# pkg:gem/rbs#lib/rbs/types.rb:537 +class RBS::Types::Record + # pkg:gem/rbs#lib/rbs/types.rb:541 + def initialize(location:, all_fields: T.unsafe(nil), fields: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:565 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:538 + def all_fields; end + + # pkg:gem/rbs#lib/rbs/types.rb:615 + def each_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:569 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:538 + def fields; end + + # pkg:gem/rbs#lib/rbs/types.rb:575 + def free_variables(set = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:646 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:642 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:571 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:539 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:631 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:624 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:538 + def optional_fields; end + + # pkg:gem/rbs#lib/rbs/types.rb:590 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:586 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:599 + def to_s(level = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:650 + def with_nonreturn_void?; end +end + +# pkg:gem/rbs#lib/rbs/types.rb:1437 +module RBS::Types::SelfTypeBindingHelper + private + + # pkg:gem/rbs#lib/rbs/types.rb:1440 + def self_type_binding_to_s(t); end + + class << self + # pkg:gem/rbs#lib/rbs/types.rb:1440 + def self_type_binding_to_s(t); end + end +end + +# pkg:gem/rbs#lib/rbs/types.rb:452 +class RBS::Types::Tuple + # pkg:gem/rbs#lib/rbs/types.rb:456 + def initialize(types:, location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:461 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:498 + def each_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:465 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:471 + def free_variables(set = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:528 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:524 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:467 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:454 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:513 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:506 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:483 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:479 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:490 + def to_s(level = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:453 + def types; end + + # pkg:gem/rbs#lib/rbs/types.rb:532 + def with_nonreturn_void?; end +end + +# pkg:gem/rbs#lib/rbs/types.rb:741 +class RBS::Types::Union + # pkg:gem/rbs#lib/rbs/types.rb:745 + def initialize(types:, location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:750 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:796 + def each_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:754 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:760 + def free_variables(set = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:823 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:819 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:756 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:743 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:804 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:812 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:772 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:768 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:779 + def to_s(level = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:742 + def types; end + + # pkg:gem/rbs#lib/rbs/types.rb:827 + def with_nonreturn_void?; end +end + +# pkg:gem/rbs#lib/rbs/types.rb:1293 +class RBS::Types::UntypedFunction + # pkg:gem/rbs#lib/rbs/types.rb:1296 + def initialize(return_type:); end + + # pkg:gem/rbs#lib/rbs/types.rb:1378 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:1326 + def each_param(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1318 + def each_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1354 + def empty?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1382 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:1300 + def free_variables(acc = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1362 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1358 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1384 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:1304 + def map_type(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1312 + def map_type_name(&block); end + + # pkg:gem/rbs#lib/rbs/types.rb:1370 + def param_to_s; end + + # pkg:gem/rbs#lib/rbs/types.rb:1374 + def return_to_s; end + + # pkg:gem/rbs#lib/rbs/types.rb:1294 + def return_type; end + + # pkg:gem/rbs#lib/rbs/types.rb:1340 + def sub(subst); end + + # pkg:gem/rbs#lib/rbs/types.rb:1334 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1350 + def update(return_type: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:1366 + def with_nonreturn_void?; end + + # pkg:gem/rbs#lib/rbs/types.rb:1346 + def with_return_type(ty); end +end + +# pkg:gem/rbs#lib/rbs/types.rb:133 +class RBS::Types::Variable + include ::RBS::Types::NoTypeName + include ::RBS::Types::EmptyEachType + + # pkg:gem/rbs#lib/rbs/types.rb:139 + def initialize(name:, location:); end + + # pkg:gem/rbs#lib/rbs/types.rb:144 + def ==(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:148 + def eql?(other); end + + # pkg:gem/rbs#lib/rbs/types.rb:154 + def free_variables(set = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:193 + def has_classish_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:189 + def has_self_type?; end + + # pkg:gem/rbs#lib/rbs/types.rb:150 + def hash; end + + # pkg:gem/rbs#lib/rbs/types.rb:135 + def location; end + + # pkg:gem/rbs#lib/rbs/types.rb:134 + def name; end + + # pkg:gem/rbs#lib/rbs/types.rb:164 + def sub(s); end + + # pkg:gem/rbs#lib/rbs/types.rb:160 + def to_json(state = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:183 + def to_s(level = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/types.rb:197 + def with_nonreturn_void?; end + + class << self + # pkg:gem/rbs#lib/rbs/types.rb:168 + def build(v); end + + # pkg:gem/rbs#lib/rbs/types.rb:178 + def fresh(v = T.unsafe(nil)); end + end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:349 +class RBS::UnknownMethodAliasError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:357 + def initialize(type_name:, original_name:, aliased_name:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:354 + def aliased_name; end + + # pkg:gem/rbs#lib/rbs/errors.rb:355 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:353 + def original_name; end + + # pkg:gem/rbs#lib/rbs/errors.rb:352 + def type_name; end +end + +# pkg:gem/rbs#lib/rbs/version.rb:4 +RBS::VERSION = T.let(T.unsafe(nil), String) + +# pkg:gem/rbs#lib/rbs/validator.rb:4 +class RBS::Validator + # pkg:gem/rbs#lib/rbs/validator.rb:9 + def initialize(env:, resolver: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/validator.rb:15 + def absolute_type(type, context:, &block); end + + # pkg:gem/rbs#lib/rbs/validator.rb:7 + def definition_builder; end + + # pkg:gem/rbs#lib/rbs/validator.rb:5 + def env; end + + # pkg:gem/rbs#lib/rbs/validator.rb:6 + def resolver; end + + # pkg:gem/rbs#lib/rbs/validator.rb:178 + def type_alias_dependency; end + + # pkg:gem/rbs#lib/rbs/validator.rb:182 + def type_alias_regularity; end + + # pkg:gem/rbs#lib/rbs/validator.rb:158 + def validate_class_alias(entry:); end + + # pkg:gem/rbs#lib/rbs/validator.rb:104 + def validate_method_definition(method_def, type_name:); end + + # Validates presence of the relative type, and application arity match. + # + # pkg:gem/rbs#lib/rbs/validator.rb:24 + def validate_type(type, context:); end + + # pkg:gem/rbs#lib/rbs/validator.rb:63 + def validate_type_alias(entry:); end + + # pkg:gem/rbs#lib/rbs/validator.rb:120 + def validate_type_params(params, type_name:, location:, method_name: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/validator.rb:154 + def validate_variable(var); end +end + +# pkg:gem/rbs#lib/rbs/errors.rb:325 +class RBS::VariableDuplicationError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # pkg:gem/rbs#lib/rbs/errors.rb:332 + def initialize(type_name:, variable_name:, location:); end + + # pkg:gem/rbs#lib/rbs/errors.rb:330 + def location; end + + # pkg:gem/rbs#lib/rbs/errors.rb:328 + def type_name; end + + # pkg:gem/rbs#lib/rbs/errors.rb:329 + def variable_name; end +end + +# pkg:gem/rbs#lib/rbs/variance_calculator.rb:4 +class RBS::VarianceCalculator + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:78 + def initialize(builder:); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:76 + def builder; end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:82 + def env; end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:169 + def function(type, result:, context:); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:98 + def in_inherit(name:, args:, variables:); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:86 + def in_method_type(method_type:, variables:); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:110 + def in_type_alias(name:); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:176 + def negate(variance); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:121 + def type(type, result:, context:); end +end + +# pkg:gem/rbs#lib/rbs/variance_calculator.rb:5 +class RBS::VarianceCalculator::Result + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:8 + def initialize(variables:); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:45 + def compatible?(var, with_annotation:); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:24 + def contravariant(x); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:15 + def covariant(x); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:37 + def each(&block); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:41 + def include?(name); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:60 + def incompatible?(params); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:33 + def invariant(x); end + + # pkg:gem/rbs#lib/rbs/variance_calculator.rb:6 + def result; end +end + +# pkg:gem/rbs#lib/rbs/vendorer.rb:4 +class RBS::Vendorer + # pkg:gem/rbs#lib/rbs/vendorer.rb:8 + def initialize(vendor_dir:, loader:); end + + # pkg:gem/rbs#lib/rbs/vendorer.rb:21 + def clean!; end + + # pkg:gem/rbs#lib/rbs/vendorer.rb:28 + def copy!; end + + # pkg:gem/rbs#lib/rbs/vendorer.rb:13 + def ensure_dir; end + + # pkg:gem/rbs#lib/rbs/vendorer.rb:6 + def loader; end + + # pkg:gem/rbs#lib/rbs/vendorer.rb:5 + def vendor_dir; end +end + +# pkg:gem/rbs#lib/rbs/writer.rb:4 +class RBS::Writer + # pkg:gem/rbs#lib/rbs/writer.rb:8 + def initialize(out:); end + + # pkg:gem/rbs#lib/rbs/writer.rb:366 + def attribute(kind, attr); end + + # pkg:gem/rbs#lib/rbs/writer.rb:42 + def format_annotation(annotation); end + + # pkg:gem/rbs#lib/rbs/writer.rb:23 + def indent(size = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/writer.rb:6 + def indentation; end + + # pkg:gem/rbs#lib/rbs/writer.rb:293 + def method_name(name); end + + # pkg:gem/rbs#lib/rbs/writer.rb:219 + def name_and_args(name, args); end + + # pkg:gem/rbs#lib/rbs/writer.rb:207 + def name_and_params(name, params); end + + # pkg:gem/rbs#lib/rbs/writer.rb:5 + def out; end + + # pkg:gem/rbs#lib/rbs/writer.rb:30 + def prefix; end + + # pkg:gem/rbs#lib/rbs/writer.rb:18 + def preserve!(preserve: T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/writer.rb:14 + def preserve?; end + + # pkg:gem/rbs#lib/rbs/writer.rb:396 + def preserve_empty_line(prev, decl); end + + # pkg:gem/rbs#lib/rbs/writer.rb:229 + def put_lines(lines, leading_spaces:); end + + # pkg:gem/rbs#lib/rbs/writer.rb:34 + def puts(string = T.unsafe(nil)); end + + # pkg:gem/rbs#lib/rbs/writer.rb:79 + def write(contents); end + + # pkg:gem/rbs#lib/rbs/writer.rb:60 + def write_annotation(annotations); end + + # pkg:gem/rbs#lib/rbs/writer.rb:66 + def write_comment(comment); end + + # pkg:gem/rbs#lib/rbs/writer.rb:119 + def write_decl(decl); end + + # pkg:gem/rbs#lib/rbs/writer.rb:314 + def write_def(member); end + + # pkg:gem/rbs#lib/rbs/writer.rb:306 + def write_loc_source(located); end + + # pkg:gem/rbs#lib/rbs/writer.rb:239 + def write_member(member); end + + # pkg:gem/rbs#lib/rbs/writer.rb:102 + def write_use_directive(dir); end +end diff --git a/sorbet/rbi/gems/rdoc@6.12.0.rbi b/sorbet/rbi/gems/rdoc@6.12.0.rbi deleted file mode 100644 index d90a12e..0000000 --- a/sorbet/rbi/gems/rdoc@6.12.0.rbi +++ /dev/null @@ -1,12758 +0,0 @@ -# typed: false - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rdoc` gem. -# Please instead update this file by running `bin/tapioca gem rdoc`. - - -module ERB::Escape - private - - def html_escape(_arg0); end - - class << self - def html_escape(_arg0); end - end -end - -# RDoc produces documentation for Ruby source files by parsing the source and -# extracting the definition for classes, modules, methods, includes and -# requires. It associates these with optional documentation contained in an -# immediately preceding comment block then renders the result using an output -# formatter. -# -# For a simple introduction to writing or generating documentation using RDoc -# see the README. -# -# == Roadmap -# -# If you think you found a bug in RDoc see CONTRIBUTING@Bugs -# -# If you want to use RDoc to create documentation for your Ruby source files, -# see RDoc::Markup and refer to rdoc --help for command line usage. -# -# If you want to set the default markup format see -# RDoc::Markup@Markup+Formats -# -# If you want to store rdoc configuration in your gem (such as the default -# markup format) see RDoc::Options@Saved+Options -# -# If you want to write documentation for Ruby files see RDoc::Parser::Ruby -# -# If you want to write documentation for extensions written in C see -# RDoc::Parser::C -# -# If you want to generate documentation using rake see RDoc::Task. -# -# If you want to drive RDoc programmatically, see RDoc::RDoc. -# -# If you want to use the library to format text blocks into HTML or other -# formats, look at RDoc::Markup. -# -# If you want to make an RDoc plugin such as a generator or directive handler -# see RDoc::RDoc. -# -# If you want to write your own output generator see RDoc::Generator. -# -# If you want an overview of how RDoc works see CONTRIBUTING -# -# == Credits -# -# RDoc is currently being maintained by Eric Hodel . -# -# Dave Thomas is the original author of RDoc. -# -# * The Ruby parser in rdoc/parse.rb is based heavily on the outstanding -# work of Keiju ISHITSUKA of Nippon Rational Inc, who produced the Ruby -# parser for irb and the rtags package. -# -# source://rdoc//lib/rdoc.rb#56 -module RDoc - class << self - # Searches and returns the directory for settings. - # - # 1. $HOME/.rdoc directory, if it exists. - # 2. The +rdoc+ directory under the path specified by the - # +XDG_DATA_HOME+ environment variable, if it is set. - # 3. $HOME/.local/share/rdoc directory. - # - # Other than the home directory, the containing directory will be - # created automatically. - # - # source://rdoc//lib/rdoc.rb#132 - def home; end - - # Loads the best available YAML library. - # - # source://rdoc//lib/rdoc.rb#105 - def load_yaml; end - end -end - -# Represent an alias, which is an old_name/new_name pair associated with a -# particular context -# -- -# TODO implement Alias as a proxy to a method/attribute, inheriting from -# MethodAttr -# -# source://rdoc//lib/rdoc/code_object/alias.rb#9 -class RDoc::Alias < ::RDoc::CodeObject - # Creates a new Alias with a token stream of +text+ that aliases +old_name+ - # to +new_name+, has +comment+ and is a +singleton+ context. - # - # @return [Alias] a new instance of Alias - # - # source://rdoc//lib/rdoc/code_object/alias.rb#37 - def initialize(text, old_name, new_name, comment, singleton = T.unsafe(nil)); end - - # Order by #singleton then #new_name - # - # source://rdoc//lib/rdoc/code_object/alias.rb#50 - def <=>(other); end - - # HTML fragment reference for this alias - # - # source://rdoc//lib/rdoc/code_object/alias.rb#57 - def aref; end - - # Full old name including namespace - # - # source://rdoc//lib/rdoc/code_object/alias.rb#65 - def full_old_name; end - - # HTML id-friendly version of +#new_name+. - # - # source://rdoc//lib/rdoc/code_object/alias.rb#72 - def html_name; end - - # source://rdoc//lib/rdoc/code_object/alias.rb#76 - def inspect; end - - # Aliased method's name - # - # source://rdoc//lib/rdoc/code_object/alias.rb#14 - def name; end - - # '::' for the alias of a singleton method/attribute, '#' for instance-level. - # - # source://rdoc//lib/rdoc/code_object/alias.rb#87 - def name_prefix; end - - # Aliased method's name - # - # source://rdoc//lib/rdoc/code_object/alias.rb#14 - def new_name; end - - # Aliasee method's name - # - # source://rdoc//lib/rdoc/code_object/alias.rb#21 - def old_name; end - - # New name with prefix '::' or '#'. - # - # source://rdoc//lib/rdoc/code_object/alias.rb#101 - def pretty_name; end - - # New name with prefix '::' or '#'. - # - # source://rdoc//lib/rdoc/code_object/alias.rb#101 - def pretty_new_name; end - - # Old name with prefix '::' or '#'. - # - # source://rdoc//lib/rdoc/code_object/alias.rb#94 - def pretty_old_name; end - - # Is this an alias declared in a singleton context? - # - # source://rdoc//lib/rdoc/code_object/alias.rb#26 - def singleton; end - - # Is this an alias declared in a singleton context? - # - # source://rdoc//lib/rdoc/code_object/alias.rb#26 - def singleton=(_arg0); end - - # Source file token stream - # - # source://rdoc//lib/rdoc/code_object/alias.rb#31 - def text; end - - # source://rdoc//lib/rdoc/code_object/alias.rb#107 - def to_s; end -end - -# AnyMethod is the base class for objects representing methods -# -# source://rdoc//lib/rdoc/code_object/any_method.rb#5 -class RDoc::AnyMethod < ::RDoc::MethodAttr - include ::RDoc::TokenStream - - # Creates a new AnyMethod with a token stream +text+ and +name+ - # - # @return [AnyMethod] a new instance of AnyMethod - # - # source://rdoc//lib/rdoc/code_object/any_method.rb#46 - def initialize(text, name); end - - # Adds +an_alias+ as an alias for this method in +context+. - # - # source://rdoc//lib/rdoc/code_object/any_method.rb#59 - def add_alias(an_alias, context = T.unsafe(nil)); end - - # Prefix for +aref+ is 'method'. - # - # source://rdoc//lib/rdoc/code_object/any_method.rb#76 - def aref_prefix; end - - # The call_seq or the param_seq with method name, if there is no call_seq. - # - # Use this for displaying a method's argument lists. - # - # source://rdoc//lib/rdoc/code_object/any_method.rb#85 - def arglists; end - - # The C function that implements this method (if it was defined in a C file) - # - # source://rdoc//lib/rdoc/code_object/any_method.rb#27 - def c_function; end - - # The C function that implements this method (if it was defined in a C file) - # - # source://rdoc//lib/rdoc/code_object/any_method.rb#27 - def c_function=(_arg0); end - - # Different ways to call this method - # - # source://rdoc//lib/rdoc/code_object/any_method.rb#96 - def call_seq; end - - # Sets the different ways you can call this method. If an empty +call_seq+ - # is given nil is assumed. - # - # See also #param_seq - # - # source://rdoc//lib/rdoc/code_object/any_method.rb#112 - def call_seq=(call_seq); end - - # If true this method uses +super+ to call a superclass version - # - # source://rdoc//lib/rdoc/code_object/any_method.rb#39 - def calls_super; end - - # If true this method uses +super+ to call a superclass version - # - # source://rdoc//lib/rdoc/code_object/any_method.rb#39 - def calls_super=(_arg0); end - - # Don't rename \#initialize to \::new - # - # source://rdoc//lib/rdoc/code_object/any_method.rb#22 - def dont_rename_initialize; end - - # Don't rename \#initialize to \::new - # - # source://rdoc//lib/rdoc/code_object/any_method.rb#22 - def dont_rename_initialize=(_arg0); end - - # Whether the method has a call-seq. - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/code_object/any_method.rb#121 - def has_call_seq?; end - - # Loads is_alias_for from the internal name. Returns nil if the alias - # cannot be found. - # - # source://rdoc//lib/rdoc/code_object/any_method.rb#129 - def is_alias_for; end - - # Dumps this AnyMethod for use by ri. See also #marshal_load - # - # source://rdoc//lib/rdoc/code_object/any_method.rb#147 - def marshal_dump; end - - # Loads this AnyMethod from +array+. For a loaded AnyMethod the following - # methods will return cached values: - # - # * #full_name - # * #parent_name - # - # source://rdoc//lib/rdoc/code_object/any_method.rb#184 - def marshal_load(array); end - - # Method name - # - # If the method has no assigned name, it extracts it from #call_seq. - # - # source://rdoc//lib/rdoc/code_object/any_method.rb#233 - def name; end - - # A list of this method's method and yield parameters. +call-seq+ params - # are preferred over parsed method and block params. - # - # source://rdoc//lib/rdoc/code_object/any_method.rb#246 - def param_list; end - - # Pretty parameter list for this method. If the method's parameters were - # given by +call-seq+ it is preferred over the parsed values. - # - # source://rdoc//lib/rdoc/code_object/any_method.rb#278 - def param_seq; end - - # Parameters for this method - # - # source://rdoc//lib/rdoc/code_object/any_method.rb#34 - def params; end - - # Parameters for this method - # - # source://rdoc//lib/rdoc/code_object/any_method.rb#34 - def params=(_arg0); end - - # The section title of the method (if defined in a C file via +:category:+) - # - # source://rdoc//lib/rdoc/code_object/any_method.rb#30 - def section_title; end - - # The section title of the method (if defined in a C file via +:category:+) - # - # source://rdoc//lib/rdoc/code_object/any_method.rb#30 - def section_title=(_arg0); end - - # Whether to skip the method description, true for methods that have - # aliases with a call-seq that doesn't include the method name. - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/code_object/any_method.rb#310 - def skip_description?; end - - # Sets the store for this method and its referenced code objects. - # - # source://rdoc//lib/rdoc/code_object/any_method.rb#317 - def store=(store); end - - # For methods that +super+, find the superclass method that would be called. - # - # source://rdoc//lib/rdoc/code_object/any_method.rb#326 - def superclass_method; end - - protected - - # call_seq without deduplication and alias lookup. - # - # source://rdoc//lib/rdoc/code_object/any_method.rb#345 - def _call_seq; end - - private - - # call_seq with alias examples information removed, if this - # method is an alias method. - # - # source://rdoc//lib/rdoc/code_object/any_method.rb#355 - def deduplicate_call_seq(call_seq); end -end - -# An attribute created by \#attr, \#attr_reader, \#attr_writer or -# \#attr_accessor -# -# source://rdoc//lib/rdoc/code_object/attr.rb#6 -class RDoc::Attr < ::RDoc::MethodAttr - # Creates a new Attr with body +text+, +name+, read/write status +rw+ and - # +comment+. +singleton+ marks this as a class attribute. - # - # @return [Attr] a new instance of Attr - # - # source://rdoc//lib/rdoc/code_object/attr.rb#25 - def initialize(text, name, rw, comment, singleton = T.unsafe(nil)); end - - # Attributes are equal when their names, singleton and rw are identical - # - # source://rdoc//lib/rdoc/code_object/attr.rb#36 - def ==(other); end - - # Add +an_alias+ as an attribute in +context+. - # - # source://rdoc//lib/rdoc/code_object/attr.rb#46 - def add_alias(an_alias, context); end - - # The #aref prefix for attributes - # - # source://rdoc//lib/rdoc/code_object/attr.rb#61 - def aref_prefix; end - - # Attributes never call super. See RDoc::AnyMethod#calls_super - # - # An RDoc::Attr can show up in the method list in some situations (see - # Gem::ConfigFile) - # - # source://rdoc//lib/rdoc/code_object/attr.rb#71 - def calls_super; end - - # Returns attr_reader, attr_writer or attr_accessor as appropriate. - # - # source://rdoc//lib/rdoc/code_object/attr.rb#78 - def definition; end - - # source://rdoc//lib/rdoc/code_object/attr.rb#86 - def inspect; end - - # Dumps this Attr for use by ri. See also #marshal_load - # - # source://rdoc//lib/rdoc/code_object/attr.rb#102 - def marshal_dump; end - - # Loads this Attr from +array+. For a loaded Attr the following - # methods will return cached values: - # - # * #full_name - # * #parent_name - # - # source://rdoc//lib/rdoc/code_object/attr.rb#124 - def marshal_load(array); end - - # source://rdoc//lib/rdoc/code_object/attr.rb#151 - def pretty_print(q); end - - # Is the attribute readable ('R'), writable ('W') or both ('RW')? - # - # source://rdoc//lib/rdoc/code_object/attr.rb#19 - def rw; end - - # Is the attribute readable ('R'), writable ('W') or both ('RW')? - # - # source://rdoc//lib/rdoc/code_object/attr.rb#19 - def rw=(_arg0); end - - # source://rdoc//lib/rdoc/code_object/attr.rb#162 - def to_s; end - - # Attributes do not have token streams. - # - # An RDoc::Attr can show up in the method list in some situations (see - # Gem::ConfigFile) - # - # source://rdoc//lib/rdoc/code_object/attr.rb#172 - def token_stream; end -end - -# ClassModule is the base class for objects representing either a class or a -# module. -# -# source://rdoc//lib/rdoc/code_object/class_module.rb#6 -class RDoc::ClassModule < ::RDoc::Context - # Creates a new ClassModule with +name+ with optional +superclass+ - # - # This is a constructor for subclasses, and must never be called directly. - # - # @return [ClassModule] a new instance of ClassModule - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#111 - def initialize(name, superclass = T.unsafe(nil)); end - - # Adds +comment+ to this ClassModule's list of comments at +location+. This - # method is preferred over #comment= since it allows ri data to be updated - # across multiple runs. - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#127 - def add_comment(comment, location); end - - # source://rdoc//lib/rdoc/code_object/class_module.rb#148 - def add_things(my_things, other_things); end - - # Ancestors list for this ClassModule: the list of included modules - # (classes will add their superclass if any). - # - # Returns the included classes or modules, not the includes - # themselves. The returned values are either String or - # RDoc::NormalModule instances (see RDoc::Include#module). - # - # The values are returned in reverse order of their inclusion, - # which is the order suitable for searching methods/attributes - # in the ancestors. The superclass, if any, comes last. - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#171 - def ancestors; end - - # HTML fragment reference for this module or class. See - # RDoc::NormalClass#aref and RDoc::NormalModule#aref - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#183 - def aref; end - - # @raise [NotImplementedError] - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#175 - def aref_prefix; end - - # Clears the comment. Used by the Ruby parser. - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#195 - def clear_comment; end - - # This method is deprecated, use #add_comment instead. - # - # Appends +comment+ to the current comment, but separated by a rule. Works - # more like +=. - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#205 - def comment=(comment); end - - # Comment and the location it came from. Use #add_comment to add comments - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#35 - def comment_location; end - - # Comment and the location it came from. Use #add_comment to add comments - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#35 - def comment_location=(_arg0); end - - # Prepares this ClassModule for use by a generator. - # - # See RDoc::Store#complete - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#223 - def complete(min_visibility); end - - # Constants that are aliases for this class or module - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#30 - def constant_aliases; end - - # Constants that are aliases for this class or module - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#30 - def constant_aliases=(_arg0); end - - # Handy wrapper for marking up this class or module's comment - # - # source://rdoc//lib/rdoc/generator/markup.rb#131 - def description; end - - # source://rdoc//lib/rdoc/code_object/class_module.rb#37 - def diagram; end - - # source://rdoc//lib/rdoc/code_object/class_module.rb#37 - def diagram=(_arg0); end - - # Ancestors list for this ClassModule: the list of included modules - # (classes will add their superclass if any). - # - # Returns the included classes or modules, not the includes - # themselves. The returned values are either String or - # RDoc::NormalModule instances (see RDoc::Include#module). - # - # The values are returned in reverse order of their inclusion, - # which is the order suitable for searching methods/attributes - # in the ancestors. The superclass, if any, comes last. - # - # Ancestors of this class or module only - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#171 - def direct_ancestors; end - - # Does this ClassModule or any of its methods have document_self set? - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#234 - def document_self_or_methods; end - - # Does this class or module have a comment with content or is - # #received_nodoc true? - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#242 - def documented?; end - - # Iterates the ancestors of this class or module for which an - # RDoc::ClassModule exists. - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#252 - def each_ancestor; end - - # source://rdoc//lib/rdoc/code_object/class_module.rb#832 - def embed_mixins; end - - # Looks for a symbol in the #ancestors. See Context#find_local_symbol. - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#265 - def find_ancestor_local_symbol(symbol); end - - # Finds a class or module with +name+ in this namespace or its descendants - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#277 - def find_class_named(name); end - - # Return the fully qualified name of this class or module - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#290 - def full_name; end - - # Class or module this constant is an alias for - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#42 - def is_alias_for; end - - # Class or module this constant is an alias for - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#42 - def is_alias_for=(_arg0); end - - # TODO: filter included items by #display? - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#301 - def marshal_dump; end - - # source://rdoc//lib/rdoc/code_object/class_module.rb#347 - def marshal_load(array); end - - # Merges +class_module+ into this ClassModule. - # - # The data in +class_module+ is preferred over the receiver. - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#438 - def merge(class_module); end - - # Merges collection +mine+ with +other+ preferring other. +other_files+ is - # used to help determine which items should be deleted. - # - # Yields whether the item should be added or removed (true or false) and the - # item to be added or removed. - # - # merge_collections things, other.things, other.in_files do |add, thing| - # if add then - # # add the thing - # else - # # remove the thing - # end - # end - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#523 - def merge_collections(mine, other, other_files, &block); end - - # Merges the comments in this ClassModule with the comments in the other - # ClassModule +cm+. - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#535 - def merge_sections(cm); end - - # Does this object represent a module? - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#574 - def module?; end - - # Allows overriding the initial name. - # - # Used for modules and classes that are constant aliases. - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#583 - def name=(new_name); end - - # Name to use to generate the url: - # modules and classes that are aliases for another - # module or class return the name of the latter. - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#626 - def name_for_path; end - - # Returns the classes and modules that are not constants - # aliasing another class or module. For use by formatters - # only (caches its result). - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#635 - def non_aliases; end - - # Parses +comment_location+ into an RDoc::Markup::Document composed of - # multiple RDoc::Markup::Documents with their file set. - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#591 - def parse(comment_location); end - - # Path to this class or module for use with HTML generator output. - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#617 - def path; end - - # Updates the child modules or classes of class/module +parent+ by - # deleting the ones that have been removed from the documentation. - # - # +parent_hash+ is either parent.modules_hash or - # parent.classes_hash and +all_hash+ is ::all_modules_hash or - # ::all_classes_hash. - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#647 - def remove_nodoc_children; end - - # source://rdoc//lib/rdoc/code_object/class_module.rb#661 - def remove_things(my_things, other_files); end - - # Search record used by RDoc::Generator::JsonIndex - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#676 - def search_record; end - - # Sets the store for this class or module and its contained code objects. - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#691 - def store=(store); end - - # Get all super classes of this class in an array. The last element might be - # a string if the name is unknown. - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#734 - def super_classes; end - - # Get the superclass of this class. Attempts to retrieve the superclass - # object, returns the name if it is not known. - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#705 - def superclass; end - - # Set the superclass of this class to +superclass+ - # - # where +superclass+ is one of: - # - # - +nil+ - # - a String containing the full name of the superclass - # - the RDoc::ClassModule representing the superclass - # - # @raise [NoMethodError] - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#718 - def superclass=(superclass); end - - # source://rdoc//lib/rdoc/code_object/class_module.rb#744 - def to_s; end - - # 'module' or 'class' - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#755 - def type; end - - # Updates the child modules & classes by replacing the ones that are - # aliases through a constant. - # - # The aliased module/class is replaced in the children and in - # RDoc::Store#modules_hash or RDoc::Store#classes_hash - # by a copy that has RDoc::ClassModule#is_alias_for set to - # the aliased module/class, and this copy is added to #aliases - # of the aliased module/class. - # - # Formatters can use the #non_aliases method to retrieve children that - # are not aliases, for instance to list the namespace content, since - # the aliased modules are included in the constants of the class/module, - # that are listed separately. - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#774 - def update_aliases; end - - # Deletes from #extends those whose module has been removed from the - # documentation. - # -- - # FIXME: like update_includes, extends are not reliably removed - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#822 - def update_extends; end - - # Deletes from #includes those whose module has been removed from the - # documentation. - # -- - # FIXME: includes are not reliably removed, see _possible_bug test case - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#807 - def update_includes; end - - private - - # source://rdoc//lib/rdoc/code_object/class_module.rb#861 - def prepare_to_embed(code_object, singleton = T.unsafe(nil)); end - - class << self - # Return a RDoc::ClassModule of class +class_type+ that is a copy - # of module +module+. Used to promote modules to classes. - # -- - # TODO move to RDoc::NormalClass (I think) - # - # source://rdoc//lib/rdoc/code_object/class_module.rb#50 - def from_module(class_type, mod); end - end -end - -# Base class for the RDoc code tree. -# -# We contain the common stuff for contexts (which are containers) and other -# elements (methods, attributes and so on) -# -# Here's the tree of the CodeObject subclasses: -# -# * RDoc::Context -# * RDoc::TopLevel -# * RDoc::ClassModule -# * RDoc::AnonClass (never used so far) -# * RDoc::NormalClass -# * RDoc::NormalModule -# * RDoc::SingleClass -# * RDoc::MethodAttr -# * RDoc::Attr -# * RDoc::AnyMethod -# * RDoc::GhostMethod -# * RDoc::MetaMethod -# * RDoc::Alias -# * RDoc::Constant -# * RDoc::Mixin -# * RDoc::Require -# * RDoc::Include -# -# source://rdoc//lib/rdoc/code_object.rb#28 -class RDoc::CodeObject - include ::RDoc::Text - include ::RDoc::Generator::Markup - - # Creates a new CodeObject that will document itself and its children - # - # @return [CodeObject] a new instance of CodeObject - # - # source://rdoc//lib/rdoc/code_object.rb#107 - def initialize; end - - # Our comment - # - # source://rdoc//lib/rdoc/code_object.rb#35 - def comment; end - - # Replaces our comment with +comment+, unless it is empty. - # - # source://rdoc//lib/rdoc/code_object.rb#141 - def comment=(comment); end - - # Should this CodeObject be displayed in output? - # - # A code object should be displayed if: - # - # * The item didn't have a nodoc or wasn't in a container that had nodoc - # * The item wasn't ignored - # * The item has documentation and was not suppressed - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/code_object.rb#168 - def display?; end - - # Do we document our children? - # - # source://rdoc//lib/rdoc/code_object.rb#40 - def document_children; end - - # Enables or disables documentation of this CodeObject's children unless it - # has been turned off by :enddoc: - # - # source://rdoc//lib/rdoc/code_object.rb#177 - def document_children=(document_children); end - - # Do we document ourselves? - # - # source://rdoc//lib/rdoc/code_object.rb#45 - def document_self; end - - # Enables or disables documentation of this CodeObject unless it has been - # turned off by :enddoc:. If the argument is +nil+ it means the - # - # source://rdoc//lib/rdoc/code_object.rb#188 - def document_self=(document_self); end - - # Does this object have a comment with content or is #received_nodoc true? - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/code_object.rb#199 - def documented?; end - - # Are we done documenting (ie, did we come across a :enddoc:)? - # - # source://rdoc//lib/rdoc/code_object.rb#50 - def done_documenting; end - - # Turns documentation on/off, and turns on/off #document_self - # and #document_children. - # - # Once documentation has been turned off (by +:enddoc:+), - # the object will refuse to turn #document_self or - # will have no effect in the current file. - # - # source://rdoc//lib/rdoc/code_object.rb#212 - def done_documenting=(value); end - - # Yields each parent of this CodeObject. See also - # RDoc::ClassModule#each_ancestor - # - # source://rdoc//lib/rdoc/code_object.rb#223 - def each_parent; end - - # Which file this code object was defined in - # - # source://rdoc//lib/rdoc/code_object.rb#55 - def file; end - - # File name where this CodeObject was found. - # - # See also RDoc::Context#in_files - # - # source://rdoc//lib/rdoc/code_object.rb#238 - def file_name; end - - # Force documentation of this CodeObject - # - # source://rdoc//lib/rdoc/code_object.rb#60 - def force_documentation; end - - # Force the documentation of this object unless documentation - # has been turned off by :enddoc: - # -- - # HACK untested, was assigning to an ivar - # - # source://rdoc//lib/rdoc/code_object.rb#250 - def force_documentation=(value); end - - # Sets the full_name overriding any computed full name. - # - # Set to +nil+ to clear RDoc's cached value - # - # source://rdoc//lib/rdoc/code_object.rb#259 - def full_name=(full_name); end - - # Use this to ignore a CodeObject and all its children until found again - # (#record_location is called). An ignored item will not be displayed in - # documentation. - # - # See github issue #55 - # - # The ignored status is temporary in order to allow implementation details - # to be hidden. At the end of processing a file RDoc allows all classes - # and modules to add new documentation to previously created classes. - # - # If a class was ignored (via stopdoc) then reopened later with additional - # documentation it should be displayed. If a class was ignored and never - # reopened it should not be displayed. The ignore flag allows this to - # occur. - # - # source://rdoc//lib/rdoc/code_object.rb#279 - def ignore; end - - # Has this class been ignored? - # - # See also #ignore - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/code_object.rb#292 - def ignored?; end - - # Initializes state for visibility of this CodeObject and its children. - # - # source://rdoc//lib/rdoc/code_object.rb#127 - def initialize_visibility; end - - # Line in #file where this CodeObject was defined - # - # source://rdoc//lib/rdoc/code_object.rb#65 - def line; end - - # Line in #file where this CodeObject was defined - # - # source://rdoc//lib/rdoc/code_object.rb#65 - def line=(_arg0); end - - # Hash of arbitrary metadata for this CodeObject - # - # source://rdoc//lib/rdoc/code_object.rb#70 - def metadata; end - - # When mixed-in to a class, this points to the Context in which it was originally defined. - # - # source://rdoc//lib/rdoc/code_object.rb#102 - def mixin_from; end - - # When mixed-in to a class, this points to the Context in which it was originally defined. - # - # source://rdoc//lib/rdoc/code_object.rb#102 - def mixin_from=(_arg0); end - - # The options instance from the store this CodeObject is attached to, or a - # default options instance if the CodeObject is not attached. - # - # This is used by Text#snippet - # - # source://rdoc//lib/rdoc/code_object.rb#302 - def options; end - - # Our parent CodeObject. The parent may be missing for classes loaded from - # legacy RI data stores. - # - # source://rdoc//lib/rdoc/code_object.rb#314 - def parent; end - - # Sets the parent CodeObject - # - # source://rdoc//lib/rdoc/code_object.rb#75 - def parent=(_arg0); end - - # File name of our parent - # - # source://rdoc//lib/rdoc/code_object.rb#336 - def parent_file_name; end - - # Name of our parent - # - # source://rdoc//lib/rdoc/code_object.rb#343 - def parent_name; end - - # source://rdoc//lib/rdoc/code_object.rb#80 - def received_nodoc; end - - # Records the RDoc::TopLevel (file) where this code object was defined - # - # source://rdoc//lib/rdoc/code_object.rb#350 - def record_location(top_level); end - - # The section this CodeObject is in. Sections allow grouping of constants, - # attributes and methods inside a class or module. - # - # source://rdoc//lib/rdoc/code_object.rb#360 - def section; end - - # Set the section this CodeObject is in - # - # source://rdoc//lib/rdoc/code_object.rb#85 - def section=(_arg0); end - - # Enable capture of documentation unless documentation has been - # turned off by :enddoc: - # - # source://rdoc//lib/rdoc/code_object.rb#370 - def start_doc; end - - # Disable capture of documentation - # - # source://rdoc//lib/rdoc/code_object.rb#382 - def stop_doc; end - - # The RDoc::Store for this object. - # - # source://rdoc//lib/rdoc/code_object.rb#90 - def store; end - - # Sets the +store+ that contains this CodeObject - # - # source://rdoc//lib/rdoc/code_object.rb#392 - def store=(store); end - - # Use this to suppress a CodeObject and all its children until the next file - # it is seen in or documentation is discovered. A suppressed item with - # documentation will be displayed while an ignored item with documentation - # may not be displayed. - # - # source://rdoc//lib/rdoc/code_object.rb#409 - def suppress; end - - # Has this class been suppressed? - # - # See also #suppress - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/code_object.rb#422 - def suppressed?; end - - # We are the model of the code, but we know that at some point we will be - # worked on by viewers. By implementing the Viewable protocol, viewers can - # associated themselves with these objects. - # - # source://rdoc//lib/rdoc/code_object.rb#97 - def viewer; end - - # We are the model of the code, but we know that at some point we will be - # worked on by viewers. By implementing the Viewable protocol, viewers can - # associated themselves with these objects. - # - # source://rdoc//lib/rdoc/code_object.rb#97 - def viewer=(_arg0); end -end - -# source://rdoc//lib/rdoc/comment.rb#12 -class RDoc::Comment - include ::RDoc::Text - - # Creates a new comment with +text+ that is found in the RDoc::TopLevel - # +location+. - # - # @return [Comment] a new instance of Comment - # - # source://rdoc//lib/rdoc/comment.rb#56 - def initialize(text = T.unsafe(nil), location = T.unsafe(nil), language = T.unsafe(nil)); end - - # source://rdoc//lib/rdoc/comment.rb#74 - def ==(other); end - - # Overrides the content returned by #parse. Use when there is no #text - # source for this comment - # - # source://rdoc//lib/rdoc/comment.rb#50 - def document=(_arg0); end - - # A comment is empty if its text String is empty. - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/comment.rb#128 - def empty?; end - - # HACK dubious - # - # source://rdoc//lib/rdoc/comment.rb#135 - def encode!(encoding); end - - # Look for a 'call-seq' in the comment to override the normal parameter - # handling. The :call-seq: is indented from the baseline. All lines of the - # same indentation level and prefix are consumed. - # - # For example, all of the following will be used as the :call-seq: - # - # # :call-seq: - # # ARGF.readlines(sep=$/) -> array - # # ARGF.readlines(limit) -> array - # # ARGF.readlines(sep, limit) -> array - # # - # # ARGF.to_a(sep=$/) -> array - # # ARGF.to_a(limit) -> array - # # ARGF.to_a(sep, limit) -> array - # - # source://rdoc//lib/rdoc/comment.rb#95 - def extract_call_seq(method); end - - # The RDoc::TopLevel this comment was found in - # - # For duck-typing when merging classes at load time - # - # source://rdoc//lib/rdoc/comment.rb#24 - def file; end - - # The format of this comment. Defaults to RDoc::Markup - # - # source://rdoc//lib/rdoc/comment.rb#19 - def format; end - - # Sets the format of this comment and resets any parsed document - # - # source://rdoc//lib/rdoc/comment.rb#143 - def format=(format); end - - # source://rdoc//lib/rdoc/comment.rb#148 - def inspect; end - - # Line where this Comment was written - # - # source://rdoc//lib/rdoc/comment.rb#29 - def line; end - - # Line where this Comment was written - # - # source://rdoc//lib/rdoc/comment.rb#29 - def line=(_arg0); end - - # The RDoc::TopLevel this comment was found in - # - # source://rdoc//lib/rdoc/comment.rb#24 - def location; end - - # The RDoc::TopLevel this comment was found in - # - # source://rdoc//lib/rdoc/comment.rb#24 - def location=(_arg0); end - - # Normalizes the text. See RDoc::Text#normalize_comment for details - # - # source://rdoc//lib/rdoc/comment.rb#157 - def normalize; end - - # Was this text normalized? - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/comment.rb#171 - def normalized?; end - - # Parses the comment into an RDoc::Markup::Document. The parsed document is - # cached until the text is changed. - # - # source://rdoc//lib/rdoc/comment.rb#179 - def parse; end - - # Removes private sections from this comment. Private sections are flush to - # the comment marker and start with -- and end with ++. - # For C-style comments, a private marker may not start at the opening of the - # comment. - # - # /* - # *-- - # * private - # *++ - # * public - # */ - # - # source://rdoc//lib/rdoc/comment.rb#200 - def remove_private; end - - # The text for this comment - # - # source://rdoc//lib/rdoc/comment.rb#39 - def text; end - - # Replaces this comment's text with +text+ and resets the parsed document. - # - # An error is raised if the comment contains a document but no text. - # - # @raise [RDoc::Error] - # - # source://rdoc//lib/rdoc/comment.rb#214 - def text=(text); end - - # The text for this comment - # - # Alias for text - # - # source://rdoc//lib/rdoc/comment.rb#39 - def to_s; end - - # Returns true if this comment is in TomDoc format. - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/comment.rb#225 - def tomdoc?; end - - private - - # -- - # TODO deep copy @document - # - # source://rdoc//lib/rdoc/comment.rb#70 - def initialize_copy(copy); end - - class << self - # Create a new parsed comment from a document - # - # source://rdoc//lib/rdoc/comment.rb#232 - def from_document(document); end - end -end - -# A constant -# -# source://rdoc//lib/rdoc/code_object/constant.rb#5 -class RDoc::Constant < ::RDoc::CodeObject - # Creates a new constant with +name+, +value+ and +comment+ - # - # @return [Constant] a new instance of Constant - # - # source://rdoc//lib/rdoc/code_object/constant.rb#32 - def initialize(name, value, comment); end - - # Constants are ordered by name - # - # source://rdoc//lib/rdoc/code_object/constant.rb#47 - def <=>(other); end - - # Constants are equal when their #parent and #name is the same - # - # source://rdoc//lib/rdoc/code_object/constant.rb#56 - def ==(other); end - - # A constant is documented if it has a comment, or is an alias - # for a documented class or module. - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/code_object/constant.rb#66 - def documented?; end - - # Full constant name including namespace - # - # source://rdoc//lib/rdoc/code_object/constant.rb#81 - def full_name; end - - # source://rdoc//lib/rdoc/code_object/constant.rb#99 - def inspect; end - - # The module or class this constant is an alias for - # - # source://rdoc//lib/rdoc/code_object/constant.rb#88 - def is_alias_for; end - - # Sets the module or class this is constant is an alias for. - # - # source://rdoc//lib/rdoc/code_object/constant.rb#12 - def is_alias_for=(_arg0); end - - # Dumps this Constant for use by ri. See also #marshal_load - # - # source://rdoc//lib/rdoc/code_object/constant.rb#109 - def marshal_dump; end - - # Loads this Constant from +array+. For a loaded Constant the following - # methods will return cached values: - # - # * #full_name - # * #parent_name - # - # source://rdoc//lib/rdoc/code_object/constant.rb#135 - def marshal_load(array); end - - # The constant's name - # - # source://rdoc//lib/rdoc/code_object/constant.rb#17 - def name; end - - # The constant's name - # - # source://rdoc//lib/rdoc/code_object/constant.rb#17 - def name=(_arg0); end - - # Path to this constant for use with HTML generator output. - # - # source://rdoc//lib/rdoc/code_object/constant.rb#153 - def path; end - - # source://rdoc//lib/rdoc/code_object/constant.rb#157 - def pretty_print(q); end - - # Sets the store for this class or module and its contained code objects. - # - # source://rdoc//lib/rdoc/code_object/constant.rb#171 - def store=(store); end - - # source://rdoc//lib/rdoc/code_object/constant.rb#177 - def to_s; end - - # The constant's value - # - # source://rdoc//lib/rdoc/code_object/constant.rb#22 - def value; end - - # The constant's value - # - # source://rdoc//lib/rdoc/code_object/constant.rb#22 - def value=(_arg0); end - - # The constant's visibility - # - # source://rdoc//lib/rdoc/code_object/constant.rb#27 - def visibility; end - - # The constant's visibility - # - # source://rdoc//lib/rdoc/code_object/constant.rb#27 - def visibility=(_arg0); end -end - -# A Context is something that can hold modules, classes, methods, attributes, -# aliases, requires, and includes. Classes, modules, and files are all -# Contexts. -# -# source://rdoc//lib/rdoc/code_object/context.rb#7 -class RDoc::Context < ::RDoc::CodeObject - include ::Comparable - - # Creates an unnamed empty context with public current visibility - # - # @return [Context] a new instance of Context - # - # source://rdoc//lib/rdoc/code_object/context.rb#123 - def initialize; end - - # Contexts are sorted by full_name - # - # source://rdoc//lib/rdoc/code_object/context.rb#171 - def <=>(other); end - - # Adds an item of type +klass+ with the given +name+ and +comment+ to the - # context. - # - # Currently only RDoc::Extend and RDoc::Include are supported. - # - # source://rdoc//lib/rdoc/code_object/context.rb#183 - def add(klass, name, comment); end - - # Adds +an_alias+ that is automatically resolved - # - # source://rdoc//lib/rdoc/code_object/context.rb#198 - def add_alias(an_alias); end - - # Adds +attribute+ if not already there. If it is (as method(s) or attribute), - # updates the comment if it was empty. - # - # The attribute is registered only if it defines a new method. - # For instance, attr_reader :foo will not be registered - # if method +foo+ exists, but attr_accessor :foo will be registered - # if method +foo+ exists, but foo= does not. - # - # source://rdoc//lib/rdoc/code_object/context.rb#225 - def add_attribute(attribute); end - - # Adds a class named +given_name+ with +superclass+. - # - # Both +given_name+ and +superclass+ may contain '::', and are - # interpreted relative to the +self+ context. This allows handling correctly - # examples like these: - # class RDoc::Gauntlet < Gauntlet - # module Mod - # class Object # implies < ::Object - # class SubObject < Object # this is _not_ ::Object - # - # Given class Container::Item RDoc assumes +Container+ is a module - # unless it later sees class Container. +add_class+ automatically - # upgrades +given_name+ to a class in this case. - # - # source://rdoc//lib/rdoc/code_object/context.rb#288 - def add_class(class_type, given_name, superclass = T.unsafe(nil)); end - - # Adds the class or module +mod+ to the modules or - # classes Hash +self_hash+, and to +all_hash+ (either - # TopLevel::modules_hash or TopLevel::classes_hash), - # unless #done_documenting is +true+. Sets the #parent of +mod+ - # to +self+, and its #section to #current_section. Returns +mod+. - # - # source://rdoc//lib/rdoc/code_object/context.rb#404 - def add_class_or_module(mod, self_hash, all_hash); end - - # Adds +constant+ if not already there. If it is, updates the comment, - # value and/or is_alias_for of the known constant if they were empty/nil. - # - # source://rdoc//lib/rdoc/code_object/context.rb#429 - def add_constant(constant); end - - # Adds extension module +ext+ which should be an RDoc::Extend - # - # source://rdoc//lib/rdoc/code_object/context.rb#463 - def add_extend(ext); end - - # Adds included module +include+ which should be an RDoc::Include - # - # source://rdoc//lib/rdoc/code_object/context.rb#454 - def add_include(include); end - - # Adds +method+ if not already there. If it is (as method or attribute), - # updates the comment if it was empty. - # - # source://rdoc//lib/rdoc/code_object/context.rb#473 - def add_method(method); end - - # Adds a module named +name+. If RDoc already knows +name+ is a class then - # that class is returned instead. See also #add_class. - # - # source://rdoc//lib/rdoc/code_object/context.rb#506 - def add_module(class_type, name); end - - # Adds an alias from +from+ (a class or module) to +name+ which was defined - # in +file+. - # - # source://rdoc//lib/rdoc/code_object/context.rb#527 - def add_module_alias(from, from_name, to, file); end - - # Adds a module by +RDoc::NormalModule+ instance. See also #add_module. - # - # source://rdoc//lib/rdoc/code_object/context.rb#519 - def add_module_by_normal_module(mod); end - - # Adds +require+ to this context's top level - # - # source://rdoc//lib/rdoc/code_object/context.rb#568 - def add_require(require); end - - # Returns a section with +title+, creating it if it doesn't already exist. - # +comment+ will be appended to the section's comment. - # - # A section with a +title+ of +nil+ will return the default section. - # - # See also RDoc::Context::Section - # - # source://rdoc//lib/rdoc/code_object/context.rb#586 - def add_section(title, comment = T.unsafe(nil)); end - - # Adds +thing+ to the collection +array+ - # - # source://rdoc//lib/rdoc/code_object/context.rb#600 - def add_to(array, thing); end - - # Class/module aliases - # - # source://rdoc//lib/rdoc/code_object/context.rb#25 - def aliases; end - - # Is there any content? - # - # This means any of: comment, aliases, methods, attributes, external - # aliases, require, constant. - # - # Includes and extends are also checked unless includes == false. - # - # source://rdoc//lib/rdoc/code_object/context.rb#616 - def any_content(includes = T.unsafe(nil)); end - - # All attr* methods - # - # source://rdoc//lib/rdoc/code_object/context.rb#30 - def attributes; end - - # Block params to be used in the next MethodAttr parsed under this context - # - # source://rdoc//lib/rdoc/code_object/context.rb#35 - def block_params; end - - # Block params to be used in the next MethodAttr parsed under this context - # - # source://rdoc//lib/rdoc/code_object/context.rb#35 - def block_params=(_arg0); end - - # Creates the full name for a child with +name+ - # - # source://rdoc//lib/rdoc/code_object/context.rb#632 - def child_name(name); end - - # Class attributes - # - # source://rdoc//lib/rdoc/code_object/context.rb#645 - def class_attributes; end - - # Class methods - # - # source://rdoc//lib/rdoc/code_object/context.rb#652 - def class_method_list; end - - # Array of classes in this context - # - # source://rdoc//lib/rdoc/code_object/context.rb#659 - def classes; end - - # All classes and modules in this namespace - # - # source://rdoc//lib/rdoc/code_object/context.rb#666 - def classes_and_modules; end - - # Hash of classes keyed by class name - # - # source://rdoc//lib/rdoc/code_object/context.rb#673 - def classes_hash; end - - # Constants defined - # - # source://rdoc//lib/rdoc/code_object/context.rb#40 - def constants; end - - # Hash of registered constants. - # - # source://rdoc//lib/rdoc/code_object/context.rb#118 - def constants_hash; end - - # Current visibility of this line - # - # source://rdoc//lib/rdoc/code_object/context.rb#102 - def current_line_visibility=(_arg0); end - - # The current documentation section that new items will be added to. If - # temporary_section is available it will be used. - # - # source://rdoc//lib/rdoc/code_object/context.rb#681 - def current_section; end - - # Sets the current documentation section of documentation - # - # source://rdoc//lib/rdoc/code_object/context.rb#45 - def current_section=(_arg0); end - - # Is part of this thing was defined in +file+? - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/code_object/context.rb#694 - def defined_in?(file); end - - # source://rdoc//lib/rdoc/code_object/context.rb#698 - def display(method_attr); end - - # Iterator for ancestors for duck-typing. Does nothing. See - # RDoc::ClassModule#each_ancestor. - # - # This method exists to make it easy to work with Context subclasses that - # aren't part of RDoc. - # - # source://rdoc//lib/rdoc/code_object/context.rb#713 - def each_ancestor(&_); end - - # Iterator for attributes - # - # source://rdoc//lib/rdoc/code_object/context.rb#719 - def each_attribute; end - - # Iterator for classes and modules - # - # source://rdoc//lib/rdoc/code_object/context.rb#726 - def each_classmodule(&block); end - - # Iterator for constants - # - # source://rdoc//lib/rdoc/code_object/context.rb#733 - def each_constant; end - - # Iterator for extension modules - # - # source://rdoc//lib/rdoc/code_object/context.rb#747 - def each_extend; end - - # Iterator for included modules - # - # source://rdoc//lib/rdoc/code_object/context.rb#740 - def each_include; end - - # Iterator for methods - # - # source://rdoc//lib/rdoc/code_object/context.rb#754 - def each_method; end - - # Iterator for each section's contents sorted by title. The +section+, the - # section's +constants+ and the sections +attributes+ are yielded. The - # +constants+ and +attributes+ collections are sorted. - # - # To retrieve methods in a section use #methods_by_type with the optional - # +section+ parameter. - # - # NOTE: Do not edit collections yielded by this method - # - # source://rdoc//lib/rdoc/code_object/context.rb#770 - def each_section; end - - # Modules this context is extended with - # - # source://rdoc//lib/rdoc/code_object/context.rb#60 - def extends; end - - # Aliases that could not be resolved. - # - # source://rdoc//lib/rdoc/code_object/context.rb#92 - def external_aliases; end - - # Finds an attribute +name+ with singleton value +singleton+. - # - # source://rdoc//lib/rdoc/code_object/context.rb#787 - def find_attribute(name, singleton); end - - # Finds an attribute with +name+ in this context - # - # source://rdoc//lib/rdoc/code_object/context.rb#795 - def find_attribute_named(name); end - - # Finds a class method with +name+ in this context - # - # source://rdoc//lib/rdoc/code_object/context.rb#809 - def find_class_method_named(name); end - - # Finds a constant with +name+ in this context - # - # source://rdoc//lib/rdoc/code_object/context.rb#816 - def find_constant_named(name); end - - # Find a module at a higher scope - # - # source://rdoc//lib/rdoc/code_object/context.rb#825 - def find_enclosing_module_named(name); end - - # Finds an external alias +name+ with singleton value +singleton+. - # - # source://rdoc//lib/rdoc/code_object/context.rb#832 - def find_external_alias(name, singleton); end - - # Finds an external alias with +name+ in this context - # - # source://rdoc//lib/rdoc/code_object/context.rb#839 - def find_external_alias_named(name); end - - # Finds a file with +name+ in this context - # - # source://rdoc//lib/rdoc/code_object/context.rb#853 - def find_file_named(name); end - - # Finds an instance method with +name+ in this context - # - # source://rdoc//lib/rdoc/code_object/context.rb#860 - def find_instance_method_named(name); end - - # Finds a method, constant, attribute, external alias, module or file - # named +symbol+ in this context. - # - # source://rdoc//lib/rdoc/code_object/context.rb#868 - def find_local_symbol(symbol); end - - # Finds a method named +name+ with singleton value +singleton+. - # - # source://rdoc//lib/rdoc/code_object/context.rb#880 - def find_method(name, singleton); end - - # Finds a instance or module method with +name+ in this context - # - # source://rdoc//lib/rdoc/code_object/context.rb#893 - def find_method_named(name); end - - # Find a module with +name+ using ruby's scoping rules - # - # source://rdoc//lib/rdoc/code_object/context.rb#907 - def find_module_named(name); end - - # Look up +symbol+, first as a module, then as a local symbol. - # - # source://rdoc//lib/rdoc/code_object/context.rb#917 - def find_symbol(symbol); end - - # Look up a module named +symbol+. - # - # source://rdoc//lib/rdoc/code_object/context.rb#924 - def find_symbol_module(symbol); end - - # The full name for this context. This method is overridden by subclasses. - # - # source://rdoc//lib/rdoc/code_object/context.rb#957 - def full_name; end - - # Does this context and its methods and constants all have documentation? - # - # (Yes, fully documented doesn't mean everything.) - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/code_object/context.rb#966 - def fully_documented?; end - - # URL for this with a +prefix+ - # - # source://rdoc//lib/rdoc/code_object/context.rb#976 - def http_url(prefix); end - - # Files this context is found in - # - # source://rdoc//lib/rdoc/code_object/context.rb#50 - def in_files; end - - # Modules this context includes - # - # source://rdoc//lib/rdoc/code_object/context.rb#55 - def includes; end - - # Sets the defaults for methods and so-forth - # - # source://rdoc//lib/rdoc/code_object/context.rb#145 - def initialize_methods_etc; end - - # Instance attributes - # - # source://rdoc//lib/rdoc/code_object/context.rb#987 - def instance_attributes; end - - # Instance methods - # -- - # TODO remove this later - # - # source://rdoc//lib/rdoc/code_object/context.rb#1003 - def instance_method_list; end - - # Instance methods - # - # source://rdoc//lib/rdoc/code_object/context.rb#994 - def instance_methods; end - - # Methods defined in this context - # - # source://rdoc//lib/rdoc/code_object/context.rb#65 - def method_list; end - - # Breaks method_list into a nested hash by type ('class' or - # 'instance') and visibility (+:public+, +:protected+, +:private+). - # - # If +section+ is provided only methods in that RDoc::Context::Section will - # be returned. - # - # source://rdoc//lib/rdoc/code_object/context.rb#1015 - def methods_by_type(section = T.unsafe(nil)); end - - # Hash of registered methods. Attributes are also registered here, - # twice if they are RW. - # - # source://rdoc//lib/rdoc/code_object/context.rb#108 - def methods_hash; end - - # Yields AnyMethod and Attr entries matching the list of names in +methods+. - # - # source://rdoc//lib/rdoc/code_object/context.rb#1038 - def methods_matching(methods, singleton = T.unsafe(nil), &block); end - - # Array of modules in this context - # - # source://rdoc//lib/rdoc/code_object/context.rb#1051 - def modules; end - - # Hash of modules keyed by module name - # - # source://rdoc//lib/rdoc/code_object/context.rb#1058 - def modules_hash; end - - # Name of this class excluding namespace. See also full_name - # - # source://rdoc//lib/rdoc/code_object/context.rb#70 - def name; end - - # Name to use to generate the url. - # #full_name by default. - # - # source://rdoc//lib/rdoc/code_object/context.rb#1066 - def name_for_path; end - - # Changes the visibility for new methods to +visibility+ - # - # source://rdoc//lib/rdoc/code_object/context.rb#1073 - def ongoing_visibility=(visibility); end - - # Params to be used in the next MethodAttr parsed under this context - # - # source://rdoc//lib/rdoc/code_object/context.rb#113 - def params; end - - # Params to be used in the next MethodAttr parsed under this context - # - # source://rdoc//lib/rdoc/code_object/context.rb#113 - def params=(_arg0); end - - # Record +top_level+ as a file +self+ is in. - # - # source://rdoc//lib/rdoc/code_object/context.rb#1080 - def record_location(top_level); end - - # Should we remove this context from the documentation? - # - # The answer is yes if: - # * #received_nodoc is +true+ - # * #any_content is +false+ (not counting includes) - # * All #includes are modules (not a string), and their module has - # #remove_from_documentation? == true - # * All classes and modules have #remove_from_documentation? == true - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/code_object/context.rb#1094 - def remove_from_documentation?; end - - # Removes methods and attributes with a visibility less than +min_visibility+. - # -- - # TODO mark the visibility of attributes in the template (if not public?) - # - # source://rdoc//lib/rdoc/code_object/context.rb#1107 - def remove_invisible(min_visibility); end - - # Only called when min_visibility == :public or :private - # - # source://rdoc//lib/rdoc/code_object/context.rb#1117 - def remove_invisible_in(array, min_visibility); end - - # Files this context requires - # - # source://rdoc//lib/rdoc/code_object/context.rb#75 - def requires; end - - # Tries to resolve unmatched aliases when a method or attribute has just - # been added. - # - # source://rdoc//lib/rdoc/code_object/context.rb#1133 - def resolve_aliases(added); end - - # Returns RDoc::Context::Section objects referenced in this context for use - # in a table of contents. - # - # source://rdoc//lib/rdoc/code_object/context.rb#1149 - def section_contents; end - - # Sections in this context - # - # source://rdoc//lib/rdoc/code_object/context.rb#1173 - def sections; end - - # source://rdoc//lib/rdoc/code_object/context.rb#1177 - def sections_hash; end - - # Given an array +names+ of constants, set the visibility of each constant to - # +visibility+ - # - # source://rdoc//lib/rdoc/code_object/context.rb#1202 - def set_constant_visibility_for(names, visibility); end - - # Sets the current section to a section with +title+. See also #add_section - # - # source://rdoc//lib/rdoc/code_object/context.rb#1184 - def set_current_section(title, comment); end - - # Given an array +methods+ of method names, set the visibility of each to - # +visibility+ - # - # source://rdoc//lib/rdoc/code_object/context.rb#1192 - def set_visibility_for(methods, visibility, singleton = T.unsafe(nil)); end - - # Sorts sections alphabetically (default) or in TomDoc fashion (none, - # Public, Internal, Deprecated) - # - # source://rdoc//lib/rdoc/code_object/context.rb#1213 - def sort_sections; end - - # Use this section for the next method, attribute or constant added. - # - # source://rdoc//lib/rdoc/code_object/context.rb#80 - def temporary_section; end - - # Use this section for the next method, attribute or constant added. - # - # source://rdoc//lib/rdoc/code_object/context.rb#80 - def temporary_section=(_arg0); end - - # source://rdoc//lib/rdoc/code_object/context.rb#1229 - def to_s; end - - # Return the TopLevel that owns us - # -- - # FIXME we can be 'owned' by several TopLevel (see #record_location & - # #in_files) - # - # source://rdoc//lib/rdoc/code_object/context.rb#1239 - def top_level; end - - # Hash old_name => [aliases], for aliases - # that haven't (yet) been resolved to a method/attribute. - # (Not to be confused with the aliases of the context.) - # - # source://rdoc//lib/rdoc/code_object/context.rb#87 - def unmatched_alias_lists; end - - # Hash old_name => [aliases], for aliases - # that haven't (yet) been resolved to a method/attribute. - # (Not to be confused with the aliases of the context.) - # - # source://rdoc//lib/rdoc/code_object/context.rb#87 - def unmatched_alias_lists=(_arg0); end - - # Upgrades NormalModule +mod+ in +enclosing+ to a +class_type+ - # - # source://rdoc//lib/rdoc/code_object/context.rb#1249 - def upgrade_to_class(mod, class_type, enclosing); end - - # Current visibility of this context - # - # source://rdoc//lib/rdoc/code_object/context.rb#97 - def visibility; end - - # Current visibility of this context - # - # source://rdoc//lib/rdoc/code_object/context.rb#97 - def visibility=(_arg0); end -end - -# A section of documentation like: -# -# # :section: The title -# # The body -# -# Sections can be referenced multiple times and will be collapsed into a -# single section. -# -# source://rdoc//lib/rdoc/code_object/context/section.rb#13 -class RDoc::Context::Section - include ::RDoc::Text - include ::RDoc::Generator::Markup - - # Creates a new section with +title+ and +comment+ - # - # @return [Section] a new instance of Section - # - # source://rdoc//lib/rdoc/code_object/context/section.rb#42 - def initialize(parent, title, comment); end - - # Sections are equal when they have the same #title - # - # source://rdoc//lib/rdoc/code_object/context/section.rb#54 - def ==(other); end - - # Adds +comment+ to this section - # - # source://rdoc//lib/rdoc/code_object/context/section.rb#63 - def add_comment(comment); end - - # Anchor reference for linking to this section - # - # source://rdoc//lib/rdoc/code_object/context/section.rb#74 - def aref; end - - # Section comment - # - # source://rdoc//lib/rdoc/code_object/context/section.rb#22 - def comment; end - - # Section comments - # - # source://rdoc//lib/rdoc/code_object/context/section.rb#27 - def comments; end - - # Sections are equal when they have the same #title - # - # source://rdoc//lib/rdoc/code_object/context/section.rb#54 - def eql?(other); end - - # Extracts the comment for this section from the original comment block. - # If the first line contains :section:, strip it and use the rest. - # Otherwise remove lines up to the line containing :section:, and look - # for those lines again at the end and remove them. This lets us write - # - # # :section: The title - # # The body - # - # source://rdoc//lib/rdoc/code_object/context/section.rb#89 - def extract_comment(comment); end - - # source://rdoc//lib/rdoc/code_object/context/section.rb#115 - def hash; end - - # The files comments in this section come from - # - # source://rdoc//lib/rdoc/code_object/context/section.rb#122 - def in_files; end - - # source://rdoc//lib/rdoc/code_object/context/section.rb#111 - def inspect; end - - # Serializes this Section. The title and parsed comment are saved, but not - # the section parent which must be restored manually. - # - # source://rdoc//lib/rdoc/code_object/context/section.rb#130 - def marshal_dump; end - - # De-serializes this Section. The section parent must be restored manually. - # - # source://rdoc//lib/rdoc/code_object/context/section.rb#141 - def marshal_load(array); end - - # Context this Section lives in - # - # source://rdoc//lib/rdoc/code_object/context/section.rb#32 - def parent; end - - # Parses +comment_location+ into an RDoc::Markup::Document composed of - # multiple RDoc::Markup::Documents with their file set. - # - # source://rdoc//lib/rdoc/code_object/context/section.rb#152 - def parse; end - - # The section's title, or 'Top Section' if the title is nil. - # - # This is used by the table of contents template so the name is silly. - # - # source://rdoc//lib/rdoc/code_object/context/section.rb#161 - def plain_html; end - - # Removes a comment from this section if it is from the same file as - # +comment+ - # - # source://rdoc//lib/rdoc/code_object/context/section.rb#169 - def remove_comment(target_comment); end - - # Section title - # - # source://rdoc//lib/rdoc/code_object/context/section.rb#37 - def title; end -end - -# RDoc::CrossReference is a reusable way to create cross references for names. -# -# source://rdoc//lib/rdoc/cross_reference.rb#8 -class RDoc::CrossReference - # Allows cross-references to be created based on the given +context+ - # (RDoc::Context). - # - # @return [CrossReference] a new instance of CrossReference - # - # source://rdoc//lib/rdoc/cross_reference.rb#127 - def initialize(context); end - - # Returns a reference to +name+. - # - # If the reference is found and +name+ is not documented +text+ will be - # returned. If +name+ is escaped +name+ is returned. If +name+ is not - # found +text+ is returned. - # - # source://rdoc//lib/rdoc/cross_reference.rb#190 - def resolve(name, text); end - - # Returns a method reference to +name+. - # - # source://rdoc//lib/rdoc/cross_reference.rb#137 - def resolve_method(name); end - - # Hash of references that have been looked-up to their replacements - # - # source://rdoc//lib/rdoc/cross_reference.rb#121 - def seen; end - - # Hash of references that have been looked-up to their replacements - # - # source://rdoc//lib/rdoc/cross_reference.rb#121 - def seen=(_arg0); end -end - -# Regular expression to match method arguments. -# -# source://rdoc//lib/rdoc/cross_reference.rb#28 -RDoc::CrossReference::METHOD_ARGS_REGEXP_STR = T.let(T.unsafe(nil), String) - -# Regular expression to match a single method argument. -# -# source://rdoc//lib/rdoc/cross_reference.rb#23 -RDoc::CrossReference::METHOD_ARG_REGEXP_STR = T.let(T.unsafe(nil), String) - -# A subclass of ERB that writes directly to an IO. Credit to Aaron Patterson -# and Masatoshi SEKI. -# -# To use: -# -# erbio = RDoc::ERBIO.new '<%= "hello world" %>', nil, nil -# -# File.open 'hello.txt', 'w' do |io| -# erbio.result binding -# end -# -# Note that binding must enclose the io you wish to output on. -# -# source://rdoc//lib/rdoc/erbio.rb#18 -class RDoc::ERBIO < ::ERB - # Defaults +eoutvar+ to 'io', otherwise is identical to ERB's initialize - # - # @return [ERBIO] a new instance of ERBIO - # - # source://rdoc//lib/rdoc/erbio.rb#23 - def initialize(str, trim_mode: T.unsafe(nil), eoutvar: T.unsafe(nil)); end - - # Instructs +compiler+ how to write to +io_variable+ - # - # source://rdoc//lib/rdoc/erbio.rb#30 - def set_eoutvar(compiler, io_variable); end -end - -# Allows an ERB template to be rendered in the context (binding) of an -# existing ERB template evaluation. -# -# source://rdoc//lib/rdoc/erb_partial.rb#6 -class RDoc::ERBPartial < ::ERB - # Overrides +compiler+ startup to set the +eoutvar+ to an empty string only - # if it isn't already set. - # - # source://rdoc//lib/rdoc/erb_partial.rb#12 - def set_eoutvar(compiler, eoutvar = T.unsafe(nil)); end -end - -# This class is a wrapper around File IO and Encoding that helps RDoc load -# files and convert them to the correct encoding. -# -# source://rdoc//lib/rdoc/encoding.rb#8 -module RDoc::Encoding - class << self - # Changes encoding based on +encoding+ without converting and returns new - # string - # - # source://rdoc//lib/rdoc/encoding.rb#112 - def change_encoding(text, encoding); end - - # Detects the encoding of +string+ based on the magic comment - # - # source://rdoc//lib/rdoc/encoding.rb#92 - def detect_encoding(string); end - - # Reads the contents of +filename+ and handles any encoding directives in - # the file. - # - # The content will be converted to the +encoding+. If the file cannot be - # converted a warning will be printed and nil will be returned. - # - # If +force_transcode+ is true the document will be transcoded and any - # unknown character in the target encoding will be replaced with '?' - # - # source://rdoc//lib/rdoc/encoding.rb#32 - def read_file(filename, encoding, force_transcode = T.unsafe(nil)); end - - # Removes magic comments and shebang - # - # source://rdoc//lib/rdoc/encoding.rb#102 - def remove_magic_comment(string); end - end -end - -# source://rdoc//lib/rdoc/encoding.rb#10 -RDoc::Encoding::HEADER_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://rdoc//lib/rdoc/generator/darkfish.rb#55 -class RDoc::Generator::Darkfish - include ::ERB::Escape - include ::ERB::Util - - # Initialize a few instance variables before we start - # - # @return [Darkfish] a new instance of Darkfish - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#159 - def initialize(store, options); end - - # Creates a template from its components and the +body_file+. - # - # For backwards compatibility, if +body_file+ contains "--op from the - # options for a full path. - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#102 - def base_dir; end - - # Directory where generated class HTML files live relative to the output - # dir. - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#191 - def class_dir; end - - # Classes and modules to be used by this generator, not necessarily - # displayed. See also #modsort - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#108 - def classes; end - - # Copies static files from the static_path into the output directory - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#265 - def copy_static; end - - # Output progress information if debugging is enabled - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#182 - def debug_msg(*msg); end - - # No files will be written when dry_run is true. - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#113 - def dry_run; end - - # No files will be written when dry_run is true. - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#113 - def dry_run=(_arg0); end - - # Returns an excerpt of the comment for usage in meta description tags - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#787 - def excerpt(comment); end - - # Directory where generated class HTML files live relative to the output - # dir. - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#199 - def file_dir; end - - # When false the generate methods return a String instead of writing to a - # file. The default is true. - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#119 - def file_output; end - - # When false the generate methods return a String instead of writing to a - # file. The default is true. - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#119 - def file_output=(_arg0); end - - # Files to be displayed by this generator - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#124 - def files; end - - # Create the directories the generated docs will live in if they don't - # already exist. - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#207 - def gen_sub_directories; end - - # Build the initial indices and output objects based on an array of TopLevel - # objects containing the extracted information. - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#241 - def generate; end - - # source://rdoc//lib/rdoc/generator/darkfish.rb#807 - def generate_ancestor_list(ancestors, klass); end - - # Generates a class file for +klass+ - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#340 - def generate_class(klass, template_file = T.unsafe(nil)); end - - # Generate a documentation file for each class and module - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#371 - def generate_class_files; end - - # Generate a documentation file for each file - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#398 - def generate_file_files; end - - # Generate an index page which lists all the classes which are documented. - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#303 - def generate_index; end - - # Generate a page file for +file+ - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#467 - def generate_page(file); end - - # Generates the 404 page for the RDoc servlet - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#496 - def generate_servlet_not_found(message); end - - # Generates the servlet root page for the RDoc servlet - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#529 - def generate_servlet_root(installed); end - - # Generate an index page which lists all the classes which are documented. - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#556 - def generate_table_of_contents; end - - # Return a list of the documented modules sorted by salience first, then - # by name. - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#294 - def get_sorted_module_list(classes); end - - # Try to extract Subversion information out of the first constant whose - # value looks like a subversion Id tag. If no matching constant is found, - # and empty hash is returned. - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#655 - def get_svninfo(klass); end - - # source://rdoc//lib/rdoc/generator/darkfish.rb#587 - def install_rdoc_static_file(source, destination, options); end - - # The JSON index generator for this Darkfish generator - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#129 - def json_index; end - - # Methods to be displayed by this generator - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#134 - def methods; end - - # Sorted list of classes and modules to be displayed by this generator - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#139 - def modsort; end - - # The output directory - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#154 - def outputdir; end - - # Renders the ERb contained in +file_name+ relative to the template - # directory and returns the result based on the current context. - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#699 - def render(file_name); end - - # Load and render the erb template in the given +template_file+ and write - # it out to +out_file+. - # - # Both +template_file+ and +out_file+ should be Pathname-like objects. - # - # An io will be yielded which must be captured by binding in the caller. - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#717 - def render_template(template_file, out_file = T.unsafe(nil)); end - - # Prepares for generation of output from the current directory - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#607 - def setup; end - - # The RDoc::Store that is the source of the generated content - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#144 - def store; end - - # The directory where the template files live - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#149 - def template_dir; end - - # Retrieves a cache template for +file+, if present, or fills the cache. - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#764 - def template_for(file, page = T.unsafe(nil), klass = T.unsafe(nil)); end - - # Creates the result for +template+ with +context+. If an error is raised a - # Pathname +template_file+ will indicate the file where the error occurred. - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#751 - def template_result(template, context, template_file); end - - # Return a string describing the amount of time in the given number of - # seconds in terms a human can understand easily. - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#624 - def time_delta_string(seconds); end - - # Copy over the stylesheet into the appropriate place in the output - # directory. - # - # source://rdoc//lib/rdoc/generator/darkfish.rb#215 - def write_style_sheet; end -end - -# source://rdoc//lib/rdoc/generator/json_index.rb#77 -class RDoc::Generator::JsonIndex - include ::RDoc::Text - - # Creates a new generator. +parent_generator+ is used to determine the - # class_dir and file_dir of links in the output index. - # - # +options+ are the same options passed to the parent generator. - # - # @return [JsonIndex] a new instance of JsonIndex - # - # source://rdoc//lib/rdoc/generator/json_index.rb#94 - def initialize(parent_generator, options); end - - # Builds the JSON index as a Hash. - # - # source://rdoc//lib/rdoc/generator/json_index.rb#110 - def build_index; end - - # The directory classes are written to - # - # source://rdoc//lib/rdoc/generator/json_index.rb#271 - def class_dir; end - - # Output progress information if debugging is enabled - # - # source://rdoc//lib/rdoc/generator/json_index.rb#123 - def debug_msg(*msg); end - - # The directory files are written to - # - # source://rdoc//lib/rdoc/generator/json_index.rb#278 - def file_dir; end - - # Writes the JSON index to disk - # - # source://rdoc//lib/rdoc/generator/json_index.rb#131 - def generate; end - - # Compress the search_index.js file using gzip - # - # source://rdoc//lib/rdoc/generator/json_index.rb#166 - def generate_gzipped; end - - # source://rdoc//lib/rdoc/generator/json_index.rb#86 - def index; end - - # Adds classes and modules to the index - # - # source://rdoc//lib/rdoc/generator/json_index.rb#211 - def index_classes; end - - # Adds methods to the index - # - # source://rdoc//lib/rdoc/generator/json_index.rb#230 - def index_methods; end - - # Adds pages to the index - # - # source://rdoc//lib/rdoc/generator/json_index.rb#251 - def index_pages; end - - # source://rdoc//lib/rdoc/generator/json_index.rb#282 - def reset(files, classes); end - - # Removes whitespace and downcases +string+ - # - # source://rdoc//lib/rdoc/generator/json_index.rb#296 - def search_string(string); end -end - -# Handle common RDoc::Markup tasks for various CodeObjects -# -# This module is loaded by generators. It allows RDoc's CodeObject tree to -# avoid loading generator code to improve startup time for +ri+. -# -# source://rdoc//lib/rdoc/generator/markup.rb#8 -module RDoc::Generator::Markup - # Generates a relative URL from this object's path to +target_path+ - # - # source://rdoc//lib/rdoc/generator/markup.rb#13 - def aref_to(target_path); end - - # Generates a relative URL from +from_path+ to this object's path - # - # source://rdoc//lib/rdoc/generator/markup.rb#20 - def as_href(from_path); end - - # Build a webcvs URL starting for the given +url+ with +full_path+ appended - # as the destination path. If +url+ contains '%s' +full_path+ will be - # will replace the %s using sprintf on the +url+. - # - # source://rdoc//lib/rdoc/generator/markup.rb#50 - def cvs_url(url, full_path); end - - # Handy wrapper for marking up this object's comment - # - # source://rdoc//lib/rdoc/generator/markup.rb#27 - def description; end - - # Creates an RDoc::Markup::ToHtmlCrossref formatter - # - # source://rdoc//lib/rdoc/generator/markup.rb#34 - def formatter; end -end - -# Generates a POT file. -# -# Here is a translator work flow with the generator. -# -# == Create .pot -# -# You create .pot file by pot formatter: -# -# % rdoc --format pot -# -# It generates doc/rdoc.pot. -# -# == Create .po -# -# You create .po file from doc/rdoc.pot. This operation is needed only -# the first time. This work flow assumes that you are a translator -# for Japanese. -# -# You create locale/ja/rdoc.po from doc/rdoc.pot. You can use msginit -# provided by GNU gettext or rmsginit provided by gettext gem. This -# work flow uses gettext gem because it is more portable than GNU -# gettext for Rubyists. Gettext gem is implemented by pure Ruby. -# -# % gem install gettext -# % mkdir -p locale/ja -# % rmsginit --input doc/rdoc.pot --output locale/ja/rdoc.po --locale ja -# -# Translate messages in .po -# -# You translate messages in .po by a PO file editor. po-mode.el exists -# for Emacs users. There are some GUI tools such as GTranslator. -# There are some Web services such as POEditor and Tansifex. You can -# edit by your favorite text editor because .po is a text file. -# Generate localized documentation -# -# You can generate localized documentation with locale/ja/rdoc.po: -# -# % rdoc --locale ja -# -# You can find documentation in Japanese in doc/. Yay! -# -# == Update translation -# -# You need to update translation when your application is added or -# modified messages. -# -# You can update .po by the following command lines: -# -# % rdoc --format pot -# % rmsgmerge --update locale/ja/rdoc.po doc/rdoc.pot -# -# You edit locale/ja/rdoc.po to translate new messages. -# -# source://rdoc//lib/rdoc/generator/pot.rb#56 -class RDoc::Generator::POT - # Set up a new .pot generator - # - # @return [POT] a new instance of POT - # - # source://rdoc//lib/rdoc/generator/pot.rb#68 - def initialize(store, options); end - - # source://rdoc//lib/rdoc/generator/pot.rb#85 - def class_dir; end - - # Writes .pot to disk. - # - # source://rdoc//lib/rdoc/generator/pot.rb#76 - def generate; end - - private - - # source://rdoc//lib/rdoc/generator/pot.rb#90 - def extract_messages; end -end - -# Extracts message from RDoc::Store -# -# source://rdoc//lib/rdoc/generator/pot/message_extractor.rb#5 -class RDoc::Generator::POT::MessageExtractor - # Creates a message extractor for +store+. - # - # @return [MessageExtractor] a new instance of MessageExtractor - # - # source://rdoc//lib/rdoc/generator/pot/message_extractor.rb#10 - def initialize(store); end - - # Extracts messages from +store+, stores them into - # RDoc::Generator::POT::PO and returns it. - # - # source://rdoc//lib/rdoc/generator/pot/message_extractor.rb#19 - def extract; end - - private - - # source://rdoc//lib/rdoc/generator/pot/message_extractor.rb#64 - def entry(msgid, options); end - - # source://rdoc//lib/rdoc/generator/pot/message_extractor.rb#28 - def extract_from_klass(klass); end - - # source://rdoc//lib/rdoc/generator/pot/message_extractor.rb#51 - def extract_text(text, comment, location = T.unsafe(nil)); end -end - -# Generates a PO format text -# -# source://rdoc//lib/rdoc/generator/pot/po.rb#5 -class RDoc::Generator::POT::PO - # Creates an object that represents PO format. - # - # @return [PO] a new instance of PO - # - # source://rdoc//lib/rdoc/generator/pot/po.rb#10 - def initialize; end - - # Adds a PO entry to the PO. - # - # source://rdoc//lib/rdoc/generator/pot/po.rb#18 - def add(entry); end - - # Returns PO format text for the PO. - # - # source://rdoc//lib/rdoc/generator/pot/po.rb#29 - def to_s; end - - private - - # source://rdoc//lib/rdoc/generator/pot/po.rb#40 - def add_header; end - - # source://rdoc//lib/rdoc/generator/pot/po.rb#44 - def header_entry; end - - # source://rdoc//lib/rdoc/generator/pot/po.rb#73 - def sort_entries; end -end - -# A PO entry in PO -# -# source://rdoc//lib/rdoc/generator/pot/po_entry.rb#5 -class RDoc::Generator::POT::POEntry - # Creates a PO entry for +msgid+. Other values can be specified by - # +options+. - # - # @return [POEntry] a new instance of POEntry - # - # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#29 - def initialize(msgid, options = T.unsafe(nil)); end - - # The comment content extracted from source file - # - # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#17 - def extracted_comment; end - - # The flags of the PO entry - # - # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#23 - def flags; end - - # Merges the PO entry with +other_entry+. - # - # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#56 - def merge(other_entry); end - - # The msgid content - # - # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#8 - def msgid; end - - # The msgstr content - # - # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#11 - def msgstr; end - - # The locations where the PO entry is extracted - # - # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#20 - def references; end - - # Returns the PO entry in PO format. - # - # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#41 - def to_s; end - - # The comment content created by translator (PO editor) - # - # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#14 - def translator_comment; end - - private - - # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#120 - def escape(string); end - - # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#72 - def format_comment(mark, comment); end - - # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#88 - def format_extracted_comment; end - - # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#102 - def format_flags; end - - # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#109 - def format_message(message); end - - # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#92 - def format_references; end - - # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#84 - def format_translator_comment; end - - # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#137 - def merge_array(array1, array2); end - - # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#133 - def merge_string(string1, string2); end -end - -# Generates ri data files -# -# source://rdoc//lib/rdoc/generator/ri.rb#5 -class RDoc::Generator::RI - # Set up a new ri generator - # - # @return [RI] a new instance of RI - # - # source://rdoc//lib/rdoc/generator/ri.rb#17 - def initialize(store, options); end - - # Writes the parsed data store to disk for use by ri. - # - # source://rdoc//lib/rdoc/generator/ri.rb#26 - def generate; end -end - -# A message container for a locale. -# -# This object provides the following two features: -# -# * Loads translated messages from .po file. -# * Translates a message into the locale. -# -# source://rdoc//lib/rdoc/i18n/locale.rb#10 -class RDoc::I18n::Locale - # Creates a new locale object for +name+ locale. +name+ must - # follow IETF language tag format. - # - # @return [Locale] a new instance of Locale - # - # source://rdoc//lib/rdoc/i18n/locale.rb#48 - def initialize(name); end - - # Loads translation messages from +locale_directory+/+@name+/rdoc.po - # or +locale_directory+/+@name+.po. The former has high priority. - # - # This method requires gettext gem for parsing .po file. If you - # don't have gettext gem, this method doesn't load .po file. This - # method warns and returns +false+. - # - # Returns +true+ if succeeded, +false+ otherwise. - # - # source://rdoc//lib/rdoc/i18n/locale.rb#63 - def load(locale_directory); end - - # The name of the locale. It uses IETF language tag format - # +[language[_territory][.codeset][@modifier]]+. - # - # See also {BCP 47 - Tags for Identifying - # Languages}[http://tools.ietf.org/rfc/bcp/bcp47.txt]. - # - # source://rdoc//lib/rdoc/i18n/locale.rb#42 - def name; end - - # Translates the +message+ into locale. If there is no translation - # messages for +message+ in locale, +message+ itself is returned. - # - # source://rdoc//lib/rdoc/i18n/locale.rb#98 - def translate(message); end - - class << self - # Returns the locale object for +locale_name+. - # - # source://rdoc//lib/rdoc/i18n/locale.rb#19 - def [](locale_name); end - - # Sets the locale object for +locale_name+. - # - # Normally, this method is not used. This method is useful for - # testing. - # - # source://rdoc//lib/rdoc/i18n/locale.rb#29 - def []=(locale_name, locale); end - end -end - -# An i18n supported text. -# -# This object provides the following two features: -# -# * Extracts translation messages from wrapped raw text. -# * Translates wrapped raw text in specified locale. -# -# Wrapped raw text is one of String, RDoc::Comment or Array of them. -# -# source://rdoc//lib/rdoc/i18n/text.rb#12 -class RDoc::I18n::Text - # Creates a new i18n supported text for +raw+ text. - # - # @return [Text] a new instance of Text - # - # source://rdoc//lib/rdoc/i18n/text.rb#17 - def initialize(raw); end - - # Extracts translation target messages and yields each message. - # - # Each yielded message is a Hash. It consists of the followings: - # - # :type :: :paragraph - # :paragraph :: String (The translation target message itself.) - # :line_no :: Integer (The line number of the :paragraph is started.) - # - # The above content may be added in the future. - # - # source://rdoc//lib/rdoc/i18n/text.rb#32 - def extract_messages; end - - # Translates raw text into +locale+. - # - # source://rdoc//lib/rdoc/i18n/text.rb#44 - def translate(locale); end - - private - - # source://rdoc//lib/rdoc/i18n/text.rb#88 - def each_line(raw, &block); end - - # @yield [part] - # - # source://rdoc//lib/rdoc/i18n/text.rb#101 - def emit_empty_line_event(line, line_no); end - - # source://rdoc//lib/rdoc/i18n/text.rb#110 - def emit_paragraph_event(paragraph, paragraph_start_line, line_no, &block); end - - # source://rdoc//lib/rdoc/i18n/text.rb#60 - def parse(&block); end -end - -# source://rdoc//lib/rdoc/markdown.rb#182 -class RDoc::Markdown - # Creates a new markdown parser that enables the given +extensions+. - # - # @return [Markdown] a new instance of Markdown - # - # source://rdoc//lib/rdoc/markdown.rb#668 - def initialize(extensions = T.unsafe(nil), debug = T.unsafe(nil)); end - - # Alphanumeric = %literals.Alphanumeric - # - # source://rdoc//lib/rdoc/markdown.rb#14715 - def _Alphanumeric; end - - # AlphanumericAscii = %literals.AlphanumericAscii - # - # source://rdoc//lib/rdoc/markdown.rb#14722 - def _AlphanumericAscii; end - - # AtxHeading = AtxStart:s @Spacechar+ AtxInline+:a (@Sp /#*/ @Sp)? @Newline { RDoc::Markup::Heading.new(s, a.join) } - # - # source://rdoc//lib/rdoc/markdown.rb#1162 - def _AtxHeading; end - - # AtxInline = !@Newline !(@Sp /#*/ @Sp @Newline) Inline - # - # source://rdoc//lib/rdoc/markdown.rb#1080 - def _AtxInline; end - - # AtxStart = < /\#{1,6}/ > { text.length } - # - # source://rdoc//lib/rdoc/markdown.rb#1136 - def _AtxStart; end - - # AutoLink = (AutoLinkUrl | AutoLinkEmail) - # - # source://rdoc//lib/rdoc/markdown.rb#11584 - def _AutoLink; end - - # AutoLinkEmail = "<" "mailto:"? < /[\w+.\/!%~$-]+/i "@" (!@Newline !">" .)+ > ">" { "mailto:#{text}" } - # - # source://rdoc//lib/rdoc/markdown.rb#11717 - def _AutoLinkEmail; end - - # AutoLinkUrl = "<" < /[A-Za-z]+/ "://" (!@Newline !">" .)+ > ">" { text } - # - # source://rdoc//lib/rdoc/markdown.rb#11602 - def _AutoLinkUrl; end - - # BOM = %literals.BOM - # - # source://rdoc//lib/rdoc/markdown.rb#14729 - def _BOM; end - - # BlankLine = @Sp @Newline { "\n" } - # - # source://rdoc//lib/rdoc/markdown.rb#14158 - def _BlankLine; end - - # Block = @BlankLine* (BlockQuote | Verbatim | CodeFence | Table | Note | Reference | HorizontalRule | Heading | OrderedList | BulletList | DefinitionList | HtmlBlock | StyleBlock | Para | Plain) - # - # source://rdoc//lib/rdoc/markdown.rb#939 - def _Block; end - - # BlockQuote = BlockQuoteRaw:a { RDoc::Markup::BlockQuote.new(*a) } - # - # source://rdoc//lib/rdoc/markdown.rb#1576 - def _BlockQuote; end - - # BlockQuoteRaw = @StartList:a (">" " "? Line:l { a << l } (!">" !@BlankLine Line:c { a << c })* (@BlankLine:n { a << n })*)+ { inner_parse a.join } - # - # source://rdoc//lib/rdoc/markdown.rb#1599 - def _BlockQuoteRaw; end - - # Bullet = !HorizontalRule @NonindentSpace /[+*-]/ @Spacechar+ - # - # source://rdoc//lib/rdoc/markdown.rb#2164 - def _Bullet; end - - # BulletList = &Bullet (ListTight | ListLoose):a { RDoc::Markup::List.new(:BULLET, *a) } - # - # source://rdoc//lib/rdoc/markdown.rb#2208 - def _BulletList; end - - # CharEntity = "&" < /[A-Za-z0-9]+/ > ";" { if entity = HTML_ENTITIES[text] then entity.pack 'U*' else "&#{text};" end } - # - # source://rdoc//lib/rdoc/markdown.rb#14822 - def _CharEntity; end - - # Code = (Ticks1 @Sp < ((!"`" Nonspacechar)+ | !Ticks1 /`+/ | !(@Sp Ticks1) (@Spacechar | @Newline !@BlankLine))+ > @Sp Ticks1 | Ticks2 @Sp < ((!"`" Nonspacechar)+ | !Ticks2 /`+/ | !(@Sp Ticks2) (@Spacechar | @Newline !@BlankLine))+ > @Sp Ticks2 | Ticks3 @Sp < ((!"`" Nonspacechar)+ | !Ticks3 /`+/ | !(@Sp Ticks3) (@Spacechar | @Newline !@BlankLine))+ > @Sp Ticks3 | Ticks4 @Sp < ((!"`" Nonspacechar)+ | !Ticks4 /`+/ | !(@Sp Ticks4) (@Spacechar | @Newline !@BlankLine))+ > @Sp Ticks4 | Ticks5 @Sp < ((!"`" Nonspacechar)+ | !Ticks5 /`+/ | !(@Sp Ticks5) (@Spacechar | @Newline !@BlankLine))+ > @Sp Ticks5) { "#{text}" } - # - # source://rdoc//lib/rdoc/markdown.rb#12521 - def _Code; end - - # CodeFence = &{ github? } Ticks3 (@Sp StrChunk:format)? Spnl < ((!"`" Nonspacechar)+ | !Ticks3 /`+/ | Spacechar | @Newline)+ > Ticks3 @Sp @Newline* { verbatim = RDoc::Markup::Verbatim.new text verbatim.format = format.intern if format.instance_of?(String) verbatim } - # - # source://rdoc//lib/rdoc/markdown.rb#15691 - def _CodeFence; end - - # DecEntity = "&#" < /[0-9]+/ > ";" { [text.to_i].pack 'U' } - # - # source://rdoc//lib/rdoc/markdown.rb#14786 - def _DecEntity; end - - # DefinitionList = &{ definition_lists? } DefinitionListItem+:list { RDoc::Markup::List.new :NOTE, *list.flatten } - # - # source://rdoc//lib/rdoc/markdown.rb#16349 - def _DefinitionList; end - - # DefinitionListDefinition = @NonindentSpace ":" @Space Inlines:a @BlankLine+ { paragraph a } - # - # source://rdoc//lib/rdoc/markdown.rb#16492 - def _DefinitionListDefinition; end - - # DefinitionListItem = DefinitionListLabel+:label DefinitionListDefinition+:defns { list_items = [] list_items << RDoc::Markup::ListItem.new(label, defns.shift) list_items.concat defns.map { |defn| RDoc::Markup::ListItem.new nil, defn } unless list_items.empty? list_items } - # - # source://rdoc//lib/rdoc/markdown.rb#16393 - def _DefinitionListItem; end - - # DefinitionListLabel = Inline:label @Sp @Newline { label } - # - # source://rdoc//lib/rdoc/markdown.rb#16459 - def _DefinitionListLabel; end - - # Digit = [0-9] - # - # source://rdoc//lib/rdoc/markdown.rb#14701 - def _Digit; end - - # Doc = BOM? Block*:a { RDoc::Markup::Document.new(*a.compact) } - # - # source://rdoc//lib/rdoc/markdown.rb#899 - def _Doc; end - - # Emph = (EmphStar | EmphUl) - # - # source://rdoc//lib/rdoc/markdown.rb#10293 - def _Emph; end - - # EmphStar = "*" !@Whitespace @StartList:a (!"*" Inline:b { a << b } | StrongStar:b { a << b })+ "*" { emphasis a.join } - # - # source://rdoc//lib/rdoc/markdown.rb#10329 - def _EmphStar; end - - # EmphUl = "_" !@Whitespace @StartList:a (!"_" Inline:b { a << b } | StrongUl:b { a << b })+ "_" { emphasis a.join } - # - # source://rdoc//lib/rdoc/markdown.rb#10487 - def _EmphUl; end - - # EmptyTitle = "" - # - # source://rdoc//lib/rdoc/markdown.rb#12096 - def _EmptyTitle; end - - # Endline = (@LineBreak | @TerminalEndline | @NormalEndline) - # - # source://rdoc//lib/rdoc/markdown.rb#9927 - def _Endline; end - - # Entity = (HexEntity | DecEntity | CharEntity):a { a } - # - # source://rdoc//lib/rdoc/markdown.rb#9890 - def _Entity; end - - # Enumerator = @NonindentSpace [0-9]+ "." @Spacechar+ - # - # source://rdoc//lib/rdoc/markdown.rb#2697 - def _Enumerator; end - - # Eof = !. - # - # source://rdoc//lib/rdoc/markdown.rb#14552 - def _Eof; end - - # EscapedChar = "\\" !@Newline < /[:\\`|*_{}\[\]()#+.!><-]/ > { text } - # - # source://rdoc//lib/rdoc/markdown.rb#9851 - def _EscapedChar; end - - # ExplicitLink = Label:l "(" @Sp Source:s Spnl Title @Sp ")" { "{#{l}}[#{s}]" } - # - # source://rdoc//lib/rdoc/markdown.rb#11157 - def _ExplicitLink; end - - # ExtendedSpecialChar = &{ notes? } "^" - # - # source://rdoc//lib/rdoc/markdown.rb#15194 - def _ExtendedSpecialChar; end - - # Heading = (SetextHeading | AtxHeading) - # - # source://rdoc//lib/rdoc/markdown.rb#1558 - def _Heading; end - - # HexEntity = /&#x/i < /[0-9a-fA-F]+/ > ";" { [text.to_i(16)].pack 'U' } - # - # source://rdoc//lib/rdoc/markdown.rb#14750 - def _HexEntity; end - - # HorizontalRule = @NonindentSpace ("*" @Sp "*" @Sp "*" (@Sp "*")* | "-" @Sp "-" @Sp "-" (@Sp "-")* | "_" @Sp "_" @Sp "_" (@Sp "_")*) @Sp @Newline @BlankLine+ { RDoc::Markup::Rule.new 1 } - # - # source://rdoc//lib/rdoc/markdown.rb#1942 - def _HorizontalRule; end - - # HtmlAnchor = HtmlOpenAnchor (HtmlAnchor | !HtmlCloseAnchor .)* HtmlCloseAnchor - # - # source://rdoc//lib/rdoc/markdown.rb#2981 - def _HtmlAnchor; end - - # HtmlAttribute = (AlphanumericAscii | "-")+ Spnl ("=" Spnl (Quoted | (!">" Nonspacechar)+))? Spnl - # - # source://rdoc//lib/rdoc/markdown.rb#14283 - def _HtmlAttribute; end - - # HtmlBlock = < (HtmlBlockInTags | HtmlComment | HtmlBlockSelfClosing | HtmlUnclosed) > @BlankLine+ { if html? then RDoc::Markup::Raw.new text end } - # - # source://rdoc//lib/rdoc/markdown.rb#8778 - def _HtmlBlock; end - - # HtmlBlockAddress = HtmlBlockOpenAddress (HtmlBlockAddress | !HtmlBlockCloseAddress .)* HtmlBlockCloseAddress - # - # source://rdoc//lib/rdoc/markdown.rb#3147 - def _HtmlBlockAddress; end - - # HtmlBlockBlockquote = HtmlBlockOpenBlockquote (HtmlBlockBlockquote | !HtmlBlockCloseBlockquote .)* HtmlBlockCloseBlockquote - # - # source://rdoc//lib/rdoc/markdown.rb#3313 - def _HtmlBlockBlockquote; end - - # HtmlBlockCenter = HtmlBlockOpenCenter (HtmlBlockCenter | !HtmlBlockCloseCenter .)* HtmlBlockCloseCenter - # - # source://rdoc//lib/rdoc/markdown.rb#3479 - def _HtmlBlockCenter; end - - # HtmlBlockCloseAddress = "<" Spnl "/" ("address" | "ADDRESS") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#3095 - def _HtmlBlockCloseAddress; end - - # HtmlBlockCloseBlockquote = "<" Spnl "/" ("blockquote" | "BLOCKQUOTE") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#3261 - def _HtmlBlockCloseBlockquote; end - - # HtmlBlockCloseCenter = "<" Spnl "/" ("center" | "CENTER") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#3427 - def _HtmlBlockCloseCenter; end - - # HtmlBlockCloseDd = "<" Spnl "/" ("dd" | "DD") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#6747 - def _HtmlBlockCloseDd; end - - # HtmlBlockCloseDir = "<" Spnl "/" ("dir" | "DIR") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#3593 - def _HtmlBlockCloseDir; end - - # HtmlBlockCloseDiv = "<" Spnl "/" ("div" | "DIV") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#3759 - def _HtmlBlockCloseDiv; end - - # HtmlBlockCloseDl = "<" Spnl "/" ("dl" | "DL") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#3925 - def _HtmlBlockCloseDl; end - - # HtmlBlockCloseDt = "<" Spnl "/" ("dt" | "DT") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#6913 - def _HtmlBlockCloseDt; end - - # HtmlBlockCloseFieldset = "<" Spnl "/" ("fieldset" | "FIELDSET") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#4091 - def _HtmlBlockCloseFieldset; end - - # HtmlBlockCloseForm = "<" Spnl "/" ("form" | "FORM") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#4257 - def _HtmlBlockCloseForm; end - - # HtmlBlockCloseFrameset = "<" Spnl "/" ("frameset" | "FRAMESET") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#7079 - def _HtmlBlockCloseFrameset; end - - # HtmlBlockCloseH1 = "<" Spnl "/" ("h1" | "H1") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#4423 - def _HtmlBlockCloseH1; end - - # HtmlBlockCloseH2 = "<" Spnl "/" ("h2" | "H2") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#4589 - def _HtmlBlockCloseH2; end - - # HtmlBlockCloseH3 = "<" Spnl "/" ("h3" | "H3") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#4755 - def _HtmlBlockCloseH3; end - - # HtmlBlockCloseH4 = "<" Spnl "/" ("h4" | "H4") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#4921 - def _HtmlBlockCloseH4; end - - # HtmlBlockCloseH5 = "<" Spnl "/" ("h5" | "H5") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#5087 - def _HtmlBlockCloseH5; end - - # HtmlBlockCloseH6 = "<" Spnl "/" ("h6" | "H6") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#5253 - def _HtmlBlockCloseH6; end - - # HtmlBlockCloseHead = "<" Spnl "/" ("head" | "HEAD") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#8562 - def _HtmlBlockCloseHead; end - - # HtmlBlockCloseLi = "<" Spnl "/" ("li" | "LI") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#7245 - def _HtmlBlockCloseLi; end - - # HtmlBlockCloseMenu = "<" Spnl "/" ("menu" | "MENU") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#5419 - def _HtmlBlockCloseMenu; end - - # HtmlBlockCloseNoframes = "<" Spnl "/" ("noframes" | "NOFRAMES") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#5585 - def _HtmlBlockCloseNoframes; end - - # HtmlBlockCloseNoscript = "<" Spnl "/" ("noscript" | "NOSCRIPT") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#5751 - def _HtmlBlockCloseNoscript; end - - # HtmlBlockCloseOl = "<" Spnl "/" ("ol" | "OL") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#5917 - def _HtmlBlockCloseOl; end - - # HtmlBlockCloseP = "<" Spnl "/" ("p" | "P") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#6083 - def _HtmlBlockCloseP; end - - # HtmlBlockClosePre = "<" Spnl "/" ("pre" | "PRE") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#6249 - def _HtmlBlockClosePre; end - - # HtmlBlockCloseScript = "<" Spnl "/" ("script" | "SCRIPT") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#8407 - def _HtmlBlockCloseScript; end - - # HtmlBlockCloseTable = "<" Spnl "/" ("table" | "TABLE") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#6415 - def _HtmlBlockCloseTable; end - - # HtmlBlockCloseTbody = "<" Spnl "/" ("tbody" | "TBODY") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#7411 - def _HtmlBlockCloseTbody; end - - # HtmlBlockCloseTd = "<" Spnl "/" ("td" | "TD") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#7577 - def _HtmlBlockCloseTd; end - - # HtmlBlockCloseTfoot = "<" Spnl "/" ("tfoot" | "TFOOT") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#7743 - def _HtmlBlockCloseTfoot; end - - # HtmlBlockCloseTh = "<" Spnl "/" ("th" | "TH") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#7909 - def _HtmlBlockCloseTh; end - - # HtmlBlockCloseThead = "<" Spnl "/" ("thead" | "THEAD") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#8075 - def _HtmlBlockCloseThead; end - - # HtmlBlockCloseTr = "<" Spnl "/" ("tr" | "TR") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#8241 - def _HtmlBlockCloseTr; end - - # HtmlBlockCloseUl = "<" Spnl "/" ("ul" | "UL") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#6581 - def _HtmlBlockCloseUl; end - - # HtmlBlockDd = HtmlBlockOpenDd (HtmlBlockDd | !HtmlBlockCloseDd .)* HtmlBlockCloseDd - # - # source://rdoc//lib/rdoc/markdown.rb#6799 - def _HtmlBlockDd; end - - # HtmlBlockDir = HtmlBlockOpenDir (HtmlBlockDir | !HtmlBlockCloseDir .)* HtmlBlockCloseDir - # - # source://rdoc//lib/rdoc/markdown.rb#3645 - def _HtmlBlockDir; end - - # HtmlBlockDiv = HtmlBlockOpenDiv (HtmlBlockDiv | !HtmlBlockCloseDiv .)* HtmlBlockCloseDiv - # - # source://rdoc//lib/rdoc/markdown.rb#3811 - def _HtmlBlockDiv; end - - # HtmlBlockDl = HtmlBlockOpenDl (HtmlBlockDl | !HtmlBlockCloseDl .)* HtmlBlockCloseDl - # - # source://rdoc//lib/rdoc/markdown.rb#3977 - def _HtmlBlockDl; end - - # HtmlBlockDt = HtmlBlockOpenDt (HtmlBlockDt | !HtmlBlockCloseDt .)* HtmlBlockCloseDt - # - # source://rdoc//lib/rdoc/markdown.rb#6965 - def _HtmlBlockDt; end - - # HtmlBlockFieldset = HtmlBlockOpenFieldset (HtmlBlockFieldset | !HtmlBlockCloseFieldset .)* HtmlBlockCloseFieldset - # - # source://rdoc//lib/rdoc/markdown.rb#4143 - def _HtmlBlockFieldset; end - - # HtmlBlockForm = HtmlBlockOpenForm (HtmlBlockForm | !HtmlBlockCloseForm .)* HtmlBlockCloseForm - # - # source://rdoc//lib/rdoc/markdown.rb#4309 - def _HtmlBlockForm; end - - # HtmlBlockFrameset = HtmlBlockOpenFrameset (HtmlBlockFrameset | !HtmlBlockCloseFrameset .)* HtmlBlockCloseFrameset - # - # source://rdoc//lib/rdoc/markdown.rb#7131 - def _HtmlBlockFrameset; end - - # HtmlBlockH1 = HtmlBlockOpenH1 (HtmlBlockH1 | !HtmlBlockCloseH1 .)* HtmlBlockCloseH1 - # - # source://rdoc//lib/rdoc/markdown.rb#4475 - def _HtmlBlockH1; end - - # HtmlBlockH2 = HtmlBlockOpenH2 (HtmlBlockH2 | !HtmlBlockCloseH2 .)* HtmlBlockCloseH2 - # - # source://rdoc//lib/rdoc/markdown.rb#4641 - def _HtmlBlockH2; end - - # HtmlBlockH3 = HtmlBlockOpenH3 (HtmlBlockH3 | !HtmlBlockCloseH3 .)* HtmlBlockCloseH3 - # - # source://rdoc//lib/rdoc/markdown.rb#4807 - def _HtmlBlockH3; end - - # HtmlBlockH4 = HtmlBlockOpenH4 (HtmlBlockH4 | !HtmlBlockCloseH4 .)* HtmlBlockCloseH4 - # - # source://rdoc//lib/rdoc/markdown.rb#4973 - def _HtmlBlockH4; end - - # HtmlBlockH5 = HtmlBlockOpenH5 (HtmlBlockH5 | !HtmlBlockCloseH5 .)* HtmlBlockCloseH5 - # - # source://rdoc//lib/rdoc/markdown.rb#5139 - def _HtmlBlockH5; end - - # HtmlBlockH6 = HtmlBlockOpenH6 (HtmlBlockH6 | !HtmlBlockCloseH6 .)* HtmlBlockCloseH6 - # - # source://rdoc//lib/rdoc/markdown.rb#5305 - def _HtmlBlockH6; end - - # HtmlBlockHead = HtmlBlockOpenHead (!HtmlBlockCloseHead .)* HtmlBlockCloseHead - # - # source://rdoc//lib/rdoc/markdown.rb#8614 - def _HtmlBlockHead; end - - # HtmlBlockInTags = (HtmlAnchor | HtmlBlockAddress | HtmlBlockBlockquote | HtmlBlockCenter | HtmlBlockDir | HtmlBlockDiv | HtmlBlockDl | HtmlBlockFieldset | HtmlBlockForm | HtmlBlockH1 | HtmlBlockH2 | HtmlBlockH3 | HtmlBlockH4 | HtmlBlockH5 | HtmlBlockH6 | HtmlBlockMenu | HtmlBlockNoframes | HtmlBlockNoscript | HtmlBlockOl | HtmlBlockP | HtmlBlockPre | HtmlBlockTable | HtmlBlockUl | HtmlBlockDd | HtmlBlockDt | HtmlBlockFrameset | HtmlBlockLi | HtmlBlockTbody | HtmlBlockTd | HtmlBlockTfoot | HtmlBlockTh | HtmlBlockThead | HtmlBlockTr | HtmlBlockScript | HtmlBlockHead) - # - # source://rdoc//lib/rdoc/markdown.rb#8661 - def _HtmlBlockInTags; end - - # HtmlBlockLi = HtmlBlockOpenLi (HtmlBlockLi | !HtmlBlockCloseLi .)* HtmlBlockCloseLi - # - # source://rdoc//lib/rdoc/markdown.rb#7297 - def _HtmlBlockLi; end - - # HtmlBlockMenu = HtmlBlockOpenMenu (HtmlBlockMenu | !HtmlBlockCloseMenu .)* HtmlBlockCloseMenu - # - # source://rdoc//lib/rdoc/markdown.rb#5471 - def _HtmlBlockMenu; end - - # HtmlBlockNoframes = HtmlBlockOpenNoframes (HtmlBlockNoframes | !HtmlBlockCloseNoframes .)* HtmlBlockCloseNoframes - # - # source://rdoc//lib/rdoc/markdown.rb#5637 - def _HtmlBlockNoframes; end - - # HtmlBlockNoscript = HtmlBlockOpenNoscript (HtmlBlockNoscript | !HtmlBlockCloseNoscript .)* HtmlBlockCloseNoscript - # - # source://rdoc//lib/rdoc/markdown.rb#5803 - def _HtmlBlockNoscript; end - - # HtmlBlockOl = HtmlBlockOpenOl (HtmlBlockOl | !HtmlBlockCloseOl .)* HtmlBlockCloseOl - # - # source://rdoc//lib/rdoc/markdown.rb#5969 - def _HtmlBlockOl; end - - # HtmlBlockOpenAddress = "<" Spnl ("address" | "ADDRESS") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#3039 - def _HtmlBlockOpenAddress; end - - # HtmlBlockOpenBlockquote = "<" Spnl ("blockquote" | "BLOCKQUOTE") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#3205 - def _HtmlBlockOpenBlockquote; end - - # HtmlBlockOpenCenter = "<" Spnl ("center" | "CENTER") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#3371 - def _HtmlBlockOpenCenter; end - - # HtmlBlockOpenDd = "<" Spnl ("dd" | "DD") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#6691 - def _HtmlBlockOpenDd; end - - # HtmlBlockOpenDir = "<" Spnl ("dir" | "DIR") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#3537 - def _HtmlBlockOpenDir; end - - # HtmlBlockOpenDiv = "<" Spnl ("div" | "DIV") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#3703 - def _HtmlBlockOpenDiv; end - - # HtmlBlockOpenDl = "<" Spnl ("dl" | "DL") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#3869 - def _HtmlBlockOpenDl; end - - # HtmlBlockOpenDt = "<" Spnl ("dt" | "DT") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#6857 - def _HtmlBlockOpenDt; end - - # HtmlBlockOpenFieldset = "<" Spnl ("fieldset" | "FIELDSET") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#4035 - def _HtmlBlockOpenFieldset; end - - # HtmlBlockOpenForm = "<" Spnl ("form" | "FORM") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#4201 - def _HtmlBlockOpenForm; end - - # HtmlBlockOpenFrameset = "<" Spnl ("frameset" | "FRAMESET") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#7023 - def _HtmlBlockOpenFrameset; end - - # HtmlBlockOpenH1 = "<" Spnl ("h1" | "H1") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#4367 - def _HtmlBlockOpenH1; end - - # HtmlBlockOpenH2 = "<" Spnl ("h2" | "H2") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#4533 - def _HtmlBlockOpenH2; end - - # HtmlBlockOpenH3 = "<" Spnl ("h3" | "H3") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#4699 - def _HtmlBlockOpenH3; end - - # HtmlBlockOpenH4 = "<" Spnl ("h4" | "H4") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#4865 - def _HtmlBlockOpenH4; end - - # HtmlBlockOpenH5 = "<" Spnl ("h5" | "H5") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#5031 - def _HtmlBlockOpenH5; end - - # HtmlBlockOpenH6 = "<" Spnl ("h6" | "H6") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#5197 - def _HtmlBlockOpenH6; end - - # HtmlBlockOpenHead = "<" Spnl ("head" | "HEAD") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#8506 - def _HtmlBlockOpenHead; end - - # HtmlBlockOpenLi = "<" Spnl ("li" | "LI") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#7189 - def _HtmlBlockOpenLi; end - - # HtmlBlockOpenMenu = "<" Spnl ("menu" | "MENU") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#5363 - def _HtmlBlockOpenMenu; end - - # HtmlBlockOpenNoframes = "<" Spnl ("noframes" | "NOFRAMES") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#5529 - def _HtmlBlockOpenNoframes; end - - # HtmlBlockOpenNoscript = "<" Spnl ("noscript" | "NOSCRIPT") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#5695 - def _HtmlBlockOpenNoscript; end - - # HtmlBlockOpenOl = "<" Spnl ("ol" | "OL") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#5861 - def _HtmlBlockOpenOl; end - - # HtmlBlockOpenP = "<" Spnl ("p" | "P") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#6027 - def _HtmlBlockOpenP; end - - # HtmlBlockOpenPre = "<" Spnl ("pre" | "PRE") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#6193 - def _HtmlBlockOpenPre; end - - # HtmlBlockOpenScript = "<" Spnl ("script" | "SCRIPT") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#8351 - def _HtmlBlockOpenScript; end - - # HtmlBlockOpenTable = "<" Spnl ("table" | "TABLE") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#6359 - def _HtmlBlockOpenTable; end - - # HtmlBlockOpenTbody = "<" Spnl ("tbody" | "TBODY") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#7355 - def _HtmlBlockOpenTbody; end - - # HtmlBlockOpenTd = "<" Spnl ("td" | "TD") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#7521 - def _HtmlBlockOpenTd; end - - # HtmlBlockOpenTfoot = "<" Spnl ("tfoot" | "TFOOT") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#7687 - def _HtmlBlockOpenTfoot; end - - # HtmlBlockOpenTh = "<" Spnl ("th" | "TH") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#7853 - def _HtmlBlockOpenTh; end - - # HtmlBlockOpenThead = "<" Spnl ("thead" | "THEAD") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#8019 - def _HtmlBlockOpenThead; end - - # HtmlBlockOpenTr = "<" Spnl ("tr" | "TR") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#8185 - def _HtmlBlockOpenTr; end - - # HtmlBlockOpenUl = "<" Spnl ("ul" | "UL") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#6525 - def _HtmlBlockOpenUl; end - - # HtmlBlockP = HtmlBlockOpenP (HtmlBlockP | !HtmlBlockCloseP .)* HtmlBlockCloseP - # - # source://rdoc//lib/rdoc/markdown.rb#6135 - def _HtmlBlockP; end - - # HtmlBlockPre = HtmlBlockOpenPre (HtmlBlockPre | !HtmlBlockClosePre .)* HtmlBlockClosePre - # - # source://rdoc//lib/rdoc/markdown.rb#6301 - def _HtmlBlockPre; end - - # HtmlBlockScript = HtmlBlockOpenScript (!HtmlBlockCloseScript .)* HtmlBlockCloseScript - # - # source://rdoc//lib/rdoc/markdown.rb#8459 - def _HtmlBlockScript; end - - # HtmlBlockSelfClosing = "<" Spnl HtmlBlockType Spnl HtmlAttribute* "/" Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#8906 - def _HtmlBlockSelfClosing; end - - # HtmlBlockTable = HtmlBlockOpenTable (HtmlBlockTable | !HtmlBlockCloseTable .)* HtmlBlockCloseTable - # - # source://rdoc//lib/rdoc/markdown.rb#6467 - def _HtmlBlockTable; end - - # HtmlBlockTbody = HtmlBlockOpenTbody (HtmlBlockTbody | !HtmlBlockCloseTbody .)* HtmlBlockCloseTbody - # - # source://rdoc//lib/rdoc/markdown.rb#7463 - def _HtmlBlockTbody; end - - # HtmlBlockTd = HtmlBlockOpenTd (HtmlBlockTd | !HtmlBlockCloseTd .)* HtmlBlockCloseTd - # - # source://rdoc//lib/rdoc/markdown.rb#7629 - def _HtmlBlockTd; end - - # HtmlBlockTfoot = HtmlBlockOpenTfoot (HtmlBlockTfoot | !HtmlBlockCloseTfoot .)* HtmlBlockCloseTfoot - # - # source://rdoc//lib/rdoc/markdown.rb#7795 - def _HtmlBlockTfoot; end - - # HtmlBlockTh = HtmlBlockOpenTh (HtmlBlockTh | !HtmlBlockCloseTh .)* HtmlBlockCloseTh - # - # source://rdoc//lib/rdoc/markdown.rb#7961 - def _HtmlBlockTh; end - - # HtmlBlockThead = HtmlBlockOpenThead (HtmlBlockThead | !HtmlBlockCloseThead .)* HtmlBlockCloseThead - # - # source://rdoc//lib/rdoc/markdown.rb#8127 - def _HtmlBlockThead; end - - # HtmlBlockTr = HtmlBlockOpenTr (HtmlBlockTr | !HtmlBlockCloseTr .)* HtmlBlockCloseTr - # - # source://rdoc//lib/rdoc/markdown.rb#8293 - def _HtmlBlockTr; end - - # HtmlBlockType = ("ADDRESS" | "BLOCKQUOTE" | "CENTER" | "DD" | "DIR" | "DIV" | "DL" | "DT" | "FIELDSET" | "FORM" | "FRAMESET" | "H1" | "H2" | "H3" | "H4" | "H5" | "H6" | "HR" | "ISINDEX" | "LI" | "MENU" | "NOFRAMES" | "NOSCRIPT" | "OL" | "P" | "PRE" | "SCRIPT" | "TABLE" | "TBODY" | "TD" | "TFOOT" | "TH" | "THEAD" | "TR" | "UL" | "address" | "blockquote" | "center" | "dd" | "dir" | "div" | "dl" | "dt" | "fieldset" | "form" | "frameset" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "hr" | "isindex" | "li" | "menu" | "noframes" | "noscript" | "ol" | "p" | "pre" | "script" | "table" | "tbody" | "td" | "tfoot" | "th" | "thead" | "tr" | "ul") - # - # source://rdoc//lib/rdoc/markdown.rb#8961 - def _HtmlBlockType; end - - # HtmlBlockUl = HtmlBlockOpenUl (HtmlBlockUl | !HtmlBlockCloseUl .)* HtmlBlockCloseUl - # - # source://rdoc//lib/rdoc/markdown.rb#6633 - def _HtmlBlockUl; end - - # HtmlCloseAnchor = "<" Spnl "/" ("a" | "A") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#2929 - def _HtmlCloseAnchor; end - - # HtmlComment = "" .)* "-->" - # - # source://rdoc//lib/rdoc/markdown.rb#14425 - def _HtmlComment; end - - # HtmlOpenAnchor = "<" Spnl ("a" | "A") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#2873 - def _HtmlOpenAnchor; end - - # HtmlTag = "<" Spnl "/"? AlphanumericAscii+ Spnl HtmlAttribute* "/"? Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#14472 - def _HtmlTag; end - - # HtmlUnclosed = "<" Spnl HtmlUnclosedType Spnl HtmlAttribute* Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#8838 - def _HtmlUnclosed; end - - # HtmlUnclosedType = ("HR" | "hr") - # - # source://rdoc//lib/rdoc/markdown.rb#8888 - def _HtmlUnclosedType; end - - # Image = "!" (ExplicitLink | ReferenceLink):a { "rdoc-image:#{a[/\[(.*)\]/, 1]}" } - # - # source://rdoc//lib/rdoc/markdown.rb#10982 - def _Image; end - - # InStyleTags = StyleOpen (!StyleClose .)* StyleClose - # - # source://rdoc//lib/rdoc/markdown.rb#9291 - def _InStyleTags; end - - # Indent = /\t| / - # - # source://rdoc//lib/rdoc/markdown.rb#14870 - def _Indent; end - - # IndentedLine = Indent Line - # - # source://rdoc//lib/rdoc/markdown.rb#14877 - def _IndentedLine; end - - # Inline = (Str | @Endline | UlOrStarLine | @Space | Strong | Emph | Strike | Image | Link | NoteReference | InlineNote | Code | RawHtml | Entity | EscapedChar | Symbol) - # - # source://rdoc//lib/rdoc/markdown.rb#9596 - def _Inline; end - - # InlineNote = &{ notes? } "^[" @StartList:a (!"]" Inline:l { a << l })+ "]" { ref = [:inline, @note_order.length] @footnotes[ref] = paragraph a note_for ref } - # - # source://rdoc//lib/rdoc/markdown.rb#15441 - def _InlineNote; end - - # Inlines = (!@Endline Inline:i { i } | @Endline:c !(&{ github? } Ticks3 /[^`\n]*$/) &Inline { c })+:chunks @Endline? { chunks } - # - # source://rdoc//lib/rdoc/markdown.rb#9375 - def _Inlines; end - - # Label = "[" (!"^" &{ notes? } | &. &{ !notes? }) @StartList:a (!"]" Inline:l { a << l })* "]" { a.join.gsub(/\s+/, ' ') } - # - # source://rdoc//lib/rdoc/markdown.rb#11917 - def _Label; end - - # Line = @RawLine:a { a } - # - # source://rdoc//lib/rdoc/markdown.rb#14948 - def _Line; end - - # LineBreak = " " @NormalEndline { RDoc::Markup::HardBreak.new } - # - # source://rdoc//lib/rdoc/markdown.rb#10052 - def _LineBreak; end - - # Link = (ExplicitLink | ReferenceLink | AutoLink) - # - # source://rdoc//lib/rdoc/markdown.rb#11021 - def _Link; end - - # ListBlock = !@BlankLine Line:a ListBlockLine*:c { [a, *c] } - # - # source://rdoc//lib/rdoc/markdown.rb#2558 - def _ListBlock; end - - # ListBlockLine = !@BlankLine !(Indent? (Bullet | Enumerator)) !HorizontalRule OptionallyIndentedLine - # - # source://rdoc//lib/rdoc/markdown.rb#2803 - def _ListBlockLine; end - - # ListContinuationBlock = @StartList:a @BlankLine* { a << "\n" } (Indent ListBlock:b { a.concat b })+ { a } - # - # source://rdoc//lib/rdoc/markdown.rb#2602 - def _ListContinuationBlock; end - - # ListItem = (Bullet | Enumerator) @StartList:a ListBlock:b { a << b } (ListContinuationBlock:c { a.push(*c) })* { list_item_from a } - # - # source://rdoc//lib/rdoc/markdown.rb#2402 - def _ListItem; end - - # ListItemTight = (Bullet | Enumerator) ListBlock:a (!@BlankLine ListContinuationBlock:b { a.push(*b) })* !ListContinuationBlock { list_item_from a } - # - # source://rdoc//lib/rdoc/markdown.rb#2478 - def _ListItemTight; end - - # ListLoose = @StartList:a (ListItem:b @BlankLine* { a << b })+ { a } - # - # source://rdoc//lib/rdoc/markdown.rb#2314 - def _ListLoose; end - - # ListTight = ListItemTight+:a @BlankLine* !(Bullet | Enumerator) { a } - # - # source://rdoc//lib/rdoc/markdown.rb#2249 - def _ListTight; end - - # Newline = %literals.Newline - # - # source://rdoc//lib/rdoc/markdown.rb#14736 - def _Newline; end - - # NonblankIndentedLine = !@BlankLine IndentedLine - # - # source://rdoc//lib/rdoc/markdown.rb#1831 - def _NonblankIndentedLine; end - - # NonindentSpace = / {0,3}/ - # - # source://rdoc//lib/rdoc/markdown.rb#14863 - def _NonindentSpace; end - - # Nonspacechar = !@Spacechar !@Newline . - # - # source://rdoc//lib/rdoc/markdown.rb#14562 - def _Nonspacechar; end - - # NormalChar = !(@SpecialChar | @Spacechar | @Newline) . - # - # source://rdoc//lib/rdoc/markdown.rb#14663 - def _NormalChar; end - - # NormalEndline = @Sp @Newline !@BlankLine !">" !AtxStart !(Line /={1,}|-{1,}/ @Newline) { "\n" } - # - # source://rdoc//lib/rdoc/markdown.rb#9948 - def _NormalEndline; end - - # Note = &{ notes? } @NonindentSpace RawNoteReference:ref ":" @Sp @StartList:a RawNoteBlock:i { a.concat i } (&Indent RawNoteBlock:i { a.concat i })* { @footnotes[ref] = paragraph a nil } - # - # source://rdoc//lib/rdoc/markdown.rb#15343 - def _Note; end - - # NoteReference = &{ notes? } RawNoteReference:ref { note_for ref } - # - # source://rdoc//lib/rdoc/markdown.rb#15217 - def _NoteReference; end - - # Notes = (Note | SkipBlock)* - # - # source://rdoc//lib/rdoc/markdown.rb#15548 - def _Notes; end - - # OptionallyIndentedLine = Indent? Line - # - # source://rdoc//lib/rdoc/markdown.rb#14898 - def _OptionallyIndentedLine; end - - # OrderedList = &Enumerator (ListTight | ListLoose):a { RDoc::Markup::List.new(:NUMBER, *a) } - # - # source://rdoc//lib/rdoc/markdown.rb#2762 - def _OrderedList; end - - # Para = @NonindentSpace Inlines:a @BlankLine+ { paragraph a } - # - # source://rdoc//lib/rdoc/markdown.rb#1014 - def _Para; end - - # Plain = Inlines:a { paragraph a } - # - # source://rdoc//lib/rdoc/markdown.rb#1057 - def _Plain; end - - # Quoted = ("\"" (!"\"" .)* "\"" | "'" (!"'" .)* "'") - # - # source://rdoc//lib/rdoc/markdown.rb#14185 - def _Quoted; end - - # RawHtml = < (HtmlComment | HtmlBlockScript | HtmlTag) > { if html? then text else '' end } - # - # source://rdoc//lib/rdoc/markdown.rb#14118 - def _RawHtml; end - - # RawLine = (< /[^\r\n]*/ @Newline > | < .+ > @Eof) { text } - # - # source://rdoc//lib/rdoc/markdown.rb#14971 - def _RawLine; end - - # RawNoteBlock = @StartList:a (!@BlankLine !RawNoteReference OptionallyIndentedLine:l { a << l })+ < @BlankLine* > { a << text } { a } - # - # source://rdoc//lib/rdoc/markdown.rb#15570 - def _RawNoteBlock; end - - # RawNoteReference = "[^" < (!@Newline !"]" .)+ > "]" { text } - # - # source://rdoc//lib/rdoc/markdown.rb#15247 - def _RawNoteReference; end - - # RefSrc = < Nonspacechar+ > { text } - # - # source://rdoc//lib/rdoc/markdown.rb#12036 - def _RefSrc; end - - # RefTitle = (RefTitleSingle | RefTitleDouble | RefTitleParens | EmptyTitle) - # - # source://rdoc//lib/rdoc/markdown.rb#12072 - def _RefTitle; end - - # RefTitleDouble = Spnl "\"" < (!("\"" @Sp @Newline | @Newline) .)* > "\"" { text } - # - # source://rdoc//lib/rdoc/markdown.rb#12195 - def _RefTitleDouble; end - - # RefTitleParens = Spnl "(" < (!(")" @Sp @Newline | @Newline) .)* > ")" { text } - # - # source://rdoc//lib/rdoc/markdown.rb#12287 - def _RefTitleParens; end - - # RefTitleSingle = Spnl "'" < (!("'" @Sp @Newline | @Newline) .)* > "'" { text } - # - # source://rdoc//lib/rdoc/markdown.rb#12103 - def _RefTitleSingle; end - - # Reference = @NonindentSpace !"[]" Label:label ":" Spnl RefSrc:link RefTitle @BlankLine+ { # TODO use title reference label, link nil } - # - # source://rdoc//lib/rdoc/markdown.rb#11842 - def _Reference; end - - # ReferenceLink = (ReferenceLinkDouble | ReferenceLinkSingle) - # - # source://rdoc//lib/rdoc/markdown.rb#11042 - def _ReferenceLink; end - - # ReferenceLinkDouble = Label:content < Spnl > !"[]" Label:label { link_to content, label, text } - # - # source://rdoc//lib/rdoc/markdown.rb#11060 - def _ReferenceLinkDouble; end - - # ReferenceLinkSingle = Label:content < (Spnl "[]")? > { link_to content, content, text } - # - # source://rdoc//lib/rdoc/markdown.rb#11106 - def _ReferenceLinkSingle; end - - # References = (Reference | SkipBlock)* - # - # source://rdoc//lib/rdoc/markdown.rb#12379 - def _References; end - - # SetextBottom1 = /={1,}/ @Newline - # - # source://rdoc//lib/rdoc/markdown.rb#1272 - def _SetextBottom1; end - - # SetextBottom2 = /-{1,}/ @Newline - # - # source://rdoc//lib/rdoc/markdown.rb#1293 - def _SetextBottom2; end - - # SetextHeading = (SetextHeading1 | SetextHeading2) - # - # source://rdoc//lib/rdoc/markdown.rb#1254 - def _SetextHeading; end - - # SetextHeading1 = &(@RawLine SetextBottom1) @StartList:a (!@Endline Inline:b { a << b })+ @Sp @Newline SetextBottom1 { RDoc::Markup::Heading.new(1, a.join) } - # - # source://rdoc//lib/rdoc/markdown.rb#1314 - def _SetextHeading1; end - - # SetextHeading2 = &(@RawLine SetextBottom2) @StartList:a (!@Endline Inline:b { a << b })+ @Sp @Newline SetextBottom2 { RDoc::Markup::Heading.new(2, a.join) } - # - # source://rdoc//lib/rdoc/markdown.rb#1436 - def _SetextHeading2; end - - # SkipBlock = (HtmlBlock | (!"#" !SetextBottom1 !SetextBottom2 !@BlankLine @RawLine)+ @BlankLine* | @BlankLine+ | @RawLine) - # - # source://rdoc//lib/rdoc/markdown.rb#15050 - def _SkipBlock; end - - # Source = ("<" < SourceContents > ">" | < SourceContents >) { text } - # - # source://rdoc//lib/rdoc/markdown.rb#11216 - def _Source; end - - # SourceContents = ((!"(" !")" !">" Nonspacechar)+ | "(" SourceContents ")")* - # - # source://rdoc//lib/rdoc/markdown.rb#11276 - def _SourceContents; end - - # Sp = @Spacechar* - # - # source://rdoc//lib/rdoc/markdown.rb#14594 - def _Sp; end - - # Space = @Spacechar+ { " " } - # - # source://rdoc//lib/rdoc/markdown.rb#9656 - def _Space; end - - # Spacechar = %literals.Spacechar - # - # source://rdoc//lib/rdoc/markdown.rb#14743 - def _Spacechar; end - - # SpecialChar = (/[~*_`&\[\]() { text } | < @Spacechar /\*+/ &@Spacechar > { text }) - # - # source://rdoc//lib/rdoc/markdown.rb#10139 - def _StarLine; end - - # StartList = &. { [] } - # - # source://rdoc//lib/rdoc/markdown.rb#14924 - def _StartList; end - - # Str = @StartList:a < @NormalChar+ > { a = text } (StrChunk:c { a << c })* { a } - # - # source://rdoc//lib/rdoc/markdown.rb#9688 - def _Str; end - - # StrChunk = < (@NormalChar | /_+/ &Alphanumeric)+ > { text } - # - # source://rdoc//lib/rdoc/markdown.rb#9761 - def _StrChunk; end - - # Strike = &{ strike? } "~~" !@Whitespace @StartList:a (!"~~" Inline:b { a << b })+ "~~" { strike a.join } - # - # source://rdoc//lib/rdoc/markdown.rb#10871 - def _Strike; end - - # Strong = (StrongStar | StrongUl) - # - # source://rdoc//lib/rdoc/markdown.rb#10645 - def _Strong; end - - # StrongStar = "**" !@Whitespace @StartList:a (!"**" Inline:b { a << b })+ "**" { strong a.join } - # - # source://rdoc//lib/rdoc/markdown.rb#10663 - def _StrongStar; end - - # StrongUl = "__" !@Whitespace @StartList:a (!"__" Inline:b { a << b })+ "__" { strong a.join } - # - # source://rdoc//lib/rdoc/markdown.rb#10767 - def _StrongUl; end - - # StyleBlock = < InStyleTags > @BlankLine* { if css? then RDoc::Markup::Raw.new text end } - # - # source://rdoc//lib/rdoc/markdown.rb#9338 - def _StyleBlock; end - - # StyleClose = "<" Spnl "/" ("style" | "STYLE") Spnl ">" - # - # source://rdoc//lib/rdoc/markdown.rb#9239 - def _StyleClose; end - - # StyleOpen = "<" Spnl ("style" | "STYLE") Spnl HtmlAttribute* ">" - # - # source://rdoc//lib/rdoc/markdown.rb#9183 - def _StyleOpen; end - - # Symbol = < @SpecialChar > { text } - # - # source://rdoc//lib/rdoc/markdown.rb#10079 - def _Symbol; end - - # Table = &{ github? } TableHead:header TableLine:line TableRow+:body { table = RDoc::Markup::Table.new(header, line, body) } - # - # source://rdoc//lib/rdoc/markdown.rb#15947 - def _Table; end - - # TableAlign = < /:?-+:?/ > @Sp { text.start_with?(":") ? (text.end_with?(":") ? :center : :left) : (text.end_with?(":") ? :right : nil) } - # - # source://rdoc//lib/rdoc/markdown.rb#16314 - def _TableAlign; end - - # TableAlign2 = "|" @Sp TableAlign - # - # source://rdoc//lib/rdoc/markdown.rb#16288 - def _TableAlign2; end - - # TableHead = TableItem2+:items "|"? @Newline { items } - # - # source://rdoc//lib/rdoc/markdown.rb#16003 - def _TableHead; end - - # TableItem = < /(?:\\.|[^|\n])+/ > { text.strip.gsub(/\\(.)/, '\1') } - # - # source://rdoc//lib/rdoc/markdown.rb#16169 - def _TableItem; end - - # TableItem2 = "|" TableItem - # - # source://rdoc//lib/rdoc/markdown.rb#16148 - def _TableItem2; end - - # TableLine = ((TableAlign:align1 TableAlign2*:aligns {[align1, *aligns] }):line | TableAlign2+:line) "|"? @Newline { line } - # - # source://rdoc//lib/rdoc/markdown.rb#16195 - def _TableLine; end - - # TableRow = ((TableItem:item1 TableItem2*:items { [item1, *items] }):row | TableItem2+:row) "|"? @Newline { row } - # - # source://rdoc//lib/rdoc/markdown.rb#16055 - def _TableRow; end - - # TerminalEndline = @Sp @Newline @Eof - # - # source://rdoc//lib/rdoc/markdown.rb#10026 - def _TerminalEndline; end - - # Ticks1 = "`" !"`" - # - # source://rdoc//lib/rdoc/markdown.rb#12401 - def _Ticks1; end - - # Ticks2 = "``" !"`" - # - # source://rdoc//lib/rdoc/markdown.rb#12425 - def _Ticks2; end - - # Ticks3 = "```" !"`" - # - # source://rdoc//lib/rdoc/markdown.rb#12449 - def _Ticks3; end - - # Ticks4 = "````" !"`" - # - # source://rdoc//lib/rdoc/markdown.rb#12473 - def _Ticks4; end - - # Ticks5 = "`````" !"`" - # - # source://rdoc//lib/rdoc/markdown.rb#12497 - def _Ticks5; end - - # Title = (TitleSingle | TitleDouble | ""):a { a } - # - # source://rdoc//lib/rdoc/markdown.rb#11393 - def _Title; end - - # TitleDouble = "\"" (!("\"" @Sp (")" | @Newline)) .)* "\"" - # - # source://rdoc//lib/rdoc/markdown.rb#11507 - def _TitleDouble; end - - # TitleSingle = "'" (!("'" @Sp (")" | @Newline)) .)* "'" - # - # source://rdoc//lib/rdoc/markdown.rb#11430 - def _TitleSingle; end - - # UlLine = (< /_{4,}/ > { text } | < @Spacechar /_+/ &@Spacechar > { text }) - # - # source://rdoc//lib/rdoc/markdown.rb#10216 - def _UlLine; end - - # UlOrStarLine = (UlLine | StarLine):a { a } - # - # source://rdoc//lib/rdoc/markdown.rb#10105 - def _UlOrStarLine; end - - # Verbatim = VerbatimChunk+:a { RDoc::Markup::Verbatim.new(*a.flatten) } - # - # source://rdoc//lib/rdoc/markdown.rb#1905 - def _Verbatim; end - - # VerbatimChunk = @BlankLine*:a NonblankIndentedLine+:b { a.concat b } - # - # source://rdoc//lib/rdoc/markdown.rb#1855 - def _VerbatimChunk; end - - # Whitespace = (@Spacechar | @Newline) - # - # source://rdoc//lib/rdoc/markdown.rb#10311 - def _Whitespace; end - - # root = Doc - # - # source://rdoc//lib/rdoc/markdown.rb#892 - def _root; end - - # source://rdoc//lib/rdoc/markdown.rb#502 - def apply(rule); end - - # source://rdoc//lib/rdoc/markdown.rb#468 - def apply_with_args(rule, *args); end - - # source://rdoc//lib/rdoc/markdown.rb#610 - def break_on_newline=(enable); end - - # source://rdoc//lib/rdoc/markdown.rb#606 - def break_on_newline?; end - - # source://rdoc//lib/rdoc/markdown.rb#610 - def css=(enable); end - - # source://rdoc//lib/rdoc/markdown.rb#606 - def css?; end - - # source://rdoc//lib/rdoc/markdown.rb#250 - def current_character(target = T.unsafe(nil)); end - - # source://rdoc//lib/rdoc/markdown.rb#211 - def current_column(target = T.unsafe(nil)); end - - # source://rdoc//lib/rdoc/markdown.rb#234 - def current_line(target = T.unsafe(nil)); end - - # source://rdoc//lib/rdoc/markdown.rb#259 - def current_pos_info(target = T.unsafe(nil)); end - - # source://rdoc//lib/rdoc/markdown.rb#610 - def definition_lists=(enable); end - - # source://rdoc//lib/rdoc/markdown.rb#606 - def definition_lists?; end - - # Wraps `text` in emphasis for rdoc inline formatting - # - # source://rdoc//lib/rdoc/markdown.rb#683 - def emphasis(text); end - - # :category: Extensions - # - # Enables or disables the extension with `name` - # - # source://rdoc//lib/rdoc/markdown.rb#705 - def extension(name, enable); end - - # :category: Extensions - # - # Is the extension `name` enabled? - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/markdown.rb#696 - def extension?(name); end - - # source://rdoc//lib/rdoc/markdown.rb#449 - def external_invoke(other, rule, *args); end - - # Returns the value of attribute failed_rule. - # - # source://rdoc//lib/rdoc/markdown.rb#371 - def failed_rule; end - - # Returns the value of attribute failing_rule_offset. - # - # source://rdoc//lib/rdoc/markdown.rb#208 - def failing_rule_offset; end - - # source://rdoc//lib/rdoc/markdown.rb#318 - def failure_caret; end - - # source://rdoc//lib/rdoc/markdown.rb#323 - def failure_character; end - - # source://rdoc//lib/rdoc/markdown.rb#306 - def failure_info; end - - # source://rdoc//lib/rdoc/markdown.rb#327 - def failure_oneline; end - - # source://rdoc//lib/rdoc/markdown.rb#393 - def get_byte; end - - # source://rdoc//lib/rdoc/markdown.rb#271 - def get_line(no); end - - # source://rdoc//lib/rdoc/markdown.rb#285 - def get_text(start); end - - # source://rdoc//lib/rdoc/markdown.rb#610 - def github=(enable); end - - # source://rdoc//lib/rdoc/markdown.rb#606 - def github?; end - - # source://rdoc//lib/rdoc/markdown.rb#535 - def grow_lr(rule, args, start_pos, m); end - - # source://rdoc//lib/rdoc/markdown.rb#610 - def html=(enable); end - - # source://rdoc//lib/rdoc/markdown.rb#606 - def html?; end - - # Parses `text` in a clone of this parser. This is used for handling nested - # lists the same way as markdown_parser. - # - # source://rdoc//lib/rdoc/markdown.rb#717 - def inner_parse(text); end - - # source://rdoc//lib/rdoc/markdown.rb#267 - def lines; end - - # Finds a link reference for `label` and creates a new link to it with - # `content` as the link text. If `label` was not encountered in the - # reference-gathering parser pass the label and content are reconstructed - # with the linking `text` (usually whitespace). - # - # @raise [ParseError] - # - # source://rdoc//lib/rdoc/markdown.rb#737 - def link_to(content, label = T.unsafe(nil), text = T.unsafe(nil)); end - - # Creates an RDoc::Markup::ListItem by parsing the `unparsed` content from - # the first parsing pass. - # - # source://rdoc//lib/rdoc/markdown.rb#754 - def list_item_from(unparsed); end - - # source://rdoc//lib/rdoc/markdown.rb#373 - def match_string(str); end - - # Stores `label` as a note and fills in previously unknown note references. - # - # source://rdoc//lib/rdoc/markdown.rb#762 - def note(label); end - - # Creates a new link for the footnote `reference` and adds the reference to - # the note order list for proper display at the end of the document. - # - # source://rdoc//lib/rdoc/markdown.rb#776 - def note_for(ref); end - - # source://rdoc//lib/rdoc/markdown.rb#610 - def notes=(enable); end - - # source://rdoc//lib/rdoc/markdown.rb#606 - def notes?; end - - # Creates an RDoc::Markup::Paragraph from `parts` and including - # extension-specific behavior - # - # source://rdoc//lib/rdoc/markdown.rb#793 - def paragraph(parts); end - - # Parses `markdown` into an RDoc::Document - # - # source://rdoc//lib/rdoc/markdown.rb#808 - def parse(markdown); end - - # The internal kpeg parse method - # - # source://rdoc//lib/rdoc/markdown.rb#414 - def peg_parse(rule = T.unsafe(nil)); end - - # Returns the value of attribute pos. - # - # source://rdoc//lib/rdoc/markdown.rb#209 - def pos; end - - # Sets the attribute pos - # - # @param value the value to set the attribute pos to. - # - # source://rdoc//lib/rdoc/markdown.rb#209 - def pos=(_arg0); end - - # source://rdoc//lib/rdoc/markdown.rb#221 - def position_line_offsets; end - - # @raise [ParseError] - # - # source://rdoc//lib/rdoc/markdown.rb#341 - def raise_error; end - - # Stores `label` as a reference to `link` and fills in previously unknown - # link references. - # - # source://rdoc//lib/rdoc/markdown.rb#855 - def reference(label, link); end - - # Returns the value of attribute result. - # - # source://rdoc//lib/rdoc/markdown.rb#209 - def result; end - - # Sets the attribute result - # - # @param value the value to set the attribute result to. - # - # source://rdoc//lib/rdoc/markdown.rb#209 - def result=(_arg0); end - - # source://rdoc//lib/rdoc/markdown.rb#383 - def scan(reg); end - - # source://rdoc//lib/rdoc/markdown.rb#364 - def set_failed_rule(name); end - - # Sets the string and current parsing position for the parser. - # - # source://rdoc//lib/rdoc/markdown.rb#290 - def set_string(string, pos); end - - # :stopdoc: - # - # source://rdoc//lib/rdoc/markdown.rb#887 - def setup_foreign_grammar; end - - # Prepares for parsing +str+. If you define a custom initialize you must - # call this method before #parse - # - # source://rdoc//lib/rdoc/markdown.rb#196 - def setup_parser(str, debug = T.unsafe(nil)); end - - # source://rdoc//lib/rdoc/markdown.rb#345 - def show_error(io = T.unsafe(nil)); end - - # source://rdoc//lib/rdoc/markdown.rb#297 - def show_pos; end - - # Wraps `text` in strike markup for rdoc inline formatting - # - # source://rdoc//lib/rdoc/markdown.rb#877 - def strike(text); end - - # source://rdoc//lib/rdoc/markdown.rb#610 - def strike=(enable); end - - # source://rdoc//lib/rdoc/markdown.rb#606 - def strike?; end - - # Returns the value of attribute string. - # - # source://rdoc//lib/rdoc/markdown.rb#207 - def string; end - - # Wraps `text` in strong markup for rdoc inline formatting - # - # source://rdoc//lib/rdoc/markdown.rb#866 - def strong(text); end - - private - - # This is distinct from setup_parser so that a standalone parser - # can redefine #initialize and still have access to the proper - # parser setup code. - # TODO remove when kpeg 0.10 is released - # - # @return [Markdown] a new instance of Markdown - # - # source://rdoc//lib/rdoc/markdown.rb#188 - def orig_initialize(str, debug = T.unsafe(nil)); end - - class << self - # Creates extension methods for the `name` extension to enable and disable - # the extension and to query if they are active. - # - # source://rdoc//lib/rdoc/markdown.rb#603 - def extension(name); end - - # Parses the `markdown` document into an RDoc::Document using the default - # extensions. - # - # source://rdoc//lib/rdoc/markdown.rb#656 - def parse(markdown); end - - # source://rdoc//lib/rdoc/markdown.rb#566 - def rule_info(name, rendered); end - end -end - -# source://rdoc//lib/rdoc/markdown.rb#257 -class RDoc::Markdown::KpegPosInfo < ::Struct - # Returns the value of attribute char - # - # @return [Object] the current value of char - def char; end - - # Sets the attribute char - # - # @param value [Object] the value to set the attribute char to. - # @return [Object] the newly set value - def char=(_); end - - # Returns the value of attribute col - # - # @return [Object] the current value of col - def col; end - - # Sets the attribute col - # - # @param value [Object] the value to set the attribute col to. - # @return [Object] the newly set value - def col=(_); end - - # Returns the value of attribute line - # - # @return [Object] the current value of line - def line; end - - # Sets the attribute line - # - # @param value [Object] the value to set the attribute line to. - # @return [Object] the newly set value - def line=(_); end - - # Returns the value of attribute lno - # - # @return [Object] the current value of lno - def lno; end - - # Sets the attribute lno - # - # @param value [Object] the value to set the attribute lno to. - # @return [Object] the newly set value - def lno=(_); end - - # Returns the value of attribute pos - # - # @return [Object] the current value of pos - def pos; end - - # Sets the attribute pos - # - # @param value [Object] the value to set the attribute pos to. - # @return [Object] the newly set value - def pos=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# This set of literals is for Ruby 1.9 regular expressions and gives full -# unicode support. -# -# Unlike peg-markdown, this set of literals recognizes Unicode alphanumeric -# characters, newlines and spaces. -# -# source://rdoc//lib/rdoc/markdown/literals.rb#11 -class RDoc::Markdown::Literals - # This is distinct from setup_parser so that a standalone parser - # can redefine #initialize and still have access to the proper - # parser setup code. - # - # @return [Literals] a new instance of Literals - # - # source://rdoc//lib/rdoc/markdown/literals.rb#17 - def initialize(str, debug = T.unsafe(nil)); end - - # Alphanumeric = /\p{Word}/ - # - # source://rdoc//lib/rdoc/markdown/literals.rb#405 - def _Alphanumeric; end - - # AlphanumericAscii = /[A-Za-z0-9]/ - # - # source://rdoc//lib/rdoc/markdown/literals.rb#412 - def _AlphanumericAscii; end - - # BOM = "uFEFF" - # - # source://rdoc//lib/rdoc/markdown/literals.rb#419 - def _BOM; end - - # Newline = /\n|\r\n?|\p{Zl}|\p{Zp}/ - # - # source://rdoc//lib/rdoc/markdown/literals.rb#426 - def _Newline; end - - # NonAlphanumeric = /\p{^Word}/ - # - # source://rdoc//lib/rdoc/markdown/literals.rb#433 - def _NonAlphanumeric; end - - # Spacechar = /\t|\p{Zs}/ - # - # source://rdoc//lib/rdoc/markdown/literals.rb#440 - def _Spacechar; end - - # source://rdoc//lib/rdoc/markdown/literals.rb#331 - def apply(rule); end - - # source://rdoc//lib/rdoc/markdown/literals.rb#297 - def apply_with_args(rule, *args); end - - # source://rdoc//lib/rdoc/markdown/literals.rb#79 - def current_character(target = T.unsafe(nil)); end - - # source://rdoc//lib/rdoc/markdown/literals.rb#40 - def current_column(target = T.unsafe(nil)); end - - # source://rdoc//lib/rdoc/markdown/literals.rb#63 - def current_line(target = T.unsafe(nil)); end - - # source://rdoc//lib/rdoc/markdown/literals.rb#88 - def current_pos_info(target = T.unsafe(nil)); end - - # source://rdoc//lib/rdoc/markdown/literals.rb#278 - def external_invoke(other, rule, *args); end - - # Returns the value of attribute failed_rule. - # - # source://rdoc//lib/rdoc/markdown/literals.rb#200 - def failed_rule; end - - # Returns the value of attribute failing_rule_offset. - # - # source://rdoc//lib/rdoc/markdown/literals.rb#37 - def failing_rule_offset; end - - # source://rdoc//lib/rdoc/markdown/literals.rb#147 - def failure_caret; end - - # source://rdoc//lib/rdoc/markdown/literals.rb#152 - def failure_character; end - - # source://rdoc//lib/rdoc/markdown/literals.rb#135 - def failure_info; end - - # source://rdoc//lib/rdoc/markdown/literals.rb#156 - def failure_oneline; end - - # source://rdoc//lib/rdoc/markdown/literals.rb#222 - def get_byte; end - - # source://rdoc//lib/rdoc/markdown/literals.rb#100 - def get_line(no); end - - # source://rdoc//lib/rdoc/markdown/literals.rb#114 - def get_text(start); end - - # source://rdoc//lib/rdoc/markdown/literals.rb#364 - def grow_lr(rule, args, start_pos, m); end - - # source://rdoc//lib/rdoc/markdown/literals.rb#96 - def lines; end - - # source://rdoc//lib/rdoc/markdown/literals.rb#202 - def match_string(str); end - - # source://rdoc//lib/rdoc/markdown/literals.rb#243 - def parse(rule = T.unsafe(nil)); end - - # Returns the value of attribute pos. - # - # source://rdoc//lib/rdoc/markdown/literals.rb#38 - def pos; end - - # Sets the attribute pos - # - # @param value the value to set the attribute pos to. - # - # source://rdoc//lib/rdoc/markdown/literals.rb#38 - def pos=(_arg0); end - - # source://rdoc//lib/rdoc/markdown/literals.rb#50 - def position_line_offsets; end - - # @raise [ParseError] - # - # source://rdoc//lib/rdoc/markdown/literals.rb#170 - def raise_error; end - - # Returns the value of attribute result. - # - # source://rdoc//lib/rdoc/markdown/literals.rb#38 - def result; end - - # Sets the attribute result - # - # @param value the value to set the attribute result to. - # - # source://rdoc//lib/rdoc/markdown/literals.rb#38 - def result=(_arg0); end - - # source://rdoc//lib/rdoc/markdown/literals.rb#212 - def scan(reg); end - - # source://rdoc//lib/rdoc/markdown/literals.rb#193 - def set_failed_rule(name); end - - # Sets the string and current parsing position for the parser. - # - # source://rdoc//lib/rdoc/markdown/literals.rb#119 - def set_string(string, pos); end - - # :startdoc: - # :stopdoc: - # - # source://rdoc//lib/rdoc/markdown/literals.rb#402 - def setup_foreign_grammar; end - - # Prepares for parsing +str+. If you define a custom initialize you must - # call this method before #parse - # - # source://rdoc//lib/rdoc/markdown/literals.rb#25 - def setup_parser(str, debug = T.unsafe(nil)); end - - # source://rdoc//lib/rdoc/markdown/literals.rb#174 - def show_error(io = T.unsafe(nil)); end - - # source://rdoc//lib/rdoc/markdown/literals.rb#126 - def show_pos; end - - # Returns the value of attribute string. - # - # source://rdoc//lib/rdoc/markdown/literals.rb#36 - def string; end - - class << self - # source://rdoc//lib/rdoc/markdown/literals.rb#395 - def rule_info(name, rendered); end - end -end - -# source://rdoc//lib/rdoc/markdown/literals.rb#86 -class RDoc::Markdown::Literals::KpegPosInfo < ::Struct - # Returns the value of attribute char - # - # @return [Object] the current value of char - def char; end - - # Sets the attribute char - # - # @param value [Object] the value to set the attribute char to. - # @return [Object] the newly set value - def char=(_); end - - # Returns the value of attribute col - # - # @return [Object] the current value of col - def col; end - - # Sets the attribute col - # - # @param value [Object] the value to set the attribute col to. - # @return [Object] the newly set value - def col=(_); end - - # Returns the value of attribute line - # - # @return [Object] the current value of line - def line; end - - # Sets the attribute line - # - # @param value [Object] the value to set the attribute line to. - # @return [Object] the newly set value - def line=(_); end - - # Returns the value of attribute lno - # - # @return [Object] the current value of lno - def lno; end - - # Sets the attribute lno - # - # @param value [Object] the value to set the attribute lno to. - # @return [Object] the newly set value - def lno=(_); end - - # Returns the value of attribute pos - # - # @return [Object] the current value of pos - def pos; end - - # Sets the attribute pos - # - # @param value [Object] the value to set the attribute pos to. - # @return [Object] the newly set value - def pos=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://rdoc//lib/rdoc/markdown/literals.rb#257 -class RDoc::Markdown::Literals::MemoEntry - # @return [MemoEntry] a new instance of MemoEntry - # - # source://rdoc//lib/rdoc/markdown/literals.rb#258 - def initialize(ans, pos); end - - # Returns the value of attribute ans. - # - # source://rdoc//lib/rdoc/markdown/literals.rb#266 - def ans; end - - # Returns the value of attribute left_rec. - # - # source://rdoc//lib/rdoc/markdown/literals.rb#267 - def left_rec; end - - # Sets the attribute left_rec - # - # @param value the value to set the attribute left_rec to. - # - # source://rdoc//lib/rdoc/markdown/literals.rb#267 - def left_rec=(_arg0); end - - # source://rdoc//lib/rdoc/markdown/literals.rb#269 - def move!(ans, pos, result); end - - # Returns the value of attribute pos. - # - # source://rdoc//lib/rdoc/markdown/literals.rb#266 - def pos; end - - # Returns the value of attribute result. - # - # source://rdoc//lib/rdoc/markdown/literals.rb#266 - def result; end - - # Returns the value of attribute set. - # - # source://rdoc//lib/rdoc/markdown/literals.rb#266 - def set; end -end - -# source://rdoc//lib/rdoc/markdown/literals.rb#386 -class RDoc::Markdown::Literals::RuleInfo - # @return [RuleInfo] a new instance of RuleInfo - # - # source://rdoc//lib/rdoc/markdown/literals.rb#387 - def initialize(name, rendered); end - - # Returns the value of attribute name. - # - # source://rdoc//lib/rdoc/markdown/literals.rb#392 - def name; end - - # Returns the value of attribute rendered. - # - # source://rdoc//lib/rdoc/markdown/literals.rb#392 - def rendered; end -end - -# source://rdoc//lib/rdoc/markdown.rb#428 -class RDoc::Markdown::MemoEntry - # @return [MemoEntry] a new instance of MemoEntry - # - # source://rdoc//lib/rdoc/markdown.rb#429 - def initialize(ans, pos); end - - # Returns the value of attribute ans. - # - # source://rdoc//lib/rdoc/markdown.rb#437 - def ans; end - - # Returns the value of attribute left_rec. - # - # source://rdoc//lib/rdoc/markdown.rb#438 - def left_rec; end - - # Sets the attribute left_rec - # - # @param value the value to set the attribute left_rec to. - # - # source://rdoc//lib/rdoc/markdown.rb#438 - def left_rec=(_arg0); end - - # source://rdoc//lib/rdoc/markdown.rb#440 - def move!(ans, pos, result); end - - # Returns the value of attribute pos. - # - # source://rdoc//lib/rdoc/markdown.rb#437 - def pos; end - - # Returns the value of attribute result. - # - # source://rdoc//lib/rdoc/markdown.rb#437 - def result; end - - # Returns the value of attribute set. - # - # source://rdoc//lib/rdoc/markdown.rb#437 - def set; end -end - -# source://rdoc//lib/rdoc/markdown.rb#557 -class RDoc::Markdown::RuleInfo - # @return [RuleInfo] a new instance of RuleInfo - # - # source://rdoc//lib/rdoc/markdown.rb#558 - def initialize(name, rendered); end - - # Returns the value of attribute name. - # - # source://rdoc//lib/rdoc/markdown.rb#563 - def name; end - - # Returns the value of attribute rendered. - # - # source://rdoc//lib/rdoc/markdown.rb#563 - def rendered; end -end - -# source://rdoc//lib/rdoc/markup.rb#111 -class RDoc::Markup - # Take a block of text and use various heuristics to determine its - # structure (paragraphs, lists, and so on). Invoke an event handler as we - # identify significant chunks. - # - # @return [Markup] a new instance of Markup - # - # source://rdoc//lib/rdoc/markup.rb#151 - def initialize(attribute_manager = T.unsafe(nil)); end - - # Add to the sequences recognized as general markup. - # - # source://rdoc//lib/rdoc/markup.rb#168 - def add_html(tag, name); end - - # Add to other inline sequences. For example, we could add WikiWords using - # something like: - # - # parser.add_regexp_handling(/\b([A-Z][a-z]+[A-Z]\w+)/, :WIKIWORD) - # - # Each wiki word will be presented to the output formatter. - # - # source://rdoc//lib/rdoc/markup.rb#180 - def add_regexp_handling(pattern, name); end - - # Add to the sequences used to add formatting to an individual word (such - # as *bold*). Matching entries will generate attributes that the output - # formatters can recognize by their +name+. - # - # source://rdoc//lib/rdoc/markup.rb#161 - def add_word_pair(start, stop, name); end - - # An AttributeManager which handles inline markup. - # - # source://rdoc//lib/rdoc/markup.rb#116 - def attribute_manager; end - - # We take +input+, parse it if necessary, then invoke the output +formatter+ - # using a Visitor to render the result. - # - # source://rdoc//lib/rdoc/markup.rb#188 - def convert(input, formatter); end - - class << self - # Parses +str+ into an RDoc::Markup::Document. - # - # source://rdoc//lib/rdoc/markup.rb#121 - def parse(str); end - end -end - -# An AttrChanger records a change in attributes. It contains a bitmap of the -# attributes to turn on, and a bitmap of those to turn off. -# -# source://rdoc//lib/rdoc/markup/attr_changer.rb#4 -class RDoc::Markup::AttrChanger < ::Struct - # source://rdoc//lib/rdoc/markup/attr_changer.rb#18 - def inspect; end - - # source://rdoc//lib/rdoc/markup/attr_changer.rb#14 - def to_s; end -end - -# An array of attributes which parallels the characters in a string. -# -# source://rdoc//lib/rdoc/markup/attr_span.rb#5 -class RDoc::Markup::AttrSpan - # Creates a new AttrSpan for +length+ characters - # - # @return [AttrSpan] a new instance of AttrSpan - # - # source://rdoc//lib/rdoc/markup/attr_span.rb#10 - def initialize(length, exclusive); end - - # Accesses flags for character +n+ - # - # source://rdoc//lib/rdoc/markup/attr_span.rb#31 - def [](n); end - - # Toggles +bits+ from +start+ to +length+ - # - # source://rdoc//lib/rdoc/markup/attr_span.rb#17 - def set_attrs(start, length, bits); end -end - -# Manages changes of attributes in a block of text -# -# source://rdoc//lib/rdoc/markup/attribute_manager.rb#6 -class RDoc::Markup::AttributeManager - # Creates a new attribute manager that understands bold, emphasized and - # teletype text. - # - # @return [AttributeManager] a new instance of AttributeManager - # - # source://rdoc//lib/rdoc/markup/attribute_manager.rb#80 - def initialize; end - - # Adds a markup class with +name+ for words surrounded by HTML tag +tag+. - # To process emphasis tags: - # - # am.add_html 'em', :EM - # - # source://rdoc//lib/rdoc/markup/attribute_manager.rb#286 - def add_html(tag, name, exclusive = T.unsafe(nil)); end - - # Adds a regexp handling for +pattern+ with +name+. A simple URL handler - # would be: - # - # @am.add_regexp_handling(/((https?:)\S+\w)/, :HYPERLINK) - # - # source://rdoc//lib/rdoc/markup/attribute_manager.rb#298 - def add_regexp_handling(pattern, name, exclusive = T.unsafe(nil)); end - - # Adds a markup class with +name+ for words wrapped in the +start+ and - # +stop+ character. To make words wrapped with "*" bold: - # - # am.add_word_pair '*', '*', :BOLD - # - # @raise [ArgumentError] - # - # source://rdoc//lib/rdoc/markup/attribute_manager.rb#261 - def add_word_pair(start, stop, name, exclusive = T.unsafe(nil)); end - - # Return an attribute object with the given turn_on and turn_off bits set - # - # source://rdoc//lib/rdoc/markup/attribute_manager.rb#103 - def attribute(turn_on, turn_off); end - - # The attributes enabled for this markup object. - # - # source://rdoc//lib/rdoc/markup/attribute_manager.rb#40 - def attributes; end - - # Changes the current attribute from +current+ to +new+ - # - # source://rdoc//lib/rdoc/markup/attribute_manager.rb#110 - def change_attribute(current, new); end - - # Used by the tests to change attributes by name from +current_set+ to - # +new_set+ - # - # source://rdoc//lib/rdoc/markup/attribute_manager.rb#119 - def changed_attribute_by_name(current_set, new_set); end - - # Map attributes like textto the sequence - # \001\002\001\003, where is a per-attribute specific - # character - # - # source://rdoc//lib/rdoc/markup/attribute_manager.rb#154 - def convert_attrs(str, attrs, exclusive = T.unsafe(nil)); end - - # source://rdoc//lib/rdoc/markup/attribute_manager.rb#160 - def convert_attrs_matching_word_pairs(str, attrs, exclusive); end - - # source://rdoc//lib/rdoc/markup/attribute_manager.rb#185 - def convert_attrs_word_pair_map(str, attrs, exclusive); end - - # Converts HTML tags to RDoc attributes - # - # source://rdoc//lib/rdoc/markup/attribute_manager.rb#206 - def convert_html(str, attrs, exclusive = T.unsafe(nil)); end - - # Converts regexp handling sequences to RDoc attributes - # - # source://rdoc//lib/rdoc/markup/attribute_manager.rb#223 - def convert_regexp_handlings(str, attrs, exclusive = T.unsafe(nil)); end - - # Copies +start_pos+ to +end_pos+ from the current string - # - # source://rdoc//lib/rdoc/markup/attribute_manager.rb#135 - def copy_string(start_pos, end_pos); end - - # Debug method that prints a string along with its attributes - # - # source://rdoc//lib/rdoc/markup/attribute_manager.rb#329 - def display_attributes; end - - # @return [Boolean] - # - # source://rdoc//lib/rdoc/markup/attribute_manager.rb#142 - def exclusive?(attr); end - - # A bits of exclusive maps - # - # source://rdoc//lib/rdoc/markup/attribute_manager.rb#74 - def exclusive_bitmap; end - - # Processes +str+ converting attributes, HTML and regexp handlings - # - # source://rdoc//lib/rdoc/markup/attribute_manager.rb#307 - def flow(str); end - - # This maps HTML tags to the corresponding attribute char - # - # source://rdoc//lib/rdoc/markup/attribute_manager.rb#58 - def html_tags; end - - # Escapes regexp handling sequences of text to prevent conversion to RDoc - # - # source://rdoc//lib/rdoc/markup/attribute_manager.rb#239 - def mask_protected_sequences; end - - # This maps delimiters that occur around words (such as *bold* or +tt+) - # where the start and end delimiters and the same. This lets us optimize - # the regexp - # - # source://rdoc//lib/rdoc/markup/attribute_manager.rb#47 - def matching_word_pairs; end - - # A \ in front of a character that would normally be processed turns off - # processing. We do this by turning \< into <#{PROTECT} - # - # source://rdoc//lib/rdoc/markup/attribute_manager.rb#64 - def protectable; end - - # And this maps _regexp handling_ sequences to a name. A regexp handling - # sequence is something like a WikiWord - # - # source://rdoc//lib/rdoc/markup/attribute_manager.rb#70 - def regexp_handlings; end - - # Splits the string into chunks by attribute change - # - # source://rdoc//lib/rdoc/markup/attribute_manager.rb#354 - def split_into_flow; end - - # Unescapes regexp handling sequences of text - # - # source://rdoc//lib/rdoc/markup/attribute_manager.rb#251 - def unmask_protected_sequences; end - - # And this is used when the delimiters aren't the same. In this case the - # hash maps a pattern to the attribute character - # - # source://rdoc//lib/rdoc/markup/attribute_manager.rb#53 - def word_pair_map; end -end - -# source://rdoc//lib/rdoc/markup/attribute_manager.rb#147 -RDoc::Markup::AttributeManager::NON_PRINTING_END = T.let(T.unsafe(nil), String) - -# source://rdoc//lib/rdoc/markup/attribute_manager.rb#146 -RDoc::Markup::AttributeManager::NON_PRINTING_START = T.let(T.unsafe(nil), String) - -# We manage a set of attributes. Each attribute has a symbol name and a bit -# value. -# -# source://rdoc//lib/rdoc/markup/attributes.rb#6 -class RDoc::Markup::Attributes - # Creates a new attributes set. - # - # @return [Attributes] a new instance of Attributes - # - # source://rdoc//lib/rdoc/markup/attributes.rb#16 - def initialize; end - - # Returns a string representation of +bitmap+ - # - # source://rdoc//lib/rdoc/markup/attributes.rb#46 - def as_string(bitmap); end - - # Returns a unique bit for +name+ - # - # source://rdoc//lib/rdoc/markup/attributes.rb#29 - def bitmap_for(name); end - - # yields each attribute name in +bitmap+ - # - # source://rdoc//lib/rdoc/markup/attributes.rb#60 - def each_name_of(bitmap); end - - # The regexp handling attribute type. See RDoc::Markup#add_regexp_handling - # - # source://rdoc//lib/rdoc/markup/attributes.rb#11 - def regexp_handling; end -end - -# An empty line. This class is a singleton. -# -# source://rdoc//lib/rdoc/markup/blank_line.rb#5 -class RDoc::Markup::BlankLine - # Calls #accept_blank_line on +visitor+ - # - # source://rdoc//lib/rdoc/markup/blank_line.rb#19 - def accept(visitor); end - - # source://rdoc//lib/rdoc/markup/blank_line.rb#23 - def pretty_print(q); end - - class << self - # RDoc::Markup::BlankLine is a singleton - # - # source://rdoc//lib/rdoc/markup/blank_line.rb#12 - def new; end - end -end - -# A quoted section which contains markup items. -# -# source://rdoc//lib/rdoc/markup/block_quote.rb#5 -class RDoc::Markup::BlockQuote < ::RDoc::Markup::Raw - # Calls #accept_block_quote on +visitor+ - # - # source://rdoc//lib/rdoc/markup/block_quote.rb#10 - def accept(visitor); end -end - -# A Document containing lists, headings, paragraphs, etc. -# -# source://rdoc//lib/rdoc/markup/document.rb#5 -class RDoc::Markup::Document - include ::Enumerable - - # Creates a new Document with +parts+ - # - # @return [Document] a new instance of Document - # - # source://rdoc//lib/rdoc/markup/document.rb#29 - def initialize(*parts); end - - # Appends +part+ to the document - # - # source://rdoc//lib/rdoc/markup/document.rb#40 - def <<(part); end - - # source://rdoc//lib/rdoc/markup/document.rb#56 - def ==(other); end - - # Runs this document and all its #items through +visitor+ - # - # source://rdoc//lib/rdoc/markup/document.rb#65 - def accept(visitor); end - - # Concatenates the given +parts+ onto the document - # - # source://rdoc//lib/rdoc/markup/document.rb#76 - def concat(parts); end - - # Enumerator for the parts of this document - # - # source://rdoc//lib/rdoc/markup/document.rb#83 - def each(&block); end - - # Does this document have no parts? - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/markup/document.rb#90 - def empty?; end - - # The file this document was created from. See also - # RDoc::ClassModule#add_comment - # - # source://rdoc//lib/rdoc/markup/document.rb#13 - def file; end - - # The file this Document was created from. - # - # source://rdoc//lib/rdoc/markup/document.rb#97 - def file=(location); end - - # When this is a collection of documents (#file is not set and this document - # contains only other documents as its direct children) #merge replaces - # documents in this class with documents from +other+ when the file matches - # and adds documents from +other+ when the files do not. - # - # The information in +other+ is preferred over the receiver - # - # source://rdoc//lib/rdoc/markup/document.rb#114 - def merge(other); end - - # Does this Document contain other Documents? - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/markup/document.rb#134 - def merged?; end - - # If a heading is below the given level it will be omitted from the - # table_of_contents - # - # source://rdoc//lib/rdoc/markup/document.rb#19 - def omit_headings_below; end - - # If a heading is below the given level it will be omitted from the - # table_of_contents - # - # source://rdoc//lib/rdoc/markup/document.rb#19 - def omit_headings_below=(_arg0); end - - # The parts of the Document - # - # source://rdoc//lib/rdoc/markup/document.rb#24 - def parts; end - - # source://rdoc//lib/rdoc/markup/document.rb#138 - def pretty_print(q); end - - # Appends +parts+ to the document - # - # source://rdoc//lib/rdoc/markup/document.rb#151 - def push(*parts); end - - # Returns an Array of headings in the document. - # - # Require 'rdoc/markup/formatter' before calling this method. - # - # source://rdoc//lib/rdoc/markup/document.rb#160 - def table_of_contents; end -end - -# Base class for RDoc markup formatters -# -# Formatters are a visitor that converts an RDoc::Markup tree (from a comment) -# into some kind of output. RDoc ships with formatters for converting back to -# rdoc, ANSI text, HTML, a Table of Contents and other formats. -# -# If you'd like to write your own Formatter use -# RDoc::Markup::FormatterTestCase. If you're writing a text-output formatter -# use RDoc::Markup::TextFormatterTestCase which provides extra test cases. -# -# source://rdoc//lib/rdoc/markup/formatter.rb#13 -class RDoc::Markup::Formatter - # Creates a new Formatter - # - # @return [Formatter] a new instance of Formatter - # - # source://rdoc//lib/rdoc/markup/formatter.rb#48 - def initialize(options, markup = T.unsafe(nil)); end - - # Adds +document+ to the output - # - # source://rdoc//lib/rdoc/markup/formatter.rb#69 - def accept_document(document); end - - # Adds a regexp handling for links of the form rdoc-...: - # - # source://rdoc//lib/rdoc/markup/formatter.rb#83 - def add_regexp_handling_RDOCLINK; end - - # Adds a regexp handling for links of the form {}[] and - # [] - # - # source://rdoc//lib/rdoc/markup/formatter.rb#91 - def add_regexp_handling_TIDYLINK; end - - # Add a new set of tags for an attribute. We allow separate start and end - # tags for flexibility - # - # source://rdoc//lib/rdoc/markup/formatter.rb#105 - def add_tag(name, start, stop); end - - # Allows +tag+ to be decorated with additional information. - # - # source://rdoc//lib/rdoc/markup/formatter.rb#113 - def annotate(tag); end - - # Marks up +content+ - # - # source://rdoc//lib/rdoc/markup/formatter.rb#120 - def convert(content); end - - # Converts flow items +flow+ - # - # source://rdoc//lib/rdoc/markup/formatter.rb#127 - def convert_flow(flow); end - - # Converts added regexp handlings. See RDoc::Markup#add_regexp_handling - # - # source://rdoc//lib/rdoc/markup/formatter.rb#150 - def convert_regexp_handling(target); end - - # Converts a string to be fancier if desired - # - # source://rdoc//lib/rdoc/markup/formatter.rb#176 - def convert_string(string); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#225 - def each_attr_tag(attr_mask, reverse = T.unsafe(nil)); end - - # Use ignore in your subclass to ignore the content of a node. - # - # ## - # # We don't support raw nodes in ToNoRaw - # - # alias accept_raw ignore - # - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def ignore(*node); end - - # Are we currently inside tt tags? - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/markup/formatter.rb#194 - def in_tt?; end - - # Turns off tags for +item+ on +res+ - # - # source://rdoc//lib/rdoc/markup/formatter.rb#218 - def off_tags(res, item); end - - # Turns on tags for +item+ on +res+ - # - # source://rdoc//lib/rdoc/markup/formatter.rb#208 - def on_tags(res, item); end - - # Extracts and a scheme, url and an anchor id from +url+ and returns them. - # - # source://rdoc//lib/rdoc/markup/formatter.rb#238 - def parse_url(url); end - - # Is +tag+ a tt tag? - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/markup/formatter.rb#268 - def tt?(tag); end - - # @return [Boolean] - # - # source://rdoc//lib/rdoc/markup/formatter.rb#198 - def tt_tag?(attr_mask, reverse = T.unsafe(nil)); end - - class << self - # Converts a target url to one that is relative to a given path - # - # source://rdoc//lib/rdoc/markup/formatter.rb#24 - def gen_relative_url(path, target); end - end -end - -# A hard-break in the middle of a paragraph. -# -# source://rdoc//lib/rdoc/markup/hard_break.rb#5 -class RDoc::Markup::HardBreak - # source://rdoc//lib/rdoc/markup/hard_break.rb#23 - def ==(other); end - - # Calls #accept_hard_break on +visitor+ - # - # source://rdoc//lib/rdoc/markup/hard_break.rb#19 - def accept(visitor); end - - # source://rdoc//lib/rdoc/markup/hard_break.rb#27 - def pretty_print(q); end - - class << self - # RDoc::Markup::HardBreak is a singleton - # - # source://rdoc//lib/rdoc/markup/hard_break.rb#12 - def new; end - end -end - -# source://rdoc//lib/rdoc/markup/heading.rb#6 -class RDoc::Markup::Heading < ::Struct - # source://rdoc//lib/rdoc/markup/heading.rb#40 - def accept(visitor); end - - # source://rdoc//lib/rdoc/markup/heading.rb#47 - def aref; end - - # source://rdoc//lib/rdoc/markup/heading.rb#55 - def label(context = T.unsafe(nil)); end - - # source://rdoc//lib/rdoc/markup/heading.rb#68 - def plain_html; end - - # source://rdoc//lib/rdoc/markup/heading.rb#72 - def pretty_print(q); end - - class << self - # source://rdoc//lib/rdoc/markup/heading.rb#22 - def to_html; end - - # source://rdoc//lib/rdoc/markup/heading.rb#14 - def to_label; end - end -end - -# A file included at generation time. Objects of this class are created by -# RDoc::RD for an extension-less include. -# -# This implementation in incomplete. -# -# source://rdoc//lib/rdoc/markup/include.rb#8 -class RDoc::Markup::Include - # Creates a new include that will import +file+ from +include_path+ - # - # @return [Include] a new instance of Include - # - # source://rdoc//lib/rdoc/markup/include.rb#23 - def initialize(file, include_path); end - - # source://rdoc//lib/rdoc/markup/include.rb#28 - def ==(other); end - - # The filename to be included, without extension - # - # source://rdoc//lib/rdoc/markup/include.rb#13 - def file; end - - # Directories to search for #file - # - # source://rdoc//lib/rdoc/markup/include.rb#18 - def include_path; end - - # source://rdoc//lib/rdoc/markup/include.rb#33 - def pretty_print(q); end -end - -# An Indented Paragraph of text -# -# source://rdoc//lib/rdoc/markup/indented_paragraph.rb#5 -class RDoc::Markup::IndentedParagraph < ::RDoc::Markup::Raw - # Creates a new IndentedParagraph containing +parts+ indented with +indent+ - # spaces - # - # @return [IndentedParagraph] a new instance of IndentedParagraph - # - # source://rdoc//lib/rdoc/markup/indented_paragraph.rb#16 - def initialize(indent, *parts); end - - # source://rdoc//lib/rdoc/markup/indented_paragraph.rb#22 - def ==(other); end - - # Calls #accept_indented_paragraph on +visitor+ - # - # source://rdoc//lib/rdoc/markup/indented_paragraph.rb#29 - def accept(visitor); end - - # The indent in number of spaces - # - # source://rdoc//lib/rdoc/markup/indented_paragraph.rb#10 - def indent; end - - # Joins the raw paragraph text and converts inline HardBreaks to the - # +hard_break+ text followed by the indent. - # - # source://rdoc//lib/rdoc/markup/indented_paragraph.rb#37 - def text(hard_break = T.unsafe(nil)); end -end - -# A List is a homogeneous set of ListItems. -# -# The supported list types include: -# -# :BULLET:: -# An unordered list -# :LABEL:: -# An unordered definition list, but using an alternate RDoc::Markup syntax -# :LALPHA:: -# An ordered list using increasing lowercase English letters -# :NOTE:: -# An unordered definition list -# :NUMBER:: -# An ordered list using increasing Arabic numerals -# :UALPHA:: -# An ordered list using increasing uppercase English letters -# -# Definition lists behave like HTML definition lists. Each list item can -# describe multiple terms. See RDoc::Markup::ListItem for how labels and -# definition are stored as list items. -# -# source://rdoc//lib/rdoc/markup/list.rb#24 -class RDoc::Markup::List - # Creates a new list of +type+ with +items+. Valid list types are: - # +:BULLET+, +:LABEL+, +:LALPHA+, +:NOTE+, +:NUMBER+, +:UALPHA+ - # - # @return [List] a new instance of List - # - # source://rdoc//lib/rdoc/markup/list.rb#40 - def initialize(type = T.unsafe(nil), *items); end - - # Appends +item+ to the list - # - # source://rdoc//lib/rdoc/markup/list.rb#49 - def <<(item); end - - # source://rdoc//lib/rdoc/markup/list.rb#53 - def ==(other); end - - # Runs this list and all its #items through +visitor+ - # - # source://rdoc//lib/rdoc/markup/list.rb#62 - def accept(visitor); end - - # Is the list empty? - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/markup/list.rb#75 - def empty?; end - - # Items in the list - # - # source://rdoc//lib/rdoc/markup/list.rb#34 - def items; end - - # Returns the last item in the list - # - # source://rdoc//lib/rdoc/markup/list.rb#82 - def last; end - - # source://rdoc//lib/rdoc/markup/list.rb#86 - def pretty_print(q); end - - # Appends +items+ to the list - # - # source://rdoc//lib/rdoc/markup/list.rb#97 - def push(*items); end - - # The list's type - # - # source://rdoc//lib/rdoc/markup/list.rb#29 - def type; end - - # The list's type - # - # source://rdoc//lib/rdoc/markup/list.rb#29 - def type=(_arg0); end -end - -# An item within a List that contains paragraphs, headings, etc. -# -# For BULLET, NUMBER, LALPHA and UALPHA lists, the label will always be nil. -# For NOTE and LABEL lists, the list label may contain: -# -# * a single String for a single label -# * an Array of Strings for a list item with multiple terms -# * nil for an extra description attached to a previously labeled list item -# -# source://rdoc//lib/rdoc/markup/list_item.rb#12 -class RDoc::Markup::ListItem - # Creates a new ListItem with an optional +label+ containing +parts+ - # - # @return [ListItem] a new instance of ListItem - # - # source://rdoc//lib/rdoc/markup/list_item.rb#27 - def initialize(label = T.unsafe(nil), *parts); end - - # Appends +part+ to the ListItem - # - # source://rdoc//lib/rdoc/markup/list_item.rb#36 - def <<(part); end - - # source://rdoc//lib/rdoc/markup/list_item.rb#40 - def ==(other); end - - # Runs this list item and all its #parts through +visitor+ - # - # source://rdoc//lib/rdoc/markup/list_item.rb#49 - def accept(visitor); end - - # Is the ListItem empty? - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/markup/list_item.rb#62 - def empty?; end - - # The label for the ListItem - # - # source://rdoc//lib/rdoc/markup/list_item.rb#17 - def label; end - - # The label for the ListItem - # - # source://rdoc//lib/rdoc/markup/list_item.rb#17 - def label=(_arg0); end - - # Length of parts in the ListItem - # - # source://rdoc//lib/rdoc/markup/list_item.rb#69 - def length; end - - # Parts of the ListItem - # - # source://rdoc//lib/rdoc/markup/list_item.rb#22 - def parts; end - - # source://rdoc//lib/rdoc/markup/list_item.rb#73 - def pretty_print(q); end - - # Adds +parts+ to the ListItem - # - # source://rdoc//lib/rdoc/markup/list_item.rb#95 - def push(*parts); end -end - -# A Paragraph of text -# -# source://rdoc//lib/rdoc/markup/paragraph.rb#5 -class RDoc::Markup::Paragraph < ::RDoc::Markup::Raw - # Calls #accept_paragraph on +visitor+ - # - # source://rdoc//lib/rdoc/markup/paragraph.rb#10 - def accept(visitor); end - - # Joins the raw paragraph text and converts inline HardBreaks to the - # +hard_break+ text. - # - # source://rdoc//lib/rdoc/markup/paragraph.rb#18 - def text(hard_break = T.unsafe(nil)); end -end - -# A recursive-descent parser for RDoc markup. -# -# The parser tokenizes an input string then parses the tokens into a Document. -# Documents can be converted into output formats by writing a visitor like -# RDoc::Markup::ToHTML. -# -# The parser only handles the block-level constructs Paragraph, List, -# ListItem, Heading, Verbatim, BlankLine, Rule and BlockQuote. -# Inline markup such as \+blah\+ is handled separately by -# RDoc::Markup::AttributeManager. -# -# To see what markup the Parser implements read RDoc. To see how to use -# RDoc markup to format text in your program read RDoc::Markup. -# -# source://rdoc//lib/rdoc/markup/parser.rb#19 -class RDoc::Markup::Parser - include ::RDoc::Text - - # Creates a new Parser. See also ::parse - # - # @return [Parser] a new instance of Parser - # - # source://rdoc//lib/rdoc/markup/parser.rb#79 - def initialize; end - - # Builds a Heading of +level+ - # - # source://rdoc//lib/rdoc/markup/parser.rb#90 - def build_heading(level); end - - # Builds a List flush to +margin+ - # - # source://rdoc//lib/rdoc/markup/parser.rb#108 - def build_list(margin); end - - # Builds a Paragraph that is flush to +margin+ - # - # source://rdoc//lib/rdoc/markup/parser.rb#208 - def build_paragraph(margin); end - - # Builds a Verbatim that is indented from +margin+. - # - # The verbatim block is shifted left (the least indented lines start in - # column 0). Each part of the verbatim is one line of text, always - # terminated by a newline. Blank lines always consist of a single newline - # character, and there is never a single newline at the end of the verbatim. - # - # source://rdoc//lib/rdoc/markup/parser.rb#243 - def build_verbatim(margin); end - - # Enables display of debugging information - # - # source://rdoc//lib/rdoc/markup/parser.rb#48 - def debug; end - - # Enables display of debugging information - # - # source://rdoc//lib/rdoc/markup/parser.rb#48 - def debug=(_arg0); end - - # Pulls the next token from the stream. - # - # source://rdoc//lib/rdoc/markup/parser.rb#327 - def get; end - - # Parses the tokens into an array of RDoc::Markup::XXX objects, - # and appends them to the passed +parent+ RDoc::Markup::YYY object. - # - # Exits at the end of the token stream, or when it encounters a token - # in a column less than +indent+ (unless it is a NEWLINE). - # - # Returns +parent+. - # - # source://rdoc//lib/rdoc/markup/parser.rb#342 - def parse(parent, indent = T.unsafe(nil)); end - - # Small hook that is overridden by RDoc::TomDoc - # - # source://rdoc//lib/rdoc/markup/parser.rb#406 - def parse_text(parent, indent); end - - # Returns the next token on the stream without modifying the stream - # - # source://rdoc//lib/rdoc/markup/parser.rb#413 - def peek_token; end - - # Creates the StringScanner - # - # source://rdoc//lib/rdoc/markup/parser.rb#468 - def setup_scanner(input); end - - # Skips the next token if its type is +token_type+. - # - # Optionally raises an error if the next token is not of the expected type. - # - # @raise [ParseError] - # - # source://rdoc//lib/rdoc/markup/parser.rb#477 - def skip(token_type, error = T.unsafe(nil)); end - - # Turns text +input+ into a stream of tokens - # - # source://rdoc//lib/rdoc/markup/parser.rb#488 - def tokenize(input); end - - # Token accessor - # - # source://rdoc//lib/rdoc/markup/parser.rb#53 - def tokens; end - - # Returns the current token to the token stream - # - # @raise [Error] - # - # source://rdoc//lib/rdoc/markup/parser.rb#578 - def unget; end - - class << self - # Parses +str+ into a Document. - # - # Use RDoc::Markup#parse instead of this method. - # - # source://rdoc//lib/rdoc/markup/parser.rb#60 - def parse(str); end - - # Returns a token stream for +str+, for testing - # - # source://rdoc//lib/rdoc/markup/parser.rb#70 - def tokenize(str); end - end -end - -# A simple wrapper of StringScanner that is aware of the current column and lineno -# -# source://rdoc//lib/rdoc/markup/parser.rb#422 -class RDoc::Markup::Parser::MyStringScanner - # :stopdoc: - # - # @return [MyStringScanner] a new instance of MyStringScanner - # - # source://rdoc//lib/rdoc/markup/parser.rb#425 - def initialize(input); end - - # source://rdoc//lib/rdoc/markup/parser.rb#458 - def [](i); end - - # @return [Boolean] - # - # source://rdoc//lib/rdoc/markup/parser.rb#450 - def eos?; end - - # source://rdoc//lib/rdoc/markup/parser.rb#454 - def matched; end - - # source://rdoc//lib/rdoc/markup/parser.rb#445 - def newline!; end - - # source://rdoc//lib/rdoc/markup/parser.rb#441 - def pos; end - - # source://rdoc//lib/rdoc/markup/parser.rb#430 - def scan(re); end - - # source://rdoc//lib/rdoc/markup/parser.rb#436 - def unscan(s); end -end - -# Handle common directives that can occur in a block of text: -# -# \:include: filename -# -# Directives can be escaped by preceding them with a backslash. -# -# RDoc plugin authors can register additional directives to be handled by -# using RDoc::Markup::PreProcess::register. -# -# Any directive that is not built-in to RDoc (including those registered via -# plugins) will be stored in the metadata hash on the CodeObject the comment -# is attached to. See RDoc::Markup@Directives for the list of built-in -# directives. -# -# source://rdoc//lib/rdoc/markup/pre_process.rb#17 -class RDoc::Markup::PreProcess - # Creates a new pre-processor for +input_file_name+ that will look for - # included files in +include_path+ - # - # @return [PreProcess] a new instance of PreProcess - # - # source://rdoc//lib/rdoc/markup/pre_process.rb#78 - def initialize(input_file_name, include_path); end - - # Look for the given file in the directory containing the current file, - # and then in each of the directories specified in the RDOC_INCLUDE path - # - # source://rdoc//lib/rdoc/markup/pre_process.rb#308 - def find_include_file(name); end - - # Look for directives in the given +text+. - # - # Options that we don't handle are yielded. If the block returns false the - # directive is restored to the text. If the block returns nil or no block - # was given the directive is handled according to the registered directives. - # If a String was returned the directive is replaced with the string. - # - # If no matching directive was registered the directive is restored to the - # text. - # - # If +code_object+ is given and the directive is unknown then the - # directive's parameter is set as metadata on the +code_object+. See - # RDoc::CodeObject#metadata for details. - # - # source://rdoc//lib/rdoc/markup/pre_process.rb#99 - def handle(text, code_object = T.unsafe(nil), &block); end - - # Performs the actions described by +directive+ and its parameter +param+. - # - # +code_object+ is used for directives that operate on a class or module. - # +prefix+ is used to ensure the replacement for handled directives is - # correct. +encoding+ is used for the include directive. - # - # For a list of directives in RDoc see RDoc::Markup. - # -- - # When 1.8.7 support is ditched prefix can be defaulted to '' - # - # source://rdoc//lib/rdoc/markup/pre_process.rb#153 - def handle_directive(prefix, directive, param, code_object = T.unsafe(nil), encoding = T.unsafe(nil), line = T.unsafe(nil)); end - - # Handles the :include: _filename_ directive. - # - # If the first line of the included file starts with '#', and contains - # an encoding information in the form 'coding:' or 'coding=', it is - # removed. - # - # If all lines in the included file start with a '#', this leading '#' - # is removed before inclusion. The included content is indented like - # the :include: directive. - # -- - # so all content will be verbatim because of the likely space after '#'? - # TODO shift left the whole file content in that case - # TODO comment stop/start #-- and #++ in included file must be processed here - # - # source://rdoc//lib/rdoc/markup/pre_process.rb#282 - def include_file(name, indent, encoding); end - - # An RDoc::Options instance that will be filled in with overrides from - # directives - # - # source://rdoc//lib/rdoc/markup/pre_process.rb#23 - def options; end - - # An RDoc::Options instance that will be filled in with overrides from - # directives - # - # source://rdoc//lib/rdoc/markup/pre_process.rb#23 - def options=(_arg0); end - - class << self - # Adds a post-process handler for directives. The handler will be called - # with the result RDoc::Comment (or text String) and the code object for the - # comment (if any). - # - # source://rdoc//lib/rdoc/markup/pre_process.rb#30 - def post_process(&block); end - - # Registered post-processors - # - # source://rdoc//lib/rdoc/markup/pre_process.rb#37 - def post_processors; end - - # Registers +directive+ as one handled by RDoc. If a block is given the - # directive will be replaced by the result of the block, otherwise the - # directive will be removed from the processed text. - # - # The block will be called with the directive name and the directive - # parameter: - # - # RDoc::Markup::PreProcess.register 'my-directive' do |directive, param| - # # replace text, etc. - # end - # - # source://rdoc//lib/rdoc/markup/pre_process.rb#53 - def register(directive, &block); end - - # Registered directives - # - # source://rdoc//lib/rdoc/markup/pre_process.rb#60 - def registered; end - - # Clears all registered directives and post-processors - # - # source://rdoc//lib/rdoc/markup/pre_process.rb#67 - def reset; end - end -end - -# A section of text that is added to the output document as-is -# -# source://rdoc//lib/rdoc/markup/raw.rb#5 -class RDoc::Markup::Raw - # Creates a new Raw containing +parts+ - # - # @return [Raw] a new instance of Raw - # - # source://rdoc//lib/rdoc/markup/raw.rb#15 - def initialize(*parts); end - - # Appends +text+ - # - # source://rdoc//lib/rdoc/markup/raw.rb#23 - def <<(text); end - - # source://rdoc//lib/rdoc/markup/raw.rb#27 - def ==(other); end - - # Calls #accept_raw+ on +visitor+ - # - # source://rdoc//lib/rdoc/markup/raw.rb#34 - def accept(visitor); end - - # Appends +other+'s parts - # - # source://rdoc//lib/rdoc/markup/raw.rb#41 - def merge(other); end - - # The component parts of the list - # - # source://rdoc//lib/rdoc/markup/raw.rb#10 - def parts; end - - # source://rdoc//lib/rdoc/markup/raw.rb#45 - def pretty_print(q); end - - # Appends +texts+ onto this Paragraph - # - # source://rdoc//lib/rdoc/markup/raw.rb#58 - def push(*texts); end - - # The raw text - # - # source://rdoc//lib/rdoc/markup/raw.rb#65 - def text; end -end - -# Hold details of a regexp handling sequence -# -# source://rdoc//lib/rdoc/markup/regexp_handling.rb#5 -class RDoc::Markup::RegexpHandling - # Creates a new regexp handling sequence of +type+ with +text+ - # - # @return [RegexpHandling] a new instance of RegexpHandling - # - # source://rdoc//lib/rdoc/markup/regexp_handling.rb#20 - def initialize(type, text); end - - # Regexp handlings are equal when the have the same text and type - # - # source://rdoc//lib/rdoc/markup/regexp_handling.rb#27 - def ==(o); end - - # source://rdoc//lib/rdoc/markup/regexp_handling.rb#31 - def inspect; end - - # Regexp handling text - # - # source://rdoc//lib/rdoc/markup/regexp_handling.rb#15 - def text; end - - # Regexp handling text - # - # source://rdoc//lib/rdoc/markup/regexp_handling.rb#15 - def text=(_arg0); end - - # source://rdoc//lib/rdoc/markup/regexp_handling.rb#36 - def to_s; end - - # Regexp handling type - # - # source://rdoc//lib/rdoc/markup/regexp_handling.rb#10 - def type; end -end - -# A horizontal rule with a weight -# -# source://rdoc//lib/rdoc/markup/rule.rb#5 -class RDoc::Markup::Rule < ::Struct - # Calls #accept_rule on +visitor+ - # - # source://rdoc//lib/rdoc/markup/rule.rb#10 - def accept(visitor); end - - # source://rdoc//lib/rdoc/markup/rule.rb#14 - def pretty_print(q); end -end - -# A section of table -# -# source://rdoc//lib/rdoc/markup/table.rb#5 -class RDoc::Markup::Table - # Creates new instance - # - # @return [Table] a new instance of Table - # - # source://rdoc//lib/rdoc/markup/table.rb#16 - def initialize(header, align, body); end - - # :stopdoc: - # - # source://rdoc//lib/rdoc/markup/table.rb#21 - def ==(other); end - - # source://rdoc//lib/rdoc/markup/table.rb#28 - def accept(visitor); end - - # alignments of each column - # - # source://rdoc//lib/rdoc/markup/table.rb#10 - def align; end - - # alignments of each column - # - # source://rdoc//lib/rdoc/markup/table.rb#10 - def align=(_arg0); end - - # body texts of each column - # - # source://rdoc//lib/rdoc/markup/table.rb#13 - def body; end - - # body texts of each column - # - # source://rdoc//lib/rdoc/markup/table.rb#13 - def body=(_arg0); end - - # headers of each column - # - # source://rdoc//lib/rdoc/markup/table.rb#7 - def header; end - - # headers of each column - # - # source://rdoc//lib/rdoc/markup/table.rb#7 - def header=(_arg0); end - - # source://rdoc//lib/rdoc/markup/table.rb#32 - def pretty_print(q); end -end - -# Outputs RDoc markup with vibrant ANSI color! -# -# source://rdoc//lib/rdoc/markup/to_ansi.rb#5 -class RDoc::Markup::ToAnsi < ::RDoc::Markup::ToRdoc - # Creates a new ToAnsi visitor that is ready to output vibrant ANSI color! - # - # @return [ToAnsi] a new instance of ToAnsi - # - # source://rdoc//lib/rdoc/markup/to_ansi.rb#10 - def initialize(markup = T.unsafe(nil)); end - - # Overrides indent width to ensure output lines up correctly. - # - # source://rdoc//lib/rdoc/markup/to_ansi.rb#31 - def accept_list_item_end(list_item); end - - # Adds coloring to note and label list items - # - # source://rdoc//lib/rdoc/markup/to_ansi.rb#55 - def accept_list_item_start(list_item); end - - # Maps attributes to ANSI sequences - # - # source://rdoc//lib/rdoc/markup/to_ansi.rb#22 - def init_tags; end - - # Starts accepting with a reset screen - # - # source://rdoc//lib/rdoc/markup/to_ansi.rb#87 - def start_accepting; end -end - -# Outputs RDoc markup with hot backspace action! You will probably need a -# pager to use this output format. -# -# This formatter won't work on 1.8.6 because it lacks String#chars. -# -# source://rdoc//lib/rdoc/markup/to_bs.rb#8 -class RDoc::Markup::ToBs < ::RDoc::Markup::ToRdoc - # Returns a new ToBs that is ready for hot backspace action! - # - # @return [ToBs] a new instance of ToBs - # - # source://rdoc//lib/rdoc/markup/to_bs.rb#13 - def initialize(markup = T.unsafe(nil)); end - - # Makes heading text bold. - # - # source://rdoc//lib/rdoc/markup/to_bs.rb#33 - def accept_heading(heading); end - - # Prepares the visitor for consuming +list_item+ - # - # source://rdoc//lib/rdoc/markup/to_bs.rb#46 - def accept_list_item_start(list_item); end - - # Turns on or off regexp handling for +convert_string+ - # - # source://rdoc//lib/rdoc/markup/to_bs.rb#71 - def annotate(tag); end - - # Calls convert_string on the result of convert_regexp_handling - # - # source://rdoc//lib/rdoc/markup/to_bs.rb#84 - def convert_regexp_handling(target); end - - # Adds bold or underline mixed with backspaces - # - # source://rdoc//lib/rdoc/markup/to_bs.rb#91 - def convert_string(string); end - - # Sets a flag that is picked up by #annotate to do the right thing in - # #convert_string - # - # source://rdoc//lib/rdoc/markup/to_bs.rb#24 - def init_tags; end -end - -# Outputs RDoc markup as HTML. -# -# source://rdoc//lib/rdoc/markup/to_html.rb#7 -class RDoc::Markup::ToHtml < ::RDoc::Markup::Formatter - include ::RDoc::Text - - # Creates a new formatter that will output HTML - # - # @return [ToHtml] a new instance of ToHtml - # - # source://rdoc//lib/rdoc/markup/to_html.rb#45 - def initialize(options, markup = T.unsafe(nil)); end - - # Adds +blank_line+ to the output - # - # source://rdoc//lib/rdoc/markup/to_html.rb#291 - def accept_blank_line(blank_line); end - - # Adds +block_quote+ to the output - # - # source://rdoc//lib/rdoc/markup/to_html.rb#190 - def accept_block_quote(block_quote); end - - # Adds +heading+ to the output. The headings greater than 6 are trimmed to - # level 6. - # - # source://rdoc//lib/rdoc/markup/to_html.rb#299 - def accept_heading(heading); end - - # Finishes consumption of +list+ - # - # source://rdoc//lib/rdoc/markup/to_html.rb#262 - def accept_list_end(list); end - - # Finishes consumption of +list_item+ - # - # source://rdoc//lib/rdoc/markup/to_html.rb#284 - def accept_list_item_end(list_item); end - - # Prepares the visitor for consuming +list_item+ - # - # source://rdoc//lib/rdoc/markup/to_html.rb#273 - def accept_list_item_start(list_item); end - - # Prepares the visitor for consuming +list+ - # - # source://rdoc//lib/rdoc/markup/to_html.rb#253 - def accept_list_start(list); end - - # Adds +paragraph+ to the output - # - # source://rdoc//lib/rdoc/markup/to_html.rb#203 - def accept_paragraph(paragraph); end - - # Adds +raw+ to the output - # - # source://rdoc//lib/rdoc/markup/to_html.rb#320 - def accept_raw(raw); end - - # Adds +rule+ to the output - # - # source://rdoc//lib/rdoc/markup/to_html.rb#246 - def accept_rule(rule); end - - # Adds +table+ to the output - # - # source://rdoc//lib/rdoc/markup/to_html.rb#327 - def accept_table(header, body, aligns); end - - # Adds +verbatim+ to the output - # - # source://rdoc//lib/rdoc/markup/to_html.rb#216 - def accept_verbatim(verbatim); end - - # The RDoc::CodeObject HTML is being generated for. This is used to - # generate namespaced URI fragments - # - # source://rdoc//lib/rdoc/markup/to_html.rb#33 - def code_object; end - - # The RDoc::CodeObject HTML is being generated for. This is used to - # generate namespaced URI fragments - # - # source://rdoc//lib/rdoc/markup/to_html.rb#33 - def code_object=(_arg0); end - - # CGI-escapes +text+ - # - # source://rdoc//lib/rdoc/markup/to_html.rb#352 - def convert_string(text); end - - # Returns the generated output - # - # source://rdoc//lib/rdoc/markup/to_html.rb#183 - def end_accepting; end - - # Path to this document for relative links - # - # source://rdoc//lib/rdoc/markup/to_html.rb#38 - def from_path; end - - # Path to this document for relative links - # - # source://rdoc//lib/rdoc/markup/to_html.rb#38 - def from_path=(_arg0); end - - # Generate a link to +url+ with content +text+. Handles the special cases - # for img: and link: described under handle_regexp_HYPERLINK - # - # source://rdoc//lib/rdoc/markup/to_html.rb#360 - def gen_url(url, text); end - - # source://rdoc//lib/rdoc/markup/to_html.rb#85 - def handle_RDOCLINK(url); end - - # +target+ is a
- # - # source://rdoc//lib/rdoc/markup/to_html.rb#110 - def handle_regexp_HARD_BREAK(target); end - - # +target+ is a potential link. The following schemes are handled: - # - # mailto::: - # Inserted as-is. - # http::: - # Links are checked to see if they reference an image. If so, that image - # gets inserted using an tag. Otherwise a conventional - # is used. - # link::: - # Reference to a local file relative to the output directory. - # - # source://rdoc//lib/rdoc/markup/to_html.rb#126 - def handle_regexp_HYPERLINK(target); end - - # +target+ is an rdoc-schemed link that will be converted into a hyperlink. - # - # For the +rdoc-ref+ scheme the named reference will be returned without - # creating a link. - # - # For the +rdoc-label+ scheme the footnote and label prefixes are stripped - # when creating a link. All other contents will be linked verbatim. - # - # source://rdoc//lib/rdoc/markup/to_html.rb#141 - def handle_regexp_RDOCLINK(target); end - - # This +target+ is a link where the label is different from the URL - # label[url] or {long label}[url] - # - # source://rdoc//lib/rdoc/markup/to_html.rb#149 - def handle_regexp_TIDYLINK(target); end - - # Determines the HTML list element for +list_type+ and +open_tag+ - # - # @raise [RDoc::Error] - # - # source://rdoc//lib/rdoc/markup/to_html.rb#385 - def html_list_name(list_type, open_tag); end - - # source://rdoc//lib/rdoc/markup/to_html.rb#26 - def in_list_entry; end - - # Adds regexp handlings about link notations. - # - # source://rdoc//lib/rdoc/markup/to_html.rb#80 - def init_link_notation_regexp_handlings; end - - # Adds regexp handlings. - # - # source://rdoc//lib/rdoc/markup/to_html.rb#70 - def init_regexp_handlings; end - - # Maps attributes to HTML tags - # - # source://rdoc//lib/rdoc/markup/to_html.rb#394 - def init_tags; end - - # source://rdoc//lib/rdoc/markup/to_html.rb#27 - def list; end - - # Returns the HTML end-tag for +list_type+ - # - # source://rdoc//lib/rdoc/markup/to_html.rb#420 - def list_end_for(list_type); end - - # Returns the HTML tag for +list_type+, possible using a label from - # +list_item+ - # - # source://rdoc//lib/rdoc/markup/to_html.rb#404 - def list_item_start(list_item, list_type); end - - # Returns true if text is valid ruby syntax - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/markup/to_html.rb#434 - def parseable?(text); end - - # source://rdoc//lib/rdoc/markup/to_html.rb#25 - def res; end - - # Prepares the visitor for HTML generation - # - # source://rdoc//lib/rdoc/markup/to_html.rb#174 - def start_accepting; end - - # Converts +item+ to HTML using RDoc::Text#to_html - # - # source://rdoc//lib/rdoc/markup/to_html.rb#448 - def to_html(item); end -end - -# source://rdoc//lib/rdoc/markup/to_html.rb#65 -RDoc::Markup::ToHtml::URL_CHARACTERS_REGEXP_STR = T.let(T.unsafe(nil), String) - -# Subclass of the RDoc::Markup::ToHtml class that supports looking up method -# names, classes, etc to create links. RDoc::CrossReference is used to -# generate those links based on the current context. -# -# source://rdoc//lib/rdoc/markup/to_html_crossref.rb#7 -class RDoc::Markup::ToHtmlCrossref < ::RDoc::Markup::ToHtml - # Creates a new crossref resolver that generates links relative to +context+ - # which lives at +from_path+ in the generated files. '#' characters on - # references are removed unless +show_hash+ is true. Only method names - # preceded by '#' or '::' are linked, unless +hyperlink_all+ is true. - # - # @raise [ArgumentError] - # @return [ToHtmlCrossref] a new instance of ToHtmlCrossref - # - # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#32 - def initialize(options, from_path, context, markup = T.unsafe(nil)); end - - # RDoc::CodeObject for generating references - # - # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#19 - def context; end - - # RDoc::CodeObject for generating references - # - # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#19 - def context=(_arg0); end - - # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#187 - def convert_flow(flow); end - - # Creates a link to the reference +name+ if the name exists. If +text+ is - # given it is used as the link text, otherwise +name+ is used. - # - # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#61 - def cross_reference(name, text = T.unsafe(nil), code = T.unsafe(nil), rdoc_ref: T.unsafe(nil)); end - - # Generates links for rdoc-ref: scheme URLs and allows - # RDoc::Markup::ToHtml to handle other schemes. - # - # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#138 - def gen_url(url, text); end - - # We're invoked when any text matches the CROSSREF pattern. If we find the - # corresponding reference, generate a link. If the name we're looking for - # contains no punctuation, we look for it up the module/class chain. For - # example, ToHtml is found, even without the RDoc::Markup:: prefix, - # because we look for it in module Markup first. - # - # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#83 - def handle_regexp_CROSSREF(target); end - - # Handles rdoc-ref: scheme links and allows RDoc::Markup::ToHtml to - # handle other schemes. - # - # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#104 - def handle_regexp_HYPERLINK(target); end - - # +target+ is an rdoc-schemed link that will be converted into a hyperlink. - # For the rdoc-ref scheme the cross-reference will be looked up and the - # given name will be used. - # - # All other contents are handled by - # {the superclass}[rdoc-ref:RDoc::Markup::ToHtml#handle_regexp_RDOCLINK] - # - # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#123 - def handle_regexp_RDOCLINK(target); end - - # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#46 - def init_link_notation_regexp_handlings; end - - # Creates an HTML link to +name+ with the given +text+. - # - # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#150 - def link(name, text, code = T.unsafe(nil), rdoc_ref: T.unsafe(nil)); end - - # Should we show '#' characters on method references? - # - # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#24 - def show_hash; end - - # Should we show '#' characters on method references? - # - # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#24 - def show_hash=(_arg0); end -end - -# Outputs RDoc markup as paragraphs with inline markup only. -# -# source://rdoc//lib/rdoc/markup/to_html_snippet.rb#5 -class RDoc::Markup::ToHtmlSnippet < ::RDoc::Markup::ToHtml - # Creates a new ToHtmlSnippet formatter that will cut off the input on the - # next word boundary after the given number of +characters+ or +paragraphs+ - # of text have been encountered. - # - # @return [ToHtmlSnippet] a new instance of ToHtmlSnippet - # - # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#37 - def initialize(options, characters = T.unsafe(nil), paragraphs = T.unsafe(nil), markup = T.unsafe(nil)); end - - # Adds +heading+ to the output as a paragraph - # - # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#53 - def accept_heading(heading); end - - # Finishes consumption of +list_item+ - # - # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#85 - def accept_list_item_end(list_item); end - - # Prepares the visitor for consuming +list_item+ - # - # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#91 - def accept_list_item_start(list_item); end - - # Prepares the visitor for consuming +list+ - # - # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#98 - def accept_list_start(list); end - - # Adds +paragraph+ to the output - # - # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#72 - def accept_paragraph(paragraph); end - - # Raw sections are untrusted and ignored - # - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_raw(*node); end - - # Rules are ignored - # - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_rule(*node); end - - # Adds +verbatim+ to the output - # - # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#107 - def accept_verbatim(verbatim); end - - # Throws +:done+ when paragraph_limit paragraphs have been encountered - # - # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#198 - def add_paragraph; end - - # After this many characters the input will be cut off. - # - # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#10 - def character_limit; end - - # The number of characters seen so far. - # - # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#15 - def characters; end - - # Marks up +content+ - # - # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#207 - def convert(content); end - - # Converts flow items +flow+ - # - # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#218 - def convert_flow(flow); end - - # Returns just the text of +link+, +url+ is only used to determine the link - # type. - # - # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#171 - def gen_url(url, text); end - - # Removes escaping from the cross-references in +target+ - # - # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#131 - def handle_regexp_CROSSREF(target); end - - # +target+ is a
- # - # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#138 - def handle_regexp_HARD_BREAK(target); end - - # In snippets, there are no lists - # - # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#191 - def html_list_name(list_type, open_tag); end - - # Lists are paragraphs, but notes and labels have a separator - # - # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#146 - def list_item_start(list_item, list_type); end - - # The attribute bitmask - # - # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#20 - def mask; end - - # Maintains a bitmask to allow HTML elements to be closed properly. See - # RDoc::Markup::Formatter. - # - # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#264 - def off_tags(res, item); end - - # Maintains a bitmask to allow HTML elements to be closed properly. See - # RDoc::Markup::Formatter. - # - # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#254 - def on_tags(res, item); end - - # After this many paragraphs the input will be cut off. - # - # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#25 - def paragraph_limit; end - - # Count of paragraphs found - # - # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#30 - def paragraphs; end - - # Prepares the visitor for HTML snippet generation - # - # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#122 - def start_accepting; end - - # Truncates +text+ at the end of the first word after the character_limit. - # - # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#273 - def truncate(text); end -end - -# Joins the parts of an RDoc::Markup::Paragraph into a single String. -# -# This allows for easier maintenance and testing of Markdown support. -# -# This formatter only works on Paragraph instances. Attempting to process -# other markup syntax items will not work. -# -# source://rdoc//lib/rdoc/markup/to_joined_paragraph.rb#10 -class RDoc::Markup::ToJoinedParagraph < ::RDoc::Markup::Formatter - # @return [ToJoinedParagraph] a new instance of ToJoinedParagraph - # - # source://rdoc//lib/rdoc/markup/to_joined_paragraph.rb#12 - def initialize; end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_block_quote(*node); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_heading(*node); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_list_end(*node); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_list_item_end(*node); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_list_item_start(*node); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_list_start(*node); end - - # Converts the parts of +paragraph+ to a single entry. - # - # source://rdoc//lib/rdoc/markup/to_joined_paragraph.rb#25 - def accept_paragraph(paragraph); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_raw(*node); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_rule(*node); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_table(*node); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_verbatim(*node); end - - # source://rdoc//lib/rdoc/markup/to_joined_paragraph.rb#19 - def end_accepting; end - - # source://rdoc//lib/rdoc/markup/to_joined_paragraph.rb#16 - def start_accepting; end -end - -# Creates HTML-safe labels suitable for use in id attributes. Tidylinks are -# converted to their link part and cross-reference links have the suppression -# marks removed (\\SomeClass is converted to SomeClass). -# -# source://rdoc//lib/rdoc/markup/to_label.rb#9 -class RDoc::Markup::ToLabel < ::RDoc::Markup::Formatter - # Creates a new formatter that will output HTML-safe labels - # - # @return [ToLabel] a new instance of ToLabel - # - # source://rdoc//lib/rdoc/markup/to_label.rb#16 - def initialize(markup = T.unsafe(nil)); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_blank_line(*node); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_block_quote(*node); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_heading(*node); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_list_end(*node); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_list_item_end(*node); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_list_item_start(*node); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_list_start(*node); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_paragraph(*node); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_raw(*node); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_rule(*node); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_verbatim(*node); end - - # Converts +text+ to an HTML-safe label - # - # source://rdoc//lib/rdoc/markup/to_label.rb#32 - def convert(text); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def end_accepting(*node); end - - # Converts the CROSSREF +target+ to plain text, removing the suppression - # marker, if any - # - # source://rdoc//lib/rdoc/markup/to_label.rb#42 - def handle_regexp_CROSSREF(target); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def handle_regexp_HARD_BREAK(*node); end - - # Converts the TIDYLINK +target+ to just the text part - # - # source://rdoc//lib/rdoc/markup/to_label.rb#51 - def handle_regexp_TIDYLINK(target); end - - # source://rdoc//lib/rdoc/markup/to_label.rb#11 - def res; end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def start_accepting(*node); end -end - -# Outputs parsed markup as Markdown -# -# source://rdoc//lib/rdoc/markup/to_markdown.rb#7 -class RDoc::Markup::ToMarkdown < ::RDoc::Markup::ToRdoc - # Creates a new formatter that will output Markdown format text - # - # @return [ToMarkdown] a new instance of ToMarkdown - # - # source://rdoc//lib/rdoc/markup/to_markdown.rb#12 - def initialize(markup = T.unsafe(nil)); end - - # Finishes consumption of `list` - # - # source://rdoc//lib/rdoc/markup/to_markdown.rb#47 - def accept_list_end(list); end - - # Finishes consumption of `list_item` - # - # source://rdoc//lib/rdoc/markup/to_markdown.rb#54 - def accept_list_item_end(list_item); end - - # Prepares the visitor for consuming `list_item` - # - # source://rdoc//lib/rdoc/markup/to_markdown.rb#75 - def accept_list_item_start(list_item); end - - # Prepares the visitor for consuming `list` - # - # source://rdoc//lib/rdoc/markup/to_markdown.rb#100 - def accept_list_start(list); end - - # Adds `rule` to the output - # - # source://rdoc//lib/rdoc/markup/to_markdown.rb#117 - def accept_rule(rule); end - - # Outputs `verbatim` indented 4 columns - # - # source://rdoc//lib/rdoc/markup/to_markdown.rb#126 - def accept_verbatim(verbatim); end - - # Creates a Markdown-style URL from +url+ with +text+. - # - # source://rdoc//lib/rdoc/markup/to_markdown.rb#140 - def gen_url(url, text); end - - # Handles rdoc- type links for footnotes. - # - # source://rdoc//lib/rdoc/markup/to_markdown.rb#149 - def handle_rdoc_link(url); end - - # Adds a newline to the output - # - # source://rdoc//lib/rdoc/markup/to_markdown.rb#40 - def handle_regexp_HARD_BREAK(target); end - - # Converts the rdoc-...: links into a Markdown.style links. - # - # source://rdoc//lib/rdoc/markup/to_markdown.rb#187 - def handle_regexp_RDOCLINK(target); end - - # Converts the RDoc markup tidylink into a Markdown.style link. - # - # source://rdoc//lib/rdoc/markup/to_markdown.rb#169 - def handle_regexp_TIDYLINK(target); end - - # Maps attributes to HTML sequences - # - # source://rdoc//lib/rdoc/markup/to_markdown.rb#31 - def init_tags; end -end - -# Outputs RDoc markup as RDoc markup! (mostly) -# -# source://rdoc//lib/rdoc/markup/to_rdoc.rb#5 -class RDoc::Markup::ToRdoc < ::RDoc::Markup::Formatter - # Creates a new formatter that will output (mostly) \RDoc markup - # - # @return [ToRdoc] a new instance of ToRdoc - # - # source://rdoc//lib/rdoc/markup/to_rdoc.rb#45 - def initialize(markup = T.unsafe(nil)); end - - # Adds +blank_line+ to the output - # - # source://rdoc//lib/rdoc/markup/to_rdoc.rb#77 - def accept_blank_line(blank_line); end - - # Adds +paragraph+ to the output - # - # source://rdoc//lib/rdoc/markup/to_rdoc.rb#84 - def accept_block_quote(block_quote); end - - # Adds +heading+ to the output - # - # source://rdoc//lib/rdoc/markup/to_rdoc.rb#99 - def accept_heading(heading); end - - # Adds +paragraph+ to the output - # - # source://rdoc//lib/rdoc/markup/to_rdoc.rb#211 - def accept_indented_paragraph(paragraph); end - - # Finishes consumption of +list+ - # - # source://rdoc//lib/rdoc/markup/to_rdoc.rb#110 - def accept_list_end(list); end - - # Finishes consumption of +list_item+ - # - # source://rdoc//lib/rdoc/markup/to_rdoc.rb#119 - def accept_list_item_end(list_item); end - - # Prepares the visitor for consuming +list_item+ - # - # source://rdoc//lib/rdoc/markup/to_rdoc.rb#143 - def accept_list_item_start(list_item); end - - # Prepares the visitor for consuming +list+ - # - # source://rdoc//lib/rdoc/markup/to_rdoc.rb#176 - def accept_list_start(list); end - - # Adds +paragraph+ to the output - # - # source://rdoc//lib/rdoc/markup/to_rdoc.rb#203 - def accept_paragraph(paragraph); end - - # Adds +raw+ to the output - # - # source://rdoc//lib/rdoc/markup/to_rdoc.rb#221 - def accept_raw(raw); end - - # Adds +rule+ to the output - # - # source://rdoc//lib/rdoc/markup/to_rdoc.rb#228 - def accept_rule(rule); end - - # Adds +table+ to the output - # - # source://rdoc//lib/rdoc/markup/to_rdoc.rb#251 - def accept_table(header, body, aligns); end - - # Outputs +verbatim+ indented 2 columns - # - # source://rdoc//lib/rdoc/markup/to_rdoc.rb#237 - def accept_verbatim(verbatim); end - - # Applies attribute-specific markup to +text+ using RDoc::AttributeManager - # - # source://rdoc//lib/rdoc/markup/to_rdoc.rb#279 - def attributes(text); end - - # Returns the generated output - # - # source://rdoc//lib/rdoc/markup/to_rdoc.rb#287 - def end_accepting; end - - # Adds a newline to the output - # - # source://rdoc//lib/rdoc/markup/to_rdoc.rb#303 - def handle_regexp_HARD_BREAK(target); end - - # Removes preceding \\ from the suppressed crossref +target+ - # - # source://rdoc//lib/rdoc/markup/to_rdoc.rb#294 - def handle_regexp_SUPPRESSED_CROSSREF(target); end - - # Current indent amount for output in characters - # - # source://rdoc//lib/rdoc/markup/to_rdoc.rb#10 - def indent; end - - # Current indent amount for output in characters - # - # source://rdoc//lib/rdoc/markup/to_rdoc.rb#10 - def indent=(_arg0); end - - # Maps attributes to HTML sequences - # - # source://rdoc//lib/rdoc/markup/to_rdoc.rb#68 - def init_tags; end - - # Stack of current list indexes for alphabetic and numeric lists - # - # source://rdoc//lib/rdoc/markup/to_rdoc.rb#20 - def list_index; end - - # Stack of list types - # - # source://rdoc//lib/rdoc/markup/to_rdoc.rb#25 - def list_type; end - - # Stack of list widths for indentation - # - # source://rdoc//lib/rdoc/markup/to_rdoc.rb#30 - def list_width; end - - # Prefix for the next list item. See #use_prefix - # - # source://rdoc//lib/rdoc/markup/to_rdoc.rb#35 - def prefix; end - - # Output accumulator - # - # source://rdoc//lib/rdoc/markup/to_rdoc.rb#40 - def res; end - - # Prepares the visitor for text generation - # - # source://rdoc//lib/rdoc/markup/to_rdoc.rb#310 - def start_accepting; end - - # Adds the stored #prefix to the output and clears it. Lists generate a - # prefix for later consumption. - # - # source://rdoc//lib/rdoc/markup/to_rdoc.rb#324 - def use_prefix; end - - # Output width in characters - # - # source://rdoc//lib/rdoc/markup/to_rdoc.rb#15 - def width; end - - # Output width in characters - # - # source://rdoc//lib/rdoc/markup/to_rdoc.rb#15 - def width=(_arg0); end - - # Wraps +text+ to #width - # - # source://rdoc//lib/rdoc/markup/to_rdoc.rb#334 - def wrap(text); end -end - -# Extracts just the RDoc::Markup::Heading elements from a -# RDoc::Markup::Document to help build a table of contents -# -# source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#6 -class RDoc::Markup::ToTableOfContents < ::RDoc::Markup::Formatter - # @return [ToTableOfContents] a new instance of ToTableOfContents - # - # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#27 - def initialize; end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_blank_line(*node); end - - # :stopdoc: - # - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_block_quote(*node); end - - # Adds +document+ to the output, using its heading cutoff if present - # - # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#36 - def accept_document(document); end - - # Adds +heading+ to the table of contents - # - # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#45 - def accept_heading(heading); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_list_end(*node); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_list_end_bullet(*node); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_list_item_end(*node); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_list_item_start(*node); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_list_start(*node); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_paragraph(*node); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_raw(*node); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_rule(*node); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_table(*node); end - - # source://rdoc//lib/rdoc/markup/formatter.rb#188 - def accept_verbatim(*node); end - - # Returns the table of contents - # - # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#52 - def end_accepting; end - - # Omits headings with a level less than the given level. - # - # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#25 - def omit_headings_below; end - - # Omits headings with a level less than the given level. - # - # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#25 - def omit_headings_below=(_arg0); end - - # Output accumulator - # - # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#20 - def res; end - - # Prepares the visitor for text generation - # - # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#59 - def start_accepting; end - - # Returns true if +heading+ is below the display threshold - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#67 - def suppressed?(heading); end - - class << self - # Singleton for table-of-contents generation - # - # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#13 - def to_toc; end - end -end - -# This Markup outputter is used for testing purposes. -# -# source://rdoc//lib/rdoc/markup/to_test.rb#5 -class RDoc::Markup::ToTest < ::RDoc::Markup::Formatter - # source://rdoc//lib/rdoc/markup/to_test.rb#55 - def accept_blank_line(blank_line); end - - # source://rdoc//lib/rdoc/markup/to_test.rb#59 - def accept_heading(heading); end - - # source://rdoc//lib/rdoc/markup/to_test.rb#44 - def accept_list_end(list); end - - # source://rdoc//lib/rdoc/markup/to_test.rb#52 - def accept_list_item_end(list_item); end - - # source://rdoc//lib/rdoc/markup/to_test.rb#48 - def accept_list_item_start(list_item); end - - # source://rdoc//lib/rdoc/markup/to_test.rb#33 - def accept_list_start(list); end - - # source://rdoc//lib/rdoc/markup/to_test.rb#21 - def accept_paragraph(paragraph); end - - # source://rdoc//lib/rdoc/markup/to_test.rb#25 - def accept_raw(raw); end - - # source://rdoc//lib/rdoc/markup/to_test.rb#63 - def accept_rule(rule); end - - # source://rdoc//lib/rdoc/markup/to_test.rb#29 - def accept_verbatim(verbatim); end - - # source://rdoc//lib/rdoc/markup/to_test.rb#17 - def end_accepting; end - - # :section: Visitor - # - # source://rdoc//lib/rdoc/markup/to_test.rb#12 - def start_accepting; end -end - -# Extracts sections of text enclosed in plus, tt or code. Used to discover -# undocumented parameters. -# -# source://rdoc//lib/rdoc/markup/to_tt_only.rb#6 -class RDoc::Markup::ToTtOnly < ::RDoc::Markup::Formatter - # Creates a new tt-only formatter. - # - # @return [ToTtOnly] a new instance of ToTtOnly - # - # source://rdoc//lib/rdoc/markup/to_tt_only.rb#21 - def initialize(markup = T.unsafe(nil)); end - - # Does nothing to +markup_item+ because it doesn't have any user-built - # content - # - # source://rdoc//lib/rdoc/markup/to_tt_only.rb#71 - def accept_blank_line(markup_item); end - - # Adds tts from +block_quote+ to the output - # - # source://rdoc//lib/rdoc/markup/to_tt_only.rb#30 - def accept_block_quote(block_quote); end - - # Does nothing to +markup_item+ because it doesn't have any user-built - # content - # - # source://rdoc//lib/rdoc/markup/to_tt_only.rb#71 - def accept_heading(markup_item); end - - # Pops the list type for +list+ from #list_type - # - # source://rdoc//lib/rdoc/markup/to_tt_only.rb#37 - def accept_list_end(list); end - - # Does nothing to +markup_item+ because it doesn't have any user-built - # content - # - # source://rdoc//lib/rdoc/markup/to_tt_only.rb#71 - def accept_list_item_end(markup_item); end - - # Prepares the visitor for consuming +list_item+ - # - # source://rdoc//lib/rdoc/markup/to_tt_only.rb#51 - def accept_list_item_start(list_item); end - - # Pushes the list type for +list+ onto #list_type - # - # source://rdoc//lib/rdoc/markup/to_tt_only.rb#44 - def accept_list_start(list); end - - # Adds +paragraph+ to the output - # - # source://rdoc//lib/rdoc/markup/to_tt_only.rb#63 - def accept_paragraph(paragraph); end - - # Does nothing to +markup_item+ because it doesn't have any user-built - # content - # - # source://rdoc//lib/rdoc/markup/to_tt_only.rb#71 - def accept_raw(markup_item); end - - # Does nothing to +markup_item+ because it doesn't have any user-built - # content - # - # source://rdoc//lib/rdoc/markup/to_tt_only.rb#71 - def accept_rule(markup_item); end - - # Does nothing to +markup_item+ because it doesn't have any user-built - # content - # - # source://rdoc//lib/rdoc/markup/to_tt_only.rb#71 - def accept_verbatim(markup_item); end - - # Does nothing to +markup_item+ because it doesn't have any user-built - # content - # - # source://rdoc//lib/rdoc/markup/to_tt_only.rb#71 - def do_nothing(markup_item); end - - # Returns an Array of items that were wrapped in plus, tt or code. - # - # source://rdoc//lib/rdoc/markup/to_tt_only.rb#107 - def end_accepting; end - - # Stack of list types - # - # source://rdoc//lib/rdoc/markup/to_tt_only.rb#11 - def list_type; end - - # Output accumulator - # - # source://rdoc//lib/rdoc/markup/to_tt_only.rb#16 - def res; end - - # Prepares the visitor for gathering tt sections - # - # source://rdoc//lib/rdoc/markup/to_tt_only.rb#114 - def start_accepting; end - - # Extracts tt sections from +text+ - # - # source://rdoc//lib/rdoc/markup/to_tt_only.rb#84 - def tt_sections(text); end -end - -# A section of verbatim text -# -# source://rdoc//lib/rdoc/markup/verbatim.rb#5 -class RDoc::Markup::Verbatim < ::RDoc::Markup::Raw - # @return [Verbatim] a new instance of Verbatim - # - # source://rdoc//lib/rdoc/markup/verbatim.rb#12 - def initialize(*parts); end - - # source://rdoc//lib/rdoc/markup/verbatim.rb#18 - def ==(other); end - - # Calls #accept_verbatim on +visitor+ - # - # source://rdoc//lib/rdoc/markup/verbatim.rb#25 - def accept(visitor); end - - # Format of this verbatim section - # - # source://rdoc//lib/rdoc/markup/verbatim.rb#10 - def format; end - - # Format of this verbatim section - # - # source://rdoc//lib/rdoc/markup/verbatim.rb#10 - def format=(_arg0); end - - # Collapses 3+ newlines into two newlines - # - # source://rdoc//lib/rdoc/markup/verbatim.rb#32 - def normalize; end - - # source://rdoc//lib/rdoc/markup/verbatim.rb#53 - def pretty_print(q); end - - # Is this verbatim section Ruby code? - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/markup/verbatim.rb#71 - def ruby?; end - - # The text of the section - # - # source://rdoc//lib/rdoc/markup/verbatim.rb#79 - def text; end -end - -# Abstract class representing either a method or an attribute. -# -# source://rdoc//lib/rdoc/code_object/method_attr.rb#5 -class RDoc::MethodAttr < ::RDoc::CodeObject - include ::Comparable - - # Creates a new MethodAttr from token stream +text+ and method or attribute - # name +name+. - # - # Usually this is called by super from a subclass. - # - # @return [MethodAttr] a new instance of MethodAttr - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#78 - def initialize(text, name); end - - # Order by #singleton then #name - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#113 - def <=>(other); end - - # source://rdoc//lib/rdoc/code_object/method_attr.rb#121 - def ==(other); end - - # Abstract method. Contexts in their building phase call this - # to register a new alias for this known method/attribute. - # - # - creates a new AnyMethod/Attribute named an_alias.new_name; - # - adds +self+ as an alias for the new method or attribute - # - adds the method or attribute to #aliases - # - adds the method or attribute to +context+. - # - # @raise [NotImplementedError] - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#209 - def add_alias(an_alias, context); end - - # Prepend +src+ with line numbers. Relies on the first line of a source - # code listing having: - # - # # File xxxxx, line dddd - # - # If it has this comment then line numbers are added to +src+ and the , - # line dddd portion of the comment is removed. - # - # source://rdoc//lib/rdoc/generator/markup.rb#77 - def add_line_numbers(src); end - - # Array of other names for this method/attribute - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#32 - def aliases; end - - # HTML fragment reference for this method - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#216 - def aref; end - - # Prefix for +aref+, defined by subclasses. - # - # @raise [NotImplementedError] - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#225 - def aref_prefix; end - - # The call_seq or the param_seq with method name, if there is no call_seq. - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#64 - def arglists; end - - # Parameters yielded by the called block - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#49 - def block_params; end - - # Attempts to sanitize the content passed by the Ruby parser: - # remove outer parentheses, etc. - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#233 - def block_params=(value); end - - # Different ways to call this method - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#59 - def call_seq; end - - # Different ways to call this method - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#59 - def call_seq=(_arg0); end - - # A method/attribute is documented if any of the following is true: - # - it has a comment; - # - it is an alias for a documented method; - # - it has a +#see+ method that is documented. - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#132 - def documented?; end - - # source://rdoc//lib/rdoc/code_object/method_attr.rb#178 - def find_method_or_attribute(name); end - - # source://rdoc//lib/rdoc/code_object/method_attr.rb#166 - def find_see; end - - # Full method/attribute name including namespace - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#300 - def full_name; end - - # HTML id-friendly method/attribute name - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#291 - def html_name; end - - # source://rdoc//lib/rdoc/code_object/method_attr.rb#105 - def initialize_visibility; end - - # source://rdoc//lib/rdoc/code_object/method_attr.rb#304 - def inspect; end - - # The method/attribute we're aliasing - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#37 - def is_alias_for; end - - # The method/attribute we're aliasing - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#37 - def is_alias_for=(_arg0); end - - # Turns the method's token stream into HTML. - # - # Prepends line numbers if +options.line_numbers+ is true. - # - # source://rdoc//lib/rdoc/generator/markup.rb#101 - def markup_code; end - - # Name of this method/attribute. - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#12 - def name; end - - # Name of this method/attribute. - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#12 - def name=(_arg0); end - - # source://rdoc//lib/rdoc/code_object/method_attr.rb#418 - def name_ord_range; end - - # '::' for a class method/attribute, '#' for an instance method. - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#319 - def name_prefix; end - - # Name for output to HTML. For class methods the full name with a "." is - # used like +SomeClass.method_name+. For instance methods the class name is - # used if +context+ does not match the parent. - # - # This is to help prevent people from using :: to call class methods. - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#330 - def output_name(context); end - - # Pretty parameter list for this method - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#69 - def param_seq; end - - # Parameters for this method - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#54 - def params; end - - # Parameters for this method - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#54 - def params=(_arg0); end - - # Name of our parent with special handling for un-marshaled methods - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#360 - def parent_name; end - - # Path to this method for use with HTML generator output. - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#353 - def path; end - - # Method/attribute name with class/instance indicator - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#339 - def pretty_name; end - - # source://rdoc//lib/rdoc/code_object/method_attr.rb#364 - def pretty_print(q); end - - # Used by RDoc::Generator::JsonIndex to create a record for the search - # engine. - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#398 - def search_record; end - - # A method/attribute to look at, - # in particular if this method/attribute has no documentation. - # - # It can be a method/attribute of the superclass or of an included module, - # including the Kernel module, which is always appended to the included - # modules. - # - # Returns +nil+ if there is no such method/attribute. - # The +#is_alias_for+ method/attribute, if any, is not included. - # - # Templates may generate a "see also ..." if this method/attribute - # has documentation, and "see ..." if it does not. - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#152 - def see; end - - # Is this a singleton method/attribute? - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#22 - def singleton; end - - # Is this a singleton method/attribute? - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#22 - def singleton=(_arg0); end - - # Sets the store for this class or module and its contained code objects. - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#160 - def store=(store); end - - # Source file token stream - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#27 - def text; end - - # source://rdoc//lib/rdoc/code_object/method_attr.rb#410 - def to_s; end - - # Type of method/attribute (class or instance) - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#346 - def type; end - - # public, protected, private - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#17 - def visibility; end - - # public, protected, private - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#17 - def visibility=(_arg0); end - - private - - # Resets cached data for the object so it can be rebuilt by accessor methods - # - # source://rdoc//lib/rdoc/code_object/method_attr.rb#101 - def initialize_copy(other); end -end - -# A Mixin adds features from a module into another context. RDoc::Include and -# RDoc::Extend are both mixins. -# -# source://rdoc//lib/rdoc/code_object/mixin.rb#6 -class RDoc::Mixin < ::RDoc::CodeObject - # Creates a new Mixin for +name+ with +comment+ - # - # @return [Mixin] a new instance of Mixin - # - # source://rdoc//lib/rdoc/code_object/mixin.rb#16 - def initialize(name, comment); end - - # Mixins are sorted by name - # - # source://rdoc//lib/rdoc/code_object/mixin.rb#26 - def <=>(other); end - - # source://rdoc//lib/rdoc/code_object/mixin.rb#32 - def ==(other); end - - # source://rdoc//lib/rdoc/code_object/mixin.rb#32 - def eql?(other); end - - # Full name based on #module - # - # source://rdoc//lib/rdoc/code_object/mixin.rb#41 - def full_name; end - - # source://rdoc//lib/rdoc/code_object/mixin.rb#46 - def hash; end - - # source://rdoc//lib/rdoc/code_object/mixin.rb#50 - def inspect; end - - # Attempts to locate the included module object. Returns the name if not - # known. - # - # The scoping rules of Ruby to resolve the name of an included module are: - # - first look into the children of the current context; - # - if not found, look into the children of included modules, - # in reverse inclusion order; - # - if still not found, go up the hierarchy of names. - # - # This method has O(n!) behavior when the module calling - # include is referencing nonexistent modules. Avoid calling #module until - # after all the files are parsed. This behavior is due to ruby's constant - # lookup behavior. - # - # As of the beginning of October, 2011, no gem includes nonexistent modules. - # - # source://rdoc//lib/rdoc/code_object/mixin.rb#75 - def module; end - - # Name of included module - # - # source://rdoc//lib/rdoc/code_object/mixin.rb#11 - def name; end - - # Name of included module - # - # source://rdoc//lib/rdoc/code_object/mixin.rb#11 - def name=(_arg0); end - - # Sets the store for this class or module and its contained code objects. - # - # source://rdoc//lib/rdoc/code_object/mixin.rb#110 - def store=(store); end - - # source://rdoc//lib/rdoc/code_object/mixin.rb#116 - def to_s; end -end - -# A normal class, neither singleton nor anonymous -# -# source://rdoc//lib/rdoc/code_object/normal_class.rb#5 -class RDoc::NormalClass < ::RDoc::ClassModule - # The ancestors of this class including modules. Unlike Module#ancestors, - # this class is not included in the result. The result will contain both - # RDoc::ClassModules and Strings. - # - # source://rdoc//lib/rdoc/code_object/normal_class.rb#12 - def ancestors; end - - # source://rdoc//lib/rdoc/code_object/normal_class.rb#24 - def aref_prefix; end - - # The definition of this class, class MyClassName - # - # source://rdoc//lib/rdoc/code_object/normal_class.rb#31 - def definition; end - - # source://rdoc//lib/rdoc/code_object/normal_class.rb#35 - def direct_ancestors; end - - # source://rdoc//lib/rdoc/code_object/normal_class.rb#39 - def inspect; end - - # source://rdoc//lib/rdoc/code_object/normal_class.rb#56 - def pretty_print(q); end - - # source://rdoc//lib/rdoc/code_object/normal_class.rb#47 - def to_s; end -end - -# A normal module, like NormalClass -# -# source://rdoc//lib/rdoc/code_object/normal_module.rb#5 -class RDoc::NormalModule < ::RDoc::ClassModule - # source://rdoc//lib/rdoc/code_object/normal_module.rb#7 - def aref_prefix; end - - # The definition of this module, module MyModuleName - # - # source://rdoc//lib/rdoc/code_object/normal_module.rb#21 - def definition; end - - # source://rdoc//lib/rdoc/code_object/normal_module.rb#11 - def inspect; end - - # This is a module, returns true - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/code_object/normal_module.rb#28 - def module?; end - - # source://rdoc//lib/rdoc/code_object/normal_module.rb#32 - def pretty_print(q); end - - # Modules don't have one, raises NoMethodError - # - # @raise [NoMethodError] - # - # source://rdoc//lib/rdoc/code_object/normal_module.rb#69 - def superclass; end -end - -# RDoc::Options handles the parsing and storage of options -# -# == Saved Options -# -# You can save some options like the markup format in the -# .rdoc_options file in your gem. The easiest way to do this is: -# -# rdoc --markup tomdoc --write-options -# -# Which will automatically create the file and fill it with the options you -# specified. -# -# The following options will not be saved since they interfere with the user's -# preferences or with the normal operation of RDoc: -# -# * +--coverage-report+ -# * +--dry-run+ -# * +--encoding+ -# * +--force-update+ -# * +--format+ -# * +--pipe+ -# * +--quiet+ -# * +--template+ -# * +--verbose+ -# -# == Custom Options -# -# Generators can hook into RDoc::Options to add generator-specific command -# line options. -# -# When --format is encountered in ARGV, RDoc calls ::setup_options on -# the generator class to add extra options to the option parser. Options for -# custom generators must occur after --format. rdoc --help -# will list options for all installed generators. -# -# Example: -# -# class RDoc::Generator::Spellcheck -# RDoc::RDoc.add_generator self -# -# def self.setup_options rdoc_options -# op = rdoc_options.option_parser -# -# op.on('--spell-dictionary DICTIONARY', -# RDoc::Options::Path) do |dictionary| -# rdoc_options.spell_dictionary = dictionary -# end -# end -# end -# -# Of course, RDoc::Options does not respond to +spell_dictionary+ by default -# so you will need to add it: -# -# class RDoc::Options -# -# ## -# # The spell dictionary used by the spell-checking plugin. -# -# attr_accessor :spell_dictionary -# -# end -# -# == Option Validators -# -# OptionParser validators will validate and cast user input values. In -# addition to the validators that ship with OptionParser (String, Integer, -# Float, TrueClass, FalseClass, Array, Regexp, Date, Time, URI, etc.), -# RDoc::Options adds Path, PathArray and Template. -# -# source://rdoc//lib/rdoc/options.rb#75 -class RDoc::Options - # @return [Options] a new instance of Options - # - # source://rdoc//lib/rdoc/options.rb#366 - def initialize(loaded_options = T.unsafe(nil)); end - - # source://rdoc//lib/rdoc/options.rb#494 - def ==(other); end - - # Exclude the default patterns as well if true. - # - # source://rdoc//lib/rdoc/options.rb#360 - def apply_default_exclude; end - - # Words to be ignored in autolink cross-references - # - # source://rdoc//lib/rdoc/options.rb#364 - def autolink_excluded_words; end - - # Words to be ignored in autolink cross-references - # - # source://rdoc//lib/rdoc/options.rb#364 - def autolink_excluded_words=(_arg0); end - - # Character-set for HTML output. #encoding is preferred over #charset - # - # source://rdoc//lib/rdoc/options.rb#152 - def charset; end - - # Character-set for HTML output. #encoding is preferred over #charset - # - # source://rdoc//lib/rdoc/options.rb#152 - def charset=(_arg0); end - - # Check that the files on the command line exist - # - # source://rdoc//lib/rdoc/options.rb#521 - def check_files; end - - # Ensure only one generator is loaded - # - # source://rdoc//lib/rdoc/options.rb#542 - def check_generator; end - - # If true, only report on undocumented files - # - # source://rdoc//lib/rdoc/options.rb#244 - def coverage_report; end - - # If true, only report on undocumented files - # - # source://rdoc//lib/rdoc/options.rb#244 - def coverage_report=(_arg0); end - - # Set the title, but only if not already set. Used to set the title - # from a source file, so that a title set from the command line - # will have the priority. - # - # source://rdoc//lib/rdoc/options.rb#554 - def default_title=(string); end - - # If true, RDoc will not write any files. - # - # source://rdoc//lib/rdoc/options.rb#157 - def dry_run; end - - # If true, RDoc will not write any files. - # - # source://rdoc//lib/rdoc/options.rb#157 - def dry_run=(_arg0); end - - # Embed mixin methods, attributes, and constants into class documentation. Set via - # +--[no-]embed-mixins+ (Default is +false+.) - # - # source://rdoc//lib/rdoc/options.rb#356 - def embed_mixins; end - - # Embed mixin methods, attributes, and constants into class documentation. Set via - # +--[no-]embed-mixins+ (Default is +false+.) - # - # source://rdoc//lib/rdoc/options.rb#356 - def embed_mixins=(_arg0); end - - # The output encoding. All input files will be transcoded to this encoding. - # - # The default encoding is UTF-8. This is set via --encoding. - # - # source://rdoc//lib/rdoc/options.rb#164 - def encoding; end - - # The output encoding. All input files will be transcoded to this encoding. - # - # The default encoding is UTF-8. This is set via --encoding. - # - # source://rdoc//lib/rdoc/options.rb#164 - def encoding=(_arg0); end - - # Create a regexp for #exclude - # - # source://rdoc//lib/rdoc/options.rb#582 - def exclude; end - - # Files matching this pattern will be excluded - # - # source://rdoc//lib/rdoc/options.rb#169 - def exclude=(_arg0); end - - # The list of files to be processed - # - # source://rdoc//lib/rdoc/options.rb#174 - def files; end - - # The list of files to be processed - # - # source://rdoc//lib/rdoc/options.rb#174 - def files=(_arg0); end - - # Completes any unfinished option setup business such as filtering for - # existent files, creating a regexp for #exclude and setting a default - # #template. - # - # source://rdoc//lib/rdoc/options.rb#600 - def finish; end - - # Fixes the page_dir to be relative to the root_dir and adds the page_dir to - # the files list. - # - # source://rdoc//lib/rdoc/options.rb#641 - def finish_page_dir; end - - # Create the output even if the output directory does not look - # like an rdoc output directory - # - # source://rdoc//lib/rdoc/options.rb#180 - def force_output; end - - # Create the output even if the output directory does not look - # like an rdoc output directory - # - # source://rdoc//lib/rdoc/options.rb#180 - def force_output=(_arg0); end - - # Scan newer sources than the flag file if true. - # - # source://rdoc//lib/rdoc/options.rb#185 - def force_update; end - - # Scan newer sources than the flag file if true. - # - # source://rdoc//lib/rdoc/options.rb#185 - def force_update=(_arg0); end - - # Formatter to mark up text with - # - # source://rdoc//lib/rdoc/options.rb#190 - def formatter; end - - # Formatter to mark up text with - # - # source://rdoc//lib/rdoc/options.rb#190 - def formatter=(_arg0); end - - # Description of the output generator (set with the --format option) - # - # source://rdoc//lib/rdoc/options.rb#195 - def generator; end - - # Description of the output generator (set with the --format option) - # - # source://rdoc//lib/rdoc/options.rb#195 - def generator=(_arg0); end - - # Returns a properly-space list of generators and their descriptions. - # - # source://rdoc//lib/rdoc/options.rb#660 - def generator_descriptions; end - - # For #== - # - # source://rdoc//lib/rdoc/options.rb#200 - def generator_name; end - - # Loaded generator options. Used to prevent --help from loading the same - # options multiple times. - # - # source://rdoc//lib/rdoc/options.rb#206 - def generator_options; end - - # Loaded generator options. Used to prevent --help from loading the same - # options multiple times. - # - # source://rdoc//lib/rdoc/options.rb#206 - def generator_options=(_arg0); end - - # Old rdoc behavior: hyperlink all words that match a method name, - # even if not preceded by '#' or '::' - # - # source://rdoc//lib/rdoc/options.rb#212 - def hyperlink_all; end - - # Old rdoc behavior: hyperlink all words that match a method name, - # even if not preceded by '#' or '::' - # - # source://rdoc//lib/rdoc/options.rb#212 - def hyperlink_all=(_arg0); end - - # source://rdoc//lib/rdoc/options.rb#376 - def init_ivars; end - - # source://rdoc//lib/rdoc/options.rb#422 - def init_with(map); end - - # Include line numbers in the source code - # - # source://rdoc//lib/rdoc/options.rb#217 - def line_numbers; end - - # Include line numbers in the source code - # - # source://rdoc//lib/rdoc/options.rb#217 - def line_numbers=(_arg0); end - - # The output locale. - # - # source://rdoc//lib/rdoc/options.rb#222 - def locale; end - - # The output locale. - # - # source://rdoc//lib/rdoc/options.rb#222 - def locale=(_arg0); end - - # The directory where locale data live. - # - # source://rdoc//lib/rdoc/options.rb#227 - def locale_dir; end - - # The directory where locale data live. - # - # source://rdoc//lib/rdoc/options.rb#227 - def locale_dir=(_arg0); end - - # Name of the file, class or module to display in the initial index page (if - # not specified the first file we encounter is used) - # - # source://rdoc//lib/rdoc/options.rb#233 - def main_page; end - - # Name of the file, class or module to display in the initial index page (if - # not specified the first file we encounter is used) - # - # source://rdoc//lib/rdoc/options.rb#233 - def main_page=(_arg0); end - - # The markup format. - # One of: +rdoc+ (the default), +markdown+, +rd+, +tomdoc+. - # See {Markup Formats}[rdoc-ref:RDoc::Markup@Markup+Formats]. - # - # source://rdoc//lib/rdoc/options.rb#239 - def markup; end - - # The markup format. - # One of: +rdoc+ (the default), +markdown+, +rd+, +tomdoc+. - # See {Markup Formats}[rdoc-ref:RDoc::Markup@Markup+Formats]. - # - # source://rdoc//lib/rdoc/options.rb#239 - def markup=(_arg0); end - - # The name of the output directory - # - # source://rdoc//lib/rdoc/options.rb#249 - def op_dir; end - - # The name of the output directory - # - # source://rdoc//lib/rdoc/options.rb#249 - def op_dir=(_arg0); end - - # The OptionParser for this instance - # - # source://rdoc//lib/rdoc/options.rb#254 - def option_parser; end - - # The OptionParser for this instance - # - # source://rdoc//lib/rdoc/options.rb#254 - def option_parser=(_arg0); end - - # Output heading decorations? - # - # source://rdoc//lib/rdoc/options.rb#258 - def output_decoration; end - - # Output heading decorations? - # - # source://rdoc//lib/rdoc/options.rb#258 - def output_decoration=(_arg0); end - - # source://rdoc//lib/rdoc/options.rb#457 - def override(map); end - - # Directory where guides, FAQ, and other pages not associated with a class - # live. You may leave this unset if these are at the root of your project. - # - # source://rdoc//lib/rdoc/options.rb#264 - def page_dir; end - - # Directory where guides, FAQ, and other pages not associated with a class - # live. You may leave this unset if these are at the root of your project. - # - # source://rdoc//lib/rdoc/options.rb#264 - def page_dir=(_arg0); end - - # Parses command line options. - # - # source://rdoc//lib/rdoc/options.rb#686 - def parse(argv); end - - # Is RDoc in pipe mode? - # - # source://rdoc//lib/rdoc/options.rb#269 - def pipe; end - - # Is RDoc in pipe mode? - # - # source://rdoc//lib/rdoc/options.rb#269 - def pipe=(_arg0); end - - # Don't display progress as we process the files - # - # source://rdoc//lib/rdoc/options.rb#1258 - def quiet; end - - # Set quietness to +bool+ - # - # source://rdoc//lib/rdoc/options.rb#1265 - def quiet=(bool); end - - # Array of directories to search for files to satisfy an :include: - # - # source://rdoc//lib/rdoc/options.rb#274 - def rdoc_include; end - - # Array of directories to search for files to satisfy an :include: - # - # source://rdoc//lib/rdoc/options.rb#274 - def rdoc_include=(_arg0); end - - # Root of the source documentation will be generated for. Set this when - # building documentation outside the source directory. Defaults to the - # current directory. - # - # source://rdoc//lib/rdoc/options.rb#281 - def root; end - - # Root of the source documentation will be generated for. Set this when - # building documentation outside the source directory. Defaults to the - # current directory. - # - # source://rdoc//lib/rdoc/options.rb#281 - def root=(_arg0); end - - # Removes directories from +path+ that are outside the current directory - # - # source://rdoc//lib/rdoc/options.rb#1272 - def sanitize_path(path); end - - # Set up an output generator for the named +generator_name+. - # - # If the found generator responds to :setup_options it will be called with - # the options instance. This allows generators to add custom options or set - # default options. - # - # source://rdoc//lib/rdoc/options.rb#1299 - def setup_generator(generator_name = T.unsafe(nil)); end - - # Include the '#' at the front of hyperlinked instance method names - # - # source://rdoc//lib/rdoc/options.rb#286 - def show_hash; end - - # Include the '#' at the front of hyperlinked instance method names - # - # source://rdoc//lib/rdoc/options.rb#286 - def show_hash=(_arg0); end - - # Indicates if files of test suites should be skipped - # - # source://rdoc//lib/rdoc/options.rb#351 - def skip_tests; end - - # Indicates if files of test suites should be skipped - # - # source://rdoc//lib/rdoc/options.rb#351 - def skip_tests=(_arg0); end - - # Directory to copy static files from - # - # source://rdoc//lib/rdoc/options.rb#291 - def static_path; end - - # Directory to copy static files from - # - # source://rdoc//lib/rdoc/options.rb#291 - def static_path=(_arg0); end - - # The number of columns in a tab - # - # source://rdoc//lib/rdoc/options.rb#296 - def tab_width; end - - # The number of columns in a tab - # - # source://rdoc//lib/rdoc/options.rb#296 - def tab_width=(_arg0); end - - # Template to be used when generating output - # - # source://rdoc//lib/rdoc/options.rb#301 - def template; end - - # Template to be used when generating output - # - # source://rdoc//lib/rdoc/options.rb#301 - def template=(_arg0); end - - # Directory the template lives in - # - # source://rdoc//lib/rdoc/options.rb#306 - def template_dir; end - - # Directory the template lives in - # - # source://rdoc//lib/rdoc/options.rb#306 - def template_dir=(_arg0); end - - # Finds the template dir for +template+ - # - # source://rdoc//lib/rdoc/options.rb#1321 - def template_dir_for(template); end - - # Additional template stylesheets - # - # source://rdoc//lib/rdoc/options.rb#311 - def template_stylesheets; end - - # Additional template stylesheets - # - # source://rdoc//lib/rdoc/options.rb#311 - def template_stylesheets=(_arg0); end - - # Documentation title - # - # source://rdoc//lib/rdoc/options.rb#316 - def title; end - - # Documentation title - # - # source://rdoc//lib/rdoc/options.rb#316 - def title=(_arg0); end - - # For dumping YAML - # - # source://rdoc//lib/rdoc/options.rb#561 - def to_yaml(*options); end - - # Should RDoc update the timestamps in the output dir? - # - # source://rdoc//lib/rdoc/options.rb#321 - def update_output_dir; end - - # Should RDoc update the timestamps in the output dir? - # - # source://rdoc//lib/rdoc/options.rb#321 - def update_output_dir=(_arg0); end - - # Verbosity, zero means quiet - # - # source://rdoc//lib/rdoc/options.rb#326 - def verbosity; end - - # Verbosity, zero means quiet - # - # source://rdoc//lib/rdoc/options.rb#326 - def verbosity=(_arg0); end - - # Minimum visibility of a documented method. One of +:public+, +:protected+, - # +:private+ or +:nodoc+. - # - # The +:nodoc+ visibility ignores all directives related to visibility. The - # directive. - # - # source://rdoc//lib/rdoc/options.rb#347 - def visibility; end - - # Sets the minimum visibility of a documented method. - # - # Accepts +:public+, +:protected+, +:private+, +:nodoc+, or +:all+. - # - # When +:all+ is passed, visibility is set to +:private+, similarly to - # RDOCOPT="--all", see #visibility for more information. - # - # source://rdoc//lib/rdoc/options.rb#1338 - def visibility=(visibility); end - - # Displays a warning using Kernel#warn if we're being verbose - # - # source://rdoc//lib/rdoc/options.rb#1350 - def warn(message); end - - # Warn if rdoc-ref links can't be resolved - # Default is +false+ - # - # source://rdoc//lib/rdoc/options.rb#332 - def warn_missing_rdoc_ref; end - - # Warn if rdoc-ref links can't be resolved - # Default is +false+ - # - # source://rdoc//lib/rdoc/options.rb#332 - def warn_missing_rdoc_ref=(_arg0); end - - # URL of web cvs frontend - # - # source://rdoc//lib/rdoc/options.rb#337 - def webcvs; end - - # URL of web cvs frontend - # - # source://rdoc//lib/rdoc/options.rb#337 - def webcvs=(_arg0); end - - # Writes the YAML file .rdoc_options to the current directory containing the - # parsed options. - # - # source://rdoc//lib/rdoc/options.rb#1358 - def write_options; end - - # source://rdoc//lib/rdoc/options.rb#453 - def yaml_initialize(tag, map); end - - class << self - # Loads options from .rdoc_options if the file exists, otherwise creates a - # new RDoc::Options instance. - # - # @raise [RDoc::Error] - # - # source://rdoc//lib/rdoc/options.rb#1372 - def load_options; end - end -end - -# source://rdoc//lib/rdoc/options.rb#371 -RDoc::Options::DEFAULT_EXCLUDE = T.let(T.unsafe(nil), Array) - -# A parser is simple a class that subclasses RDoc::Parser and implements #scan -# to fill in an RDoc::TopLevel with parsed data. -# -# The initialize method takes an RDoc::TopLevel to fill with parsed content, -# the name of the file to be parsed, the content of the file, an RDoc::Options -# object and an RDoc::Stats object to inform the user of parsed items. The -# scan method is then called to parse the file and must return the -# RDoc::TopLevel object. By calling super these items will be set for you. -# -# In order to be used by RDoc the parser needs to register the file extensions -# it can parse. Use ::parse_files_matching to register extensions. -# -# require 'rdoc' -# -# class RDoc::Parser::Xyz < RDoc::Parser -# parse_files_matching /\.xyz$/ -# -# def initialize top_level, file_name, content, options, stats -# super -# -# # extra initialization if needed -# end -# -# def scan -# # parse file and fill in @top_level -# end -# end -# -# source://rdoc//lib/rdoc/parser.rb#33 -class RDoc::Parser - # Creates a new Parser storing +top_level+, +file_name+, +content+, - # +options+ and +stats+ in instance variables. In +@preprocess+ an - # RDoc::Markup::PreProcess object is created which allows processing of - # directives. - # - # @return [Parser] a new instance of Parser - # - # source://rdoc//lib/rdoc/parser.rb#255 - def initialize(top_level, content, options, stats); end - - # The name of the file being parsed - # - # source://rdoc//lib/rdoc/parser.rb#52 - def file_name; end - - # Normalizes tabs in +body+ - # - # source://rdoc//lib/rdoc/parser.rb#275 - def handle_tab_width(body); end - - class << self - # Alias an extension to another extension. After this call, files ending - # "new_ext" will be parsed using the same parser as "old_ext" - # - # source://rdoc//lib/rdoc/parser.rb#58 - def alias_extension(old_ext, new_ext); end - - # Determines if the file is a "binary" file which basically means it has - # content that an RDoc parser shouldn't try to consume. - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/parser.rb#74 - def binary?(file); end - - # Return a parser that can handle a particular extension - # - # source://rdoc//lib/rdoc/parser.rb#107 - def can_parse(file_name); end - - # Returns a parser that can handle the extension for +file_name+. This does - # not depend upon the file being readable. - # - # source://rdoc//lib/rdoc/parser.rb#120 - def can_parse_by_name(file_name); end - - # Returns the file type from the modeline in +file_name+ - # - # source://rdoc//lib/rdoc/parser.rb#143 - def check_modeline(file_name); end - - # Finds and instantiates the correct parser for the given +file_name+ and - # +content+. - # - # source://rdoc//lib/rdoc/parser.rb#169 - def for(top_level, content, options, stats); end - - # Record which file types this parser can understand. - # - # It is ok to call this multiple times. - # - # source://rdoc//lib/rdoc/parser.rb#204 - def parse_files_matching(regexp); end - - # An Array of arrays that maps file extension (or name) regular - # expressions to parser classes that will parse matching filenames. - # - # Use parse_files_matching to register a parser's file extensions. - # - # source://rdoc//lib/rdoc/parser.rb#45 - def parsers; end - - # Removes an emacs-style modeline from the first line of the document - # - # source://rdoc//lib/rdoc/parser.rb#211 - def remove_modeline(content); end - - # If there is a markup: parser_name comment at the front of the - # file, use it to determine the parser. For example: - # - # # markup: rdoc - # # Class comment can go here - # - # class C - # end - # - # The comment should appear as the first line of the +content+. - # - # If the content contains a shebang or editor modeline the comment may - # appear on the second or third line. - # - # Any comment style may be used to hide the markup comment. - # - # source://rdoc//lib/rdoc/parser.rb#232 - def use_markup(content); end - - # Checks if +file+ is a zip file in disguise. Signatures from - # http://www.garykessler.net/library/file_sigs.html - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/parser.rb#94 - def zip?(file); end - end -end - -# RDoc::Parser::C attempts to parse C extension files. It looks for -# the standard patterns that you find in extensions: +rb_define_class+, -# +rb_define_method+ and so on. It tries to find the corresponding -# C source for the methods and extract comments, but if we fail -# we don't worry too much. -# -# The comments associated with a Ruby method are extracted from the C -# comment block associated with the routine that _implements_ that -# method, that is to say the method whose name is given in the -# +rb_define_method+ call. For example, you might write: -# -# /* -# * Returns a new array that is a one-dimensional flattening of this -# * array (recursively). That is, for every element that is an array, -# * extract its elements into the new array. -# * -# * s = [ 1, 2, 3 ] #=> [1, 2, 3] -# * t = [ 4, 5, 6, [7, 8] ] #=> [4, 5, 6, [7, 8]] -# * a = [ s, t, 9, 10 ] #=> [[1, 2, 3], [4, 5, 6, [7, 8]], 9, 10] -# * a.flatten #=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] -# */ -# static VALUE -# rb_ary_flatten(VALUE ary) -# { -# ary = rb_obj_dup(ary); -# rb_ary_flatten_bang(ary); -# return ary; -# } -# -# ... -# -# void -# Init_Array(void) -# { -# ... -# rb_define_method(rb_cArray, "flatten", rb_ary_flatten, 0); -# -# Here RDoc will determine from the +rb_define_method+ line that there's a -# method called "flatten" in class Array, and will look for the implementation -# in the method +rb_ary_flatten+. It will then use the comment from that -# method in the HTML output. This method must be in the same source file -# as the +rb_define_method+. -# -# The comment blocks may include special directives: -# -# [Document-class: +name+] -# Documentation for the named class. -# -# [Document-module: +name+] -# Documentation for the named module. -# -# [Document-const: +name+] -# Documentation for the named +rb_define_const+. -# -# Constant values can be supplied on the first line of the comment like so: -# -# /* 300: The highest possible score in bowling */ -# rb_define_const(cFoo, "PERFECT", INT2FIX(300)); -# -# The value can contain internal colons so long as they are escaped with a \ -# -# [Document-global: +name+] -# Documentation for the named +rb_define_global_const+ -# -# [Document-variable: +name+] -# Documentation for the named +rb_define_variable+ -# -# [Document-method\: +method_name+] -# Documentation for the named method. Use this when the method name is -# unambiguous. -# -# [Document-method\: ClassName::method_name] -# Documentation for a singleton method in the given class. Use this when -# the method name alone is ambiguous. -# -# [Document-method\: ClassName#method_name] -# Documentation for a instance method in the given class. Use this when the -# method name alone is ambiguous. -# -# [Document-attr: +name+] -# Documentation for the named attribute. -# -# [call-seq: text up to an empty line] -# Because C source doesn't give descriptive names to Ruby-level parameters, -# you need to document the calling sequence explicitly -# -# In addition, RDoc assumes by default that the C method implementing a -# Ruby function is in the same source file as the rb_define_method call. -# If this isn't the case, add the comment: -# -# rb_define_method(....); // in filename -# -# As an example, we might have an extension that defines multiple classes -# in its Init_xxx method. We could document them using -# -# /* -# * Document-class: MyClass -# * -# * Encapsulate the writing and reading of the configuration -# * file. ... -# */ -# -# /* -# * Document-method: read_value -# * -# * call-seq: -# * cfg.read_value(key) -> value -# * cfg.read_value(key} { |key| } -> value -# * -# * Return the value corresponding to +key+ from the configuration. -# * In the second form, if the key isn't found, invoke the -# * block and return its value. -# */ -# -# source://rdoc//lib/rdoc/parser/c.rb#119 -class RDoc::Parser::C < ::RDoc::Parser - include ::RDoc::Text - - # Prepares for parsing a C file. See RDoc::Parser#initialize for details on - # the arguments. - # - # @return [C] a new instance of C - # - # source://rdoc//lib/rdoc/parser/c.rb#171 - def initialize(top_level, content, options, stats); end - - # Add alias, either from a direct alias definition, or from two - # method that reference the same function. - # - # source://rdoc//lib/rdoc/parser/c.rb#250 - def add_alias(var_name, class_obj, old_name, new_name, comment); end - - # Maps C variable names to names of Ruby classes or modules - # - # source://rdoc//lib/rdoc/parser/c.rb#133 - def classes; end - - # C file the parser is parsing - # - # source://rdoc//lib/rdoc/parser/c.rb#138 - def content; end - - # C file the parser is parsing - # - # source://rdoc//lib/rdoc/parser/c.rb#138 - def content=(_arg0); end - - # Scans #content for rb_define_alias - # - # source://rdoc//lib/rdoc/parser/c.rb#222 - def do_aliases; end - - # Scans #content for rb_attr and rb_define_attr - # - # source://rdoc//lib/rdoc/parser/c.rb#263 - def do_attrs; end - - # Scans #content for boot_defclass - # - # source://rdoc//lib/rdoc/parser/c.rb#286 - def do_boot_defclass; end - - # Scans #content for rb_define_class, boot_defclass, rb_define_class_under - # and rb_singleton_class - # - # source://rdoc//lib/rdoc/parser/c.rb#298 - def do_classes_and_modules; end - - # Scans #content for rb_define_variable, rb_define_readonly_variable, - # rb_define_const and rb_define_global_const - # - # source://rdoc//lib/rdoc/parser/c.rb#396 - def do_constants; end - - # Scans #content for rb_include_module - # - # source://rdoc//lib/rdoc/parser/c.rb#443 - def do_includes; end - - # Scans #content for rb_define_method, rb_define_singleton_method, - # rb_define_module_function, rb_define_private_method, - # rb_define_global_function and define_filetest_function - # - # source://rdoc//lib/rdoc/parser/c.rb#459 - def do_methods; end - - # Creates classes and module that were missing were defined due to the file - # order being different than the declaration order. - # - # source://rdoc//lib/rdoc/parser/c.rb#508 - def do_missing; end - - # Dependencies from a missing enclosing class to the classes in - # missing_dependencies that depend upon it. - # - # source://rdoc//lib/rdoc/parser/c.rb#144 - def enclosure_dependencies; end - - # Finds the comment for an alias on +class_name+ from +new_name+ to - # +old_name+ - # - # source://rdoc//lib/rdoc/parser/c.rb#524 - def find_alias_comment(class_name, new_name, old_name); end - - # Finds a comment for rb_define_attr, rb_attr or Document-attr. - # - # +var_name+ is the C class variable the attribute is defined on. - # +attr_name+ is the attribute's name. - # - # +read+ and +write+ are the read/write flags ('1' or '0'). Either both or - # neither must be provided. - # - # source://rdoc//lib/rdoc/parser/c.rb#542 - def find_attr_comment(var_name, attr_name, read = T.unsafe(nil), write = T.unsafe(nil)); end - - # Find the C code corresponding to a Ruby method - # - # source://rdoc//lib/rdoc/parser/c.rb#599 - def find_body(class_name, meth_name, meth_obj, file_content, quiet = T.unsafe(nil)); end - - # Finds a RDoc::NormalClass or RDoc::NormalModule for +raw_name+ - # - # source://rdoc//lib/rdoc/parser/c.rb#683 - def find_class(raw_name, name, base_name = T.unsafe(nil)); end - - # Look for class or module documentation above Init_+class_name+(void), - # in a Document-class +class_name+ (or module) comment or above an - # rb_define_class (or module). If a comment is supplied above a matching - # Init_ and a rb_define_class the Init_ comment is used. - # - # /* - # * This is a comment for Foo - # */ - # Init_Foo(void) { - # VALUE cFoo = rb_define_class("Foo", rb_cObject); - # } - # - # /* - # * Document-class: Foo - # * This is a comment for Foo - # */ - # Init_foo(void) { - # VALUE cFoo = rb_define_class("Foo", rb_cObject); - # } - # - # /* - # * This is a comment for Foo - # */ - # VALUE cFoo = rb_define_class("Foo", rb_cObject); - # - # source://rdoc//lib/rdoc/parser/c.rb#724 - def find_class_comment(class_name, class_mod); end - - # Finds a comment matching +type+ and +const_name+ either above the - # comment or in the matching Document- section. - # - # source://rdoc//lib/rdoc/parser/c.rb#794 - def find_const_comment(type, const_name, class_name = T.unsafe(nil)); end - - # Handles modifiers in +comment+ and updates +meth_obj+ as appropriate. - # - # source://rdoc//lib/rdoc/parser/c.rb#811 - def find_modifiers(comment, meth_obj); end - - # Finds a Document-method override for +meth_obj+ on +class_name+ - # - # source://rdoc//lib/rdoc/parser/c.rb#821 - def find_override_comment(class_name, meth_obj); end - - # Generate a Ruby-method table - # - # source://rdoc//lib/rdoc/parser/c.rb#575 - def gen_body_table(file_content); end - - # Generate a const table - # - # source://rdoc//lib/rdoc/parser/c.rb#757 - def gen_const_table(file_content); end - - # Creates a new RDoc::Attr +attr_name+ on class +var_name+ that is either - # +read+, +write+ or both - # - # source://rdoc//lib/rdoc/parser/c.rb#843 - def handle_attr(var_name, attr_name, read, write); end - - # Creates a new RDoc::NormalClass or RDoc::NormalModule based on +type+ - # named +class_name+ in +parent+ which was assigned to the C +var_name+. - # - # source://rdoc//lib/rdoc/parser/c.rb#872 - def handle_class_module(var_name, type, class_name, parent, in_module); end - - # Adds constants. By providing some_value: at the start of the comment you - # can override the C value of the comment to give a friendly definition. - # - # /* 300: The perfect score in bowling */ - # rb_define_const(cFoo, "PERFECT", INT2FIX(300)); - # - # Will override INT2FIX(300) with the value +300+ in the output - # RDoc. Values may include quotes and escaped colons (\:). - # - # source://rdoc//lib/rdoc/parser/c.rb#937 - def handle_constants(type, var_name, const_name, definition); end - - # Removes #ifdefs that would otherwise confuse us - # - # source://rdoc//lib/rdoc/parser/c.rb#987 - def handle_ifdefs_in(body); end - - # Adds an RDoc::AnyMethod +meth_name+ defined on a class or module assigned - # to +var_name+. +type+ is the type of method definition function used. - # +singleton_method+ and +module_function+ create a singleton method. - # - # source://rdoc//lib/rdoc/parser/c.rb#996 - def handle_method(type, var_name, meth_name, function, param_count, source_file = T.unsafe(nil)); end - - # Registers a singleton class +sclass_var+ as a singleton of +class_var+ - # - # source://rdoc//lib/rdoc/parser/c.rb#1066 - def handle_singleton(sclass_var, class_var); end - - # Maps C variable names to names of Ruby classes (and singleton classes) - # - # source://rdoc//lib/rdoc/parser/c.rb#149 - def known_classes; end - - # Loads the variable map with the given +name+ from the RDoc::Store, if - # present. - # - # source://rdoc//lib/rdoc/parser/c.rb#1077 - def load_variable_map(map_name); end - - # Look for directives in a normal comment block: - # - # /* - # * :title: My Awesome Project - # */ - # - # This method modifies the +comment+ - # Both :main: and :title: directives are deprecated and will be removed in RDoc 7. - # - # source://rdoc//lib/rdoc/parser/c.rb#1107 - def look_for_directives_in(context, comment); end - - # Classes found while parsing the C file that were not yet registered due to - # a missing enclosing class. These are processed by do_missing - # - # source://rdoc//lib/rdoc/parser/c.rb#155 - def missing_dependencies; end - - # Creates a RDoc::Comment instance. - # - # source://rdoc//lib/rdoc/parser/c.rb#1255 - def new_comment(text = T.unsafe(nil), location = T.unsafe(nil), language = T.unsafe(nil)); end - - # Extracts parameters from the +method_body+ and returns a method - # parameter string. Follows 1.9.3dev's scan-arg-spec, see README.EXT - # - # source://rdoc//lib/rdoc/parser/c.rb#1144 - def rb_scan_args(method_body); end - - # Removes lines that are commented out that might otherwise get picked up - # when scanning for classes and methods - # - # source://rdoc//lib/rdoc/parser/c.rb#1227 - def remove_commented_out_lines; end - - # Extracts the classes, modules, methods, attributes, constants and aliases - # from a C file and returns an RDoc::TopLevel for this file - # - # source://rdoc//lib/rdoc/parser/c.rb#1235 - def scan; end - - # Maps C variable names to names of Ruby singleton classes - # - # source://rdoc//lib/rdoc/parser/c.rb#160 - def singleton_classes; end - - # The TopLevel items in the parsed file belong to - # - # source://rdoc//lib/rdoc/parser/c.rb#165 - def top_level; end -end - -# :stopdoc: -# -# source://rdoc//lib/rdoc/parser/c.rb#126 -RDoc::Parser::C::BOOL_ARG_PATTERN = T.let(T.unsafe(nil), Regexp) - -# source://rdoc//lib/rdoc/parser/c.rb#127 -RDoc::Parser::C::TRUE_VALUES = T.let(T.unsafe(nil), Array) - -# A ChangeLog file parser. -# -# This parser converts a ChangeLog into an RDoc::Markup::Document. When -# viewed as HTML a ChangeLog page will have an entry for each day's entries in -# the sidebar table of contents. -# -# This parser is meant to parse the MRI ChangeLog, but can be used to parse any -# {GNU style Change -# Log}[http://www.gnu.org/prep/standards/html_node/Style-of-Change-Logs.html]. -# -# source://rdoc//lib/rdoc/parser/changelog.rb#14 -class RDoc::Parser::ChangeLog < ::RDoc::Parser - include ::RDoc::Parser::Text - - # Attaches the +continuation+ of the previous line to the +entry_body+. - # - # Continued function listings are joined together as a single entry. - # Continued descriptions are joined to make a single paragraph. - # - # source://rdoc//lib/rdoc/parser/changelog.rb#26 - def continue_entry_body(entry_body, continuation); end - - # Creates an RDoc::Markup::Document given the +groups+ of ChangeLog entries. - # - # source://rdoc//lib/rdoc/parser/changelog.rb#44 - def create_document(groups); end - - # Returns a list of ChangeLog entries an RDoc::Markup nodes for the given - # +entries+. - # - # source://rdoc//lib/rdoc/parser/changelog.rb#66 - def create_entries(entries); end - - # Returns an RDoc::Markup::List containing the given +items+ in the - # ChangeLog - # - # source://rdoc//lib/rdoc/parser/changelog.rb#83 - def create_items(items); end - - # Groups +entries+ by date. - # - # source://rdoc//lib/rdoc/parser/changelog.rb#103 - def group_entries(entries); end - - # Parse date in ISO-8601, RFC-2822, or default of Git - # - # source://rdoc//lib/rdoc/parser/changelog.rb#119 - def parse_date(date); end - - # Parses the entries in the ChangeLog. - # - # Returns an Array of each ChangeLog entry in order of parsing. - # - # A ChangeLog entry is an Array containing the ChangeLog title (date and - # committer) and an Array of ChangeLog items (file and function changed with - # description). - # - # An example result would be: - # - # [ 'Tue Dec 4 08:33:46 2012 Eric Hodel ', - # [ 'README.EXT: Converted to RDoc format', - # 'README.EXT.ja: ditto']] - # - # source://rdoc//lib/rdoc/parser/changelog.rb#149 - def parse_entries; end - - # Converts the ChangeLog into an RDoc::Markup::Document - # - # source://rdoc//lib/rdoc/parser/changelog.rb#206 - def scan; end -end - -# The extension for Git commit log -# -# source://rdoc//lib/rdoc/parser/changelog.rb#223 -module RDoc::Parser::ChangeLog::Git - # Returns a list of ChangeLog entries as - # RDoc::Parser::ChangeLog::Git::LogEntry list for the given - # +entries+. - # - # source://rdoc//lib/rdoc/parser/changelog.rb#263 - def create_entries(entries); end - - # Parses the entries in the Git commit logs - # - # source://rdoc//lib/rdoc/parser/changelog.rb#236 - def parse_entries; end - - # Parses auxiliary info. Currently `base-url` to expand - # references is effective. - # - # source://rdoc//lib/rdoc/parser/changelog.rb#228 - def parse_info(info); end -end - -# source://rdoc//lib/rdoc/parser/changelog.rb#272 -RDoc::Parser::ChangeLog::Git::HEADING_LEVEL = T.let(T.unsafe(nil), Integer) - -# source://rdoc//lib/rdoc/parser/changelog.rb#271 -class RDoc::Parser::ChangeLog::Git::LogEntry < ::Struct - # @return [LogEntry] a new instance of LogEntry - # - # source://rdoc//lib/rdoc/parser/changelog.rb#274 - def initialize(base, commit, author, email, date, contents); end - - # source://rdoc//lib/rdoc/parser/changelog.rb#314 - def accept(visitor); end - - # source://rdoc//lib/rdoc/parser/changelog.rb#295 - def aref; end - - # Returns the value of attribute author - # - # @return [Object] the current value of author - def author; end - - # Sets the attribute author - # - # @param value [Object] the value to set the attribute author to. - # @return [Object] the newly set value - def author=(_); end - - # Returns the value of attribute base - # - # @return [Object] the current value of base - def base; end - - # Sets the attribute base - # - # @param value [Object] the value to set the attribute base to. - # @return [Object] the newly set value - def base=(_); end - - # Returns the value of attribute commit - # - # @return [Object] the current value of commit - def commit; end - - # Sets the attribute commit - # - # @param value [Object] the value to set the attribute commit to. - # @return [Object] the newly set value - def commit=(_); end - - # Returns the value of attribute contents - # - # @return [Object] the current value of contents - def contents; end - - # Sets the attribute contents - # - # @param value [Object] the value to set the attribute contents to. - # @return [Object] the newly set value - def contents=(_); end - - # Returns the value of attribute date - # - # @return [Object] the current value of date - def date; end - - # Sets the attribute date - # - # @param value [Object] the value to set the attribute date to. - # @return [Object] the newly set value - def date=(_); end - - # Returns the value of attribute email - # - # @return [Object] the current value of email - def email; end - - # Sets the attribute email - # - # @param value [Object] the value to set the attribute email to. - # @return [Object] the newly set value - def email=(_); end - - # source://rdoc//lib/rdoc/parser/changelog.rb#299 - def label(context = T.unsafe(nil)); end - - # source://rdoc//lib/rdoc/parser/changelog.rb#291 - def level; end - - # source://rdoc//lib/rdoc/parser/changelog.rb#331 - def pretty_print(q); end - - # source://rdoc//lib/rdoc/parser/changelog.rb#303 - def text; end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# Parse a Markdown format file. The parsed RDoc::Markup::Document is attached -# as a file comment. -# -# source://rdoc//lib/rdoc/parser/markdown.rb#6 -class RDoc::Parser::Markdown < ::RDoc::Parser - include ::RDoc::Parser::Text - - # Creates an Markdown-format TopLevel for the given file. - # - # source://rdoc//lib/rdoc/parser/markdown.rb#15 - def scan; end -end - -# Parse a RD format file. The parsed RDoc::Markup::Document is attached as a -# file comment. -# -# source://rdoc//lib/rdoc/parser/rd.rb#6 -class RDoc::Parser::RD < ::RDoc::Parser - include ::RDoc::Parser::Text - - # Creates an rd-format TopLevel for the given file. - # - # source://rdoc//lib/rdoc/parser/rd.rb#15 - def scan; end -end - -# Wrapper for Ripper lex states -# -# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#7 -class RDoc::Parser::RipperStateLex - # New lexer for +code+. - # - # @return [RipperStateLex] a new instance of RipperStateLex - # - # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#278 - def initialize(code); end - - # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#27 - def get_squashed_tk; end - - private - - # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#168 - def get_embdoc_tk(tk); end - - # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#177 - def get_heredoc_tk(heredoc_name, indent); end - - # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#252 - def get_op_tk(tk); end - - # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#150 - def get_regexp_tk(tk); end - - # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#123 - def get_string_tk(tk); end - - # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#76 - def get_symbol_tk(tk); end - - # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#214 - def get_words_tk(tk); end - - # @return [Boolean] - # - # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#202 - def heredoc_end?(name, indent, tk); end - - # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#196 - def retrieve_heredoc_info(tk); end - - class << self - # Returns +true+ if lex state will be +END+ after +token+. - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#299 - def end?(token); end - - # Returns tokens parsed from +code+. - # - # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#286 - def parse(code); end - end -end - -# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#14 -RDoc::Parser::RipperStateLex::EXPR_ARG = T.let(T.unsafe(nil), Integer) - -# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#12 -RDoc::Parser::RipperStateLex::EXPR_END = T.let(T.unsafe(nil), Integer) - -# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#13 -RDoc::Parser::RipperStateLex::EXPR_ENDFN = T.let(T.unsafe(nil), Integer) - -# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#15 -RDoc::Parser::RipperStateLex::EXPR_FNAME = T.let(T.unsafe(nil), Integer) - -# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#17 -class RDoc::Parser::RipperStateLex::InnerStateLex < ::Ripper::Filter - # @return [InnerStateLex] a new instance of InnerStateLex - # - # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#18 - def initialize(code); end - - # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#22 - def on_default(event, tok, data); end -end - -# :stopdoc: -# -# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#10 -class RDoc::Parser::RipperStateLex::Token < ::Struct - # Returns the value of attribute char_no - # - # @return [Object] the current value of char_no - def char_no; end - - # Sets the attribute char_no - # - # @param value [Object] the value to set the attribute char_no to. - # @return [Object] the newly set value - def char_no=(_); end - - # Returns the value of attribute kind - # - # @return [Object] the current value of kind - def kind; end - - # Sets the attribute kind - # - # @param value [Object] the value to set the attribute kind to. - # @return [Object] the newly set value - def kind=(_); end - - # Returns the value of attribute line_no - # - # @return [Object] the current value of line_no - def line_no; end - - # Sets the attribute line_no - # - # @param value [Object] the value to set the attribute line_no to. - # @return [Object] the newly set value - def line_no=(_); end - - # Returns the value of attribute state - # - # @return [Object] the current value of state - def state; end - - # Sets the attribute state - # - # @param value [Object] the value to set the attribute state to. - # @return [Object] the newly set value - def state=(_); end - - # Returns the value of attribute text - # - # @return [Object] the current value of text - def text; end - - # Sets the attribute text - # - # @param value [Object] the value to set the attribute text to. - # @return [Object] the newly set value - def text=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# Extracts code elements from a source file returning a TopLevel object -# containing the constituent file elements. -# -# This file is based on rtags -# -# RubyParser understands how to document: -# * classes -# * modules -# * methods -# * constants -# * aliases -# * private, public, protected -# * private_class_function, public_class_function -# * private_constant, public_constant -# * module_function -# * attr, attr_reader, attr_writer, attr_accessor -# * extra accessors given on the command line -# * metaprogrammed methods -# * require -# * include -# -# == Method Arguments -# -# -- -# NOTE: I don't think this works, needs tests, remove the paragraph following -# this block when known to work -# -# The parser extracts the arguments from the method definition. You can -# override this with a custom argument definition using the :args: directive: -# -# ## -# # This method tries over and over until it is tired -# -# def go_go_go(thing_to_try, tries = 10) # :args: thing_to_try -# puts thing_to_try -# go_go_go thing_to_try, tries - 1 -# end -# -# If you have a more-complex set of overrides you can use the :call-seq: -# directive: -# ++ -# -# The parser extracts the arguments from the method definition. You can -# override this with a custom argument definition using the :call-seq: -# directive: -# -# ## -# # This method can be called with a range or an offset and length -# # -# # :call-seq: -# # my_method(Range) -# # my_method(offset, length) -# -# def my_method(*args) -# end -# -# The parser extracts +yield+ expressions from method bodies to gather the -# yielded argument names. If your method manually calls a block instead of -# yielding or you want to override the discovered argument names use -# the :yields: directive: -# -# ## -# # My method is awesome -# -# def my_method(&block) # :yields: happy, times -# block.call 1, 2 -# end -# -# == Metaprogrammed Methods -# -# To pick up a metaprogrammed method, the parser looks for a comment starting -# with '##' before an identifier: -# -# ## -# # This is a meta-programmed method! -# -# add_my_method :meta_method, :arg1, :arg2 -# -# The parser looks at the token after the identifier to determine the name, in -# this example, :meta_method. If a name cannot be found, a warning is printed -# and 'unknown is used. -# -# You can force the name of a method using the :method: directive: -# -# ## -# # :method: some_method! -# -# By default, meta-methods are instance methods. To indicate that a method is -# a singleton method instead use the :singleton-method: directive: -# -# ## -# # :singleton-method: -# -# You can also use the :singleton-method: directive with a name: -# -# ## -# # :singleton-method: some_method! -# -# You can define arguments for metaprogrammed methods via either the -# :call-seq:, :arg: or :args: directives. -# -# Additionally you can mark a method as an attribute by -# using :attr:, :attr_reader:, :attr_writer: or :attr_accessor:. Just like -# for :method:, the name is optional. -# -# ## -# # :attr_reader: my_attr_name -# -# == Hidden methods and attributes -# -# You can provide documentation for methods that don't appear using -# the :method:, :singleton-method: and :attr: directives: -# -# ## -# # :attr_writer: ghost_writer -# # There is an attribute here, but you can't see it! -# -# ## -# # :method: ghost_method -# # There is a method here, but you can't see it! -# -# ## -# # this is a comment for a regular method -# -# def regular_method() end -# -# Note that by default, the :method: directive will be ignored if there is a -# standard rdocable item following it. -# -# source://rdoc//lib/rdoc/parser/ruby.rb#153 -class RDoc::Parser::Ruby < ::RDoc::Parser - include ::RDoc::TokenStream - include ::RDoc::Parser::RubyTools - - # Creates a new Ruby parser. - # - # @return [Ruby] a new instance of Ruby - # - # source://rdoc//lib/rdoc/parser/ruby.rb#173 - def initialize(top_level, content, options, stats); end - - # Look for the first comment in a file that isn't a shebang line. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#245 - def collect_first_comment; end - - # Consumes trailing whitespace from the token stream - # - # source://rdoc//lib/rdoc/parser/ruby.rb#288 - def consume_trailing_spaces; end - - # Creates a new attribute in +container+ with +name+. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#295 - def create_attr(container, single, name, rw, comment); end - - # Creates a module alias in +container+ at +rhs_name+ (or at the top-level - # for "::") with the name from +constant+. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#309 - def create_module_alias(container, constant, rhs_name); end - - # Aborts with +msg+ - # - # source://rdoc//lib/rdoc/parser/ruby.rb#322 - def error(msg); end - - # Looks for a true or false token. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#331 - def get_bool; end - - # Look for the name of a class of module (optionally with a leading :: or - # with :: separated named) and return the ultimate name, the associated - # container, and the given name (with the ::). - # - # source://rdoc//lib/rdoc/parser/ruby.rb#349 - def get_class_or_module(container, ignore_constants = T.unsafe(nil)); end - - # Return a superclass, which can be either a constant of an expression - # - # source://rdoc//lib/rdoc/parser/ruby.rb#432 - def get_class_specification; end - - # Parse a constant, which might be qualified by one or more class or module - # names - # - # source://rdoc//lib/rdoc/parser/ruby.rb#465 - def get_constant; end - - # Little hack going on here. In the statement: - # - # f = 2*(1+yield) - # - # We see the RPAREN as the next token, so we need to exit early. This still - # won't catch all cases (such as "a = yield + 1" - # - # source://rdoc//lib/rdoc/parser/ruby.rb#567 - def get_end_token(tk); end - - # Get an included module that may be surrounded by parens - # - # source://rdoc//lib/rdoc/parser/ruby.rb#482 - def get_included_module_with_optional_parens; end - - # Retrieves the method container for a singleton method. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#587 - def get_method_container(container, name_t); end - - # Extracts a name or symbol from the token stream. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#630 - def get_symbol_or_name; end - - # Retrieves the read token stream and replaces +pattern+ with +replacement+ - # using gsub. If the result is only a ";" returns an empty string. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#203 - def get_tkread_clean(pattern, replacement); end - - # Extracts the visibility information for the visibility token +tk+ - # and +single+ class type identifier. - # - # Returns the visibility type (a string), the visibility (a symbol) and - # +singleton+ if the methods following should be converted to singleton - # methods. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#217 - def get_visibility_information(tk, single); end - - # Look for directives in a normal comment block: - # - # # :stopdoc: - # # Don't display comment from this point forward - # - # This routine modifies its +comment+ parameter. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#670 - def look_for_directives_in(container, comment); end - - # Adds useful info about the parser to +message+ - # - # source://rdoc//lib/rdoc/parser/ruby.rb#690 - def make_message(message); end - - # Creates a comment with the correct format - # - # source://rdoc//lib/rdoc/parser/ruby.rb#702 - def new_comment(comment, line_no = T.unsafe(nil)); end - - # Parses an +alias+ in +context+ with +comment+ - # - # source://rdoc//lib/rdoc/parser/ruby.rb#771 - def parse_alias(context, single, tk, comment); end - - # Creates an RDoc::Attr for the name following +tk+, setting the comment to - # +comment+. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#713 - def parse_attr(context, single, tk, comment); end - - # Creates an RDoc::Attr for each attribute listed after +tk+, setting the - # comment for each to +comment+. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#742 - def parse_attr_accessor(context, single, tk, comment); end - - # Extracts call parameters from the token stream. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#812 - def parse_call_parameters(tk); end - - # Parses a class in +context+ with +comment+ - # - # source://rdoc//lib/rdoc/parser/ruby.rb#855 - def parse_class(container, single, tk, comment); end - - # Parses and creates a regular class - # - # source://rdoc//lib/rdoc/parser/ruby.rb#889 - def parse_class_regular(container, declaration_context, single, name_t, given_name, comment); end - - # Parses a singleton class in +container+ with the given +name+ and - # +comment+. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#929 - def parse_class_singleton(container, name, comment); end - - # Generates an RDoc::Method or RDoc::Attr from +comment+ by looking for - # :method: or :attr: directives in +comment+. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#1094 - def parse_comment(container, tk, comment); end - - # Parse a comment that is describing an attribute in +container+ with the - # given +name+ and +comment+. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#1122 - def parse_comment_attr(container, type, name, comment); end - - # source://rdoc//lib/rdoc/parser/ruby.rb#1134 - def parse_comment_ghost(container, text, name, column, line_no, comment); end - - # Creates an RDoc::Method on +container+ from +comment+ if there is a - # Signature section in the comment - # - # source://rdoc//lib/rdoc/parser/ruby.rb#1173 - def parse_comment_tomdoc(container, tk, comment); end - - # Parses a constant in +context+ with +comment+. If +ignore_constants+ is - # true, no found constants will be added to RDoc. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#968 - def parse_constant(container, tk, comment, ignore_constants = T.unsafe(nil)); end - - # source://rdoc//lib/rdoc/parser/ruby.rb#1035 - def parse_constant_body(container, constant, is_array_or_hash); end - - # Parses a Module#private_constant or Module#public_constant call from +tk+. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#2112 - def parse_constant_visibility(container, single, tk); end - - # Parses an +include+ or +extend+, indicated by the +klass+ and adds it to - # +container+ # with +comment+ - # - # source://rdoc//lib/rdoc/parser/ruby.rb#1208 - def parse_extend_or_include(klass, container, comment); end - - # Parses identifiers that can create new methods or change visibility. - # - # Returns true if the comment was not consumed. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#1246 - def parse_identifier(container, single, tk, comment); end - - # Parses an +included+ with a block feature of ActiveSupport::Concern. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#1228 - def parse_included_with_activesupport_concern(container, comment); end - - # Parses a meta-programmed attribute and creates an RDoc::Attr. - # - # To create foo and bar attributes on class C with comment "My attributes": - # - # class C - # - # ## - # # :attr: - # # - # # My attributes - # - # my_attr :foo, :bar - # - # end - # - # To create a foo attribute on class C with comment "My attribute": - # - # class C - # - # ## - # # :attr: foo - # # - # # My attribute - # - # my_attr :foo, :bar - # - # end - # - # source://rdoc//lib/rdoc/parser/ruby.rb#1310 - def parse_meta_attr(context, single, tk, comment); end - - # Parses a meta-programmed method - # - # source://rdoc//lib/rdoc/parser/ruby.rb#1344 - def parse_meta_method(container, single, tk, comment); end - - # Parses the name of a metaprogrammed method. +comment+ is used to - # determine the name while +tk+ is used in an error message if the name - # cannot be determined. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#1390 - def parse_meta_method_name(comment, tk); end - - # Parses the parameters and block for a meta-programmed method. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#1414 - def parse_meta_method_params(container, single, meth, tk, comment); end - - # Parses a normal method defined by +def+ - # - # source://rdoc//lib/rdoc/parser/ruby.rb#1446 - def parse_method(container, single, tk, comment); end - - # Parses a method that needs to be ignored. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#1531 - def parse_method_dummy(container); end - - # Parses the name of a method in +container+. - # - # Returns the method name, the container it is in (for def Foo.name) and if - # it is a singleton or regular method. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#1544 - def parse_method_name(container); end - - # For the given +container+ and initial name token +name_t+ the method name - # is parsed from the token stream for a regular method. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#1571 - def parse_method_name_regular(container, name_t); end - - # For the given +container+ and initial name token +name_t+ the method name - # and the new +container+ (if necessary) are parsed from the token stream - # for a singleton method. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#1589 - def parse_method_name_singleton(container, name_t); end - - # Extracts +yield+ parameters from +method+ - # - # source://rdoc//lib/rdoc/parser/ruby.rb#1633 - def parse_method_or_yield_parameters(method = T.unsafe(nil), modifiers = T.unsafe(nil)); end - - # Capture the method's parameters. Along the way, look for a comment - # containing: - # - # # yields: .... - # - # and add this as the block_params for the method - # - # source://rdoc//lib/rdoc/parser/ruby.rb#1700 - def parse_method_parameters(method); end - - # Parses the parameters and body of +meth+ - # - # source://rdoc//lib/rdoc/parser/ruby.rb#1501 - def parse_method_params_and_body(container, single, meth, added_container); end - - # Parses an RDoc::NormalModule in +container+ with +comment+ - # - # source://rdoc//lib/rdoc/parser/ruby.rb#1715 - def parse_module(container, single, tk, comment); end - - # Parses an RDoc::Require in +context+ containing +comment+ - # - # source://rdoc//lib/rdoc/parser/ruby.rb#1737 - def parse_require(context, comment); end - - # Parses a rescue - # - # source://rdoc//lib/rdoc/parser/ruby.rb#1758 - def parse_rescue; end - - # The core of the Ruby parser. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#1789 - def parse_statements(container, single = T.unsafe(nil), current_method = T.unsafe(nil), comment = T.unsafe(nil)); end - - # Parse up to +no+ symbol arguments - # - # source://rdoc//lib/rdoc/parser/ruby.rb#1980 - def parse_symbol_arg(no = T.unsafe(nil)); end - - # Parses up to +no+ symbol arguments surrounded by () and places them in - # +args+. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#1995 - def parse_symbol_arg_paren(no); end - - # Parses up to +no+ symbol arguments separated by spaces and places them in - # +args+. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#2023 - def parse_symbol_arg_space(no, tk); end - - # Returns symbol text from the next token - # - # source://rdoc//lib/rdoc/parser/ruby.rb#2054 - def parse_symbol_in_arg; end - - # Parses statements in the top-level +container+ - # - # source://rdoc//lib/rdoc/parser/ruby.rb#2071 - def parse_top_level_statements(container); end - - # Determines the visibility in +container+ from +tk+ - # - # source://rdoc//lib/rdoc/parser/ruby.rb#2089 - def parse_visibility(container, single, tk); end - - # Determines the block parameter for +context+ - # - # source://rdoc//lib/rdoc/parser/ruby.rb#2128 - def parse_yield(context, single, tk, method); end - - # Directives are modifier comments that can appear after class, module, or - # method names. For example: - # - # def fred # :yields: a, b - # - # or: - # - # - # We return the directive name and any parameters as a two element array if - # the name is in +allowed+. A directive can be found anywhere up to the end - # of the current line. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#2149 - def read_directive(allowed); end - - # Handles directives following the definition for +context+ (any - # RDoc::CodeObject) if the directives are +allowed+ at this point. - # - # See also RDoc::Markup::PreProcess#handle_directive - # - # source://rdoc//lib/rdoc/parser/ruby.rb#2181 - def read_documentation_modifiers(context, allowed); end - - # Records the location of this +container+ in the file for this parser and - # adds it to the list of classes and modules in the file. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#2200 - def record_location(container); end - - # Retrieve comment body without =begin/=end - # - # source://rdoc//lib/rdoc/parser/ruby.rb#1778 - def retrieve_comment_body(tk); end - - # Scans this Ruby file for Ruby constructs - # - # source://rdoc//lib/rdoc/parser/ruby.rb#2212 - def scan; end - - # skip the var [in] part of a 'for' statement - # - # source://rdoc//lib/rdoc/parser/ruby.rb#2300 - def skip_for_variable; end - - # Skips the next method in +container+ - # - # source://rdoc//lib/rdoc/parser/ruby.rb#2311 - def skip_method(container); end - - # while, until, and for have an optional do - # - # source://rdoc//lib/rdoc/parser/ruby.rb#2259 - def skip_optional_do_after_expression; end - - # Skip opening parentheses and yield the block. - # Skip closing parentheses too when exists. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#410 - def skip_parentheses(&block); end - - # Skip spaces until a comment is found - # - # source://rdoc//lib/rdoc/parser/ruby.rb#2320 - def skip_tkspace_comment(skip_nl = T.unsafe(nil)); end - - # Marks containers between +container+ and +ancestor+ as ignored - # - # source://rdoc//lib/rdoc/parser/ruby.rb#655 - def suppress_parents(container, ancestor); end - - # Return +true+ if +tk+ is a newline. - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/parser/ruby.rb#195 - def tk_nl?(tk); end - - # Updates visibility in +container+ from +vis_type+ and +vis+. - # - # source://rdoc//lib/rdoc/parser/ruby.rb#2332 - def update_visibility(container, vis_type, vis, singleton); end - - # Prints +message+ to +$stderr+ unless we're being quiet - # - # source://rdoc//lib/rdoc/parser/ruby.rb#2377 - def warn(message); end -end - -# Collection of methods for writing parsers -# -# source://rdoc//lib/rdoc/parser/ruby_tools.rb#5 -module RDoc::Parser::RubyTools - # Adds a token listener +obj+, but you should probably use token_listener - # - # source://rdoc//lib/rdoc/parser/ruby_tools.rb#10 - def add_token_listener(obj); end - - # Fetches the next token from the scanner - # - # source://rdoc//lib/rdoc/parser/ruby_tools.rb#18 - def get_tk; end - - # Reads and returns all tokens up to one of +tokens+. Leaves the matched - # token in the token list. - # - # source://rdoc//lib/rdoc/parser/ruby_tools.rb#52 - def get_tk_until(*tokens); end - - # Retrieves a String representation of the read tokens - # - # source://rdoc//lib/rdoc/parser/ruby_tools.rb#73 - def get_tkread; end - - # Peek equivalent for get_tkread - # - # source://rdoc//lib/rdoc/parser/ruby_tools.rb#82 - def peek_read; end - - # Peek at the next token, but don't remove it from the stream - # - # source://rdoc//lib/rdoc/parser/ruby_tools.rb#89 - def peek_tk; end - - # Removes the token listener +obj+ - # - # source://rdoc//lib/rdoc/parser/ruby_tools.rb#97 - def remove_token_listener(obj); end - - # Resets the tools - # - # source://rdoc//lib/rdoc/parser/ruby_tools.rb#104 - def reset; end - - # Skips whitespace tokens including newlines - # - # source://rdoc//lib/rdoc/parser/ruby_tools.rb#115 - def skip_tkspace; end - - # Skips whitespace tokens excluding newlines - # - # source://rdoc//lib/rdoc/parser/ruby_tools.rb#129 - def skip_tkspace_without_nl; end - - # Has +obj+ listen to tokens - # - # source://rdoc//lib/rdoc/parser/ruby_tools.rb#143 - def token_listener(obj); end - - # Returns +tk+ to the scanner - # - # source://rdoc//lib/rdoc/parser/ruby_tools.rb#153 - def unget_tk(tk); end -end - -# Parse a non-source file. We basically take the whole thing as one big -# comment. -# -# source://rdoc//lib/rdoc/parser/simple.rb#6 -class RDoc::Parser::Simple < ::RDoc::Parser - include ::RDoc::Parser::Text - - # Prepare to parse a plain file - # - # @return [Simple] a new instance of Simple - # - # source://rdoc//lib/rdoc/parser/simple.rb#17 - def initialize(top_level, content, options, stats); end - - # source://rdoc//lib/rdoc/parser/simple.rb#12 - def content; end - - # Removes the encoding magic comment from +text+ - # - # source://rdoc//lib/rdoc/parser/simple.rb#41 - def remove_coding_comment(text); end - - # Removes private comments. - # - # Unlike RDoc::Comment#remove_private this implementation only looks for two - # dashes at the beginning of the line. Three or more dashes are considered - # to be a rule and ignored. - # - # source://rdoc//lib/rdoc/parser/simple.rb#52 - def remove_private_comment(comment); end - - # Extract the file contents and attach them to the TopLevel as a comment - # - # source://rdoc//lib/rdoc/parser/simple.rb#28 - def scan; end -end - -# source://rdoc//lib/rdoc/rd.rb#72 -class RDoc::RD - class << self - # Parses +rd+ source and returns an RDoc::Markup::Document. If the - # =begin or =end lines are missing they will be added. - # - # source://rdoc//lib/rdoc/rd.rb#78 - def parse(rd); end - end -end - -# RD format parser for headings, paragraphs, lists, verbatim sections that -# exist as blocks. -# -# source://rdoc//lib/rdoc/rd/block_parser.rb#660 -class RDoc::RD::BlockParser < ::Racc::Parser - # Creates a new RDoc::RD::BlockParser. Use #parse to parse an rd-format - # document. - # - # @return [BlockParser] a new instance of BlockParser - # - # source://rdoc//lib/rdoc/rd/block_parser.rb#695 - def initialize; end - - # reduce 0 omitted - # - # source://rdoc//lib/rdoc/rd/block_parser.rb#1330 - def _reduce_1(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1372 - def _reduce_10(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1377 - def _reduce_11(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1382 - def _reduce_12(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1390 - def _reduce_13(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1396 - def _reduce_14(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1403 - def _reduce_15(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1408 - def _reduce_16(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1413 - def _reduce_17(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1424 - def _reduce_18(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1435 - def _reduce_19(val, _values, result); end - - # @raise [ParseError] - # - # source://rdoc//lib/rdoc/rd/block_parser.rb#1335 - def _reduce_2(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1441 - def _reduce_20(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1447 - def _reduce_21(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1453 - def _reduce_22(val, _values, result); end - - # reduce 26 omitted - # - # source://rdoc//lib/rdoc/rd/block_parser.rb#1469 - def _reduce_27(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1475 - def _reduce_28(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1481 - def _reduce_29(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1340 - def _reduce_3(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1487 - def _reduce_30(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1492 - def _reduce_31(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1497 - def _reduce_32(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1503 - def _reduce_33(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1508 - def _reduce_34(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1513 - def _reduce_35(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1519 - def _reduce_36(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1525 - def _reduce_37(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1530 - def _reduce_38(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1535 - def _reduce_39(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1345 - def _reduce_4(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1541 - def _reduce_40(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1547 - def _reduce_41(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1552 - def _reduce_42(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1557 - def _reduce_43(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1565 - def _reduce_44(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1571 - def _reduce_45(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1576 - def _reduce_46(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1581 - def _reduce_47(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1587 - def _reduce_48(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1593 - def _reduce_49(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1350 - def _reduce_5(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1599 - def _reduce_50(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1605 - def _reduce_51(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1611 - def _reduce_52(val, _values, result); end - - # reduce 53 omitted - # - # source://rdoc//lib/rdoc/rd/block_parser.rb#1618 - def _reduce_54(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1623 - def _reduce_55(val, _values, result); end - - # reduce 56 omitted - # - # source://rdoc//lib/rdoc/rd/block_parser.rb#1630 - def _reduce_57(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1355 - def _reduce_6(val, _values, result); end - - # reduce 61 omitted - # - # source://rdoc//lib/rdoc/rd/block_parser.rb#1643 - def _reduce_62(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1649 - def _reduce_63(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1655 - def _reduce_64(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1661 - def _reduce_65(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1667 - def _reduce_66(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1673 - def _reduce_67(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1678 - def _reduce_68(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1683 - def _reduce_69(val, _values, result); end - - # reduce 70 omitted - # - # source://rdoc//lib/rdoc/rd/block_parser.rb#1690 - def _reduce_71(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1695 - def _reduce_72(val, _values, result); end - - # reduce 7 omitted - # - # source://rdoc//lib/rdoc/rd/block_parser.rb#1362 - def _reduce_8(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1367 - def _reduce_9(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#1700 - def _reduce_none(val, _values, result); end - - # Adds footnote +content+ to the document - # - # source://rdoc//lib/rdoc/rd/block_parser.rb#1045 - def add_footnote(content); end - - # Adds label +label+ to the document - # - # source://rdoc//lib/rdoc/rd/block_parser.rb#1059 - def add_label(label); end - - # Retrieves the content of +values+ as a single String - # - # source://rdoc//lib/rdoc/rd/block_parser.rb#1028 - def content(values); end - - # Footnotes for this document - # - # source://rdoc//lib/rdoc/rd/block_parser.rb#679 - def footnotes; end - - # Path to find included files in - # - # source://rdoc//lib/rdoc/rd/block_parser.rb#689 - def include_path; end - - # Path to find included files in - # - # source://rdoc//lib/rdoc/rd/block_parser.rb#689 - def include_path=(_arg0); end - - # Labels for items in this document - # - # source://rdoc//lib/rdoc/rd/block_parser.rb#684 - def labels; end - - # Current line number - # - # source://rdoc//lib/rdoc/rd/block_parser.rb#983 - def line_index; end - - # Returns the next token from the document - # - # source://rdoc//lib/rdoc/rd/block_parser.rb#751 - def next_token; end - - # Raises a ParseError when invalid formatting is found - # - # @raise [ParseError] - # - # source://rdoc//lib/rdoc/rd/block_parser.rb#967 - def on_error(et, ev, _values); end - - # Creates a paragraph for +value+ - # - # source://rdoc//lib/rdoc/rd/block_parser.rb#1035 - def paragraph(value); end - - # Parses +src+ and returns an RDoc::Markup::Document. - # - # source://rdoc//lib/rdoc/rd/block_parser.rb#707 - def parse(src); end - - private - - # Cuts off excess whitespace in +src+ - # - # source://rdoc//lib/rdoc/rd/block_parser.rb#931 - def cut_off(src); end - - # Formats line numbers +line_numbers+ prettily - # - # source://rdoc//lib/rdoc/rd/block_parser.rb#1019 - def format_line_num(*line_numbers); end - - # Retrieves the content for +file+ from the include_path - # - # source://rdoc//lib/rdoc/rd/block_parser.rb#1000 - def get_included(file); end - - # Yields to the given block if +indent+ matches the current indent, otherwise - # an indentation token is processed. - # - # source://rdoc//lib/rdoc/rd/block_parser.rb#913 - def if_current_indent_equal(indent); end - - # Parses subtree +src+ - # - # source://rdoc//lib/rdoc/rd/block_parser.rb#990 - def parse_subtree(src); end - - # source://rdoc//lib/rdoc/rd/block_parser.rb#958 - def set_term_to_element(parent, term); end -end - -# source://rdoc//lib/rdoc/rd/block_parser.rb#1324 -RDoc::RD::BlockParser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) - -# Inline keeps track of markup and labels to create proper links. -# -# source://rdoc//lib/rdoc/rd/inline.rb#5 -class RDoc::RD::Inline - # Initializes the Inline with +rdoc+ and +inline+ - # - # @return [Inline] a new instance of Inline - # - # source://rdoc//lib/rdoc/rd/inline.rb#34 - def initialize(rdoc, reference); end - - # source://rdoc//lib/rdoc/rd/inline.rb#42 - def ==(other); end - - # Appends +more+ to this inline. +more+ may be a String or another Inline. - # - # source://rdoc//lib/rdoc/rd/inline.rb#50 - def append(more); end - - # source://rdoc//lib/rdoc/rd/inline.rb#65 - def inspect; end - - # The markup of this reference in RDoc format - # - # source://rdoc//lib/rdoc/rd/inline.rb#15 - def rdoc; end - - # The text of the reference - # - # source://rdoc//lib/rdoc/rd/inline.rb#10 - def reference; end - - # The markup of this reference in RDoc format - # - # source://rdoc//lib/rdoc/rd/inline.rb#15 - def to_s; end - - class << self - # Creates a new Inline for +rdoc+ and +reference+. - # - # +rdoc+ may be another Inline or a String. If +reference+ is not given it - # will use the text from +rdoc+. - # - # source://rdoc//lib/rdoc/rd/inline.rb#23 - def new(rdoc, reference = T.unsafe(nil)); end - end -end - -# RD format parser for inline markup such as emphasis, links, footnotes, etc. -# -# source://rdoc//lib/rdoc/rd/inline_parser.rb#661 -class RDoc::RD::InlineParser < ::Racc::Parser - # Creates a new parser for inline markup in the rd format. The +block_parser+ - # is used to for footnotes and labels in the inline text. - # - # @return [InlineParser] a new instance of InlineParser - # - # source://rdoc//lib/rdoc/rd/inline_parser.rb#734 - def initialize(block_parser); end - - # reduce 100 omitted - # - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1746 - def _reduce_101(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1753 - def _reduce_102(val, _values, result); end - - # reduce 108 omitted - # - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1771 - def _reduce_109(val, _values, result); end - - # reduce 110 omitted - # - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1778 - def _reduce_111(val, _values, result); end - - # reduce 112 omitted - # - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1786 - def _reduce_113(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1791 - def _reduce_114(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1796 - def _reduce_115(val, _values, result); end - - # reduce 12 omitted - # - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1409 - def _reduce_13(val, _values, result); end - - # reduce 135 omitted - # - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1841 - def _reduce_136(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1416 - def _reduce_14(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1423 - def _reduce_15(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1430 - def _reduce_16(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1437 - def _reduce_17(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1445 - def _reduce_18(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1451 - def _reduce_19(val, _values, result); end - - # reduce 1 omitted - # - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1381 - def _reduce_2(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1459 - def _reduce_20(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1465 - def _reduce_21(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1474 - def _reduce_22(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1480 - def _reduce_23(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1486 - def _reduce_24(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1492 - def _reduce_25(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1501 - def _reduce_26(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1507 - def _reduce_27(val, _values, result); end - - # reduce 28 omitted - # - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1516 - def _reduce_29(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1386 - def _reduce_3(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1521 - def _reduce_30(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1526 - def _reduce_31(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1532 - def _reduce_32(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1538 - def _reduce_33(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1544 - def _reduce_34(val, _values, result); end - - # reduce 35 omitted - # - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1552 - def _reduce_36(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1557 - def _reduce_37(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1562 - def _reduce_38(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1568 - def _reduce_39(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1574 - def _reduce_40(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1580 - def _reduce_41(val, _values, result); end - - # reduce 42 omitted - # - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1588 - def _reduce_43(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1594 - def _reduce_44(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1600 - def _reduce_45(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1606 - def _reduce_46(val, _values, result); end - - # reduce 56 omitted - # - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1632 - def _reduce_57(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1638 - def _reduce_58(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1644 - def _reduce_59(val, _values, result); end - - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1650 - def _reduce_60(val, _values, result); end - - # reduce 61 omitted - # - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1657 - def _reduce_62(val, _values, result); end - - # reduce 63 omitted - # - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1665 - def _reduce_64(val, _values, result); end - - # reduce 77 omitted - # - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1697 - def _reduce_78(val, _values, result); end - - # reduce 137 omitted - # - # source://rdoc//lib/rdoc/rd/inline_parser.rb#1848 - def _reduce_none(val, _values, result); end - - # Creates a new RDoc::RD::Inline for the +rdoc+ markup and the raw +reference+ - # - # source://rdoc//lib/rdoc/rd/inline_parser.rb#883 - def inline(rdoc, reference = T.unsafe(nil)); end - - # Returns the next token from the inline text - # - # source://rdoc//lib/rdoc/rd/inline_parser.rb#752 - def next_token; end - - # Returns words following an error - # - # source://rdoc//lib/rdoc/rd/inline_parser.rb#872 - def next_words_on_error; end - - # Raises a ParseError when invalid formatting is found - # - # @raise [ParseError] - # - # source://rdoc//lib/rdoc/rd/inline_parser.rb#832 - def on_error(et, ev, values); end - - # Parses the +inline+ text from RD format into RDoc format. - # - # source://rdoc//lib/rdoc/rd/inline_parser.rb#741 - def parse(inline); end - - # Returns words before the error - # - # source://rdoc//lib/rdoc/rd/inline_parser.rb#849 - def prev_words_on_error(ev); end - - private - - # Returns the last line of +src+ - # - # source://rdoc//lib/rdoc/rd/inline_parser.rb#860 - def last_line(src); end -end - -# source://rdoc//lib/rdoc/rd/inline_parser.rb#1373 -RDoc::RD::InlineParser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) - -# This is the driver for generating RDoc output. It handles file parsing and -# generation of output. -# -# To use this class to generate RDoc output via the API, the recommended way -# is: -# -# rdoc = RDoc::RDoc.new -# options = RDoc::Options.load_options # returns an RDoc::Options instance -# # set extra options -# rdoc.document options -# -# You can also generate output like the +rdoc+ executable: -# -# rdoc = RDoc::RDoc.new -# rdoc.document argv -# -# Where +argv+ is an array of strings, each corresponding to an argument you'd -# give rdoc on the command line. See rdoc --help for details. -# -# source://rdoc//lib/rdoc/rdoc.rb#29 -class RDoc::RDoc - # Creates a new RDoc::RDoc instance. Call #document to parse files and - # generate documentation. - # - # @return [RDoc] a new instance of RDoc - # - # source://rdoc//lib/rdoc/rdoc.rb#100 - def initialize; end - - # Generates documentation or a coverage report depending upon the settings - # in +options+. - # - # +options+ can be either an RDoc::Options instance or an array of strings - # equivalent to the strings that would be passed on the command line like - # %w[-q -o doc -t My\ Doc\ Title]. #document will automatically - # call RDoc::Options#finish if an options instance was given. - # - # For a list of options, see either RDoc::Options or rdoc --help. - # - # By default, output will be stored in a directory called "doc" below the - # current directory, so make sure you're somewhere writable before invoking. - # - # source://rdoc//lib/rdoc/rdoc.rb#452 - def document(options); end - - # Report an error message and exit - # - # @raise [RDoc::Error] - # - # source://rdoc//lib/rdoc/rdoc.rb#113 - def error(msg); end - - # Gathers a set of parseable files from the files and directories listed in - # +files+. - # - # source://rdoc//lib/rdoc/rdoc.rb#121 - def gather_files(files); end - - # Generates documentation for +file_info+ (from #parse_files) into the - # output dir using the generator selected - # by the RDoc options - # - # source://rdoc//lib/rdoc/rdoc.rb#517 - def generate; end - - # Generator instance used for creating output - # - # source://rdoc//lib/rdoc/rdoc.rb#52 - def generator; end - - # Generator instance used for creating output - # - # source://rdoc//lib/rdoc/rdoc.rb#52 - def generator=(_arg0); end - - # Turns RDoc from stdin into HTML - # - # source://rdoc//lib/rdoc/rdoc.rb#142 - def handle_pipe; end - - # Installs a siginfo handler that prints the current filename. - # - # source://rdoc//lib/rdoc/rdoc.rb#157 - def install_siginfo_handler; end - - # Hash of files and their last modified times. - # - # source://rdoc//lib/rdoc/rdoc.rb#57 - def last_modified; end - - # Return a list of the files to be processed in a directory. We know that - # this directory doesn't have a .document file, so we're looking for real - # files. However we may well contain subdirectories which must be tested - # for .document files. - # - # source://rdoc//lib/rdoc/rdoc.rb#323 - def list_files_in_directory(dir); end - - # Given a list of files and directories, create a list of all the Ruby - # files they contain. - # - # If +force_doc+ is true we always add the given files, if false, only - # add files that we guarantee we can parse. It is true when looking at - # files given on the command line, false when recursing through - # subdirectories. - # - # The effect of this is that if you want a file with a non-standard - # extension parsed, you must name it explicitly. - # - # source://rdoc//lib/rdoc/rdoc.rb#275 - def normalized_file_list(relative_files, force_doc = T.unsafe(nil), exclude_pattern = T.unsafe(nil)); end - - # RDoc options - # - # source://rdoc//lib/rdoc/rdoc.rb#62 - def options; end - - # RDoc options - # - # source://rdoc//lib/rdoc/rdoc.rb#62 - def options=(_arg0); end - - # Return the path name of the flag file in an output directory. - # - # source://rdoc//lib/rdoc/rdoc.rb#240 - def output_flag_file(op_dir); end - - # The .document file contains a list of file and directory name patterns, - # representing candidates for documentation. It may also contain comments - # (starting with '#') - # - # source://rdoc//lib/rdoc/rdoc.rb#249 - def parse_dot_doc_file(in_dir, filename); end - - # Parses +filename+ and returns an RDoc::TopLevel - # - # source://rdoc//lib/rdoc/rdoc.rb#332 - def parse_file(filename); end - - # Parse each file on the command line, recursively entering directories. - # - # source://rdoc//lib/rdoc/rdoc.rb#403 - def parse_files(files); end - - # Removes a siginfo handler and replaces the previous - # - # source://rdoc//lib/rdoc/rdoc.rb#537 - def remove_siginfo_handler; end - - # Removes file extensions known to be unparseable from +files+ and TAGS - # files for emacs and vim. - # - # source://rdoc//lib/rdoc/rdoc.rb#430 - def remove_unparseable(files); end - - # Create an output dir if it doesn't exist. If it does exist, but doesn't - # contain the flag file created.rid then we refuse to use it, as - # we may clobber some manually generated documentation - # - # source://rdoc//lib/rdoc/rdoc.rb#170 - def setup_output_dir(dir, force); end - - # Accessor for statistics. Available after each call to parse_files - # - # source://rdoc//lib/rdoc/rdoc.rb#67 - def stats; end - - # The current documentation store - # - # source://rdoc//lib/rdoc/rdoc.rb#72 - def store; end - - # Sets the current documentation tree to +store+ and sets the store's rdoc - # driver to this instance. - # - # source://rdoc//lib/rdoc/rdoc.rb#215 - def store=(store); end - - # Update the flag file in an output directory. - # - # source://rdoc//lib/rdoc/rdoc.rb#223 - def update_output_dir(op_dir, time, last = T.unsafe(nil)); end - - class << self - # Add +klass+ that can generate output after parsing - # - # source://rdoc//lib/rdoc/rdoc.rb#77 - def add_generator(klass); end - - # Active RDoc::RDoc instance - # - # source://rdoc//lib/rdoc/rdoc.rb#85 - def current; end - - # Sets the active RDoc::RDoc instance - # - # source://rdoc//lib/rdoc/rdoc.rb#92 - def current=(rdoc); end - end -end - -# List of directory names skipped if test suites should be skipped -# -# source://rdoc//lib/rdoc/rdoc.rb#46 -RDoc::RDoc::TEST_SUITE_DIRECTORY_NAMES = T.let(T.unsafe(nil), Array) - -# List of directory names always skipped -# -# source://rdoc//lib/rdoc/rdoc.rb#41 -RDoc::RDoc::UNCONDITIONALLY_SKIPPED_DIRECTORIES = T.let(T.unsafe(nil), Array) - -# The RI driver implements the command-line ri tool. -# -# The driver supports: -# * loading RI data from: -# * Ruby's standard library -# * RubyGems -# * ~/.rdoc -# * A user-supplied directory -# * Paging output (uses RI_PAGER environment variable, PAGER environment -# variable or the less, more and pager programs) -# * Interactive mode with tab-completion -# * Abbreviated names (ri Zl shows Zlib documentation) -# * Colorized output -# * Merging output from multiple RI data sources -# -# source://rdoc//lib/rdoc/ri/driver.rb#25 -class RDoc::RI::Driver - # Creates a new driver using +initial_options+ from ::process_args - # - # @return [Driver] a new instance of Driver - # - # source://rdoc//lib/rdoc/ri/driver.rb#402 - def initialize(initial_options = T.unsafe(nil)); end - - # Adds paths for undocumented classes +also_in+ to +out+ - # - # source://rdoc//lib/rdoc/ri/driver.rb#441 - def add_also_in(out, also_in); end - - # Adds a class header to +out+ for class +name+ which is described in - # +classes+. - # - # source://rdoc//lib/rdoc/ri/driver.rb#458 - def add_class(out, name, classes); end - - # Adds +extends+ to +out+ - # - # source://rdoc//lib/rdoc/ri/driver.rb#485 - def add_extends(out, extends); end - - # Adds a list of +extensions+ to this module of the given +type+ to +out+. - # add_includes and add_extends call this, so you should use those directly. - # - # source://rdoc//lib/rdoc/ri/driver.rb#493 - def add_extension_modules(out, type, extensions); end - - # Renders multiple included +modules+ from +store+ to +out+. - # - # source://rdoc//lib/rdoc/ri/driver.rb#511 - def add_extension_modules_multiple(out, store, modules); end - - # Adds a single extension module +include+ from +store+ to +out+ - # - # source://rdoc//lib/rdoc/ri/driver.rb#538 - def add_extension_modules_single(out, store, include); end - - # Adds "(from ...)" to +out+ for +store+ - # - # source://rdoc//lib/rdoc/ri/driver.rb#478 - def add_from(out, store); end - - # Adds +includes+ to +out+ - # - # source://rdoc//lib/rdoc/ri/driver.rb#552 - def add_includes(out, includes); end - - # Looks up the method +name+ and adds it to +out+ - # - # source://rdoc//lib/rdoc/ri/driver.rb#559 - def add_method(out, name); end - - # Adds documentation for all methods in +klass+ to +out+ - # - # source://rdoc//lib/rdoc/ri/driver.rb#567 - def add_method_documentation(out, klass); end - - # Adds a list of +methods+ to +out+ with a heading of +name+ - # - # source://rdoc//lib/rdoc/ri/driver.rb#580 - def add_method_list(out, methods, name); end - - # Returns ancestor classes of +klass+ - # - # source://rdoc//lib/rdoc/ri/driver.rb#600 - def ancestors_of(klass); end - - # source://rdoc//lib/rdoc/ri/driver.rb#938 - def check_did_you_mean; end - - # For RubyGems backwards compatibility - # - # source://rdoc//lib/rdoc/ri/driver.rb#631 - def class_cache; end - - # Builds a RDoc::Markup::Document from +found+, +klasess+ and +includes+ - # - # source://rdoc//lib/rdoc/ri/driver.rb#637 - def class_document(name, found, klasses, includes, extends); end - - # Adds the class +comment+ to +out+. - # - # source://rdoc//lib/rdoc/ri/driver.rb#660 - def class_document_comment(out, document); end - - # Adds the constants from +klass+ to the Document +out+. - # - # source://rdoc//lib/rdoc/ri/driver.rb#680 - def class_document_constants(out, klass); end - - # Hash mapping a known class or module to the stores it can be loaded from - # - # source://rdoc//lib/rdoc/ri/driver.rb#704 - def classes; end - - # Returns the stores wherein +name+ is found along with the classes, - # extends and includes that match it - # - # source://rdoc//lib/rdoc/ri/driver.rb#724 - def classes_and_includes_and_extends_for(name); end - - # Completes +name+ based on the caches. For Readline - # - # source://rdoc//lib/rdoc/ri/driver.rb#749 - def complete(name); end - - # source://rdoc//lib/rdoc/ri/driver.rb#760 - def complete_klass(name, klass, selector, method, completions); end - - # source://rdoc//lib/rdoc/ri/driver.rb#779 - def complete_method(name, klass, selector, completions); end - - # Converts +document+ to text and writes it to the pager - # - # source://rdoc//lib/rdoc/ri/driver.rb#799 - def display(document); end - - # Outputs formatted RI data for class +name+. Groups undocumented classes - # - # source://rdoc//lib/rdoc/ri/driver.rb#812 - def display_class(name); end - - # Outputs formatted RI data for method +name+ - # - # source://rdoc//lib/rdoc/ri/driver.rb#828 - def display_method(name); end - - # Outputs formatted RI data for the class or method +name+. - # - # Returns true if +name+ was found, false if it was not an alternative could - # be guessed, raises an error if +name+ couldn't be guessed. - # - # source://rdoc//lib/rdoc/ri/driver.rb#844 - def display_name(name); end - - # Displays each name in +name+ - # - # source://rdoc//lib/rdoc/ri/driver.rb#873 - def display_names(names); end - - # Outputs formatted RI data for page +name+. - # - # source://rdoc//lib/rdoc/ri/driver.rb#884 - def display_page(name); end - - # Outputs a formatted RI page list for the pages in +store+. - # - # source://rdoc//lib/rdoc/ri/driver.rb#915 - def display_page_list(store, pages = T.unsafe(nil), search = T.unsafe(nil)); end - - # Expands abbreviated klass +klass+ into a fully-qualified class. "Zl::Da" - # will be expanded to Zlib::DataError. - # - # source://rdoc//lib/rdoc/ri/driver.rb#959 - def expand_class(klass); end - - # Expands the class portion of +name+ into a fully-qualified class. See - # #expand_class. - # - # source://rdoc//lib/rdoc/ri/driver.rb#977 - def expand_name(name); end - - # source://rdoc//lib/rdoc/ri/driver.rb#1526 - def expand_rdoc_refs_at_the_bottom(out); end - - # Filters the methods in +found+ trying to find a match for +name+. - # - # source://rdoc//lib/rdoc/ri/driver.rb#993 - def filter_methods(found, name); end - - # Yields items matching +name+ including the store they were found in, the - # class being searched for, the class they were found in (an ancestor) the - # types of methods to look up (from #method_type), and the method name being - # searched for - # - # source://rdoc//lib/rdoc/ri/driver.rb#1011 - def find_methods(name); end - - # Finds a store that matches +name+ which can be the name of a gem, "ruby", - # "home" or "site". - # - # See also RDoc::Store#source - # - # @raise [RDoc::RI::Driver::NotFoundError] - # - # source://rdoc//lib/rdoc/ri/driver.rb#1057 - def find_store(name); end - - # Creates a new RDoc::Markup::Formatter. If a formatter is given with -f, - # use it. If we're outputting to a pager, use bs, otherwise ansi. - # - # source://rdoc//lib/rdoc/ri/driver.rb#1074 - def formatter(io); end - - # Runs ri interactively using Readline if it is available. - # - # source://rdoc//lib/rdoc/ri/driver.rb#1087 - def interactive; end - - # Lists classes known to ri starting with +names+. If +names+ is empty all - # known classes are shown. - # - # source://rdoc//lib/rdoc/ri/driver.rb#1126 - def list_known_classes(names = T.unsafe(nil)); end - - # Returns an Array of methods matching +name+ - # - # source://rdoc//lib/rdoc/ri/driver.rb#1158 - def list_methods_matching(name); end - - # Loads RI data for method +name+ on +klass+ from +store+. +type+ and - # +cache+ indicate if it is a class or instance method. - # - # source://rdoc//lib/rdoc/ri/driver.rb#1197 - def load_method(store, cache, klass, type, name); end - - # Returns an Array of RI data for methods matching +name+ - # - # source://rdoc//lib/rdoc/ri/driver.rb#1221 - def load_methods_matching(name); end - - # Returns a filtered list of methods matching +name+ - # - # source://rdoc//lib/rdoc/ri/driver.rb#1242 - def lookup_method(name); end - - # Builds a RDoc::Markup::Document from +found+, +klasses+ and +includes+ - # - # source://rdoc//lib/rdoc/ri/driver.rb#1267 - def method_document(out, name, filtered); end - - # Returns the type of method (:both, :instance, :class) for +selector+ - # - # source://rdoc//lib/rdoc/ri/driver.rb#1283 - def method_type(selector); end - - # Returns a regular expression for +name+ that will match an - # RDoc::AnyMethod's name. - # - # source://rdoc//lib/rdoc/ri/driver.rb#1295 - def name_regexp(name); end - - # Paginates output through a pager program. - # - # source://rdoc//lib/rdoc/ri/driver.rb#1309 - def page; end - - # Are we using a pager? - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/ri/driver.rb#1327 - def paging?; end - - # Extracts the class, selector and method name parts from +name+ like - # Foo::Bar#baz. - # - # NOTE: Given Foo::Bar, Bar is considered a class even though it may be a - # method - # - # source://rdoc//lib/rdoc/ri/driver.rb#1338 - def parse_name(name); end - - # Renders the +klass+ from +store+ to +out+. If the klass has no - # documentable items the class is added to +also_in+ instead. - # - # source://rdoc//lib/rdoc/ri/driver.rb#1370 - def render_class(out, store, klass, also_in); end - - # source://rdoc//lib/rdoc/ri/driver.rb#1400 - def render_method(out, store, method, name); end - - # source://rdoc//lib/rdoc/ri/driver.rb#1420 - def render_method_arguments(out, arglists); end - - # source://rdoc//lib/rdoc/ri/driver.rb#1429 - def render_method_comment(out, method, alias_for = T.unsafe(nil)); end - - # source://rdoc//lib/rdoc/ri/driver.rb#1447 - def render_method_superclass(out, method); end - - # Looks up and displays ri data according to the options given. - # - # source://rdoc//lib/rdoc/ri/driver.rb#1459 - def run; end - - # Sets up a pager program to pass output through. Tries the RI_PAGER and - # PAGER environment variables followed by pager, less then more. - # - # source://rdoc//lib/rdoc/ri/driver.rb#1479 - def setup_pager; end - - # Show all method documentation following a class or module - # - # source://rdoc//lib/rdoc/ri/driver.rb#62 - def show_all; end - - # Show all method documentation following a class or module - # - # source://rdoc//lib/rdoc/ri/driver.rb#62 - def show_all=(_arg0); end - - # Starts a WEBrick server for ri. - # - # source://rdoc//lib/rdoc/ri/driver.rb#1505 - def start_server; end - - # An RDoc::RI::Store for each entry in the RI path - # - # source://rdoc//lib/rdoc/ri/driver.rb#67 - def stores; end - - # An RDoc::RI::Store for each entry in the RI path - # - # source://rdoc//lib/rdoc/ri/driver.rb#67 - def stores=(_arg0); end - - # Controls the user of the pager vs $stdout - # - # source://rdoc//lib/rdoc/ri/driver.rb#72 - def use_stdout; end - - # Controls the user of the pager vs $stdout - # - # source://rdoc//lib/rdoc/ri/driver.rb#72 - def use_stdout=(_arg0); end - - class << self - # Default options for ri - # - # source://rdoc//lib/rdoc/ri/driver.rb#77 - def default_options; end - - # Dump +data_path+ using pp - # - # source://rdoc//lib/rdoc/ri/driver.rb#99 - def dump(data_path); end - - # Parses +argv+ and returns a Hash of options - # - # source://rdoc//lib/rdoc/ri/driver.rb#110 - def process_args(argv); end - - # Runs the ri command line executable using +argv+ - # - # source://rdoc//lib/rdoc/ri/driver.rb#387 - def run(argv = T.unsafe(nil)); end - end -end - -# Raised when a name isn't found in the ri data stores -# -# source://rdoc//lib/rdoc/ri/driver.rb#35 -class RDoc::RI::Driver::NotFoundError < ::RDoc::RI::Driver::Error - # @return [NotFoundError] a new instance of NotFoundError - # - # source://rdoc//lib/rdoc/ri/driver.rb#37 - def initialize(klass, suggestion_proc = T.unsafe(nil)); end - - # source://rdoc//lib/rdoc/ri/driver.rb#49 - def message; end - - # Name that wasn't found - # - # source://rdoc//lib/rdoc/ri/driver.rb#45 - def name; end -end - -# source://rdoc//lib/rdoc/ri/driver.rb#1524 -RDoc::RI::Driver::RDOC_REFS_REGEXP = T.let(T.unsafe(nil), Regexp) - -# For RubyGems backwards compatibility -# -# source://rdoc//lib/rdoc/ri/formatter.rb#5 -module RDoc::RI::Formatter; end - -# The directories where ri data lives. Paths can be enumerated via ::each, or -# queried individually via ::system_dir, ::site_dir, ::home_dir and ::gem_dir. -# -# source://rdoc//lib/rdoc/ri/paths.rb#8 -module RDoc::RI::Paths - class << self - # Iterates over each selected path yielding the directory and type. - # - # Yielded types: - # :system:: Where Ruby's ri data is stored. Yielded when +system+ is - # true - # :site:: Where ri for installed libraries are stored. Yielded when - # +site+ is true. Normally no ri data is stored here. - # :home:: ~/.rdoc. Yielded when +home+ is true. - # :gem:: ri data for an installed gem. Yielded when +gems+ is true. - # :extra:: ri data directory from the command line. Yielded for each - # entry in +extra_dirs+ - # - # @yield [system_dir, :system] - # - # source://rdoc//lib/rdoc/ri/paths.rb#33 - def each(system = T.unsafe(nil), site = T.unsafe(nil), home = T.unsafe(nil), gems = T.unsafe(nil), *extra_dirs); end - - # The ri directory for the gem with +gem_name+. - # - # source://rdoc//lib/rdoc/ri/paths.rb#55 - def gem_dir(name, version); end - - # The latest installed gems' ri directories. +filter+ can be :all or - # :latest. - # - # A +filter+ :all includes all versions of gems and includes gems without - # ri documentation. - # - # source://rdoc//lib/rdoc/ri/paths.rb#70 - def gemdirs(filter = T.unsafe(nil)); end - - # The location of the rdoc data in the user's home directory. - # - # Like ::system, ri data in the user's home directory is rare and predates - # libraries distributed via RubyGems. ri data is rarely generated into this - # directory. - # - # source://rdoc//lib/rdoc/ri/paths.rb#115 - def home_dir; end - - # Returns existing directories from the selected documentation directories - # as an Array. - # - # See also ::each - # - # source://rdoc//lib/rdoc/ri/paths.rb#125 - def path(system = T.unsafe(nil), site = T.unsafe(nil), home = T.unsafe(nil), gems = T.unsafe(nil), *extra_dirs); end - - # Returns selected documentation directories including nonexistent - # directories. - # - # See also ::each - # - # source://rdoc//lib/rdoc/ri/paths.rb#137 - def raw_path(system, site, home, gems, *extra_dirs); end - - # The location of ri data installed into the site dir. - # - # Historically this was available for documentation installed by Ruby - # libraries predating RubyGems. It is unlikely to contain any content for - # modern Ruby installations. - # - # source://rdoc//lib/rdoc/ri/paths.rb#154 - def site_dir; end - - # The location of the built-in ri data. - # - # This data is built automatically when `make` is run when Ruby is - # installed. If you did not install Ruby by hand you may need to install - # the documentation yourself. Please consult the documentation for your - # package manager or Ruby installer for details. You can also use the - # rdoc-data gem to install system ri data for common versions of Ruby. - # - # source://rdoc//lib/rdoc/ri/paths.rb#167 - def system_dir; end - end -end - -# source://rdoc//lib/rdoc/ri/store.rb#4 -RDoc::RI::Store = RDoc::Store - -# A file loaded by \#require -# -# source://rdoc//lib/rdoc/code_object/require.rb#5 -class RDoc::Require < ::RDoc::CodeObject - # Creates a new Require that loads +name+ with +comment+ - # - # @return [Require] a new instance of Require - # - # source://rdoc//lib/rdoc/code_object/require.rb#15 - def initialize(name, comment); end - - # source://rdoc//lib/rdoc/code_object/require.rb#22 - def inspect; end - - # Name of the required file - # - # source://rdoc//lib/rdoc/code_object/require.rb#10 - def name; end - - # Name of the required file - # - # source://rdoc//lib/rdoc/code_object/require.rb#10 - def name=(_arg0); end - - # source://rdoc//lib/rdoc/code_object/require.rb#31 - def to_s; end - - # The RDoc::TopLevel corresponding to this require, or +nil+ if not found. - # - # source://rdoc//lib/rdoc/code_object/require.rb#38 - def top_level; end -end - -# A singleton class -# -# source://rdoc//lib/rdoc/code_object/single_class.rb#5 -class RDoc::SingleClass < ::RDoc::ClassModule - # Adds the superclass to the included modules. - # - # source://rdoc//lib/rdoc/code_object/single_class.rb#10 - def ancestors; end - - # source://rdoc//lib/rdoc/code_object/single_class.rb#14 - def aref_prefix; end - - # The definition of this singleton class, class << MyClassName - # - # source://rdoc//lib/rdoc/code_object/single_class.rb#21 - def definition; end - - # source://rdoc//lib/rdoc/code_object/single_class.rb#25 - def pretty_print(q); end -end - -# RDoc statistics collector which prints a summary and report of a project's -# documentation totals. -# -# source://rdoc//lib/rdoc/stats.rb#6 -class RDoc::Stats - include ::RDoc::Text - - # Creates a new Stats that will have +num_files+. +verbosity+ defaults to 1 - # which will create an RDoc::Stats::Normal outputter. - # - # @return [Stats] a new instance of Stats - # - # source://rdoc//lib/rdoc/stats.rb#29 - def initialize(store, num_files, verbosity = T.unsafe(nil)); end - - # Records the parsing of an alias +as+. - # - # source://rdoc//lib/rdoc/stats.rb#52 - def add_alias(as); end - - # Records the parsing of an attribute +attribute+ - # - # source://rdoc//lib/rdoc/stats.rb#59 - def add_attribute(attribute); end - - # Records the parsing of a class +klass+ - # - # source://rdoc//lib/rdoc/stats.rb#66 - def add_class(klass); end - - # Records the parsing of +constant+ - # - # source://rdoc//lib/rdoc/stats.rb#73 - def add_constant(constant); end - - # Records the parsing of +file+ - # - # source://rdoc//lib/rdoc/stats.rb#80 - def add_file(file); end - - # Records the parsing of +method+ - # - # source://rdoc//lib/rdoc/stats.rb#88 - def add_method(method); end - - # Records the parsing of a module +mod+ - # - # source://rdoc//lib/rdoc/stats.rb#95 - def add_module(mod); end - - # Call this to mark the beginning of parsing for display purposes - # - # source://rdoc//lib/rdoc/stats.rb#102 - def begin_adding; end - - # Calculates documentation totals and percentages for classes, modules, - # constants, attributes and methods. - # - # source://rdoc//lib/rdoc/stats.rb#110 - def calculate; end - - # Output level for the coverage report - # - # source://rdoc//lib/rdoc/stats.rb#13 - def coverage_level; end - - # Sets coverage report level. Accepted values are: - # - # false or nil:: No report - # 0:: Classes, modules, constants, attributes, methods - # 1:: Level 0 + method parameters - # - # source://rdoc//lib/rdoc/stats.rb#158 - def coverage_level=(level); end - - # Returns the length and number of undocumented items in +collection+. - # - # source://rdoc//lib/rdoc/stats.rb#167 - def doc_stats(collection); end - - # Call this to mark the end of parsing for display purposes - # - # source://rdoc//lib/rdoc/stats.rb#175 - def done_adding; end - - # Count of files parsed during parsing - # - # source://rdoc//lib/rdoc/stats.rb#18 - def files_so_far; end - - # The documentation status of this project. +true+ when 100%, +false+ when - # less than 100% and +nil+ when unknown. - # - # Set by calling #calculate - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/stats.rb#185 - def fully_documented?; end - - # A report that says you did a great job! - # - # source://rdoc//lib/rdoc/stats.rb#192 - def great_job; end - - # Total number of files found - # - # source://rdoc//lib/rdoc/stats.rb#23 - def num_files; end - - # Calculates the percentage of items documented. - # - # source://rdoc//lib/rdoc/stats.rb#204 - def percent_doc; end - - # Returns a report on which items are not documented - # - # source://rdoc//lib/rdoc/stats.rb#218 - def report; end - - # Returns a report on undocumented attributes in ClassModule +cm+ - # - # source://rdoc//lib/rdoc/stats.rb#259 - def report_attributes(cm); end - - # Returns a report on undocumented items in ClassModule +cm+ - # - # source://rdoc//lib/rdoc/stats.rb#277 - def report_class_module(cm); end - - # Returns a report on undocumented constants in ClassModule +cm+ - # - # source://rdoc//lib/rdoc/stats.rb#329 - def report_constants(cm); end - - # Returns a report on undocumented methods in ClassModule +cm+ - # - # source://rdoc//lib/rdoc/stats.rb#351 - def report_methods(cm); end - - # Returns a summary of the collected statistics. - # - # source://rdoc//lib/rdoc/stats.rb#389 - def summary; end - - # Determines which parameters in +method+ were not documented. Returns a - # total parameter count and an Array of undocumented methods. - # - # source://rdoc//lib/rdoc/stats.rb#439 - def undoc_params(method); end -end - -# Stats printer that prints just the files being documented with a progress -# bar -# -# source://rdoc//lib/rdoc/stats/normal.rb#13 -class RDoc::Stats::Normal < ::RDoc::Stats::Quiet - # source://rdoc//lib/rdoc/stats/normal.rb#15 - def begin_adding; end - - # source://rdoc//lib/rdoc/stats/normal.rb#54 - def done_adding; end - - # Prints a file with a progress bar - # - # source://rdoc//lib/rdoc/stats/normal.rb#23 - def print_file(files_so_far, filename); end -end - -# Stats printer that prints nothing -# -# source://rdoc//lib/rdoc/stats/quiet.rb#5 -class RDoc::Stats::Quiet - # Creates a new Quiet that will print nothing - # - # @return [Quiet] a new instance of Quiet - # - # source://rdoc//lib/rdoc/stats/quiet.rb#10 - def initialize(num_files); end - - # Prints a message at the beginning of parsing - # - # source://rdoc//lib/rdoc/stats/quiet.rb#17 - def begin_adding(*_arg0); end - - # Prints when RDoc is done - # - # source://rdoc//lib/rdoc/stats/quiet.rb#57 - def done_adding(*_arg0); end - - # Prints when an alias is added - # - # source://rdoc//lib/rdoc/stats/quiet.rb#22 - def print_alias(*_arg0); end - - # Prints when an attribute is added - # - # source://rdoc//lib/rdoc/stats/quiet.rb#27 - def print_attribute(*_arg0); end - - # Prints when a class is added - # - # source://rdoc//lib/rdoc/stats/quiet.rb#32 - def print_class(*_arg0); end - - # Prints when a constant is added - # - # source://rdoc//lib/rdoc/stats/quiet.rb#37 - def print_constant(*_arg0); end - - # Prints when a file is added - # - # source://rdoc//lib/rdoc/stats/quiet.rb#42 - def print_file(*_arg0); end - - # Prints when a method is added - # - # source://rdoc//lib/rdoc/stats/quiet.rb#47 - def print_method(*_arg0); end - - # Prints when a module is added - # - # source://rdoc//lib/rdoc/stats/quiet.rb#52 - def print_module(*_arg0); end -end - -# Stats printer that prints everything documented, including the documented -# status -# -# source://rdoc//lib/rdoc/stats/verbose.rb#6 -class RDoc::Stats::Verbose < ::RDoc::Stats::Normal - # Returns a marker for RDoc::CodeObject +co+ being undocumented - # - # source://rdoc//lib/rdoc/stats/verbose.rb#11 - def nodoc(co); end - - # source://rdoc//lib/rdoc/stats/verbose.rb#15 - def print_alias(as); end - - # source://rdoc//lib/rdoc/stats/verbose.rb#19 - def print_attribute(attribute); end - - # source://rdoc//lib/rdoc/stats/verbose.rb#23 - def print_class(klass); end - - # source://rdoc//lib/rdoc/stats/verbose.rb#27 - def print_constant(constant); end - - # source://rdoc//lib/rdoc/stats/verbose.rb#31 - def print_file(files_so_far, file); end - - # source://rdoc//lib/rdoc/stats/verbose.rb#36 - def print_method(method); end - - # source://rdoc//lib/rdoc/stats/verbose.rb#40 - def print_module(mod); end -end - -# A set of rdoc data for a single project (gem, path, etc.). -# -# The store manages reading and writing ri data for a project and maintains a -# cache of methods, classes and ancestors in the store. -# -# The store maintains a #cache of its contents for faster lookup. After -# adding items to the store it must be flushed using #save_cache. The cache -# contains the following structures: -# -# @cache = { -# :ancestors => {}, # class name => ancestor names -# :attributes => {}, # class name => attributes -# :class_methods => {}, # class name => class methods -# :instance_methods => {}, # class name => instance methods -# :modules => [], # classes and modules in this store -# :pages => [], # page names -# } -# -- -# TODO need to prune classes -# -# source://rdoc//lib/rdoc/store.rb#25 -class RDoc::Store - # Creates a new Store of +type+ that will load or save to +path+ - # - # @return [Store] a new instance of Store - # - # source://rdoc//lib/rdoc/store.rb#127 - def initialize(path = T.unsafe(nil), type = T.unsafe(nil)); end - - # Adds +module+ as an enclosure (namespace) for the given +variable+ for C - # files. - # - # source://rdoc//lib/rdoc/store.rb#169 - def add_c_enclosure(variable, namespace); end - - # Adds C variables from an RDoc::Parser::C - # - # source://rdoc//lib/rdoc/store.rb#176 - def add_c_variables(c_parser); end - - # Adds the file with +name+ as an RDoc::TopLevel to the store. Returns the - # created RDoc::TopLevel. - # - # source://rdoc//lib/rdoc/store.rb#188 - def add_file(absolute_name, relative_name: T.unsafe(nil), parser: T.unsafe(nil)); end - - # Returns all classes discovered by RDoc - # - # source://rdoc//lib/rdoc/store.rb#224 - def all_classes; end - - # Returns all classes and modules discovered by RDoc - # - # source://rdoc//lib/rdoc/store.rb#231 - def all_classes_and_modules; end - - # All TopLevels known to RDoc - # - # source://rdoc//lib/rdoc/store.rb#238 - def all_files; end - - # Returns all modules discovered by RDoc - # - # source://rdoc//lib/rdoc/store.rb#245 - def all_modules; end - - # Ancestors cache accessor. Maps a klass name to an Array of its ancestors - # in this store. If Foo in this store inherits from Object, Kernel won't be - # listed (it will be included from ruby's ri store). - # - # source://rdoc//lib/rdoc/store.rb#254 - def ancestors; end - - # Attributes cache accessor. Maps a class to an Array of its attributes. - # - # source://rdoc//lib/rdoc/store.rb#261 - def attributes; end - - # Maps C variables to class or module names for each parsed C file. - # - # source://rdoc//lib/rdoc/store.rb#80 - def c_class_variables; end - - # Stores the name of the C variable a class belongs to. This helps wire up - # classes defined from C across files. - # - # source://rdoc//lib/rdoc/store.rb#73 - def c_enclosure_classes; end - - # source://rdoc//lib/rdoc/store.rb#75 - def c_enclosure_names; end - - # Maps C variables to singleton class names for each parsed C file. - # - # source://rdoc//lib/rdoc/store.rb#85 - def c_singleton_class_variables; end - - # The contents of the Store - # - # source://rdoc//lib/rdoc/store.rb#112 - def cache; end - - # Path to the cache file - # - # source://rdoc//lib/rdoc/store.rb#268 - def cache_path; end - - # Path to the ri data for +klass_name+ - # - # source://rdoc//lib/rdoc/store.rb#275 - def class_file(klass_name); end - - # Class methods cache accessor. Maps a class to an Array of its class - # methods (not full name). - # - # source://rdoc//lib/rdoc/store.rb#284 - def class_methods; end - - # Path where data for +klass_name+ will be stored (methods or class data) - # - # source://rdoc//lib/rdoc/store.rb#291 - def class_path(klass_name); end - - # Hash of all classes known to RDoc - # - # source://rdoc//lib/rdoc/store.rb#298 - def classes_hash; end - - # Removes empty items and ensures item in each collection are unique and - # sorted - # - # source://rdoc//lib/rdoc/store.rb#306 - def clean_cache_collection(collection); end - - # Prepares the RDoc code object tree for use by a generator. - # - # It finds unique classes/modules defined, and replaces classes/modules that - # are aliases for another one by a copy with RDoc::ClassModule#is_alias_for - # set. - # - # It updates the RDoc::ClassModule#constant_aliases attribute of "real" - # classes or modules. - # - # It also completely removes the classes and modules that should be removed - # from the documentation and the methods that have a visibility below - # +min_visibility+, which is the --visibility option. - # - # See also RDoc::Context#remove_from_documentation? - # - # source://rdoc//lib/rdoc/store.rb#334 - def complete(min_visibility); end - - # If true this Store will not write any files - # - # source://rdoc//lib/rdoc/store.rb#90 - def dry_run; end - - # If true this Store will not write any files - # - # source://rdoc//lib/rdoc/store.rb#90 - def dry_run=(_arg0); end - - # The encoding of the contents in the Store - # - # source://rdoc//lib/rdoc/store.rb#117 - def encoding; end - - # The encoding of the contents in the Store - # - # source://rdoc//lib/rdoc/store.rb#117 - def encoding=(_arg0); end - - # Hash of all files known to RDoc - # - # source://rdoc//lib/rdoc/store.rb#374 - def files_hash; end - - # Finds the enclosure (namespace) for the given C +variable+. - # - # source://rdoc//lib/rdoc/store.rb#381 - def find_c_enclosure(variable); end - - # Finds the class with +name+ in all discovered classes - # - # source://rdoc//lib/rdoc/store.rb#406 - def find_class_named(name); end - - # Finds the class with +name+ starting in namespace +from+ - # - # source://rdoc//lib/rdoc/store.rb#413 - def find_class_named_from(name, from); end - - # Finds the class or module with +name+ - # - # source://rdoc//lib/rdoc/store.rb#431 - def find_class_or_module(name); end - - # Finds the file with +name+ in all discovered files - # - # source://rdoc//lib/rdoc/store.rb#439 - def find_file_named(name); end - - # Finds the module with +name+ in all discovered modules - # - # source://rdoc//lib/rdoc/store.rb#446 - def find_module_named(name); end - - # Returns the RDoc::TopLevel that is a text file and has the given - # +file_name+ - # - # source://rdoc//lib/rdoc/store.rb#454 - def find_text_page(file_name); end - - # Finds unique classes/modules defined in +all_hash+, - # and returns them as an array. Performs the alias - # updates in +all_hash+: see ::complete. - # -- - # TODO aliases should be registered by Context#add_module_alias - # - # source://rdoc//lib/rdoc/store.rb#467 - def find_unique(all_hash); end - - # Fixes the erroneous BasicObject < Object in 1.9. - # - # Because we assumed all classes without a stated superclass - # inherit from Object, we have the above wrong inheritance. - # - # We fix BasicObject right away if we are running in a Ruby - # version >= 1.9. - # - # source://rdoc//lib/rdoc/store.rb#486 - def fix_basic_object_inheritance; end - - # Friendly rendition of #path - # - # source://rdoc//lib/rdoc/store.rb#495 - def friendly_path; end - - # source://rdoc//lib/rdoc/store.rb#507 - def inspect; end - - # Instance methods cache accessor. Maps a class to an Array of its - # instance methods (not full name). - # - # source://rdoc//lib/rdoc/store.rb#515 - def instance_methods; end - - # Loads all items from this store into memory. This recreates a - # documentation tree for use by a generator - # - # source://rdoc//lib/rdoc/store.rb#523 - def load_all; end - - # Loads cache file for this store - # - # source://rdoc//lib/rdoc/store.rb#571 - def load_cache; end - - # Loads ri data for +klass_name+ and hooks it up to this store. - # - # source://rdoc//lib/rdoc/store.rb#610 - def load_class(klass_name); end - - # Loads ri data for +klass_name+ - # - # source://rdoc//lib/rdoc/store.rb#628 - def load_class_data(klass_name); end - - # Loads ri data for +method_name+ in +klass_name+ - # - # source://rdoc//lib/rdoc/store.rb#641 - def load_method(klass_name, method_name); end - - # Loads ri data for +page_name+ - # - # source://rdoc//lib/rdoc/store.rb#657 - def load_page(page_name); end - - # Gets the main page for this RDoc store. This page is used as the root of - # the RDoc server. - # - # source://rdoc//lib/rdoc/store.rb#673 - def main; end - - # Sets the main page for this RDoc store. - # - # source://rdoc//lib/rdoc/store.rb#680 - def main=(page); end - - # Converts the variable => ClassModule map +variables+ from a C parser into - # a variable => class name map. - # - # source://rdoc//lib/rdoc/store.rb#688 - def make_variable_map(variables); end - - # Path to the ri data for +method_name+ in +klass_name+ - # - # source://rdoc//lib/rdoc/store.rb#701 - def method_file(klass_name, method_name); end - - # Modules cache accessor. An Array of all the module (and class) names in - # the store. - # - # source://rdoc//lib/rdoc/store.rb#715 - def module_names; end - - # Hash of all modules known to RDoc - # - # source://rdoc//lib/rdoc/store.rb#722 - def modules_hash; end - - # Returns the RDoc::TopLevel that is a text file and has the given +name+ - # - # source://rdoc//lib/rdoc/store.rb#729 - def page(name); end - - # Path to the ri data for +page_name+ - # - # source://rdoc//lib/rdoc/store.rb#738 - def page_file(page_name); end - - # Path this store reads or writes - # - # source://rdoc//lib/rdoc/store.rb#95 - def path; end - - # Path this store reads or writes - # - # source://rdoc//lib/rdoc/store.rb#95 - def path=(_arg0); end - - # The RDoc::RDoc driver for this parse tree. This allows classes consulting - # the documentation tree to access user-set options, for example. - # - # source://rdoc//lib/rdoc/store.rb#101 - def rdoc; end - - # The RDoc::RDoc driver for this parse tree. This allows classes consulting - # the documentation tree to access user-set options, for example. - # - # source://rdoc//lib/rdoc/store.rb#101 - def rdoc=(_arg0); end - - # Removes from +all_hash+ the contexts that are nodoc or have no content. - # - # See RDoc::Context#remove_from_documentation? - # - # source://rdoc//lib/rdoc/store.rb#749 - def remove_nodoc(all_hash); end - - # Make sure any references to C variable names are resolved to the corresponding class. - # - # source://rdoc//lib/rdoc/store.rb#204 - def resolve_c_superclasses; end - - # Saves all entries in the store - # - # source://rdoc//lib/rdoc/store.rb#759 - def save; end - - # Writes the cache file for this store - # - # source://rdoc//lib/rdoc/store.rb#784 - def save_cache; end - - # Writes the ri data for +klass+ (or module) - # - # source://rdoc//lib/rdoc/store.rb#811 - def save_class(klass); end - - # Writes the ri data for +method+ on +klass+ - # - # source://rdoc//lib/rdoc/store.rb#885 - def save_method(klass, method); end - - # Writes the ri data for +page+ - # - # source://rdoc//lib/rdoc/store.rb#908 - def save_page(page); end - - # Source of the contents of this store. - # - # For a store from a gem the source is the gem name. For a store from the - # home directory the source is "home". For system ri store (the standard - # library documentation) the source is"ruby". For a store from the site - # ri directory the store is "site". For other stores the source is the - # #path. - # - # source://rdoc//lib/rdoc/store.rb#934 - def source; end - - # Gets the title for this RDoc store. This is used as the title in each - # page on the RDoc server - # - # source://rdoc//lib/rdoc/store.rb#948 - def title; end - - # Sets the title page for this RDoc store. - # - # source://rdoc//lib/rdoc/store.rb#955 - def title=(title); end - - # Type of ri datastore this was loaded from. See RDoc::RI::Driver, - # RDoc::RI::Paths. - # - # source://rdoc//lib/rdoc/store.rb#107 - def type; end - - # Type of ri datastore this was loaded from. See RDoc::RI::Driver, - # RDoc::RI::Paths. - # - # source://rdoc//lib/rdoc/store.rb#107 - def type=(_arg0); end - - # Returns the unique classes discovered by RDoc. - # - # ::complete must have been called prior to using this method. - # - # source://rdoc//lib/rdoc/store.rb#964 - def unique_classes; end - - # Returns the unique classes and modules discovered by RDoc. - # ::complete must have been called prior to using this method. - # - # source://rdoc//lib/rdoc/store.rb#972 - def unique_classes_and_modules; end - - # Returns the unique modules discovered by RDoc. - # ::complete must have been called prior to using this method. - # - # source://rdoc//lib/rdoc/store.rb#980 - def unique_modules; end - - # The lazy constants alias will be discovered in passing - # - # source://rdoc//lib/rdoc/store.rb#122 - def unmatched_constant_alias; end - - # Sets the parser of +absolute_name+, unless it from a source code file. - # - # source://rdoc//lib/rdoc/store.rb#215 - def update_parser_of_file(absolute_name, parser); end - - private - - # source://rdoc//lib/rdoc/store.rb#985 - def marshal_load(file); end -end - -# source://rdoc//lib/rdoc/store.rb#989 -RDoc::Store::MarshalFilter = T.let(T.unsafe(nil), Proc) - -# Raised when a stored file for a class, module, page or method is missing. -# -# source://rdoc//lib/rdoc/store.rb#36 -class RDoc::Store::MissingFileError < ::RDoc::Store::Error - # Creates a new MissingFileError for the missing +file+ for the given - # +name+ that should have been in the +store+. - # - # @return [MissingFileError] a new instance of MissingFileError - # - # source://rdoc//lib/rdoc/store.rb#57 - def initialize(store, file, name); end - - # The file the #name should be saved as - # - # source://rdoc//lib/rdoc/store.rb#46 - def file; end - - # source://rdoc//lib/rdoc/store.rb#63 - def message; end - - # The name of the object the #file would be loaded from - # - # source://rdoc//lib/rdoc/store.rb#51 - def name; end - - # The store the file should exist in - # - # source://rdoc//lib/rdoc/store.rb#41 - def store; end -end - -# RDoc::Task creates the following rake tasks to generate and clean up RDoc -# output: -# -# [rdoc] -# Main task for this RDoc task. -# -# [clobber_rdoc] -# Delete all the rdoc files. This target is automatically added to the main -# clobber target. -# -# [rerdoc] -# Rebuild the rdoc files from scratch, even if they are not out of date. -# -# [rdoc:coverage] -# Print RDoc coverage report for all rdoc files. -# -# Simple Example: -# -# require 'rdoc/task' -# -# RDoc::Task.new do |rdoc| -# rdoc.main = "README.rdoc" -# rdoc.rdoc_files.include("README.rdoc", "lib/**/*.rb") -# end -# -# The +rdoc+ object passed to the block is an RDoc::Task object. See the -# attributes list for the RDoc::Task class for available customization options. -# -# == Specifying different task names -# -# You may wish to give the task a different name, such as if you are -# generating two sets of documentation. For instance, if you want to have a -# development set of documentation including private methods: -# -# require 'rdoc/task' -# -# RDoc::Task.new :rdoc_dev do |rdoc| -# rdoc.main = "README.rdoc" -# rdoc.rdoc_files.include("README.rdoc", "lib/**/*.rb") -# rdoc.options << "--all" -# end -# -# The tasks would then be named :rdoc_dev, -# :clobber_rdoc_dev, and :rerdoc_dev. -# -# If you wish to have completely different task names, then pass a Hash as -# first argument. With the :rdoc, :clobber_rdoc and -# :rerdoc options, you can customize the task names to your liking. -# -# For example: -# -# require 'rdoc/task' -# -# RDoc::Task.new(:rdoc => "rdoc", :clobber_rdoc => "rdoc:clean", -# :rerdoc => "rdoc:force") -# -# This will create the tasks :rdoc, :rdoc:clean, -# :rdoc:force, and :rdoc:coverage. -# -# source://rdoc//lib/rdoc/task.rb#99 -class RDoc::Task < ::Rake::TaskLib - # Create an RDoc task with the given name. See the RDoc::Task class overview - # for documentation. - # - # @return [Task] a new instance of Task - # @yield [_self] - # @yieldparam _self [RDoc::Task] the object that the method was called on - # - # source://rdoc//lib/rdoc/task.rb#157 - def initialize(name = T.unsafe(nil)); end - - # The block passed to this method will be called just before running the - # RDoc generator. It is allowed to modify RDoc::Task attributes inside the - # block. - # - # source://rdoc//lib/rdoc/task.rb#287 - def before_running_rdoc(&block); end - - # Ensures that +names+ only includes names for the :rdoc, :clobber_rdoc and - # :rerdoc. If other names are given an ArgumentError is raised. - # - # source://rdoc//lib/rdoc/task.rb#173 - def check_names(names); end - - # Task description for the clobber rdoc task or its renamed equivalent - # - # source://rdoc//lib/rdoc/task.rb#187 - def clobber_task_description; end - - # Task description for the coverage task or its renamed description - # - # source://rdoc//lib/rdoc/task.rb#308 - def coverage_task_description; end - - # Sets default task values - # - # source://rdoc//lib/rdoc/task.rb#194 - def defaults; end - - # Create the tasks defined by this task lib. - # - # source://rdoc//lib/rdoc/task.rb#223 - def define; end - - # Whether to run the rdoc process as an external shell (default is false) - # - # source://rdoc//lib/rdoc/task.rb#151 - def external; end - - # Whether to run the rdoc process as an external shell (default is false) - # - # source://rdoc//lib/rdoc/task.rb#151 - def external=(_arg0); end - - # Name of format generator (--format) used by rdoc. (defaults to - # rdoc's default) - # - # source://rdoc//lib/rdoc/task.rb#136 - def generator; end - - # Name of format generator (--format) used by rdoc. (defaults to - # rdoc's default) - # - # source://rdoc//lib/rdoc/task.rb#136 - def generator=(_arg0); end - - # All source is inline now. This method is deprecated - # - # source://rdoc//lib/rdoc/task.rb#208 - def inline_source; end - - # All source is inline now. This method is deprecated - # - # source://rdoc//lib/rdoc/task.rb#216 - def inline_source=(value); end - - # Name of file to be used as the main, top level file of the RDoc. (default - # is none) - # - # source://rdoc//lib/rdoc/task.rb#125 - def main; end - - # Name of file to be used as the main, top level file of the RDoc. (default - # is none) - # - # source://rdoc//lib/rdoc/task.rb#125 - def main=(_arg0); end - - # The markup format; one of: +rdoc+ (the default), +markdown+, +rd+, +tomdoc+. - # See {Markup Formats}[rdoc-ref:RDoc::Markup@Markup+Formats]. - # - # source://rdoc//lib/rdoc/task.rb#109 - def markup; end - - # The markup format; one of: +rdoc+ (the default), +markdown+, +rd+, +tomdoc+. - # See {Markup Formats}[rdoc-ref:RDoc::Markup@Markup+Formats]. - # - # source://rdoc//lib/rdoc/task.rb#109 - def markup=(_arg0); end - - # Name of the main, top level task. (default is :rdoc) - # - # source://rdoc//lib/rdoc/task.rb#104 - def name; end - - # Name of the main, top level task. (default is :rdoc) - # - # source://rdoc//lib/rdoc/task.rb#104 - def name=(_arg0); end - - # List of options that will be supplied to RDoc - # - # source://rdoc//lib/rdoc/task.rb#271 - def option_list; end - - # Additional list of options to be passed rdoc. (default is []) - # - # source://rdoc//lib/rdoc/task.rb#146 - def options; end - - # Additional list of options to be passed rdoc. (default is []) - # - # source://rdoc//lib/rdoc/task.rb#146 - def options=(_arg0); end - - # Name of directory to receive the html output files. (default is "html") - # - # source://rdoc//lib/rdoc/task.rb#114 - def rdoc_dir; end - - # Name of directory to receive the html output files. (default is "html") - # - # source://rdoc//lib/rdoc/task.rb#114 - def rdoc_dir=(_arg0); end - - # List of files to be included in the rdoc generation. (default is []) - # - # source://rdoc//lib/rdoc/task.rb#141 - def rdoc_files; end - - # List of files to be included in the rdoc generation. (default is []) - # - # source://rdoc//lib/rdoc/task.rb#141 - def rdoc_files=(_arg0); end - - # Task description for the rdoc task or its renamed equivalent - # - # source://rdoc//lib/rdoc/task.rb#294 - def rdoc_task_description; end - - # Task description for the rerdoc task or its renamed description - # - # source://rdoc//lib/rdoc/task.rb#301 - def rerdoc_task_description; end - - # Name of template to be used by rdoc. (defaults to rdoc's default) - # - # source://rdoc//lib/rdoc/task.rb#130 - def template; end - - # Name of template to be used by rdoc. (defaults to rdoc's default) - # - # source://rdoc//lib/rdoc/task.rb#130 - def template=(_arg0); end - - # Title of RDoc documentation. (defaults to rdoc's default) - # - # source://rdoc//lib/rdoc/task.rb#119 - def title; end - - # Title of RDoc documentation. (defaults to rdoc's default) - # - # source://rdoc//lib/rdoc/task.rb#119 - def title=(_arg0); end - - private - - # source://rdoc//lib/rdoc/task.rb#325 - def clobber_task_name; end - - # source://rdoc//lib/rdoc/task.rb#339 - def coverage_task_name; end - - # source://rdoc//lib/rdoc/task.rb#314 - def rdoc_target; end - - # source://rdoc//lib/rdoc/task.rb#318 - def rdoc_task_name; end - - # source://rdoc//lib/rdoc/task.rb#332 - def rerdoc_task_name; end -end - -# Methods for manipulating comment text -# -# source://rdoc//lib/rdoc/text.rb#11 -module RDoc::Text - # Expands tab characters in +text+ to eight spaces - # - # source://rdoc//lib/rdoc/text.rb#63 - def expand_tabs(text); end - - # Flush +text+ left based on the shortest line - # - # source://rdoc//lib/rdoc/text.rb#82 - def flush_left(text); end - - # The language for this text. This affects stripping comments - # markers. - # - # source://rdoc//lib/rdoc/text.rb#17 - def language; end - - # The language for this text. This affects stripping comments - # markers. - # - # source://rdoc//lib/rdoc/text.rb#17 - def language=(_arg0); end - - # Convert a string in markup format into HTML. - # - # Requires the including class to implement #formatter - # - # source://rdoc//lib/rdoc/text.rb#101 - def markup(text); end - - # Strips hashes, expands tabs then flushes +text+ to the left - # - # source://rdoc//lib/rdoc/text.rb#117 - def normalize_comment(text); end - - # Normalizes +text+ then builds a RDoc::Markup::Document from it - # - # source://rdoc//lib/rdoc/text.rb#135 - def parse(text, format = T.unsafe(nil)); end - - # The first +limit+ characters of +text+ as HTML - # - # source://rdoc//lib/rdoc/text.rb#149 - def snippet(text, limit = T.unsafe(nil)); end - - # Strips leading # characters from +text+ - # - # source://rdoc//lib/rdoc/text.rb#158 - def strip_hashes(text); end - - # Strips leading and trailing \n characters from +text+ - # - # source://rdoc//lib/rdoc/text.rb#170 - def strip_newlines(text); end - - # Strips /* */ style comments - # - # source://rdoc//lib/rdoc/text.rb#177 - def strip_stars(text); end - - # source://rdoc//lib/rdoc/text.rb#200 - def to_html(text); end - - # Wraps +txt+ to +line_len+ - # - # source://rdoc//lib/rdoc/text.rb#287 - def wrap(txt, line_len = T.unsafe(nil)); end - - class << self - # Transcodes +character+ to +encoding+ with a +fallback+ character. - # - # source://rdoc//lib/rdoc/text.rb#55 - def encode_fallback(character, encoding, fallback); end - end -end - -# Character class to be separated by a space when concatenating -# lines. -# -# source://rdoc//lib/rdoc/text.rb#320 -RDoc::Text::SPACE_SEPARATED_LETTER_CLASS = T.let(T.unsafe(nil), Regexp) - -# A TokenStream is a list of tokens, gathered during the parse of some entity -# (say a method). Entities populate these streams by being registered with the -# lexer. Any class can collect tokens by including TokenStream. From the -# outside, you use such an object by calling the start_collecting_tokens -# method, followed by calls to add_token and pop_token. -# -# source://rdoc//lib/rdoc/token_stream.rb#9 -module RDoc::TokenStream - # Adds one +token+ to the collected tokens - # - # source://rdoc//lib/rdoc/token_stream.rb#84 - def add_token(token); end - - # Adds +tokens+ to the collected tokens - # - # source://rdoc//lib/rdoc/token_stream.rb#77 - def add_tokens(tokens); end - - # Starts collecting tokens - # - # source://rdoc//lib/rdoc/token_stream.rb#91 - def collect_tokens; end - - # Remove the last token from the collected tokens - # - # source://rdoc//lib/rdoc/token_stream.rb#100 - def pop_token; end - - # Starts collecting tokens - # - # source://rdoc//lib/rdoc/token_stream.rb#91 - def start_collecting_tokens; end - - # Current token stream - # - # source://rdoc//lib/rdoc/token_stream.rb#107 - def token_stream; end - - # Returns a string representation of the token stream - # - # source://rdoc//lib/rdoc/token_stream.rb#114 - def tokens_to_s; end - - class << self - # Converts +token_stream+ to HTML wrapping various tokens with - # elements. Some tokens types are wrapped in spans - # with the given class names. Other token types are not wrapped in spans. - # - # source://rdoc//lib/rdoc/token_stream.rb#16 - def to_html(token_stream); end - end -end - -# A parser for TomDoc based on TomDoc 1.0.0-rc1 (02adef9b5a) -# -# The TomDoc specification can be found at http://tomdoc.org. -# -# To choose TomDoc as your only default format see RDoc::Options@Saved+Options -# for instructions on setting up a .rdoc_options file to store -# your project default. -# -# There are a few differences between this parser and the specification. A -# best-effort was made to follow the specification as closely as possible but -# some choices to deviate were made. -# -# A future version of RDoc will warn when a MUST or MUST NOT is violated and -# may warn when a SHOULD or SHOULD NOT is violated. RDoc will always try -# to emit documentation even if given invalid TomDoc. -# -# Here are some implementation choices this parser currently makes: -# -# This parser allows rdoc-style inline markup but you should not depended on -# it. -# -# This parser allows a space between the comment and the method body. -# -# This parser does not require the default value to be described for an -# optional argument. -# -# This parser does not examine the order of sections. An Examples section may -# precede the Arguments section. -# -# This class is documented in TomDoc format. Since this is a subclass of the -# RDoc markup parser there isn't much to see here, unfortunately. -# -# source://rdoc//lib/rdoc/tom_doc.rb#36 -class RDoc::TomDoc < ::RDoc::Markup::Parser - # Public: Creates a new TomDoc parser. See also RDoc::Markup::parse - # - # @return [TomDoc] a new instance of TomDoc - # - # source://rdoc//lib/rdoc/tom_doc.rb#124 - def initialize; end - - # Internal: Builds a heading from the token stream - # - # level - The level of heading to create - # - # Returns an RDoc::Markup::Heading - # - # source://rdoc//lib/rdoc/tom_doc.rb#137 - def build_heading(level); end - - # Internal: Builds a paragraph from the token stream - # - # margin - Unused - # - # Returns an RDoc::Markup::Paragraph. - # - # source://rdoc//lib/rdoc/tom_doc.rb#167 - def build_paragraph(margin); end - - # Internal: Builds a verbatim from the token stream. A verbatim in the - # Examples section will be marked as in Ruby format. - # - # margin - The indentation from the margin for lines that belong to this - # verbatim section. - # - # Returns an RDoc::Markup::Verbatim - # - # source://rdoc//lib/rdoc/tom_doc.rb#153 - def build_verbatim(margin); end - - # Detects a section change to "Returns" and adds a heading - # - # source://rdoc//lib/rdoc/tom_doc.rb#207 - def parse_text(parent, indent); end - - # Internal: Turns text into an Array of tokens - # - # text - A String containing TomDoc-format text. - # - # Returns self. - # - # source://rdoc//lib/rdoc/tom_doc.rb#225 - def tokenize(text); end - - # Internal: Token accessor - # - # source://rdoc//lib/rdoc/tom_doc.rb#40 - def tokens; end - - class << self - # Internal: Adds a post-processor which sets the RDoc section based on the - # comment's status. - # - # Returns nothing. - # - # source://rdoc//lib/rdoc/tom_doc.rb#47 - def add_post_processor; end - - # Public: Parses TomDoc from text - # - # text - A String containing TomDoc-format text. - # - # Examples - # - # RDoc::TomDoc.parse <<-TOMDOC - # This method does some things - # - # Returns nothing. - # TOMDOC - # # => # - # - # Returns an RDoc::Markup::Document representing the TomDoc format. - # - # source://rdoc//lib/rdoc/tom_doc.rb#78 - def parse(text); end - - # Internal: Extracts the Signature section's method signature - # - # comment - An RDoc::Comment that will be parsed and have the signature - # extracted - # - # Returns a String containing the signature and nil if not - # - # source://rdoc//lib/rdoc/tom_doc.rb#94 - def signature(comment); end - end -end - -# A TopLevel context is a representation of the contents of a single file -# -# source://rdoc//lib/rdoc/code_object/top_level.rb#5 -class RDoc::TopLevel < ::RDoc::Context - # Creates a new TopLevel for the file at +absolute_name+. If documentation - # is being generated outside the source dir +relative_name+ is relative to - # the source directory. - # - # @return [TopLevel] a new instance of TopLevel - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#43 - def initialize(absolute_name, relative_name = T.unsafe(nil)); end - - # An RDoc::TopLevel is equal to another with the same relative_name - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#67 - def ==(other); end - - # Absolute name of this file - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#22 - def absolute_name; end - - # Absolute name of this file - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#22 - def absolute_name=(_arg0); end - - # Adds +an_alias+ to +Object+ instead of +self+. - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#76 - def add_alias(an_alias); end - - # Adds +constant+ to +Object+ instead of +self+. - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#85 - def add_constant(constant); end - - # Adds +include+ to +Object+ instead of +self+. - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#94 - def add_include(include); end - - # Adds +method+ to +Object+ instead of +self+. - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#103 - def add_method(method); end - - # Adds class or module +mod+. Used in the building phase - # by the Ruby parser. - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#113 - def add_to_classes_or_modules(mod); end - - # Base name of this file - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#120 - def base_name; end - - # All the classes or modules that were declared in - # this file. These are assigned to either +#classes_hash+ - # or +#modules_hash+ once we know what they really are. - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#29 - def classes_or_modules; end - - # Returns a URL for this source file on some web repository. Use the -W - # command line option to set. - # - # source://rdoc//lib/rdoc/generator/markup.rb#149 - def cvs_url; end - - # source://rdoc//lib/rdoc/code_object/top_level.rb#31 - def diagram; end - - # source://rdoc//lib/rdoc/code_object/top_level.rb#31 - def diagram=(_arg0); end - - # Only a TopLevel that contains text file) will be displayed. See also - # RDoc::CodeObject#display? - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#130 - def display?; end - - # An RDoc::TopLevel is equal to another with the same relative_name - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#67 - def eql?(other); end - - # This TopLevel's File::Stat struct - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#12 - def file_stat; end - - # This TopLevel's File::Stat struct - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#12 - def file_stat=(_arg0); end - - # See RDoc::TopLevel::find_class_or_module - # -- - # TODO Why do we search through all classes/modules found, not just the - # ones of this instance? - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#140 - def find_class_or_module(name); end - - # Finds a class or module named +symbol+ - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#147 - def find_local_symbol(symbol); end - - # Finds a module or class with +name+ - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#154 - def find_module_named(name); end - - # Returns the relative name of this file - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#161 - def full_name; end - - # An RDoc::TopLevel has the same hash as another with the same - # relative_name - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#169 - def hash; end - - # URL for this with a +prefix+ - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#176 - def http_url(prefix); end - - # source://rdoc//lib/rdoc/code_object/top_level.rb#182 - def inspect; end - - # Time this file was last modified, if known - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#194 - def last_modified; end - - # Dumps this TopLevel for use by ri. See also #marshal_load - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#201 - def marshal_dump; end - - # Loads this TopLevel from +array+. - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#213 - def marshal_load(array); end - - # Base name of this file - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#120 - def name; end - - # Returns the NormalClass "Object", creating it if not found. - # - # Records +self+ as a location in "Object". - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#227 - def object_class; end - - # Base name of this file without the extension - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#238 - def page_name; end - - # The parser class that processed this file - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#36 - def parser; end - - # Sets the parser for this toplevel context, also the store. - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#58 - def parser=(val); end - - # Path to this file for use with HTML generator output. - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#248 - def path; end - - # source://rdoc//lib/rdoc/code_object/top_level.rb#252 - def pretty_print(q); end - - # Relative name of this file - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#17 - def relative_name; end - - # Relative name of this file - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#17 - def relative_name=(_arg0); end - - # Search record used by RDoc::Generator::JsonIndex - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#266 - def search_record; end - - # Is this TopLevel from a text file instead of a source code file? - # - # @return [Boolean] - # - # source://rdoc//lib/rdoc/code_object/top_level.rb#283 - def text?; end - - # source://rdoc//lib/rdoc/code_object/top_level.rb#287 - def to_s; end -end - -# :stopdoc: -# -# source://rdoc//lib/rdoc/task.rb#346 -module Rake - extend ::FileUtils::StreamUtils_ - extend ::FileUtils -end - -# For backwards compatibility -# -# source://rdoc//lib/rdoc/task.rb#351 -Rake::RDocTask = RDoc::Task diff --git a/sorbet/rbi/gems/regexp_parser@2.10.0.rbi b/sorbet/rbi/gems/regexp_parser@2.10.0.rbi deleted file mode 100644 index f1d8174..0000000 --- a/sorbet/rbi/gems/regexp_parser@2.10.0.rbi +++ /dev/null @@ -1,3795 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `regexp_parser` gem. -# Please instead update this file by running `bin/tapioca gem regexp_parser`. - - -# source://regexp_parser//lib/regexp_parser/expression/shared.rb#1 -module Regexp::Expression; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/alternation.rb#5 -class Regexp::Expression::Alternation < ::Regexp::Expression::SequenceOperation - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#5 - def alternatives; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#9 - def human_name; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#131 - def match_length; end -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 alternatives. -# -# source://regexp_parser//lib/regexp_parser/expression/classes/alternation.rb#3 -class Regexp::Expression::Alternative < ::Regexp::Expression::Sequence - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#10 - def human_name; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#2 -module Regexp::Expression::Anchor; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#18 -Regexp::Expression::Anchor::BOL = Regexp::Expression::Anchor::BeginningOfLine - -# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#20 -Regexp::Expression::Anchor::BOS = Regexp::Expression::Anchor::BeginningOfString - -# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#3 -class Regexp::Expression::Anchor::Base < ::Regexp::Expression::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/anchor.rb#5 -class Regexp::Expression::Anchor::BeginningOfLine < ::Regexp::Expression::Anchor::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#11 - def human_name; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#8 -class Regexp::Expression::Anchor::BeginningOfString < ::Regexp::Expression::Anchor::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#12 - def human_name; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#19 -Regexp::Expression::Anchor::EOL = Regexp::Expression::Anchor::EndOfLine - -# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#21 -Regexp::Expression::Anchor::EOS = Regexp::Expression::Anchor::EndOfString - -# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#22 -Regexp::Expression::Anchor::EOSobEOL = Regexp::Expression::Anchor::EndOfStringOrBeforeEndOfLine - -# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#6 -class Regexp::Expression::Anchor::EndOfLine < ::Regexp::Expression::Anchor::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#13 - def human_name; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#9 -class Regexp::Expression::Anchor::EndOfString < ::Regexp::Expression::Anchor::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#14 - def human_name; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#11 -class Regexp::Expression::Anchor::EndOfStringOrBeforeEndOfLine < ::Regexp::Expression::Anchor::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#15 - def human_name; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#16 -class Regexp::Expression::Anchor::MatchStart < ::Regexp::Expression::Anchor::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#16 - def human_name; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#14 -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 -class Regexp::Expression::Anchor::WordBoundary < ::Regexp::Expression::Anchor::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#18 - def human_name; end -end - -# 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#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#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#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#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#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 - -# alias for symmetry between token symbol and Expression class name -# -# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#55 -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#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 - - 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#15 -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#19 - def initialize(token, options = T.unsafe(nil)); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#23 - def human_name; end - - # Returns the value of attribute name. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#16 - def name; end - - # Returns the value of attribute name. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#16 - def reference; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#31 -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#43 -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#46 - 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#44 - def recursion_level; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#5 -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#9 - def initialize(token, options = T.unsafe(nil)); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#25 - def human_name; end - - # Returns the value of attribute number. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#6 - def number; end - - # Returns the value of attribute number. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#6 - def reference; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#30 -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#32 -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#34 -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#37 - 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#35 - def recursion_level; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#25 -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#26 - 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#26 - def effective_number=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#26 - def human_name; end - - # Returns the value of attribute effective_number. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#26 - def reference; end -end - -# source://regexp_parser//lib/regexp_parser/expression/base.rb#2 -class Regexp::Expression::Base - include ::Regexp::Expression::Shared - include ::Regexp::Expression::ReferencedExpressions - extend ::Regexp::Expression::Shared::ClassMethods - - # @return [Base] a new instance of Base - # - # source://regexp_parser//lib/regexp_parser/expression/base.rb#5 - def initialize(token, options = T.unsafe(nil)); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match.rb#8 - def =~(string, offset = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#25 - def a?; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#25 - def ascii_classes?; end - - # source://regexp_parser//lib/regexp_parser/expression/base.rb#60 - def attributes; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#8 - def case_insensitive?; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def conditional_level; end - - # 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 - def d?; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#20 - def default_classes?; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#14 - def extended?; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#14 - def free_spacing?; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/base.rb#47 - def greedy?; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#8 - def i?; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#8 - def ignore_case?; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/base.rb#51 - def lazy?; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def level; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def level=(_arg0); end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#3 - def m?; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match.rb#8 - def match(string, offset = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match.rb#3 - def match?(string); end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match.rb#3 - def matches?(string); end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#3 - def multiline?; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#14 - def nesting_level; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def options; end - - # 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#56 - def possessive?; end - - # 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#17 - def quantify(*args); end - - # Deprecated. Prefer `#repetitions` which has a more uniform interface. - # - # source://regexp_parser//lib/regexp_parser/expression/base.rb#26 - def quantity; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/base.rb#51 - def reluctant?; end - - # source://regexp_parser//lib/regexp_parser/expression/base.rb#31 - def repetitions; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def set_level; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def set_level=(_arg0); end - - # %l Level (depth) of the expression. Returns 'root' for the root - # expression, returns zero or higher for all others. - # - # %> Indentation at expression's level. - # - # %x Index of the expression at its depth. Available when using - # the sprintf_tree method only. - # - # %s Start offset within the whole expression. - # %e End offset within the whole expression. - # %S Length of expression. - # - # %o Coded offset and length, same as '@%s+%S' - # - # %y Type of expression. - # %k Token of expression. - # %i ID, same as '%y:%k' - # %c Class name - # - # %q Quantifier info, as {m[,M]} - # %Q Quantifier text - # - # %z Quantifier min - # %Z Quantifier max - # - # %t Base text of the expression (excludes quantifier, if any) - # %~t Full text if the expression is terminal, otherwise %i - # %T Full text of the expression (includes quantifier, if any) - # - # %b Basic info, same as '%o %i' - # %m Most info, same as '%b %q' - # %a All info, same as '%m %t' - # - # source://regexp_parser//lib/regexp_parser/expression/methods/strfregexp.rb#37 - def strfre(format = T.unsafe(nil), indent_offset = T.unsafe(nil), index = T.unsafe(nil)); end - - # %l Level (depth) of the expression. Returns 'root' for the root - # expression, returns zero or higher for all others. - # - # %> Indentation at expression's level. - # - # %x Index of the expression at its depth. Available when using - # the sprintf_tree method only. - # - # %s Start offset within the whole expression. - # %e End offset within the whole expression. - # %S Length of expression. - # - # %o Coded offset and length, same as '@%s+%S' - # - # %y Type of expression. - # %k Token of expression. - # %i ID, same as '%y:%k' - # %c Class name - # - # %q Quantifier info, as {m[,M]} - # %Q Quantifier text - # - # %z Quantifier min - # %Z Quantifier max - # - # %t Base text of the expression (excludes quantifier, if any) - # %~t Full text if the expression is terminal, otherwise %i - # %T Full text of the expression (includes quantifier, if any) - # - # %b Basic info, same as '%o %i' - # %m Most info, same as '%b %q' - # %a All info, same as '%m %t' - # - # source://regexp_parser//lib/regexp_parser/expression/methods/strfregexp.rb#37 - def strfregexp(format = T.unsafe(nil), indent_offset = T.unsafe(nil), index = T.unsafe(nil)); end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def te; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def te=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def text; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def text=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/base.rb#60 - def to_h; end - - # 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 - def token; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def token=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def ts; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def ts=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def type; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def type=(_arg0); end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#30 - def u?; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#30 - def unicode_classes?; end - - # 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 -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#6 - def initialize(token, options = T.unsafe(nil)); end - - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#16 - def close; end - - # Returns the value of attribute closed. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 - def closed; end - - # Sets the attribute closed - # - # @param value the value to set the attribute closed to. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 - def closed=(_arg0); end - - # Returns the value of attribute closed. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 - def closed?; end - - # 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#12 - def negate; end - - # Returns the value of attribute negative. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 - def negative; end - - # Sets the attribute negative - # - # @param value the value to set the attribute negative to. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 - def negative=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#16 - def negative?; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#15 - def parts; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/character_set/intersection.rb#3 -class Regexp::Expression::CharacterSet::IntersectedSequence < ::Regexp::Expression::Sequence - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#29 - def human_name; 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/character_set/intersection.rb#5 -class Regexp::Expression::CharacterSet::Intersection < ::Regexp::Expression::SequenceOperation - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#30 - def human_name; 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/character_set/intersection.rb#6 -Regexp::Expression::CharacterSet::Intersection::OPERAND = Regexp::Expression::CharacterSet::IntersectedSequence - -# 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#8 - def <<(exp); end - - # @return [Boolean] - # - # 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 - def human_name; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 - def match_length; end - - # 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 ts; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#2 -module Regexp::Expression::CharacterType; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#5 -class Regexp::Expression::CharacterType::Any < ::Regexp::Expression::CharacterType::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#32 - def human_name; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#3 -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 -class Regexp::Expression::CharacterType::Digit < ::Regexp::Expression::CharacterType::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#15 -class Regexp::Expression::CharacterType::ExtendedGrapheme < ::Regexp::Expression::CharacterType::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#8 -class Regexp::Expression::CharacterType::Hex < ::Regexp::Expression::CharacterType::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#14 -class Regexp::Expression::CharacterType::Linebreak < ::Regexp::Expression::CharacterType::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#7 -class Regexp::Expression::CharacterType::NonDigit < ::Regexp::Expression::CharacterType::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#9 -class Regexp::Expression::CharacterType::NonHex < ::Regexp::Expression::CharacterType::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#13 -class Regexp::Expression::CharacterType::NonSpace < ::Regexp::Expression::CharacterType::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#11 -class Regexp::Expression::CharacterType::NonWord < ::Regexp::Expression::CharacterType::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#12 -class Regexp::Expression::CharacterType::Space < ::Regexp::Expression::CharacterType::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#10 -class Regexp::Expression::CharacterType::Word < ::Regexp::Expression::CharacterType::Base; end - -# source://regexp_parser//lib/regexp_parser/expression/classes/free_space.rb#8 -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#18 -class Regexp::Expression::Conditional::Branch < ::Regexp::Expression::Sequence - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#34 - def human_name; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#9 -class Regexp::Expression::Conditional::Condition < ::Regexp::Expression::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#35 - def human_name; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#148 - def match_length; end - - # Name or number of the referenced capturing group that determines state. - # Returns a String if reference is by name, Integer if by number. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#12 - def reference; 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#20 -class Regexp::Expression::Conditional::Expression < ::Regexp::Expression::Subexpression - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#21 - def <<(exp); end - - # @raise [TooManyBranches] - # - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#25 - 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#25 - def branch(active_opts = T.unsafe(nil), params = T.unsafe(nil)); end - - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#41 - def branches; end - - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#37 - def condition; end - - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#32 - def condition=(exp); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#36 - def human_name; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#131 - def match_length; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#17 - def parts; end - - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#45 - def reference; 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 -class Regexp::Expression::Conditional::TooManyBranches < ::Regexp::Parser::Error - # @return [TooManyBranches] a new instance of TooManyBranches - # - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#4 - def initialize; end -end - -# alias for symmetry between Token::* and Expression::* -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#29 -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#22 -class Regexp::Expression::EscapeSequence::AbstractMetaControlSequence < ::Regexp::Expression::EscapeSequence::Base - private - - # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#40 - def control_sequence_to_s(control_sequence); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#45 - def meta_char_to_codepoint(meta_char); end -end - -# \e -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#5 -class Regexp::Expression::EscapeSequence::AsciiEscape < ::Regexp::Expression::EscapeSequence::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#2 - def codepoint; end -end - -# \b -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#6 -class Regexp::Expression::EscapeSequence::Backspace < ::Regexp::Expression::EscapeSequence::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#3 - def codepoint; end -end - -# 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/methods/escape_sequence_char.rb#2 - def char; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 - def match_length; end -end - -# \a -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#7 -class Regexp::Expression::EscapeSequence::Bell < ::Regexp::Expression::EscapeSequence::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#4 - def codepoint; end -end - -# e.g. \u000A -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#18 -class Regexp::Expression::EscapeSequence::Codepoint < ::Regexp::Expression::EscapeSequence::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#16 - def codepoint; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#20 -class Regexp::Expression::EscapeSequence::CodepointList < ::Regexp::Expression::EscapeSequence::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#20 - def char; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#28 - def chars; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#24 - def codepoint; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#32 - def codepoints; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#164 - def match_length; end -end - -# e.g. \cB -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#23 -class Regexp::Expression::EscapeSequence::Control < ::Regexp::Expression::EscapeSequence::AbstractMetaControlSequence - # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#52 - def codepoint; end -end - -# \f -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#8 -class Regexp::Expression::EscapeSequence::FormFeed < ::Regexp::Expression::EscapeSequence::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#5 - def codepoint; end -end - -# e.g. \x0A -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#17 -class Regexp::Expression::EscapeSequence::Hex < ::Regexp::Expression::EscapeSequence::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#15 - def codepoint; end -end - -# e.g. \j, \@, \😀 (ineffectual escapes) -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#14 -class Regexp::Expression::EscapeSequence::Literal < ::Regexp::Expression::EscapeSequence::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#11 - def codepoint; end -end - -# e.g. \M-Z -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#24 -class Regexp::Expression::EscapeSequence::Meta < ::Regexp::Expression::EscapeSequence::AbstractMetaControlSequence - # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#58 - def codepoint; end -end - -# e.g. \M-\cX -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#25 -class Regexp::Expression::EscapeSequence::MetaControl < ::Regexp::Expression::EscapeSequence::AbstractMetaControlSequence - # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#64 - def codepoint; end -end - -# \n -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#9 -class Regexp::Expression::EscapeSequence::Newline < ::Regexp::Expression::EscapeSequence::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#6 - def codepoint; end -end - -# e.g. \012 -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#16 -class Regexp::Expression::EscapeSequence::Octal < ::Regexp::Expression::EscapeSequence::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#13 - def codepoint; end -end - -# \r -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#10 -class Regexp::Expression::EscapeSequence::Return < ::Regexp::Expression::EscapeSequence::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#7 - def codepoint; end -end - -# \t -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#11 -class Regexp::Expression::EscapeSequence::Tab < ::Regexp::Expression::EscapeSequence::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#8 - def codepoint; end -end - -# \v -# -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#12 -class Regexp::Expression::EscapeSequence::VerticalTab < ::Regexp::Expression::EscapeSequence::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#9 - def codepoint; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/free_space.rb#2 -class Regexp::Expression::FreeSpace < ::Regexp::Expression::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#148 - def match_length; end - - # @raise [Regexp::Parser::Error] - # - # 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 -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#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#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 - # 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#40 -class Regexp::Expression::Group::Capture < ::Regexp::Expression::Group::Base - # 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#41 - def identifier; end - - # Returns the value of attribute number. - # - # 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#41 - def number=(_arg0); end - - # Returns the value of attribute number_at_level. - # - # 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#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#60 -class Regexp::Expression::Group::Comment < ::Regexp::Expression::Group::Base - # 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#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#49 - def initialize(token, options = T.unsafe(nil)); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#38 - def human_name; end - - # Returns the value of attribute name. - # - # 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#46 - def name; end - - private - - # 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#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#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#24 - def option_changes=(_arg0); end - - # 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#26 - def initialize_copy(orig); end -end - -# 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#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#7 - def implicit=(_arg0); end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#14 - def implicit?; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#19 - def parts; end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/keep.rb#2 -module Regexp::Expression::Keep; end - -# TODO: in regexp_parser v3.0.0 this should possibly be a Subexpression -# that contains all expressions to its left. -# -# source://regexp_parser//lib/regexp_parser/expression/classes/keep.rb#5 -class Regexp::Expression::Keep::Mark < ::Regexp::Expression::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#39 - def human_name; end - - # 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/literal.rb#2 -class Regexp::Expression::Literal < ::Regexp::Expression::Base - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#40 - def human_name; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#105 - def match_length; end -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#3 - def name; end - - # 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. -# Or actually allow chaining as a more concise but tricky solution than PR#69. -# -# source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#6 -class Regexp::Expression::Quantifier - include ::Regexp::Expression::Shared - extend ::Regexp::Expression::Shared::ClassMethods - - # @return [Quantifier] a new instance of Quantifier - # - # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#11 - def initialize(*args); end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def conditional_level; end - - # 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 - - # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#31 - def greedy?; end - - # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#31 - def lazy?; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def level; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def level=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#42 - def max; end - - # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#38 - def min; end - - # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#46 - def mode; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#14 - def nesting_level; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def options; end - - # 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 - - # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#31 - def possessive?; end - - # 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#31 - def reluctant?; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def set_level; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def set_level=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def te; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def te=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def text; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def text=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#19 - def to_h; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def token; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def token=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def ts; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def ts=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def type; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def type=(_arg0); end - - private - - # 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#64 - def derived_data; end -end - -# source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#9 -Regexp::Expression::Quantifier::MODES = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/expression/methods/referenced_expressions.rb#2 -module Regexp::Expression::ReferencedExpressions - # source://regexp_parser//lib/regexp_parser/expression/methods/referenced_expressions.rb#5 - def referenced_expression; end - - # Returns the value of attribute referenced_expressions. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/referenced_expressions.rb#3 - def referenced_expressions; end - - # Sets the attribute referenced_expressions - # - # @param value the value to set the attribute referenced_expressions to. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/referenced_expressions.rb#3 - def referenced_expressions=(_arg0); end - - private - - # source://regexp_parser//lib/regexp_parser/expression/methods/referenced_expressions.rb#9 - def initialize_copy(orig); end -end - -# source://regexp_parser//lib/regexp_parser/expression/classes/root.rb#2 -class Regexp::Expression::Root < ::Regexp::Expression::Subexpression - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#41 - def human_name; end - - class << self - # source://regexp_parser//lib/regexp_parser/expression/classes/root.rb#3 - def build(options = T.unsafe(nil)); end - end -end - -# A sequence of expressions. Differs from a Subexpressions by how it handles -# quantifiers, as it applies them to its last element instead of itself as -# a whole subexpression. -# -# Used as the base class for the Alternation alternatives, Conditional -# branches, and CharacterSet::Intersection intersected sequences. -# -# 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(token, *args); end - - # source://regexp_parser//lib/regexp_parser/expression/sequence.rb#23 - def ts; end - - class << self - # source://regexp_parser//lib/regexp_parser/expression/sequence.rb#10 - def add_to(exp, params = T.unsafe(nil), active_opts = T.unsafe(nil)); end - end -end - -# abstract class -# -# 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#12 - def <<(exp); 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 - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 - def operator; end - - # 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 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. - # - # 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. - # - # 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#51 - def base_length; end - - # 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. - # - # 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#55 - def full_length; end - - # default implementation, e.g. "atomic group", "hex escape", "word type", .. - # - # 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. - # - # # Any expressions - # exp.is? :* # always returns true - # - # # is it a :capture - # exp.is? :capture - # - # # is it a :character and a :set - # exp.is? :character, :set - # - # # is it a :meta :dot - # exp.is? :dot, :meta - # - # # is it a :meta or :escape :dot - # exp.is? :dot, [:meta, :escape] - # - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#36 - def is?(test_token, test_type = T.unsafe(nil)); end - - # 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#92 - def offset; end - - # Test if this expression matches an entry in the given scope spec. - # - # A scope spec can be one of: - # - # . An array: Interpreted as a set of tokens, tested for inclusion - # of the expression's token. - # - # . A hash: Where the key is interpreted as the expression type - # and the value is either a symbol or an array. In this - # case, when the scope is a hash, one_of? calls itself to - # evaluate the key's value. - # - # . A symbol: matches the expression's token or type, depending on - # the level of the call. If one_of? is called directly with - # a symbol then it will always be checked against the - # type of the expression. If it's being called for a value - # from a hash, it will be checked against the token of the - # expression. - # - # # any expression - # exp.one_of?(:*) # always true - # - # # like exp.type?(:group) - # exp.one_of?(:group) - # - # # any expression of type meta - # exp.one_of?(:meta => :*) - # - # # meta dots and alternations - # exp.one_of?(:meta => [:dot, :alternation]) - # - # # meta dots and any set tokens - # exp.one_of?({meta: [:dot], set: :*}) - # - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#75 - def one_of?(scope, top = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#111 - def optional?; end - - # 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/methods/tests.rb#115 - def quantified?; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#106 - def quantifier=(qtf); end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#88 - def quantifier_affix(expression_format = T.unsafe(nil)); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#138 - def referential?; end - - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#43 - def starts_at; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#120 - def terminal?; end - - # #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 - - # #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#37 - def token_class; end - - # Test if this expression has the given test_type, which can be either - # a symbol or an array of symbols to check against the expression's type. - # - # # is it a :group expression - # exp.type? :group - # - # # is it a :set, or :meta - # exp.type? [:set, :meta] - # - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#13 - def type?(test_type); end - - private - - # 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#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 - # - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#5 - def included(mod); end - end -end - -# filled in ./methods/*.rb -# -# 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] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/construct.rb#5 - def construct(params = T.unsafe(nil)); end - - # 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 - -# source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#2 -class Regexp::Expression::Subexpression < ::Regexp::Expression::Base - include ::Enumerable - - # @return [Subexpression] a new instance of Subexpression - # - # 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#20 - def <<(exp); end - - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 - def [](*args, &block); end - - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 - def at(*args, &block); end - - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#33 - def dig(*indices); end - - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 - def each(*args, &block); end - - # 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#8 - def each_expression(include_self = T.unsafe(nil), &block); end - - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 - def empty?(*args, &block); end - - # Returns the value of attribute expressions. - # - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#5 - def expressions; end - - # Sets the attribute expressions - # - # @param value the value to set the attribute expressions to. - # - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#5 - def expressions=(_arg0); end - - # 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#56 - def flat_map(include_self = T.unsafe(nil), &block); end - - # 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#27 - def join(*args, &block); end - - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 - def last(*args, &block); end - - # 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/methods/parts.rb#21 - def parts; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/strfregexp.rb#102 - def strfre_tree(format = T.unsafe(nil), include_self = T.unsafe(nil), separator = T.unsafe(nil)); end - - # 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#39 - def te; end - - # 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 - # block for each expression with three arguments; the traversal event, - # the expression, and the index of the expression within its parent. - # - # The event argument is passed as follows: - # - # - For subexpressions, :enter upon entering the subexpression, and - # :exit upon exiting it. - # - # - For terminal expressions, :visit is called once. - # - # Returns self. - # - # 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#27 - def values_at(*args, &block); end - - # Traverses the subexpression (depth-first, pre-order) and calls the given - # block for each expression with three arguments; the traversal event, - # the expression, and the index of the expression within its parent. - # - # The event argument is passed as follows: - # - # - For subexpressions, :enter upon entering the subexpression, and - # :exit upon exiting it. - # - # - For terminal expressions, :visit is called once. - # - # Returns self. - # - # 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. - # - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#13 - def initialize_copy(orig); end - - class << self - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#122 - def terminal?; end - end -end - -# 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#108 -class Regexp::Expression::UnicodeProperty::Age < ::Regexp::Expression::UnicodeProperty::Base; end - -# 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#14 -class Regexp::Expression::UnicodeProperty::Alpha < ::Regexp::Expression::UnicodeProperty::Base; end - -# 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#15 -class Regexp::Expression::UnicodeProperty::Ascii < ::Regexp::Expression::UnicodeProperty::Base; end - -# 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#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#4 - def name; end - - # 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#8 - def shortcut; end -end - -# 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#109 -class Regexp::Expression::UnicodeProperty::Block < ::Regexp::Expression::UnicodeProperty::Base; end - -# 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#97 -module Regexp::Expression::UnicodeProperty::Codepoint; end - -# 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#98 -class Regexp::Expression::UnicodeProperty::Codepoint::Base < ::Regexp::Expression::UnicodeProperty::Base; end - -# 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#102 -class Regexp::Expression::UnicodeProperty::Codepoint::Format < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end - -# 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#103 -class Regexp::Expression::UnicodeProperty::Codepoint::Surrogate < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end - -# 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#110 -class Regexp::Expression::UnicodeProperty::Derived < ::Regexp::Expression::UnicodeProperty::Base; end - -# 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#111 -class Regexp::Expression::UnicodeProperty::Emoji < ::Regexp::Expression::UnicodeProperty::Base; end - -# 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#34 -module Regexp::Expression::UnicodeProperty::Letter; end - -# 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#35 -class Regexp::Expression::UnicodeProperty::Letter::Base < ::Regexp::Expression::UnicodeProperty::Base; end - -# 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#40 -class Regexp::Expression::UnicodeProperty::Letter::Lowercase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end - -# 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#43 -class Regexp::Expression::UnicodeProperty::Letter::Other < ::Regexp::Expression::UnicodeProperty::Letter::Base; end - -# 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#39 -class Regexp::Expression::UnicodeProperty::Letter::Uppercase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end - -# 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#46 -module Regexp::Expression::UnicodeProperty::Mark; end - -# 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#47 -class Regexp::Expression::UnicodeProperty::Mark::Base < ::Regexp::Expression::UnicodeProperty::Base; end - -# 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#53 -class Regexp::Expression::UnicodeProperty::Mark::Enclosing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end - -# 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#52 -class Regexp::Expression::UnicodeProperty::Mark::Spacing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end - -# 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#56 -module Regexp::Expression::UnicodeProperty::Number; end - -# 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#57 -class Regexp::Expression::UnicodeProperty::Number::Base < ::Regexp::Expression::UnicodeProperty::Base; end - -# 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#61 -class Regexp::Expression::UnicodeProperty::Number::Letter < ::Regexp::Expression::UnicodeProperty::Number::Base; end - -# 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#21 -class Regexp::Expression::UnicodeProperty::Print < ::Regexp::Expression::UnicodeProperty::Base; end - -# 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#65 -module Regexp::Expression::UnicodeProperty::Punctuation; end - -# 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#66 -class Regexp::Expression::UnicodeProperty::Punctuation::Base < ::Regexp::Expression::UnicodeProperty::Base; end - -# 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#69 -class Regexp::Expression::UnicodeProperty::Punctuation::Connector < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end - -# 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#74 -class Regexp::Expression::UnicodeProperty::Punctuation::Final < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end - -# 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#71 -class Regexp::Expression::UnicodeProperty::Punctuation::Open < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end - -# 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#113 -class Regexp::Expression::UnicodeProperty::Script < ::Regexp::Expression::UnicodeProperty::Base; end - -# 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#81 -class Regexp::Expression::UnicodeProperty::Separator::Any < ::Regexp::Expression::UnicodeProperty::Separator::Base; end - -# 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#83 -class Regexp::Expression::UnicodeProperty::Separator::Line < ::Regexp::Expression::UnicodeProperty::Separator::Base; end - -# 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#82 -class Regexp::Expression::UnicodeProperty::Separator::Space < ::Regexp::Expression::UnicodeProperty::Separator::Base; end - -# 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#87 -module Regexp::Expression::UnicodeProperty::Symbol; end - -# 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#88 -class Regexp::Expression::UnicodeProperty::Symbol::Base < ::Regexp::Expression::UnicodeProperty::Base; end - -# 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#91 -class Regexp::Expression::UnicodeProperty::Symbol::Math < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end - -# 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#94 -class Regexp::Expression::UnicodeProperty::Symbol::Other < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end - -# 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#25 -class Regexp::Expression::UnicodeProperty::Word < ::Regexp::Expression::UnicodeProperty::Base; end - -# 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#26 -class Regexp::Expression::UnicodeProperty::Xdigit < ::Regexp::Expression::UnicodeProperty::Base; end - -# 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#12 - def merge(exp); end -end - -# A very thin wrapper around the scanner that breaks quantified literal runs, -# collects emitted tokens into an array, calculates their nesting depth, and -# normalizes tokens for the parser, and checks if they are implemented by the -# given syntax flavor. -# -# source://regexp_parser//lib/regexp_parser/lexer.rb#5 -class Regexp::Lexer - # source://regexp_parser//lib/regexp_parser/lexer.rb#71 - def emit(token); end - - # source://regexp_parser//lib/regexp_parser/lexer.rb#20 - def lex(input, syntax = T.unsafe(nil), options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end - - private - - # source://regexp_parser//lib/regexp_parser/lexer.rb#91 - def ascend(type, token); end - - # Returns the value of attribute block. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def block; end - - # Sets the attribute block - # - # @param value the value to set the attribute block to. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def block=(_arg0); end - - # if a codepoint list is followed by a quantifier, that quantifier applies - # to the last codepoint, e.g. /\u{61 62 63}{3}/ =~ 'abccc' - # c.f. #break_literal. - # - # 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#123 - def break_literal(token); end - - # Returns the value of attribute collect_tokens. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - 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/lexer.rb#87 - def collect_tokens=(_arg0); end - - # Returns the value of attribute conditional_nesting. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def conditional_nesting; end - - # Sets the attribute conditional_nesting - # - # @param value the value to set the attribute conditional_nesting to. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def conditional_nesting=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/lexer.rb#106 - def descend(type, token); end - - # source://regexp_parser//lib/regexp_parser/lexer.rb#162 - def merge_condition(current, last); end - - # Returns the value of attribute nesting. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def nesting; end - - # Sets the attribute nesting - # - # @param value the value to set the attribute nesting to. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def nesting=(_arg0); end - - # Returns the value of attribute preprev_token. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def preprev_token; end - - # Sets the attribute preprev_token - # - # @param value the value to set the attribute preprev_token to. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def preprev_token=(_arg0); end - - # Returns the value of attribute prev_token. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - 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/lexer.rb#87 - def prev_token=(_arg0); end - - # Returns the value of attribute set_nesting. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def set_nesting; end - - # Sets the attribute set_nesting - # - # @param value the value to set the attribute set_nesting to. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def set_nesting=(_arg0); end - - # Returns the value of attribute shift. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def shift; end - - # Sets the attribute shift - # - # @param value the value to set the attribute shift to. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def shift=(_arg0); end - - # Returns the value of attribute tokens. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def tokens; end - - # Sets the attribute tokens - # - # @param value the value to set the attribute tokens to. - # - # source://regexp_parser//lib/regexp_parser/lexer.rb#87 - def tokens=(_arg0); end - - class << self - # source://regexp_parser//lib/regexp_parser/lexer.rb#16 - def lex(input, syntax = T.unsafe(nil), options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end - - # source://regexp_parser//lib/regexp_parser/lexer.rb#16 - def scan(input, syntax = T.unsafe(nil), options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end - end -end - -# source://regexp_parser//lib/regexp_parser/lexer.rb#12 -Regexp::Lexer::CLOSING_TOKENS = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/lexer.rb#14 -Regexp::Lexer::CONDITION_TOKENS = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/lexer.rb#7 -Regexp::Lexer::OPENING_TOKENS = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#1 -class Regexp::MatchLength - include ::Enumerable - - # @return [MatchLength] a new instance of MatchLength - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#9 - def initialize(exp, opts = T.unsafe(nil)); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#24 - def each(opts = T.unsafe(nil)); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#35 - def endless_each; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#44 - def fixed?; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#40 - def include?(length); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#60 - def inspect; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#52 - def max; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#48 - def min; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#56 - def minmax; end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#65 - def to_re; end - - private - - # Returns the value of attribute base_max. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 - def base_max; end - - # Sets the attribute base_max - # - # @param value the value to set the attribute base_max to. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 - def base_max=(_arg0); end - - # Returns the value of attribute base_min. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 - def base_min; end - - # Sets the attribute base_min - # - # @param value the value to set the attribute base_min to. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 - def base_min=(_arg0); end - - # Returns the value of attribute exp_class. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 - def exp_class; end - - # Sets the attribute exp_class - # - # @param value the value to set the attribute exp_class to. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 - def exp_class=(_arg0); end - - # Returns the value of attribute max_rep. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 - def max_rep; end - - # Sets the attribute max_rep - # - # @param value the value to set the attribute max_rep to. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 - def max_rep=(_arg0); end - - # Returns the value of attribute min_rep. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 - def min_rep; end - - # Sets the attribute min_rep - # - # @param value the value to set the attribute min_rep to. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 - def min_rep=(_arg0); end - - # Returns the value of attribute reify. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 - def reify; end - - # Sets the attribute reify - # - # @param value the value to set the attribute reify to. - # - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 - def reify=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#74 - def test_regexp; end - - class << self - # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#4 - def of(obj); end - end -end - -# source://regexp_parser//lib/regexp_parser/version.rb#2 -class Regexp::Parser - include ::Regexp::Expression - - # source://regexp_parser//lib/regexp_parser/parser.rb#25 - def parse(input, syntax = T.unsafe(nil), options: T.unsafe(nil), &block); end - - private - - # source://regexp_parser//lib/regexp_parser/parser.rb#574 - def active_opts; end - - # source://regexp_parser//lib/regexp_parser/parser.rb#99 - def anchor(token); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#262 - def assign_effective_number(exp); end - - # Assigns referenced expressions to referring expressions, e.g. if there is - # an instance of Backreference::Number, its #referenced_expression is set to - # the instance of Group::Capture that it refers to via its number. - # - # source://regexp_parser//lib/regexp_parser/parser.rb#581 - def assign_referenced_expressions; end - - # source://regexp_parser//lib/regexp_parser/parser.rb#227 - def backref(token); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#202 - def captured_group_count_at_level; end - - # Returns the value of attribute captured_group_counts. - # - # source://regexp_parser//lib/regexp_parser/parser.rb#56 - def captured_group_counts; end - - # Sets the attribute captured_group_counts - # - # @param value the value to set the attribute captured_group_counts to. - # - # source://regexp_parser//lib/regexp_parser/parser.rb#56 - def captured_group_counts=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#570 - def close_completed_character_set_range; end - - # source://regexp_parser//lib/regexp_parser/parser.rb#210 - def close_group; end - - # source://regexp_parser//lib/regexp_parser/parser.rb#538 - def close_set; end - - # source://regexp_parser//lib/regexp_parser/parser.rb#269 - def conditional(token); end - - # Returns the value of attribute conditional_nesting. - # - # source://regexp_parser//lib/regexp_parser/parser.rb#56 - def conditional_nesting; end - - # Sets the attribute conditional_nesting - # - # @param value the value to set the attribute conditional_nesting to. - # - # source://regexp_parser//lib/regexp_parser/parser.rb#56 - def conditional_nesting=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#206 - def count_captured_group; end - - # @yield [node] - # - # source://regexp_parser//lib/regexp_parser/parser.rb#216 - def decrease_nesting; end - - # source://regexp_parser//lib/regexp_parser/parser.rb#305 - def escape(token); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#60 - def extract_options(input, options); end - - # 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#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#360 - def keep(token); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#364 - def literal(token); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#368 - def meta(token); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#534 - def negate_set; end - - # source://regexp_parser//lib/regexp_parser/parser.rb#299 - def nest(exp); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#294 - def nest_conditional(exp); end - - # Returns the value of attribute nesting. - # - # source://regexp_parser//lib/regexp_parser/parser.rb#56 - def nesting; end - - # Sets the attribute nesting - # - # @param value the value to set the attribute nesting to. - # - # source://regexp_parser//lib/regexp_parser/parser.rb#56 - def nesting=(_arg0); end - - # Returns the value of attribute node. - # - # source://regexp_parser//lib/regexp_parser/parser.rb#56 - def node; end - - # Sets the attribute node - # - # @param value the value to set the attribute node to. - # - # source://regexp_parser//lib/regexp_parser/parser.rb#56 - def node=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#165 - def open_group(token); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#527 - def open_set(token); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#130 - def options_group(token); end - - # Returns the value of attribute options_stack. - # - # source://regexp_parser//lib/regexp_parser/parser.rb#56 - def options_stack; end - - # Sets the attribute options_stack - # - # @param value the value to set the attribute options_stack to. - # - # source://regexp_parser//lib/regexp_parser/parser.rb#56 - def options_stack=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#76 - def parse_token(token); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#390 - def posixclass(token); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#397 - def property(token); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#479 - def quantifier(token); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#542 - def range(token); end - - # Returns the value of attribute root. - # - # source://regexp_parser//lib/regexp_parser/parser.rb#56 - def root; end - - # Sets the attribute root - # - # @param value the value to set the attribute root to. - # - # source://regexp_parser//lib/regexp_parser/parser.rb#56 - def root=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#379 - def sequence_operation(klass, token); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#515 - def set(token); end - - # Returns the value of attribute switching_options. - # - # source://regexp_parser//lib/regexp_parser/parser.rb#56 - def switching_options; end - - # Sets the attribute switching_options - # - # @param value the value to set the attribute switching_options to. - # - # source://regexp_parser//lib/regexp_parser/parser.rb#56 - def switching_options=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/parser.rb#198 - def total_captured_group_count; end - - # source://regexp_parser//lib/regexp_parser/parser.rb#553 - def type(token); end - - class << self - # source://regexp_parser//lib/regexp_parser/parser.rb#21 - def parse(input, syntax = T.unsafe(nil), options: T.unsafe(nil), &block); end - end -end - -# source://regexp_parser//lib/regexp_parser/parser.rb#128 -Regexp::Parser::ENC_FLAGS = T.let(T.unsafe(nil), Array) - -# base class for all gem-specific errors -# -# source://regexp_parser//lib/regexp_parser/error.rb#3 -class Regexp::Parser::Error < ::StandardError; end - -# source://regexp_parser//lib/regexp_parser/parser.rb#127 -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#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 -class Regexp::Parser::UnknownTokenError < ::Regexp::Parser::ParserError - # @return [UnknownTokenError] a new instance of UnknownTokenError - # - # source://regexp_parser//lib/regexp_parser/parser.rb#16 - def initialize(type, token); end -end - -# source://regexp_parser//lib/regexp_parser/parser.rb#9 -class Regexp::Parser::UnknownTokenTypeError < ::Regexp::Parser::ParserError - # @return [UnknownTokenTypeError] a new instance of UnknownTokenTypeError - # - # source://regexp_parser//lib/regexp_parser/parser.rb#10 - def initialize(type, token); end -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/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#2363 - def emit(type, token, text); end - - # only public for #||= to work on ruby <= 2.5 - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2388 - def literal_run; end - - # only public for #||= to work on ruby <= 2.5 - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2388 - def literal_run=(_arg0); end - - # @raise [PrematureEndError] - # - # 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 - - # 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#2425 - def append_literal(data, ts, te); end - - # Returns the value of attribute block. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 - 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#2392 - def block=(_arg0); end - - # Returns the value of attribute char_pos. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 - 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#2392 - def char_pos=(_arg0); end - - # Returns the value of attribute collect_tokens. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 - 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#2392 - def collect_tokens=(_arg0); end - - # Returns the value of attribute conditional_stack. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 - 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#2392 - def conditional_stack=(_arg0); end - - # Copy from ts to te from data as text - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2419 - 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#2430 - def emit_literal; end - - # source://regexp_parser//lib/regexp_parser/scanner.rb#2465 - def emit_meta_control_sequence(data, ts, te, token); end - - # source://regexp_parser//lib/regexp_parser/scanner.rb#2436 - def emit_options(text); end - - # Returns the value of attribute free_spacing. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 - 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#2392 - def free_spacing=(_arg0); end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2398 - def free_spacing?(input_object, options); end - - # Returns the value of attribute group_depth. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 - 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#2392 - def group_depth=(_arg0); end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2410 - def in_group?; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2414 - def in_set?; end - - # Returns the value of attribute prev_token. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 - 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#2392 - def prev_token=(_arg0); end - - # Returns the value of attribute set_depth. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 - 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#2392 - def set_depth=(_arg0); end - - # Returns the value of attribute spacing_stack. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 - 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#2392 - def spacing_stack=(_arg0); end - - # Returns the value of attribute tokens. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 - 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#2392 - def tokens=(_arg0); end - - class << self - # source://regexp_parser//lib/regexp_parser/scanner.rb#2349 - def long_prop_map; end - - # source://regexp_parser//lib/regexp_parser/scanner.rb#2353 - def parse_prop_map(name); end - - # source://regexp_parser//lib/regexp_parser/scanner.rb#2357 - def posix_classes; end - - # Scans the given regular expression text, or Regexp object and collects the - # emitted token into an array that gets returned at the end. If a block is - # given, it gets called for each emitted token. - # - # This method may raise errors if a syntax error is encountered. - # -------------------------------------------------------------------------- - # - # 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#2345 - def short_prop_map; end - end -end - -# Invalid back reference. Used for name a number refs/calls. -# -# 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/errors/validation_error.rb#45 - def initialize(what, reason); end -end - -# Invalid group. Used for named groups. -# -# 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/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/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/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/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/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/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/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/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/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/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/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/errors/validation_error.rb#52 - def initialize(name, _); end -end - -# Base for all scanner validation errors -# -# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#3 -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 -# into the All and Types constants. -# -# source://regexp_parser//lib/regexp_parser/syntax.rb#3 -module Regexp::Syntax - private - - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#61 - def comparable(name); end - - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#44 - def const_missing(const_name); end - - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#51 - def fallback_version_class(version); end - - # Returns the syntax specification class for the given syntax - # version name. The special names 'any' and '*' return Syntax::Any. - # - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#22 - def for(name); end - - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#26 - def new(name); end - - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#57 - def specified_versions; end - - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#32 - def supported?(name); end - - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#36 - def version_class(version); end - - class << self - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#61 - def comparable(name); end - - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#44 - def const_missing(const_name); end - - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#51 - def fallback_version_class(version); end - - # Returns the syntax specification class for the given syntax - # version name. The special names 'any' and '*' return Syntax::Any. - # - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#22 - def for(name); end - - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#26 - def new(name); end - - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#57 - def specified_versions; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#32 - def supported?(name); end - - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#36 - def version_class(version); end - end -end - -# A syntax that always returns true, passing all tokens as implemented. This -# is useful during development, testing, and should be useful for some types -# of transformations as well. -# -# source://regexp_parser//lib/regexp_parser/syntax/any.rb#5 -class Regexp::Syntax::Any < ::Regexp::Syntax::Base - class << self - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/syntax/any.rb#8 - def implements?(_type, _token); end - end -end - -# A lookup map of supported types and tokens in a given syntax -# -# source://regexp_parser//lib/regexp_parser/syntax/base.rb#9 -class Regexp::Syntax::Base - include ::Regexp::Syntax::Token - - # TODO: drop this backwards compatibility code in v3.0.0, do `private :new` - # - # @return [Base] a new instance of Base - # - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#99 - def initialize; end - - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#104 - def method_missing(name, *args); end - - private - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#115 - def respond_to_missing?(name, include_private = T.unsafe(nil)); end - - class << self - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#46 - def added_features; end - - # @raise [NotImplementedError] - # - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#40 - def check!(type, token); end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#31 - def check?(type, token); end - - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#26 - def excludes(type, tokens); end - - # Returns the value of attribute features. - # - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#13 - def features; end - - # Sets the attribute features - # - # @param value the value to set the attribute features to. - # - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#13 - def features=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#36 - def implementations(type); end - - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#21 - def implements(type, tokens); end - - # @raise [NotImplementedError] - # - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#40 - def implements!(type, token); end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#31 - def implements?(type, token); end - - # automatically inherit features through the syntax class hierarchy - # - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#16 - def inherited(subclass); end - - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#54 - def normalize(type, token); end - - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#74 - def normalize_backref(type, token); end - - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#65 - def normalize_group(type, token); end - - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#50 - def removed_features; end - end -end - -# source://regexp_parser//lib/regexp_parser/syntax/versions.rb#8 -Regexp::Syntax::CURRENT = Regexp::Syntax::V3_2_0 - -# source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#6 -class Regexp::Syntax::InvalidVersionNameError < ::Regexp::Syntax::SyntaxError - # @return [InvalidVersionNameError] a new instance of InvalidVersionNameError - # - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#7 - def initialize(name); end -end - -# source://regexp_parser//lib/regexp_parser/syntax/base.rb#2 -class Regexp::Syntax::NotImplementedError < ::Regexp::Syntax::SyntaxError - # @return [NotImplementedError] a new instance of NotImplementedError - # - # source://regexp_parser//lib/regexp_parser/syntax/base.rb#3 - def initialize(syntax, type, token); end -end - -# source://regexp_parser//lib/regexp_parser/syntax.rb#4 -class Regexp::Syntax::SyntaxError < ::Regexp::Parser::Error; end - -# source://regexp_parser//lib/regexp_parser/syntax/token.rb#3 -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 - -# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#9 -Regexp::Syntax::Token::Anchor::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#4 -Regexp::Syntax::Token::Anchor::Basic = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#5 -Regexp::Syntax::Token::Anchor::Extended = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#7 -Regexp::Syntax::Token::Anchor::MatchStart = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#6 -Regexp::Syntax::Token::Anchor::String = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#10 -Regexp::Syntax::Token::Anchor::Type = T.let(T.unsafe(nil), Symbol) - -# source://regexp_parser//lib/regexp_parser/syntax/token/assertion.rb#3 -module Regexp::Syntax::Token::Assertion; end - -# source://regexp_parser//lib/regexp_parser/syntax/token/assertion.rb#7 -Regexp::Syntax::Token::Assertion::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/assertion.rb#4 -Regexp::Syntax::Token::Assertion::Lookahead = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/assertion.rb#5 -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 - -# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#15 -Regexp::Syntax::Token::Backreference::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#7 -Regexp::Syntax::Token::Backreference::Name = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#6 -Regexp::Syntax::Token::Backreference::Number = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#5 -Regexp::Syntax::Token::Backreference::NumberRef = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#4 -Regexp::Syntax::Token::Backreference::Plain = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#9 -Regexp::Syntax::Token::Backreference::RecursionLevel = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#16 -Regexp::Syntax::Token::Backreference::Type = T.let(T.unsafe(nil), Symbol) - -# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#11 -Regexp::Syntax::Token::Backreference::V1_8_6 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#13 -Regexp::Syntax::Token::Backreference::V1_9_1 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/character_set.rb#3 -module Regexp::Syntax::Token::CharacterSet; end - -# source://regexp_parser//lib/regexp_parser/syntax/token/character_set.rb#7 -Regexp::Syntax::Token::CharacterSet::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/character_set.rb#4 -Regexp::Syntax::Token::CharacterSet::Basic = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/character_set.rb#5 -Regexp::Syntax::Token::CharacterSet::Extended = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/character_set.rb#8 -Regexp::Syntax::Token::CharacterSet::Type = T.let(T.unsafe(nil), Symbol) - -# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#3 -module Regexp::Syntax::Token::CharacterType; end - -# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#10 -Regexp::Syntax::Token::CharacterType::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#4 -Regexp::Syntax::Token::CharacterType::Basic = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#8 -Regexp::Syntax::Token::CharacterType::Clustered = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#5 -Regexp::Syntax::Token::CharacterType::Extended = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#6 -Regexp::Syntax::Token::CharacterType::Hex = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#11 -Regexp::Syntax::Token::CharacterType::Type = T.let(T.unsafe(nil), Symbol) - -# source://regexp_parser//lib/regexp_parser/syntax/token/conditional.rb#3 -module Regexp::Syntax::Token::Conditional; end - -# source://regexp_parser//lib/regexp_parser/syntax/token/conditional.rb#9 -Regexp::Syntax::Token::Conditional::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/conditional.rb#6 -Regexp::Syntax::Token::Conditional::Condition = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/conditional.rb#4 -Regexp::Syntax::Token::Conditional::Delimiters = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/conditional.rb#7 -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) - -# 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#8 -Regexp::Syntax::Token::Escape::ASCII = T.let(T.unsafe(nil), Array) - -# 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#4 -Regexp::Syntax::Token::Escape::Basic = T.let(T.unsafe(nil), Array) - -# 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#20 -Regexp::Syntax::Token::Escape::Hex = T.let(T.unsafe(nil), Array) - -# 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#22 -Regexp::Syntax::Token::Escape::Octal = T.let(T.unsafe(nil), Array) - -# 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#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 - -# source://regexp_parser//lib/regexp_parser/syntax/token.rb#12 -Regexp::Syntax::Token::FreeSpace::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token.rb#13 -Regexp::Syntax::Token::FreeSpace::Type = T.let(T.unsafe(nil), Symbol) - -# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#3 -module Regexp::Syntax::Token::Group; end - -# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#17 -Regexp::Syntax::Token::Group::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#8 -Regexp::Syntax::Token::Group::Atomic = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#4 -Regexp::Syntax::Token::Group::Basic = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#10 -Regexp::Syntax::Token::Group::Comment = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#5 -Regexp::Syntax::Token::Group::Extended = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#7 -Regexp::Syntax::Token::Group::Named = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#9 -Regexp::Syntax::Token::Group::Passive = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#18 -Regexp::Syntax::Token::Group::Type = T.let(T.unsafe(nil), Symbol) - -# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#12 -Regexp::Syntax::Token::Group::V1_8_6 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#15 -Regexp::Syntax::Token::Group::V2_4_1 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/keep.rb#3 -module Regexp::Syntax::Token::Keep; end - -# source://regexp_parser//lib/regexp_parser/syntax/token/keep.rb#6 -Regexp::Syntax::Token::Keep::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/keep.rb#4 -Regexp::Syntax::Token::Keep::Mark = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/keep.rb#7 -Regexp::Syntax::Token::Keep::Type = T.let(T.unsafe(nil), Symbol) - -# source://regexp_parser//lib/regexp_parser/syntax/token.rb#6 -module Regexp::Syntax::Token::Literal; end - -# source://regexp_parser//lib/regexp_parser/syntax/token.rb#7 -Regexp::Syntax::Token::Literal::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token.rb#8 -Regexp::Syntax::Token::Literal::Type = T.let(T.unsafe(nil), Symbol) - -# source://regexp_parser//lib/regexp_parser/syntax/token.rb#4 -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#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#6 -Regexp::Syntax::Token::Meta::Extended = T.let(T.unsafe(nil), Array) - -# 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 -module Regexp::Syntax::Token::PosixClass; end - -# source://regexp_parser//lib/regexp_parser/syntax/token/posix_class.rb#9 -Regexp::Syntax::Token::PosixClass::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/posix_class.rb#7 -Regexp::Syntax::Token::PosixClass::Extensions = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/posix_class.rb#11 -Regexp::Syntax::Token::PosixClass::NonType = T.let(T.unsafe(nil), Symbol) - -# source://regexp_parser//lib/regexp_parser/syntax/token/posix_class.rb#4 -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 - -# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#29 -Regexp::Syntax::Token::Quantifier::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#4 -Regexp::Syntax::Token::Quantifier::Greedy = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#22 -Regexp::Syntax::Token::Quantifier::Interval = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#26 -Regexp::Syntax::Token::Quantifier::IntervalAll = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#24 -Regexp::Syntax::Token::Quantifier::IntervalPossessive = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#23 -Regexp::Syntax::Token::Quantifier::IntervalReluctant = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#16 -Regexp::Syntax::Token::Quantifier::Possessive = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#10 -Regexp::Syntax::Token::Quantifier::Reluctant = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#30 -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 -module Regexp::Syntax::Token::SubexpressionCall; end - -# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#24 -Regexp::Syntax::Token::SubexpressionCall::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#21 -Regexp::Syntax::Token::SubexpressionCall::Name = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#22 -Regexp::Syntax::Token::SubexpressionCall::Number = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token.rb#43 -Regexp::Syntax::Token::Types = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#3 -module Regexp::Syntax::Token::UnicodeProperty; end - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#64 -Regexp::Syntax::Token::UnicodeProperty::Age = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#40 -Regexp::Syntax::Token::UnicodeProperty::Age_V1_9_3 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#44 -Regexp::Syntax::Token::UnicodeProperty::Age_V2_0_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#46 -Regexp::Syntax::Token::UnicodeProperty::Age_V2_2_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#48 -Regexp::Syntax::Token::UnicodeProperty::Age_V2_3_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#50 -Regexp::Syntax::Token::UnicodeProperty::Age_V2_4_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#52 -Regexp::Syntax::Token::UnicodeProperty::Age_V2_5_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#54 -Regexp::Syntax::Token::UnicodeProperty::Age_V2_6_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#56 -Regexp::Syntax::Token::UnicodeProperty::Age_V2_6_2 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#58 -Regexp::Syntax::Token::UnicodeProperty::Age_V2_6_3 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#60 -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#739 -Regexp::Syntax::Token::UnicodeProperty::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#13 -module Regexp::Syntax::Token::UnicodeProperty::Category; end - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#36 -Regexp::Syntax::Token::UnicodeProperty::Category::All = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#33 -Regexp::Syntax::Token::UnicodeProperty::Category::Codepoint = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#14 -Regexp::Syntax::Token::UnicodeProperty::Category::Letter = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#17 -Regexp::Syntax::Token::UnicodeProperty::Category::Mark = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#20 -Regexp::Syntax::Token::UnicodeProperty::Category::Number = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#23 -Regexp::Syntax::Token::UnicodeProperty::Category::Punctuation = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#30 -Regexp::Syntax::Token::UnicodeProperty::Category::Separator = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#27 -Regexp::Syntax::Token::UnicodeProperty::Category::Symbol = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#6 -Regexp::Syntax::Token::UnicodeProperty::CharType_V1_9_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#9 -Regexp::Syntax::Token::UnicodeProperty::CharType_V2_5_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#133 -Regexp::Syntax::Token::UnicodeProperty::Derived = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#66 -Regexp::Syntax::Token::UnicodeProperty::Derived_V1_9_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#120 -Regexp::Syntax::Token::UnicodeProperty::Derived_V2_0_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#125 -Regexp::Syntax::Token::UnicodeProperty::Derived_V2_4_0 = T.let(T.unsafe(nil), Array) - -# 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#724 -Regexp::Syntax::Token::UnicodeProperty::Emoji = T.let(T.unsafe(nil), Array) - -# 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#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#332 -Regexp::Syntax::Token::UnicodeProperty::Script = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#135 -Regexp::Syntax::Token::UnicodeProperty::Script_V1_9_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#231 -Regexp::Syntax::Token::UnicodeProperty::Script_V1_9_3 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#237 -Regexp::Syntax::Token::UnicodeProperty::Script_V2_0_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#247 -Regexp::Syntax::Token::UnicodeProperty::Script_V2_2_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#273 -Regexp::Syntax::Token::UnicodeProperty::Script_V2_3_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#282 -Regexp::Syntax::Token::UnicodeProperty::Script_V2_4_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#291 -Regexp::Syntax::Token::UnicodeProperty::Script_V2_5_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#298 -Regexp::Syntax::Token::UnicodeProperty::Script_V2_6_0 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#308 -Regexp::Syntax::Token::UnicodeProperty::Script_V2_6_2 = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#315 -Regexp::Syntax::Token::UnicodeProperty::Script_V3_1_0 = T.let(T.unsafe(nil), Array) - -# 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#741 -Regexp::Syntax::Token::UnicodeProperty::Type = T.let(T.unsafe(nil), Symbol) - -# 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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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 -class Regexp::Syntax::UnknownSyntaxNameError < ::Regexp::Syntax::SyntaxError - # @return [UnknownSyntaxNameError] a new instance of UnknownSyntaxNameError - # - # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#13 - def initialize(name); end -end - -# source://regexp_parser//lib/regexp_parser/syntax/versions/1.8.6.rb#1 -class Regexp::Syntax::V1_8_6 < ::Regexp::Syntax::Base; end - -# source://regexp_parser//lib/regexp_parser/syntax/versions/1.9.1.rb#1 -class Regexp::Syntax::V1_9_1 < ::Regexp::Syntax::V1_8_6; end - -# source://regexp_parser//lib/regexp_parser/syntax/versions/1.9.3.rb#1 -class Regexp::Syntax::V1_9_3 < ::Regexp::Syntax::V1_9_1; end - -# source://regexp_parser//lib/regexp_parser/syntax/versions/2.0.0.rb#1 -class Regexp::Syntax::V2_0_0 < ::Regexp::Syntax::V1_9_3; end - -# source://regexp_parser//lib/regexp_parser/syntax/versions/2.2.0.rb#1 -class Regexp::Syntax::V2_2_0 < ::Regexp::Syntax::V2_0_0; end - -# source://regexp_parser//lib/regexp_parser/syntax/versions/2.3.0.rb#1 -class Regexp::Syntax::V2_3_0 < ::Regexp::Syntax::V2_2_0; end - -# source://regexp_parser//lib/regexp_parser/syntax/versions/2.4.0.rb#1 -class Regexp::Syntax::V2_4_0 < ::Regexp::Syntax::V2_3_0; end - -# source://regexp_parser//lib/regexp_parser/syntax/versions/2.4.1.rb#1 -class Regexp::Syntax::V2_4_1 < ::Regexp::Syntax::V2_4_0; end - -# source://regexp_parser//lib/regexp_parser/syntax/versions/2.5.0.rb#1 -class Regexp::Syntax::V2_5_0 < ::Regexp::Syntax::V2_4_1; end - -# source://regexp_parser//lib/regexp_parser/syntax/versions/2.6.0.rb#1 -class Regexp::Syntax::V2_6_0 < ::Regexp::Syntax::V2_5_0; end - -# source://regexp_parser//lib/regexp_parser/syntax/versions/2.6.2.rb#1 -class Regexp::Syntax::V2_6_2 < ::Regexp::Syntax::V2_6_0; end - -# source://regexp_parser//lib/regexp_parser/syntax/versions/2.6.3.rb#1 -class Regexp::Syntax::V2_6_3 < ::Regexp::Syntax::V2_6_2; end - -# source://regexp_parser//lib/regexp_parser/syntax/versions/3.1.0.rb#1 -class Regexp::Syntax::V3_1_0 < ::Regexp::Syntax::V2_6_3; end - -# source://regexp_parser//lib/regexp_parser/syntax/versions/3.2.0.rb#1 -class Regexp::Syntax::V3_2_0 < ::Regexp::Syntax::V3_1_0; end - -# source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#4 -Regexp::Syntax::VERSION_CONST_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#2 -Regexp::Syntax::VERSION_FORMAT = T.let(T.unsafe(nil), String) - -# source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#3 -Regexp::Syntax::VERSION_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://regexp_parser//lib/regexp_parser/token.rb#2 -Regexp::TOKEN_KEYS = T.let(T.unsafe(nil), Array) - -# source://regexp_parser//lib/regexp_parser/token.rb#13 -class Regexp::Token < ::Struct - def conditional_level; end - def conditional_level=(_); end - - # source://regexp_parser//lib/regexp_parser/token.rb#20 - def length; end - - def level; end - def level=(_); end - - # Returns the value of attribute next. - # - # source://regexp_parser//lib/regexp_parser/token.rb#14 - def next; end - - # Sets the attribute next - # - # @param value the value to set the attribute next to. - # - # source://regexp_parser//lib/regexp_parser/token.rb#14 - def next=(_arg0); end - - # source://regexp_parser//lib/regexp_parser/token.rb#16 - def offset; end - - # Returns the value of attribute previous. - # - # source://regexp_parser//lib/regexp_parser/token.rb#14 - def previous; end - - # Sets the attribute previous - # - # @param value the value to set the attribute previous to. - # - # source://regexp_parser//lib/regexp_parser/token.rb#14 - def previous=(_arg0); end - - def set_level; end - def set_level=(_); end - def te; end - def te=(_); end - def text; end - def text=(_); end - def token; end - def token=(_); end - def ts; end - def ts=(_); end - def type; end - def type=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end diff --git a/sorbet/rbi/gems/regexp_parser@2.13.1.rbi b/sorbet/rbi/gems/regexp_parser@2.13.1.rbi new file mode 100644 index 0000000..2a29fe9 --- /dev/null +++ b/sorbet/rbi/gems/regexp_parser@2.13.1.rbi @@ -0,0 +1,3500 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `regexp_parser` gem. +# Please instead update this file by running `bin/tapioca gem regexp_parser`. + + +# This file implements several tree traversal methods. +# +# Note: The methods are optimized for performance and avoid stack overflows on +# large trees. Check tasks/benchmark/traversal.rb when working in here. +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:3 +module Regexp::Expression; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/alternation.rb:7 +class Regexp::Expression::Alternation < ::Regexp::Expression::SequenceOperation + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/alternation.rb:10 + def alternatives; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:11 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:132 + def match_length; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/alternation.rb:8 +Regexp::Expression::Alternation::OPERAND = Regexp::Expression::Alternative + +# A sequence of expressions, used by Alternation as one of its alternatives. +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/alternation.rb:5 +class Regexp::Expression::Alternative < ::Regexp::Expression::Sequence + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:12 + def human_name; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/anchor.rb:4 +module Regexp::Expression::Anchor; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/anchor.rb:20 +Regexp::Expression::Anchor::BOL = Regexp::Expression::Anchor::BeginningOfLine + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/anchor.rb:22 +Regexp::Expression::Anchor::BOS = Regexp::Expression::Anchor::BeginningOfString + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/anchor.rb:5 +class Regexp::Expression::Anchor::Base < ::Regexp::Expression::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:149 + def match_length; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/anchor.rb:7 +class Regexp::Expression::Anchor::BeginningOfLine < ::Regexp::Expression::Anchor::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:13 + def human_name; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/anchor.rb:10 +class Regexp::Expression::Anchor::BeginningOfString < ::Regexp::Expression::Anchor::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:14 + def human_name; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/anchor.rb:21 +Regexp::Expression::Anchor::EOL = Regexp::Expression::Anchor::EndOfLine + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/anchor.rb:23 +Regexp::Expression::Anchor::EOS = Regexp::Expression::Anchor::EndOfString + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/anchor.rb:24 +Regexp::Expression::Anchor::EOSobEOL = Regexp::Expression::Anchor::EndOfStringOrBeforeEndOfLine + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/anchor.rb:8 +class Regexp::Expression::Anchor::EndOfLine < ::Regexp::Expression::Anchor::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:15 + def human_name; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/anchor.rb:11 +class Regexp::Expression::Anchor::EndOfString < ::Regexp::Expression::Anchor::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:16 + def human_name; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/anchor.rb:13 +class Regexp::Expression::Anchor::EndOfStringOrBeforeEndOfLine < ::Regexp::Expression::Anchor::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:17 + def human_name; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/anchor.rb:18 +class Regexp::Expression::Anchor::MatchStart < ::Regexp::Expression::Anchor::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:18 + def human_name; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/anchor.rb:16 +class Regexp::Expression::Anchor::NonWordBoundary < ::Regexp::Expression::Anchor::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:19 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/negative.rb:15 + def negative?; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/anchor.rb:15 +class Regexp::Expression::Anchor::WordBoundary < ::Regexp::Expression::Anchor::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:20 + def human_name; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:66 +module Regexp::Expression::Assertion; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:67 +class Regexp::Expression::Assertion::Base < ::Regexp::Expression::Group::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:149 + def match_length; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:69 +class Regexp::Expression::Assertion::Lookahead < ::Regexp::Expression::Assertion::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:21 + def human_name; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:72 +class Regexp::Expression::Assertion::Lookbehind < ::Regexp::Expression::Assertion::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:22 + def human_name; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:70 +class Regexp::Expression::Assertion::NegativeLookahead < ::Regexp::Expression::Assertion::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:23 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/negative.rb:16 + def negative?; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:73 +class Regexp::Expression::Assertion::NegativeLookbehind < ::Regexp::Expression::Assertion::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:24 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/negative.rb:17 + def negative?; end +end + +# alias for symmetry between token symbol and Expression class name +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:57 +Regexp::Expression::Backref = Regexp::Expression::Backreference + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:4 +module Regexp::Expression::Backreference; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:5 +class Regexp::Expression::Backreference::Base < ::Regexp::Expression::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:157 + def match_length; end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:158 + def referential?; end + end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:17 +class Regexp::Expression::Backreference::Name < ::Regexp::Expression::Backreference::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:21 + def initialize(token, options = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:25 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:18 + def name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:19 + def reference; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:33 +class Regexp::Expression::Backreference::NameCall < ::Regexp::Expression::Backreference::Name + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:26 + def human_name; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:45 +class Regexp::Expression::Backreference::NameRecursionLevel < ::Regexp::Expression::Backreference::Name + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:48 + def initialize(token, options = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:46 + def recursion_level; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:7 +class Regexp::Expression::Backreference::Number < ::Regexp::Expression::Backreference::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:11 + def initialize(token, options = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:27 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:8 + def number; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:9 + def reference; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:32 +class Regexp::Expression::Backreference::NumberCall < ::Regexp::Expression::Backreference::Number + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:29 + def human_name; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:34 +class Regexp::Expression::Backreference::NumberCallRelative < ::Regexp::Expression::Backreference::NumberRelative + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:30 + def human_name; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:36 +class Regexp::Expression::Backreference::NumberRecursionLevel < ::Regexp::Expression::Backreference::NumberRelative + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:39 + def initialize(token, options = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:37 + def recursion_level; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:27 +class Regexp::Expression::Backreference::NumberRelative < ::Regexp::Expression::Backreference::Number + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:28 + def effective_number; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:28 + def effective_number=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:28 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/backreference.rb:29 + def reference; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:4 +class Regexp::Expression::Base + include ::Regexp::Expression::Shared + include ::Regexp::Expression::ReferencedExpressions + extend ::Regexp::Expression::Shared::ClassMethods + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:7 + def initialize(token, options = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match.rb:13 + def =~(string, offset = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:30 + def a?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:27 + def ascii_classes?; end + + # Assigns referenced expressions to referring expressions, e.g. if there is + # an instance of Backreference::Number, its #referenced_expression is set to + # the instance of Group::Capture that it refers to via its number. + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:92 + def assign_referenced_expressions; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:69 + def attributes; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:10 + def case_insensitive?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def conditional_level; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def conditional_level=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def custom_to_s_handling; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def custom_to_s_handling=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:25 + def d?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:22 + def default_classes?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:20 + def extended?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:16 + def free_spacing?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:42 + def greedy?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:13 + def i?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:14 + def ignore_case?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:49 + def lazy?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def level; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def level=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:8 + def m?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match.rb:10 + def match(string, offset = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match.rb:5 + def match?(string); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match.rb:8 + def matches?(string); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:5 + def multiline?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def nesting_level; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def nesting_level=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def options; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def options=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def parent; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def parent=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:51 + def possessive?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def pre_quantifier_decorations; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def pre_quantifier_decorations=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def quantifier; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def quantifier=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:19 + def quantify(*args); end + + # Deprecated. Prefer `#repetitions` which has a more uniform interface. + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:28 + def quantity; end + + # Recalculates the nesting_level for this node and children, which reflects + # how deep a node is in the tree. Do this at the end of parsing to account + # for tree rewrites. + # This must be safe against overflows and performant - check the benchmarks. + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:75 + def recursively_update_nesting_levels(base = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:46 + def reluctant?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:34 + def repetitions; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def set_level; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def set_level=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/strfregexp.rb:100 + def strfre(format = T.unsafe(nil), indent_offset = T.unsafe(nil), index = T.unsafe(nil)); end + + # %l Level (depth) of the expression. Returns 'root' for the root + # expression, returns zero or higher for all others. + # + # %> Indentation at expression's level. + # + # %x Index of the expression at its depth. Available when using + # the sprintf_tree method only. + # + # %s Start offset within the whole expression. + # %e End offset within the whole expression. + # %S Length of expression. + # + # %o Coded offset and length, same as '@%s+%S' + # + # %y Type of expression. + # %k Token of expression. + # %i ID, same as '%y:%k' + # %c Class name + # + # %q Quantifier info, as {m[,M]} + # %Q Quantifier text + # + # %z Quantifier min + # %Z Quantifier max + # + # %t Base text of the expression (excludes quantifier, if any) + # %~t Full text if the expression is terminal, otherwise %i + # %T Full text of the expression (includes quantifier, if any) + # + # %b Basic info, same as '%o %i' + # %m Most info, same as '%b %q' + # %a All info, same as '%m %t' + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/strfregexp.rb:39 + def strfregexp(format = T.unsafe(nil), indent_offset = T.unsafe(nil), index = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def te; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def te=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def text; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def text=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:55 + def to_h; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:11 + def to_re(format = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def token; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def token=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def ts; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def ts=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def type; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:5 + def type=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:35 + def u?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:32 + def unicode_classes?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/base.rb:23 + def unquantified_clone; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/options.rb:19 + def x?; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set.rb:4 +class Regexp::Expression::CharacterSet < ::Regexp::Expression::Subexpression + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set.rb:8 + def initialize(token, options = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set.rb:18 + def close; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set.rb:5 + def closed; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set.rb:5 + def closed=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set.rb:6 + def closed?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:99 + def match_length; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set.rb:14 + def negate; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set.rb:5 + def negative; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set.rb:5 + def negative=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/negative.rb:18 + def negative?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/parts.rb:17 + def parts; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set/intersection.rb:5 +class Regexp::Expression::CharacterSet::IntersectedSequence < ::Regexp::Expression::Sequence + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:31 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:99 + def match_length; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set/intersection.rb:7 +class Regexp::Expression::CharacterSet::Intersection < ::Regexp::Expression::SequenceOperation + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:32 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:99 + def match_length; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set/intersection.rb:8 +Regexp::Expression::CharacterSet::Intersection::OPERAND = Regexp::Expression::CharacterSet::IntersectedSequence + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set/range.rb:5 +class Regexp::Expression::CharacterSet::Range < ::Regexp::Expression::Subexpression + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set/range.rb:10 + def <<(exp); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set/range.rb:16 + def complete?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:33 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:99 + def match_length; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/parts.rb:18 + def parts; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set/range.rb:6 + def ts; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_type.rb:4 +module Regexp::Expression::CharacterType; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_type.rb:7 +class Regexp::Expression::CharacterType::Any < ::Regexp::Expression::CharacterType::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:34 + def human_name; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_type.rb:5 +class Regexp::Expression::CharacterType::Base < ::Regexp::Expression::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:99 + def match_length; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/negative.rb:19 + def negative?; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_type.rb:8 +class Regexp::Expression::CharacterType::Digit < ::Regexp::Expression::CharacterType::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_type.rb:17 +class Regexp::Expression::CharacterType::ExtendedGrapheme < ::Regexp::Expression::CharacterType::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_type.rb:10 +class Regexp::Expression::CharacterType::Hex < ::Regexp::Expression::CharacterType::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_type.rb:16 +class Regexp::Expression::CharacterType::Linebreak < ::Regexp::Expression::CharacterType::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_type.rb:9 +class Regexp::Expression::CharacterType::NonDigit < ::Regexp::Expression::CharacterType::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_type.rb:11 +class Regexp::Expression::CharacterType::NonHex < ::Regexp::Expression::CharacterType::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_type.rb:15 +class Regexp::Expression::CharacterType::NonSpace < ::Regexp::Expression::CharacterType::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_type.rb:13 +class Regexp::Expression::CharacterType::NonWord < ::Regexp::Expression::CharacterType::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_type.rb:14 +class Regexp::Expression::CharacterType::Space < ::Regexp::Expression::CharacterType::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_type.rb:12 +class Regexp::Expression::CharacterType::Word < ::Regexp::Expression::CharacterType::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/free_space.rb:10 +class Regexp::Expression::Comment < ::Regexp::Expression::FreeSpace + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:35 + def human_name; end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:148 + def comment?; end + end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/conditional.rb:4 +module Regexp::Expression::Conditional; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/conditional.rb:20 +class Regexp::Expression::Conditional::Branch < ::Regexp::Expression::Sequence + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:36 + def human_name; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/conditional.rb:11 +class Regexp::Expression::Conditional::Condition < ::Regexp::Expression::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:37 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:149 + def match_length; end + + # Name or number of the referenced capturing group that determines state. + # Returns a String if reference is by name, Integer if by number. + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/conditional.rb:14 + def reference; end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:159 + def referential?; end + end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/conditional.rb:22 +class Regexp::Expression::Conditional::Expression < ::Regexp::Expression::Subexpression + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/conditional.rb:23 + def <<(exp); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/conditional.rb:27 + def add_sequence(active_opts = T.unsafe(nil), params = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/conditional.rb:32 + def branch(active_opts = T.unsafe(nil), params = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/conditional.rb:43 + def branches; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/conditional.rb:39 + def condition; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/conditional.rb:34 + def condition=(exp); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:38 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:132 + def match_length; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/parts.rb:19 + def parts; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/conditional.rb:47 + def reference; end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:160 + def referential?; end + end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/conditional.rb:5 +class Regexp::Expression::Conditional::TooManyBranches < ::Regexp::Parser::Error + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/conditional.rb:6 + def initialize; end +end + +# alias for symmetry between Token::* and Expression::* +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:32 +Regexp::Expression::Escape = Regexp::Expression::EscapeSequence + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:4 +module Regexp::Expression::EscapeSequence; end + +# e.g. \xE2\x82\xAC +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:25 +class Regexp::Expression::EscapeSequence::AbstractMetaControlSequence < ::Regexp::Expression::EscapeSequence::Base + private + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:48 + def control_sequence_to_s(control_sequence); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:53 + def meta_char_to_codepoint(meta_char); end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:7 +class Regexp::Expression::EscapeSequence::AsciiEscape < ::Regexp::Expression::EscapeSequence::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:4 + def codepoint; end +end + +# \e +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:8 +class Regexp::Expression::EscapeSequence::Backspace < ::Regexp::Expression::EscapeSequence::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:5 + def codepoint; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:5 +class Regexp::Expression::EscapeSequence::Base < ::Regexp::Expression::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_char.rb:4 + def char; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:99 + def match_length; end +end + +# \b +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:9 +class Regexp::Expression::EscapeSequence::Bell < ::Regexp::Expression::EscapeSequence::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:6 + def codepoint; end +end + +# e.g. \x0A +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:20 +class Regexp::Expression::EscapeSequence::Codepoint < ::Regexp::Expression::EscapeSequence::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:18 + def codepoint; end +end + +# e.g. \u000A +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:22 +class Regexp::Expression::EscapeSequence::CodepointList < ::Regexp::Expression::EscapeSequence::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:28 + def char; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:36 + def chars; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:32 + def codepoint; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:40 + def codepoints; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:174 + def match_length; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:26 +class Regexp::Expression::EscapeSequence::Control < ::Regexp::Expression::EscapeSequence::AbstractMetaControlSequence + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:60 + def codepoint; end +end + +# \a +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:10 +class Regexp::Expression::EscapeSequence::FormFeed < ::Regexp::Expression::EscapeSequence::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:7 + def codepoint; end +end + +# e.g. \012 +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:19 +class Regexp::Expression::EscapeSequence::Hex < ::Regexp::Expression::EscapeSequence::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:17 + def codepoint; end +end + +# \v +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:16 +class Regexp::Expression::EscapeSequence::Literal < ::Regexp::Expression::EscapeSequence::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:13 + def codepoint; end +end + +# e.g. \cB +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:27 +class Regexp::Expression::EscapeSequence::Meta < ::Regexp::Expression::EscapeSequence::AbstractMetaControlSequence + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:66 + def codepoint; end +end + +# e.g. \M-Z +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:28 +class Regexp::Expression::EscapeSequence::MetaControl < ::Regexp::Expression::EscapeSequence::AbstractMetaControlSequence + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:72 + def codepoint; end +end + +# \f +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:11 +class Regexp::Expression::EscapeSequence::Newline < ::Regexp::Expression::EscapeSequence::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:8 + def codepoint; end +end + +# e.g. \j, \@, \😀 (ineffectual escapes) +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:18 +class Regexp::Expression::EscapeSequence::Octal < ::Regexp::Expression::EscapeSequence::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:15 + def codepoint; end +end + +# \n +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:12 +class Regexp::Expression::EscapeSequence::Return < ::Regexp::Expression::EscapeSequence::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:9 + def codepoint; end +end + +# \r +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:13 +class Regexp::Expression::EscapeSequence::Tab < ::Regexp::Expression::EscapeSequence::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:10 + def codepoint; end +end + +# e.g. \u{A B} +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:23 +class Regexp::Expression::EscapeSequence::UTF8Hex < ::Regexp::Expression::EscapeSequence::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:21 + def codepoint; end +end + +# \t +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/escape_sequence.rb:14 +class Regexp::Expression::EscapeSequence::VerticalTab < ::Regexp::Expression::EscapeSequence::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb:11 + def codepoint; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/free_space.rb:4 +class Regexp::Expression::FreeSpace < ::Regexp::Expression::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:149 + def match_length; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/free_space.rb:5 + def quantify(*_args); end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:153 + def decorative?; end + end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:4 +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})` +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:21 +class Regexp::Expression::Group::Absence < ::Regexp::Expression::Group::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:182 + def match_length; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:22 +class Regexp::Expression::Group::Atomic < ::Regexp::Expression::Group::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:5 +class Regexp::Expression::Group::Base < ::Regexp::Expression::Subexpression + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/parts.rb:20 + def parts; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:42 +class Regexp::Expression::Group::Capture < ::Regexp::Expression::Group::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:39 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:44 + def identifier; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:43 + def number; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:43 + def number=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:43 + def number_at_level; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:43 + def number_at_level=(_arg0); end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:144 + def capturing?; end + end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:62 +class Regexp::Expression::Group::Comment < ::Regexp::Expression::Group::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/parts.rb:22 + def parts; end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:149 + def comment?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:154 + def decorative?; end + end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:47 +class Regexp::Expression::Group::Named < ::Regexp::Expression::Group::Capture + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:51 + def initialize(token, options = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:40 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:49 + def identifier; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:48 + def name; end + + private + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:56 + 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. +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:25 +class Regexp::Expression::Group::Options < ::Regexp::Expression::Group::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:26 + def option_changes; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:26 + def option_changes=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:33 + def quantify(*args); end + + private + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:28 + def initialize_copy(orig); end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:8 +class Regexp::Expression::Group::Passive < ::Regexp::Expression::Group::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:11 + def initialize(*); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:9 + def implicit=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/group.rb:16 + def implicit?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/parts.rb:21 + def parts; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/keep.rb:4 +module Regexp::Expression::Keep; end + +# TODO: in regexp_parser v3.0.0 this should possibly be a Subexpression +# that contains all expressions to its left. +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/keep.rb:7 +class Regexp::Expression::Keep::Mark < ::Regexp::Expression::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:41 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:149 + def match_length; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/literal.rb:4 +class Regexp::Expression::Literal < ::Regexp::Expression::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:42 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:107 + def match_length; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:87 +Regexp::Expression::MatchLength = Regexp::MatchLength + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/posix_class.rb:12 +Regexp::Expression::Nonposixclass = Regexp::Expression::PosixClass + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:120 +Regexp::Expression::Nonproperty = Regexp::Expression::UnicodeProperty + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/posix_class.rb:4 +class Regexp::Expression::PosixClass < ::Regexp::Expression::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:99 + def match_length; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/posix_class.rb:5 + def name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/negative.rb:20 + def negative?; end +end + +# alias for symmetry between token symbol and Expression class name +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/posix_class.rb:11 +Regexp::Expression::Posixclass = Regexp::Expression::PosixClass + +# alias for symmetry between token symbol and Expression class name +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:119 +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. +# Or actually allow chaining as a more concise but tricky solution than PR#69. +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:8 +class Regexp::Expression::Quantifier + include ::Regexp::Expression::Shared + extend ::Regexp::Expression::Shared::ClassMethods + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:13 + def initialize(*args); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def conditional_level; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def conditional_level=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def custom_to_s_handling; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def custom_to_s_handling=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:32 + def greedy?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:38 + def lazy?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def level; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def level=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:44 + def max; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:40 + def min; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:48 + def mode; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def nesting_level; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def nesting_level=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def options; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def options=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def parent; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def parent=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:32 + def possessive?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def pre_quantifier_decorations; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def pre_quantifier_decorations=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def quantifier; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def quantifier=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:32 + def reluctant?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def set_level; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def set_level=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def te; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def te=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def text; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def text=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:21 + def to_h; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def token; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def token=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def ts; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def ts=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def type; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:9 + def type=(_arg0); end + + private + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:54 + def deprecated_old_init(token, text, _min, _max, _mode = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:66 + def derived_data; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/quantifier.rb:11 +Regexp::Expression::Quantifier::MODES = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/referenced_expressions.rb:4 +module Regexp::Expression::ReferencedExpressions + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/referenced_expressions.rb:7 + def referenced_expression; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/referenced_expressions.rb:5 + def referenced_expressions; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/referenced_expressions.rb:5 + def referenced_expressions=(_arg0); end + + private + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/referenced_expressions.rb:11 + def initialize_copy(orig); end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/root.rb:4 +class Regexp::Expression::Root < ::Regexp::Expression::Subexpression + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:43 + def human_name; end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/root.rb:5 + def build(options = T.unsafe(nil)); end + end +end + +# A sequence of expressions. Differs from a Subexpressions by how it handles +# quantifiers, as it applies them to its last element instead of itself as +# a whole subexpression. +# +# Used as the base class for the Alternation alternatives, Conditional +# branches, and CharacterSet::Intersection intersected sequences. +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/sequence.rb:10 +class Regexp::Expression::Sequence < ::Regexp::Expression::Subexpression + # pkg:gem/regexp_parser#lib/regexp_parser/expression/sequence.rb:29 + def quantify(token, *args); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/sequence.rb:25 + def ts; end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/expression/sequence.rb:12 + def add_to(exp, params = T.unsafe(nil), active_opts = T.unsafe(nil)); end + end +end + +# abstract class +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/sequence_operation.rb:5 +class Regexp::Expression::SequenceOperation < ::Regexp::Expression::Subexpression + # pkg:gem/regexp_parser#lib/regexp_parser/expression/sequence_operation.rb:14 + def <<(exp); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/sequence_operation.rb:18 + def add_sequence(active_opts = T.unsafe(nil), params = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/sequence_operation.rb:7 + def operands; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/sequence_operation.rb:8 + def operator; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/parts.rb:24 + def parts; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/sequence_operation.rb:6 + def sequences; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/sequence_operation.rb:10 + def ts; end +end + +# alias for symmetry between token symbol and Expression class name +# +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/character_set.rb:24 +Regexp::Expression::Set = Regexp::Expression::CharacterSet + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:4 +module Regexp::Expression::Shared + mixes_in_class_methods ::Regexp::Expression::Shared::ClassMethods + + # Deep-compare two expressions for equality. + # + # When changing the conditions, please make sure to update + # #pretty_print_instance_variables so that it includes all relevant values. + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:103 + def ==(other); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:118 + def ===(other); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:51 + def base_length; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:142 + def capturing?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:112 + def coded_offset; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:146 + def comment?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:151 + def decorative?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:47 + def ends_at(include_quantifier = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:119 + def eql?(other); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:55 + def full_length; end + + # default implementation, e.g. "atomic group", "hex escape", "word type", .. + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:6 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/printing.rb:5 + def inspect; end + + # Test if this expression has the given test_token, and optionally a given + # test_type. + # + # # Any expressions + # exp.is? :* # always returns true + # + # # is it a :capture + # exp.is? :capture + # + # # is it a :character and a :set + # exp.is? :character, :set + # + # # is it a :meta :dot + # exp.is? :dot, :meta + # + # # is it a :meta or :escape :dot + # exp.is? :dot, [:meta, :escape] + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:38 + def is?(test_token, test_type = T.unsafe(nil)); end + + # not an alias so as to respect overrides of #negative? + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/negative.rb:10 + def negated?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/negative.rb:5 + def negative?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:108 + def offset; end + + # Test if this expression matches an entry in the given scope spec. + # + # A scope spec can be one of: + # + # . An array: Interpreted as a set of tokens, tested for inclusion + # of the expression's token. + # + # . A hash: Where the key is interpreted as the expression type + # and the value is either a symbol or an array. In this + # case, when the scope is a hash, one_of? calls itself to + # evaluate the key's value. + # + # . A symbol: matches the expression's token or type, depending on + # the level of the call. If one_of? is called directly with + # a symbol then it will always be checked against the + # type of the expression. If it's being called for a value + # from a hash, it will be checked against the token of the + # expression. + # + # # any expression + # exp.one_of?(:*) # always true + # + # # like exp.type?(:group) + # exp.one_of?(:group) + # + # # any expression of type meta + # exp.one_of?(:meta => :*) + # + # # meta dots and alternations + # exp.one_of?(:meta => [:dot, :alternation]) + # + # # meta dots and any set tokens + # exp.one_of?({meta: [:dot], set: :*}) + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:77 + def one_of?(scope, top = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:129 + def optional?; end + + # default implementation + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/parts.rb:6 + def parts; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:100 + def pre_quantifier_decoration(expression_format = T.unsafe(nil)); end + + # Make pretty-print work despite #inspect implementation. + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/printing.rb:14 + def pretty_print(q); end + + # Called by pretty_print (ruby/pp) and #inspect. + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/printing.rb:19 + def pretty_print_instance_variables; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:133 + def quantified?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:104 + def quantifier_affix(expression_format = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:156 + def referential?; end + + # Compares two expressions without considering their subexpressions. + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:122 + def shallow_equal?(other); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:43 + def starts_at; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:138 + def terminal?; end + + # #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 + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:72 + def to_s(format = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:98 + def to_str(format = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/construct.rb:39 + def token_class; end + + # Test if this expression has the given test_type, which can be either + # a symbol or an array of symbols to check against the expression's type. + # + # # is it a :group expression + # exp.type? :group + # + # # is it a :set, or :meta + # exp.type? [:set, :meta] + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:15 + def type?(test_type); end + + private + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:18 + def init_from_token_and_options(token, options = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:32 + def initialize_copy(orig); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/parts.rb:12 + def intersperse(expressions, separator); end + + class << self + # filled in ./methods/*.rb + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:7 + def included(mod); end + end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/shared.rb:5 +module Regexp::Expression::Shared::ClassMethods + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:143 + def capturing?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:147 + def comment?; end + + # Convenience method to init a valid Expression without a Regexp::Token + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/construct.rb:7 + def construct(params = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/construct.rb:17 + def construct_defaults; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:152 + def decorative?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:157 + def referential?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:139 + def terminal?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/construct.rb:27 + def token_class; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:4 +class Regexp::Expression::Subexpression < ::Regexp::Expression::Base + include ::Enumerable + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:9 + def initialize(token, options = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:22 + def <<(exp); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:28 + def [](*args, &block); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:28 + def at(*args, &block); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:35 + def dig(*indices); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:28 + def each(*args, &block); end + + # 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. + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/traverse.rb:14 + def each_expression(include_self = T.unsafe(nil), &block); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:28 + def empty?(*args, &block); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:7 + def expressions; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:7 + def expressions=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:52 + def extract_quantifier_target(quantifier_description); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:28 + 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. + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/traverse.rb:78 + def flat_map(include_self = T.unsafe(nil), &block); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:28 + def index(*args, &block); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:120 + def inner_match_length; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:28 + def join(*args, &block); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:28 + def last(*args, &block); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:28 + def length(*args, &block); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:113 + def match_length; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/parts.rb:23 + def parts; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/strfregexp.rb:114 + def strfre_tree(format = T.unsafe(nil), include_self = T.unsafe(nil), separator = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/strfregexp.rb:104 + def strfregexp_tree(format = T.unsafe(nil), include_self = T.unsafe(nil), separator = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:41 + def te; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:45 + def to_h; end + + # Traverses the subexpression (depth-first, pre-order) and calls the given + # block for each expression with three arguments; the traversal event, + # the expression, and the index of the expression within its parent. + # + # The event argument is passed as follows: + # + # - For subexpressions, :enter upon entering the subexpression, and + # :exit upon exiting it. + # + # - For terminal expressions, :visit is called once. + # + # Returns self. + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/traverse.rb:38 + def traverse(include_self = T.unsafe(nil), &block); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:28 + def values_at(*args, &block); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/traverse.rb:73 + def walk(include_self = T.unsafe(nil), &block); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:28 + def zip(*args, &block); end + + protected + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/traverse.rb:88 + def each_expression_with_index(&block); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/traverse.rb:110 + def each_expression_without_index(&block); end + + private + + # Override base method to clone the expressions as well. + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/subexpression.rb:15 + def initialize_copy(orig); end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/tests.rb:140 + def terminal?; end + end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:4 +module Regexp::Expression::UnicodeProperty; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:110 +class Regexp::Expression::UnicodeProperty::Age < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:15 +class Regexp::Expression::UnicodeProperty::Alnum < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:16 +class Regexp::Expression::UnicodeProperty::Alpha < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:33 +class Regexp::Expression::UnicodeProperty::Any < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:17 +class Regexp::Expression::UnicodeProperty::Ascii < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:34 +class Regexp::Expression::UnicodeProperty::Assigned < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:5 +class Regexp::Expression::UnicodeProperty::Base < ::Regexp::Expression::Base + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:99 + def match_length; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:6 + def name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/negative.rb:21 + def negative?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:10 + def shortcut; end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:18 +class Regexp::Expression::UnicodeProperty::Blank < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:111 +class Regexp::Expression::UnicodeProperty::Block < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:19 +class Regexp::Expression::UnicodeProperty::Cntrl < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:99 +module Regexp::Expression::UnicodeProperty::Codepoint; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:102 +class Regexp::Expression::UnicodeProperty::Codepoint::Any < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:100 +class Regexp::Expression::UnicodeProperty::Codepoint::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:103 +class Regexp::Expression::UnicodeProperty::Codepoint::Control < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:104 +class Regexp::Expression::UnicodeProperty::Codepoint::Format < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:106 +class Regexp::Expression::UnicodeProperty::Codepoint::PrivateUse < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:105 +class Regexp::Expression::UnicodeProperty::Codepoint::Surrogate < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:107 +class Regexp::Expression::UnicodeProperty::Codepoint::Unassigned < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:112 +class Regexp::Expression::UnicodeProperty::Derived < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:20 +class Regexp::Expression::UnicodeProperty::Digit < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:113 +class Regexp::Expression::UnicodeProperty::Emoji < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:114 +class Regexp::Expression::UnicodeProperty::Enumerated < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:21 +class Regexp::Expression::UnicodeProperty::Graph < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:36 +module Regexp::Expression::UnicodeProperty::Letter; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:39 +class Regexp::Expression::UnicodeProperty::Letter::Any < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:37 +class Regexp::Expression::UnicodeProperty::Letter::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:40 +class Regexp::Expression::UnicodeProperty::Letter::Cased < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:42 +class Regexp::Expression::UnicodeProperty::Letter::Lowercase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:44 +class Regexp::Expression::UnicodeProperty::Letter::Modifier < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:45 +class Regexp::Expression::UnicodeProperty::Letter::Other < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:43 +class Regexp::Expression::UnicodeProperty::Letter::Titlecase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:41 +class Regexp::Expression::UnicodeProperty::Letter::Uppercase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:22 +class Regexp::Expression::UnicodeProperty::Lower < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:48 +module Regexp::Expression::UnicodeProperty::Mark; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:51 +class Regexp::Expression::UnicodeProperty::Mark::Any < ::Regexp::Expression::UnicodeProperty::Mark::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:49 +class Regexp::Expression::UnicodeProperty::Mark::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:52 +class Regexp::Expression::UnicodeProperty::Mark::Combining < ::Regexp::Expression::UnicodeProperty::Mark::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:55 +class Regexp::Expression::UnicodeProperty::Mark::Enclosing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:53 +class Regexp::Expression::UnicodeProperty::Mark::Nonspacing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:54 +class Regexp::Expression::UnicodeProperty::Mark::Spacing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:31 +class Regexp::Expression::UnicodeProperty::Newline < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:58 +module Regexp::Expression::UnicodeProperty::Number; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:61 +class Regexp::Expression::UnicodeProperty::Number::Any < ::Regexp::Expression::UnicodeProperty::Number::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:59 +class Regexp::Expression::UnicodeProperty::Number::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:62 +class Regexp::Expression::UnicodeProperty::Number::Decimal < ::Regexp::Expression::UnicodeProperty::Number::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:63 +class Regexp::Expression::UnicodeProperty::Number::Letter < ::Regexp::Expression::UnicodeProperty::Number::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:64 +class Regexp::Expression::UnicodeProperty::Number::Other < ::Regexp::Expression::UnicodeProperty::Number::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:23 +class Regexp::Expression::UnicodeProperty::Print < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:24 +class Regexp::Expression::UnicodeProperty::Punct < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:67 +module Regexp::Expression::UnicodeProperty::Punctuation; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:70 +class Regexp::Expression::UnicodeProperty::Punctuation::Any < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:68 +class Regexp::Expression::UnicodeProperty::Punctuation::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:74 +class Regexp::Expression::UnicodeProperty::Punctuation::Close < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:71 +class Regexp::Expression::UnicodeProperty::Punctuation::Connector < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:72 +class Regexp::Expression::UnicodeProperty::Punctuation::Dash < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:76 +class Regexp::Expression::UnicodeProperty::Punctuation::Final < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:75 +class Regexp::Expression::UnicodeProperty::Punctuation::Initial < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:73 +class Regexp::Expression::UnicodeProperty::Punctuation::Open < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:77 +class Regexp::Expression::UnicodeProperty::Punctuation::Other < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:115 +class Regexp::Expression::UnicodeProperty::Script < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:80 +module Regexp::Expression::UnicodeProperty::Separator; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:83 +class Regexp::Expression::UnicodeProperty::Separator::Any < ::Regexp::Expression::UnicodeProperty::Separator::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:81 +class Regexp::Expression::UnicodeProperty::Separator::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:85 +class Regexp::Expression::UnicodeProperty::Separator::Line < ::Regexp::Expression::UnicodeProperty::Separator::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:86 +class Regexp::Expression::UnicodeProperty::Separator::Paragraph < ::Regexp::Expression::UnicodeProperty::Separator::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:84 +class Regexp::Expression::UnicodeProperty::Separator::Space < ::Regexp::Expression::UnicodeProperty::Separator::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:25 +class Regexp::Expression::UnicodeProperty::Space < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:89 +module Regexp::Expression::UnicodeProperty::Symbol; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:92 +class Regexp::Expression::UnicodeProperty::Symbol::Any < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:90 +class Regexp::Expression::UnicodeProperty::Symbol::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:94 +class Regexp::Expression::UnicodeProperty::Symbol::Currency < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:93 +class Regexp::Expression::UnicodeProperty::Symbol::Math < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:95 +class Regexp::Expression::UnicodeProperty::Symbol::Modifier < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:96 +class Regexp::Expression::UnicodeProperty::Symbol::Other < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:26 +class Regexp::Expression::UnicodeProperty::Upper < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:27 +class Regexp::Expression::UnicodeProperty::Word < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:29 +class Regexp::Expression::UnicodeProperty::XPosixPunct < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/unicode_property.rb:28 +class Regexp::Expression::UnicodeProperty::Xdigit < ::Regexp::Expression::UnicodeProperty::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/free_space.rb:13 +class Regexp::Expression::WhiteSpace < ::Regexp::Expression::FreeSpace + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/human_name.rb:44 + def human_name; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/classes/free_space.rb:14 + def merge(exp); end +end + +# A very thin wrapper around the scanner that breaks quantified literal runs, +# collects emitted tokens into an array, calculates their nesting depth, and +# normalizes tokens for the parser, and checks if they are implemented by the +# given syntax flavor. +# +# pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:7 +class Regexp::Lexer + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:73 + def emit(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:20 + def lex(input, syntax = T.unsafe(nil), options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end + + private + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:89 + def ascend(type, token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 + def block; end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 + def block=(_arg0); end + + # if a codepoint list is followed by a quantifier, that quantifier applies + # to the last codepoint, e.g. /\u{61 62 63}{3}/ =~ 'abccc' + # c.f. #break_literal_run. + # + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:141 + 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 + # + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:121 + def break_literal_run(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 + def collect_tokens; end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 + def collect_tokens=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 + def conditional_nesting; end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 + def conditional_nesting=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:104 + def descend(type, token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:164 + def merge_condition(current, last); end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 + def nesting; end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 + def nesting=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 + def preprev_token; end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 + def preprev_token=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 + def prev_token; end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 + def prev_token=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 + def set_nesting; end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 + def set_nesting=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 + def shift; end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 + def shift=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 + def tokens; end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:85 + def tokens=(_arg0); end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:15 + def lex(input, syntax = T.unsafe(nil), options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end + + # pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:18 + def scan(input, syntax = T.unsafe(nil), options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end + end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:13 +Regexp::Lexer::CONDITION_TOKENS = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/lexer.rb:8 +Regexp::Lexer::OPENING_TOKENS = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:3 +class Regexp::MatchLength + include ::Enumerable + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:11 + def initialize(exp, opts = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:26 + def each(opts = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:37 + def endless_each; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:46 + def fixed?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:42 + def include?(length); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:62 + def inspect; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:54 + def max; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:50 + def min; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:58 + def minmax; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:67 + def to_re; end + + private + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:73 + def base_max; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:73 + def base_max=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:73 + def base_min; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:73 + def base_min=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:73 + def exp_class; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:73 + def exp_class=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:73 + def max_rep; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:73 + def max_rep=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:73 + def min_rep; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:73 + def min_rep=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:73 + def reify; end + + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:73 + def reify=(_arg0); end + + # ruby >= 2.4 + # + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:76 + def test_regexp; end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/expression/methods/match_length.rb:6 + def of(obj); end + end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/version.rb:4 +class Regexp::Parser + include ::Regexp::Expression + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:27 + def parse(input, syntax = T.unsafe(nil), options: T.unsafe(nil), &block); end + + private + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:575 + def active_opts; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:100 + def anchor(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:260 + def assign_effective_number(exp); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:225 + def backref(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:199 + def captured_group_count_at_level; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 + def captured_group_counts; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 + def captured_group_counts=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:571 + def close_completed_character_set_range; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:208 + def close_group; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:539 + def close_set; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:267 + def conditional(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 + def conditional_nesting; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 + def conditional_nesting=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:203 + def count_captured_group; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:214 + def decrease_nesting; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:303 + def escape(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:61 + def extract_options(input, options); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:348 + def free_space(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:115 + def group(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:511 + def increment_group_level(exp); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:550 + def intersection(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:359 + def keep(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:363 + def literal(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:367 + def meta(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:535 + def negate_set; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:297 + def nest(exp); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:292 + def nest_conditional(exp); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 + def nesting; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 + def nesting=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 + def node; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 + def node=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:166 + def open_group(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:528 + def open_set(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:131 + def options_group(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 + def options_stack; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 + def options_stack=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:77 + def parse_token(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:389 + def posixclass(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:396 + def property(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:478 + def quantifier(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:543 + def range(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 + def root; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 + def root=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:378 + def sequence_operation(klass, token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:516 + def set(token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 + def switching_options; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 + def switching_options=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 + def total_captured_group_count; end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:57 + def total_captured_group_count=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:554 + def type(token); end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:23 + def parse(input, syntax = T.unsafe(nil), options: T.unsafe(nil), &block); end + end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:129 +Regexp::Parser::ENC_FLAGS = T.let(T.unsafe(nil), Array) + +# base class for all gem-specific errors +# +# pkg:gem/regexp_parser#lib/regexp_parser/error.rb:5 +class Regexp::Parser::Error < ::StandardError; end + +# pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:128 +Regexp::Parser::MOD_FLAGS = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:9 +class Regexp::Parser::ParserError < ::Regexp::Parser::Error; end + +# pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:393 +Regexp::Parser::UP = Regexp::Expression::UnicodeProperty + +# pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:394 +Regexp::Parser::UPTokens = Regexp::Syntax::Token::UnicodeProperty + +# pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:17 +class Regexp::Parser::UnknownTokenError < ::Regexp::Parser::ParserError + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:18 + def initialize(type, token); end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:11 +class Regexp::Parser::UnknownTokenTypeError < ::Regexp::Parser::ParserError + # pkg:gem/regexp_parser#lib/regexp_parser/parser.rb:12 + def initialize(type, token); end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/version.rb:5 +Regexp::Parser::VERSION = T.let(T.unsafe(nil), String) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/scanner_error.rb:5 +class Regexp::Scanner + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2485 + def capturing_group_count; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2485 + def capturing_group_count=(_arg0); end + + # Emits an array with the details of the scanned pattern + # + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2460 + def emit(type, token, text); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2485 + def literal_run; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2485 + def literal_run=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:963 + def scan(input_object, options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end + + private + + # Appends one or more characters to the literal buffer, to be emitted later + # by a call to emit_literal. + # + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2544 + def append_literal(source, ts, te); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 + def block; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 + def block=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 + def char_pos; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 + def char_pos=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 + def collect_tokens; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 + def collect_tokens=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 + def conditional_stack; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 + def conditional_stack=(_arg0); end + + # Ragel offsets are bytes; emitted token positions are characters. + # + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2525 + def copy(source, ts, te); end + + # Emits the literal run collected by calls to the append_literal method. + # + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2549 + def emit_literal; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2584 + def emit_meta_control_sequence(data, source, ts, te, token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2555 + def emit_options(text); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2529 + def error_text(source, ts, position); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2496 + def extract_encoding(input_object, options); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 + def free_spacing; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 + def free_spacing=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2504 + def free_spacing?(input_object, options); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 + def group_depth; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 + def group_depth=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2516 + def in_group?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2520 + def in_set?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 + def prev_token; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 + def prev_token=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 + def regexp_encoding; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 + def regexp_encoding=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 + def set_depth; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 + def set_depth=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 + def spacing_stack; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 + def spacing_stack=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 + def tokens; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2489 + def tokens=(_arg0); end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2445 + def long_prop_map; end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2449 + def parse_prop_map(name); end + + # Scans the given regular expression text, or Regexp object and collects the + # emitted token into an array that gets returned at the end. If a block is + # given, it gets called for each emitted token. + # + # This method may raise errors if a syntax error is encountered. + # -------------------------------------------------------------------------- + # + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:959 + def scan(input_object, options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end + + # lazy-load property maps when first needed + # + # pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2441 + def short_prop_map; end + end +end + +# Invalid back reference. Used for name a number refs/calls. +# +# pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/validation_error.rb:46 +class Regexp::Scanner::InvalidBackrefError < ::Regexp::Scanner::ValidationError + # pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/validation_error.rb:47 + def initialize(what, reason); end +end + +# Invalid group. Used for named groups. +# +# pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/validation_error.rb:31 +class Regexp::Scanner::InvalidGroupError < ::Regexp::Scanner::ValidationError + # pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/validation_error.rb:32 + def initialize(what, reason); end +end + +# Invalid groupOption. Used for inline options. +# TODO: should become InvalidGroupOptionError in v3.0.0 for consistency +# +# pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/validation_error.rb:39 +class Regexp::Scanner::InvalidGroupOption < ::Regexp::Scanner::ValidationError + # pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/validation_error.rb:40 + def initialize(option, text); end +end + +# Invalid sequence format. Used for escape sequences, mainly. +# +# pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/validation_error.rb:24 +class Regexp::Scanner::InvalidSequenceError < ::Regexp::Scanner::ValidationError + # pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/validation_error.rb:25 + def initialize(what = T.unsafe(nil), where = T.unsafe(nil)); end +end + +# Use each_with_object for required_ruby_version >= 2.2,or #to_h for >= 2.6 +# +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:2454 +Regexp::Scanner::POSIX_CLASSES = T.let(T.unsafe(nil), Hash) + +# Unexpected end of pattern +# +# pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/premature_end_error.rb:5 +class Regexp::Scanner::PrematureEndError < ::Regexp::Scanner::ScannerError + # pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/premature_end_error.rb:6 + def initialize(where = T.unsafe(nil)); end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:947 +Regexp::Scanner::RE_SCANNER_EN_CHARACTER_SET = T.let(T.unsafe(nil), Integer) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:945 +Regexp::Scanner::RE_SCANNER_EN_CHAR_TYPE = T.let(T.unsafe(nil), Integer) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:950 +Regexp::Scanner::RE_SCANNER_EN_CONDITIONAL_EXPRESSION = T.let(T.unsafe(nil), Integer) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:949 +Regexp::Scanner::RE_SCANNER_EN_ESCAPE_SEQUENCE = T.let(T.unsafe(nil), Integer) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:951 +Regexp::Scanner::RE_SCANNER_EN_MAIN = T.let(T.unsafe(nil), Integer) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:948 +Regexp::Scanner::RE_SCANNER_EN_SET_ESCAPE_SEQUENCE = T.let(T.unsafe(nil), Integer) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:946 +Regexp::Scanner::RE_SCANNER_EN_UNICODE_PROPERTY = T.let(T.unsafe(nil), Integer) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:901 +Regexp::Scanner::RE_SCANNER_EOF_ACTIONS = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:921 +Regexp::Scanner::RE_SCANNER_EOF_TRANS = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:943 +Regexp::Scanner::RE_SCANNER_ERROR = T.let(T.unsafe(nil), Integer) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:942 +Regexp::Scanner::RE_SCANNER_FIRST_FINAL = T.let(T.unsafe(nil), Integer) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:881 +Regexp::Scanner::RE_SCANNER_FROM_STATE_ACTIONS = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:90 +Regexp::Scanner::RE_SCANNER_INDEX_OFFSETS = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:110 +Regexp::Scanner::RE_SCANNER_INDICIES = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:70 +Regexp::Scanner::RE_SCANNER_KEY_SPANS = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:941 +Regexp::Scanner::RE_SCANNER_START = T.let(T.unsafe(nil), Integer) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:861 +Regexp::Scanner::RE_SCANNER_TO_STATE_ACTIONS = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:831 +Regexp::Scanner::RE_SCANNER_TRANS_ACTIONS = T.let(T.unsafe(nil), Array) + +# Emit fixed machine data once. The ragel task converts its generated +# accessors and tables to constants with frozen values. +# +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:17 +Regexp::Scanner::RE_SCANNER_TRANS_KEYS = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/scanner.rb:801 +Regexp::Scanner::RE_SCANNER_TRANS_TARGS = T.let(T.unsafe(nil), Array) + +# General scanner error (catch all) +# +# pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/scanner_error.rb:7 +class Regexp::Scanner::ScannerError < ::Regexp::Parser::Error; end + +# The POSIX class name was not recognized by the scanner. +# +# pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/validation_error.rb:60 +class Regexp::Scanner::UnknownPosixClassError < ::Regexp::Scanner::ValidationError + # pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/validation_error.rb:61 + def initialize(text, _); end +end + +# The property name was not recognized by the scanner. +# +# pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/validation_error.rb:53 +class Regexp::Scanner::UnknownUnicodePropertyError < ::Regexp::Scanner::ValidationError + # pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/validation_error.rb:54 + def initialize(name, _); end +end + +# Base for all scanner validation errors +# +# pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/validation_error.rb:5 +class Regexp::Scanner::ValidationError < ::Regexp::Scanner::ScannerError + class << self + # Centralizes and unifies the handling of validation related errors. + # + # pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/validation_error.rb:7 + def for(type, problem, reason = T.unsafe(nil)); end + + # pkg:gem/regexp_parser#lib/regexp_parser/scanner/errors/validation_error.rb:11 + def types; end + end +end + +# Define the base module and the simplest of tokens. +# After loading all the tokens the map is full. Extract all tokens and types +# into the All and Types constants. +# +# pkg:gem/regexp_parser#lib/regexp_parser/syntax.rb:5 +module Regexp::Syntax + private + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:78 + def comparable(name); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:48 + def const_missing(const_name); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:68 + def fallback_version_class(version); end + + # Returns the syntax specification class for the given syntax + # version name. The special names 'any' and '*' return Syntax::Any. + # + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:24 + def for(name); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:32 + def new(name); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:56 + def set_fallback_version_class(const_name); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:74 + def specified_versions; end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:44 + def supported?(name); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:38 + def version_class(name); end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:78 + def comparable(name); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:48 + def const_missing(const_name); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:68 + def fallback_version_class(version); end + + # Returns the syntax specification class for the given syntax + # version name. The special names 'any' and '*' return Syntax::Any. + # + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:24 + def for(name); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:32 + def new(name); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:56 + def set_fallback_version_class(const_name); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:74 + def specified_versions; end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:44 + def supported?(name); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:38 + def version_class(name); end + end +end + +# A syntax that always returns true, passing all tokens as implemented. This +# is useful during development, testing, and should be useful for some types +# of transformations as well. +# +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/any.rb:7 +class Regexp::Syntax::Any < ::Regexp::Syntax::Base + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/any.rb:10 + def implements?(_type, _token); end + end +end + +# A lookup map of supported types and tokens in a given syntax +# +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:11 +class Regexp::Syntax::Base + include ::Regexp::Syntax::Token + + # TODO: drop this backwards compatibility code in v3.0.0, do `private :new` + # + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:101 + def initialize; end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:106 + def method_missing(name, *args); end + + private + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:117 + def respond_to_missing?(name, include_private = T.unsafe(nil)); end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:48 + def added_features; end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:46 + def check!(type, token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:36 + def check?(type, token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:28 + def excludes(type, tokens); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:15 + def features; end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:15 + def features=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:38 + def implementations(type); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:23 + def implements(type, tokens); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:42 + def implements!(type, token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:33 + def implements?(type, token); end + + # automatically inherit features through the syntax class hierarchy + # + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:18 + def inherited(subclass); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:56 + def normalize(type, token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:76 + def normalize_backref(type, token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:67 + def normalize_group(type, token); end + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:52 + def removed_features; end + end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions.rb:10 +Regexp::Syntax::CURRENT = Regexp::Syntax::V4_0_0 + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:8 +class Regexp::Syntax::InvalidVersionNameError < ::Regexp::Syntax::SyntaxError + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:9 + def initialize(name); end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:4 +class Regexp::Syntax::NotImplementedError < ::Regexp::Syntax::SyntaxError + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/base.rb:5 + def initialize(syntax, type, token); end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax.rb:6 +class Regexp::Syntax::SyntaxError < ::Regexp::Parser::Error; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token.rb:5 +module Regexp::Syntax::Token; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token.rb:44 +Regexp::Syntax::Token::All = T.let(T.unsafe(nil), Array) + +# alias for symmetry between Token::* and Expression::* +# +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/meta.rb:17 +module Regexp::Syntax::Token::Alternation; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/meta.rb:18 +Regexp::Syntax::Token::Alternation::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/meta.rb:19 +Regexp::Syntax::Token::Alternation::Type = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/anchor.rb:5 +module Regexp::Syntax::Token::Anchor; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/anchor.rb:11 +Regexp::Syntax::Token::Anchor::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/anchor.rb:6 +Regexp::Syntax::Token::Anchor::Basic = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/anchor.rb:7 +Regexp::Syntax::Token::Anchor::Extended = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/anchor.rb:9 +Regexp::Syntax::Token::Anchor::MatchStart = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/anchor.rb:8 +Regexp::Syntax::Token::Anchor::String = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/anchor.rb:12 +Regexp::Syntax::Token::Anchor::Type = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/assertion.rb:5 +module Regexp::Syntax::Token::Assertion; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/assertion.rb:9 +Regexp::Syntax::Token::Assertion::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/assertion.rb:6 +Regexp::Syntax::Token::Assertion::Lookahead = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/assertion.rb:7 +Regexp::Syntax::Token::Assertion::Lookbehind = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/assertion.rb:10 +Regexp::Syntax::Token::Assertion::Type = T.let(T.unsafe(nil), Symbol) + +# alias for symmetry between token symbol and Expression class name +# +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/backreference.rb:33 +Regexp::Syntax::Token::Backref = Regexp::Syntax::Token::Backreference + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/backreference.rb:5 +module Regexp::Syntax::Token::Backreference; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/backreference.rb:17 +Regexp::Syntax::Token::Backreference::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/backreference.rb:9 +Regexp::Syntax::Token::Backreference::Name = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/backreference.rb:8 +Regexp::Syntax::Token::Backreference::Number = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/backreference.rb:7 +Regexp::Syntax::Token::Backreference::NumberRef = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/backreference.rb:6 +Regexp::Syntax::Token::Backreference::Plain = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/backreference.rb:11 +Regexp::Syntax::Token::Backreference::RecursionLevel = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/backreference.rb:18 +Regexp::Syntax::Token::Backreference::Type = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/backreference.rb:13 +Regexp::Syntax::Token::Backreference::V1_8_6 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/backreference.rb:15 +Regexp::Syntax::Token::Backreference::V1_9_1 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/character_set.rb:5 +module Regexp::Syntax::Token::CharacterSet; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/character_set.rb:9 +Regexp::Syntax::Token::CharacterSet::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/character_set.rb:6 +Regexp::Syntax::Token::CharacterSet::Basic = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/character_set.rb:7 +Regexp::Syntax::Token::CharacterSet::Extended = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/character_set.rb:10 +Regexp::Syntax::Token::CharacterSet::Type = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/character_type.rb:5 +module Regexp::Syntax::Token::CharacterType; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/character_type.rb:12 +Regexp::Syntax::Token::CharacterType::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/character_type.rb:6 +Regexp::Syntax::Token::CharacterType::Basic = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/character_type.rb:10 +Regexp::Syntax::Token::CharacterType::Clustered = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/character_type.rb:7 +Regexp::Syntax::Token::CharacterType::Extended = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/character_type.rb:8 +Regexp::Syntax::Token::CharacterType::Hex = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/character_type.rb:13 +Regexp::Syntax::Token::CharacterType::Type = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/conditional.rb:5 +module Regexp::Syntax::Token::Conditional; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/conditional.rb:11 +Regexp::Syntax::Token::Conditional::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/conditional.rb:8 +Regexp::Syntax::Token::Conditional::Condition = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/conditional.rb:6 +Regexp::Syntax::Token::Conditional::Delimiters = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/conditional.rb:9 +Regexp::Syntax::Token::Conditional::Separator = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/conditional.rb:13 +Regexp::Syntax::Token::Conditional::Type = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/escape.rb:5 +module Regexp::Syntax::Token::Escape; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/escape.rb:10 +Regexp::Syntax::Token::Escape::ASCII = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/escape.rb:26 +Regexp::Syntax::Token::Escape::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/escape.rb:6 +Regexp::Syntax::Token::Escape::Basic = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/escape.rb:8 +Regexp::Syntax::Token::Escape::Control = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/escape.rb:22 +Regexp::Syntax::Token::Escape::Hex = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/escape.rb:15 +Regexp::Syntax::Token::Escape::Meta = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/escape.rb:24 +Regexp::Syntax::Token::Escape::Octal = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/escape.rb:27 +Regexp::Syntax::Token::Escape::Type = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/escape.rb:13 +Regexp::Syntax::Token::Escape::Unicode = T.let(T.unsafe(nil), Array) + +# alias for symmetry between Token::* and Expression::* +# +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/escape.rb:33 +Regexp::Syntax::Token::EscapeSequence = Regexp::Syntax::Token::Escape + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token.rb:13 +module Regexp::Syntax::Token::FreeSpace; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token.rb:14 +Regexp::Syntax::Token::FreeSpace::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token.rb:15 +Regexp::Syntax::Token::FreeSpace::Type = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/group.rb:5 +module Regexp::Syntax::Token::Group; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/group.rb:19 +Regexp::Syntax::Token::Group::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/group.rb:10 +Regexp::Syntax::Token::Group::Atomic = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/group.rb:6 +Regexp::Syntax::Token::Group::Basic = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/group.rb:12 +Regexp::Syntax::Token::Group::Comment = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/group.rb:7 +Regexp::Syntax::Token::Group::Extended = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/group.rb:9 +Regexp::Syntax::Token::Group::Named = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/group.rb:11 +Regexp::Syntax::Token::Group::Passive = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/group.rb:20 +Regexp::Syntax::Token::Group::Type = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/group.rb:14 +Regexp::Syntax::Token::Group::V1_8_6 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/group.rb:17 +Regexp::Syntax::Token::Group::V2_4_1 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/keep.rb:5 +module Regexp::Syntax::Token::Keep; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/keep.rb:8 +Regexp::Syntax::Token::Keep::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/keep.rb:6 +Regexp::Syntax::Token::Keep::Mark = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/keep.rb:9 +Regexp::Syntax::Token::Keep::Type = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token.rb:8 +module Regexp::Syntax::Token::Literal; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token.rb:9 +Regexp::Syntax::Token::Literal::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token.rb:10 +Regexp::Syntax::Token::Literal::Type = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token.rb:6 +Regexp::Syntax::Token::Map = T.let(T.unsafe(nil), Hash) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/meta.rb:5 +module Regexp::Syntax::Token::Meta; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/meta.rb:10 +Regexp::Syntax::Token::Meta::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/meta.rb:7 +Regexp::Syntax::Token::Meta::Alternation = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/meta.rb:6 +Regexp::Syntax::Token::Meta::Basic = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/meta.rb:8 +Regexp::Syntax::Token::Meta::Extended = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/meta.rb:11 +Regexp::Syntax::Token::Meta::Type = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/posix_class.rb:5 +module Regexp::Syntax::Token::PosixClass; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/posix_class.rb:11 +Regexp::Syntax::Token::PosixClass::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/posix_class.rb:9 +Regexp::Syntax::Token::PosixClass::Extensions = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/posix_class.rb:13 +Regexp::Syntax::Token::PosixClass::NonType = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/posix_class.rb:6 +Regexp::Syntax::Token::PosixClass::Standard = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/posix_class.rb:12 +Regexp::Syntax::Token::PosixClass::Type = T.let(T.unsafe(nil), Symbol) + +# alias for symmetry between token symbol and Token module name +# +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:809 +Regexp::Syntax::Token::Property = Regexp::Syntax::Token::UnicodeProperty + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/quantifier.rb:5 +module Regexp::Syntax::Token::Quantifier; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/quantifier.rb:31 +Regexp::Syntax::Token::Quantifier::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/quantifier.rb:6 +Regexp::Syntax::Token::Quantifier::Greedy = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/quantifier.rb:24 +Regexp::Syntax::Token::Quantifier::Interval = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/quantifier.rb:28 +Regexp::Syntax::Token::Quantifier::IntervalAll = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/quantifier.rb:26 +Regexp::Syntax::Token::Quantifier::IntervalPossessive = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/quantifier.rb:25 +Regexp::Syntax::Token::Quantifier::IntervalReluctant = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/quantifier.rb:18 +Regexp::Syntax::Token::Quantifier::Possessive = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/quantifier.rb:12 +Regexp::Syntax::Token::Quantifier::Reluctant = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/quantifier.rb:32 +Regexp::Syntax::Token::Quantifier::Type = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/quantifier.rb:30 +Regexp::Syntax::Token::Quantifier::V1_8_6 = T.let(T.unsafe(nil), Array) + +# alias for symmetry between token symbol and Token module name +# +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/character_set.rb:16 +Regexp::Syntax::Token::Set = Regexp::Syntax::Token::CharacterSet + +# Type is the same as Backreference so keeping it here, for now. +# +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/backreference.rb:22 +module Regexp::Syntax::Token::SubexpressionCall; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/backreference.rb:26 +Regexp::Syntax::Token::SubexpressionCall::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/backreference.rb:23 +Regexp::Syntax::Token::SubexpressionCall::Name = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/backreference.rb:24 +Regexp::Syntax::Token::SubexpressionCall::Number = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token.rb:45 +Regexp::Syntax::Token::Types = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:5 +module Regexp::Syntax::Token::UnicodeProperty + class << self + private + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:6 + def all(name); end + end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:73 +Regexp::Syntax::Token::UnicodeProperty::Age = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:45 +Regexp::Syntax::Token::UnicodeProperty::Age_V1_9_3 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:49 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_0_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:51 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_2_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:53 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_3_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:55 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_4_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:57 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_5_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:59 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_6_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:61 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_6_2 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:63 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_6_3 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:65 +Regexp::Syntax::Token::UnicodeProperty::Age_V3_1_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:67 +Regexp::Syntax::Token::UnicodeProperty::Age_V3_2_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:69 +Regexp::Syntax::Token::UnicodeProperty::Age_V3_5_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:71 +Regexp::Syntax::Token::UnicodeProperty::Age_V4_0_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:799 +Regexp::Syntax::Token::UnicodeProperty::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:18 +module Regexp::Syntax::Token::UnicodeProperty::Category; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:41 +Regexp::Syntax::Token::UnicodeProperty::Category::All = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:38 +Regexp::Syntax::Token::UnicodeProperty::Category::Codepoint = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:19 +Regexp::Syntax::Token::UnicodeProperty::Category::Letter = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:22 +Regexp::Syntax::Token::UnicodeProperty::Category::Mark = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:25 +Regexp::Syntax::Token::UnicodeProperty::Category::Number = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:28 +Regexp::Syntax::Token::UnicodeProperty::Category::Punctuation = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:35 +Regexp::Syntax::Token::UnicodeProperty::Category::Separator = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:32 +Regexp::Syntax::Token::UnicodeProperty::Category::Symbol = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:11 +Regexp::Syntax::Token::UnicodeProperty::CharType_V1_9_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:14 +Regexp::Syntax::Token::UnicodeProperty::CharType_V2_5_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:152 +Regexp::Syntax::Token::UnicodeProperty::Derived = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:75 +Regexp::Syntax::Token::UnicodeProperty::Derived_V1_9_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:129 +Regexp::Syntax::Token::UnicodeProperty::Derived_V2_0_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:134 +Regexp::Syntax::Token::UnicodeProperty::Derived_V2_4_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:138 +Regexp::Syntax::Token::UnicodeProperty::Derived_V2_5_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:142 +Regexp::Syntax::Token::UnicodeProperty::Derived_V3_5_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:148 +Regexp::Syntax::Token::UnicodeProperty::Derived_V4_0_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:782 +Regexp::Syntax::Token::UnicodeProperty::Emoji = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:752 +Regexp::Syntax::Token::UnicodeProperty::Emoji_V2_5_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:760 +Regexp::Syntax::Token::UnicodeProperty::Emoji_V2_6_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:780 +Regexp::Syntax::Token::UnicodeProperty::Enumerated = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:764 +Regexp::Syntax::Token::UnicodeProperty::Enumerated_V2_4_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:802 +Regexp::Syntax::Token::UnicodeProperty::NonType = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:16 +Regexp::Syntax::Token::UnicodeProperty::POSIX = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:365 +Regexp::Syntax::Token::UnicodeProperty::Script = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:154 +Regexp::Syntax::Token::UnicodeProperty::Script_V1_9_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:250 +Regexp::Syntax::Token::UnicodeProperty::Script_V1_9_3 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:256 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_0_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:266 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_2_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:292 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_3_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:301 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_4_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:310 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_5_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:317 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_6_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:327 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_6_2 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:334 +Regexp::Syntax::Token::UnicodeProperty::Script_V3_1_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:341 +Regexp::Syntax::Token::UnicodeProperty::Script_V3_2_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:351 +Regexp::Syntax::Token::UnicodeProperty::Script_V4_0_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:801 +Regexp::Syntax::Token::UnicodeProperty::Type = T.let(T.unsafe(nil), Symbol) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:750 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:367 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V1_9_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:466 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_0_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:594 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_2_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:629 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_3_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:642 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_4_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:656 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_5_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:666 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_6_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:680 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_6_2 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:692 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V3_1_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:703 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V3_2_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:725 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V3_5_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:729 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V4_0_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:784 +Regexp::Syntax::Token::UnicodeProperty::V1_9_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:785 +Regexp::Syntax::Token::UnicodeProperty::V1_9_3 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:786 +Regexp::Syntax::Token::UnicodeProperty::V2_0_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:787 +Regexp::Syntax::Token::UnicodeProperty::V2_2_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:788 +Regexp::Syntax::Token::UnicodeProperty::V2_3_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:789 +Regexp::Syntax::Token::UnicodeProperty::V2_4_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:790 +Regexp::Syntax::Token::UnicodeProperty::V2_5_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:791 +Regexp::Syntax::Token::UnicodeProperty::V2_6_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:792 +Regexp::Syntax::Token::UnicodeProperty::V2_6_2 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:793 +Regexp::Syntax::Token::UnicodeProperty::V2_6_3 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:794 +Regexp::Syntax::Token::UnicodeProperty::V3_1_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:795 +Regexp::Syntax::Token::UnicodeProperty::V3_2_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:796 +Regexp::Syntax::Token::UnicodeProperty::V3_5_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:797 +Regexp::Syntax::Token::UnicodeProperty::V4_0_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:14 +class Regexp::Syntax::UnknownSyntaxNameError < ::Regexp::Syntax::SyntaxError + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:15 + def initialize(name); end +end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/1.8.6.rb:3 +class Regexp::Syntax::V1_8_6 < ::Regexp::Syntax::Base; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/1.9.1.rb:3 +class Regexp::Syntax::V1_9_1 < ::Regexp::Syntax::V1_8_6; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/1.9.3.rb:3 +class Regexp::Syntax::V1_9_3 < ::Regexp::Syntax::V1_9_1; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/2.0.0.rb:3 +class Regexp::Syntax::V2_0_0 < ::Regexp::Syntax::V1_9_3; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/2.2.0.rb:3 +class Regexp::Syntax::V2_2_0 < ::Regexp::Syntax::V2_0_0; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/2.3.0.rb:3 +class Regexp::Syntax::V2_3_0 < ::Regexp::Syntax::V2_2_0; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/2.4.0.rb:3 +class Regexp::Syntax::V2_4_0 < ::Regexp::Syntax::V2_3_0; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/2.4.1.rb:3 +class Regexp::Syntax::V2_4_1 < ::Regexp::Syntax::V2_4_0; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/2.5.0.rb:3 +class Regexp::Syntax::V2_5_0 < ::Regexp::Syntax::V2_4_1; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/2.6.0.rb:3 +class Regexp::Syntax::V2_6_0 < ::Regexp::Syntax::V2_5_0; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/2.6.2.rb:3 +class Regexp::Syntax::V2_6_2 < ::Regexp::Syntax::V2_6_0; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/2.6.3.rb:3 +class Regexp::Syntax::V2_6_3 < ::Regexp::Syntax::V2_6_2; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/3.1.0.rb:3 +class Regexp::Syntax::V3_1_0 < ::Regexp::Syntax::V2_6_3; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/3.2.0.rb:3 +class Regexp::Syntax::V3_2_0 < ::Regexp::Syntax::V3_1_0; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/3.5.0.rb:1 +class Regexp::Syntax::V3_5_0 < ::Regexp::Syntax::V3_2_0; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/4.0.0.rb:1 +class Regexp::Syntax::V4_0_0 < ::Regexp::Syntax::V3_5_0; end + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:64 +Regexp::Syntax::V4_0_5 = Regexp::Syntax::V4_0_0 + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:6 +Regexp::Syntax::VERSION_CONST_REGEXP = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:4 +Regexp::Syntax::VERSION_FORMAT = T.let(T.unsafe(nil), String) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:5 +Regexp::Syntax::VERSION_REGEXP = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/regexp_parser#lib/regexp_parser/token.rb:4 +Regexp::TOKEN_KEYS = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 +class Regexp::Token < ::Struct + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def conditional_level; end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def conditional_level=(_); end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:22 + def length; end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def level; end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def level=(_); end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:16 + def next; end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:16 + def next=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:18 + def offset; end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:16 + def previous; end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:16 + def previous=(_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def set_level; end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def set_level=(_); end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def te; end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def te=(_); end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def text; end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def text=(_); end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def token; end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def token=(_); end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def ts; end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def ts=(_); end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def type; end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def type=(_); end + + class << self + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def [](*_arg0); end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def inspect; end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def keyword_init?; end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def members; end + + # pkg:gem/regexp_parser#lib/regexp_parser/token.rb:15 + def new(*_arg0); end + end +end diff --git a/sorbet/rbi/gems/reline@0.6.0.rbi b/sorbet/rbi/gems/reline@0.6.0.rbi deleted file mode 100644 index 2382441..0000000 --- a/sorbet/rbi/gems/reline@0.6.0.rbi +++ /dev/null @@ -1,2451 +0,0 @@ -# typed: false - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `reline` gem. -# Please instead update this file by running `bin/tapioca gem reline`. - - -# source://reline//lib/reline/version.rb#1 -module Reline - extend ::Forwardable - extend ::SingleForwardable - - class << self - # source://reline//lib/reline.rb#486 - def core; end - - # source://reline//lib/reline.rb#482 - def encoding_system_needs; end - - # source://reline//lib/reline.rb#463 - def insert_text(text); end - - # source://reline//lib/reline.rb#506 - def line_editor; end - - # source://reline//lib/reline.rb#502 - def ungetc(c); end - end -end - -# source://reline//lib/reline/io/ansi.rb#4 -class Reline::ANSI < ::Reline::IO - # @return [ANSI] a new instance of ANSI - # - # source://reline//lib/reline/io/ansi.rb#34 - def initialize; end - - # @return [Boolean] - # - # source://reline//lib/reline/io/ansi.rb#232 - def both_tty?; end - - # source://reline//lib/reline/io/ansi.rb#244 - def buffered_output; end - - # source://reline//lib/reline/io/ansi.rb#292 - def clear_screen; end - - # source://reline//lib/reline/io/ansi.rb#227 - def cursor_pos; end - - # source://reline//lib/reline/io/ansi.rb#319 - def deprep(otio); end - - # @return [Boolean] - # - # source://reline//lib/reline/io/ansi.rb#167 - def empty_buffer?; end - - # source://reline//lib/reline/io/ansi.rb#42 - def encoding; end - - # source://reline//lib/reline/io/ansi.rb#280 - def erase_after_cursor; end - - # source://reline//lib/reline/io/ansi.rb#189 - def get_screen_size; end - - # if the usage expects to wait indefinitely, use Float::INFINITY for timeout_second - # - # source://reline//lib/reline/io/ansi.rb#159 - def getc(timeout_second); end - - # source://reline//lib/reline/io/ansi.rb#272 - def hide_cursor; end - - # @return [Boolean] - # - # source://reline//lib/reline/io/ansi.rb#163 - def in_pasting?; end - - # source://reline//lib/reline/io/ansi.rb#128 - def inner_getc(timeout_second); end - - # Sets the attribute input - # - # @param value the value to set the attribute input to. - # - # source://reline//lib/reline/io/ansi.rb#32 - def input=(_arg0); end - - # source://reline//lib/reline/io/ansi.rb#252 - def move_cursor_column(x); end - - # source://reline//lib/reline/io/ansi.rb#264 - def move_cursor_down(x); end - - # source://reline//lib/reline/io/ansi.rb#256 - def move_cursor_up(x); end - - # Sets the attribute output - # - # @param value the value to set the attribute output to. - # - # source://reline//lib/reline/io/ansi.rb#32 - def output=(_arg0); end - - # source://reline//lib/reline/io/ansi.rb#312 - def prep; end - - # source://reline//lib/reline/io/ansi.rb#147 - def read_bracketed_paste; end - - # source://reline//lib/reline/io/ansi.rb#178 - def retrieve_keybuffer; end - - # This only works when the cursor is at the bottom of the scroll range - # For more details, see https://github.com/ruby/reline/pull/577#issuecomment-1646679623 - # - # source://reline//lib/reline/io/ansi.rb#286 - def scroll_down(x); end - - # source://reline//lib/reline/io/ansi.rb#68 - def set_bracketed_paste_key_bindings(config); end - - # source://reline//lib/reline/io/ansi.rb#49 - def set_default_key_bindings(config); end - - # source://reline//lib/reline/io/ansi.rb#74 - def set_default_key_bindings_ansi_cursor(config); end - - # source://reline//lib/reline/io/ansi.rb#99 - def set_default_key_bindings_comprehensive_list(config); end - - # source://reline//lib/reline/io/ansi.rb#199 - def set_screen_size(rows, columns); end - - # source://reline//lib/reline/io/ansi.rb#297 - def set_winch_handler(&handler); end - - # source://reline//lib/reline/io/ansi.rb#276 - def show_cursor; end - - # source://reline//lib/reline/io/ansi.rb#174 - def ungetc(c); end - - # source://reline//lib/reline/io/ansi.rb#120 - def with_raw_input; end - - # source://reline//lib/reline/io/ansi.rb#236 - def write(string); end - - private - - # source://reline//lib/reline/io/ansi.rb#206 - def cursor_pos_internal(timeout:); end -end - -# source://reline//lib/reline/io/ansi.rb#17 -Reline::ANSI::ANSI_CURSOR_KEY_BINDINGS = T.let(T.unsafe(nil), Hash) - -# source://reline//lib/reline/io/ansi.rb#5 -Reline::ANSI::CAPNAME_KEY_BINDINGS = T.let(T.unsafe(nil), Hash) - -# source://reline//lib/reline/io/ansi.rb#146 -Reline::ANSI::END_BRACKETED_PASTE = T.let(T.unsafe(nil), String) - -# source://reline//lib/reline/io/ansi.rb#145 -Reline::ANSI::START_BRACKETED_PASTE = T.let(T.unsafe(nil), String) - -# source://reline//lib/reline/config.rb#1 -class Reline::Config - # @return [Config] a new instance of Config - # - # source://reline//lib/reline/config.rb#31 - def initialize; end - - # source://reline//lib/reline/config.rb#162 - def add_default_key_binding(keystroke, target); end - - # source://reline//lib/reline/config.rb#158 - def add_default_key_binding_by_keymap(keymap, keystroke, target); end - - # source://reline//lib/reline/config.rb#147 - def add_oneshot_key_binding(keystroke, target); end - - # Returns the value of attribute autocompletion. - # - # source://reline//lib/reline/config.rb#29 - def autocompletion; end - - # Sets the attribute autocompletion - # - # @param value the value to set the attribute autocompletion to. - # - # source://reline//lib/reline/config.rb#29 - def autocompletion=(_arg0); end - - # source://reline//lib/reline/config.rb#314 - def bind_key(key, value); end - - # source://reline//lib/reline/config.rb#247 - def bind_variable(name, value, raw_value); end - - # source://reline//lib/reline/config.rb#26 - def completion_ignore_case; end - - # source://reline//lib/reline/config.rb#26 - def completion_ignore_case=(_arg0); end - - # source://reline//lib/reline/config.rb#26 - def convert_meta; end - - # source://reline//lib/reline/config.rb#26 - def convert_meta=(_arg0); end - - # source://reline//lib/reline/config.rb#26 - def disable_completion; end - - # source://reline//lib/reline/config.rb#26 - def disable_completion=(_arg0); end - - # source://reline//lib/reline/config.rb#72 - def editing_mode; end - - # source://reline//lib/reline/config.rb#76 - def editing_mode=(val); end - - # @return [Boolean] - # - # source://reline//lib/reline/config.rb#80 - def editing_mode_is?(*val); end - - # source://reline//lib/reline/config.rb#26 - def emacs_mode_string; end - - # source://reline//lib/reline/config.rb#26 - def emacs_mode_string=(_arg0); end - - # source://reline//lib/reline/config.rb#26 - def enable_bracketed_paste; end - - # source://reline//lib/reline/config.rb#26 - def enable_bracketed_paste=(_arg0); end - - # source://reline//lib/reline/config.rb#212 - def handle_directive(directive, file, no, if_stack); end - - # source://reline//lib/reline/config.rb#26 - def history_size; end - - # source://reline//lib/reline/config.rb#26 - def history_size=(_arg0); end - - # source://reline//lib/reline/config.rb#92 - def inputrc_path; end - - # source://reline//lib/reline/config.rb#26 - def isearch_terminators; end - - # source://reline//lib/reline/config.rb#26 - def isearch_terminators=(_arg0); end - - # source://reline//lib/reline/config.rb#142 - def key_bindings; end - - # source://reline//lib/reline/config.rb#333 - def key_notation_to_code(notation); end - - # source://reline//lib/reline/config.rb#84 - def keymap; end - - # source://reline//lib/reline/config.rb#26 - def keyseq_timeout; end - - # source://reline//lib/reline/config.rb#26 - def keyseq_timeout=(_arg0); end - - # @return [Boolean] - # - # source://reline//lib/reline/config.rb#88 - def loaded?; end - - # source://reline//lib/reline/config.rb#319 - def parse_key_binding(key, func_name); end - - # source://reline//lib/reline/config.rb#359 - def parse_keyseq(str); end - - # source://reline//lib/reline/config.rb#122 - def read(file = T.unsafe(nil)); end - - # source://reline//lib/reline/config.rb#166 - def read_lines(lines, file = T.unsafe(nil)); end - - # source://reline//lib/reline/config.rb#365 - def reload; end - - # source://reline//lib/reline/config.rb#35 - def reset; end - - # source://reline//lib/reline/config.rb#154 - def reset_oneshot_key_bindings; end - - # source://reline//lib/reline/config.rb#42 - def reset_variables; end - - # source://reline//lib/reline/config.rb#309 - def retrieve_string(str); end - - # source://reline//lib/reline/config.rb#26 - def show_all_if_ambiguous; end - - # source://reline//lib/reline/config.rb#26 - def show_all_if_ambiguous=(_arg0); end - - # source://reline//lib/reline/config.rb#26 - def show_mode_in_prompt; end - - # source://reline//lib/reline/config.rb#26 - def show_mode_in_prompt=(_arg0); end - - # Returns the value of attribute test_mode. - # - # source://reline//lib/reline/config.rb#2 - def test_mode; end - - # source://reline//lib/reline/config.rb#26 - def vi_cmd_mode_string; end - - # source://reline//lib/reline/config.rb#26 - def vi_cmd_mode_string=(_arg0); end - - # source://reline//lib/reline/config.rb#26 - def vi_ins_mode_string; end - - # source://reline//lib/reline/config.rb#26 - def vi_ins_mode_string=(_arg0); end - - private - - # source://reline//lib/reline/config.rb#118 - def default_inputrc_path; end - - # @return [Boolean] - # - # source://reline//lib/reline/config.rb#370 - def seven_bit_encoding?(encoding); end -end - -# source://reline//lib/reline/config.rb#6 -class Reline::Config::InvalidInputrc < ::RuntimeError - # Returns the value of attribute file. - # - # source://reline//lib/reline/config.rb#7 - def file; end - - # Sets the attribute file - # - # @param value the value to set the attribute file to. - # - # source://reline//lib/reline/config.rb#7 - def file=(_arg0); end - - # Returns the value of attribute lineno. - # - # source://reline//lib/reline/config.rb#7 - def lineno; end - - # Sets the attribute lineno - # - # @param value the value to set the attribute lineno to. - # - # source://reline//lib/reline/config.rb#7 - def lineno=(_arg0); end -end - -# source://reline//lib/reline/config.rb#4 -Reline::Config::KEYSEQ_PATTERN = T.let(T.unsafe(nil), Regexp) - -# source://reline//lib/reline/config.rb#10 -Reline::Config::VARIABLE_NAMES = T.let(T.unsafe(nil), Array) - -# source://reline//lib/reline/config.rb#24 -Reline::Config::VARIABLE_NAME_SYMBOLS = T.let(T.unsafe(nil), Array) - -# source://reline//lib/reline.rb#40 -class Reline::Core - extend ::Forwardable - - # @return [Core] a new instance of Core - # @yield [_self] - # @yieldparam _self [Reline::Core] the object that the method was called on - # - # source://reline//lib/reline.rb#68 - def initialize; end - - # @raise [ArgumentError] - # - # source://reline//lib/reline.rb#162 - def add_dialog_proc(name_sym, p, context = T.unsafe(nil)); end - - # source://reline//lib/reline.rb#409 - def ambiguous_width; end - - # source://reline//lib/reline.rb#55 - def auto_indent_proc; end - - # @raise [ArgumentError] - # - # source://reline//lib/reline.rb#147 - def auto_indent_proc=(p); end - - # source://reline//lib/reline.rb#55 - def basic_quote_characters; end - - # source://reline//lib/reline.rb#104 - def basic_quote_characters=(v); end - - # source://reline//lib/reline.rb#55 - def basic_word_break_characters; end - - # source://reline//lib/reline.rb#96 - def basic_word_break_characters=(v); end - - # source://reline//lib/reline.rb#55 - def completer_quote_characters; end - - # source://reline//lib/reline.rb#108 - def completer_quote_characters=(v); end - - # source://reline//lib/reline.rb#55 - def completer_word_break_characters; end - - # source://reline//lib/reline.rb#100 - def completer_word_break_characters=(v); end - - # source://reline//lib/reline.rb#55 - def completion_append_character; end - - # source://reline//lib/reline.rb#84 - def completion_append_character=(val); end - - # source://reline//lib/reline.rb#124 - def completion_case_fold; end - - # source://reline//lib/reline.rb#120 - def completion_case_fold=(v); end - - # source://reline//lib/reline.rb#55 - def completion_proc; end - - # @raise [ArgumentError] - # - # source://reline//lib/reline.rb#132 - def completion_proc=(p); end - - # source://reline//lib/reline.rb#128 - def completion_quote_character; end - - # Returns the value of attribute config. - # - # source://reline//lib/reline.rb#57 - def config; end - - # Sets the attribute config - # - # @param value the value to set the attribute config to. - # - # source://reline//lib/reline.rb#57 - def config=(_arg0); end - - # source://reline//lib/reline.rb#172 - def dialog_proc(name_sym); end - - # source://reline//lib/reline.rb#55 - def dig_perfect_match_proc; end - - # @raise [ArgumentError] - # - # source://reline//lib/reline.rb#156 - def dig_perfect_match_proc=(p); end - - # source://reline//lib/reline.rb#194 - def emacs_editing_mode; end - - # @return [Boolean] - # - # source://reline//lib/reline.rb#203 - def emacs_editing_mode?; end - - # source://reline//lib/reline.rb#80 - def encoding; end - - # source://reline//lib/reline.rb#55 - def filename_quote_characters; end - - # source://reline//lib/reline.rb#112 - def filename_quote_characters=(v); end - - # source://reline//lib/reline.rb#207 - def get_screen_size; end - - # @raise [TypeError] - # - # source://reline//lib/reline.rb#176 - def input=(val); end - - # source://reline//lib/reline.rb#76 - def io_gate; end - - # Returns the value of attribute key_stroke. - # - # source://reline//lib/reline.rb#58 - def key_stroke; end - - # Sets the attribute key_stroke - # - # @param value the value to set the attribute key_stroke to. - # - # source://reline//lib/reline.rb#58 - def key_stroke=(_arg0); end - - # Returns the value of attribute last_incremental_search. - # - # source://reline//lib/reline.rb#60 - def last_incremental_search; end - - # Sets the attribute last_incremental_search - # - # @param value the value to set the attribute last_incremental_search to. - # - # source://reline//lib/reline.rb#60 - def last_incremental_search=(_arg0); end - - # Returns the value of attribute line_editor. - # - # source://reline//lib/reline.rb#59 - def line_editor; end - - # Sets the attribute line_editor - # - # @param value the value to set the attribute line_editor to. - # - # source://reline//lib/reline.rb#59 - def line_editor=(_arg0); end - - # Returns the value of attribute output. - # - # source://reline//lib/reline.rb#61 - def output; end - - # @raise [TypeError] - # - # source://reline//lib/reline.rb#183 - def output=(val); end - - # source://reline//lib/reline.rb#55 - def output_modifier_proc; end - - # @raise [ArgumentError] - # - # source://reline//lib/reline.rb#137 - def output_modifier_proc=(p); end - - # source://reline//lib/reline.rb#55 - def pre_input_hook; end - - # source://reline//lib/reline.rb#152 - def pre_input_hook=(p); end - - # source://reline//lib/reline.rb#55 - def prompt_proc; end - - # @raise [ArgumentError] - # - # source://reline//lib/reline.rb#142 - def prompt_proc=(p); end - - # source://reline//lib/reline.rb#276 - def readline(prompt = T.unsafe(nil), add_hist = T.unsafe(nil)); end - - # source://reline//lib/reline.rb#250 - def readmultiline(prompt = T.unsafe(nil), add_hist = T.unsafe(nil), &confirm_multiline_termination); end - - # source://reline//lib/reline.rb#55 - def special_prefixes; end - - # source://reline//lib/reline.rb#116 - def special_prefixes=(v); end - - # source://reline//lib/reline.rb#189 - def vi_editing_mode; end - - # @return [Boolean] - # - # source://reline//lib/reline.rb#199 - def vi_editing_mode?; end - - private - - # source://reline//lib/reline.rb#293 - def inner_readline(prompt, add_hist, multiline, &confirm_multiline_termination); end - - # source://reline//lib/reline.rb#414 - def may_req_ambiguous_char_width; end - - # GNU Readline watis for "keyseq-timeout" milliseconds when the input is - # ambiguous whether it is matching or matched. - # If the next character does not arrive within the specified timeout, input - # is considered as matched. - # `ESC` is ambiguous because it can be a standalone ESC (matched) or part of - # `ESC char` or part of CSI sequence (matching). - # - # source://reline//lib/reline.rb#379 - def read_io(keyseq_timeout, &block); end -end - -# source://reline//lib/reline.rb#41 -Reline::Core::ATTR_READER_NAMES = T.let(T.unsafe(nil), Array) - -# source://reline//lib/reline.rb#248 -Reline::DEFAULT_DIALOG_CONTEXT = T.let(T.unsafe(nil), Array) - -# source://reline//lib/reline.rb#211 -Reline::DEFAULT_DIALOG_PROC_AUTOCOMPLETE = T.let(T.unsafe(nil), Proc) - -# source://reline//lib/reline/io/dumb.rb#3 -class Reline::Dumb < ::Reline::IO - # @return [Dumb] a new instance of Dumb - # - # source://reline//lib/reline/io/dumb.rb#8 - def initialize(encoding: T.unsafe(nil)); end - - # source://reline//lib/reline/io/dumb.rb#49 - def buffered_output; end - - # source://reline//lib/reline/io/dumb.rb#101 - def clear_screen; end - - # source://reline//lib/reline/io/dumb.rb#76 - def cursor_pos; end - - # source://reline//lib/reline/io/dumb.rb#118 - def deprep(otio); end - - # @return [Boolean] - # - # source://reline//lib/reline/io/dumb.rb#17 - def dumb?; end - - # source://reline//lib/reline/io/dumb.rb#21 - def encoding; end - - # source://reline//lib/reline/io/dumb.rb#95 - def erase_after_cursor; end - - # source://reline//lib/reline/io/dumb.rb#72 - def get_screen_size; end - - # source://reline//lib/reline/io/dumb.rb#53 - def getc(_timeout_second); end - - # source://reline//lib/reline/io/dumb.rb#80 - def hide_cursor; end - - # @return [Boolean] - # - # source://reline//lib/reline/io/dumb.rb#111 - def in_pasting?; end - - # source://reline//lib/reline/io/dumb.rb#37 - def input=(val); end - - # source://reline//lib/reline/io/dumb.rb#86 - def move_cursor_column(val); end - - # source://reline//lib/reline/io/dumb.rb#92 - def move_cursor_down(val); end - - # source://reline//lib/reline/io/dumb.rb#89 - def move_cursor_up(val); end - - # Sets the attribute output - # - # @param value the value to set the attribute output to. - # - # source://reline//lib/reline/io/dumb.rb#6 - def output=(_arg0); end - - # source://reline//lib/reline/io/dumb.rb#115 - def prep; end - - # source://reline//lib/reline/io/dumb.rb#98 - def scroll_down(val); end - - # source://reline//lib/reline/io/dumb.rb#34 - def set_default_key_bindings(_); end - - # source://reline//lib/reline/io/dumb.rb#104 - def set_screen_size(rows, columns); end - - # source://reline//lib/reline/io/dumb.rb#108 - def set_winch_handler(&handler); end - - # source://reline//lib/reline/io/dumb.rb#83 - def show_cursor; end - - # source://reline//lib/reline/io/dumb.rb#68 - def ungetc(c); end - - # source://reline//lib/reline/io/dumb.rb#41 - def with_raw_input; end - - # source://reline//lib/reline/io/dumb.rb#45 - def write(string); end -end - -# Do not send color reset sequence -# -# source://reline//lib/reline/io/dumb.rb#4 -Reline::Dumb::RESET_COLOR = T.let(T.unsafe(nil), String) - -# NOTE: For making compatible with the rb-readline gem -# -# source://reline//lib/reline.rb#15 -Reline::FILENAME_COMPLETION_PROC = T.let(T.unsafe(nil), T.untyped) - -# source://reline//lib/reline/face.rb#3 -class Reline::Face - class << self - # source://reline//lib/reline/face.rb#169 - def [](name); end - - # source://reline//lib/reline/face.rb#173 - def config(name, &block); end - - # source://reline//lib/reline/face.rb#178 - def configs; end - - # source://reline//lib/reline/face.rb#164 - def force_truecolor; end - - # source://reline//lib/reline/face.rb#182 - def load_initial_configs; end - - # source://reline//lib/reline/face.rb#195 - def reset_to_initial_configs; end - - # @return [Boolean] - # - # source://reline//lib/reline/face.rb#160 - def truecolor?; end - end -end - -# source://reline//lib/reline/face.rb#58 -class Reline::Face::Config - # @return [Config] a new instance of Config - # - # source://reline//lib/reline/face.rb#62 - def initialize(name, &block); end - - # source://reline//lib/reline/face.rb#84 - def [](name); end - - # source://reline//lib/reline/face.rb#72 - def define(name, **values); end - - # Returns the value of attribute definition. - # - # source://reline//lib/reline/face.rb#70 - def definition; end - - # source://reline//lib/reline/face.rb#77 - def reconfigure; end - - private - - # source://reline//lib/reline/face.rb#126 - def format_to_sgr(ordered_values); end - - # @return [Boolean] - # - # source://reline//lib/reline/face.rb#153 - def rgb_expression?(color); end - - # source://reline//lib/reline/face.rb#90 - def sgr_rgb(key, value); end - - # source://reline//lib/reline/face.rb#108 - def sgr_rgb_256color(key, value); end - - # source://reline//lib/reline/face.rb#99 - def sgr_rgb_truecolor(key, value); end -end - -# source://reline//lib/reline/face.rb#59 -Reline::Face::Config::ESSENTIAL_DEFINE_NAMES = T.let(T.unsafe(nil), Array) - -# source://reline//lib/reline/face.rb#60 -Reline::Face::Config::RESET_SGR = T.let(T.unsafe(nil), String) - -# source://reline//lib/reline/face.rb#4 -Reline::Face::SGR_PARAMETERS = T.let(T.unsafe(nil), Hash) - -# source://reline//lib/reline.rb#519 -Reline::HISTORY = T.let(T.unsafe(nil), Reline::History) - -# source://reline//lib/reline/history.rb#1 -class Reline::History < ::Array - # @return [History] a new instance of History - # - # source://reline//lib/reline/history.rb#2 - def initialize(config); end - - # source://reline//lib/reline/history.rb#52 - def <<(val); end - - # source://reline//lib/reline/history.rb#15 - def [](index); end - - # source://reline//lib/reline/history.rb#20 - def []=(index, val); end - - # source://reline//lib/reline/history.rb#25 - def concat(*val); end - - # source://reline//lib/reline/history.rb#10 - def delete_at(index); end - - # source://reline//lib/reline/history.rb#31 - def push(*val); end - - # source://reline//lib/reline/history.rb#6 - def to_s; end - - private - - # @raise [IndexError] - # - # source://reline//lib/reline/history.rb#62 - def check_index(index); end -end - -# source://reline//lib/reline/io.rb#3 -class Reline::IO - # @return [Boolean] - # - # source://reline//lib/reline/io.rb#27 - def dumb?; end - - # Read a single encoding valid character from the input. - # - # source://reline//lib/reline/io.rb#40 - def read_single_char(keyseq_timeout); end - - # source://reline//lib/reline/io.rb#35 - def reset_color_sequence; end - - # @return [Boolean] - # - # source://reline//lib/reline/io.rb#31 - def win?; end - - class << self - # source://reline//lib/reline/io.rb#6 - def decide_io_gate; end - end -end - -# source://reline//lib/reline.rb#512 -Reline::IOGate = T.let(T.unsafe(nil), Reline::ANSI) - -# EOF key: { char: nil, method_symbol: nil } -# Other key: { char: String, method_symbol: Symbol } -# -# source://reline//lib/reline.rb#22 -class Reline::Key < ::Struct - # Returns the value of attribute char - # - # @return [Object] the current value of char - def char; end - - # Sets the attribute char - # - # @param value [Object] the value to set the attribute char to. - # @return [Object] the newly set value - def char=(_); end - - # For dialog_proc `key.match?(dialog.name)` - # - # @return [Boolean] - # - # source://reline//lib/reline.rb#24 - def match?(sym); end - - # Returns the value of attribute method_symbol - # - # @return [Object] the current value of method_symbol - def method_symbol; end - - # Sets the attribute method_symbol - # - # @param value [Object] the value to set the attribute method_symbol to. - # @return [Object] the newly set value - def method_symbol=(_); end - - # Returns the value of attribute unused_boolean - # - # @return [Object] the current value of unused_boolean - def unused_boolean; end - - # Sets the attribute unused_boolean - # - # @param value [Object] the value to set the attribute unused_boolean to. - # @return [Object] the newly set value - def unused_boolean=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://reline//lib/reline/key_actor/base.rb#1 -class Reline::KeyActor::Base - # @return [Base] a new instance of Base - # - # source://reline//lib/reline/key_actor/base.rb#2 - def initialize(mappings = T.unsafe(nil)); end - - # source://reline//lib/reline/key_actor/base.rb#18 - def add(key, func); end - - # source://reline//lib/reline/key_actor/base.rb#8 - def add_mappings(mappings); end - - # source://reline//lib/reline/key_actor/base.rb#33 - def clear; end - - # source://reline//lib/reline/key_actor/base.rb#29 - def get(key); end - - # @return [Boolean] - # - # source://reline//lib/reline/key_actor/base.rb#25 - def matching?(key); end -end - -# source://reline//lib/reline/key_actor/composite.rb#1 -class Reline::KeyActor::Composite - # @return [Composite] a new instance of Composite - # - # source://reline//lib/reline/key_actor/composite.rb#2 - def initialize(key_actors); end - - # source://reline//lib/reline/key_actor/composite.rb#10 - def get(key); end - - # @return [Boolean] - # - # source://reline//lib/reline/key_actor/composite.rb#6 - def matching?(key); end -end - -# source://reline//lib/reline/key_actor/emacs.rb#2 -Reline::KeyActor::EMACS_MAPPING = T.let(T.unsafe(nil), Array) - -# source://reline//lib/reline/key_actor/vi_command.rb#2 -Reline::KeyActor::VI_COMMAND_MAPPING = T.let(T.unsafe(nil), Array) - -# source://reline//lib/reline/key_actor/vi_insert.rb#2 -Reline::KeyActor::VI_INSERT_MAPPING = T.let(T.unsafe(nil), Array) - -# source://reline//lib/reline/key_stroke.rb#1 -class Reline::KeyStroke - # @return [KeyStroke] a new instance of KeyStroke - # - # source://reline//lib/reline/key_stroke.rb#8 - def initialize(config, encoding); end - - # Returns the value of attribute encoding. - # - # source://reline//lib/reline/key_stroke.rb#6 - def encoding; end - - # Sets the attribute encoding - # - # @param value the value to set the attribute encoding to. - # - # source://reline//lib/reline/key_stroke.rb#6 - def encoding=(_arg0); end - - # source://reline//lib/reline/key_stroke.rb#44 - def expand(input); end - - # source://reline//lib/reline/key_stroke.rb#22 - def match_status(input); end - - private - - # source://reline//lib/reline/key_stroke.rb#116 - def key_mapping; end - - # returns match status of CSI/SS3 sequence and matched length - # - # source://reline//lib/reline/key_stroke.rb#80 - def match_unknown_escape_sequence(input, vi_mode: T.unsafe(nil)); end -end - -# source://reline//lib/reline/key_stroke.rb#4 -Reline::KeyStroke::CSI_INTERMEDIATE_BYTES_RANGE = T.let(T.unsafe(nil), Range) - -# source://reline//lib/reline/key_stroke.rb#3 -Reline::KeyStroke::CSI_PARAMETER_BYTES_RANGE = T.let(T.unsafe(nil), Range) - -# source://reline//lib/reline/key_stroke.rb#2 -Reline::KeyStroke::ESC_BYTE = T.let(T.unsafe(nil), Integer) - -# Input partially matches to a key sequence -# -# source://reline//lib/reline/key_stroke.rb#16 -Reline::KeyStroke::MATCHED = T.let(T.unsafe(nil), Symbol) - -# Input exactly matches to a key sequence -# -# source://reline//lib/reline/key_stroke.rb#14 -Reline::KeyStroke::MATCHING = T.let(T.unsafe(nil), Symbol) - -# Input matches to a key sequence and the key sequence is a prefix of another key sequence -# -# source://reline//lib/reline/key_stroke.rb#18 -Reline::KeyStroke::MATCHING_MATCHED = T.let(T.unsafe(nil), Symbol) - -# Input does not match to any key sequence -# -# source://reline//lib/reline/key_stroke.rb#20 -Reline::KeyStroke::UNMATCHED = T.let(T.unsafe(nil), Symbol) - -# source://reline//lib/reline/kill_ring.rb#1 -class Reline::KillRing - include ::Enumerable - - # @return [KillRing] a new instance of KillRing - # - # source://reline//lib/reline/kill_ring.rb#61 - def initialize(max = T.unsafe(nil)); end - - # source://reline//lib/reline/kill_ring.rb#68 - def append(string, before_p = T.unsafe(nil)); end - - # source://reline//lib/reline/kill_ring.rb#116 - def each; end - - # source://reline//lib/reline/kill_ring.rb#83 - def process; end - - # source://reline//lib/reline/kill_ring.rb#96 - def yank; end - - # source://reline//lib/reline/kill_ring.rb#106 - def yank_pop; end -end - -# source://reline//lib/reline/kill_ring.rb#21 -class Reline::KillRing::RingBuffer - # @return [RingBuffer] a new instance of RingBuffer - # - # source://reline//lib/reline/kill_ring.rb#25 - def initialize(max = T.unsafe(nil)); end - - # source://reline//lib/reline/kill_ring.rb#31 - def <<(point); end - - # @return [Boolean] - # - # source://reline//lib/reline/kill_ring.rb#56 - def empty?; end - - # Returns the value of attribute head. - # - # source://reline//lib/reline/kill_ring.rb#23 - def head; end - - # Returns the value of attribute size. - # - # source://reline//lib/reline/kill_ring.rb#22 - def size; end -end - -# source://reline//lib/reline/kill_ring.rb#11 -class Reline::KillRing::RingPoint < ::Struct - # @return [RingPoint] a new instance of RingPoint - # - # source://reline//lib/reline/kill_ring.rb#12 - def initialize(str); end - - # source://reline//lib/reline/kill_ring.rb#16 - def ==(other); end -end - -# source://reline//lib/reline/kill_ring.rb#6 -Reline::KillRing::State::CONTINUED = T.let(T.unsafe(nil), Symbol) - -# source://reline//lib/reline/kill_ring.rb#5 -Reline::KillRing::State::FRESH = T.let(T.unsafe(nil), Symbol) - -# source://reline//lib/reline/kill_ring.rb#7 -Reline::KillRing::State::PROCESSED = T.let(T.unsafe(nil), Symbol) - -# source://reline//lib/reline/kill_ring.rb#8 -Reline::KillRing::State::YANK = T.let(T.unsafe(nil), Symbol) - -# source://reline//lib/reline/line_editor.rb#6 -class Reline::LineEditor - # @return [LineEditor] a new instance of LineEditor - # - # source://reline//lib/reline/line_editor.rb#73 - def initialize(config); end - - # source://reline//lib/reline/line_editor.rb#692 - def add_dialog_proc(name, p, context = T.unsafe(nil)); end - - # Returns the value of attribute auto_indent_proc. - # - # source://reline//lib/reline/line_editor.rb#14 - def auto_indent_proc; end - - # Sets the attribute auto_indent_proc - # - # @param value the value to set the attribute auto_indent_proc to. - # - # source://reline//lib/reline/line_editor.rb#14 - def auto_indent_proc=(_arg0); end - - # TODO: Use "private alias_method" idiom after drop Ruby 2.5. - # - # source://reline//lib/reline/line_editor.rb#8 - def byte_pointer; end - - # source://reline//lib/reline/line_editor.rb#1282 - def byte_pointer=(val); end - - # source://reline//lib/reline/line_editor.rb#398 - def calculate_overlay_levels(overlay_levels); end - - # source://reline//lib/reline/line_editor.rb#1122 - def call_completion_proc(pre, target, post, quote); end - - # source://reline//lib/reline/line_editor.rb#1129 - def call_completion_proc_with_checking_args(pre, target, post); end - - # source://reline//lib/reline/line_editor.rb#446 - def clear_dialogs; end - - # Returns the value of attribute completion_append_character. - # - # source://reline//lib/reline/line_editor.rb#11 - def completion_append_character; end - - # Sets the attribute completion_append_character - # - # @param value the value to set the attribute completion_append_character to. - # - # source://reline//lib/reline/line_editor.rb#11 - def completion_append_character=(_arg0); end - - # Returns the value of attribute completion_proc. - # - # source://reline//lib/reline/line_editor.rb#10 - def completion_proc; end - - # Sets the attribute completion_proc - # - # @param value the value to set the attribute completion_proc to. - # - # source://reline//lib/reline/line_editor.rb#10 - def completion_proc=(_arg0); end - - # source://reline//lib/reline/line_editor.rb#1223 - def confirm_multiline_termination; end - - # Returns the value of attribute confirm_multiline_termination_proc. - # - # source://reline//lib/reline/line_editor.rb#9 - def confirm_multiline_termination_proc; end - - # Sets the attribute confirm_multiline_termination_proc - # - # @param value the value to set the attribute confirm_multiline_termination_proc to. - # - # source://reline//lib/reline/line_editor.rb#9 - def confirm_multiline_termination_proc=(_arg0); end - - # source://reline//lib/reline/line_editor.rb#304 - def current_byte_pointer_cursor; end - - # source://reline//lib/reline/line_editor.rb#1172 - def current_line; end - - # source://reline//lib/reline/line_editor.rb#1248 - def delete_text(start = T.unsafe(nil), length = T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#874 - def dialog_proc_scope_completion_journey_data; end - - # Returns the value of attribute dig_perfect_match_proc. - # - # source://reline//lib/reline/line_editor.rb#15 - def dig_perfect_match_proc; end - - # Sets the attribute dig_perfect_match_proc - # - # @param value the value to set the attribute dig_perfect_match_proc to. - # - # source://reline//lib/reline/line_editor.rb#15 - def dig_perfect_match_proc=(_arg0); end - - # source://reline//lib/reline/line_editor.rb#801 - def editing_mode; end - - # source://reline//lib/reline/line_editor.rb#84 - def encoding; end - - # @return [Boolean] - # - # source://reline//lib/reline/line_editor.rb#220 - def eof?; end - - # source://reline//lib/reline/line_editor.rb#216 - def finalize; end - - # source://reline//lib/reline/line_editor.rb#1302 - def finish; end - - # @return [Boolean] - # - # source://reline//lib/reline/line_editor.rb#1298 - def finished?; end - - # source://reline//lib/reline/line_editor.rb#168 - def handle_signal; end - - # source://reline//lib/reline/line_editor.rb#1043 - def input_key(key); end - - # source://reline//lib/reline/line_editor.rb#1228 - def insert_multiline_text(text); end - - # source://reline//lib/reline/line_editor.rb#1238 - def insert_text(text); end - - # source://reline//lib/reline/line_editor.rb#80 - def io_gate; end - - # source://reline//lib/reline/line_editor.rb#1168 - def line; end - - # source://reline//lib/reline/line_editor.rb#351 - def modified_lines; end - - # source://reline//lib/reline/line_editor.rb#273 - def multiline_off; end - - # source://reline//lib/reline/line_editor.rb#269 - def multiline_on; end - - # Returns the value of attribute output_modifier_proc. - # - # source://reline//lib/reline/line_editor.rb#12 - def output_modifier_proc; end - - # Sets the attribute output_modifier_proc - # - # @param value the value to set the attribute output_modifier_proc to. - # - # source://reline//lib/reline/line_editor.rb#12 - def output_modifier_proc=(_arg0); end - - # source://reline//lib/reline/line_editor.rb#473 - def print_nomultiline_prompt; end - - # source://reline//lib/reline/line_editor.rb#357 - def prompt_list; end - - # Returns the value of attribute prompt_proc. - # - # source://reline//lib/reline/line_editor.rb#13 - def prompt_proc; end - - # Sets the attribute prompt_proc - # - # @param value the value to set the attribute prompt_proc to. - # - # source://reline//lib/reline/line_editor.rb#13 - def prompt_proc=(_arg0); end - - # source://reline//lib/reline/line_editor.rb#1093 - def push_input_lines; end - - # source://reline//lib/reline/line_editor.rb#481 - def render; end - - # source://reline//lib/reline/line_editor.rb#461 - def render_finished; end - - # source://reline//lib/reline/line_editor.rb#406 - def render_line_differential(old_items, new_items); end - - # source://reline//lib/reline/line_editor.rb#564 - def rerender; end - - # source://reline//lib/reline/line_editor.rb#141 - def reset(prompt = T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#261 - def reset_line; end - - # source://reline//lib/reline/line_editor.rb#224 - def reset_variables(prompt = T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#560 - def rest_height(wrapped_cursor_y); end - - # source://reline//lib/reline/line_editor.rb#1187 - def retrieve_completion_block; end - - # source://reline//lib/reline/line_editor.rb#1089 - def save_old_buffer; end - - # source://reline//lib/reline/line_editor.rb#363 - def screen_height; end - - # source://reline//lib/reline/line_editor.rb#371 - def screen_scroll_top; end - - # source://reline//lib/reline/line_editor.rb#367 - def screen_width; end - - # source://reline//lib/reline/line_editor.rb#1112 - def scroll_into_view; end - - # source://reline//lib/reline/line_editor.rb#1176 - def set_current_line(line, byte_pointer = T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#88 - def set_pasting_state(in_pasting); end - - # source://reline//lib/reline/line_editor.rb#207 - def set_signal_handlers; end - - # source://reline//lib/reline/line_editor.rb#1105 - def trim_input_lines; end - - # source://reline//lib/reline/line_editor.rb#1033 - def update(key); end - - # source://reline//lib/reline/line_editor.rb#453 - def update_dialogs(key = T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#556 - def upper_space_height(wrapped_cursor_y); end - - # source://reline//lib/reline/line_editor.rb#1290 - def whole_buffer; end - - # source://reline//lib/reline/line_editor.rb#1286 - def whole_lines; end - - # source://reline//lib/reline/line_editor.rb#343 - def with_cache(key, *deps); end - - # source://reline//lib/reline/line_editor.rb#948 - def wrap_method_call(method_symbol, method_obj, key, with_operator = T.unsafe(nil)); end - - # Calculate cursor position in word wrapped content. - # - # source://reline//lib/reline/line_editor.rb#437 - def wrapped_cursor_position; end - - # source://reline//lib/reline/line_editor.rb#375 - def wrapped_prompt_and_input_lines; end - - private - - # @return [Boolean] - # - # source://reline//lib/reline/line_editor.rb#938 - def argumentable?(method_obj); end - - # source://reline//lib/reline/line_editor.rb#1443 - def backward_char(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#1712 - def backward_delete_char(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#1856 - def backward_kill_word(key); end - - # source://reline//lib/reline/line_editor.rb#1838 - def backward_word(key); end - - # source://reline//lib/reline/line_editor.rb#1460 - def beginning_of_line(key); end - - # @return [Boolean] - # - # source://reline//lib/reline/line_editor.rb#1294 - def buffer_empty?; end - - # source://reline//lib/reline/line_editor.rb#1313 - def byteinsert(str, byte_pointer, other); end - - # source://reline//lib/reline/line_editor.rb#1307 - def byteslice!(str, byte_pointer, size); end - - # source://reline//lib/reline/line_editor.rb#308 - def calculate_nearest_cursor(cursor); end - - # source://reline//lib/reline/line_editor.rb#1320 - def calculate_width(str, allow_escape_code = T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#1896 - def capitalize_word(key); end - - # source://reline//lib/reline/line_editor.rb#95 - def check_mode_string; end - - # source://reline//lib/reline/line_editor.rb#109 - def check_multiline_prompt(buffer, mode_string); end - - # source://reline//lib/reline/line_editor.rb#968 - def cleanup_waiting; end - - # source://reline//lib/reline/line_editor.rb#551 - def clear_rendered_screen_cache; end - - # source://reline//lib/reline/line_editor.rb#1822 - def clear_screen(key); end - - # source://reline//lib/reline/line_editor.rb#1340 - def complete(_key); end - - # source://reline//lib/reline/line_editor.rb#1358 - def completion_journey_move(direction); end - - # source://reline//lib/reline/line_editor.rb#1374 - def completion_journey_up(_key); end - - # source://reline//lib/reline/line_editor.rb#1942 - def copy_for_vi(text); end - - # source://reline//lib/reline/line_editor.rb#1777 - def delete_char(key); end - - # source://reline//lib/reline/line_editor.rb#1792 - def delete_char_or_list(key); end - - # source://reline//lib/reline/line_editor.rb#703 - def dialog_range(dialog, dialog_y); end - - # source://reline//lib/reline/line_editor.rb#1906 - def downcase_word(key); end - - # source://reline//lib/reline/line_editor.rb#2195 - def ed_argument_digit(key); end - - # source://reline//lib/reline/line_editor.rb#1822 - def ed_clear_screen(key); end - - # source://reline//lib/reline/line_editor.rb#2141 - def ed_delete_next_char(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2053 - def ed_delete_prev_char(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#1856 - def ed_delete_prev_word(key); end - - # Editline:: +ed-insert+ (vi input: almost all; emacs: printable characters) - # In insert mode, insert the input character left of the cursor - # position. In replace mode, overwrite the character at the - # cursor and move the cursor to the right by one character - # position. Accept an argument to do this repeatedly. It is an - # error if the input character is the NUL character (+Ctrl-@+). - # Failure to enlarge the edit buffer also results in an error. - # Editline:: +ed-digit+ (emacs: 0 to 9) If in argument input mode, append - # the input digit to the argument being read. Otherwise, call - # +ed-insert+. It is an error if the input character is not a - # digit or if the existing argument is already greater than a - # million. - # GNU Readline:: +self-insert+ (a, b, A, 1, !, …) Insert yourself. - # - # source://reline//lib/reline/line_editor.rb#1401 - def ed_digit(str); end - - # Editline:: +ed-insert+ (vi input: almost all; emacs: printable characters) - # In insert mode, insert the input character left of the cursor - # position. In replace mode, overwrite the character at the - # cursor and move the cursor to the right by one character - # position. Accept an argument to do this repeatedly. It is an - # error if the input character is the NUL character (+Ctrl-@+). - # Failure to enlarge the edit buffer also results in an error. - # Editline:: +ed-digit+ (emacs: 0 to 9) If in argument input mode, append - # the input digit to the argument being read. Otherwise, call - # +ed-insert+. It is an error if the input character is not a - # digit or if the existing argument is already greater than a - # million. - # GNU Readline:: +self-insert+ (a, b, A, 1, !, …) Insert yourself. - # - # source://reline//lib/reline/line_editor.rb#1401 - def ed_insert(str); end - - # Editline:: +ed-kill-line+ (vi command: +D+, +Ctrl-K+; emacs: +Ctrl-K+, - # +Ctrl-U+) + Kill from the cursor to the end of the line. - # GNU Readline:: +kill-line+ (+C-k+) Kill the text from point to the end of - # the line. With a negative numeric argument, kill backward - # from the cursor to the beginning of the current line. - # - # source://reline//lib/reline/line_editor.rb#1733 - def ed_kill_line(key); end - - # source://reline//lib/reline/line_editor.rb#1460 - def ed_move_to_beg(key); end - - # source://reline//lib/reline/line_editor.rb#1466 - def ed_move_to_end(key); end - - # source://reline//lib/reline/line_editor.rb#1683 - def ed_newline(key); end - - # source://reline//lib/reline/line_editor.rb#1430 - def ed_next_char(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#1666 - def ed_next_history(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#1443 - def ed_prev_char(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#1649 - def ed_prev_history(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#1838 - def ed_prev_word(key); end - - # source://reline//lib/reline/line_editor.rb#1612 - def ed_search_next_history(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#1597 - def ed_search_prev_history(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#1866 - def ed_transpose_chars(key); end - - # source://reline//lib/reline/line_editor.rb#1883 - def ed_transpose_words(key); end - - # do nothing - # - # source://reline//lib/reline/line_editor.rb#1380 - def ed_unassigned(key); end - - # source://reline//lib/reline/line_editor.rb#1896 - def em_capitol_case(key); end - - # source://reline//lib/reline/line_editor.rb#1777 - def em_delete(key); end - - # source://reline//lib/reline/line_editor.rb#1846 - def em_delete_next_word(key); end - - # source://reline//lib/reline/line_editor.rb#1792 - def em_delete_or_list(key); end - - # source://reline//lib/reline/line_editor.rb#1712 - def em_delete_prev_char(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2336 - def em_exchange_mark(key); end - - # Editline:: +em-kill-line+ (not bound) Delete the entire contents of the - # edit buffer and save it to the cut buffer. +vi-kill-line-prev+ - # GNU Readline:: +kill-whole-line+ (not bound) Kill all characters on the - # current line, no matter where point is. - # - # source://reline//lib/reline/line_editor.rb#1769 - def em_kill_line(key); end - - # source://reline//lib/reline/line_editor.rb#1932 - def em_kill_region(key); end - - # source://reline//lib/reline/line_editor.rb#1906 - def em_lower_case(key); end - - # source://reline//lib/reline/line_editor.rb#1830 - def em_next_word(key); end - - # source://reline//lib/reline/line_editor.rb#2331 - def em_set_mark(key); end - - # source://reline//lib/reline/line_editor.rb#1919 - def em_upper_case(key); end - - # source://reline//lib/reline/line_editor.rb#1806 - def em_yank(key); end - - # source://reline//lib/reline/line_editor.rb#1812 - def em_yank_pop(key); end - - # source://reline//lib/reline/line_editor.rb#2344 - def emacs_editing_mode(key); end - - # source://reline//lib/reline/line_editor.rb#1466 - def end_of_line(key); end - - # source://reline//lib/reline/line_editor.rb#2336 - def exchange_point_and_mark(key); end - - # source://reline//lib/reline/line_editor.rb#809 - def filter_normalize_candidates(target, list); end - - # source://reline//lib/reline/line_editor.rb#1430 - def forward_char(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#1582 - def forward_search_history(key); end - - # source://reline//lib/reline/line_editor.rb#1830 - def forward_word(key); end - - # source://reline//lib/reline/line_editor.rb#1471 - def generate_searcher(search_key); end - - # source://reline//lib/reline/line_editor.rb#185 - def handle_interrupted; end - - # source://reline//lib/reline/line_editor.rb#173 - def handle_resized; end - - # source://reline//lib/reline/line_editor.rb#1597 - def history_search_backward(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#1612 - def history_search_forward(key, arg: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://reline//lib/reline/line_editor.rb#942 - def inclusive?(method_obj); end - - # source://reline//lib/reline/line_editor.rb#1550 - def incremental_search_history(key); end - - # source://reline//lib/reline/line_editor.rb#277 - def insert_new_line(cursor_line, next_line); end - - # source://reline//lib/reline/line_editor.rb#1419 - def insert_raw_char(str, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#1324 - def key_delete(key); end - - # source://reline//lib/reline/line_editor.rb#1332 - def key_newline(key); end - - # Editline:: +ed-kill-line+ (vi command: +D+, +Ctrl-K+; emacs: +Ctrl-K+, - # +Ctrl-U+) + Kill from the cursor to the end of the line. - # GNU Readline:: +kill-line+ (+C-k+) Kill the text from point to the end of - # the line. With a negative numeric argument, kill backward - # from the cursor to the beginning of the current line. - # - # source://reline//lib/reline/line_editor.rb#1733 - def kill_line(key); end - - # Editline:: +em-kill-line+ (not bound) Delete the entire contents of the - # edit buffer and save it to the cut buffer. +vi-kill-line-prev+ - # GNU Readline:: +kill-whole-line+ (not bound) Kill all characters on the - # current line, no matter where point is. - # - # source://reline//lib/reline/line_editor.rb#1769 - def kill_whole_line(key); end - - # source://reline//lib/reline/line_editor.rb#1846 - def kill_word(key); end - - # source://reline//lib/reline/line_editor.rb#805 - def menu(list); end - - # source://reline//lib/reline/line_editor.rb#1366 - def menu_complete(_key); end - - # source://reline//lib/reline/line_editor.rb#1370 - def menu_complete_backward(_key); end - - # source://reline//lib/reline/line_editor.rb#793 - def modify_lines(before, complete); end - - # source://reline//lib/reline/line_editor.rb#887 - def move_completed_list(direction); end - - # source://reline//lib/reline/line_editor.rb#1627 - def move_history(history_pointer, line:, cursor:); end - - # source://reline//lib/reline/line_editor.rb#2352 - def move_undo_redo(direction); end - - # source://reline//lib/reline/line_editor.rb#1666 - def next_history(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#832 - def perform_completion(preposing, target, postposing, quote, list); end - - # source://reline//lib/reline/line_editor.rb#2371 - def prev_action_state_value(type); end - - # source://reline//lib/reline/line_editor.rb#1649 - def previous_history(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#1151 - def process_auto_indent(line_index = T.unsafe(nil), cursor_dependent: T.unsafe(nil), add_newline: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#1382 - def process_insert(force: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#979 - def process_key(key, method_symbol); end - - # source://reline//lib/reline/line_editor.rb#2379 - def re_read_init_file(_key); end - - # source://reline//lib/reline/line_editor.rb#2367 - def redo(_key); end - - # Reflects lines to be rendered and new cursor position to the screen - # by calculating the difference from the previous render. - # - # source://reline//lib/reline/line_editor.rb#515 - def render_differential(new_lines, new_cursor_x, new_cursor_y); end - - # source://reline//lib/reline/line_editor.rb#899 - def retrieve_completion_journey_state; end - - # source://reline//lib/reline/line_editor.rb#1577 - def reverse_search_history(key); end - - # source://reline//lib/reline/line_editor.rb#914 - def run_for_operators(key, method_symbol, &block); end - - # source://reline//lib/reline/line_editor.rb#1587 - def search_history(prefix, pointer_range); end - - # source://reline//lib/reline/line_editor.rb#2242 - def search_next_char(key, arg, need_prev_char: T.unsafe(nil), inclusive: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2289 - def search_prev_char(key, arg, need_next_char = T.unsafe(nil)); end - - # Editline:: +ed-insert+ (vi input: almost all; emacs: printable characters) - # In insert mode, insert the input character left of the cursor - # position. In replace mode, overwrite the character at the - # cursor and move the cursor to the right by one character - # position. Accept an argument to do this repeatedly. It is an - # error if the input character is the NUL character (+Ctrl-@+). - # Failure to enlarge the edit buffer also results in an error. - # Editline:: +ed-digit+ (emacs: 0 to 9) If in argument input mode, append - # the input digit to the argument being read. Otherwise, call - # +ed-insert+. It is an error if the input character is not a - # digit or if the existing argument is already greater than a - # million. - # GNU Readline:: +self-insert+ (a, b, A, 1, !, …) Insert yourself. - # - # source://reline//lib/reline/line_editor.rb#1401 - def self_insert(str); end - - # source://reline//lib/reline/line_editor.rb#2331 - def set_mark(key); end - - # source://reline//lib/reline/line_editor.rb#2375 - def set_next_action_state(type, value); end - - # source://reline//lib/reline/line_editor.rb#300 - def split_line_by_width(str, max_width, offset: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#1866 - def transpose_chars(key); end - - # source://reline//lib/reline/line_editor.rb#1883 - def transpose_words(key); end - - # source://reline//lib/reline/line_editor.rb#2363 - def undo(_key); end - - # Editline:: +vi-kill-line-prev+ (vi: +Ctrl-U+) Delete the string from the - # beginning of the edit buffer to the cursor and save it to the - # cut buffer. - # GNU Readline:: +unix-line-discard+ (+C-u+) Kill backward from the cursor - # to the beginning of the current line. - # - # source://reline//lib/reline/line_editor.rb#1756 - def unix_line_discard(key); end - - # source://reline//lib/reline/line_editor.rb#1932 - def unix_word_rubout(key); end - - # source://reline//lib/reline/line_editor.rb#1919 - def upcase_word(key); end - - # source://reline//lib/reline/line_editor.rb#709 - def update_each_dialog(dialog, cursor_column, cursor_row, key = T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#1952 - def vi_add(key); end - - # source://reline//lib/reline/line_editor.rb#2048 - def vi_add_at_eol(key); end - - # source://reline//lib/reline/line_editor.rb#2067 - def vi_change_meta(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2079 - def vi_change_meta_confirm(byte_pointer_diff); end - - # Editline:: +vi_change_to_eol+ (vi command: +C+) + Kill and change from the cursor to the end of the line. - # - # source://reline//lib/reline/line_editor.rb#1745 - def vi_change_to_eol(key); end - - # source://reline//lib/reline/line_editor.rb#1957 - def vi_command_mode(key); end - - # source://reline//lib/reline/line_editor.rb#2085 - def vi_delete_meta(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2096 - def vi_delete_meta_confirm(byte_pointer_diff); end - - # source://reline//lib/reline/line_editor.rb#2029 - def vi_delete_prev_char(key); end - - # source://reline//lib/reline/line_editor.rb#2348 - def vi_editing_mode(key); end - - # source://reline//lib/reline/line_editor.rb#2014 - def vi_end_big_word(key, arg: T.unsafe(nil), inclusive: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2130 - def vi_end_of_transmission(key); end - - # source://reline//lib/reline/line_editor.rb#1981 - def vi_end_word(key, arg: T.unsafe(nil), inclusive: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2130 - def vi_eof_maybe(key); end - - # source://reline//lib/reline/line_editor.rb#1456 - def vi_first_print(key); end - - # source://reline//lib/reline/line_editor.rb#2164 - def vi_histedit(key); end - - # source://reline//lib/reline/line_editor.rb#1948 - def vi_insert(key); end - - # source://reline//lib/reline/line_editor.rb#2043 - def vi_insert_at_bol(key); end - - # source://reline//lib/reline/line_editor.rb#2322 - def vi_join_lines(key, arg: T.unsafe(nil)); end - - # Editline:: +vi-kill-line-prev+ (vi: +Ctrl-U+) Delete the string from the - # beginning of the edit buffer to the cursor and save it to the - # cut buffer. - # GNU Readline:: +unix-line-discard+ (+C-u+) Kill backward from the cursor - # to the beginning of the current line. - # - # source://reline//lib/reline/line_editor.rb#1756 - def vi_kill_line_prev(key); end - - # source://reline//lib/reline/line_editor.rb#2130 - def vi_list_or_eof(key); end - - # source://reline//lib/reline/line_editor.rb#1957 - def vi_movement_mode(key); end - - # source://reline//lib/reline/line_editor.rb#1996 - def vi_next_big_word(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2234 - def vi_next_char(key, arg: T.unsafe(nil), inclusive: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#1963 - def vi_next_word(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2185 - def vi_paste_next(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2176 - def vi_paste_prev(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2005 - def vi_prev_big_word(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2281 - def vi_prev_char(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#1972 - def vi_prev_word(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2210 - def vi_replace_char(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#1582 - def vi_search_next(key); end - - # source://reline//lib/reline/line_editor.rb#1577 - def vi_search_prev(key); end - - # source://reline//lib/reline/line_editor.rb#2201 - def vi_to_column(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2157 - def vi_to_history_line(key); end - - # source://reline//lib/reline/line_editor.rb#2238 - def vi_to_next_char(key, arg: T.unsafe(nil), inclusive: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2285 - def vi_to_prev_char(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2108 - def vi_yank(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2119 - def vi_yank_confirm(byte_pointer_diff); end - - # source://reline//lib/reline/line_editor.rb#1460 - def vi_zero(key); end - - # source://reline//lib/reline/line_editor.rb#1806 - def yank(key); end - - # source://reline//lib/reline/line_editor.rb#1812 - def yank_pop(key); end -end - -# source://reline//lib/reline/line_editor.rb#976 -Reline::LineEditor::ARGUMENT_DIGIT_METHODS = T.let(T.unsafe(nil), Array) - -# source://reline//lib/reline/line_editor.rb#45 -class Reline::LineEditor::CompletionJourneyState < ::Struct - # Returns the value of attribute line_index - # - # @return [Object] the current value of line_index - def line_index; end - - # Sets the attribute line_index - # - # @param value [Object] the value to set the attribute line_index to. - # @return [Object] the newly set value - def line_index=(_); end - - # Returns the value of attribute list - # - # @return [Object] the current value of list - def list; end - - # Sets the attribute list - # - # @param value [Object] the value to set the attribute list to. - # @return [Object] the newly set value - def list=(_); end - - # Returns the value of attribute pointer - # - # @return [Object] the current value of pointer - def pointer; end - - # Sets the attribute pointer - # - # @param value [Object] the value to set the attribute pointer to. - # @return [Object] the newly set value - def pointer=(_); end - - # Returns the value of attribute post - # - # @return [Object] the current value of post - def post; end - - # Sets the attribute post - # - # @param value [Object] the value to set the attribute post to. - # @return [Object] the newly set value - def post=(_); end - - # Returns the value of attribute pre - # - # @return [Object] the current value of pre - def pre; end - - # Sets the attribute pre - # - # @param value [Object] the value to set the attribute pre to. - # @return [Object] the newly set value - def pre=(_); end - - # Returns the value of attribute target - # - # @return [Object] the current value of target - def target; end - - # Sets the attribute target - # - # @param value [Object] the value to set the attribute target to. - # @return [Object] the newly set value - def target=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://reline//lib/reline/line_editor.rb#38 -Reline::LineEditor::CompletionState::MENU = T.let(T.unsafe(nil), Symbol) - -# source://reline//lib/reline/line_editor.rb#39 -Reline::LineEditor::CompletionState::MENU_WITH_PERFECT_MATCH = T.let(T.unsafe(nil), Symbol) - -# source://reline//lib/reline/line_editor.rb#37 -Reline::LineEditor::CompletionState::NORMAL = T.let(T.unsafe(nil), Symbol) - -# source://reline//lib/reline/line_editor.rb#40 -Reline::LineEditor::CompletionState::PERFECT_MATCH = T.let(T.unsafe(nil), Symbol) - -# source://reline//lib/reline/line_editor.rb#701 -Reline::LineEditor::DIALOG_DEFAULT_HEIGHT = T.let(T.unsafe(nil), Integer) - -# source://reline//lib/reline/line_editor.rb#647 -class Reline::LineEditor::Dialog - # @return [Dialog] a new instance of Dialog - # - # source://reline//lib/reline/line_editor.rb#651 - def initialize(name, config, proc_scope); end - - # source://reline//lib/reline/line_editor.rb#675 - def call(key); end - - # Returns the value of attribute column. - # - # source://reline//lib/reline/line_editor.rb#649 - def column; end - - # Sets the attribute column - # - # @param value the value to set the attribute column to. - # - # source://reline//lib/reline/line_editor.rb#649 - def column=(_arg0); end - - # Returns the value of attribute contents. - # - # source://reline//lib/reline/line_editor.rb#648 - def contents; end - - # source://reline//lib/reline/line_editor.rb#668 - def contents=(contents); end - - # Returns the value of attribute name. - # - # source://reline//lib/reline/line_editor.rb#648 - def name; end - - # Returns the value of attribute pointer. - # - # source://reline//lib/reline/line_editor.rb#649 - def pointer; end - - # Sets the attribute pointer - # - # @param value the value to set the attribute pointer to. - # - # source://reline//lib/reline/line_editor.rb#649 - def pointer=(_arg0); end - - # Returns the value of attribute scroll_top. - # - # source://reline//lib/reline/line_editor.rb#649 - def scroll_top; end - - # Sets the attribute scroll_top - # - # @param value the value to set the attribute scroll_top to. - # - # source://reline//lib/reline/line_editor.rb#649 - def scroll_top=(_arg0); end - - # source://reline//lib/reline/line_editor.rb#660 - def set_cursor_pos(col, row); end - - # Returns the value of attribute trap_key. - # - # source://reline//lib/reline/line_editor.rb#649 - def trap_key; end - - # Sets the attribute trap_key - # - # @param value the value to set the attribute trap_key to. - # - # source://reline//lib/reline/line_editor.rb#649 - def trap_key=(_arg0); end - - # Returns the value of attribute vertical_offset. - # - # source://reline//lib/reline/line_editor.rb#649 - def vertical_offset; end - - # Sets the attribute vertical_offset - # - # @param value the value to set the attribute vertical_offset to. - # - # source://reline//lib/reline/line_editor.rb#649 - def vertical_offset=(_arg0); end - - # Returns the value of attribute width. - # - # source://reline//lib/reline/line_editor.rb#648 - def width; end - - # source://reline//lib/reline/line_editor.rb#664 - def width=(v); end -end - -# source://reline//lib/reline/line_editor.rb#568 -class Reline::LineEditor::DialogProcScope - # @return [DialogProcScope] a new instance of DialogProcScope - # - # source://reline//lib/reline/line_editor.rb#571 - def initialize(line_editor, config, proc_to_exec, context); end - - # source://reline//lib/reline/line_editor.rb#642 - def call; end - - # source://reline//lib/reline/line_editor.rb#588 - def call_completion_proc_with_checking_args(pre, target, post); end - - # source://reline//lib/reline/line_editor.rb#634 - def completion_journey_data; end - - # source://reline//lib/reline/line_editor.rb#638 - def config; end - - # source://reline//lib/reline/line_editor.rb#579 - def context; end - - # source://reline//lib/reline/line_editor.rb#613 - def cursor_pos; end - - # source://reline//lib/reline/line_editor.rb#596 - def dialog; end - - # source://reline//lib/reline/line_editor.rb#617 - def just_cursor_moving; end - - # source://reline//lib/reline/line_editor.rb#609 - def key; end - - # source://reline//lib/reline/line_editor.rb#629 - def preferred_dialog_height; end - - # source://reline//lib/reline/line_editor.rb#583 - def retrieve_completion_block(_unused = T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#625 - def screen_height; end - - # source://reline//lib/reline/line_editor.rb#621 - def screen_width; end - - # source://reline//lib/reline/line_editor.rb#600 - def set_cursor_pos(col, row); end - - # source://reline//lib/reline/line_editor.rb#592 - def set_dialog(dialog); end - - # source://reline//lib/reline/line_editor.rb#605 - def set_key(key); end -end - -# source://reline//lib/reline/line_editor.rb#569 -class Reline::LineEditor::DialogProcScope::CompletionJourneyData < ::Struct - # Returns the value of attribute list - # - # @return [Object] the current value of list - def list; end - - # Sets the attribute list - # - # @param value [Object] the value to set the attribute list to. - # @return [Object] the newly set value - def list=(_); end - - # Returns the value of attribute pointer - # - # @return [Object] the current value of pointer - def pointer; end - - # Sets the attribute pointer - # - # @param value [Object] the value to set the attribute pointer to. - # @return [Object] the newly set value - def pointer=(_); end - - # Returns the value of attribute postposing - # - # @return [Object] the current value of postposing - def postposing; end - - # Sets the attribute postposing - # - # @param value [Object] the value to set the attribute postposing to. - # @return [Object] the newly set value - def postposing=(_); end - - # Returns the value of attribute preposing - # - # @return [Object] the current value of preposing - def preposing; end - - # Sets the attribute preposing - # - # @param value [Object] the value to set the attribute preposing to. - # @return [Object] the newly set value - def preposing=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://reline//lib/reline/line_editor.rb#1104 -Reline::LineEditor::MAX_INPUT_LINES = T.let(T.unsafe(nil), Integer) - -# source://reline//lib/reline/line_editor.rb#71 -Reline::LineEditor::MINIMUM_SCROLLBAR_HEIGHT = T.let(T.unsafe(nil), Integer) - -# source://reline//lib/reline/line_editor.rb#48 -class Reline::LineEditor::MenuInfo - # @return [MenuInfo] a new instance of MenuInfo - # - # source://reline//lib/reline/line_editor.rb#51 - def initialize(list); end - - # source://reline//lib/reline/line_editor.rb#55 - def lines(screen_width); end - - # Returns the value of attribute list. - # - # source://reline//lib/reline/line_editor.rb#49 - def list; end -end - -# source://reline//lib/reline/line_editor.rb#46 -Reline::LineEditor::NullActionState = T.let(T.unsafe(nil), Array) - -# source://reline//lib/reline/line_editor.rb#43 -class Reline::LineEditor::RenderedScreen < ::Struct - # Returns the value of attribute base_y - # - # @return [Object] the current value of base_y - def base_y; end - - # Sets the attribute base_y - # - # @param value [Object] the value to set the attribute base_y to. - # @return [Object] the newly set value - def base_y=(_); end - - # Returns the value of attribute cursor_y - # - # @return [Object] the current value of cursor_y - def cursor_y; end - - # Sets the attribute cursor_y - # - # @param value [Object] the value to set the attribute cursor_y to. - # @return [Object] the newly set value - def cursor_y=(_); end - - # Returns the value of attribute lines - # - # @return [Object] the current value of lines - def lines; end - - # Sets the attribute lines - # - # @param value [Object] the value to set the attribute lines to. - # @return [Object] the newly set value - def lines=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://reline//lib/reline/line_editor.rb#17 -Reline::LineEditor::VI_MOTIONS = T.let(T.unsafe(nil), Array) - -# source://reline//lib/reline/line_editor.rb#977 -Reline::LineEditor::VI_WAITING_ACCEPT_METHODS = T.let(T.unsafe(nil), Array) - -# source://reline//lib/reline.rb#16 -Reline::USERNAME_COMPLETION_PROC = T.let(T.unsafe(nil), T.untyped) - -# source://reline//lib/reline/unicode.rb#1 -class Reline::Unicode - class << self - # source://reline//lib/reline/unicode.rb#98 - def calculate_width(str, allow_escape_code = T.unsafe(nil)); end - - # source://reline//lib/reline/unicode.rb#387 - def common_prefix(list, ignore_case: T.unsafe(nil)); end - - # source://reline//lib/reline/unicode.rb#292 - def ed_transpose_words(line, byte_pointer); end - - # source://reline//lib/reline/unicode.rb#278 - def em_backward_word(line, byte_pointer); end - - # source://reline//lib/reline/unicode.rb#285 - def em_big_backward_word(line, byte_pointer); end - - # source://reline//lib/reline/unicode.rb#264 - def em_forward_word(line, byte_pointer); end - - # source://reline//lib/reline/unicode.rb#271 - def em_forward_word_with_capitalization(line, byte_pointer); end - - # source://reline//lib/reline/unicode.rb#44 - def escape_for_print(str); end - - # source://reline//lib/reline/unicode.rb#75 - def get_mbchar_width(mbchar); end - - # source://reline//lib/reline/unicode.rb#250 - def get_next_mbchar_size(line, byte_pointer); end - - # source://reline//lib/reline/unicode.rb#255 - def get_prev_mbchar_size(line, byte_pointer); end - - # source://reline//lib/reline/unicode.rb#57 - def safe_encode(str, encoding); end - - # @return [Boolean] - # - # source://reline//lib/reline/unicode.rb#412 - def space_character?(s); end - - # This method is used by IRB - # - # source://reline//lib/reline/unicode.rb#125 - def split_by_width(str, max_width); end - - # source://reline//lib/reline/unicode.rb#130 - def split_line_by_width(str, max_width, encoding = T.unsafe(nil), offset: T.unsafe(nil)); end - - # source://reline//lib/reline/unicode.rb#172 - def strip_non_printing_start_end(prompt); end - - # source://reline//lib/reline/unicode.rb#181 - def take_mbchar_range(str, start_col, width, cover_begin: T.unsafe(nil), cover_end: T.unsafe(nil), padding: T.unsafe(nil)); end - - # Take a chunk of a String cut by width with escape sequences. - # - # source://reline//lib/reline/unicode.rb#177 - def take_range(str, start_col, max_width); end - - # source://reline//lib/reline/unicode.rb#378 - def vi_backward_word(line, byte_pointer); end - - # source://reline//lib/reline/unicode.rb#333 - def vi_big_backward_word(line, byte_pointer); end - - # source://reline//lib/reline/unicode.rb#323 - def vi_big_forward_end_word(line, byte_pointer); end - - # source://reline//lib/reline/unicode.rb#316 - def vi_big_forward_word(line, byte_pointer); end - - # source://reline//lib/reline/unicode.rb#400 - def vi_first_print(line); end - - # source://reline//lib/reline/unicode.rb#360 - def vi_forward_end_word(line, byte_pointer); end - - # source://reline//lib/reline/unicode.rb#340 - def vi_forward_word(line, byte_pointer, drop_terminate_spaces = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://reline//lib/reline/unicode.rb#406 - def word_character?(s); end - end -end - -# source://reline//lib/reline/unicode.rb#40 -Reline::Unicode::CSI_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://reline//lib/reline/unicode/east_asian_width.rb#5 -Reline::Unicode::EastAsianWidth::CHUNK_LAST = T.let(T.unsafe(nil), Array) - -# source://reline//lib/reline/unicode/east_asian_width.rb#5 -Reline::Unicode::EastAsianWidth::CHUNK_WIDTH = T.let(T.unsafe(nil), Array) - -# C-? C-8 -# -# source://reline//lib/reline/unicode.rb#36 -Reline::Unicode::EscapedChars = T.let(T.unsafe(nil), Array) - -# source://reline//lib/reline/unicode.rb#2 -Reline::Unicode::EscapedPairs = T.let(T.unsafe(nil), Hash) - -# source://reline//lib/reline/unicode.rb#39 -Reline::Unicode::NON_PRINTING_END = T.let(T.unsafe(nil), String) - -# source://reline//lib/reline/unicode.rb#38 -Reline::Unicode::NON_PRINTING_START = T.let(T.unsafe(nil), String) - -# source://reline//lib/reline/unicode.rb#41 -Reline::Unicode::OSC_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://reline//lib/reline/unicode.rb#42 -Reline::Unicode::WIDTH_SCANNER = T.let(T.unsafe(nil), Regexp) - -# source://reline//lib/reline/version.rb#2 -Reline::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/require-hooks@0.5.1.rbi b/sorbet/rbi/gems/require-hooks@0.5.1.rbi new file mode 100644 index 0000000..1e536b2 --- /dev/null +++ b/sorbet/rbi/gems/require-hooks@0.5.1.rbi @@ -0,0 +1,152 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `require-hooks` gem. +# Please instead update this file by running `bin/tapioca gem require-hooks`. + + +# pkg:gem/require-hooks#lib/require-hooks/api.rb:3 +module RequireHooks + class << self + # Define a block to wrap the code loading. + # The return value MUST be a result of calling the passed block. + # For example, you can use such hooks for instrumentation, debugging purposes. + # + # RequireHooks.around_load do |path, &block| + # puts "Loading #{path}" + # block.call.tap { puts "Loaded #{path}" } + # end + # + # pkg:gem/require-hooks#lib/require-hooks/api.rb:103 + def around_load(patterns: T.unsafe(nil), exclude_patterns: T.unsafe(nil), &block); end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:139 + def context_for(path); end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:168 + def contexts; end + + # This hook should be used to manually compile byte code to be loaded by the VM. + # The arguments are (path, source = nil), where source is only defined if transformations took place. + # Otherwise, you MUST read the source code from the file yourself. + # + # The return value MUST be either nil (continue to the next hook or default behavior) or a platform-specific bytecode object (e.g., RubyVM::InstructionSequence). + # + # RequireHooks.hijack_load do |path, source| + # source ||= File.read(path) + # if defined?(RubyVM::InstructionSequence) + # RubyVM::InstructionSequence.compile(source) + # elsif defined?(JRUBY_VERSION) + # JRuby.compile(source) + # end + # end + # + # pkg:gem/require-hooks#lib/require-hooks/api.rb:135 + def hijack_load(patterns: T.unsafe(nil), exclude_patterns: T.unsafe(nil), &block); end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:93 + def print_warnings; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:93 + def print_warnings=(_arg0); end + + # Hack to enable coverage for hooked files. + # Requires eval coverage to be on. + # See https://bugs.ruby-lang.org/issues/22018 (https://github.com/ruby/ruby/pull/16805) + # + # pkg:gem/require-hooks#lib/require-hooks/api.rb:160 + def setup_path_coverage(path, contents = T.unsafe(nil)); end + + # Define hooks to perform source-to-source transformations. + # The return value MUST be either String (new source code) or nil (indicating that no transformations were performed). + # + # NOTE: The second argument (`source`) MAY be nil, indicating that no transformer tried to transform the source code. + # + # + # RequireHooks.source_transform do |path, source| + # end + # + # pkg:gem/require-hooks#lib/require-hooks/api.rb:117 + def source_transform(patterns: T.unsafe(nil), exclude_patterns: T.unsafe(nil), &block); end + + private + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:184 + def eval_coverage_enabled?; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:174 + def register_hook(type, block, patterns: T.unsafe(nil), exclude_patterns: T.unsafe(nil)); end + end +end + +# pkg:gem/require-hooks#lib/require-hooks/api.rb:4 +class RequireHooks::Context + # pkg:gem/require-hooks#lib/require-hooks/api.rb:8 + def initialize(patterns: T.unsafe(nil), exclude_patterns: T.unsafe(nil)); end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:5 + def around_load; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:30 + def empty?; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:5 + def exclude_patterns; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:45 + def hijack?; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:5 + def hijack_load; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:24 + def match?(path); end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:81 + def merge!(another_ctx); end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:5 + def patterns; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:59 + def perform_source_transform(path); end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:35 + def readonly?; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:49 + def run_around_load_callbacks(path); end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:5 + def source_transform; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:41 + def source_transform?; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:20 + def to_key; end + + # pkg:gem/require-hooks#lib/require-hooks/api.rb:71 + def try_hijack_load(path, source); end +end + +# pkg:gem/require-hooks#lib/require-hooks/mode/load_iseq.rb:6 +RequireHooks::EMPTY_ISEQ = T.let(T.unsafe(nil), RubyVM::InstructionSequence) + +# pkg:gem/require-hooks#lib/require-hooks/iseq.rb:4 +module RequireHooks::Iseq + class << self + # pkg:gem/require-hooks#lib/require-hooks/iseq.rb:6 + def compile_with_coverage(ctx, path); end + end +end + +# pkg:gem/require-hooks#lib/require-hooks/mode/load_iseq.rb:8 +module RequireHooks::LoadIseq + # pkg:gem/require-hooks#lib/require-hooks/mode/load_iseq.rb:9 + def load_iseq(path); end +end + +class RubyVM::InstructionSequence + extend ::RequireHooks::LoadIseq +end diff --git a/sorbet/rbi/gems/rspec-core@3.13.3.rbi b/sorbet/rbi/gems/rspec-core@3.13.6.rbi similarity index 50% rename from sorbet/rbi/gems/rspec-core@3.13.3.rbi rename to sorbet/rbi/gems/rspec-core@3.13.6.rbi index 3d6c383..a8bedcf 100644 --- a/sorbet/rbi/gems/rspec-core@3.13.3.rbi +++ b/sorbet/rbi/gems/rspec-core@3.13.6.rbi @@ -5,19 +5,12 @@ # 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. +# This is borrowed (slightly modified) from Scott Taylor's +# project_path project: +# http://github.com/smtlaissezfaire/project_path # -# source://rspec-core//lib/rspec/core/version.rb#1 +# pkg:gem/rspec-core#lib/rspec/core/version.rb:1 module RSpec extend ::RSpec::Core::Warnings @@ -29,7 +22,7 @@ module RSpec # current configuration when they use the runner multiple times within the # same process. # - # source://rspec-core//lib/rspec/core.rb#70 + # pkg:gem/rspec-core#lib/rspec/core.rb:70 def clear_examples; end # Returns the global [Configuration](RSpec/Core/Configuration) object. While @@ -37,38 +30,47 @@ module RSpec # convention is to use [RSpec.configure](RSpec#configure-class_method). # # @example - # RSpec.configuration.drb_port = 1234 + # RSpec.configuration.drb_port = 1234 # @see RSpec.configure # @see Core::Configuration + # Setters for shared global objects + # @api private # - # source://rspec-core//lib/rspec/core.rb#85 + # pkg:gem/rspec-core#lib/rspec/core.rb:85 def configuration; end - # Setters for shared global objects + # Returns the global [Configuration](RSpec/Core/Configuration) object. While + # you _can_ use this method to access the configuration, the more common + # convention is to use [RSpec.configure](RSpec#configure-class_method). # + # @example + # RSpec.configuration.drb_port = 1234 + # @see RSpec.configure + # @see Core::Configuration + # Setters for shared global objects # @api private # - # source://rspec-core//lib/rspec/core.rb#49 + # pkg:gem/rspec-core#lib/rspec/core.rb:49 def configuration=(_arg0); end # Yields the global configuration to a block. + # @yield [Configuration] global configuration # # @example - # RSpec.configure do |config| - # config.add_formatter 'documentation' - # end + # RSpec.configure do |config| + # config.add_formatter 'documentation' + # end # @see Core::Configuration - # @yield [Configuration] global configuration # - # source://rspec-core//lib/rspec/core.rb#97 + # pkg:gem/rspec-core#lib/rspec/core.rb:97 def configure; end # @private # - # source://rspec-core//lib/rspec/core.rb#194 + # pkg:gem/rspec-core#lib/rspec/core.rb:194 def const_missing(name); end - # source://rspec-core//lib/rspec/core/dsl.rb#42 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:279 def context(*args, &example_group_block); end # The example being executed. @@ -79,27 +81,26 @@ module RSpec # # @example # - # RSpec.configure do |c| - # # context.example is deprecated, but RSpec.current_example is not - # # available until RSpec 3.0. - # fetch_current_example = RSpec.respond_to?(:current_example) ? - # proc { RSpec.current_example } : proc { |context| context.example } + # RSpec.configure do |c| + # # context.example is deprecated, but RSpec.current_example is not + # # available until RSpec 3.0. + # fetch_current_example = RSpec.respond_to?(:current_example) ? + # proc { RSpec.current_example } : proc { |context| context.example } # - # c.before(:example) do - # example = fetch_current_example.call(self) + # c.before(:example) do + # example = fetch_current_example.call(self) # - # # ... - # end - # end + # # ... + # end + # end # - # source://rspec-core//lib/rspec/core.rb#122 + # pkg:gem/rspec-core#lib/rspec/core.rb:122 def current_example; end # Set the current example being executed. - # # @api private # - # source://rspec-core//lib/rspec/core.rb#128 + # pkg:gem/rspec-core#lib/rspec/core.rb:128 def current_example=(example); end # Get the current RSpec execution scope @@ -116,29 +117,27 @@ module RSpec # * `:suite` as a final value, again this is outside of the test lifecycle. # # Reminder, `:context` hooks have `:all` alias and `:example` hooks have `:each` alias. - # # @return [Symbol] # - # source://rspec-core//lib/rspec/core.rb#154 + # pkg:gem/rspec-core#lib/rspec/core.rb:154 def current_scope; end # Set the current scope rspec is executing in - # # @api private # - # source://rspec-core//lib/rspec/core.rb#134 + # pkg:gem/rspec-core#lib/rspec/core.rb:134 def current_scope=(scope); end - # source://rspec-core//lib/rspec/core/dsl.rb#42 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:279 def describe(*args, &example_group_block); end - # source://rspec-core//lib/rspec/core/dsl.rb#42 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:279 def example_group(*args, &example_group_block); end - # source://rspec-core//lib/rspec/core/dsl.rb#42 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:279 def fcontext(*args, &example_group_block); end - # source://rspec-core//lib/rspec/core/dsl.rb#42 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:279 def fdescribe(*args, &example_group_block); end # Used to ensure examples get reloaded and user configuration gets reset to @@ -148,138 +147,127 @@ module RSpec # they use the runner multiple times within the same process. Users must deal # themselves with re-configuration of RSpec before run. # - # source://rspec-core//lib/rspec/core.rb#58 + # pkg:gem/rspec-core#lib/rspec/core.rb:58 def reset; end - # source://rspec-core//lib/rspec/core/shared_example_group.rb#110 + # pkg:gem/rspec-core#lib/rspec/core/shared_example_group.rb:113 def shared_context(name, *args, &block); end - # source://rspec-core//lib/rspec/core/shared_example_group.rb#110 + # pkg:gem/rspec-core#lib/rspec/core/shared_example_group.rb:110 def shared_examples(name, *args, &block); end - # source://rspec-core//lib/rspec/core/shared_example_group.rb#110 + # pkg:gem/rspec-core#lib/rspec/core/shared_example_group.rb:114 def shared_examples_for(name, *args, &block); end - # Internal container for global non-configuration data. - # # @private + # Internal container for global non-configuration data. + # Setters for shared global objects + # @api private # - # source://rspec-core//lib/rspec/core.rb#160 + # pkg:gem/rspec-core#lib/rspec/core.rb:160 def world; end + # @private + # Internal container for global non-configuration data. # Setters for shared global objects - # # @api private # - # source://rspec-core//lib/rspec/core.rb#49 + # pkg:gem/rspec-core#lib/rspec/core.rb:49 def world=(_arg0); end - # source://rspec-core//lib/rspec/core/dsl.rb#42 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:279 def xcontext(*args, &example_group_block); end - # source://rspec-core//lib/rspec/core/dsl.rb#42 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:279 def xdescribe(*args, &example_group_block); end end end # Namespace for the rspec-core code. # -# source://rspec-core//lib/rspec/core/version.rb#2 +# pkg:gem/rspec-core#lib/rspec/core/version.rb:2 module RSpec::Core class << self # @private path to executable file. # - # source://rspec-core//lib/rspec/core.rb#181 + # pkg:gem/rspec-core#lib/rspec/core.rb:181 def path_to_executable; end end end -# Unnamed example group used by `SuiteHookContext`. -# # @private +# Unnamed example group used by `SuiteHookContext`. # -# source://rspec-core//lib/rspec/core/example_group.rb#775 +# pkg:gem/rspec-core#lib/rspec/core/example_group.rb:782 class RSpec::Core::AnonymousExampleGroup < ::RSpec::Core::ExampleGroup class << self - # source://rspec-core//lib/rspec/core/example_group.rb#776 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:783 def metadata; end end end # @private # -# source://rspec-core//lib/rspec/core/backtrace_formatter.rb#4 +# pkg:gem/rspec-core#lib/rspec/core/backtrace_formatter.rb:4 class RSpec::Core::BacktraceFormatter - # @return [BacktraceFormatter] a new instance of BacktraceFormatter - # - # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#8 + # pkg:gem/rspec-core#lib/rspec/core/backtrace_formatter.rb:8 def initialize; end - # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#49 + # pkg:gem/rspec-core#lib/rspec/core/backtrace_formatter.rb:49 def backtrace_line(line); end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#53 + # pkg:gem/rspec-core#lib/rspec/core/backtrace_formatter.rb:53 def exclude?(line); end # @private # - # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#6 + # pkg:gem/rspec-core#lib/rspec/core/backtrace_formatter.rb:6 def exclusion_patterns; end # @private # - # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#6 + # pkg:gem/rspec-core#lib/rspec/core/backtrace_formatter.rb:6 def exclusion_patterns=(_arg0); end - # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#28 + # pkg:gem/rspec-core#lib/rspec/core/backtrace_formatter.rb:28 def filter_gem(gem_name); end - # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#33 + # pkg:gem/rspec-core#lib/rspec/core/backtrace_formatter.rb:33 def format_backtrace(backtrace, options = T.unsafe(nil)); end - # Sets the attribute full_backtrace - # - # @param value the value to set the attribute full_backtrace to. - # - # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#22 + # pkg:gem/rspec-core#lib/rspec/core/backtrace_formatter.rb:22 def full_backtrace=(_arg0); end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#24 + # pkg:gem/rspec-core#lib/rspec/core/backtrace_formatter.rb:24 def full_backtrace?; end # @private # - # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#6 + # pkg:gem/rspec-core#lib/rspec/core/backtrace_formatter.rb:6 def inclusion_patterns; end # @private # - # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#6 + # pkg:gem/rspec-core#lib/rspec/core/backtrace_formatter.rb:6 def inclusion_patterns=(_arg0); end private - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#60 + # pkg:gem/rspec-core#lib/rspec/core/backtrace_formatter.rb:60 def matches?(patterns, line); end end # @private # -# source://rspec-core//lib/rspec/core/bisect/utilities.rb#3 +# pkg:gem/rspec-core#lib/rspec/core/bisect/utilities.rb:3 module RSpec::Core::Bisect; end # @private # -# source://rspec-core//lib/rspec/core/bisect/utilities.rb#8 +# pkg:gem/rspec-core#lib/rspec/core/bisect/utilities.rb:8 class RSpec::Core::Bisect::BisectFailedError < ::StandardError class << self - # source://rspec-core//lib/rspec/core/bisect/utilities.rb#9 + # pkg:gem/rspec-core#lib/rspec/core/bisect/utilities.rb:9 def for_failed_spec_run(spec_output); end end end @@ -288,60 +276,56 @@ end # parent process. Where supported, encoding is explicitly # set to ensure binary data is able to pass from child to # parent. -# # @private # -# source://rspec-core//lib/rspec/core/bisect/utilities.rb#36 +# pkg:gem/rspec-core#lib/rspec/core/bisect/utilities.rb:36 class RSpec::Core::Bisect::Channel - # @return [Channel] a new instance of Channel - # - # source://rspec-core//lib/rspec/core/bisect/utilities.rb#41 + # pkg:gem/rspec-core#lib/rspec/core/bisect/utilities.rb:41 def initialize; end - # source://rspec-core//lib/rspec/core/bisect/utilities.rb#62 + # pkg:gem/rspec-core#lib/rspec/core/bisect/utilities.rb:62 def close; end - # source://rspec-core//lib/rspec/core/bisect/utilities.rb#56 + # pkg:gem/rspec-core#lib/rspec/core/bisect/utilities.rb:56 def receive; end - # source://rspec-core//lib/rspec/core/bisect/utilities.rb#50 + # pkg:gem/rspec-core#lib/rspec/core/bisect/utilities.rb:50 def send(message); end end -# source://rspec-core//lib/rspec/core/bisect/utilities.rb#38 +# pkg:gem/rspec-core#lib/rspec/core/bisect/utilities.rb:38 RSpec::Core::Bisect::Channel::MARSHAL_DUMP_ENCODING = T.let(T.unsafe(nil), Encoding) # @private # -# source://rspec-core//lib/rspec/core/bisect/utilities.rb#5 +# pkg:gem/rspec-core#lib/rspec/core/bisect/utilities.rb:5 class RSpec::Core::Bisect::ExampleSetDescriptor < ::Struct - # Returns the value of attribute all_example_ids - # - # @return [Object] the current value of all_example_ids + # pkg:gem/rspec-core#lib/rspec/core/bisect/utilities.rb:5 def all_example_ids; end - # Sets the attribute all_example_ids - # - # @param value [Object] the value to set the attribute all_example_ids to. - # @return [Object] the newly set value + # pkg:gem/rspec-core#lib/rspec/core/bisect/utilities.rb:5 def all_example_ids=(_); end - # Returns the value of attribute failed_example_ids - # - # @return [Object] the current value of failed_example_ids + # pkg:gem/rspec-core#lib/rspec/core/bisect/utilities.rb:5 def failed_example_ids; end - # Sets the attribute failed_example_ids - # - # @param value [Object] the value to set the attribute failed_example_ids to. - # @return [Object] the newly set value + # pkg:gem/rspec-core#lib/rspec/core/bisect/utilities.rb:5 def failed_example_ids=(_); end class << self + # pkg:gem/rspec-core#lib/rspec/core/bisect/utilities.rb:5 def [](*_arg0); end + + # pkg:gem/rspec-core#lib/rspec/core/bisect/utilities.rb:5 def inspect; end + + # pkg:gem/rspec-core#lib/rspec/core/bisect/utilities.rb:5 def keyword_init?; end + + # pkg:gem/rspec-core#lib/rspec/core/bisect/utilities.rb:5 def members; end + + # pkg:gem/rspec-core#lib/rspec/core/bisect/utilities.rb:5 def new(*_arg0); end end end @@ -349,17 +333,14 @@ end # Wraps a `formatter` providing a simple means to notify it in place # of an `RSpec::Core::Reporter`, without involving configuration in # any way. -# # @private # -# source://rspec-core//lib/rspec/core/bisect/utilities.rb#19 +# pkg:gem/rspec-core#lib/rspec/core/bisect/utilities.rb:19 class RSpec::Core::Bisect::Notifier - # @return [Notifier] a new instance of Notifier - # - # source://rspec-core//lib/rspec/core/bisect/utilities.rb#20 + # pkg:gem/rspec-core#lib/rspec/core/bisect/utilities.rb:20 def initialize(formatter); end - # source://rspec-core//lib/rspec/core/bisect/utilities.rb#24 + # pkg:gem/rspec-core#lib/rspec/core/bisect/utilities.rb:24 def publish(event, *args); end end @@ -385,36 +366,35 @@ end # separate custom file using the --options command-line parameter. # # @example Standard settings -# RSpec.configure do |c| -# c.drb = true -# c.drb_port = 1234 -# c.default_path = 'behavior' -# end +# RSpec.configure do |c| +# c.drb = true +# c.drb_port = 1234 +# c.default_path = 'behavior' +# end +# # @example Hooks -# RSpec.configure do |c| -# c.before(:suite) { establish_connection } -# c.before(:example) { log_in_as :authorized } -# c.around(:example) { |ex| Database.transaction(&ex) } -# end +# RSpec.configure do |c| +# c.before(:suite) { establish_connection } +# c.before(:example) { log_in_as :authorized } +# c.around(:example) { |ex| Database.transaction(&ex) } +# end +# # @see RSpec.configure # @see Hooks # -# source://rspec-core//lib/rspec/core/configuration.rb#47 +# pkg:gem/rspec-core#lib/rspec/core/configuration.rb:47 class RSpec::Core::Configuration include ::RSpec::Core::Hooks include ::RSpec::Core::Configuration::Readers # Build an object to store runtime configuration options and set defaults # - # @return [Configuration] a new instance of Configuration - # - # source://rspec-core//lib/rspec/core/configuration.rb#528 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:528 def initialize; end - # Adds a formatter to the set RSpec will use for this run. + # @overload add_formatter(formatter) + # @overload add_formatter(formatter, output) # - # @overload add_formatter - # @overload add_formatter # @param formatter [Class, String, Object] formatter to use. Can be any of the # string values supported from the CLI (`p`/`progress`, # `d`/`doc`/`documentation`, `h`/`html`, or `j`/`json`), any @@ -423,11 +403,30 @@ class RSpec::Core::Configuration # @param output [String, IO] where the formatter will write its output. # Can be an IO object or a string path to a file. If not provided, # the configured `output_stream` (`$stdout`, by default) will be used. + # + # Adds a formatter to the set RSpec will use for this run. + # # @see RSpec::Core::Formatters::Protocol # - # source://rspec-core//lib/rspec/core/configuration.rb#996 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:996 def add_formatter(formatter, output = T.unsafe(nil)); end + # @overload add_setting(name) + # @overload add_setting(name, opts) + # @option opts [Symbol] :default + # + # Set a default value for the generated getter and predicate methods: + # + # add_setting(:foo, :default => "default value") + # + # @option opts [Symbol] :alias_with + # + # Use `:alias_with` to alias the setter, getter, and predicate to + # another name, or names: + # + # add_setting(:foo, :alias_with => :bar) + # add_setting(:foo, :alias_with => [:bar, :baz]) + # # Adds a custom setting to the RSpec.configuration object. # # RSpec.configuration.add_setting :foo @@ -448,13 +447,7 @@ class RSpec::Core::Configuration # RSpec.configuration.foo # RSpec.configuration.foo? # Returns true if foo returns anything but nil or false. # - # @option opts - # @option opts - # @overload add_setting - # @overload add_setting - # @param opts [Hash] a customizable set of options - # - # source://rspec-core//lib/rspec/core/configuration.rb#659 + # pkg:gem/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. @@ -468,7 +461,7 @@ class RSpec::Core::Configuration # @see #before # @see #prepend_before # - # source://rspec-core//lib/rspec/core/configuration.rb#2031 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2031 def after(scope = T.unsafe(nil), *meta, &block); end # Creates a method that defines an example group with the provided @@ -476,11 +469,11 @@ class RSpec::Core::Configuration # # @example # RSpec.configure do |config| - # config.alias_example_group_to :describe_model, :type => :model + # config.alias_example_group_to :describe_model, :type => :model # end # # shared_context_for "model tests", :type => :model do - # # define common model test helper methods, `let` declarations, etc + # # define common model test helper methods, `let` declarations, etc # end # # # This lets you do this: @@ -492,48 +485,50 @@ class RSpec::Core::Configuration # # RSpec.describe User, :type => :model do # end + # # @note The defined aliased will also be added to the top level - # (e.g. `main` and from within modules) if - # `expose_dsl_globally` is set to true. + # (e.g. `main` and from within modules) if + # `expose_dsl_globally` is set to true. # @see #alias_example_to # @see #expose_dsl_globally= # - # source://rspec-core//lib/rspec/core/configuration.rb#1209 + # pkg:gem/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 # `args`. Used internally to add variants of `example` like `pending`: + # @param name [String] example name alias + # @param args [Array, Hash] metadata for the generated example + # + # @note The specific example alias below (`pending`) is already + # defined for you. + # @note Use with caution. This extends the language used in your + # specs, but does not add any additional documentation. We use this + # in RSpec to define methods like `focus` and `xit`, but we also add + # docs for those methods. # # @example # RSpec.configure do |config| - # config.alias_example_to :pending, :pending => true + # config.alias_example_to :pending, :pending => true # end # # # This lets you do this: # # RSpec.describe Thing do - # pending "does something" do - # thing = Thing.new - # end + # pending "does something" do + # thing = Thing.new + # end # end # # # ... which is the equivalent of # # RSpec.describe Thing do - # it "does something", :pending => true do - # thing = Thing.new - # end + # it "does something", :pending => true do + # thing = Thing.new + # end # end - # @note The specific example alias below (`pending`) is already - # defined for you. - # @note Use with caution. This extends the language used in your - # specs, but does not add any additional documentation. We use this - # in RSpec to define methods like `focus` and `xit`, but we also add - # docs for those methods. - # @param name [String] example name alias - # @param args [Array, Hash] metadata for the generated example # - # source://rspec-core//lib/rspec/core/configuration.rb#1177 + # pkg:gem/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 @@ -542,56 +537,31 @@ class RSpec::Core::Configuration # # @example # RSpec.configure do |config| - # config.alias_it_behaves_like_to(:it_has_behavior, 'has behavior:') + # config.alias_it_behaves_like_to(:it_has_behavior, 'has behavior:') # end # # # allows the user to include a shared example group like: # # RSpec.describe Entity do - # it_has_behavior 'sortability' do - # let(:sortable) { Entity.new } - # end + # it_has_behavior 'sortability' do + # let(:sortable) { Entity.new } + # end # end # # # which is reported in the output as: # # Entity # # has behavior: sortability # # ...sortability examples here + # # @note Use with caution. This extends the language used in your # specs, but does not add any additional documentation. We use this # 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#1240 + # pkg:gem/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 - # language (like "it_has_behavior" or "it_behaves_like") to be - # employed when including shared examples. - # - # @example - # RSpec.configure do |config| - # config.alias_it_behaves_like_to(:it_has_behavior, 'has behavior:') - # end - # - # # allows the user to include a shared example group like: - # - # RSpec.describe Entity do - # it_has_behavior 'sortability' do - # let(:sortable) { Entity.new } - # end - # end - # - # # which is reported in the output as: - # # Entity - # # has behavior: sortability - # # ...sortability examples here - # @note Use with caution. This extends the language used in your - # specs, but does not add any additional documentation. We use this - # 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#1240 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1243 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 @@ -609,34 +579,22 @@ class RSpec::Core::Configuration # @see #before # @see #prepend_before # - # source://rspec-core//lib/rspec/core/configuration.rb#2061 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2061 def append_after(scope = T.unsafe(nil), *meta, &block); end - # Defines a `before` hook. See {Hooks#before} for full docs. - # - # This method differs from {Hooks#before} in only one way: it supports - # the `:suite` scope. Hooks with the `:suite` scope will be run once before - # the first example of the entire suite is executed. Conditions passed along - # with `:suite` are effectively ignored. - # - # @see #prepend_before - # @see #after - # @see #append_after - # - # source://rspec-core//lib/rspec/core/configuration.rb#1976 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1990 def append_before(scope = T.unsafe(nil), *meta, &block); end # @private - # @raise [SystemStackError] # - # source://rspec-core//lib/rspec/core/configuration.rb#1941 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1941 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#2079 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2079 def around(scope = T.unsafe(nil), *meta, &block); end # Regexps used to exclude lines from backtraces. @@ -650,22 +608,20 @@ class RSpec::Core::Configuration # To override this behaviour and display a full backtrace, use # `--backtrace` on the command line, in a `.rspec` file, or in the # `rspec_options` attribute of RSpec's rake task. - # # @return [Array] # - # source://rspec-core//lib/rspec/core/configuration.rb#697 + # pkg:gem/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] set backtrace_formatter exclusion_patterns # - # source://rspec-core//lib/rspec/core/configuration.rb#703 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:703 def backtrace_exclusion_patterns=(patterns); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#522 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:522 def backtrace_formatter; end # Regexps used to include lines in backtraces. @@ -676,17 +632,15 @@ class RSpec::Core::Configuration # will be included. # # You can modify the list via the getter, or replace it with the setter. - # # @return [Array] # - # source://rspec-core//lib/rspec/core/configuration.rb#716 + # pkg:gem/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] set backtrace_formatter inclusion_patterns # - # source://rspec-core//lib/rspec/core/configuration.rb#722 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:722 def backtrace_inclusion_patterns=(patterns); end # Defines a `before` hook. See {Hooks#before} for full docs. @@ -700,7 +654,7 @@ class RSpec::Core::Configuration # @see #after # @see #append_after # - # source://rspec-core//lib/rspec/core/configuration.rb#1976 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1976 def before(scope = T.unsafe(nil), *meta, &block); end # Determines which bisect runner implementation gets used to run subsets @@ -720,17 +674,18 @@ class RSpec::Core::Configuration # # @note This option will only be used by `--bisect` if you set it in a file # loaded via `--require`. + # # @return [Symbol] # - # source://rspec-core//lib/rspec/core/configuration.rb#499 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:499 def bisect_runner; end - # source://rspec-core//lib/rspec/core/configuration.rb#500 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:500 def bisect_runner=(value); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#2125 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2125 def bisect_runner_class; end # Enables color output if the output is a TTY. As of RSpec 3.6, this is @@ -740,29 +695,43 @@ class RSpec::Core::Configuration # @deprecated No longer recommended because of complex behavior. Instead, # 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. - # @return [Boolean] # @see color_mode # @see color_enabled? + # @return [Boolean] + # Toggle output color. + # + # @deprecated No longer recommended because of complex behavior. Instead, + # 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#922 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:922 def color; end + # Enables color output if the output is a TTY. As of RSpec 3.6, this is + # the default behavior and this option is retained only for backwards + # compatibility. + # + # @deprecated No longer recommended because of complex behavior. Instead, + # 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. + # @see color_mode + # @see color_enabled? + # @return [Boolean] # Toggle output color. # # @deprecated No longer recommended because of complex behavior. Instead, # 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#960 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:960 def color=(_arg0); end # Check if color is enabled for a particular output. - # # @param output [IO] an output stream to use, defaults to the current - # `output_stream` + # `output_stream` # @return [Boolean] # - # source://rspec-core//lib/rspec/core/configuration.rb#943 + # pkg:gem/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: @@ -772,68 +741,66 @@ class RSpec::Core::Configuration # - :on - the output will be in color, whether or not the output is a TTY # - :off - the output will not be in color # - # @return [Boolean] # @see color_enabled? + # @return [Boolean] + # Set the color mode. # - # source://rspec-core//lib/rspec/core/configuration.rb#935 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:935 def color_mode; end + # The mode for determining whether to display output in color. One of: + # + # - :automatic - the output will be in color if the output is a TTY (the + # default) + # - :on - the output will be in color, whether or not the output is a TTY + # - :off - the output will not be in color + # + # @see color_enabled? + # @return [Boolean] # Set the color mode. # - # source://rspec-core//lib/rspec/core/configuration.rb#953 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:953 def color_mode=(_arg0); end + # @private + # # Used internally to extend the singleton class of a single example's # example group instance with modules using `include` and/or `extend`. # - # @private - # - # source://rspec-core//lib/rspec/core/configuration.rb#1580 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1580 def configure_example(example, example_hooks); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1622 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1622 def configure_expectation_framework; end + # @private + # # Used internally to extend a group with modules using `include`, `prepend` and/or # `extend`. # - # @private - # - # source://rspec-core//lib/rspec/core/configuration.rb#1568 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1568 def configure_group(group); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1616 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1616 def configure_mock_framework; end - # The default output color. Defaults to `:white` but can be set to one of - # the following: `[:black, :white, :red, :green, :yellow, :blue, - # :magenta, :cyan]` - # - # @return [Symbol] - # - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:66 def default_color; end - # The default output color. Defaults to `:white` but can be set to one of - # the following: `[:black, :white, :red, :green, :yellow, :blue, - # :magenta, :cyan]` - # - # @return [Symbol] - # - # source://rspec-core//lib/rspec/core/configuration.rb#89 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:89 def default_color=(_arg0); end - # source://rspec-core//lib/rspec/core/configuration.rb#78 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:78 def default_color?; end # The formatter that will be used if no formatter has been set. # Defaults to 'progress'. # - # source://rspec-core//lib/rspec/core/configuration.rb#1003 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1003 def default_formatter; end # Sets a fallback formatter to use if none other has been set. @@ -841,47 +808,23 @@ class RSpec::Core::Configuration # @example # # RSpec.configure do |rspec| - # rspec.default_formatter = 'doc' + # rspec.default_formatter = 'doc' # end # - # source://rspec-core//lib/rspec/core/configuration.rb#1014 + # pkg:gem/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: - # `"spec"`). Allows you to just type `rspec` instead of `rspec spec` to - # run all the examples in the `spec` directory. - # - # @note Other scripts invoking `rspec` indirectly will ignore this - # setting. - # @return [String] - # - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:66 def default_path; end - # Path to use if no path is provided to the `rspec` command (default: - # `"spec"`). Allows you to just type `rspec` instead of `rspec spec` to - # run all the examples in the `spec` directory. - # - # @note Other scripts invoking `rspec` indirectly will ignore this - # setting. - # @return [String] - # - # source://rspec-core//lib/rspec/core/configuration.rb#121 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:121 def default_path=(path); end - # source://rspec-core//lib/rspec/core/configuration.rb#78 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:78 def default_path?; end # Defines a callback that can assign derived metadata values. # - # @example - # RSpec.configure do |config| - # # Tag all groups and examples in the spec/unit directory with - # # :type => :unit - # config.define_derived_metadata(:file_path => %r{/spec/unit/}) do |metadata| - # metadata[:type] = :unit - # end - # end # @param filters [Array, Hash] metadata filters that determine # which example or group metadata hashes the callback will be triggered # for. If none are given, the callback will be run against the metadata @@ -889,48 +832,39 @@ 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#1900 + # @example + # RSpec.configure do |config| + # # Tag all groups and examples in the spec/unit directory with + # # :type => :unit + # config.define_derived_metadata(:file_path => %r{/spec/unit/}) do |metadata| + # metadata[:type] = :unit + # end + # end + # + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1900 def define_derived_metadata(*filters, &block); end - # Determines where deprecation warnings are printed. - # Defaults to `$stderr`. - # - # @return [IO, String] IO or filename to write to - # - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:66 def deprecation_stream; end # Determines where deprecation warnings are printed. - # # @param value [IO, String] IO to write to or filename to write to # - # source://rspec-core//lib/rspec/core/configuration.rb#168 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:168 def deprecation_stream=(value); end - # Color used to print details. Defaults to `:cyan` but can be set to one - # of the following: `[:black, :white, :red, :green, :yellow, :blue, - # :magenta, :cyan]` - # - # @return [Symbol] - # - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:66 def detail_color; end - # Color used to print details. Defaults to `:cyan` but can be set to one - # of the following: `[:black, :white, :red, :green, :yellow, :blue, - # :magenta, :cyan]` - # - # @return [Symbol] - # - # source://rspec-core//lib/rspec/core/configuration.rb#89 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:89 def detail_color=(_arg0); end - # source://rspec-core//lib/rspec/core/configuration.rb#78 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:78 def detail_color?; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1881 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1881 def disable_monkey_patching; end # Enables zero monkey patching mode for RSpec. It removes monkey @@ -941,151 +875,110 @@ class RSpec::Core::Configuration # simply disables monkey patching on whatever pieces of RSpec # the user is using. # + # @note It configures rspec-mocks and rspec-expectations only + # 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 similar) they will still have monkey patching active + # in their test environment from mocha. + # # @example # # # It disables all monkey patching. # RSpec.configure do |config| - # config.disable_monkey_patching! + # config.disable_monkey_patching! # end # # # Is an equivalent to # RSpec.configure do |config| - # config.expose_dsl_globally = false + # config.expose_dsl_globally = false # - # config.mock_with :rspec do |mocks| - # mocks.syntax = :expect - # mocks.patch_marshal_to_support_partial_doubles = false - # end + # config.mock_with :rspec do |mocks| + # mocks.syntax = :expect + # mocks.patch_marshal_to_support_partial_doubles = false + # end # - # config.expect_with :rspec do |expectations| - # expectations.syntax = :expect - # end + # config.expect_with :rspec do |expectations| + # expectations.syntax = :expect + # end # end - # @note It configures rspec-mocks and rspec-expectations only - # 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 similar) they will still have monkey patching active - # in their test environment from mocha. # - # source://rspec-core//lib/rspec/core/configuration.rb#1873 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1873 def disable_monkey_patching!; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1881 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1881 def disable_monkey_patching=(_arg0); end - # Run examples over DRb (default: `false`). RSpec doesn't supply the DRb - # server, but you can use tools like spork. - # - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:66 def drb; end - # Run examples over DRb (default: `false`). RSpec doesn't supply the DRb - # server, but you can use tools like spork. - # - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/configuration.rb#89 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:89 def drb=(_arg0); end - # source://rspec-core//lib/rspec/core/configuration.rb#78 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:78 def drb?; end - # The drb_port (default: nil). - # - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:66 def drb_port; end - # The drb_port (default: nil). - # - # source://rspec-core//lib/rspec/core/configuration.rb#89 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:89 def drb_port=(_arg0); end - # source://rspec-core//lib/rspec/core/configuration.rb#78 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:78 def drb_port?; end - # Prints the formatter output of your suite without running any - # examples or hooks. - # - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:66 def dry_run; end - # Prints the formatter output of your suite without running any - # examples or hooks. - # - # source://rspec-core//lib/rspec/core/configuration.rb#89 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:89 def dry_run=(_arg0); end - # source://rspec-core//lib/rspec/core/configuration.rb#78 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:78 def dry_run?; end - # The exit code to return if there are any errors outside examples (default: failure_exit_code) - # - # @return [Integer] - # - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:66 def error_exit_code; end - # The exit code to return if there are any errors outside examples (default: failure_exit_code) - # - # @return [Integer] - # - # source://rspec-core//lib/rspec/core/configuration.rb#89 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:89 def error_exit_code=(_arg0); end - # source://rspec-core//lib/rspec/core/configuration.rb#78 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:78 def error_exit_code?; end - # Default: `$stderr`. - # - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:66 def error_stream; end - # Default: `$stderr`. - # - # source://rspec-core//lib/rspec/core/configuration.rb#89 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:89 def error_stream=(_arg0); end - # source://rspec-core//lib/rspec/core/configuration.rb#78 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:78 def error_stream?; end - # The file path to use for persisting example statuses. Necessary for the - # `--only-failures` and `--next-failure` CLI options. - # - # @overload example_status_persistence_file_path - # @overload example_status_persistence_file_path= - # - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:66 def example_status_persistence_file_path; end # Sets the file path to use for persisting example statuses. Necessary for the # `--only-failures` and `--next-failure` CLI options. # - # source://rspec-core//lib/rspec/core/configuration.rb#192 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:192 def example_status_persistence_file_path=(value); end - # Exclude files matching this pattern. - # - # @return [String] - # - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:66 def exclude_pattern; end # Set pattern to match files to exclude. - # # @attr value [String] the filename pattern to exclude spec files by # - # source://rspec-core//lib/rspec/core/configuration.rb#304 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:304 def exclude_pattern=(value); end # Returns the `exclusion_filter`. If none has been set, returns an empty # hash. # - # source://rspec-core//lib/rspec/core/configuration.rb#1369 + # pkg:gem/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 @@ -1096,7 +989,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#1362 + # pkg:gem/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 @@ -1123,17 +1016,17 @@ class RSpec::Core::Configuration # custom_config.custom_setting = true # end # - # source://rspec-core//lib/rspec/core/configuration.rb#858 + # pkg:gem/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#831 + # pkg:gem/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#819 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:819 def expectation_frameworks; end # Exposes the current running example via the named @@ -1144,21 +1037,22 @@ class RSpec::Core::Configuration # RSpec 2.x's `example` method, so this config option # can be used to maintain compatibility. # + # @param method_name [Symbol] the name of the helper method + # # @example # # RSpec.configure do |rspec| - # rspec.expose_current_running_example_as :example + # rspec.expose_current_running_example_as :example # end # # RSpec.describe MyClass do - # before do - # # `example` can be used here because of the above config. - # do_something if example.metadata[:type] == "foo" - # end + # before do + # # `example` can be used here because of the above config. + # do_something if example.metadata[:type] == "foo" + # end # end - # @param method_name [Symbol] the name of the helper method # - # source://rspec-core//lib/rspec/core/configuration.rb#1811 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1811 def expose_current_running_example_as(method_name); end # Use this to expose the core RSpec DSL via `Module` and the `main` @@ -1166,15 +1060,14 @@ class RSpec::Core::Configuration # remove the DSL. # Default: true # - # source://rspec-core//lib/rspec/core/configuration.rb#151 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:151 def expose_dsl_globally=(value); end # Indicates if the DSL has been exposed off of modules and `main`. # Default: true - # # @return [Boolean] # - # source://rspec-core//lib/rspec/core/configuration.rb#143 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:143 def expose_dsl_globally?; end # Tells RSpec to extend example groups with `mod`. Methods defined in @@ -1187,198 +1080,129 @@ class RSpec::Core::Configuration # # @example # - # module UiHelpers - # def run_in_browser - # # ... - # end - # end + # module UiHelpers + # def run_in_browser + # # ... + # end + # end # - # module PermissionHelpers - # def define_permissions - # # ... - # end - # end + # module PermissionHelpers + # def define_permissions + # # ... + # end + # end # - # RSpec.configure do |config| - # config.extend(UiHelpers, :type => :request) - # config.extend(PermissionHelpers, :with_permissions, :type => :request) - # end + # RSpec.configure do |config| + # config.extend(UiHelpers, :type => :request) + # config.extend(PermissionHelpers, :with_permissions, :type => :request) + # end # - # describe "edit profile", :with_permissions, :type => :request do - # run_in_browser - # define_permissions + # describe "edit profile", :with_permissions, :type => :request do + # run_in_browser + # define_permissions + # + # it "does stuff in the client" do + # # ... + # end + # end # - # it "does stuff in the client" do - # # ... - # end - # end # @see #include # @see #prepend # - # source://rspec-core//lib/rspec/core/configuration.rb#1518 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1518 def extend(mod, *filters); end - # If specified, indicates the number of failures required before cleaning - # up and exit (default: `nil`). Can also be `true` to fail and exit on first - # failure - # - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:66 def fail_fast; end # @see fail_fast # - # source://rspec-core//lib/rspec/core/configuration.rb#214 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:214 def fail_fast=(value); end - # Whether or not to fail when there are no RSpec examples (default: false). - # - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:66 def fail_if_no_examples; end - # Whether or not to fail when there are no RSpec examples (default: false). - # - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/configuration.rb#89 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:89 def fail_if_no_examples=(_arg0); end - # source://rspec-core//lib/rspec/core/configuration.rb#78 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:78 def fail_if_no_examples?; end - # Color to use to indicate failure. Defaults to `:red` but can be set to - # one of the following: `[:black, :white, :red, :green, :yellow, :blue, - # :magenta, :cyan]` - # - # @return [Symbol] - # - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:66 def failure_color; end - # Color to use to indicate failure. Defaults to `:red` but can be set to - # one of the following: `[:black, :white, :red, :green, :yellow, :blue, - # :magenta, :cyan]` - # - # @return [Symbol] - # - # source://rspec-core//lib/rspec/core/configuration.rb#89 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:89 def failure_color=(_arg0); end - # source://rspec-core//lib/rspec/core/configuration.rb#78 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:78 def failure_color?; end - # The exit code to return if there are any failures (default: 1). - # - # @return [Integer] - # - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:66 def failure_exit_code; end - # The exit code to return if there are any failures (default: 1). - # - # @return [Integer] - # - # source://rspec-core//lib/rspec/core/configuration.rb#89 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:89 def failure_exit_code=(_arg0); end - # source://rspec-core//lib/rspec/core/configuration.rb#78 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:78 def failure_exit_code?; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1083 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1083 def files_or_directories_to_run=(*files); end + # @private # The spec files RSpec will run. - # # @return [Array] specified files about to run # - # source://rspec-core//lib/rspec/core/configuration.rb#1096 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1096 def files_to_run; end # @private + # The spec files RSpec will run. + # @return [Array] specified files about to run # - # source://rspec-core//lib/rspec/core/configuration.rb#516 + # pkg:gem/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#1313 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1317 def filter; end - # Clears and reassigns the `inclusion_filter`. Set to `nil` if you don't - # want any inclusion filter at all. - # - # ### Warning - # - # This overrides any inclusion filters/tags set on the command line or in - # configuration files. - # - # source://rspec-core//lib/rspec/core/configuration.rb#1304 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1309 def filter=(filter); end # Adds {#backtrace_exclusion_patterns} that will filter lines from # the named gems from backtraces. # + # @param gem_names [Array] Names of the gems to filter + # # @example # RSpec.configure do |config| - # config.filter_gems_from_backtrace "rack", "rake" + # config.filter_gems_from_backtrace "rack", "rake" # end + # # @note The patterns this adds will match the named gems in their common # locations (e.g. system gems, vendored with bundler, installed as a # :git dependency with bundler, etc) but is not guaranteed to work for # all possible gem locations. For example, if you have the gem source # in a directory with a completely unrelated name, and use bundler's # :path option, this will not filter it. - # @param gem_names [Array] Names of the gems to filter # - # source://rspec-core//lib/rspec/core/configuration.rb#742 + # pkg:gem/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#518 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:518 def filter_manager; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#518 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:518 def filter_manager=(_arg0); end - # Adds key/value pairs to the `inclusion_filter`. If `args` - # includes any symbols that are not part of the hash, each symbol - # is treated as a key in the hash with the value `true`. - # - # ### Note - # - # Filters set using this method can be overridden from the command line - # or config files (e.g. `.rspec`). - # - # @example - # # Given this declaration. - # describe "something", :foo => 'bar' do - # # ... - # end - # - # # Any of the following will include that group. - # config.filter_run_including :foo => 'bar' - # config.filter_run_including :foo => /^ba/ - # config.filter_run_including :foo => lambda {|v| v == 'bar'} - # config.filter_run_including :foo => lambda {|v,m| m[:foo] == 'bar'} - # - # # Given a proc with an arity of 1, the lambda is passed the value - # # related to the key, e.g. - # config.filter_run_including :foo => lambda {|v| v == 'bar'} - # - # # Given a proc with an arity of 2, the lambda is passed the value - # # related to the key, and the metadata itself e.g. - # config.filter_run_including :foo => lambda {|v,m| m[:foo] == 'bar'} - # - # filter_run_including :foo # same as filter_run_including :foo => true - # - # source://rspec-core//lib/rspec/core/configuration.rb#1275 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1280 def filter_run(*args); end # Adds key/value pairs to the `exclusion_filter`. If `args` @@ -1391,28 +1215,28 @@ class RSpec::Core::Configuration # or config files (e.g. `.rspec`). # # @example - # # Given this declaration. - # describe "something", :foo => 'bar' do - # # ... - # end + # # Given this declaration. + # describe "something", :foo => 'bar' do + # # ... + # end # - # # Any of the following will exclude that group. - # config.filter_run_excluding :foo => 'bar' - # config.filter_run_excluding :foo => /^ba/ - # config.filter_run_excluding :foo => lambda {|v| v == 'bar'} - # config.filter_run_excluding :foo => lambda {|v,m| m[:foo] == 'bar'} + # # Any of the following will exclude that group. + # config.filter_run_excluding :foo => 'bar' + # config.filter_run_excluding :foo => /^ba/ + # config.filter_run_excluding :foo => lambda {|v| v == 'bar'} + # config.filter_run_excluding :foo => lambda {|v,m| m[:foo] == 'bar'} # - # # Given a proc with an arity of 1, the lambda is passed the value - # # related to the key, e.g. - # config.filter_run_excluding :foo => lambda {|v| v == 'bar'} + # # Given a proc with an arity of 1, the lambda is passed the value + # # related to the key, e.g. + # config.filter_run_excluding :foo => lambda {|v| v == 'bar'} # - # # Given a proc with an arity of 2, the lambda is passed the value - # # related to the key, and the metadata itself e.g. - # config.filter_run_excluding :foo => lambda {|v,m| m[:foo] == 'bar'} + # # Given a proc with an arity of 2, the lambda is passed the value + # # related to the key, and the metadata itself e.g. + # config.filter_run_excluding :foo => lambda {|v,m| m[:foo] == 'bar'} # - # filter_run_excluding :foo # same as filter_run_excluding :foo => true + # filter_run_excluding :foo # same as filter_run_excluding :foo => true # - # source://rspec-core//lib/rspec/core/configuration.rb#1349 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1349 def filter_run_excluding(*args); end # Adds key/value pairs to the `inclusion_filter`. If `args` @@ -1425,28 +1249,28 @@ class RSpec::Core::Configuration # or config files (e.g. `.rspec`). # # @example - # # Given this declaration. - # describe "something", :foo => 'bar' do - # # ... - # end + # # Given this declaration. + # describe "something", :foo => 'bar' do + # # ... + # end # - # # Any of the following will include that group. - # config.filter_run_including :foo => 'bar' - # config.filter_run_including :foo => /^ba/ - # config.filter_run_including :foo => lambda {|v| v == 'bar'} - # config.filter_run_including :foo => lambda {|v,m| m[:foo] == 'bar'} + # # Any of the following will include that group. + # config.filter_run_including :foo => 'bar' + # config.filter_run_including :foo => /^ba/ + # config.filter_run_including :foo => lambda {|v| v == 'bar'} + # config.filter_run_including :foo => lambda {|v,m| m[:foo] == 'bar'} # - # # Given a proc with an arity of 1, the lambda is passed the value - # # related to the key, e.g. - # config.filter_run_including :foo => lambda {|v| v == 'bar'} + # # Given a proc with an arity of 1, the lambda is passed the value + # # related to the key, e.g. + # config.filter_run_including :foo => lambda {|v| v == 'bar'} # - # # Given a proc with an arity of 2, the lambda is passed the value - # # related to the key, and the metadata itself e.g. - # config.filter_run_including :foo => lambda {|v,m| m[:foo] == 'bar'} + # # Given a proc with an arity of 2, the lambda is passed the value + # # related to the key, and the metadata itself e.g. + # config.filter_run_including :foo => lambda {|v,m| m[:foo] == 'bar'} # - # filter_run_including :foo # same as filter_run_including :foo => true + # filter_run_including :foo # same as filter_run_including :foo => true # - # source://rspec-core//lib/rspec/core/configuration.rb#1275 + # pkg:gem/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 @@ -1459,35 +1283,23 @@ 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#1291 + # pkg:gem/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 - # be set to one of the following: `[:black, :white, :red, :green, - # :yellow, :blue, :magenta, :cyan]` - # - # @return [Symbol] - # - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:66 def fixed_color; end - # Color used when a pending example is fixed. Defaults to `:blue` but can - # be set to one of the following: `[:black, :white, :red, :green, - # :yellow, :blue, :magenta, :cyan]` - # - # @return [Symbol] - # - # source://rspec-core//lib/rspec/core/configuration.rb#89 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:89 def fixed_color=(_arg0); end - # source://rspec-core//lib/rspec/core/configuration.rb#78 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:78 def fixed_color?; end - # Used to set higher priority option values from the command line. - # # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#592 + # Used to set higher priority option values from the command line. + # + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:592 def force(hash); end # Formats the docstring output using the block provided. @@ -1496,37 +1308,23 @@ class RSpec::Core::Configuration # # This will strip the descriptions of both examples and example # # groups. # RSpec.configure do |config| - # config.format_docstrings { |s| s.strip } + # config.format_docstrings { |s| s.strip } # end # - # source://rspec-core//lib/rspec/core/configuration.rb#1661 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1661 def format_docstrings(&block); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1666 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1666 def format_docstrings_block; end - # Adds a formatter to the set RSpec will use for this run. - # - # @overload add_formatter - # @overload add_formatter - # @param formatter [Class, String, Object] formatter to use. Can be any of the - # string values supported from the CLI (`p`/`progress`, - # `d`/`doc`/`documentation`, `h`/`html`, or `j`/`json`), any - # class that implements the formatter protocol and has registered - # itself with RSpec as a formatter, or a formatter instance. - # @param output [String, IO] where the formatter will write its output. - # Can be an IO object or a string path to a file. If not provided, - # the configured `output_stream` (`$stdout`, by default) will be used. - # @see RSpec::Core::Formatters::Protocol - # - # source://rspec-core//lib/rspec/core/configuration.rb#996 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:999 def formatter=(formatter, output = T.unsafe(nil)); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1029 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1029 def formatter_loader; end # Returns a duplicate of the formatters currently loaded in @@ -1536,56 +1334,52 @@ class RSpec::Core::Configuration # # @return [Array] the formatters currently loaded # - # source://rspec-core//lib/rspec/core/configuration.rb#1024 + # pkg:gem/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#908 + # pkg:gem/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#902 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:902 def full_backtrace?; end - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:66 def full_cause_backtrace; end - # source://rspec-core//lib/rspec/core/configuration.rb#89 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:89 def full_cause_backtrace=(_arg0); end - # source://rspec-core//lib/rspec/core/configuration.rb#78 + # pkg:gem/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#977 + # pkg:gem/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#972 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:972 def full_description=(description); end + # @private # Holds the various registered hooks. Here we use a FilterableItemRepository # implementation that is specifically optimized for the read/write patterns # of the config object. # - # @private - # - # source://rspec-core//lib/rspec/core/configuration.rb#2109 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2109 def hooks; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1607 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1607 def in_project_source_dir_regex; end # Tells RSpec to include `mod` in example groups. Methods defined in @@ -1594,55 +1388,57 @@ class RSpec::Core::Configuration # # @example # - # module AuthenticationHelpers - # def login_as(user) - # # ... - # end - # end + # module AuthenticationHelpers + # def login_as(user) + # # ... + # end + # end # - # module PreferencesHelpers - # def preferences(user, preferences = {}) - # # ... - # end - # end + # module PreferencesHelpers + # def preferences(user, preferences = {}) + # # ... + # end + # end # - # module UserHelpers - # def users(username) - # # ... - # end - # end + # module UserHelpers + # def users(username) + # # ... + # end + # end # - # RSpec.configure do |config| - # config.include(UserHelpers) # included in all groups + # RSpec.configure do |config| + # config.include(UserHelpers) # included in all groups # - # # included in examples with `:preferences` metadata - # config.include(PreferenceHelpers, :preferences) + # # included in examples with `:preferences` metadata + # config.include(PreferenceHelpers, :preferences) # - # # included in examples with `:type => :request` metadata - # config.include(AuthenticationHelpers, :type => :request) + # # included in examples with `:type => :request` metadata + # config.include(AuthenticationHelpers, :type => :request) # - # # included in examples where the `:type` metadata matches a proc condition - # config.include(AuthenticationHelpers, :type => proc { |type, _metadata| [:request, :controller].include?(type) }) - # end + # # included in examples where the `:type` metadata matches a proc condition + # config.include(AuthenticationHelpers, :type => proc { |type, _metadata| [:request, :controller].include?(type) }) + # end + # + # describe "edit profile", :preferences, :type => :request do + # it "can be viewed by owning user" do + # login_as preferences(users(:jdoe), :lang => 'es') + # get "/profiles/jdoe" + # assert_select ".username", :text => 'jdoe' + # end + # end # - # describe "edit profile", :preferences, :type => :request do - # it "can be viewed by owning user" do - # login_as preferences(users(:jdoe), :lang => 'es') - # get "/profiles/jdoe" - # assert_select ".username", :text => 'jdoe' - # end - # end # @note Filtered module inclusions can also be applied to # individual examples that have matching metadata. Just like # Ruby's object model is that every object has a singleton class # which has only a single instance, RSpec's model is that every # example has a singleton example group containing just the one # example. + # # @see #include_context # @see #extend # @see #prepend # - # source://rspec-core//lib/rspec/core/configuration.rb#1428 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1428 def include(mod, *filters); end # Tells RSpec to include the named shared example group in example groups. @@ -1651,47 +1447,49 @@ class RSpec::Core::Configuration # # @example # - # RSpec.shared_context "example admin user" do - # let(:admin_user) { create_user(:admin) } - # end + # RSpec.shared_context "example admin user" do + # let(:admin_user) { create_user(:admin) } + # end # - # RSpec.shared_context "example guest user" do - # let(:guest_user) { create_user(:guest) } - # end + # RSpec.shared_context "example guest user" do + # let(:guest_user) { create_user(:guest) } + # end # - # RSpec.configure do |config| - # config.include_context "example guest user", :type => :request - # config.include_context "example admin user", :admin, :type => :request - # end + # RSpec.configure do |config| + # config.include_context "example guest user", :type => :request + # config.include_context "example admin user", :admin, :type => :request + # end # - # RSpec.describe "The admin page", :type => :request do - # it "can be viewed by admins", :admin do - # login_with admin_user - # get "/admin" - # expect(response).to be_ok - # end + # RSpec.describe "The admin page", :type => :request do + # it "can be viewed by admins", :admin do + # login_with admin_user + # get "/admin" + # expect(response).to be_ok + # end + # + # it "cannot be viewed by guests" do + # login_with guest_user + # get "/admin" + # expect(response).to be_forbidden + # end + # end # - # it "cannot be viewed by guests" do - # login_with guest_user - # get "/admin" - # expect(response).to be_forbidden - # end - # end # @note Filtered context inclusions can also be applied to # individual examples that have matching metadata. Just like # Ruby's object model is that every object has a singleton class # which has only a single instance, RSpec's model is that every # example has a singleton example group containing just the one # example. + # # @see #include # - # source://rspec-core//lib/rspec/core/configuration.rb#1475 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1475 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#1313 + # pkg:gem/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 @@ -1702,64 +1500,50 @@ 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#1304 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1304 def inclusion_filter=(filter); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1101 + # pkg:gem/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` - # command line option. - # - # @return [Array] - # - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:66 def libs; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#963 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:963 def libs=(libs); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1630 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1630 def load_spec_files; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#522 + # pkg:gem/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 - # (defaults to `10`). - # return [Integer] - # - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/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 - # (defaults to `10`). - # return [Integer] - # - # source://rspec-core//lib/rspec/core/configuration.rb#89 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:89 def max_displayed_failure_line_count=(_arg0); end - # source://rspec-core//lib/rspec/core/configuration.rb#78 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:78 def max_displayed_failure_line_count?; end # Returns the configured mock framework adapter module. - # # @return [Symbol] # - # source://rspec-core//lib/rspec/core/configuration.rb#669 + # pkg:gem/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#681 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:681 def mock_framework=(framework); end # Sets the mock framework adapter module. @@ -1792,128 +1576,76 @@ class RSpec::Core::Configuration # mod_config.custom_setting = true # end # - # source://rspec-core//lib/rspec/core/configuration.rb#786 + # pkg:gem/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#2114 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2114 def on_example_group_definition(&block); end - # Returns an array of blocks to call before defining an example group - # # @api private + # Returns an array of blocks to call before defining an example group # - # source://rspec-core//lib/rspec/core/configuration.rb#2120 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2120 def on_example_group_definition_callbacks; end - # Indicates if the `--only-failures` (or `--next-failure`) flag is being used. - # - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:66 def only_failures; end - # Indicates if the `--only-failures` (or `--next-failure`) flag is being used. - # - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:200 def only_failures?; end # @private - # @return [Boolean] # - # source://rspec-core//lib/rspec/core/configuration.rb#203 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:203 def only_failures_but_not_configured?; end - # Sets the default global ordering strategy. By default this can be one - # of `:defined`, `:random`, but is customizable through the - # `register_ordering` API. If order is set to `'rand:'`, - # the seed will also be set. - # - # @see #register_ordering - # - # source://rspec-core//lib/rspec/core/configuration.rb#1673 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1673 def order=(*args, &block); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#522 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:522 def ordering_manager; end - # source://rspec-core//lib/rspec/core/configuration.rb#1673 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1673 def ordering_registry(*args, &block); end - # Determines where RSpec will send its output. - # Default: `$stdout`. - # - # @return [IO, String] - # - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:66 def output_stream; end # Set the output stream for reporter. - # # @attr value [IO, String] IO to write to or filename to write to, defaults to $stdout # - # source://rspec-core//lib/rspec/core/configuration.rb#274 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:274 def output_stream=(value); end - # Load files matching this pattern (default: `'**{,/*/**}/*_spec.rb'`). - # - # @return [String] - # - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:66 def pattern; end # Set pattern to match files to load. - # # @attr value [String] the filename pattern to filter spec files by # - # source://rspec-core//lib/rspec/core/configuration.rb#293 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:293 def pattern=(value); end - # Color to use to print pending examples. Defaults to `:yellow` but can - # be set to one of the following: `[:black, :white, :red, :green, - # :yellow, :blue, :magenta, :cyan]` - # - # @return [Symbol] - # - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:66 def pending_color; end - # Color to use to print pending examples. Defaults to `:yellow` but can - # be set to one of the following: `[:black, :white, :red, :green, - # :yellow, :blue, :magenta, :cyan]` - # - # @return [Symbol] - # - # source://rspec-core//lib/rspec/core/configuration.rb#89 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:89 def pending_color=(_arg0); end - # source://rspec-core//lib/rspec/core/configuration.rb#78 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:473 def pending_failure_output=(mode); end - # source://rspec-core//lib/rspec/core/configuration.rb#78 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:78 def pending_failure_output?; end # Tells RSpec to prepend example groups with `mod`. Methods defined in @@ -1925,44 +1657,34 @@ class RSpec::Core::Configuration # # @example # - # module OverrideMod - # def override_me - # "overridden" - # end - # end + # module OverrideMod + # def override_me + # "overridden" + # end + # end # - # RSpec.configure do |config| - # config.prepend(OverrideMod, :method => :prepend) - # end + # RSpec.configure do |config| + # config.prepend(OverrideMod, :method => :prepend) + # end + # + # describe "overriding example's class", :method => :prepend do + # it "finds the user" do + # self.class.class_eval do + # def override_me + # end + # end + # override_me # => "overridden" + # # ... + # end + # end # - # describe "overriding example's class", :method => :prepend do - # it "finds the user" do - # self.class.class_eval do - # def override_me - # end - # end - # override_me # => "overridden" - # # ... - # end - # end # @see #include # @see #extend # - # source://rspec-core//lib/rspec/core/configuration.rb#1557 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1557 def prepend(mod, *filters); end - # Defines a `after` hook. See {Hooks#after} for full docs. - # - # This method differs from {Hooks#after} in only one way: it supports - # the `:suite` scope. Hooks with the `:suite` scope will be run once after - # the last example of the entire suite is executed. Conditions passed along - # with `:suite` are effectively ignored. - # - # @see #append_after - # @see #before - # @see #prepend_before - # - # source://rspec-core//lib/rspec/core/configuration.rb#2031 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2045 def prepend_after(scope = T.unsafe(nil), *meta, &block); end # Adds `block` to the start of the list of `before` blocks in the same @@ -1980,53 +1702,43 @@ class RSpec::Core::Configuration # @see #after # @see #append_after # - # source://rspec-core//lib/rspec/core/configuration.rb#2006 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2006 def prepend_before(scope = T.unsafe(nil), *meta, &block); end + # @macro add_setting + # Report the times for the slowest examples (default: `false`). + # Use this to specify the number of examples to include in the profile. + # @return [Boolean] + # @api private + # # Defaults `profile_examples` to 10 examples when `@profile_examples` is # `true`. # - # @api private - # - # source://rspec-core//lib/rspec/core/configuration.rb#1073 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1073 def profile_examples; end + # @macro add_setting # Report the times for the slowest examples (default: `false`). # Use this to specify the number of examples to include in the profile. - # # @return [Boolean] + # @api private + # + # Defaults `profile_examples` to 10 examples when `@profile_examples` is + # `true`. # - # source://rspec-core//lib/rspec/core/configuration.rb#322 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:322 def profile_examples=(_arg0); end - # source://rspec-core//lib/rspec/core/configuration.rb#78 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:78 def profile_examples?; end - # Specifies which directories contain the source code for your project. - # When a failure occurs, RSpec looks through the backtrace to find a - # a line of source to print. It first looks for a line coming from - # one of the project source directories so that, for example, it prints - # the expectation or assertion call rather than the source code from - # the expectation or assertion framework. - # - # @return [Array] - # - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:66 def project_source_dirs; end - # Specifies which directories contain the source code for your project. - # When a failure occurs, RSpec looks through the backtrace to find a - # a line of source to print. It first looks for a line coming from - # one of the project source directories so that, for example, it prints - # the expectation or assertion call rather than the source code from - # the expectation or assertion framework. - # - # @return [Array] - # - # source://rspec-core//lib/rspec/core/configuration.rb#89 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:89 def project_source_dirs=(_arg0); end - # source://rspec-core//lib/rspec/core/configuration.rb#78 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:78 def project_source_dirs?; end # Turns deprecation warnings into errors, in order to surface @@ -2037,10 +1749,10 @@ class RSpec::Core::Configuration # @example # # RSpec.configure do |rspec| - # rspec.raise_errors_for_deprecations! + # rspec.raise_errors_for_deprecations! # end # - # source://rspec-core//lib/rspec/core/configuration.rb#1833 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1833 def raise_errors_for_deprecations!; end # Turns RSpec warnings into errors. This can be useful when @@ -2050,279 +1762,144 @@ class RSpec::Core::Configuration # @example # # RSpec.configure do |rspec| - # rspec.raise_on_warning = true + # rspec.raise_on_warning = true # end # - # source://rspec-core//lib/rspec/core/configuration.rb#1781 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1781 def raise_on_warning=(value); end - # Registers a named ordering strategy that can later be - # used to order an example group's subgroups by adding - # `:order => ` metadata to the example group. - # - # @example - # RSpec.configure do |rspec| - # rspec.register_ordering :reverse do |list| - # list.reverse - # end - # end - # - # RSpec.describe 'MyClass', :order => :reverse do - # # ... - # end - # @example - # RSpec.configure do |rspec| - # rspec.register_ordering :global do |examples| - # acceptance, other = examples.partition do |example| - # example.metadata[:type] == :acceptance - # end - # other + acceptance - # end - # end - # - # RSpec.describe 'MyClass', :type => :acceptance do - # # will run last - # end - # - # RSpec.describe 'MyClass' do - # # will run first - # end - # @note Pass the symbol `:global` to set the ordering strategy that - # will be used to order the top-level example groups and any example - # groups that do not have declared `:order` metadata. - # @param name [Symbol] The name of the ordering. - # @yield Block that will order the given examples or example groups - # @yieldparam list [Array, Array] The examples or groups to order - # @yieldreturn [Array, Array] The re-ordered examples or groups - # - # source://rspec-core//lib/rspec/core/configuration.rb#1673 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1673 def register_ordering(*args, &block); end # @return [RSpec::Core::Reporter] the currently configured reporter # - # source://rspec-core//lib/rspec/core/configuration.rb#1056 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1056 def reporter; end - # Indicates files configured to be required. - # - # @return [Array] - # - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:66 def requires; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1597 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1597 def requires=(paths); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#601 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:601 def reset; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#614 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:614 def reset_filters; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#607 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:607 def reset_reporter; end - # Run all examples if none match the configured filters - # (default: `false`). - # - # @deprecated Use {#filter_run_when_matching} instead for the specific - # filters that you want to be ignored if none match. - # - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:66 def run_all_when_everything_filtered; end - # Run all examples if none match the configured filters - # (default: `false`). - # - # @deprecated Use {#filter_run_when_matching} instead for the specific - # filters that you want to be ignored if none match. - # - # source://rspec-core//lib/rspec/core/configuration.rb#89 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:89 def run_all_when_everything_filtered=(_arg0); end - # source://rspec-core//lib/rspec/core/configuration.rb#78 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:78 def run_all_when_everything_filtered?; end - # Seed for random ordering (default: generated randomly each run). - # - # When you run specs with `--order random`, RSpec generates a random seed - # for the randomization and prints it to the `output_stream` (assuming - # you're using RSpec's built-in formatters). If you discover an ordering - # dependency (i.e. examples fail intermittently depending on order), set - # this (on Configuration or on the command line with `--seed`) to run - # using the same seed while you debug the issue. - # - # 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#1673 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1673 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#1673 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1673 def seed=(*args, &block); end - # source://rspec-core//lib/rspec/core/configuration.rb#1673 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1673 def seed_used?(*args, &block); end - # Configures how RSpec treats metadata passed as part of a shared example - # group definition. For example, given this shared example group definition: - # - # RSpec.shared_context "uses DB", :db => true do - # around(:example) do |ex| - # MyORM.transaction(:rollback => true, &ex) - # end - # end - # - # ...there are two ways RSpec can treat the `:db => true` metadata, each - # of which has a corresponding config option: - # - # 1. `:trigger_inclusion`: this shared context will be implicitly included - # in any groups (or examples) that have `:db => true` metadata. - # 2. `:apply_to_host_groups`: the metadata will be inherited by the metadata - # hash of all host groups and examples. - # - # `:trigger_inclusion` is the legacy behavior from before RSpec 3.5 but should - # be considered deprecated. Instead, you can explicitly include a group with - # `include_context`: - # - # RSpec.describe "My model" do - # include_context "uses DB" - # end - # - # ...or you can configure RSpec to include the context based on matching metadata - # using an API that mirrors configured module inclusion: - # - # RSpec.configure do |rspec| - # rspec.include_context "uses DB", :db => true - # end - # - # `:apply_to_host_groups` is a new feature of RSpec 3.5 and will be the only - # supported behavior in RSpec 4. - # - # @overload shared_context_metadata_behavior - # @overload shared_context_metadata_behavior= - # - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:66 def shared_context_metadata_behavior; end # @see shared_context_metadata_behavior # - # source://rspec-core//lib/rspec/core/configuration.rb#434 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:434 def shared_context_metadata_behavior=(value); end - # Don't print filter info i.e. "Run options: include {:focus=>true}" - # (default `false`). - # return [Boolean] - # - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:66 def silence_filter_announcements; end - # Don't print filter info i.e. "Run options: include {:focus=>true}" - # (default `false`). - # return [Boolean] - # - # source://rspec-core//lib/rspec/core/configuration.rb#89 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:89 def silence_filter_announcements=(_arg0); end - # source://rspec-core//lib/rspec/core/configuration.rb#78 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:78 def silence_filter_announcements?; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1138 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1138 def spec_files_with_failures; end - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:66 def start_time; end - # source://rspec-core//lib/rspec/core/configuration.rb#89 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:89 def start_time=(_arg0); end - # source://rspec-core//lib/rspec/core/configuration.rb#78 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:78 def start_time?; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#520 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:520 def static_config_filter_manager; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#520 + # pkg:gem/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 - # to one of the following: `[:black, :white, :red, :green, :yellow, - # :blue, :magenta, :cyan]` - # - # @return [Symbol] - # - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:66 def success_color; end - # Color to use to indicate success. Defaults to `:green` but can be set - # to one of the following: `[:black, :white, :red, :green, :yellow, - # :blue, :magenta, :cyan]` - # - # @return [Symbol] - # - # source://rspec-core//lib/rspec/core/configuration.rb#89 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:89 def success_color=(_arg0); end - # source://rspec-core//lib/rspec/core/configuration.rb#78 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:78 def success_color?; end - # Use threadsafe options where available. - # Currently this will place a mutex around memoized values such as let blocks. - # return [Boolean] - # - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:66 def threadsafe; end - # Use threadsafe options where available. - # Currently this will place a mutex around memoized values such as let blocks. - # return [Boolean] - # - # source://rspec-core//lib/rspec/core/configuration.rb#89 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:89 def threadsafe=(_arg0); end - # source://rspec-core//lib/rspec/core/configuration.rb#78 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:78 def threadsafe?; end # @deprecated This config option was added in RSpec 2 to pave the way # for this being the default behavior in RSpec 3. Now this option is # a no-op. # - # source://rspec-core//lib/rspec/core/configuration.rb#383 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:383 def treat_symbols_as_metadata_keys_with_true_values=(_value); end - # source://rspec-core//lib/rspec/core/configuration.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:66 def tty; end - # source://rspec-core//lib/rspec/core/configuration.rb#89 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:89 def tty=(_arg0); end - # source://rspec-core//lib/rspec/core/configuration.rb#78 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:78 def tty?; end # Set Ruby warnings on or off. # - # source://rspec-core//lib/rspec/core/configuration.rb#1760 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1760 def warnings=(value); end # @return [Boolean] Whether or not ruby warnings are enabled. # - # source://rspec-core//lib/rspec/core/configuration.rb#1765 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1765 def warnings?; end # Defines a callback that runs after the first example with matching @@ -2336,359 +1913,343 @@ class RSpec::Core::Configuration # # @example # RSpec.configure do |config| - # config.when_first_matching_example_defined(:db) do - # # Load a support file that does some heavyweight setup, - # # including bootstrapping the DB, but only if we have loaded - # # any examples tagged with `:db`. - # require 'support/db' - # end + # config.when_first_matching_example_defined(:db) do + # # Load a support file that does some heavyweight setup, + # # including bootstrapping the DB, but only if we have loaded + # # any examples tagged with `:db`. + # require 'support/db' + # end # end # - # source://rspec-core//lib/rspec/core/configuration.rb#1923 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1923 def when_first_matching_example_defined(*filters); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#2091 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2091 def with_suite_hooks; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#518 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:518 def world; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#518 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:518 def world=(_arg0); end private # :nocov: # - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/configuration.rb#2254 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2254 def absolute_pattern?(pattern); end - # source://rspec-core//lib/rspec/core/configuration.rb#2355 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2355 def add_hook_to_existing_matching_groups(meta, scope, &block); end - # @raise [MustBeConfiguredBeforeExampleGroupsError] - # - # source://rspec-core//lib/rspec/core/configuration.rb#2294 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2294 def assert_no_example_groups_defined(config_option); end - # source://rspec-core//lib/rspec/core/configuration.rb#2344 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2344 def clear_values_derived_from_example_status_persistence_file_path; end - # source://rspec-core//lib/rspec/core/configuration.rb#2276 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2276 def command; end - # source://rspec-core//lib/rspec/core/configuration.rb#2320 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2320 def conditionally_disable_expectations_monkey_patching; end - # source://rspec-core//lib/rspec/core/configuration.rb#2311 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2311 def conditionally_disable_mocks_monkey_patching; end - # source://rspec-core//lib/rspec/core/configuration.rb#2349 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2349 def configure_group_with(group, module_list, application_method); end - # source://rspec-core//lib/rspec/core/configuration.rb#2284 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2284 def define_built_in_hooks; end - # source://rspec-core//lib/rspec/core/configuration.rb#2407 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2407 def define_mixed_in_module(mod, filters, mod_list, config_method, &block); end - # source://rspec-core//lib/rspec/core/configuration.rb#2259 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2259 def extract_location(path); end - # source://rspec-core//lib/rspec/core/configuration.rb#2236 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2236 def file_glob_from(path, pattern); end - # source://rspec-core//lib/rspec/core/configuration.rb#2225 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2225 def gather_directories(path); end - # source://rspec-core//lib/rspec/core/configuration.rb#2204 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2204 def get_files_to_run(paths); end - # source://rspec-core//lib/rspec/core/configuration.rb#2231 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2231 def get_matching_files(path, pattern); end - # source://rspec-core//lib/rspec/core/configuration.rb#2171 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2171 def handle_suite_hook(scope, meta); end - # source://rspec-core//lib/rspec/core/configuration.rb#2143 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2143 def load_file_handling_errors(method, file); end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/configuration.rb#2377 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2377 def metadata_applies_to_group?(meta, group); end - # source://rspec-core//lib/rspec/core/configuration.rb#2369 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2369 def on_existing_matching_groups(meta); end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/configuration.rb#2307 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2307 def output_to_tty?(output = T.unsafe(nil)); end - # source://rspec-core//lib/rspec/core/configuration.rb#2303 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2303 def output_wrapper; end - # source://rspec-core//lib/rspec/core/configuration.rb#2216 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2216 def paths_to_check(paths); end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/configuration.rb#2221 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2221 def pattern_might_load_specs_from_vendored_dirs?; end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/configuration.rb#2330 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2330 def rspec_expectations_loaded?; end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/configuration.rb#2326 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2326 def rspec_mocks_loaded?; end - # source://rspec-core//lib/rspec/core/configuration.rb#2186 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2186 def run_suite_hooks(hook_description, hooks); end - # source://rspec-core//lib/rspec/core/configuration.rb#2392 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2392 def safe_extend(mod, host); end + # for 1.8.7 # :nocov: # - # source://rspec-core//lib/rspec/core/configuration.rb#2388 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2388 def safe_include(mod, host); end - # source://rspec-core//lib/rspec/core/configuration.rb#2382 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2382 def safe_prepend(mod, host); end - # source://rspec-core//lib/rspec/core/configuration.rb#2334 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2334 def update_pattern_attr(name, value); end - # source://rspec-core//lib/rspec/core/configuration.rb#2280 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:2280 def value_for(key); end class << self - # As `add_setting` but only add the reader. - # # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#100 + # As `add_setting` but only add the reader. + # + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:100 def add_read_only_setting(name, opts = T.unsafe(nil)); end + # @private + # # Invoked by the `add_setting` instance method. Use that method on a # `Configuration` instance rather than this class method. # - # @private - # - # source://rspec-core//lib/rspec/core/configuration.rb#87 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:87 def add_setting(name, opts = T.unsafe(nil)); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#70 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:70 def define_alias(name, alias_name); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#77 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:77 def define_predicate(name); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#60 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:60 def define_reader(name); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1671 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1671 def delegate_to_ordering_manager(*methods); end end end # @private # -# source://rspec-core//lib/rspec/core/configuration.rb#1651 +# pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1651 RSpec::Core::Configuration::DEFAULT_FORMATTER = T.let(T.unsafe(nil), Proc) +# @private +# # This buffer is used to capture all messages sent to the reporter during # reporter initialization. It can then replay those messages after the # formatter is correctly initialized. Otherwise, deprecation warnings # during formatter initialization can cause an infinite loop. # -# @private -# -# source://rspec-core//lib/rspec/core/configuration.rb#1039 +# pkg:gem/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#1040 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1040 def initialize; end - # source://rspec-core//lib/rspec/core/configuration.rb#1044 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1044 def deprecation(*args); end - # source://rspec-core//lib/rspec/core/configuration.rb#1048 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1048 def play_onto(reporter); end end # @private # -# source://rspec-core//lib/rspec/core/configuration.rb#1821 +# pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1821 module RSpec::Core::Configuration::ExposeCurrentExample; end # @private # -# source://rspec-core//lib/rspec/core/configuration.rb#1126 +# pkg:gem/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#749 +# pkg:gem/rspec-core#lib/rspec/core/configuration.rb:749 RSpec::Core::Configuration::MOCKING_ADAPTERS = T.let(T.unsafe(nil), Hash) # @private # -# source://rspec-core//lib/rspec/core/configuration.rb#57 +# pkg:gem/rspec-core#lib/rspec/core/configuration.rb:57 class RSpec::Core::Configuration::MustBeConfiguredBeforeExampleGroupsError < ::StandardError; end # @private # -# source://rspec-core//lib/rspec/core/configuration.rb#1129 +# pkg:gem/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#1132 +# pkg:gem/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#1770 +# pkg:gem/rspec-core#lib/rspec/core/configuration.rb:1770 RSpec::Core::Configuration::RAISE_ERROR_WARNING_NOTIFIER = T.let(T.unsafe(nil), Proc) # Module that holds `attr_reader` declarations. It's in a separate # module to allow us to override those methods and use `super`. -# # @private # -# source://rspec-core//lib/rspec/core/configuration.rb#53 +# pkg:gem/rspec-core#lib/rspec/core/configuration.rb:53 module RSpec::Core::Configuration::Readers - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def default_color; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def default_path; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def deprecation_stream; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def detail_color; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def drb; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def drb_port; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def dry_run; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def error_exit_code; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def error_stream; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def example_status_persistence_file_path; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def exclude_pattern; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def fail_fast; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def fail_if_no_examples; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def failure_color; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def failure_exit_code; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def fixed_color; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def full_cause_backtrace; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def libs; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def max_displayed_failure_line_count; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def only_failures; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def output_stream; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def pattern; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def pending_color; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def pending_failure_output; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def project_source_dirs; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def requires; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def run_all_when_everything_filtered; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def shared_context_metadata_behavior; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def silence_filter_announcements; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def start_time; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def success_color; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def threadsafe; end - # source://rspec-core//lib/rspec/core/configuration.rb#63 + # pkg:gem/rspec-core#lib/rspec/core/configuration.rb:63 def tty; end end # @private # -# source://rspec-core//lib/rspec/core/configuration.rb#1123 +# pkg:gem/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#1135 +# pkg:gem/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, @@ -2696,17 +2257,16 @@ RSpec::Core::Configuration::VALID_STATUSES = T.let(T.unsafe(nil), Array) # `$XDG_CONFIG_HOME/rspec/options`, `.rspec-local` or a custom options # file. # -# source://rspec-core//lib/rspec/core/configuration_options.rb#10 +# pkg:gem/rspec-core#lib/rspec/core/configuration_options.rb:10 class RSpec::Core::ConfigurationOptions # @param args [Array] command line arguments - # @return [ConfigurationOptions] a new instance of ConfigurationOptions # - # source://rspec-core//lib/rspec/core/configuration_options.rb#12 + # pkg:gem/rspec-core#lib/rspec/core/configuration_options.rb:12 def initialize(args); end # @return [Array] the original command-line arguments # - # source://rspec-core//lib/rspec/core/configuration_options.rb#40 + # pkg:gem/rspec-core#lib/rspec/core/configuration_options.rb:40 def args; end # Updates the provided {Configuration} instance based on the provided @@ -2714,110 +2274,107 @@ class RSpec::Core::ConfigurationOptions # # @param config [Configuration] the configuration instance to update # - # source://rspec-core//lib/rspec/core/configuration_options.rb#21 + # pkg:gem/rspec-core#lib/rspec/core/configuration_options.rb:21 def configure(config); end - # Updates the provided {FilterManager} based on the filter options. - # # @api private + # Updates the provided {FilterManager} based on the filter options. # @param filter_manager [FilterManager] instance to update # - # source://rspec-core//lib/rspec/core/configuration_options.rb#30 + # pkg:gem/rspec-core#lib/rspec/core/configuration_options.rb:30 def configure_filter_manager(filter_manager); end # @return [Hash] the final merged options, drawn from all external sources # - # source://rspec-core//lib/rspec/core/configuration_options.rb#37 + # pkg:gem/rspec-core#lib/rspec/core/configuration_options.rb:37 def options; end private - # source://rspec-core//lib/rspec/core/configuration_options.rb#173 + # pkg:gem/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#142 + # pkg:gem/rspec-core#lib/rspec/core/configuration_options.rb:142 def command_line_options; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#146 + # pkg:gem/rspec-core#lib/rspec/core/configuration_options.rb:146 def custom_options; end # :nocov: # - # source://rspec-core//lib/rspec/core/configuration_options.rb#190 + # pkg:gem/rspec-core#lib/rspec/core/configuration_options.rb:190 def custom_options_file; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#133 + # pkg:gem/rspec-core#lib/rspec/core/configuration_options.rb:133 def env_options; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#125 + # pkg:gem/rspec-core#lib/rspec/core/configuration_options.rb:125 def file_options; end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/configuration_options.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/configuration_options.rb:66 def force?(key); end - # source://rspec-core//lib/rspec/core/configuration_options.rb#158 + # pkg:gem/rspec-core#lib/rspec/core/configuration_options.rb:158 def global_options; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#202 + # pkg:gem/rspec-core#lib/rspec/core/configuration_options.rb:202 def global_options_file; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#213 + # pkg:gem/rspec-core#lib/rspec/core/configuration_options.rb:213 def home_options_file_path; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#121 + # pkg:gem/rspec-core#lib/rspec/core/configuration_options.rb:121 def load_formatters_into(config); end - # source://rspec-core//lib/rspec/core/configuration_options.rb#150 + # pkg:gem/rspec-core#lib/rspec/core/configuration_options.rb:150 def local_options; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#198 + # pkg:gem/rspec-core#lib/rspec/core/configuration_options.rb:198 def local_options_file; end # :nocov: # - # source://rspec-core//lib/rspec/core/configuration_options.rb#181 + # pkg:gem/rspec-core#lib/rspec/core/configuration_options.rb:181 def options_file_as_erb_string(path); end - # source://rspec-core//lib/rspec/core/configuration_options.rb#162 + # pkg:gem/rspec-core#lib/rspec/core/configuration_options.rb:162 def options_from(path); end - # source://rspec-core//lib/rspec/core/configuration_options.rb#70 + # pkg:gem/rspec-core#lib/rspec/core/configuration_options.rb:70 def order(keys); end - # source://rspec-core//lib/rspec/core/configuration_options.rb#44 + # pkg:gem/rspec-core#lib/rspec/core/configuration_options.rb:44 def organize_options; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#167 + # pkg:gem/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#113 + # pkg:gem/rspec-core#lib/rspec/core/configuration_options.rb:113 def process_options_into(config); end - # source://rspec-core//lib/rspec/core/configuration_options.rb#154 + # pkg:gem/rspec-core#lib/rspec/core/configuration_options.rb:154 def project_options; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#194 + # pkg:gem/rspec-core#lib/rspec/core/configuration_options.rb:194 def project_options_file; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#229 + # pkg:gem/rspec-core#lib/rspec/core/configuration_options.rb:229 def resolve_xdg_config_home; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#206 + # pkg:gem/rspec-core#lib/rspec/core/configuration_options.rb:206 def xdg_options_file_if_exists; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#222 + # pkg:gem/rspec-core#lib/rspec/core/configuration_options.rb:222 def xdg_options_file_path; end end -# source://rspec-core//lib/rspec/core/configuration_options.rb#77 +# pkg:gem/rspec-core#lib/rspec/core/configuration_options.rb:77 RSpec::Core::ConfigurationOptions::OPTIONS_ORDER = T.let(T.unsafe(nil), Array) -# source://rspec-core//lib/rspec/core/configuration_options.rb#59 +# pkg:gem/rspec-core#lib/rspec/core/configuration_options.rb:59 RSpec::Core::ConfigurationOptions::UNFORCED_OPTIONS = T.let(T.unsafe(nil), RSpec::Core::Set) -# source://rspec-core//lib/rspec/core/configuration_options.rb#64 +# pkg:gem/rspec-core#lib/rspec/core/configuration_options.rb:64 RSpec::Core::ConfigurationOptions::UNPROCESSABLE_OPTIONS = T.let(T.unsafe(nil), RSpec::Core::Set) # DSL defines methods to group examples, most notably `describe`, @@ -2843,99 +2400,93 @@ RSpec::Core::ConfigurationOptions::UNPROCESSABLE_OPTIONS = T.let(T.unsafe(nil), # @see ExampleGroup # @see ExampleGroup.example_group # -# source://rspec-core//lib/rspec/core/dsl.rb#25 +# pkg:gem/rspec-core#lib/rspec/core/dsl.rb:25 module RSpec::Core::DSL class << self # @private # - # source://rspec-core//lib/rspec/core/dsl.rb#89 + # pkg:gem/rspec-core#lib/rspec/core/dsl.rb:89 def change_global_dsl(&changes); end # @private # - # source://rspec-core//lib/rspec/core/dsl.rb#27 + # pkg:gem/rspec-core#lib/rspec/core/dsl.rb:27 def example_group_aliases; end # @private # - # source://rspec-core//lib/rspec/core/dsl.rb#37 + # pkg:gem/rspec-core#lib/rspec/core/dsl.rb:37 def expose_example_group_alias(name); end # @private # - # source://rspec-core//lib/rspec/core/dsl.rb#81 + # pkg:gem/rspec-core#lib/rspec/core/dsl.rb:81 def expose_example_group_alias_globally(method_name); end # Adds the describe method to Module and the top level binding. - # # @api private # - # source://rspec-core//lib/rspec/core/dsl.rb#58 + # pkg:gem/rspec-core#lib/rspec/core/dsl.rb:58 def expose_globally!; end # @private - # @return [Boolean] # - # source://rspec-core//lib/rspec/core/dsl.rb#32 + # pkg:gem/rspec-core#lib/rspec/core/dsl.rb:32 def exposed_globally?; end # Removes the describe method from Module and the top level binding. - # # @api private # - # source://rspec-core//lib/rspec/core/dsl.rb#70 + # pkg:gem/rspec-core#lib/rspec/core/dsl.rb:70 def remove_globally!; end # @private # - # source://rspec-core//lib/rspec/core/dsl.rb#53 + # pkg:gem/rspec-core#lib/rspec/core/dsl.rb:53 def top_level; end # @private # - # source://rspec-core//lib/rspec/core/dsl.rb#53 + # pkg:gem/rspec-core#lib/rspec/core/dsl.rb:53 def top_level=(_arg0); end end end # Deprecation Error. # -# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#221 +# pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:221 class RSpec::Core::DeprecationError < ::StandardError; end -# Wrapper around Ruby's `DidYouMean::SpellChecker` when available to provide file name suggestions. -# # @private +# Wrapper around Ruby's `DidYouMean::SpellChecker` when available to provide file name suggestions. # -# source://rspec-core//lib/rspec/core/did_you_mean.rb#5 +# pkg:gem/rspec-core#lib/rspec/core/did_you_mean.rb:5 class RSpec::Core::DidYouMean - # @return [DidYouMean] a new instance of DidYouMean - # - # source://rspec-core//lib/rspec/core/did_you_mean.rb#8 + # pkg:gem/rspec-core#lib/rspec/core/did_you_mean.rb:8 def initialize(relative_file_name); end + # provide probable suggestions + # :nocov: - not installed on CI # return a hint if API for ::DidYouMean::SpellChecker not supported # :nocov: # - # source://rspec-core//lib/rspec/core/did_you_mean.rb#15 + # pkg:gem/rspec-core#lib/rspec/core/did_you_mean.rb:15 def call; end - # Returns the value of attribute relative_file_name. - # - # source://rspec-core//lib/rspec/core/did_you_mean.rb#6 + # pkg:gem/rspec-core#lib/rspec/core/did_you_mean.rb:6 def relative_file_name; end private # :nocov: # - # source://rspec-core//lib/rspec/core/did_you_mean.rb#35 + # pkg:gem/rspec-core#lib/rspec/core/did_you_mean.rb:35 def formats(probables); end - # source://rspec-core//lib/rspec/core/did_you_mean.rb#45 + # pkg:gem/rspec-core#lib/rspec/core/did_you_mean.rb:45 def red_font(mytext); end - # source://rspec-core//lib/rspec/core/did_you_mean.rb#40 + # pkg:gem/rspec-core#lib/rspec/core/did_you_mean.rb:40 def top_and_tail(rspec_format); end end @@ -2955,36 +2506,35 @@ end # # @example # -# RSpec.configure do |config| -# config.before do |example| -# log example.description -# end +# RSpec.configure do |config| +# config.before do |example| +# log example.description +# end # -# config.after do |example| -# log example.description -# end +# config.after do |example| +# log example.description +# end # -# config.around do |example| -# log example.description -# example.run -# end -# end +# config.around do |example| +# log example.description +# example.run +# end +# end # -# shared_examples "auditable" do -# it "does something" do -# log "#{example.full_description}: #{auditable.inspect}" -# auditable.should do_something -# end -# end +# shared_examples "auditable" do +# it "does something" do +# log "#{example.full_description}: #{auditable.inspect}" +# auditable.should do_something +# end +# end +# +# @see ExampleGroup # @note Example blocks are evaluated in the context of an instance # of an `ExampleGroup`, not in the context of an instance of `Example`. -# @see ExampleGroup # -# source://rspec-core//lib/rspec/core/example.rb#44 +# pkg:gem/rspec-core#lib/rspec/core/example.rb:44 class RSpec::Core::Example # Creates a new instance of Example. - # - # @api private # @param example_group_class [Class] the subclass of ExampleGroup in which # this Example is declared # @param description [String] the String passed to the `it` method (or @@ -2993,21 +2543,21 @@ class RSpec::Core::Example # metadata # @param example_block [Proc] the block of code that represents the # example - # @return [Example] a new instance of Example + # @api private # - # source://rspec-core//lib/rspec/core/example.rb#186 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:186 def initialize(example_group_class, description, user_metadata, example_block = T.unsafe(nil)); end # @attr # @private # - # source://rspec-core//lib/rspec/core/example.rb#174 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:174 def clock; end # @attr # @private # - # source://rspec-core//lib/rspec/core/example.rb#174 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:174 def clock=(_arg0); end # Returns the string submitted to `example` or its aliases (e.g. @@ -3016,23 +2566,23 @@ class RSpec::Core::Example # by the matcher if there is one, otherwise returns a message including # the location of the example. # - # source://rspec-core//lib/rspec/core/example.rb#76 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:76 def description; end + # @private + # # The exception that will be displayed to the user -- either the failure of # the example or the `pending_exception` if the example is pending. # - # @private - # - # source://rspec-core//lib/rspec/core/example.rb#388 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:388 def display_exception; end + # @private + # # Assigns the exception that will be displayed to the user -- either the failure of # the example or the `pending_exception` if the example is pending. # - # @private - # - # source://rspec-core//lib/rspec/core/example.rb#396 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:396 def display_exception=(ex); end # Duplicates the example and overrides metadata with the provided @@ -3041,111 +2591,94 @@ class RSpec::Core::Example # @param metadata_overrides [Hash] the hash to override the example metadata # @return [Example] a duplicate of the example with modified metadata # - # source://rspec-core//lib/rspec/core/example.rb#132 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:132 def duplicate_with(metadata_overrides = T.unsafe(nil)); end # Returns the example group class that provides the context for running # this example. # - # source://rspec-core//lib/rspec/core/example.rb#230 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:230 def example_group; end - # Returns the example_group_instance that provides the context for - # running this example. - # # @attr_reader # @private # - # source://rspec-core//lib/rspec/core/example.rb#170 + # Returns the example_group_instance that provides the context for + # running this example. + # + # pkg:gem/rspec-core#lib/rspec/core/example.rb:170 def example_group_instance; end + # @attr_reader + # # Returns the first exception raised in the context of running this # example (nil if no exception is raised). # - # @attr_reader - # - # source://rspec-core//lib/rspec/core/example.rb#158 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:158 def exception; end - # @return [ExecutionResult] represents the result of running this example. - # - # source://rspec-core//lib/rspec/core/example.rb#49 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:49 def execution_result; end + # @private + # # Used internally to set an exception and fail without actually executing # the example when an exception is raised in before(:context). # - # @private - # - # source://rspec-core//lib/rspec/core/example.rb#439 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:439 def fail_with_exception(reporter, exception); end - # @return [String] the relative path to the file where this example was - # defined. - # - # source://rspec-core//lib/rspec/core/example.rb#49 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:49 def file_path; end - # @return [String] the full description (including the docstrings of - # all parent example groups). - # - # source://rspec-core//lib/rspec/core/example.rb#49 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:49 def full_description; end # @return [String] the unique id of this example. Pass # this at the command line to re-run this exact example. # - # source://rspec-core//lib/rspec/core/example.rb#117 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:117 def id; end # Provide a human-readable representation of this class # - # source://rspec-core//lib/rspec/core/example.rb#220 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:220 def inspect; end # Returns a description of the example that always includes the location. # - # source://rspec-core//lib/rspec/core/example.rb#87 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:87 def inspect_output; end # @private # - # source://rspec-core//lib/rspec/core/example.rb#456 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:456 def instance_exec(*args, &block); end - # @return [String] the exact source location of this example in a form - # like `./path/to/spec.rb:17` - # - # source://rspec-core//lib/rspec/core/example.rb#49 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:49 def location; end # Returns the location-based argument that can be passed to the `rspec` command to rerun this example. # - # source://rspec-core//lib/rspec/core/example.rb#96 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:96 def location_rerun_argument; end - # Returns the metadata object associated with this example. - # # @attr_reader # - # source://rspec-core//lib/rspec/core/example.rb#163 + # Returns the metadata object associated with this example. + # + # pkg:gem/rspec-core#lib/rspec/core/example.rb:163 def metadata; end - # @return [Boolean] flag that indicates that the example is not expected - # to pass. It will be run and will either have a pending result (if a - # failure occurs) or a failed result (if no failure occurs). - # - # source://rspec-core//lib/rspec/core/example.rb#49 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:49 def pending; end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/example.rb#234 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:234 def pending?; end # @return [RSpec::Core::Reporter] the current reporter for the example # - # source://rspec-core//lib/rspec/core/example.rb#226 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:226 def reporter; end # Returns the location-based argument that can be passed to the `rspec` command to rerun this example. @@ -3154,138 +2687,133 @@ class RSpec::Core::Example # @note If there are multiple examples identified by this location, they will use {#id} # to rerun instead, but this method will still return the location (that's why it is deprecated!). # - # source://rspec-core//lib/rspec/core/example.rb#111 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:111 def rerun_argument; end + # @api private # instance_execs the block passed to the constructor in the context of # the instance of {ExampleGroup}. - # - # @api private # @param example_group_instance the instance of an ExampleGroup subclass # - # source://rspec-core//lib/rspec/core/example.rb#246 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:246 def run(example_group_instance, reporter); end - # Used to set the exception when `aggregate_failures` fails. - # # @private # - # source://rspec-core//lib/rspec/core/example.rb#425 + # Used to set the exception when `aggregate_failures` fails. + # + # pkg:gem/rspec-core#lib/rspec/core/example.rb:425 def set_aggregate_failures_exception(exception); end + # @private + # # Used internally to set an exception in an after hook, which # captures the exception but doesn't raise it. # - # @private - # - # source://rspec-core//lib/rspec/core/example.rb#412 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:412 def set_exception(exception); end - # @return [Boolean] flag that will cause the example to not run. - # The {ExecutionResult} status will be `:pending`. - # - # source://rspec-core//lib/rspec/core/example.rb#49 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:49 def skip; end + # @private + # # Used internally to skip without actually executing the example when # skip is used in before(:context). # - # @private - # - # source://rspec-core//lib/rspec/core/example.rb#449 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:449 def skip_with_exception(reporter, exception); end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/example.rb#238 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:238 def skipped?; end - # Provide a human-readable representation of this class - # - # source://rspec-core//lib/rspec/core/example.rb#220 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:223 def to_s; end # @private # - # source://rspec-core//lib/rspec/core/example.rb#148 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:148 def update_inherited_metadata(updates); end private - # source://rspec-core//lib/rspec/core/example.rb#534 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:534 def assign_generated_description; end - # source://rspec-core//lib/rspec/core/example.rb#478 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:478 def finish(reporter); end - # source://rspec-core//lib/rspec/core/example.rb#543 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:543 def generate_description; end - # source://rspec-core//lib/rspec/core/example.rb#462 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:462 def hooks; end - # source://rspec-core//lib/rspec/core/example.rb#550 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:550 def location_description; end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/example.rb#530 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:530 def mocks_need_verification?; end - # source://rspec-core//lib/rspec/core/example.rb#498 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:498 def record_finished(status, reporter); end - # source://rspec-core//lib/rspec/core/example.rb#516 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:516 def run_after_example; end - # source://rspec-core//lib/rspec/core/example.rb#503 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:503 def run_before_example; end - # source://rspec-core//lib/rspec/core/example.rb#473 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:473 def start(reporter); end - # source://rspec-core//lib/rspec/core/example.rb#524 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:524 def verify_mocks; end - # source://rspec-core//lib/rspec/core/example.rb#508 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:508 def with_around_and_singleton_context_hooks; end - # source://rspec-core//lib/rspec/core/example.rb#466 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:466 def with_around_example_hooks; end class << self - # Used to define methods that delegate to this example's metadata. - # # @private # - # source://rspec-core//lib/rspec/core/example.rb#48 + # Used to define methods that delegate to this example's metadata. + # + # pkg:gem/rspec-core#lib/rspec/core/example.rb:48 def delegate_to_metadata(key); end # @private # - # source://rspec-core//lib/rspec/core/example.rb#122 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:122 def parse_id(id); end end end +# :nocov: +# For some reason, rescuing `Support::AllExceptionsExceptOnesWeMustNotRescue` +# in place of `Exception` above can cause the exit status to be the wrong +# thing. I have no idea why. See: +# https://github.com/rspec/rspec-core/pull/2063#discussion_r38284978 +# @private # @private # -# source://rspec-core//lib/rspec/core/example.rb#310 +# pkg:gem/rspec-core#lib/rspec/core/example.rb:310 RSpec::Core::Example::AllExceptionsExcludingDangerousOnesOnRubiesThatAllowIt = RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue # Represents the result of executing an example. # Behaves like a hash for backwards compatibility. # -# source://rspec-core//lib/rspec/core/example.rb#556 +# pkg:gem/rspec-core#lib/rspec/core/example.rb:556 class RSpec::Core::Example::ExecutionResult include ::RSpec::Core::HashImitatable extend ::RSpec::Core::HashImitatable::ClassMethods - # Populates finished_at and run_time if it has not yet been set - # # @api private + # Populates finished_at and run_time if it has not yet been set # - # source://rspec-core//lib/rspec/core/example.rb#610 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:610 def ensure_timing_set(clock); end # @return [Boolean] Indicates if the example was completely skipped @@ -3294,27 +2822,27 @@ class RSpec::Core::Example::ExecutionResult # that were marked as `:pending`, which causes them to be run, and produces a # `:failed` result if the example passes. # - # source://rspec-core//lib/rspec/core/example.rb#597 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:597 def example_skipped?; end # @return [Exception, nil] The failure, if there was one. # - # source://rspec-core//lib/rspec/core/metadata.rb#442 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:563 def exception; end # @return [Exception, nil] The failure, if there was one. # - # source://rspec-core//lib/rspec/core/metadata.rb#442 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:563 def exception=(_arg0); end # @return [Time] When the example finished. # - # source://rspec-core//lib/rspec/core/metadata.rb#442 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:569 def finished_at; end # @return [Time] When the example finished. # - # source://rspec-core//lib/rspec/core/metadata.rb#442 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:569 def finished_at=(_arg0); end # @return [Exception, nil] The exception triggered while @@ -3322,7 +2850,7 @@ class RSpec::Core::Example::ExecutionResult # it would no longer get a status of `:pending` unless it was # tagged with `:skip`. # - # source://rspec-core//lib/rspec/core/metadata.rb#442 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:582 def pending_exception; end # @return [Exception, nil] The exception triggered while @@ -3330,93 +2858,90 @@ class RSpec::Core::Example::ExecutionResult # it would no longer get a status of `:pending` unless it was # tagged with `:skip`. # - # source://rspec-core//lib/rspec/core/metadata.rb#442 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:582 def pending_exception=(_arg0); end # @return [Boolean] For examples tagged with `:pending`, # this indicates whether or not it now passes. # - # source://rspec-core//lib/rspec/core/metadata.rb#442 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:586 def pending_fixed; end # @return [Boolean] For examples tagged with `:pending`, # this indicates whether or not it now passes. # - # source://rspec-core//lib/rspec/core/metadata.rb#442 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:586 def pending_fixed=(_arg0); end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/example.rb#588 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:588 def pending_fixed?; end # @return [String, nil] The reason the example was pending, # or nil if the example was not pending. # - # source://rspec-core//lib/rspec/core/metadata.rb#442 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:576 def pending_message; end # @return [String, nil] The reason the example was pending, # or nil if the example was not pending. # - # source://rspec-core//lib/rspec/core/metadata.rb#442 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:576 def pending_message=(_arg0); end - # Records the finished status of the example. - # # @api private + # Records the finished status of the example. # - # source://rspec-core//lib/rspec/core/example.rb#603 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:603 def record_finished(status, finished_at); end # @return [Float] How long the example took in seconds. # - # source://rspec-core//lib/rspec/core/metadata.rb#442 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:572 def run_time; end # @return [Float] How long the example took in seconds. # - # source://rspec-core//lib/rspec/core/metadata.rb#442 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:572 def run_time=(_arg0); end # @return [Time] When the example started. # - # source://rspec-core//lib/rspec/core/metadata.rb#442 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:566 def started_at; end # @return [Time] When the example started. # - # source://rspec-core//lib/rspec/core/metadata.rb#442 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:566 def started_at=(_arg0); end # @return [Symbol] `:passed`, `:failed` or `:pending`. # - # source://rspec-core//lib/rspec/core/metadata.rb#442 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:560 def status; end # @return [Symbol] `:passed`, `:failed` or `:pending`. # - # source://rspec-core//lib/rspec/core/metadata.rb#442 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:560 def status=(_arg0); end private - # source://rspec-core//lib/rspec/core/example.rb#616 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:616 def calculate_run_time(finished_at); end - # source://rspec-core//lib/rspec/core/example.rb#634 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:634 def get_value(name); end # For backwards compatibility we present `status` as a string # when presenting the legacy hash interface. # - # source://rspec-core//lib/rspec/core/example.rb#623 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:623 def hash_for_delegation; end - # source://rspec-core//lib/rspec/core/example.rb#642 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:642 def issue_deprecation(_method_name, *_args); end - # source://rspec-core//lib/rspec/core/example.rb#629 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:629 def set_value(name, value); end end @@ -3427,177 +2952,172 @@ end # # @example # -# RSpec.configure do |c| -# c.around do |ex| # Procsy which wraps the example -# if ex.metadata[:key] == :some_value && some_global_condition -# raise "some message" -# end -# ex.run # run delegates to ex.call. -# end -# end +# RSpec.configure do |c| +# c.around do |ex| # Procsy which wraps the example +# if ex.metadata[:key] == :some_value && some_global_condition +# raise "some message" +# end +# ex.run # run delegates to ex.call. +# end +# end +# # @note This class also exposes the instance methods of {Example}, # proxying them through to the wrapped {Example} instance. # -# source://rspec-core//lib/rspec/core/example.rb#331 +# pkg:gem/rspec-core#lib/rspec/core/example.rb:331 class RSpec::Core::Example::Procsy - # @return [Procsy] a new instance of Procsy - # - # source://rspec-core//lib/rspec/core/example.rb#362 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:362 def initialize(example, &block); end - # source://rspec-core//lib/rspec/core/example.rb#346 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:346 def <<(*a, &b); end - # source://rspec-core//lib/rspec/core/example.rb#346 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:346 def ==(*a, &b); end - # source://rspec-core//lib/rspec/core/example.rb#346 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:346 def ===(*a, &b); end - # source://rspec-core//lib/rspec/core/example.rb#346 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:346 def >>(*a, &b); end - # source://rspec-core//lib/rspec/core/example.rb#346 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:346 def [](*a, &b); end - # source://rspec-core//lib/rspec/core/example.rb#346 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:346 def arity(*a, &b); end - # source://rspec-core//lib/rspec/core/example.rb#346 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:346 def binding(*a, &b); end # Calls the proc and notes that the example has been executed. # - # source://rspec-core//lib/rspec/core/example.rb#350 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:350 def call(*args, &block); end - # source://rspec-core//lib/rspec/core/example.rb#339 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:339 def clock(*a, &b); end - # source://rspec-core//lib/rspec/core/example.rb#339 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:339 def clock=(*a, &b); end - # source://rspec-core//lib/rspec/core/example.rb#346 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:346 def clone(*a, &b); end - # source://rspec-core//lib/rspec/core/example.rb#346 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:346 def curry(*a, &b); end - # source://rspec-core//lib/rspec/core/example.rb#339 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:339 def description(*a, &b); end - # source://rspec-core//lib/rspec/core/example.rb#346 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:346 def dup(*a, &b); end - # source://rspec-core//lib/rspec/core/example.rb#339 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:339 def duplicate_with(*a, &b); end - # source://rspec-core//lib/rspec/core/example.rb#346 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:346 def eql?(*a, &b); end # The {Example} instance. # - # source://rspec-core//lib/rspec/core/example.rb#333 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:333 def example; end - # source://rspec-core//lib/rspec/core/example.rb#339 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:339 def example_group(*a, &b); end - # source://rspec-core//lib/rspec/core/example.rb#339 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:339 def example_group_instance(*a, &b); end - # source://rspec-core//lib/rspec/core/example.rb#339 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:339 def exception(*a, &b); end # Indicates whether or not the around hook has executed the example. # - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/example.rb#374 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:374 def executed?; end - # source://rspec-core//lib/rspec/core/example.rb#339 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:339 def execution_result(*a, &b); end - # source://rspec-core//lib/rspec/core/example.rb#339 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:339 def file_path(*a, &b); end - # source://rspec-core//lib/rspec/core/example.rb#339 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:339 def full_description(*a, &b); end - # source://rspec-core//lib/rspec/core/example.rb#346 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:346 def hash(*a, &b); end - # source://rspec-core//lib/rspec/core/example.rb#339 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:339 def id(*a, &b); end # @private # - # source://rspec-core//lib/rspec/core/example.rb#379 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:379 def inspect; end - # source://rspec-core//lib/rspec/core/example.rb#339 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:339 def inspect_output(*a, &b); end - # source://rspec-core//lib/rspec/core/example.rb#346 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:346 def lambda?(*a, &b); end - # source://rspec-core//lib/rspec/core/example.rb#339 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:339 def location(*a, &b); end - # source://rspec-core//lib/rspec/core/example.rb#339 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:339 def location_rerun_argument(*a, &b); end - # source://rspec-core//lib/rspec/core/example.rb#339 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:339 def metadata(*a, &b); end - # source://rspec-core//lib/rspec/core/example.rb#346 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:346 def parameters(*a, &b); end - # source://rspec-core//lib/rspec/core/example.rb#339 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:339 def pending(*a, &b); end - # source://rspec-core//lib/rspec/core/example.rb#339 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:339 def pending?(*a, &b); end - # source://rspec-core//lib/rspec/core/example.rb#339 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:339 def reporter(*a, &b); end - # source://rspec-core//lib/rspec/core/example.rb#339 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:339 def rerun_argument(*a, &b); end - # source://rspec-core//lib/rspec/core/example.rb#346 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:346 def ruby2_keywords(*a, &b); end - # Calls the proc and notes that the example has been executed. - # - # source://rspec-core//lib/rspec/core/example.rb#350 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:354 def run(*args, &block); end - # source://rspec-core//lib/rspec/core/example.rb#339 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:339 def skip(*a, &b); end - # source://rspec-core//lib/rspec/core/example.rb#339 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:339 def skipped?(*a, &b); end - # source://rspec-core//lib/rspec/core/example.rb#346 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:346 def source_location(*a, &b); end # Provides a wrapped proc that will update our `executed?` state when # executed. # - # source://rspec-core//lib/rspec/core/example.rb#358 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:358 def to_proc; end - # source://rspec-core//lib/rspec/core/example.rb#339 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:339 def update_inherited_metadata(*a, &b); end # @private # - # source://rspec-core//lib/rspec/core/example.rb#369 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:369 def wrap(&block); end - # source://rspec-core//lib/rspec/core/example.rb#346 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:346 def yield(*a, &b); end end @@ -3624,7 +3144,7 @@ end # {SharedExampleGroup}. There are additional instance methods available to # your examples defined in {MemoizedHelpers} and {Pending}. # -# source://rspec-core//lib/rspec/core/example_group.rb#29 +# pkg:gem/rspec-core#lib/rspec/core/example_group.rb:29 class RSpec::Core::ExampleGroup include ::RSpec::Core::MemoizedHelpers include ::RSpec::Core::Pending @@ -3632,301 +3152,269 @@ class RSpec::Core::ExampleGroup extend ::RSpec::Core::MemoizedHelpers::ClassMethods extend ::RSpec::Core::SharedExampleGroup - # source://rspec-core//lib/rspec/core/example_group.rb#707 + # @private + # + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:714 def initialize(inspect_output = T.unsafe(nil)); end # Returns the class or module passed to the `describe` method (or alias). # Returns nil if the subject is not a class or module. - # # @example - # RSpec.describe Thing do - # it "does something" do - # described_class == Thing - # end - # end + # RSpec.describe Thing do + # it "does something" do + # described_class == Thing + # end + # end # - # source://rspec-core//lib/rspec/core/example_group.rb#99 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:99 def described_class; end - # source://rspec-core//lib/rspec/core/example_group.rb#713 + # @private + # + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:720 def inspect; end private - # source://rspec-core//lib/rspec/core/example_group.rb#758 - def method_missing(name, *args, **_arg2); end + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:765 + def method_missing(name, *args, **); end class << self # Adds an example to the example group # - # source://rspec-core//lib/rspec/core/example_group.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:374 def add_example(example); end # @private # - # source://rspec-core//lib/rspec/core/example_group.rb#529 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:536 def before_context_ivars; end # @private # - # source://rspec-core//lib/rspec/core/example_group.rb#466 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:473 def children; end - # source://rspec-core//lib/rspec/core/example_group.rb#247 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:43 def context(*args, &example_group_block); end # Returns true if a `before(:context)` or `after(:context)` # hook is currently executing. # - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/example_group.rb#542 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:549 def currently_executing_a_context_hook?; end # @private # - # source://rspec-core//lib/rspec/core/example_group.rb#667 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:674 def declaration_locations; end # @private + # @macro [attach] define_example_group_method + # @!scope class + # @method $1 + # @overload $1 + # @overload $1(&example_group_definition) + # @param example_group_definition [Block] The definition of the example group. + # @overload $1(doc_string, *metadata, &example_implementation) + # @param doc_string [String] The group's doc string. + # @param metadata [Array, Hash] Metadata for the group. + # Symbols will be transformed into hash entries with `true` values. + # @param example_group_definition [Block] The definition of the example group. + # @return [RSpec::Core::ExampleGroup] + # + # Generates a subclass of this example group which inherits + # everything except the examples themselves. + # + # @example + # + # RSpec.describe "something" do # << This describe method is defined in + # # << RSpec::Core::DSL, included in the + # # << global namespace (optional) + # before do + # do_something_before + # end + # + # before(:example, :clean_env) do + # env.clear! + # end + # + # let(:thing) { Thing.new } + # + # $1 "attribute (of something)" do + # # examples in the group get the before hook + # # declared above, and can access `thing` + # end + # + # $1 "needs additional setup", :clean_env, :implementation => JSON do + # # specifies that hooks with matching metadata + # # should be be run additionally + # end + # end + # # @see DSL#describe # - # source://rspec-core//lib/rspec/core/example_group.rb#246 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:248 def define_example_group_method(name, metadata = T.unsafe(nil)); end - # @example - # $1 "does something", :slow, :load_factor => 100 do + # @private + # @macro [attach] define_example_method + # @!scope class + # @method $1 + # @overload $1 + # @overload $1(&example_implementation) + # @param example_implementation [Block] The implementation of the example. + # @overload $1(doc_string, *metadata) + # @param doc_string [String] The example's doc string. + # @param metadata [Array, Hash] Metadata for the example. + # Symbols will be transformed into hash entries with `true` values. + # @overload $1(doc_string, *metadata, &example_implementation) + # @param doc_string [String] The example's doc string. + # @param metadata [Array, Hash] Metadata for the example. + # Symbols will be transformed into hash entries with `true` values. + # @param example_implementation [Block] The implementation of the example. + # @yield [Example] the example object + # @example + # $1 do # end # - # @private + # $1 "does something" do + # end + # + # $1 "does something", :slow, :uses_js do + # end + # + # $1 "does something", :with => 'additional metadata' do + # end + # + # $1 "does something" do |ex| + # # ex is the Example object that contains metadata about the example + # end + # + # @example + # $1 "does something", :slow, :load_factor => 100 do + # end # - # source://rspec-core//lib/rspec/core/example_group.rb#145 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:145 def define_example_method(name, extra_options = T.unsafe(nil)); end # @private + # @macro [attach] define_nested_shared_group_method + # @!scope class + # @method $1(name, *args, &block) + # @param name [String, Symbol] The name of the shared group to include. + # @param args [Array] Pass parameters to a shared example group + # @param block [Block] Additional context to pass to the shared group. + # @return [RSpec::Core::ExampleGroup] # - # source://rspec-core//lib/rspec/core/example_group.rb#317 + # @see SharedExampleGroup + # + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:324 def define_nested_shared_group_method(new_name, report_label = T.unsafe(nil)); end # @private # - # source://rspec-core//lib/rspec/core/example_group.rb#76 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:76 def delegate_to_metadata(*names); end # @private # - # source://rspec-core//lib/rspec/core/example_group.rb#460 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:467 def descendant_filtered_examples; end # @private # - # source://rspec-core//lib/rspec/core/example_group.rb#503 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:510 def descendants; end - # source://rspec-core//lib/rspec/core/example_group.rb#247 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:43 def describe(*args, &example_group_block); end - # source://rspec-core//lib/rspec/core/example_group.rb#78 + # Returns the class or module passed to the `describe` method (or alias). + # Returns nil if the subject is not a class or module. + # @example + # RSpec.describe Thing do + # it "does something" do + # described_class == Thing + # end + # end + # + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:43 def described_class; end # @return [String] the current example group description # - # source://rspec-core//lib/rspec/core/example_group.rb#85 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:85 def description; end # @private # - # source://rspec-core//lib/rspec/core/example_group.rb#700 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:707 def each_instance_variable_for_example(group); end # @private # - # source://rspec-core//lib/rspec/core/example_group.rb#518 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:525 def ensure_example_groups_are_configured; end - # Defines an example within a group. - # - # @example - # example do - # end - # - # example "does something" do - # end - # - # example "does something", :slow, :uses_js do - # end - # - # example "does something", :with => 'additional metadata' do - # end - # - # example "does something" do |ex| - # # ex is the Example object that contains metadata about the example - # end - # @overload example - # @overload example - # @overload example - # @overload example - # @yield [Example] the example object - # - # source://rspec-core//lib/rspec/core/example_group.rb#146 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:43 def example(*all_args, &block); end - # source://rspec-core//lib/rspec/core/example_group.rb#247 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:43 def example_group(*args, &example_group_block); end # @private # - # source://rspec-core//lib/rspec/core/example_group.rb#450 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:457 def examples; end - # source://rspec-core//lib/rspec/core/example_group.rb#247 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:43 def fcontext(*args, &example_group_block); end - # source://rspec-core//lib/rspec/core/example_group.rb#247 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:43 def fdescribe(*args, &example_group_block); end - # Shortcut to define an example with `:focus => true`. - # - # @example - # fexample do - # end - # - # fexample "does something" do - # end - # - # fexample "does something", :slow, :uses_js do - # end - # - # fexample "does something", :with => 'additional metadata' do - # end - # - # fexample "does something" do |ex| - # # ex is the Example object that contains metadata about the example - # end - # @overload fexample - # @overload fexample - # @overload fexample - # @overload fexample - # @see example - # @yield [Example] the example object - # - # source://rspec-core//lib/rspec/core/example_group.rb#146 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:43 def fexample(*all_args, &block); end - # source://rspec-core//lib/rspec/core/example_group.rb#78 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:43 def file_path; end # @private # - # source://rspec-core//lib/rspec/core/example_group.rb#455 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:462 def filtered_examples; end # @private # - # source://rspec-core//lib/rspec/core/example_group.rb#379 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:386 def find_and_eval_shared(label, name, inclusion_location, *args, &customization_block); end - # Shortcut to define an example with `:focus => true`. - # - # @example - # fit do - # end - # - # fit "does something" do - # end - # - # fit "does something", :slow, :uses_js do - # end - # - # fit "does something", :with => 'additional metadata' do - # end - # - # fit "does something" do |ex| - # # ex is the Example object that contains metadata about the example - # end - # @overload fit - # @overload fit - # @overload fit - # @overload fit - # @see example - # @yield [Example] the example object - # - # source://rspec-core//lib/rspec/core/example_group.rb#146 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:43 def fit(*all_args, &block); end - # Shortcut to define an example with `:focus => true`. - # - # @example - # focus do - # end - # - # focus "does something" do - # end - # - # focus "does something", :slow, :uses_js do - # end - # - # focus "does something", :with => 'additional metadata' do - # end - # - # focus "does something" do |ex| - # # ex is the Example object that contains metadata about the example - # end - # @overload focus - # @overload focus - # @overload focus - # @overload focus - # @see example - # @yield [Example] the example object - # - # source://rspec-core//lib/rspec/core/example_group.rb#146 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:43 def focus(*all_args, &block); end # @private # - # source://rspec-core//lib/rspec/core/example_group.rb#655 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:662 def for_filtered_examples(reporter, &block); end - # Shortcut to define an example with `:focus => true`. - # - # @example - # fspecify do - # end - # - # fspecify "does something" do - # end - # - # fspecify "does something", :slow, :uses_js do - # end - # - # fspecify "does something", :with => 'additional metadata' do - # end - # - # fspecify "does something" do |ex| - # # ex is the Example object that contains metadata about the example - # end - # @overload fspecify - # @overload fspecify - # @overload fspecify - # @overload fspecify - # @see example - # @yield [Example] the example object - # - # source://rspec-core//lib/rspec/core/example_group.rb#146 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:43 def fspecify(*all_args, &block); end # @return [String] the unique id of this example group. Pass # this at the command line to re-run this exact example group. # - # source://rspec-core//lib/rspec/core/example_group.rb#675 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:682 def id; end # Define a singleton method for the singleton class (remove the method if # it's already been defined). - # # @private # - # source://rspec-core//lib/rspec/core/example_group.rb#40 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:40 def idempotently_define_singleton_method(name, &definition); end # Includes shared content mapped to `name` directly in the group in which @@ -3936,7 +3424,7 @@ class RSpec::Core::ExampleGroup # # @see SharedExampleGroup # - # source://rspec-core//lib/rspec/core/example_group.rb#343 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:350 def include_context(name, *args, &block); end # Includes shared content mapped to `name` directly in the group in which @@ -3946,248 +3434,139 @@ class RSpec::Core::ExampleGroup # # @see SharedExampleGroup # - # source://rspec-core//lib/rspec/core/example_group.rb#353 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:360 def include_examples(name, *args, &block); end - # Defines an example within a group. - # This is the primary API to define a code example. - # - # @example - # it do - # end - # - # it "does something" do - # end - # - # it "does something", :slow, :uses_js do - # end - # - # it "does something", :with => 'additional metadata' do - # end - # - # it "does something" do |ex| - # # ex is the Example object that contains metadata about the example - # end - # @overload it - # @overload it - # @overload it - # @overload it - # @yield [Example] the example object - # - # source://rspec-core//lib/rspec/core/example_group.rb#146 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:43 def it(*all_args, &block); end - # source://rspec-core//lib/rspec/core/example_group.rb#318 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:43 def it_behaves_like(name, *args, &customization_block); end - # source://rspec-core//lib/rspec/core/example_group.rb#318 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:43 def it_should_behave_like(name, *args, &customization_block); end - # source://rspec-core//lib/rspec/core/example_group.rb#78 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:43 def location; end # The [Metadata](Metadata) object associated with this group. - # # @see Metadata # - # source://rspec-core//lib/rspec/core/example_group.rb#51 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:51 def metadata; end # @private # - # source://rspec-core//lib/rspec/core/example_group.rb#485 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:492 def next_runnable_index_for(file); end # @private # - # source://rspec-core//lib/rspec/core/example_group.rb#625 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:632 def ordering_strategy; end # @private # - # source://rspec-core//lib/rspec/core/example_group.rb#508 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:515 def parent_groups; end - # Shortcut to define an example with `:pending => true` - # - # @example - # pending do - # end - # - # pending "does something" do - # end - # - # pending "does something", :slow, :uses_js do - # end - # - # pending "does something", :with => 'additional metadata' do - # end - # - # pending "does something" do |ex| - # # ex is the Example object that contains metadata about the example - # end - # @overload pending - # @overload pending - # @overload pending - # @overload pending - # @see example - # @yield [Example] the example object - # - # source://rspec-core//lib/rspec/core/example_group.rb#146 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:43 def pending(*all_args, &block); end # Removes an example from the example group # - # source://rspec-core//lib/rspec/core/example_group.rb#373 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:380 def remove_example(example); end # Clear memoized values when adding/removing examples - # # @private # - # source://rspec-core//lib/rspec/core/example_group.rb#359 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:366 def reset_memoized; end # Runs all the examples in this group. # - # source://rspec-core//lib/rspec/core/example_group.rb#599 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:606 def run(reporter = T.unsafe(nil)); end # @private # - # source://rspec-core//lib/rspec/core/example_group.rb#585 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:592 def run_after_context_hooks(example_group_instance); end # @private # - # source://rspec-core//lib/rspec/core/example_group.rb#547 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:554 def run_before_context_hooks(example_group_instance); end # @private # - # source://rspec-core//lib/rspec/core/example_group.rb#641 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:648 def run_examples(reporter); end # @private # - # source://rspec-core//lib/rspec/core/example_group.rb#410 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:417 def set_it_up(description, args, registration_collection, &example_group_block); end # @private # - # source://rspec-core//lib/rspec/core/example_group.rb#685 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:692 def set_ivars(instance, ivars); end - # Shortcut to define an example with `:skip => true` - # - # @example - # skip do - # end - # - # skip "does something" do - # end - # - # skip "does something", :slow, :uses_js do - # end - # - # skip "does something", :with => 'additional metadata' do - # end - # - # skip "does something" do |ex| - # # ex is the Example object that contains metadata about the example - # end - # @overload skip - # @overload skip - # @overload skip - # @overload skip - # @see example - # @yield [Example] the example object - # - # source://rspec-core//lib/rspec/core/example_group.rb#146 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:43 def skip(*all_args, &block); end - # Defines an example within a group. - # Useful for when your docstring does not read well off of `it`. - # - # @example - # RSpec.describe MyClass do - # specify "#do_something is deprecated" do - # # ... - # end - # end - # @example - # specify do - # end - # - # specify "does something" do - # end - # - # specify "does something", :slow, :uses_js do - # end - # - # specify "does something", :with => 'additional metadata' do - # end - # - # specify "does something" do |ex| - # # ex is the Example object that contains metadata about the example - # end - # @overload specify - # @overload specify - # @overload specify - # @overload specify - # @yield [Example] the example object - # - # source://rspec-core//lib/rspec/core/example_group.rb#146 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:43 def specify(*all_args, &block); end # @private # - # source://rspec-core//lib/rspec/core/example_group.rb#534 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:541 def store_before_context_ivars(example_group_instance); end # @private # - # source://rspec-core//lib/rspec/core/example_group.rb#395 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:402 def subclass(parent, description, args, registration_collection, &example_group_block); end + # 1.8.7 # :nocov: - # + # @private # @private # - # source://rspec-core//lib/rspec/core/example_group.rb#562 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:569 def superclass_before_context_ivars; end # @private # @return [Metadata] belonging to the parent of a nested {ExampleGroup} # - # source://rspec-core//lib/rspec/core/example_group.rb#71 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:71 def superclass_metadata; end # @private - # @return [Boolean] # - # source://rspec-core//lib/rspec/core/example_group.rb#513 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:520 def top_level?; end # @private # - # source://rspec-core//lib/rspec/core/example_group.rb#680 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:687 def top_level_description; end + # @private # Traverses the tree of groups, starting with `self`, then the children, recursively. # Halts the traversal of a branch of the tree as soon as the passed block returns true. # Note that siblings groups and their sub-trees will continue to be explored. # This is intended to make it easy to find the top-most group that satisfies some # condition. # - # @private - # - # source://rspec-core//lib/rspec/core/example_group.rb#476 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:483 def traverse_tree_until(&block); end # @private # - # source://rspec-core//lib/rspec/core/example_group.rb#727 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:734 def update_inherited_metadata(updates); end # Temporarily replace the provided metadata. @@ -4195,160 +3574,83 @@ class RSpec::Core::ExampleGroup # to return the metadata of the example that it exists for. This # is necessary for shared example group inclusion to work properly # with singleton example groups. - # # @private # - # source://rspec-core//lib/rspec/core/example_group.rb#61 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:61 def with_replaced_metadata(meta); end - # source://rspec-core//lib/rspec/core/example_group.rb#247 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:43 def xcontext(*args, &example_group_block); end - # source://rspec-core//lib/rspec/core/example_group.rb#247 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:43 def xdescribe(*args, &example_group_block); end - # Shortcut to define an example with `:skip => 'Temporarily skipped with xexample'`. - # - # @example - # xexample do - # end - # - # xexample "does something" do - # end - # - # xexample "does something", :slow, :uses_js do - # end - # - # xexample "does something", :with => 'additional metadata' do - # end - # - # xexample "does something" do |ex| - # # ex is the Example object that contains metadata about the example - # end - # @overload xexample - # @overload xexample - # @overload xexample - # @overload xexample - # @see example - # @yield [Example] the example object - # - # source://rspec-core//lib/rspec/core/example_group.rb#146 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:43 def xexample(*all_args, &block); end - # Shortcut to define an example with `:skip => 'Temporarily skipped with xit'`. - # - # @example - # xit do - # end - # - # xit "does something" do - # end - # - # xit "does something", :slow, :uses_js do - # end - # - # xit "does something", :with => 'additional metadata' do - # end - # - # xit "does something" do |ex| - # # ex is the Example object that contains metadata about the example - # end - # @overload xit - # @overload xit - # @overload xit - # @overload xit - # @see example - # @yield [Example] the example object - # - # source://rspec-core//lib/rspec/core/example_group.rb#146 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:43 def xit(*all_args, &block); end - # Shortcut to define an example with `:skip => 'Temporarily skipped with xspecify'`. - # - # @example - # xspecify do - # end - # - # xspecify "does something" do - # end - # - # xspecify "does something", :slow, :uses_js do - # end - # - # xspecify "does something", :with => 'additional metadata' do - # end - # - # xspecify "does something" do |ex| - # # ex is the Example object that contains metadata about the example - # end - # @overload xspecify - # @overload xspecify - # @overload xspecify - # @overload xspecify - # @see example - # @yield [Example] the example object - # - # source://rspec-core//lib/rspec/core/example_group.rb#146 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:43 def xspecify(*all_args, &block); end private - # source://rspec-core//lib/rspec/core/example_group.rb#742 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:749 def method_missing(name, *args); end end end +# :nocov: +# @private # @private # -# source://rspec-core//lib/rspec/core/example_group.rb#696 +# pkg:gem/rspec-core#lib/rspec/core/example_group.rb:703 RSpec::Core::ExampleGroup::INSTANCE_VARIABLE_TO_IGNORE = T.let(T.unsafe(nil), Symbol) # Raised when an RSpec API is called in the wrong scope, such as `before` # being called from within an example rather than from within an example # group block. # -# source://rspec-core//lib/rspec/core/example_group.rb#740 +# pkg:gem/rspec-core#lib/rspec/core/example_group.rb:747 class RSpec::Core::ExampleGroup::WrongScopeError < ::NoMethodError; end # Dumps a list of hashes in a pretty, human readable format # for later parsing. The hashes are expected to have symbol # keys and string values, and each hash should have the same # set of keys. -# # @private # -# source://rspec-core//lib/rspec/core/example_status_persister.rb#143 +# pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:143 class RSpec::Core::ExampleStatusDumper - # @return [ExampleStatusDumper] a new instance of ExampleStatusDumper - # - # source://rspec-core//lib/rspec/core/example_status_persister.rb#148 + # pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:148 def initialize(examples); end - # source://rspec-core//lib/rspec/core/example_status_persister.rb#152 + # pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:152 def dump; end private - # source://rspec-core//lib/rspec/core/example_status_persister.rb#188 + # pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:188 def column_widths; end - # source://rspec-core//lib/rspec/core/example_status_persister.rb#159 + # pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:159 def formatted_header_rows; end - # source://rspec-core//lib/rspec/core/example_status_persister.rb#176 + # pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:176 def formatted_row_from(row_values); end - # source://rspec-core//lib/rspec/core/example_status_persister.rb#166 + # pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:166 def formatted_value_rows; end - # source://rspec-core//lib/rspec/core/example_status_persister.rb#184 + # pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:184 def headers; end - # source://rspec-core//lib/rspec/core/example_status_persister.rb#172 + # pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:172 def rows; end class << self - # source://rspec-core//lib/rspec/core/example_status_persister.rb#144 + # pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:144 def dump(examples); end end end @@ -4367,43 +3669,38 @@ end # definitively do exist or may still exist. # - Is sorted by file name and example definition order, so that # the saved file is easily scannable if users want to inspect it. -# # @private # -# source://rspec-core//lib/rspec/core/example_status_persister.rb#74 +# pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:74 class RSpec::Core::ExampleStatusMerger - # @return [ExampleStatusMerger] a new instance of ExampleStatusMerger - # - # source://rspec-core//lib/rspec/core/example_status_persister.rb#79 + # pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:79 def initialize(this_run, from_previous_runs); end - # source://rspec-core//lib/rspec/core/example_status_persister.rb#85 + # pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:85 def merge; end private - # source://rspec-core//lib/rspec/core/example_status_persister.rb#102 + # pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:102 def delete_previous_examples_that_no_longer_exist; end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/example_status_persister.rb#108 + # pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:108 def example_must_no_longer_exist?(ex_id); end - # source://rspec-core//lib/rspec/core/example_status_persister.rb#95 + # pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:95 def hash_from(example_list); end - # source://rspec-core//lib/rspec/core/example_status_persister.rb#124 + # pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:124 def loaded_spec_files; end - # source://rspec-core//lib/rspec/core/example_status_persister.rb#132 + # pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:132 def sort_value_from(example); end - # source://rspec-core//lib/rspec/core/example_status_persister.rb#128 + # pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:128 def spec_file_from(ex_id); end class << self - # source://rspec-core//lib/rspec/core/example_status_persister.rb#75 + # pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:75 def merge(this_run, from_previous_runs); end end end @@ -4414,131 +3711,118 @@ end # OK because the values we plan to persist (example id, status, and perhaps # example duration) are highly unlikely to contain "\n" or " | " -- after # all, who puts those in file names? -# # @private # -# source://rspec-core//lib/rspec/core/example_status_persister.rb#207 +# pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:207 class RSpec::Core::ExampleStatusParser - # @return [ExampleStatusParser] a new instance of ExampleStatusParser - # - # source://rspec-core//lib/rspec/core/example_status_persister.rb#212 + # pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:212 def initialize(string); end - # source://rspec-core//lib/rspec/core/example_status_persister.rb#216 + # pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:216 def parse; end private - # source://rspec-core//lib/rspec/core/example_status_persister.rb#226 + # pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:226 def headers; end - # source://rspec-core//lib/rspec/core/example_status_persister.rb#222 + # pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:222 def parse_row(line); end - # source://rspec-core//lib/rspec/core/example_status_persister.rb#230 + # pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:230 def split_line(line); end class << self - # source://rspec-core//lib/rspec/core/example_status_persister.rb#208 + # pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:208 def parse(string); end end end # Persists example ids and their statuses so that we can filter # to just the ones that failed the last time they ran. -# # @private # -# source://rspec-core//lib/rspec/core/example_status_persister.rb#8 +# pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:8 class RSpec::Core::ExampleStatusPersister - # @return [ExampleStatusPersister] a new instance of ExampleStatusPersister - # - # source://rspec-core//lib/rspec/core/example_status_persister.rb#18 + # pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:18 def initialize(examples, file_name); end - # source://rspec-core//lib/rspec/core/example_status_persister.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:23 def persist; end private - # source://rspec-core//lib/rspec/core/example_status_persister.rb#40 + # pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:40 def dump_statuses(unparsed_previous_runs); end - # source://rspec-core//lib/rspec/core/example_status_persister.rb#46 + # pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:46 def statuses_from_this_run; end class << self - # source://rspec-core//lib/rspec/core/example_status_persister.rb#9 + # pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:9 def load_from(file_name); end - # source://rspec-core//lib/rspec/core/example_status_persister.rb#14 + # pkg:gem/rspec-core#lib/rspec/core/example_status_persister.rb:14 def persist(examples, file_name); end end end # @private # -# source://rspec-core//lib/rspec/core/filter_manager.rb#183 +# pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:183 RSpec::Core::ExclusionRules = RSpec::Core::FilterRules # @private # -# source://rspec-core//lib/rspec/core/filter_manager.rb#4 +# pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:4 class RSpec::Core::FilterManager - # @return [FilterManager] a new instance of FilterManager - # - # source://rspec-core//lib/rspec/core/filter_manager.rb#7 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:7 def initialize; end - # source://rspec-core//lib/rspec/core/filter_manager.rb#22 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:22 def add_ids(rerun_path, scoped_ids); end # @api private + # # @param file_path [String] # @param line_numbers [Array] # - # source://rspec-core//lib/rspec/core/filter_manager.rb#15 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:15 def add_location(file_path, line_numbers); end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/filter_manager.rb#30 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:30 def empty?; end - # source://rspec-core//lib/rspec/core/filter_manager.rb#57 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:57 def exclude(*args); end - # source://rspec-core//lib/rspec/core/filter_manager.rb#61 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:61 def exclude_only(*args); end - # source://rspec-core//lib/rspec/core/filter_manager.rb#65 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:65 def exclude_with_low_priority(*args); end - # Returns the value of attribute exclusions. - # - # source://rspec-core//lib/rspec/core/filter_manager.rb#5 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:5 def exclusions; end - # source://rspec-core//lib/rspec/core/filter_manager.rb#69 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:69 def include(*args); end - # source://rspec-core//lib/rspec/core/filter_manager.rb#73 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:73 def include_only(*args); end - # source://rspec-core//lib/rspec/core/filter_manager.rb#77 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:77 def include_with_low_priority(*args); end - # Returns the value of attribute inclusions. - # - # source://rspec-core//lib/rspec/core/filter_manager.rb#5 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:5 def inclusions; end - # source://rspec-core//lib/rspec/core/filter_manager.rb#34 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:34 def prune(examples); end private - # source://rspec-core//lib/rspec/core/filter_manager.rb#83 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:83 def add_path_to_arrays_filter(filter_key, path, values); end # When a user specifies a particular spec location, that takes priority @@ -4547,88 +3831,72 @@ class RSpec::Core::FilterManager # defined in the same file as the location filters. Excluded specs in # other files should still be excluded. # - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/filter_manager.rb#101 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:101 def file_scoped_include?(ex_metadata, ids, locations); end - # source://rspec-core//lib/rspec/core/filter_manager.rb#89 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:89 def prune_conditionally_filtered_examples(examples); end end # @private # -# source://rspec-core//lib/rspec/core/filter_manager.rb#115 +# pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:115 class RSpec::Core::FilterRules - # @return [FilterRules] a new instance of FilterRules - # - # source://rspec-core//lib/rspec/core/filter_manager.rb#130 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:130 def initialize(rules = T.unsafe(nil)); end - # source://rspec-core//lib/rspec/core/filter_manager.rb#161 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:161 def [](key); end - # source://rspec-core//lib/rspec/core/filter_manager.rb#134 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:134 def add(updated); end - # source://rspec-core//lib/rspec/core/filter_manager.rb#138 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:138 def add_with_low_priority(updated); end - # source://rspec-core//lib/rspec/core/filter_manager.rb#149 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:149 def clear; end - # source://rspec-core//lib/rspec/core/filter_manager.rb#153 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:153 def delete(key); end - # source://rspec-core//lib/rspec/core/filter_manager.rb#173 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:173 def description; end - # source://rspec-core//lib/rspec/core/filter_manager.rb#169 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:169 def each_pair(&block); end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/filter_manager.rb#165 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:165 def empty?; end - # source://rspec-core//lib/rspec/core/filter_manager.rb#157 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:157 def fetch(*args, &block); end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/filter_manager.rb#177 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:177 def include_example?(example); end - # Returns the value of attribute opposite. - # - # source://rspec-core//lib/rspec/core/filter_manager.rb#119 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:119 def opposite; end - # Sets the attribute opposite - # - # @param value the value to set the attribute opposite to. - # - # source://rspec-core//lib/rspec/core/filter_manager.rb#119 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:119 def opposite=(_arg0); end - # Returns the value of attribute rules. - # - # source://rspec-core//lib/rspec/core/filter_manager.rb#120 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:120 def rules; end - # source://rspec-core//lib/rspec/core/filter_manager.rb#144 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:144 def use_only(updated); end class << self - # source://rspec-core//lib/rspec/core/filter_manager.rb#122 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:122 def build; end end end -# source://rspec-core//lib/rspec/core/filter_manager.rb#116 +# pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:116 RSpec::Core::FilterRules::PROC_HEX_NUMBER = T.let(T.unsafe(nil), Regexp) -# source://rspec-core//lib/rspec/core/filter_manager.rb#117 +# pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:117 RSpec::Core::FilterRules::PROJECT_DIR = T.let(T.unsafe(nil), String) # Tracks a collection of filterable items (e.g. modules, hooks, etc) @@ -4636,10 +3904,9 @@ RSpec::Core::FilterRules::PROJECT_DIR = T.let(T.unsafe(nil), String) # metadata of an example or example group. # # There are two implementations, optimized for different uses. -# # @private # -# source://rspec-core//lib/rspec/core/metadata_filter.rb#87 +# pkg:gem/rspec-core#lib/rspec/core/metadata_filter.rb:87 module RSpec::Core::FilterableItemRepository; end # This implementation is much more complex, and is optimized for @@ -4653,43 +3920,40 @@ module RSpec::Core::FilterableItemRepository; end # This is ideal for use by config, where filterable items (e.g. hooks) # are typically added at the start of the process (e.g. in `spec_helper`) # and then repeatedly queried as example groups and examples are defined. -# # @private # -# source://rspec-core//lib/rspec/core/metadata_filter.rb#151 +# pkg:gem/rspec-core#lib/rspec/core/metadata_filter.rb:151 class RSpec::Core::FilterableItemRepository::QueryOptimized < ::RSpec::Core::FilterableItemRepository::UpdateOptimized - # @return [QueryOptimized] a new instance of QueryOptimized - # - # source://rspec-core//lib/rspec/core/metadata_filter.rb#155 + # pkg:gem/rspec-core#lib/rspec/core/metadata_filter.rb:155 def initialize(applies_predicate); end - # source://rspec-core//lib/rspec/core/metadata_filter.rb#164 + # pkg:gem/rspec-core#lib/rspec/core/metadata_filter.rb:164 def append(item, metadata); end - # source://rspec-core//lib/rspec/core/metadata_filter.rb#174 + # pkg:gem/rspec-core#lib/rspec/core/metadata_filter.rb:174 def delete(item, metadata); end - # source://rspec-core//lib/rspec/core/metadata_filter.rb#179 + # pkg:gem/rspec-core#lib/rspec/core/metadata_filter.rb:179 def items_for(metadata); end - # source://rspec-core//lib/rspec/core/metadata_filter.rb#169 + # pkg:gem/rspec-core#lib/rspec/core/metadata_filter.rb:169 def prepend(item, metadata); end private - # source://rspec-core//lib/rspec/core/metadata_filter.rb#217 + # pkg:gem/rspec-core#lib/rspec/core/metadata_filter.rb:217 def applicable_metadata_from(metadata); end - # source://rspec-core//lib/rspec/core/metadata_filter.rb#118 + # pkg:gem/rspec-core#lib/rspec/core/metadata_filter.rb:152 def find_items_for(request_meta); end - # source://rspec-core//lib/rspec/core/metadata_filter.rb#211 + # pkg:gem/rspec-core#lib/rspec/core/metadata_filter.rb:211 def handle_mutation(metadata); end - # source://rspec-core//lib/rspec/core/metadata_filter.rb#235 + # pkg:gem/rspec-core#lib/rspec/core/metadata_filter.rb:235 def proc_keys_from(metadata); end - # source://rspec-core//lib/rspec/core/metadata_filter.rb#203 + # pkg:gem/rspec-core#lib/rspec/core/metadata_filter.rb:203 def reconstruct_caches; end end @@ -4702,49 +3966,43 @@ end # be updated multiple times with globally configured hooks, etc, # but will not be queried frequently by other examples or example # groups. -# # @private # -# source://rspec-core//lib/rspec/core/metadata_filter.rb#98 +# pkg:gem/rspec-core#lib/rspec/core/metadata_filter.rb:98 class RSpec::Core::FilterableItemRepository::UpdateOptimized - # @return [UpdateOptimized] a new instance of UpdateOptimized - # - # source://rspec-core//lib/rspec/core/metadata_filter.rb#101 + # pkg:gem/rspec-core#lib/rspec/core/metadata_filter.rb:101 def initialize(applies_predicate); end - # source://rspec-core//lib/rspec/core/metadata_filter.rb#106 + # pkg:gem/rspec-core#lib/rspec/core/metadata_filter.rb:106 def append(item, metadata); end - # source://rspec-core//lib/rspec/core/metadata_filter.rb#114 + # pkg:gem/rspec-core#lib/rspec/core/metadata_filter.rb:114 def delete(item, metadata); end - # Returns the value of attribute items_and_filters. - # - # source://rspec-core//lib/rspec/core/metadata_filter.rb#99 + # pkg:gem/rspec-core#lib/rspec/core/metadata_filter.rb:99 def items_and_filters; end - # source://rspec-core//lib/rspec/core/metadata_filter.rb#118 + # pkg:gem/rspec-core#lib/rspec/core/metadata_filter.rb:118 def items_for(request_meta); end - # source://rspec-core//lib/rspec/core/metadata_filter.rb#110 + # pkg:gem/rspec-core#lib/rspec/core/metadata_filter.rb:110 def prepend(item, metadata); end end # @private # -# source://rspec-core//lib/rspec/core/flat_map.rb#4 +# pkg:gem/rspec-core#lib/rspec/core/flat_map.rb:4 module RSpec::Core::FlatMap private + # for 1.8.7 # :nocov: # - # source://rspec-core//lib/rspec/core/flat_map.rb#6 + # pkg:gem/rspec-core#lib/rspec/core/flat_map.rb:6 def flat_map(array, &block); end class << self - # :nocov: - # - # source://rspec-core//lib/rspec/core/flat_map.rb#6 + # pkg:gem/rspec-core#lib/rspec/core/flat_map.rb:17 def flat_map(array, &block); end end end @@ -4816,17 +4074,17 @@ end # @see RSpec::Core::Formatters::BaseTextFormatter # @see RSpec::Core::Reporter # -# source://rspec-core//lib/rspec/core/formatters/console_codes.rb#3 +# pkg:gem/rspec-core#lib/rspec/core/formatters/console_codes.rb:3 module RSpec::Core::Formatters class << self # Register the formatter class - # # @param formatter_class [Class] formatter class to register # @param notifications [Array] one or more notifications to be # registered to the specified formatter + # # @see RSpec::Core::Formatters::BaseFormatter # - # source://rspec-core//lib/rspec/core/formatters.rb#86 + # pkg:gem/rspec-core#lib/rspec/core/formatters.rb:86 def register(formatter_class, *notifications); end end end @@ -4836,29 +4094,24 @@ end # # Subclasses must define a `notify_results(all_example_ids, failed_example_ids)` # method. -# # @private # -# source://rspec-core//lib/rspec/core/formatters/base_bisect_formatter.rb#12 +# pkg:gem/rspec-core#lib/rspec/core/formatters/base_bisect_formatter.rb:12 class RSpec::Core::Formatters::BaseBisectFormatter - # @return [BaseBisectFormatter] a new instance of BaseBisectFormatter - # - # source://rspec-core//lib/rspec/core/formatters/base_bisect_formatter.rb#17 + # pkg:gem/rspec-core#lib/rspec/core/formatters/base_bisect_formatter.rb:17 def initialize(expected_failures); end - # source://rspec-core//lib/rspec/core/formatters/base_bisect_formatter.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/formatters/base_bisect_formatter.rb:23 def example_failed(notification); end - # source://rspec-core//lib/rspec/core/formatters/base_bisect_formatter.rb#27 + # pkg:gem/rspec-core#lib/rspec/core/formatters/base_bisect_formatter.rb:27 def example_finished(notification); end - # source://rspec-core//lib/rspec/core/formatters/base_bisect_formatter.rb#37 + # pkg:gem/rspec-core#lib/rspec/core/formatters/base_bisect_formatter.rb:37 def start_dump(_notification); end class << self - # @private - # - # source://rspec-core//lib/rspec/core/formatters/base_bisect_formatter.rb#13 + # pkg:gem/rspec-core#lib/rspec/core/formatters/base_bisect_formatter.rb:13 def inherited(formatter); end end end @@ -4870,64 +4123,58 @@ end # @see RSpec::Core::Reporter # @see RSpec::Core::Formatters::Protocol # -# source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#13 +# pkg:gem/rspec-core#lib/rspec/core/formatters/base_formatter.rb:13 class RSpec::Core::Formatters::BaseFormatter # @api public # @param output [IO] the formatter output - # @return [BaseFormatter] a new instance of BaseFormatter # @see RSpec::Core::Formatters::Protocol#initialize # - # source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/formatters/base_formatter.rb:23 def initialize(output); end # @api public + # # @param _notification [NullNotification] (Ignored) # @see RSpec::Core::Formatters::Protocol#close # - # source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#50 + # pkg:gem/rspec-core#lib/rspec/core/formatters/base_formatter.rb:50 def close(_notification); end - # Returns the value of attribute example_group. - # - # source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#17 + # pkg:gem/rspec-core#lib/rspec/core/formatters/base_formatter.rb:17 def example_group; end - # Sets the attribute example_group - # - # @param value the value to set the attribute example_group to. - # - # source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#17 + # pkg:gem/rspec-core#lib/rspec/core/formatters/base_formatter.rb:17 def example_group=(_arg0); end # @api public + # # @param notification [GroupNotification] containing example_group # subclass of `RSpec::Core::ExampleGroup` # @see RSpec::Core::Formatters::Protocol#example_group_started # - # source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#42 + # pkg:gem/rspec-core#lib/rspec/core/formatters/base_formatter.rb:42 def example_group_started(notification); end - # Returns the value of attribute output. - # - # source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#18 + # pkg:gem/rspec-core#lib/rspec/core/formatters/base_formatter.rb:18 def output; end # @api public + # # @param notification [StartNotification] # @see RSpec::Core::Formatters::Protocol#start # - # source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#32 + # pkg:gem/rspec-core#lib/rspec/core/formatters/base_formatter.rb:32 def start(notification); end private - # source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#64 + # pkg:gem/rspec-core#lib/rspec/core/formatters/base_formatter.rb:64 def output_supports_sync; end - # source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#60 + # pkg:gem/rspec-core#lib/rspec/core/formatters/base_formatter.rb:60 def restore_sync_output; end - # source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#56 + # pkg:gem/rspec-core#lib/rspec/core/formatters/base_formatter.rb:56 def start_sync_output; end end @@ -4938,52 +4185,56 @@ end # @see RSpec::Core::Formatters::BaseFormatter # @see RSpec::Core::Reporter # -# source://rspec-core//lib/rspec/core/formatters/base_text_formatter.rb#12 +# pkg:gem/rspec-core#lib/rspec/core/formatters/base_text_formatter.rb:12 class RSpec::Core::Formatters::BaseTextFormatter < ::RSpec::Core::Formatters::BaseFormatter + # @api public + # # Invoked at the end of a suite run. Allows the formatter to do any # tidying up, but be aware that formatter output streams may be used # elsewhere so don't actually close them. # - # @api public # @param _notification [NullNotification] (Ignored) # - # source://rspec-core//lib/rspec/core/formatters/base_text_formatter.rb#65 + # pkg:gem/rspec-core#lib/rspec/core/formatters/base_text_formatter.rb:65 def close(_notification); end + # @api public + # # Dumps detailed information about each example failure. # - # @api public # @param notification [NullNotification] # - # source://rspec-core//lib/rspec/core/formatters/base_text_formatter.rb#30 + # pkg:gem/rspec-core#lib/rspec/core/formatters/base_text_formatter.rb:30 def dump_failures(notification); end # @private # - # source://rspec-core//lib/rspec/core/formatters/base_text_formatter.rb#47 + # pkg:gem/rspec-core#lib/rspec/core/formatters/base_text_formatter.rb:47 def dump_pending(notification); end + # @api public + # # This method is invoked after the dumping of examples and failures. # Each parameter is assigned to a corresponding attribute. # - # @api public # @param summary [SummaryNotification] containing duration, # example_count, failure_count and pending_count # - # source://rspec-core//lib/rspec/core/formatters/base_text_formatter.rb#42 + # pkg:gem/rspec-core#lib/rspec/core/formatters/base_text_formatter.rb:42 def dump_summary(summary); end + # @api public + # # Used by the reporter to send messages to the output stream. # - # @api public # @param notification [MessageNotification] containing message # - # source://rspec-core//lib/rspec/core/formatters/base_text_formatter.rb#21 + # pkg:gem/rspec-core#lib/rspec/core/formatters/base_text_formatter.rb:21 def message(notification); end # @private # - # source://rspec-core//lib/rspec/core/formatters/base_text_formatter.rb#53 + # pkg:gem/rspec-core#lib/rspec/core/formatters/base_text_formatter.rb:53 def seed(notification); end end @@ -4994,30 +4245,27 @@ end # method calls, we try to minimize the number of DRb calls for perf reasons, # opting to communicate only at the start and the end of the run, rather than # after each example. -# # @private # -# source://rspec-core//lib/rspec/core/formatters/bisect_drb_formatter.rb#15 +# pkg:gem/rspec-core#lib/rspec/core/formatters/bisect_drb_formatter.rb:15 class RSpec::Core::Formatters::BisectDRbFormatter < ::RSpec::Core::Formatters::BaseBisectFormatter - # @return [BisectDRbFormatter] a new instance of BisectDRbFormatter - # - # source://rspec-core//lib/rspec/core/formatters/bisect_drb_formatter.rb#16 + # pkg:gem/rspec-core#lib/rspec/core/formatters/bisect_drb_formatter.rb:16 def initialize(_output); end - # source://rspec-core//lib/rspec/core/formatters/bisect_drb_formatter.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/formatters/bisect_drb_formatter.rb:23 def notify_results(results); end end # ConsoleCodes provides helpers for formatting console output # with ANSI codes, e.g. color's and bold. # -# source://rspec-core//lib/rspec/core/formatters/console_codes.rb#6 +# pkg:gem/rspec-core#lib/rspec/core/formatters/console_codes.rb:6 module RSpec::Core::Formatters::ConsoleCodes private # @private # - # source://rspec-core//lib/rspec/core/formatters/console_codes.rb#34 + # pkg:gem/rspec-core#lib/rspec/core/formatters/console_codes.rb:34 def config_colors_to_methods; end # Fetches the correct code for the supplied symbol, or checks @@ -5026,7 +4274,7 @@ module RSpec::Core::Formatters::ConsoleCodes # @param code_or_symbol [Symbol, Fixnum] Symbol or code to check # @return [Fixnum] a console code # - # source://rspec-core//lib/rspec/core/formatters/console_codes.rb#47 + # pkg:gem/rspec-core#lib/rspec/core/formatters/console_codes.rb:47 def console_code_for(code_or_symbol); end # Wraps a piece of text in ANSI codes with the supplied code. Will @@ -5037,13 +4285,13 @@ module RSpec::Core::Formatters::ConsoleCodes # @param code_or_symbol [Symbol, Fixnum] the desired control code # @return [String] the wrapped text # - # source://rspec-core//lib/rspec/core/formatters/console_codes.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/formatters/console_codes.rb:66 def wrap(text, code_or_symbol); end class << self # @private # - # source://rspec-core//lib/rspec/core/formatters/console_codes.rb#34 + # pkg:gem/rspec-core#lib/rspec/core/formatters/console_codes.rb:34 def config_colors_to_methods; end # Fetches the correct code for the supplied symbol, or checks @@ -5052,7 +4300,7 @@ module RSpec::Core::Formatters::ConsoleCodes # @param code_or_symbol [Symbol, Fixnum] Symbol or code to check # @return [Fixnum] a console code # - # source://rspec-core//lib/rspec/core/formatters/console_codes.rb#47 + # pkg:gem/rspec-core#lib/rspec/core/formatters/console_codes.rb:47 def console_code_for(code_or_symbol); end # Wraps a piece of text in ANSI codes with the supplied code. Will @@ -5063,1555 +4311,1424 @@ module RSpec::Core::Formatters::ConsoleCodes # @param code_or_symbol [Symbol, Fixnum] the desired control code # @return [String] the wrapped text # - # source://rspec-core//lib/rspec/core/formatters/console_codes.rb#66 + # pkg:gem/rspec-core#lib/rspec/core/formatters/console_codes.rb:66 def wrap(text, code_or_symbol); end end end # @private # -# source://rspec-core//lib/rspec/core/formatters/console_codes.rb#8 +# pkg:gem/rspec-core#lib/rspec/core/formatters/console_codes.rb:8 RSpec::Core::Formatters::ConsoleCodes::VT100_CODES = T.let(T.unsafe(nil), Hash) # @private # -# source://rspec-core//lib/rspec/core/formatters/console_codes.rb#29 +# pkg:gem/rspec-core#lib/rspec/core/formatters/console_codes.rb:29 RSpec::Core::Formatters::ConsoleCodes::VT100_CODE_VALUES = T.let(T.unsafe(nil), Hash) # @private # -# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#7 +# pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:7 class RSpec::Core::Formatters::DeprecationFormatter - # @return [DeprecationFormatter] a new instance of DeprecationFormatter - # - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#12 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:12 def initialize(deprecation_stream, summary_stream); end - # Returns the value of attribute count. - # - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#10 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:10 def count; end - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#32 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:32 def deprecation(notification); end - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#44 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:44 def deprecation_message_for(data); end - # Returns the value of attribute deprecation_stream. - # - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#10 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:10 def deprecation_stream; end - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#40 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:40 def deprecation_summary(_notification); end - # Returns the value of attribute deprecation_stream. - # - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#10 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:18 def output; end - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#20 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:20 def printer; end - # Returns the value of attribute summary_stream. - # - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#10 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:10 def summary_stream; end end -# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#60 +# pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:60 RSpec::Core::Formatters::DeprecationFormatter::DEPRECATION_STREAM_NOTICE = T.let(T.unsafe(nil), String) # @private # -# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#135 +# pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:135 class RSpec::Core::Formatters::DeprecationFormatter::DelayedPrinter - # @return [DelayedPrinter] a new instance of DelayedPrinter - # - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#140 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:140 def initialize(deprecation_stream, summary_stream, deprecation_formatter); end - # Returns the value of attribute deprecation_formatter. - # - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#138 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:138 def deprecation_formatter; end - # Returns the value of attribute deprecation_stream. - # - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#138 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:138 def deprecation_stream; end - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#163 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:163 def deprecation_summary; end - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#172 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:172 def print_deferred_deprecation_warnings; end - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#148 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:148 def print_deprecation_message(data); end - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#155 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:155 def stash_deprecation_message(deprecation_message); end - # Returns the value of attribute summary_stream. - # - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#138 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:138 def summary_stream; end end -# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#136 +# pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:136 RSpec::Core::Formatters::DeprecationFormatter::DelayedPrinter::TOO_MANY_USES_LIMIT = T.let(T.unsafe(nil), Integer) -# Wraps a File object and provides file-specific operations. -# # @private +# Wraps a File object and provides file-specific operations. # -# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#196 +# pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:196 class RSpec::Core::Formatters::DeprecationFormatter::FileStream - # @return [FileStream] a new instance of FileStream - # - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#197 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:197 def initialize(file); end - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#207 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:207 def puts(*args); end - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#211 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:211 def summarize(summary_stream, deprecation_count); end end # @private # -# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#94 +# pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:94 class RSpec::Core::Formatters::DeprecationFormatter::GeneratedDeprecationMessage < ::Struct - # @return [GeneratedDeprecationMessage] a new instance of GeneratedDeprecationMessage - # - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#95 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:95 def initialize(data); end - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#100 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:100 def to_s; end - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#107 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:107 def too_many_warnings_message; end - # Returns the value of attribute type - # - # @return [Object] the current value of type + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:94 def type; end - # Sets the attribute type - # - # @param value [Object] the value to set the attribute type to. - # @return [Object] the newly set value + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:94 def type=(_); end class << self + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:94 def [](*_arg0); end + + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:94 def inspect; end + + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:94 def keyword_init?; end + + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:94 def members; end + + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:94 def new(*_arg0); end end end # @private # -# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#113 +# pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:113 class RSpec::Core::Formatters::DeprecationFormatter::ImmediatePrinter - # @return [ImmediatePrinter] a new instance of ImmediatePrinter - # - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#116 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:116 def initialize(deprecation_stream, summary_stream, deprecation_formatter); end - # Returns the value of attribute deprecation_formatter. - # - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#114 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:114 def deprecation_formatter; end - # Returns the value of attribute deprecation_stream. - # - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#114 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:114 def deprecation_stream; end - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#128 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:128 def deprecation_summary; end - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#123 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:123 def print_deprecation_message(data); end - # Returns the value of attribute summary_stream. - # - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#114 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:114 def summary_stream; end end -# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#52 +# pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:52 RSpec::Core::Formatters::DeprecationFormatter::RAISE_ERROR_CONFIG_NOTICE = T.let(T.unsafe(nil), String) -# Not really a stream, but is usable in place of one. -# # @private +# Not really a stream, but is usable in place of one. # -# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#184 +# pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:184 class RSpec::Core::Formatters::DeprecationFormatter::RaiseErrorStream - # @raise [DeprecationError] - # - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#185 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:185 def puts(message); end - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#189 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:189 def summarize(summary_stream, deprecation_count); end end # @private # -# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#66 +# pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:66 class RSpec::Core::Formatters::DeprecationFormatter::SpecifiedDeprecationMessage < ::Struct - # @return [SpecifiedDeprecationMessage] a new instance of SpecifiedDeprecationMessage - # - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#67 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:67 def initialize(data); end - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#72 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:72 def to_s; end - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#76 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:76 def too_many_warnings_message; end - # Returns the value of attribute type - # - # @return [Object] the current value of type + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:66 def type; end - # Sets the attribute type - # - # @param value [Object] the value to set the attribute type to. - # @return [Object] the newly set value + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:66 def type=(_); end private - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#88 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:88 def deprecation_type_for(data); end - # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#82 + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:82 def output_formatted(str); end class << self + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:66 def [](*_arg0); end + + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:66 def inspect; end + + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:66 def keyword_init?; end + + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:66 def members; end + + # pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:66 def new(*_arg0); end end end -# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#62 +# pkg:gem/rspec-core#lib/rspec/core/formatters/deprecation_formatter.rb:62 RSpec::Core::Formatters::DeprecationFormatter::TOO_MANY_WARNINGS_NOTICE = T.let(T.unsafe(nil), String) # @private # -# source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#8 +# pkg:gem/rspec-core#lib/rspec/core/formatters/documentation_formatter.rb:8 class RSpec::Core::Formatters::DocumentationFormatter < ::RSpec::Core::Formatters::BaseTextFormatter - # @return [DocumentationFormatter] a new instance of DocumentationFormatter - # - # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#12 + # pkg:gem/rspec-core#lib/rspec/core/formatters/documentation_formatter.rb:12 def initialize(output); end - # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#50 + # pkg:gem/rspec-core#lib/rspec/core/formatters/documentation_formatter.rb:50 def example_failed(failure); end - # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#31 + # pkg:gem/rspec-core#lib/rspec/core/formatters/documentation_formatter.rb:31 def example_group_finished(_notification); end - # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#24 + # pkg:gem/rspec-core#lib/rspec/core/formatters/documentation_formatter.rb:24 def example_group_started(notification); end - # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#35 + # pkg:gem/rspec-core#lib/rspec/core/formatters/documentation_formatter.rb:35 def example_passed(passed); end - # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#42 + # pkg:gem/rspec-core#lib/rspec/core/formatters/documentation_formatter.rb:42 def example_pending(pending); end - # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#20 + # pkg:gem/rspec-core#lib/rspec/core/formatters/documentation_formatter.rb:20 def example_started(_notification); end - # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#57 + # pkg:gem/rspec-core#lib/rspec/core/formatters/documentation_formatter.rb:57 def message(notification); end private - # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#96 + # pkg:gem/rspec-core#lib/rspec/core/formatters/documentation_formatter.rb:96 def current_indentation(offset = T.unsafe(nil)); end - # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#85 + # pkg:gem/rspec-core#lib/rspec/core/formatters/documentation_formatter.rb:85 def failure_output(example); end - # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#67 + # pkg:gem/rspec-core#lib/rspec/core/formatters/documentation_formatter.rb:67 def flush_messages; end - # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#91 + # pkg:gem/rspec-core#lib/rspec/core/formatters/documentation_formatter.rb:91 def next_failure_index; end - # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#75 + # pkg:gem/rspec-core#lib/rspec/core/formatters/documentation_formatter.rb:75 def passed_output(example); end - # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#79 + # pkg:gem/rspec-core#lib/rspec/core/formatters/documentation_formatter.rb:79 def pending_output(example, message); end end # @private # -# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#11 +# pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:11 class RSpec::Core::Formatters::ExceptionPresenter - # @return [ExceptionPresenter] a new instance of ExceptionPresenter - # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#16 + # pkg:gem/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#78 + # pkg:gem/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 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:33 def colorized_message_lines(colorizer = T.unsafe(nil)); end - # Returns the value of attribute description. - # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#12 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:12 def description; end - # Returns the value of attribute example. - # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#12 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:12 def example; end - # Returns the value of attribute exception. - # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#12 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:12 def exception; end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#39 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:39 def formatted_backtrace(exception = T.unsafe(nil)); end # :nocov: # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#45 + # pkg:gem/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#84 + # pkg:gem/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#89 + # pkg:gem/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 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:29 def message_lines; end private - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#226 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:226 def add_shared_group_lines(lines, colorizer); end - # Returns the value of attribute backtrace_formatter. - # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#12 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:12 def backtrace_formatter; end - # Returns the value of attribute detail_formatter. - # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#12 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:12 def detail_formatter; end + # for 1.8.7 # :nocov: # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#286 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:287 def encoded_description(description); end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#120 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:120 def encoded_string(string); end + # for 1.8.7 # :nocov: # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#116 + # pkg:gem/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#298 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:299 def exception_backtrace; end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#150 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:150 def exception_class_name(exception = T.unsafe(nil)); end # :nocov: # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#204 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:204 def exception_lines; end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#185 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:185 def exception_message_string(exception); end - # Returns the value of attribute extra_detail_formatter. - # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#12 + # pkg:gem/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#215 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:215 def extra_failure_lines; end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#156 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:156 def failure_lines; end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#170 + # pkg:gem/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#104 + # pkg:gem/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#262 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:262 def find_failed_line; end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#277 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:278 def formatted_message_and_backtrace(colorizer); end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#134 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:134 def indent_lines(lines, failure_number); end - # Returns the value of attribute message_color. - # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#12 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:12 def message_color; end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#236 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:236 def read_failed_lines; end end +# @private # Configuring the `ExceptionPresenter` with the right set of options to handle # pending vs failed vs skipped and aggregated (or not) failures is not simple. # This class takes care of building an appropriate `ExceptionPresenter` for the # provided example. # -# @private -# -# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#307 +# pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:308 class RSpec::Core::Formatters::ExceptionPresenter::Factory - # @return [Factory] a new instance of Factory - # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#314 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:315 def initialize(example); end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#308 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:309 def build; end private - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#369 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:370 def multiple_exception_summarizer(exception, prior_detail_formatter, color); end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#365 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:366 def multiple_exceptions_error?(exception); end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#324 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:325 def options; end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#328 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:329 def pending_options; end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#390 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:391 def sub_failure_list_formatter(exception, message_color); end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#349 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:350 def with_multiple_error_options_as_needed(exception, options); end end # @private # -# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#423 +# pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:424 class RSpec::Core::Formatters::ExceptionPresenter::Factory::CommonBacktraceTruncater - # @return [CommonBacktraceTruncater] a new instance of CommonBacktraceTruncater - # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#424 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:425 def initialize(parent); end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#428 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:429 def with_truncated_backtrace(child); end end +# @private # Used to prevent a confusing backtrace from showing up from the `aggregate_failures` # block declared for `:aggregate_failures` metadata. # -# @private -# -# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#416 +# pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:417 module RSpec::Core::Formatters::ExceptionPresenter::Factory::EmptyBacktraceFormatter class << self - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#417 - def format_backtrace(*_arg0); end + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:418 + def format_backtrace(*); end end end # @private # -# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#448 +# pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:449 RSpec::Core::Formatters::ExceptionPresenter::PENDING_DETAIL_FORMATTER = T.let(T.unsafe(nil), Proc) # @private # -# source://rspec-core//lib/rspec/core/formatters/failure_list_formatter.rb#7 +# pkg:gem/rspec-core#lib/rspec/core/formatters/failure_list_formatter.rb:7 class RSpec::Core::Formatters::FailureListFormatter < ::RSpec::Core::Formatters::BaseFormatter # Discard profile and messages # # These outputs are not really relevant in the context of this failure # list formatter. # - # source://rspec-core//lib/rspec/core/formatters/failure_list_formatter.rb#18 + # pkg:gem/rspec-core#lib/rspec/core/formatters/failure_list_formatter.rb:18 def dump_profile(_profile); end - # source://rspec-core//lib/rspec/core/formatters/failure_list_formatter.rb#10 + # pkg:gem/rspec-core#lib/rspec/core/formatters/failure_list_formatter.rb:10 def example_failed(failure); end - # source://rspec-core//lib/rspec/core/formatters/failure_list_formatter.rb#19 + # pkg:gem/rspec-core#lib/rspec/core/formatters/failure_list_formatter.rb:19 def message(_message); end end +# @api private # Formatter for providing message output as a fallback when no other # profiler implements #message # -# @api private -# -# source://rspec-core//lib/rspec/core/formatters/fallback_message_formatter.rb#7 +# pkg:gem/rspec-core#lib/rspec/core/formatters/fallback_message_formatter.rb:7 class RSpec::Core::Formatters::FallbackMessageFormatter - # @api private - # @return [FallbackMessageFormatter] a new instance of FallbackMessageFormatter - # - # source://rspec-core//lib/rspec/core/formatters/fallback_message_formatter.rb#10 + # pkg:gem/rspec-core#lib/rspec/core/formatters/fallback_message_formatter.rb:10 def initialize(output); end + # @api public + # # Used by the reporter to send messages to the output stream. # - # @api public # @param notification [MessageNotification] containing message # - # source://rspec-core//lib/rspec/core/formatters/fallback_message_formatter.rb#22 + # pkg:gem/rspec-core#lib/rspec/core/formatters/fallback_message_formatter.rb:22 def message(notification); end - # @api private # @private # - # source://rspec-core//lib/rspec/core/formatters/fallback_message_formatter.rb#15 + # pkg:gem/rspec-core#lib/rspec/core/formatters/fallback_message_formatter.rb:15 def output; end end # Formatters helpers. # -# source://rspec-core//lib/rspec/core/formatters/helpers.rb#7 +# pkg:gem/rspec-core#lib/rspec/core/formatters/helpers.rb:7 module RSpec::Core::Formatters::Helpers class << self + # @api private + # # Formats seconds into a human-readable string. # - # @api private - # @example - # format_duration(1) #=> "1 minute 1 second" - # format_duration(135.14) #=> "2 minutes 15.14 seconds" # @param duration [Float, Fixnum] in seconds # @return [String] human-readable time # - # source://rspec-core//lib/rspec/core/formatters/helpers.rb#24 + # @example + # format_duration(1) #=> "1 minute 1 second" + # format_duration(135.14) #=> "2 minutes 15.14 seconds" + # + # pkg:gem/rspec-core#lib/rspec/core/formatters/helpers.rb:24 def format_duration(duration); end + # @api private + # # Formats seconds to have 5 digits of precision with trailing zeros # removed if the number is less than 1 or with 2 digits of precision if # the number is greater than zero. # + # @param float [Float] + # @return [String] formatted float + # + # @example + # format_seconds(0.000006) #=> "0.00001" + # format_seconds(0.020000) #=> "0.02" + # format_seconds(1.00000000001) #=> "1" + # # The precision used is set in {Helpers::SUB_SECOND_PRECISION} and # {Helpers::DEFAULT_PRECISION}. # - # @api private - # @example - # format_seconds(0.000006) #=> "0.00001" - # format_seconds(0.020000) #=> "0.02" - # format_seconds(1.00000000001) #=> "1" - # @param float [Float] - # @return [String] formatted float # @see #strip_trailing_zeroes # - # source://rspec-core//lib/rspec/core/formatters/helpers.rb#60 + # pkg:gem/rspec-core#lib/rspec/core/formatters/helpers.rb:60 def format_seconds(float, precision = T.unsafe(nil)); end - # Given a list of example ids, organizes them into a compact, ordered list. - # # @api private + # Given a list of example ids, organizes them into a compact, ordered list. # - # source://rspec-core//lib/rspec/core/formatters/helpers.rb#102 + # pkg:gem/rspec-core#lib/rspec/core/formatters/helpers.rb:102 def organize_ids(ids); end + # @api private + # # Pluralize a word based on a count. # - # @api private # @param count [Fixnum] number of objects # @param string [String] word to be pluralized # @return [String] pluralized word # - # source://rspec-core//lib/rspec/core/formatters/helpers.rb#88 + # pkg:gem/rspec-core#lib/rspec/core/formatters/helpers.rb:88 def pluralize(count, string); end private + # @api private + # # Remove trailing zeros from a string. # # Only remove trailing zeros after a decimal place. # see: http://rubular.com/r/ojtTydOgpn # - # @api private # @param string [String] string with trailing zeros # @return [String] string with trailing zeros removed # - # source://rspec-core//lib/rspec/core/formatters/helpers.rb#76 + # pkg:gem/rspec-core#lib/rspec/core/formatters/helpers.rb:76 def strip_trailing_zeroes(string); end end end # @private # -# source://rspec-core//lib/rspec/core/formatters/helpers.rb#12 +# pkg:gem/rspec-core#lib/rspec/core/formatters/helpers.rb:12 RSpec::Core::Formatters::Helpers::DEFAULT_PRECISION = T.let(T.unsafe(nil), Integer) # @private # -# source://rspec-core//lib/rspec/core/formatters/helpers.rb#9 +# pkg:gem/rspec-core#lib/rspec/core/formatters/helpers.rb:9 RSpec::Core::Formatters::Helpers::SUB_SECOND_PRECISION = T.let(T.unsafe(nil), Integer) # @private # -# source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#8 +# pkg:gem/rspec-core#lib/rspec/core/formatters/html_formatter.rb:8 class RSpec::Core::Formatters::HtmlFormatter < ::RSpec::Core::Formatters::BaseFormatter - # @return [HtmlFormatter] a new instance of HtmlFormatter - # - # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#13 + # pkg:gem/rspec-core#lib/rspec/core/formatters/html_formatter.rb:13 def initialize(output); end - # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#103 + # pkg:gem/rspec-core#lib/rspec/core/formatters/html_formatter.rb:103 def dump_summary(summary); end - # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#55 + # pkg:gem/rspec-core#lib/rspec/core/formatters/html_formatter.rb:55 def example_failed(failure); end - # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#28 + # pkg:gem/rspec-core#lib/rspec/core/formatters/html_formatter.rb:28 def example_group_started(notification); end - # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#49 + # pkg:gem/rspec-core#lib/rspec/core/formatters/html_formatter.rb:49 def example_passed(passed); end - # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#93 + # pkg:gem/rspec-core#lib/rspec/core/formatters/html_formatter.rb:93 def example_pending(pending); end - # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#45 + # pkg:gem/rspec-core#lib/rspec/core/formatters/html_formatter.rb:45 def example_started(_notification); end - # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#22 + # pkg:gem/rspec-core#lib/rspec/core/formatters/html_formatter.rb:22 def start(notification); end - # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#40 + # pkg:gem/rspec-core#lib/rspec/core/formatters/html_formatter.rb:40 def start_dump(_notification); end private # The number of the currently running example_group. # - # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#120 + # pkg:gem/rspec-core#lib/rspec/core/formatters/html_formatter.rb:120 def example_group_number; end # The number of the currently running example (a global counter). # - # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#125 + # pkg:gem/rspec-core#lib/rspec/core/formatters/html_formatter.rb:125 def example_number; end # Override this method if you wish to output extra HTML for a failed # spec. For example, you could output links to images or other files # produced during the specs. # - # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#141 + # pkg:gem/rspec-core#lib/rspec/core/formatters/html_formatter.rb:141 def extra_failure_content(failure); end - # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#130 + # pkg:gem/rspec-core#lib/rspec/core/formatters/html_formatter.rb:130 def percent_done; end end # @private # -# source://rspec-core//lib/rspec/core/formatters/html_printer.rb#7 +# pkg:gem/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 + # For the #h method. # - # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#9 + # pkg:gem/rspec-core#lib/rspec/core/formatters/html_printer.rb:9 def initialize(output); end - # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#79 + # pkg:gem/rspec-core#lib/rspec/core/formatters/html_printer.rb:79 def flush; end - # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#96 + # pkg:gem/rspec-core#lib/rspec/core/formatters/html_printer.rb:96 def make_example_group_header_red(group_id); end - # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#103 + # pkg:gem/rspec-core#lib/rspec/core/formatters/html_printer.rb:103 def make_example_group_header_yellow(group_id); end - # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#88 + # pkg:gem/rspec-core#lib/rspec/core/formatters/html_printer.rb:88 def make_header_red; end - # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#92 + # pkg:gem/rspec-core#lib/rspec/core/formatters/html_printer.rb:92 def make_header_yellow; end - # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#83 + # pkg:gem/rspec-core#lib/rspec/core/formatters/html_printer.rb:83 def move_progress(percent_done); end - # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#36 + # pkg:gem/rspec-core#lib/rspec/core/formatters/html_printer.rb:36 def print_example_failed(pending_fixed, description, run_time, failure_id, exception, extra_content); end - # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#18 + # pkg:gem/rspec-core#lib/rspec/core/formatters/html_printer.rb:18 def print_example_group_end; end - # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/formatters/html_printer.rb:23 def print_example_group_start(group_id, description, number_of_parents); end - # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#29 + # pkg:gem/rspec-core#lib/rspec/core/formatters/html_printer.rb:29 def print_example_passed(description, run_time); end - # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#53 + # pkg:gem/rspec-core#lib/rspec/core/formatters/html_printer.rb:53 def print_example_pending(description, pending_message); end - # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#13 + # pkg:gem/rspec-core#lib/rspec/core/formatters/html_printer.rb:13 def print_html_start; end - # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#59 + # pkg:gem/rspec-core#lib/rspec/core/formatters/html_printer.rb:59 def print_summary(duration, example_count, failure_count, pending_count); end private - # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#112 + # pkg:gem/rspec-core#lib/rspec/core/formatters/html_printer.rb:112 def indentation_style(number_of_parents); end end -# source://rspec-core//lib/rspec/core/formatters/html_printer.rb#140 +# pkg:gem/rspec-core#lib/rspec/core/formatters/html_printer.rb:140 RSpec::Core::Formatters::HtmlPrinter::GLOBAL_SCRIPTS = T.let(T.unsafe(nil), String) -# source://rspec-core//lib/rspec/core/formatters/html_printer.rb#218 +# pkg:gem/rspec-core#lib/rspec/core/formatters/html_printer.rb:218 RSpec::Core::Formatters::HtmlPrinter::GLOBAL_STYLES = T.let(T.unsafe(nil), String) -# source://rspec-core//lib/rspec/core/formatters/html_printer.rb#382 +# pkg:gem/rspec-core#lib/rspec/core/formatters/html_printer.rb:382 RSpec::Core::Formatters::HtmlPrinter::HTML_HEADER = T.let(T.unsafe(nil), String) -# source://rspec-core//lib/rspec/core/formatters/html_printer.rb#116 +# pkg:gem/rspec-core#lib/rspec/core/formatters/html_printer.rb:116 RSpec::Core::Formatters::HtmlPrinter::REPORT_HEADER = T.let(T.unsafe(nil), String) # @private # -# source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#8 +# pkg:gem/rspec-core#lib/rspec/core/formatters/json_formatter.rb:8 class RSpec::Core::Formatters::JsonFormatter < ::RSpec::Core::Formatters::BaseFormatter - # @return [JsonFormatter] a new instance of JsonFormatter - # - # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#13 + # pkg:gem/rspec-core#lib/rspec/core/formatters/json_formatter.rb:13 def initialize(output); end - # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#56 + # pkg:gem/rspec-core#lib/rspec/core/formatters/json_formatter.rb:56 def close(_notification); end - # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#60 + # pkg:gem/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#79 + # pkg:gem/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#67 + # pkg:gem/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 + # pkg:gem/rspec-core#lib/rspec/core/formatters/json_formatter.rb:24 def dump_summary(summary); end - # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#20 + # pkg:gem/rspec-core#lib/rspec/core/formatters/json_formatter.rb:20 def message(notification); end - # Returns the value of attribute output_hash. - # - # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#11 + # pkg:gem/rspec-core#lib/rspec/core/formatters/json_formatter.rb:11 def output_hash; end - # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#51 + # pkg:gem/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 + # pkg:gem/rspec-core#lib/rspec/core/formatters/json_formatter.rb:35 def stop(group_notification); end private - # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#88 + # pkg:gem/rspec-core#lib/rspec/core/formatters/json_formatter.rb:88 def format_example(example); end end +# @api private +# # `RSpec::Core::Formatters::Loader` is an internal class for # managing formatters used by a particular configuration. It is # not expected to be used directly, but only through the configuration # interface. # -# @api private -# -# source://rspec-core//lib/rspec/core/formatters.rb#96 +# pkg:gem/rspec-core#lib/rspec/core/formatters.rb:96 class RSpec::Core::Formatters::Loader # @api private - # @return [Loader] a new instance of Loader # - # source://rspec-core//lib/rspec/core/formatters.rb#105 + # pkg:gem/rspec-core#lib/rspec/core/formatters.rb:105 def initialize(reporter); end - # @api private # @private # - # source://rspec-core//lib/rspec/core/formatters.rb#144 + # pkg:gem/rspec-core#lib/rspec/core/formatters.rb:144 def add(formatter_to_use, *paths); end - # @api private # @return [String] the default formatter to setup, defaults to `progress` # - # source://rspec-core//lib/rspec/core/formatters.rb#118 + # pkg:gem/rspec-core#lib/rspec/core/formatters.rb:118 def default_formatter; end - # @api private # @return [String] the default formatter to setup, defaults to `progress` # - # source://rspec-core//lib/rspec/core/formatters.rb#118 + # pkg:gem/rspec-core#lib/rspec/core/formatters.rb:118 def default_formatter=(_arg0); end - # @api private # @return [Array] the loaded formatters # - # source://rspec-core//lib/rspec/core/formatters.rb#112 + # pkg:gem/rspec-core#lib/rspec/core/formatters.rb:112 def formatters; end - # @api private # @private # - # source://rspec-core//lib/rspec/core/formatters.rb#121 + # pkg:gem/rspec-core#lib/rspec/core/formatters.rb:121 def prepare_default(output_stream, deprecation_stream); end - # @api private # @return [Reporter] the reporter # - # source://rspec-core//lib/rspec/core/formatters.rb#115 + # pkg:gem/rspec-core#lib/rspec/core/formatters.rb:115 def reporter; end - # @api private # @private # - # source://rspec-core//lib/rspec/core/formatters.rb#126 + # pkg:gem/rspec-core#lib/rspec/core/formatters.rb:126 def setup_default(output_stream, deprecation_stream); end private - # @api private - # - # source://rspec-core//lib/rspec/core/formatters.rb#211 + # pkg:gem/rspec-core#lib/rspec/core/formatters.rb:211 def built_in_formatter(key); end - # @api private - # - # source://rspec-core//lib/rspec/core/formatters.rb#234 + # pkg:gem/rspec-core#lib/rspec/core/formatters.rb:234 def custom_formatter(formatter_ref); end - # @api private - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/formatters.rb#195 + # pkg:gem/rspec-core#lib/rspec/core/formatters.rb:195 def duplicate_formatter_exists?(new_formatter); end - # @api private - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/formatters.rb#207 + # pkg:gem/rspec-core#lib/rspec/core/formatters.rb:207 def existing_formatter_implements?(notification); end - # @api private - # - # source://rspec-core//lib/rspec/core/formatters.rb#181 + # pkg:gem/rspec-core#lib/rspec/core/formatters.rb:181 def find_formatter(formatter_to_use); end - # @api private - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/formatters.rb#202 + # pkg:gem/rspec-core#lib/rspec/core/formatters.rb:202 def has_matching_output?(formatter, new_formatter); end - # @api private - # - # source://rspec-core//lib/rspec/core/formatters.rb#228 + # pkg:gem/rspec-core#lib/rspec/core/formatters.rb:228 def notifications_for(formatter_class); end - # @api private - # - # source://rspec-core//lib/rspec/core/formatters.rb#269 + # pkg:gem/rspec-core#lib/rspec/core/formatters.rb:269 def open_stream(path_or_wrapper); end - # @api private - # - # source://rspec-core//lib/rspec/core/formatters.rb#250 + # pkg:gem/rspec-core#lib/rspec/core/formatters.rb:250 def path_for(const_ref); end - # @api private - # - # source://rspec-core//lib/rspec/core/formatters.rb#188 + # pkg:gem/rspec-core#lib/rspec/core/formatters.rb:188 def register(formatter, notifications); end - # @api private - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/formatters.rb#246 + # pkg:gem/rspec-core#lib/rspec/core/formatters.rb:246 def string_const?(str); end # activesupport/lib/active_support/inflector/methods.rb, line 48 # - # @api private - # - # source://rspec-core//lib/rspec/core/formatters.rb#259 + # pkg:gem/rspec-core#lib/rspec/core/formatters.rb:259 def underscore(camel_cased_word); end - # @api private - # - # source://rspec-core//lib/rspec/core/formatters.rb#254 + # pkg:gem/rspec-core#lib/rspec/core/formatters.rb:254 def underscore_with_fix_for_non_standard_rspec_naming(string); end class << self - # Internal formatters are stored here when loaded. - # # @api private # - # source://rspec-core//lib/rspec/core/formatters.rb#100 + # Internal formatters are stored here when loaded. + # + # pkg:gem/rspec-core#lib/rspec/core/formatters.rb:100 def formatters; end end end -# Formatter for providing profile output. -# # @api private +# Formatter for providing profile output. # -# source://rspec-core//lib/rspec/core/formatters/profile_formatter.rb#8 +# pkg:gem/rspec-core#lib/rspec/core/formatters/profile_formatter.rb:8 class RSpec::Core::Formatters::ProfileFormatter - # @api private - # @return [ProfileFormatter] a new instance of ProfileFormatter - # - # source://rspec-core//lib/rspec/core/formatters/profile_formatter.rb#11 + # pkg:gem/rspec-core#lib/rspec/core/formatters/profile_formatter.rb:11 def initialize(output); end + # @api public + # # This method is invoked after the dumping the summary if profiling is # enabled. # - # @api public # @param profile [ProfileNotification] containing duration, # slowest_examples and slowest_example_groups # - # source://rspec-core//lib/rspec/core/formatters/profile_formatter.rb#25 + # pkg:gem/rspec-core#lib/rspec/core/formatters/profile_formatter.rb:25 def dump_profile(profile); end - # @api private # @private # - # source://rspec-core//lib/rspec/core/formatters/profile_formatter.rb#16 + # pkg:gem/rspec-core#lib/rspec/core/formatters/profile_formatter.rb:16 def output; end private - # @api private - # - # source://rspec-core//lib/rspec/core/formatters/profile_formatter.rb#62 + # pkg:gem/rspec-core#lib/rspec/core/formatters/profile_formatter.rb:62 def bold(text); end - # @api private - # - # source://rspec-core//lib/rspec/core/formatters/profile_formatter.rb#44 + # pkg:gem/rspec-core#lib/rspec/core/formatters/profile_formatter.rb:44 def dump_profile_slowest_example_groups(profile); end - # @api private - # - # source://rspec-core//lib/rspec/core/formatters/profile_formatter.rb#32 + # pkg:gem/rspec-core#lib/rspec/core/formatters/profile_formatter.rb:32 def dump_profile_slowest_examples(profile); end - # @api private - # - # source://rspec-core//lib/rspec/core/formatters/profile_formatter.rb#57 + # pkg:gem/rspec-core#lib/rspec/core/formatters/profile_formatter.rb:57 def format_caller(caller_info); end end # @private # -# source://rspec-core//lib/rspec/core/formatters/progress_formatter.rb#8 +# pkg:gem/rspec-core#lib/rspec/core/formatters/progress_formatter.rb:8 class RSpec::Core::Formatters::ProgressFormatter < ::RSpec::Core::Formatters::BaseTextFormatter - # source://rspec-core//lib/rspec/core/formatters/progress_formatter.rb#19 + # pkg:gem/rspec-core#lib/rspec/core/formatters/progress_formatter.rb:19 def example_failed(_notification); end - # source://rspec-core//lib/rspec/core/formatters/progress_formatter.rb#11 + # pkg:gem/rspec-core#lib/rspec/core/formatters/progress_formatter.rb:11 def example_passed(_notification); end - # source://rspec-core//lib/rspec/core/formatters/progress_formatter.rb#15 + # pkg:gem/rspec-core#lib/rspec/core/formatters/progress_formatter.rb:15 def example_pending(_notification); end - # source://rspec-core//lib/rspec/core/formatters/progress_formatter.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/formatters/progress_formatter.rb:23 def start_dump(_notification); end end # @private # -# source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#5 +# pkg:gem/rspec-core#lib/rspec/core/formatters/snippet_extractor.rb:5 class RSpec::Core::Formatters::SnippetExtractor - # @return [SnippetExtractor] a new instance of SnippetExtractor - # - # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#35 + # pkg:gem/rspec-core#lib/rspec/core/formatters/snippet_extractor.rb:35 def initialize(source, beginning_line_number, max_line_count = T.unsafe(nil)); end - # Returns the value of attribute beginning_line_number. - # - # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#24 + # pkg:gem/rspec-core#lib/rspec/core/formatters/snippet_extractor.rb:24 def beginning_line_number; end - # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#41 + # pkg:gem/rspec-core#lib/rspec/core/formatters/snippet_extractor.rb:41 def expression_lines; end - # Returns the value of attribute max_line_count. - # - # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#24 + # pkg:gem/rspec-core#lib/rspec/core/formatters/snippet_extractor.rb:24 def max_line_count; end - # Returns the value of attribute source. - # - # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#24 + # pkg:gem/rspec-core#lib/rspec/core/formatters/snippet_extractor.rb:24 def source; end private - # @raise [NoExpressionAtLineError] - # - # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#95 + # pkg:gem/rspec-core#lib/rspec/core/formatters/snippet_extractor.rb:95 def expression_node; end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#107 + # pkg:gem/rspec-core#lib/rspec/core/formatters/snippet_extractor.rb:107 def expression_outmost_node?(node); end - # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#55 + # pkg:gem/rspec-core#lib/rspec/core/formatters/snippet_extractor.rb:55 def line_range_of_expression; end - # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#87 + # pkg:gem/rspec-core#lib/rspec/core/formatters/snippet_extractor.rb:87 def line_range_of_location_nodes_in_expression; end - # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#117 + # pkg:gem/rspec-core#lib/rspec/core/formatters/snippet_extractor.rb:117 def location_nodes_at_beginning_line; end - # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#70 + # pkg:gem/rspec-core#lib/rspec/core/formatters/snippet_extractor.rb:70 def unclosed_tokens_in_line_range(line_range); end class << self # :nocov: # - # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#26 + # pkg:gem/rspec-core#lib/rspec/core/formatters/snippet_extractor.rb:26 def extract_expression_lines_at(file_path, beginning_line_number, max_line_count = T.unsafe(nil)); end - # @raise [NoSuchLineError] - # - # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#9 + # pkg:gem/rspec-core#lib/rspec/core/formatters/snippet_extractor.rb:9 def extract_line_at(file_path, line_number); end - # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#128 + # pkg:gem/rspec-core#lib/rspec/core/formatters/snippet_extractor.rb:128 def least_indentation_from(lines); end - # @raise [NoSuchFileError] - # - # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#16 + # pkg:gem/rspec-core#lib/rspec/core/formatters/snippet_extractor.rb:16 def source_from_file(path); end end end -# source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#22 +# pkg:gem/rspec-core#lib/rspec/core/formatters/snippet_extractor.rb:22 class RSpec::Core::Formatters::SnippetExtractor::NoExpressionAtLineError < ::StandardError; end -# source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#6 +# pkg:gem/rspec-core#lib/rspec/core/formatters/snippet_extractor.rb:6 class RSpec::Core::Formatters::SnippetExtractor::NoSuchFileError < ::StandardError; end -# source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#7 +# pkg:gem/rspec-core#lib/rspec/core/formatters/snippet_extractor.rb:7 class RSpec::Core::Formatters::SnippetExtractor::NoSuchLineError < ::StandardError; end +# @private # Provides terminal syntax highlighting of code snippets # when coderay is available. # -# @private -# -# source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#7 +# pkg:gem/rspec-core#lib/rspec/core/formatters/syntax_highlighter.rb:7 class RSpec::Core::Formatters::SyntaxHighlighter - # @return [SyntaxHighlighter] a new instance of SyntaxHighlighter - # - # source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#8 + # pkg:gem/rspec-core#lib/rspec/core/formatters/syntax_highlighter.rb:8 def initialize(configuration); end - # source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#12 + # pkg:gem/rspec-core#lib/rspec/core/formatters/syntax_highlighter.rb:12 def highlight(lines); end private - # source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#50 + # pkg:gem/rspec-core#lib/rspec/core/formatters/syntax_highlighter.rb:50 def color_enabled_implementation; end # :nocov: # - # source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#44 + # pkg:gem/rspec-core#lib/rspec/core/formatters/syntax_highlighter.rb:44 def implementation; end class << self - # source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#18 + # pkg:gem/rspec-core#lib/rspec/core/formatters/syntax_highlighter.rb:18 def attempt_to_add_rspec_terms_to_coderay_keywords; end end end # @private # -# source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#61 +# pkg:gem/rspec-core#lib/rspec/core/formatters/syntax_highlighter.rb:61 module RSpec::Core::Formatters::SyntaxHighlighter::CodeRayImplementation class << self - # source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#64 + # pkg:gem/rspec-core#lib/rspec/core/formatters/syntax_highlighter.rb:64 def highlight_syntax(lines); end end end -# source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#62 +# pkg:gem/rspec-core#lib/rspec/core/formatters/syntax_highlighter.rb:62 RSpec::Core::Formatters::SyntaxHighlighter::CodeRayImplementation::RESET_CODE = T.let(T.unsafe(nil), String) # @private # -# source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#78 +# pkg:gem/rspec-core#lib/rspec/core/formatters/syntax_highlighter.rb:78 module RSpec::Core::Formatters::SyntaxHighlighter::NoSyntaxHighlightingImplementation class << self - # source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#79 + # pkg:gem/rspec-core#lib/rspec/core/formatters/syntax_highlighter.rb:79 def highlight_syntax(lines); end end end +# @private # Not sure why, but our code above (and/or coderay itself) does not work # on Windows, so we disable the feature on Windows. # -# @private -# -# source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#87 +# pkg:gem/rspec-core#lib/rspec/core/formatters/syntax_highlighter.rb:87 RSpec::Core::Formatters::SyntaxHighlighter::WindowsImplementation = RSpec::Core::Formatters::SyntaxHighlighter::NoSyntaxHighlightingImplementation # Mixin that makes the including class imitate a hash for backwards # compatibility. The including class should use `attr_accessor` to # declare attributes. -# # @private # -# source://rspec-core//lib/rspec/core/metadata.rb#349 +# pkg:gem/rspec-core#lib/rspec/core/metadata.rb:349 module RSpec::Core::HashImitatable mixes_in_class_methods ::RSpec::Core::HashImitatable::ClassMethods - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def <(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def <=(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def >(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def >=(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#388 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:388 def [](key); end - # source://rspec-core//lib/rspec/core/metadata.rb#398 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:398 def []=(key, value); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def all?(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def any?(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def assoc(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def chain(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def chunk(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def chunk_while(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def clear(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def collect(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def collect_concat(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def compact(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def compact!(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def compare_by_identity(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def compare_by_identity?(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def count(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def cycle(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def deconstruct_keys(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def default(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def default=(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def default_proc(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def default_proc=(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def delete(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def delete_if(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def detect(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def dig(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def drop(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def drop_while(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def each(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def each_cons(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def each_entry(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def each_key(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def each_pair(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def each_slice(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def each_value(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def each_with_index(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def each_with_object(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def empty?(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def entries(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def except(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def fetch(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def fetch_values(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def filter(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def filter!(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def filter_map(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def find(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def find_all(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def find_index(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def first(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def flat_map(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def flatten(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def grep(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def grep_v(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def group_by(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def has_key?(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def has_value?(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def include?(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def inject(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def invert(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def keep_if(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def key(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def key?(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def keys(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def lazy(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def length(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def map(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def max(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def max_by(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def member?(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def merge(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def merge!(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def min(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def min_by(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def minmax(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def minmax_by(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def none?(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def one?(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def partition(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def rassoc(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def reduce(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def rehash(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def reject(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def reject!(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def replace(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def reverse_each(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def select(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def select!(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def shift(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def size(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def slice(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def slice_after(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def slice_before(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def slice_when(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def sort(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def sort_by(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def store(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def sum(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def take(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def take_while(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def tally(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def to_a(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#354 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:354 def to_h; end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def to_hash(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def to_proc(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def to_set(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def transform_keys(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def transform_keys!(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def transform_values(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def transform_values!(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def uniq(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def update(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def value?(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def values(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def values_at(*args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#367 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:367 def zip(*args, &block); end private - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/metadata.rb#414 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:414 def directly_supports_attribute?(name); end - # source://rspec-core//lib/rspec/core/metadata.rb#410 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:410 def extra_hash_attributes; end - # source://rspec-core//lib/rspec/core/metadata.rb#418 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:418 def get_value(name); end - # source://rspec-core//lib/rspec/core/metadata.rb#426 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:426 def hash_for_delegation; end - # source://rspec-core//lib/rspec/core/metadata.rb#430 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:430 def issue_deprecation(_method_name, *_args); end - # source://rspec-core//lib/rspec/core/metadata.rb#422 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:422 def set_value(name, value); end class << self - # @private - # - # source://rspec-core//lib/rspec/core/metadata.rb#350 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:350 def included(klass); end end end # @private # -# source://rspec-core//lib/rspec/core/metadata.rb#435 +# pkg:gem/rspec-core#lib/rspec/core/metadata.rb:435 module RSpec::Core::HashImitatable::ClassMethods - # source://rspec-core//lib/rspec/core/metadata.rb#440 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:440 def attr_accessor(*names); end - # source://rspec-core//lib/rspec/core/metadata.rb#436 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:436 def hash_attribute_names; end end @@ -6622,8 +5739,34 @@ end # available off of the configuration object to define global setup # or teardown logic. # -# source://rspec-core//lib/rspec/core/hooks.rb#9 +# pkg:gem/rspec-core#lib/rspec/core/hooks.rb:9 module RSpec::Core::Hooks + # @api public + # @overload after(&block) + # @overload after(scope, &block) + # @param scope [Symbol] `:example`, `:context`, or `:suite` (defaults to + # `:example`) + # @overload after(scope, *conditions, &block) + # @param scope [Symbol] `:example`, `:context`, or `:suite` (defaults to + # `:example`) + # @param conditions [Array, Hash] constrains this hook to + # examples matching these conditions e.g. + # `after(:example, :ui => true) { ... }` will only run with examples + # or groups declared with `:ui => true`. Symbols will be transformed + # into hash entries with `true` values. + # @overload after(conditions, &block) + # @param conditions [Hash] + # constrains this hook to examples matching these conditions e.g. + # `after(:example, :ui => true) { ... }` will only run with examples + # or groups declared with `:ui => true`. + # + # @see #before + # @see #around + # @see ExampleGroup + # @see SharedContext + # @see SharedExampleGroup + # @see Configuration + # # Declare a block of code to be run after each example (using `:example`) # or once after all examples n the context (using `:context`). See # {#before} for more information about ordering. @@ -6656,24 +5799,13 @@ module RSpec::Core::Hooks # Also `around` hooks will run after any `after` example hooks are # invoked but before any `after` context hooks. # - # @api public - # @note The `:suite` scope is only supported for hooks registered on - # `RSpec.configuration` since they exist independently of any - # example or example group. # @note The `:example` and `:context` scopes are also available as - # `:each` and `:all`, respectively. Use whichever you prefer. - # @overload after - # @overload after - # @overload after - # @overload after - # @see #before - # @see #around - # @see ExampleGroup - # @see SharedContext - # @see SharedExampleGroup - # @see Configuration + # `:each` and `:all`, respectively. Use whichever you prefer. + # @note The `:suite` scope is only supported for hooks registered on + # `RSpec.configuration` since they exist independently of any + # example or example group. # - # source://rspec-core//lib/rspec/core/hooks.rb#277 + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:277 def after(*args, &block); end # Adds `block` to the back of the list of `after` blocks in the same @@ -6681,183 +5813,44 @@ module RSpec::Core::Hooks # # See {#after} for scoping semantics. # - # source://rspec-core//lib/rspec/core/hooks.rb#287 + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:287 def append_after(*args, &block); end - # Declare a block of code to be run before each example (using `:example`) - # or once before any example (using `:context`). These are usually - # declared directly in the {ExampleGroup} to which they apply, but they - # can also be shared across multiple groups. - # - # You can also use `before(:suite)` to run a block of code before any - # example groups are run. This should be declared in {RSpec.configure}. - # - # Instance variables declared in `before(:example)` or `before(:context)` - # are accessible within each example. - # - # ### Order - # - # `before` hooks are stored in three scopes, which are run in order: - # `:suite`, `:context`, and `:example`. They can also be declared in - # several different places: `RSpec.configure`, a parent group, the current - # group. They are run in the following order: - # - # before(:suite) # Declared in RSpec.configure. - # before(:context) # Declared in RSpec.configure. - # before(:context) # Declared in a parent group. - # before(:context) # Declared in the current group. - # before(:example) # Declared in RSpec.configure. - # before(:example) # Declared in a parent group. - # before(:example) # Declared in the current group. - # - # If more than one `before` is declared within any one example group, they - # are run in the order in which they are declared. Any `around` hooks will - # execute after `before` context hooks but before any `before` example - # hook regardless of where they are declared. - # - # ### Conditions - # - # When you add a conditions hash to `before(:example)` or - # `before(:context)`, RSpec will only apply that hook to groups or - # examples that match the conditions. e.g. - # - # RSpec.configure do |config| - # config.before(:example, :authorized => true) do - # log_in_as :authorized_user - # end - # end - # - # RSpec.describe Something, :authorized => true do - # # The before hook will run in before each example in this group. - # end - # - # RSpec.describe SomethingElse do - # it "does something", :authorized => true do - # # The before hook will run before this example. - # end - # - # it "does something else" do - # # The hook will not run before this example. - # end - # end - # - # Note that filtered config `:context` hooks can still be applied - # to individual examples that have matching metadata. Just like - # Ruby's object model is that every object has a singleton class - # which has only a single instance, RSpec's model is that every - # example has a singleton example group containing just the one - # example. - # - # ### Warning: `before(:suite, :with => :conditions)` - # - # The conditions hash is used to match against specific examples. Since - # `before(:suite)` is not run in relation to any specific example or - # group, conditions passed along with `:suite` are effectively ignored. - # - # ### Exceptions - # - # When an exception is raised in a `before` block, RSpec skips any - # subsequent `before` blocks and the example, but runs all of the - # `after(:example)` and `after(:context)` hooks. - # - # ### Warning: implicit before blocks - # - # `before` hooks can also be declared in shared contexts which get - # included implicitly either by you or by extension libraries. Since - # RSpec runs these in the order in which they are declared within each - # scope, load order matters, and can lead to confusing results when one - # before block depends on state that is prepared in another before block - # that gets run later. - # - # ### Warning: `before(:context)` - # - # It is very tempting to use `before(:context)` to speed things up, but we - # recommend that you avoid this as there are a number of gotchas, as well - # as things that simply don't work. - # - # #### Context - # - # `before(:context)` is run in an example that is generated to provide - # group context for the block. - # - # #### Instance variables - # - # Instance variables declared in `before(:context)` are shared across all - # the examples in the group. This means that each example can change the - # state of a shared object, resulting in an ordering dependency that can - # make it difficult to reason about failures. - # - # #### Unsupported RSpec constructs - # - # RSpec has several constructs that reset state between each example - # automatically. These are not intended for use from within - # `before(:context)`: - # - # * `let` declarations - # * `subject` declarations - # * Any mocking, stubbing or test double declaration - # - # ### other frameworks - # - # Mock object frameworks and database transaction managers (like - # ActiveRecord) are typically designed around the idea of setting up - # before an example, running that one example, and then tearing down. This - # means that mocks and stubs can (sometimes) be declared in - # `before(:context)`, but get torn down before the first real example is - # ever run. - # - # You _can_ create database-backed model objects in a `before(:context)` - # in rspec-rails, but it will not be wrapped in a transaction for you, so - # you are on your own to clean up in an `after(:context)` block. - # + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:204 + def append_before(*args, &block); end + # @api public - # @example before(:example) declared in an {ExampleGroup} - # RSpec.describe Thing do - # before(:example) do - # @thing = Thing.new - # end + # @overload around(&block) + # @overload around(scope, &block) + # @param scope [Symbol] `:example` (defaults to `:example`) + # present for syntax parity with `before` and `after`, but + # `:example`/`:each` is the only supported value. + # @overload around(scope, *conditions, &block) + # @param scope [Symbol] `:example` (defaults to `:example`) + # present for syntax parity with `before` and `after`, but + # `:example`/`:each` is the only supported value. + # @param conditions [Array, Hash] constrains this hook to + # examples matching these conditions e.g. + # `around(:example, :ui => true) { ... }` will only run with examples + # or groups declared with `:ui => true`. Symbols will be transformed + # into hash entries with `true` values. + # @overload around(conditions, &block) + # @param conditions [Hash] constrains this hook to examples matching + # these conditions e.g. `around(:example, :ui => true) { ... }` will + # only run with examples or groups declared with `:ui => true`. # - # it "does something" do - # # Here you can access @thing. - # end - # end - # @example before(:context) declared in an {ExampleGroup} - # RSpec.describe Parser do - # before(:context) do - # File.open(file_to_parse, 'w') do |f| - # f.write <<-CONTENT - # stuff in the file - # CONTENT - # end - # end + # @yield [Example] the example to run # - # it "parses the file" do - # Parser.parse(file_to_parse) - # end + # @note the syntax of `around` is similar to that of `before` and `after` + # but the semantics are quite different. `before` and `after` hooks are + # run in the context of the examples with which they are associated, + # whereas `around` hooks are actually responsible for running the + # examples. Consequently, `around` hooks do not have direct access to + # resources that are made available within the examples and their + # associated `before` and `after` hooks. # - # after(:context) do - # File.delete(file_to_parse) - # end - # end - # @note The `:example` and `:context` scopes are also available as - # `:each` and `:all`, respectively. Use whichever you prefer. - # @note The `:suite` scope is only supported for hooks registered on - # `RSpec.configuration` since they exist independently of any - # example or example group. - # @overload before - # @overload before - # @overload before - # @overload before - # @see #after - # @see #around - # @see ExampleGroup - # @see SharedContext - # @see SharedExampleGroup - # @see Configuration + # @note `:example`/`:each` is the only supported scope. # - # source://rspec-core//lib/rspec/core/hooks.rb#200 - def append_before(*args, &block); end - # Declare a block of code, parts of which will be run before and parts # after the example. It is your responsibility to run the example: # @@ -6885,24 +5878,36 @@ module RSpec::Core::Hooks # # They are not a synonym for `before`/`after`. # - # @api public - # @note `:example`/`:each` is the only supported scope. - # @note the syntax of `around` is similar to that of `before` and `after` - # but the semantics are quite different. `before` and `after` hooks are - # run in the context of the examples with which they are associated, - # whereas `around` hooks are actually responsible for running the - # examples. Consequently, `around` hooks do not have direct access to - # resources that are made available within the examples and their - # associated `before` and `after` hooks. - # @overload around - # @overload around - # @overload around - # @overload around - # @yield [Example] the example to run - # - # source://rspec-core//lib/rspec/core/hooks.rb#349 + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:349 def around(*args, &block); end + # @api public + # + # @overload before(&block) + # @overload before(scope, &block) + # @param scope [Symbol] `:example`, `:context`, or `:suite` + # (defaults to `:example`) + # @overload before(scope, *conditions, &block) + # @param scope [Symbol] `:example`, `:context`, or `:suite` + # (defaults to `:example`) + # @param conditions [Array, Hash] constrains this hook to + # examples matching these conditions e.g. + # `before(:example, :ui => true) { ... }` will only run with examples + # or groups declared with `:ui => true`. Symbols will be transformed + # into hash entries with `true` values. + # @overload before(conditions, &block) + # @param conditions [Hash] + # constrains this hook to examples matching these conditions e.g. + # `before(:example, :ui => true) { ... }` will only run with examples + # or groups declared with `:ui => true`. + # + # @see #after + # @see #around + # @see ExampleGroup + # @see SharedContext + # @see SharedExampleGroup + # @see Configuration + # # Declare a block of code to be run before each example (using `:example`) # or once before any example (using `:context`). These are usually # declared directly in the {ExampleGroup} to which they apply, but they @@ -7029,113 +6034,54 @@ module RSpec::Core::Hooks # in rspec-rails, but it will not be wrapped in a transaction for you, so # you are on your own to clean up in an `after(:context)` block. # - # @api public # @example before(:example) declared in an {ExampleGroup} # - # RSpec.describe Thing do - # before(:example) do - # @thing = Thing.new - # end + # RSpec.describe Thing do + # before(:example) do + # @thing = Thing.new + # end + # + # it "does something" do + # # Here you can access @thing. + # end + # end # - # it "does something" do - # # Here you can access @thing. - # end - # end # @example before(:context) declared in an {ExampleGroup} # - # RSpec.describe Parser do - # before(:context) do - # File.open(file_to_parse, 'w') do |f| - # f.write <<-CONTENT - # stuff in the file - # CONTENT - # end - # end + # RSpec.describe Parser do + # before(:context) do + # File.open(file_to_parse, 'w') do |f| + # f.write <<-CONTENT + # stuff in the file + # CONTENT + # end + # end # - # it "parses the file" do - # Parser.parse(file_to_parse) - # end + # it "parses the file" do + # Parser.parse(file_to_parse) + # end + # + # after(:context) do + # File.delete(file_to_parse) + # end + # end # - # after(:context) do - # File.delete(file_to_parse) - # end - # end # @note The `:example` and `:context` scopes are also available as - # `:each` and `:all`, respectively. Use whichever you prefer. + # `:each` and `:all`, respectively. Use whichever you prefer. # @note The `:suite` scope is only supported for hooks registered on - # `RSpec.configuration` since they exist independently of any - # example or example group. - # @overload before - # @overload before - # @overload before - # @overload before - # @see #after - # @see #around - # @see ExampleGroup - # @see SharedContext - # @see SharedExampleGroup - # @see Configuration + # `RSpec.configuration` since they exist independently of any + # example or example group. # - # source://rspec-core//lib/rspec/core/hooks.rb#200 + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:200 def before(*args, &block); end - # Holds the various registered hooks. - # # @private + # Holds the various registered hooks. # - # source://rspec-core//lib/rspec/core/hooks.rb#355 + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:355 def hooks; end - # Declare a block of code to be run after each example (using `:example`) - # or once after all examples n the context (using `:context`). See - # {#before} for more information about ordering. - # - # ### Exceptions - # - # `after` hooks are guaranteed to run even when there are exceptions in - # `before` hooks or examples. When an exception is raised in an after - # block, the exception is captured for later reporting, and subsequent - # `after` blocks are run. - # - # ### Order - # - # `after` hooks are stored in three scopes, which are run in order: - # `:example`, `:context`, and `:suite`. They can also be declared in - # several different places: `RSpec.configure`, a parent group, the current - # group. They are run in the following order: - # - # after(:example) # Declared in the current group. - # after(:example) # Declared in a parent group. - # after(:example) # Declared in RSpec.configure. - # after(:context) # Declared in the current group. - # after(:context) # Declared in a parent group. - # after(:context) # Declared in RSpec.configure. - # after(:suite) # Declared in RSpec.configure. - # - # This is the reverse of the order in which `before` hooks are run. - # Similarly, if more than one `after` is declared within any example - # group, they are run in reverse order of that in which they are declared. - # Also `around` hooks will run after any `after` example hooks are - # invoked but before any `after` context hooks. - # - # @api public - # @note The `:suite` scope is only supported for hooks registered on - # `RSpec.configuration` since they exist independently of any - # example or example group. - # @note The `:example` and `:context` scopes are also available as - # `:each` and `:all`, respectively. Use whichever you prefer. - # @overload after - # @overload after - # @overload after - # @overload after - # @see #before - # @see #around - # @see ExampleGroup - # @see SharedContext - # @see SharedExampleGroup - # @see Configuration - # - # source://rspec-core//lib/rspec/core/hooks.rb#277 + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:281 def prepend_after(*args, &block); end # Adds `block` to the front of the list of `before` blocks in the same @@ -7143,82 +6089,84 @@ module RSpec::Core::Hooks # # See {#before} for scoping semantics. # - # source://rspec-core//lib/rspec/core/hooks.rb#210 + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:210 def prepend_before(*args, &block); end end # @private # -# source://rspec-core//lib/rspec/core/hooks.rb#379 +# pkg:gem/rspec-core#lib/rspec/core/hooks.rb:379 class RSpec::Core::Hooks::AfterContextHook < ::RSpec::Core::Hooks::Hook - # source://rspec-core//lib/rspec/core/hooks.rb#380 + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:380 def run(example); end end # @private # -# source://rspec-core//lib/rspec/core/hooks.rb#370 +# pkg:gem/rspec-core#lib/rspec/core/hooks.rb:370 class RSpec::Core::Hooks::AfterHook < ::RSpec::Core::Hooks::Hook - # source://rspec-core//lib/rspec/core/hooks.rb#371 + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:371 def run(example); end end # @private # -# source://rspec-core//lib/rspec/core/hooks.rb#388 +# pkg:gem/rspec-core#lib/rspec/core/hooks.rb:388 class RSpec::Core::Hooks::AroundHook < ::RSpec::Core::Hooks::Hook - # source://rspec-core//lib/rspec/core/hooks.rb#389 + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:389 def execute_with(example, procsy); end + # for 1.8.7 # :nocov: # - # source://rspec-core//lib/rspec/core/hooks.rb#397 + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:397 def hook_description; end end # @private # -# source://rspec-core//lib/rspec/core/hooks.rb#363 +# pkg:gem/rspec-core#lib/rspec/core/hooks.rb:363 class RSpec::Core::Hooks::BeforeHook < ::RSpec::Core::Hooks::Hook - # source://rspec-core//lib/rspec/core/hooks.rb#364 + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:364 def run(example); end end # @private # -# source://rspec-core//lib/rspec/core/hooks.rb#360 +# pkg:gem/rspec-core#lib/rspec/core/hooks.rb:360 class RSpec::Core::Hooks::Hook < ::Struct - # Returns the value of attribute block - # - # @return [Object] the current value of block + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:360 def block; end - # Sets the attribute block - # - # @param value [Object] the value to set the attribute block to. - # @return [Object] the newly set value + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:360 def block=(_); end - # Returns the value of attribute options - # - # @return [Object] the current value of options + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:360 def options; end - # Sets the attribute options - # - # @param value [Object] the value to set the attribute options to. - # @return [Object] the newly set value + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:360 def options=(_); end class << self + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:360 def [](*_arg0); end + + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:360 def inspect; end + + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:360 def keyword_init?; end + + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:360 def members; end + + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:360 def new(*_arg0); end end end +# @private +# # This provides the primary API used by other parts of rspec-core. By hiding all # implementation details behind this facade, it's allowed us to heavily optimize # this, so that, for example, hook collection objects are only instantiated when @@ -7229,212 +6177,201 @@ end # API, so that callers _tell_ this class what to do with the hooks, rather than # asking this class for a list of hooks, and then doing something with them. # -# @private -# -# source://rspec-core//lib/rspec/core/hooks.rb#420 +# pkg:gem/rspec-core#lib/rspec/core/hooks.rb:420 class RSpec::Core::Hooks::HookCollections - # @return [HookCollections] a new instance of HookCollections - # - # source://rspec-core//lib/rspec/core/hooks.rb#421 + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:421 def initialize(owner, filterable_item_repo_class); end - # source://rspec-core//lib/rspec/core/hooks.rb#449 + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:449 def register(prepend_or_append, position, *args, &block); end - # source://rspec-core//lib/rspec/core/hooks.rb#442 + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:442 def register_global_singleton_context_hooks(example, globals); end - # source://rspec-core//lib/rspec/core/hooks.rb#431 + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:431 def register_globals(host, globals); end + # @private + # # Runs all of the blocks stored with the hook in the context of the # example. If no example is provided, just calls the hook directly. # - # @private - # - # source://rspec-core//lib/rspec/core/hooks.rb#475 + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:475 def run(position, scope, example_or_group); end protected - # source://rspec-core//lib/rspec/core/hooks.rb#523 + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:523 def all_hooks_for(position, scope); end - # source://rspec-core//lib/rspec/core/hooks.rb#507 + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:507 def matching_hooks_for(position, scope, example_or_group); end - # source://rspec-core//lib/rspec/core/hooks.rb#533 + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:533 def processable_hooks_for(position, scope, host); end - # source://rspec-core//lib/rspec/core/hooks.rb#527 + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:527 def run_owned_hooks_for(position, scope, example_or_group); end private - # source://rspec-core//lib/rspec/core/hooks.rb#553 + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:553 def ensure_hooks_initialized_for(position, scope); end - # source://rspec-core//lib/rspec/core/hooks.rb#591 + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:591 def extract_scope_from(args); end - # source://rspec-core//lib/rspec/core/hooks.rb#543 + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:543 def hooks_for(position, scope); end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/hooks.rb#605 + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:605 def known_scope?(scope); end - # source://rspec-core//lib/rspec/core/hooks.rb#609 + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:609 def normalized_scope_for(scope); end + # Ruby < 2.1 (see https://bugs.ruby-lang.org/issues/8035) # :nocov: # - # source://rspec-core//lib/rspec/core/hooks.rb#633 + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:633 def owner_parent_groups; end - # source://rspec-core//lib/rspec/core/hooks.rb#571 + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:571 def process(host, parent_groups, globals, position, scope); end - # source://rspec-core//lib/rspec/core/hooks.rb#619 + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:619 def run_around_example_hooks_for(example); end - # source://rspec-core//lib/rspec/core/hooks.rb#613 + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:613 def run_example_hooks_for(example, position, each_method); end - # source://rspec-core//lib/rspec/core/hooks.rb#584 + # pkg:gem/rspec-core#lib/rspec/core/hooks.rb:584 def scope_and_options_from(*args); end end -# source://rspec-core//lib/rspec/core/hooks.rb#505 +# pkg:gem/rspec-core#lib/rspec/core/hooks.rb:505 RSpec::Core::Hooks::HookCollections::EMPTY_HOOK_ARRAY = T.let(T.unsafe(nil), Array) -# source://rspec-core//lib/rspec/core/hooks.rb#495 +# pkg:gem/rspec-core#lib/rspec/core/hooks.rb:495 RSpec::Core::Hooks::HookCollections::HOOK_TYPES = T.let(T.unsafe(nil), Hash) -# source://rspec-core//lib/rspec/core/hooks.rb#491 +# pkg:gem/rspec-core#lib/rspec/core/hooks.rb:491 RSpec::Core::Hooks::HookCollections::SCOPES = T.let(T.unsafe(nil), Array) -# source://rspec-core//lib/rspec/core/hooks.rb#493 +# pkg:gem/rspec-core#lib/rspec/core/hooks.rb:493 RSpec::Core::Hooks::HookCollections::SCOPE_ALIASES = T.let(T.unsafe(nil), Hash) # @private # -# source://rspec-core//lib/rspec/core/filter_manager.rb#186 +# pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:186 class RSpec::Core::InclusionRules < ::RSpec::Core::FilterRules - # source://rspec-core//lib/rspec/core/filter_manager.rb#187 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:187 def add(*args); end - # source://rspec-core//lib/rspec/core/filter_manager.rb#191 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:191 def add_with_low_priority(*args); end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/filter_manager.rb#195 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:195 def include_example?(example); end - # source://rspec-core//lib/rspec/core/filter_manager.rb#203 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:203 def split_file_scoped_rules; end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/filter_manager.rb#199 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:199 def standalone?; end private - # source://rspec-core//lib/rspec/core/filter_manager.rb#213 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:213 def apply_standalone_filter(updated); end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/filter_manager.rb#226 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:226 def is_standalone_filter?(rules); end - # source://rspec-core//lib/rspec/core/filter_manager.rb#221 + # pkg:gem/rspec-core#lib/rspec/core/filter_manager.rb:221 def replace_filters(new_rules); end end # @private # -# source://rspec-core//lib/rspec/core/invocations.rb#4 +# pkg:gem/rspec-core#lib/rspec/core/invocations.rb:4 module RSpec::Core::Invocations; end # @private # -# source://rspec-core//lib/rspec/core/invocations.rb#28 +# pkg:gem/rspec-core#lib/rspec/core/invocations.rb:28 class RSpec::Core::Invocations::Bisect - # source://rspec-core//lib/rspec/core/invocations.rb#29 + # pkg:gem/rspec-core#lib/rspec/core/invocations.rb:29 def call(options, err, out); end private - # source://rspec-core//lib/rspec/core/invocations.rb#45 + # pkg:gem/rspec-core#lib/rspec/core/invocations.rb:45 def bisect_formatter_klass_for(argument); end end # @private # -# source://rspec-core//lib/rspec/core/invocations.rb#15 +# pkg:gem/rspec-core#lib/rspec/core/invocations.rb:15 class RSpec::Core::Invocations::DRbWithFallback - # source://rspec-core//lib/rspec/core/invocations.rb#16 + # pkg:gem/rspec-core#lib/rspec/core/invocations.rb:16 def call(options, err, out); end end # @private # -# source://rspec-core//lib/rspec/core/invocations.rb#6 +# pkg:gem/rspec-core#lib/rspec/core/invocations.rb:6 class RSpec::Core::Invocations::InitializeProject - # source://rspec-core//lib/rspec/core/invocations.rb#7 + # pkg:gem/rspec-core#lib/rspec/core/invocations.rb:7 def call(*_args); end end # @private # -# source://rspec-core//lib/rspec/core/invocations.rb#78 +# pkg:gem/rspec-core#lib/rspec/core/invocations.rb:78 class RSpec::Core::Invocations::PrintHelp < ::Struct - # source://rspec-core//lib/rspec/core/invocations.rb#79 + # pkg:gem/rspec-core#lib/rspec/core/invocations.rb:79 def call(_options, _err, out); end - # Returns the value of attribute hidden_options - # - # @return [Object] the current value of hidden_options + # pkg:gem/rspec-core#lib/rspec/core/invocations.rb:78 def hidden_options; end - # Sets the attribute hidden_options - # - # @param value [Object] the value to set the attribute hidden_options to. - # @return [Object] the newly set value + # pkg:gem/rspec-core#lib/rspec/core/invocations.rb:78 def hidden_options=(_); end - # Returns the value of attribute parser - # - # @return [Object] the current value of parser + # pkg:gem/rspec-core#lib/rspec/core/invocations.rb:78 def parser; end - # Sets the attribute parser - # - # @param value [Object] the value to set the attribute parser to. - # @return [Object] the newly set value + # pkg:gem/rspec-core#lib/rspec/core/invocations.rb:78 def parser=(_); end class << self + # pkg:gem/rspec-core#lib/rspec/core/invocations.rb:78 def [](*_arg0); end + + # pkg:gem/rspec-core#lib/rspec/core/invocations.rb:78 def inspect; end + + # pkg:gem/rspec-core#lib/rspec/core/invocations.rb:78 def keyword_init?; end + + # pkg:gem/rspec-core#lib/rspec/core/invocations.rb:78 def members; end + + # pkg:gem/rspec-core#lib/rspec/core/invocations.rb:78 def new(*_arg0); end end end # @private # -# source://rspec-core//lib/rspec/core/invocations.rb#52 +# pkg:gem/rspec-core#lib/rspec/core/invocations.rb:52 class RSpec::Core::Invocations::PrintVersion - # source://rspec-core//lib/rspec/core/invocations.rb#53 + # pkg:gem/rspec-core#lib/rspec/core/invocations.rb:53 def call(_options, _err, out); end end +# @private # Together with the example group metadata hash default block, # provides backwards compatibility for the old `:example_group` # key. In RSpec 2.x, the computed keys of a group's metadata @@ -7458,32 +6395,26 @@ end # * Exposes the parent group metadata as # `[:example_group][:example_group]`. # -# @private -# -# source://rspec-core//lib/rspec/core/metadata.rb#470 +# pkg:gem/rspec-core#lib/rspec/core/metadata.rb:470 class RSpec::Core::LegacyExampleGroupHash include ::RSpec::Core::HashImitatable extend ::RSpec::Core::HashImitatable::ClassMethods - # @return [LegacyExampleGroupHash] a new instance of LegacyExampleGroupHash - # - # source://rspec-core//lib/rspec/core/metadata.rb#473 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:473 def initialize(metadata); end - # source://rspec-core//lib/rspec/core/metadata.rb#479 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:479 def to_h; end private - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/metadata.rb#485 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:485 def directly_supports_attribute?(name); end - # source://rspec-core//lib/rspec/core/metadata.rb#489 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:489 def get_value(name); end - # source://rspec-core//lib/rspec/core/metadata.rb#493 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:493 def set_value(name, value); end end @@ -7492,12 +6423,12 @@ end # # @see ClassMethods # -# source://rspec-core//lib/rspec/core/memoized_helpers.rb#9 +# pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:9 module RSpec::Core::MemoizedHelpers # @private # - # source://rspec-core//lib/rspec/core/memoized_helpers.rb#135 - def initialize(*_arg0); end + # pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:135 + def initialize(*); end # Wraps the `subject` in `expect` to make it the target of an expectation. # Designed to read nicely for one-liners. @@ -7505,15 +6436,17 @@ module RSpec::Core::MemoizedHelpers # @example # # describe [1, 2, 3] do - # it { is_expected.to be_an Array } - # it { is_expected.not_to include 4 } + # it { is_expected.to be_an Array } + # it { is_expected.not_to include 4 } # end - # @note This only works if you are using rspec-expectations. + # # @see #subject # @see #should # @see #should_not # - # source://rspec-core//lib/rspec/core/memoized_helpers.rb#120 + # @note This only works if you are using rspec-expectations. + # + # pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:120 def is_expected; end # When `should` is called with no explicit receiver, the call is @@ -7523,15 +6456,17 @@ module RSpec::Core::MemoizedHelpers # @example # # RSpec.describe Person do - # it { should be_eligible_to_vote } + # it { should be_eligible_to_vote } # end - # @note This only works if you are using rspec-expectations. - # @note If you are using RSpec's newer expect-based syntax you may - # want to use `is_expected.to` instead of `should`. + # # @see #subject # @see #is_expected # - # source://rspec-core//lib/rspec/core/memoized_helpers.rb#80 + # @note This only works if you are using rspec-expectations. + # @note If you are using RSpec's newer expect-based syntax you may + # want to use `is_expected.to` instead of `should`. + # + # pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:80 def should(matcher = T.unsafe(nil), message = T.unsafe(nil)); end # Just like `should`, `should_not` delegates to the subject (implicit or @@ -7540,110 +6475,121 @@ module RSpec::Core::MemoizedHelpers # @example # # RSpec.describe Person do - # it { should_not be_eligible_to_vote } + # it { should_not be_eligible_to_vote } # end - # @note This only works if you are using rspec-expectations. - # @note If you are using RSpec's newer expect-based syntax you may - # want to use `is_expected.to_not` instead of `should_not`. + # # @see #subject # @see #is_expected # - # source://rspec-core//lib/rspec/core/memoized_helpers.rb#100 + # @note This only works if you are using rspec-expectations. + # @note If you are using RSpec's newer expect-based syntax you may + # want to use `is_expected.to_not` instead of `should_not`. + # + # pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:100 def should_not(matcher = T.unsafe(nil), message = T.unsafe(nil)); end + # @note `subject` was contributed by Joe Ferris to support the one-liner + # syntax embraced by shoulda matchers: + # + # RSpec.describe Widget do + # it { is_expected.to validate_presence_of(:name) } + # # or + # it { should validate_presence_of(:name) } + # end + # + # While the examples below demonstrate how to use `subject` + # explicitly in examples, we recommend that you define a method with + # an intention revealing name instead. + # # @example # # # Explicit declaration of subject. # RSpec.describe Person do - # subject { Person.new(:birthdate => 19.years.ago) } - # it "should be eligible to vote" do - # subject.should be_eligible_to_vote - # # ^ ^ explicit reference to subject not recommended - # end + # subject { Person.new(:birthdate => 19.years.ago) } + # it "should be eligible to vote" do + # subject.should be_eligible_to_vote + # # ^ ^ explicit reference to subject not recommended + # end # end # # # Implicit subject => { Person.new }. # RSpec.describe Person do - # it "should be eligible to vote" do - # subject.should be_eligible_to_vote - # # ^ ^ explicit reference to subject not recommended - # end + # it "should be eligible to vote" do + # subject.should be_eligible_to_vote + # # ^ ^ explicit reference to subject not recommended + # end # end # # # One-liner syntax - expectation is set on the subject. # RSpec.describe Person do - # it { is_expected.to be_eligible_to_vote } - # # or - # it { should be_eligible_to_vote } - # end - # @note `subject` was contributed by Joe Ferris to support the one-liner - # syntax embraced by shoulda matchers: - # - # RSpec.describe Widget do - # it { is_expected.to validate_presence_of(:name) } - # # or - # it { should validate_presence_of(:name) } + # it { is_expected.to be_eligible_to_vote } + # # or + # it { should be_eligible_to_vote } # end # - # While the examples below demonstrate how to use `subject` - # explicitly in examples, we recommend that you define a method with - # an intention revealing name instead. # @note Because `subject` is designed to create state that is reset # between each example, and `before(:context)` is designed to setup # state that is shared across _all_ examples in an example group, # `subject` is _not_ intended to be used in a `before(:context)` hook. + # # @see #should # @see #should_not # @see #is_expected # - # source://rspec-core//lib/rspec/core/memoized_helpers.rb#57 + # pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:57 def subject; end private # @private # - # source://rspec-core//lib/rspec/core/memoized_helpers.rb#141 + # pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:141 def __init_memoized; end + # @private # should just be placed in private section, # but Ruby issues warnings on private attributes. # and expanding it to the equivalent method upsets Rubocop, # b/c it should obviously be a reader # - # @private - # - # source://rspec-core//lib/rspec/core/memoized_helpers.rb#129 + # pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:129 def __memoized; end # @private # - # source://rspec-core//lib/rspec/core/memoized_helpers.rb#150 + # pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:150 def enforce_value_expectation(matcher, method_name); end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/memoized_helpers.rb#163 + # pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:163 def matcher_supports_value_expectations?(matcher); end class << self # @private # - # source://rspec-core//lib/rspec/core/memoized_helpers.rb#542 + # pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:542 def define_helpers_on(example_group); end + # @private + # # Gets the named constant or yields. # On 1.9, const_defined? / const_get take into account the # the inheritance by default, and accept an argument to # disable this behavior. It's important that we don't # consider inheritance here; each example group level that # uses a `let` should get its own `LetDefinitions` module. - # + # for 1.8 # @private # - # source://rspec-core//lib/rspec/core/memoized_helpers.rb#570 + # Gets the named constant or yields. + # On 1.8, const_defined? / const_get do not take into + # account the inheritance hierarchy. + # :nocov: + # + # pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:570 def get_constant_or_yield(example_group, name); end + # @private + # # Gets the LetDefinitions module. The module is mixed into # the example group and is used to hold all let definitions. # This is done so that the block passed to `let` can be @@ -7655,9 +6601,7 @@ module RSpec::Core::MemoizedHelpers # example group that supers to the LetDefinitions definition # in order to get the value to memoize. # - # @private - # - # source://rspec-core//lib/rspec/core/memoized_helpers.rb#528 + # pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:528 def module_for(example_group); end end end @@ -7666,38 +6610,41 @@ end # available to be called from within example group blocks. # You can think of them as being analagous to class macros. # -# source://rspec-core//lib/rspec/core/memoized_helpers.rb#274 +# pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:274 module RSpec::Core::MemoizedHelpers::ClassMethods # Generates a method whose return value is memoized after the first # call. Useful for reducing duplication between examples that assign # values to the same local variable. # - # @example - # - # RSpec.describe Thing do - # let(:thing) { Thing.new } - # - # it "does something" do - # # First invocation, executes block, memoizes and returns result. - # thing.do_something - # - # # Second invocation, returns the memoized value. - # thing.should be_something - # end - # end # @note `let` _can_ enhance readability when used sparingly (1,2, or # maybe 3 declarations) in any given example group, but that can # quickly degrade with overuse. YMMV. + # # @note `let` can be configured to be threadsafe or not. # If it is threadsafe, it will take longer to access the value. # If it is not threadsafe, it may behave in surprising ways in examples # that spawn separate threads. Specify this on `RSpec.configure` + # # @note Because `let` is designed to create state that is reset between # each example, and `before(:context)` is designed to setup state that # is shared across _all_ examples in an example group, `let` is _not_ # intended to be used in a `before(:context)` hook. # - # source://rspec-core//lib/rspec/core/memoized_helpers.rb#306 + # @example + # + # RSpec.describe Thing do + # let(:thing) { Thing.new } + # + # it "does something" do + # # First invocation, executes block, memoizes and returns result. + # thing.do_something + # + # # Second invocation, returns the memoized value. + # thing.should be_something + # end + # end + # + # pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:306 def let(name, &block); end # Just like `let`, except the block is invoked by an implicit `before` @@ -7707,54 +6654,54 @@ module RSpec::Core::MemoizedHelpers::ClassMethods # @example # # class Thing - # def self.count - # @count ||= 0 - # end + # def self.count + # @count ||= 0 + # end # - # def self.count=(val) - # @count += val - # end + # def self.count=(val) + # @count += val + # end # - # def self.reset_count - # @count = 0 - # end + # def self.reset_count + # @count = 0 + # end # - # def initialize - # self.class.count += 1 - # end + # def initialize + # self.class.count += 1 + # end # end # # RSpec.describe Thing do - # after(:example) { Thing.reset_count } + # after(:example) { Thing.reset_count } # - # context "using let" do - # let(:thing) { Thing.new } + # context "using let" do + # let(:thing) { Thing.new } # - # it "is not invoked implicitly" do - # Thing.count.should eq(0) - # end + # it "is not invoked implicitly" do + # Thing.count.should eq(0) + # end # - # it "can be invoked explicitly" do - # thing - # Thing.count.should eq(1) - # end - # end + # it "can be invoked explicitly" do + # thing + # Thing.count.should eq(1) + # end + # end # - # context "using let!" do - # let!(:thing) { Thing.new } + # context "using let!" do + # let!(:thing) { Thing.new } # - # it "is invoked implicitly" do - # Thing.count.should eq(1) - # end + # it "is invoked implicitly" do + # Thing.count.should eq(1) + # end # - # it "returns memoized version on first invocation" do - # thing - # Thing.count.should eq(1) - # end - # end + # it "returns memoized version on first invocation" do + # thing + # Thing.count.should eq(1) + # end + # end # end # - # source://rspec-core//lib/rspec/core/memoized_helpers.rb#400 + # pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:400 def let!(name, &block); end # Declares a `subject` for an example group which can then be wrapped @@ -7768,33 +6715,36 @@ module RSpec::Core::MemoizedHelpers::ClassMethods # # When given a `name`, calling `super` in the block is not supported. # + # @note `subject` can be configured to be threadsafe or not. + # If it is threadsafe, it will take longer to access the value. + # If it is not threadsafe, it may behave in surprising ways in examples + # that spawn separate threads. Specify this on `RSpec.configure` + # + # @param name [String,Symbol] used to define an accessor with an + # intention revealing name + # @param block defines the value to be returned by `subject` in examples + # # @example # # RSpec.describe CheckingAccount, "with $50" do - # subject { CheckingAccount.new(Money.new(50, :USD)) } - # it { is_expected.to have_a_balance_of(Money.new(50, :USD)) } - # it { is_expected.not_to be_overdrawn } + # subject { CheckingAccount.new(Money.new(50, :USD)) } + # it { is_expected.to have_a_balance_of(Money.new(50, :USD)) } + # it { is_expected.not_to be_overdrawn } # end # # RSpec.describe CheckingAccount, "with a non-zero starting balance" do - # subject(:account) { CheckingAccount.new(Money.new(50, :USD)) } - # it { is_expected.not_to be_overdrawn } - # it "has a balance equal to the starting balance" do - # account.balance.should eq(Money.new(50, :USD)) - # end + # subject(:account) { CheckingAccount.new(Money.new(50, :USD)) } + # it { is_expected.not_to be_overdrawn } + # it "has a balance equal to the starting balance" do + # account.balance.should eq(Money.new(50, :USD)) + # end # end - # @note `subject` can be configured to be threadsafe or not. - # If it is threadsafe, it will take longer to access the value. - # If it is not threadsafe, it may behave in surprising ways in examples - # that spawn separate threads. Specify this on `RSpec.configure` - # @param name [String, Symbol] used to define an accessor with an - # intention revealing name - # @param block defines the value to be returned by `subject` in examples + # # @see MemoizedHelpers#should # @see MemoizedHelpers#should_not # @see MemoizedHelpers#is_expected # - # source://rspec-core//lib/rspec/core/memoized_helpers.rb#444 + # pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:444 def subject(name = T.unsafe(nil), &block); end # Just like `subject`, except the block is invoked by an implicit @@ -7804,54 +6754,54 @@ module RSpec::Core::MemoizedHelpers::ClassMethods # @example # # class Thing - # def self.count - # @count ||= 0 - # end + # def self.count + # @count ||= 0 + # end # - # def self.count=(val) - # @count += val - # end + # def self.count=(val) + # @count += val + # end # - # def self.reset_count - # @count = 0 - # end + # def self.reset_count + # @count = 0 + # end # - # def initialize - # self.class.count += 1 - # end + # def initialize + # self.class.count += 1 + # end # end # # RSpec.describe Thing do - # after(:example) { Thing.reset_count } + # after(:example) { Thing.reset_count } # - # context "using subject" do - # subject { Thing.new } + # context "using subject" do + # subject { Thing.new } # - # it "is not invoked implicitly" do - # Thing.count.should eq(0) - # end + # it "is not invoked implicitly" do + # Thing.count.should eq(0) + # end # - # it "can be invoked explicitly" do - # subject - # Thing.count.should eq(1) - # end - # end + # it "can be invoked explicitly" do + # subject + # Thing.count.should eq(1) + # end + # end # - # context "using subject!" do - # subject!(:thing) { Thing.new } + # context "using subject!" do + # subject!(:thing) { Thing.new } # - # it "is invoked implicitly" do - # Thing.count.should eq(1) - # end + # it "is invoked implicitly" do + # Thing.count.should eq(1) + # end # - # it "returns memoized version on first invocation" do - # subject - # Thing.count.should eq(1) - # end - # end + # it "returns memoized version on first invocation" do + # subject + # Thing.count.should eq(1) + # end + # end # end # - # source://rspec-core//lib/rspec/core/memoized_helpers.rb#510 + # pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:510 def subject!(name = T.unsafe(nil), &block); end end @@ -7860,72 +6810,68 @@ end # # @private # -# source://rspec-core//lib/rspec/core/memoized_helpers.rb#200 +# pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:200 class RSpec::Core::MemoizedHelpers::ContextHookMemoized class << self - # source://rspec-core//lib/rspec/core/memoized_helpers.rb#222 + # pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:222 def fetch_or_store(key, &_block); end - # source://rspec-core//lib/rspec/core/memoized_helpers.rb#201 + # pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:201 def isolate_for_context_hook(example_group_instance); end end end # @private # -# source://rspec-core//lib/rspec/core/memoized_helpers.rb#256 +# pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:256 class RSpec::Core::MemoizedHelpers::ContextHookMemoized::After < ::RSpec::Core::MemoizedHelpers::ContextHookMemoized class << self - # source://rspec-core//lib/rspec/core/memoized_helpers.rb#261 + # pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:261 def article; end - # source://rspec-core//lib/rspec/core/memoized_helpers.rb#257 + # pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:257 def hook_expression; end - # source://rspec-core//lib/rspec/core/memoized_helpers.rb#265 + # pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:265 def hook_intention; end end end # @private # -# source://rspec-core//lib/rspec/core/memoized_helpers.rb#241 +# pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:241 class RSpec::Core::MemoizedHelpers::ContextHookMemoized::Before < ::RSpec::Core::MemoizedHelpers::ContextHookMemoized class << self - # source://rspec-core//lib/rspec/core/memoized_helpers.rb#246 + # pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:246 def article; end - # source://rspec-core//lib/rspec/core/memoized_helpers.rb#242 + # pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:242 def hook_expression; end - # source://rspec-core//lib/rspec/core/memoized_helpers.rb#250 + # pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:250 def hook_intention; end end end # @private # -# source://rspec-core//lib/rspec/core/memoized_helpers.rb#186 +# pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:186 class RSpec::Core::MemoizedHelpers::NonThreadSafeMemoized - # @return [NonThreadSafeMemoized] a new instance of NonThreadSafeMemoized - # - # source://rspec-core//lib/rspec/core/memoized_helpers.rb#187 + # pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:187 def initialize; end - # source://rspec-core//lib/rspec/core/memoized_helpers.rb#191 + # pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:191 def fetch_or_store(key); end end # @private # -# source://rspec-core//lib/rspec/core/memoized_helpers.rb#170 +# pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:170 class RSpec::Core::MemoizedHelpers::ThreadsafeMemoized - # @return [ThreadsafeMemoized] a new instance of ThreadsafeMemoized - # - # source://rspec-core//lib/rspec/core/memoized_helpers.rb#171 + # pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:171 def initialize; end - # source://rspec-core//lib/rspec/core/memoized_helpers.rb#176 + # pkg:gem/rspec-core#lib/rspec/core/memoized_helpers.rb:176 def fetch_or_store(key); end end @@ -7954,56 +6900,53 @@ end # @see Configuration#filter_run_including # @see Configuration#filter_run_excluding # -# source://rspec-core//lib/rspec/core/metadata.rb#27 +# pkg:gem/rspec-core#lib/rspec/core/metadata.rb:27 module RSpec::Core::Metadata class << self + # @private # Returns an enumerator that iteratively walks up the given metadata through all # example group ancestors, yielding each metadata hash along the way. # - # @private - # - # source://rspec-core//lib/rspec/core/metadata.rb#71 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:71 def ascend(metadata); end + # @private # Iteratively walks up from the given metadata through all # example group ancestors, yielding each metadata hash along the way. # - # @private - # @yield [metadata] - # - # source://rspec-core//lib/rspec/core/metadata.rb#58 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:58 def ascending(metadata); end + # @private # Used internally to build a hash from an args array. # Symbols are converted into hash keys with a value of `true`. # This is done to support simple tagging using a symbol, rather # than needing to do `:symbol => true`. # - # @private - # - # source://rspec-core//lib/rspec/core/metadata.rb#80 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:80 def build_hash_from(args, warn_about_example_group_filtering = T.unsafe(nil)); end # @private # - # source://rspec-core//lib/rspec/core/metadata.rb#94 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:94 def deep_hash_dup(object); end # @private # - # source://rspec-core//lib/rspec/core/metadata.rb#105 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:105 def id_from(metadata); end # @private # - # source://rspec-core//lib/rspec/core/metadata.rb#110 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:110 def location_tuple_from(metadata); end # @api private + # # @param line [String] current code line # @return [String] relative path to line # - # source://rspec-core//lib/rspec/core/metadata.rb#44 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:44 def relative_path(line); end # Matches strings either at the beginning of the input or prefixed with a @@ -8015,112 +6958,101 @@ module RSpec::Core::Metadata # http://rubular.com/r/duOrD4i3wb # http://rubular.com/r/sbAMHFrOx1 # - # source://rspec-core//lib/rspec/core/metadata.rb#36 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:36 def relative_path_regex; end end end # @private # -# source://rspec-core//lib/rspec/core/metadata.rb#247 +# pkg:gem/rspec-core#lib/rspec/core/metadata.rb:247 class RSpec::Core::Metadata::ExampleGroupHash < ::RSpec::Core::Metadata::HashPopulator private - # source://rspec-core//lib/rspec/core/metadata.rb#304 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:304 def described_class; end - # source://rspec-core//lib/rspec/core/metadata.rb#311 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:311 def full_description; end class << self - # source://rspec-core//lib/rspec/core/metadata.rb#265 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:265 def backwards_compatibility_default_proc(&example_group_selector); end - # source://rspec-core//lib/rspec/core/metadata.rb#248 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:248 def create(parent_group_metadata, user_metadata, example_group_index, *args, &block); end - # source://rspec-core//lib/rspec/core/metadata.rb#261 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:261 def hash_with_backwards_compatibility_default_proc; end end end # @private # -# source://rspec-core//lib/rspec/core/metadata.rb#213 +# pkg:gem/rspec-core#lib/rspec/core/metadata.rb:213 class RSpec::Core::Metadata::ExampleHash < ::RSpec::Core::Metadata::HashPopulator private - # source://rspec-core//lib/rspec/core/metadata.rb#234 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:234 def described_class; end - # source://rspec-core//lib/rspec/core/metadata.rb#238 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:238 def full_description; end class << self - # source://rspec-core//lib/rspec/core/metadata.rb#214 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:214 def create(group_metadata, user_metadata, index_provider, description, block); end end end +# @private # Used internally to populate metadata hashes with computed keys # managed by RSpec. # -# @private -# -# source://rspec-core//lib/rspec/core/metadata.rb#117 +# pkg:gem/rspec-core#lib/rspec/core/metadata.rb:117 class RSpec::Core::Metadata::HashPopulator - # @return [HashPopulator] a new instance of HashPopulator - # - # source://rspec-core//lib/rspec/core/metadata.rb#120 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:120 def initialize(metadata, user_metadata, index_provider, description_args, block); end - # Returns the value of attribute block. - # - # source://rspec-core//lib/rspec/core/metadata.rb#118 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:118 def block; end - # Returns the value of attribute description_args. - # - # source://rspec-core//lib/rspec/core/metadata.rb#118 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:118 def description_args; end - # Returns the value of attribute metadata. - # - # source://rspec-core//lib/rspec/core/metadata.rb#118 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:118 def metadata; end - # source://rspec-core//lib/rspec/core/metadata.rb#128 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:128 def populate; end - # Returns the value of attribute user_metadata. - # - # source://rspec-core//lib/rspec/core/metadata.rb#118 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:118 def user_metadata; end private - # source://rspec-core//lib/rspec/core/metadata.rb#178 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:178 def build_description_from(parent_description = T.unsafe(nil), my_description = T.unsafe(nil)); end - # source://rspec-core//lib/rspec/core/metadata.rb#185 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:185 def build_scoped_id_for(file_path); end - # source://rspec-core//lib/rspec/core/metadata.rb#170 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:170 def description_separator(parent_part, child_part); end - # source://rspec-core//lib/rspec/core/metadata.rb#191 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:191 def ensure_valid_user_keys; end - # source://rspec-core//lib/rspec/core/metadata.rb#164 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:164 def file_path_and_line_number_from(backtrace); end - # source://rspec-core//lib/rspec/core/metadata.rb#143 + # pkg:gem/rspec-core#lib/rspec/core/metadata.rb:143 def populate_location_attributes; end end # @private # -# source://rspec-core//lib/rspec/core/metadata.rb#325 +# pkg:gem/rspec-core#lib/rspec/core/metadata.rb:325 RSpec::Core::Metadata::RESERVED_KEYS = T.let(T.unsafe(nil), Array) # Contains metadata filtering logic. This has been extracted from @@ -8129,51 +7061,39 @@ RSpec::Core::Metadata::RESERVED_KEYS = T.let(T.unsafe(nil), Array) # having metadata be a raw hash (not a custom subclass), so externalizing # this filtering logic helps us move in that direction. # -# source://rspec-core//lib/rspec/core/metadata_filter.rb#8 +# pkg:gem/rspec-core#lib/rspec/core/metadata_filter.rb:8 module RSpec::Core::MetadataFilter class << self # @private - # @return [Boolean] # - # source://rspec-core//lib/rspec/core/metadata_filter.rb#11 + # pkg:gem/rspec-core#lib/rspec/core/metadata_filter.rb:11 def apply?(predicate, filters, metadata); end # @private - # @return [Boolean] # - # source://rspec-core//lib/rspec/core/metadata_filter.rb#16 + # pkg:gem/rspec-core#lib/rspec/core/metadata_filter.rb:16 def filter_applies?(key, filter_value, metadata); end # @private # - # source://rspec-core//lib/rspec/core/metadata_filter.rb#33 + # pkg:gem/rspec-core#lib/rspec/core/metadata_filter.rb:33 def silence_metadata_example_group_deprecations; end private - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/metadata_filter.rb#42 + # pkg:gem/rspec-core#lib/rspec/core/metadata_filter.rb:42 def filter_applies_to_any_value?(key, value, metadata); end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/metadata_filter.rb#73 + # pkg:gem/rspec-core#lib/rspec/core/metadata_filter.rb:73 def filters_apply?(key, value, metadata); end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/metadata_filter.rb#46 + # pkg:gem/rspec-core#lib/rspec/core/metadata_filter.rb:46 def id_filter_applies?(rerun_paths_to_scoped_ids, metadata); end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/metadata_filter.rb#54 + # pkg:gem/rspec-core#lib/rspec/core/metadata_filter.rb:54 def location_filter_applies?(locations, metadata); end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/metadata_filter.rb#65 + # pkg:gem/rspec-core#lib/rspec/core/metadata_filter.rb:65 def proc_filter_applies?(key, proc, metadata); end end end @@ -8183,85 +7103,81 @@ 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#458 +# pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:459 class RSpec::Core::MultipleExceptionError < ::StandardError include ::RSpec::Core::MultipleExceptionError::InterfaceTag # @param exceptions [Array] The initial list of exceptions. - # @return [MultipleExceptionError] a new instance of MultipleExceptionError # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#519 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:520 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#516 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:517 def aggregation_block_label; end # @return [Hash] Metadata used by RSpec for formatting purposes. # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#512 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:513 def aggregation_metadata; end # @return [Array] The list of failures and other exceptions, combined. # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#509 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:510 def all_exceptions; end # return [String] A description of the failure/error counts. # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#544 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:545 def exception_count_description; end # @return [Array] The list of failures. # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#503 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:504 def failures; end + # @return [String] Combines all the exception messages into a single string. # @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#534 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:535 def message; end # @return [Array] The list of other errors. # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#506 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:507 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#539 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:540 def summary; end end +# @private # Used so there is a common module in the ancestor chain of this class # and `RSpec::Expectations::MultipleExpectationsNotMetError`, which allows # code to detect exceptions that are instances of either, without first # checking to see if rspec-expectations is loaded. # -# @private -# -# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#464 +# pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:465 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#468 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:469 def add(exception); end class << self # Provides a way to force `ex` to be something that satisfies the multiple # exception error interface. If it already satisfies it, it will be returned; # otherwise it will wrap it in a `MultipleExceptionError`. - # # @private # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#494 + # pkg:gem/rspec-core#lib/rspec/core/formatters/exception_presenter.rb:495 def for(ex); end end end @@ -8269,22 +7185,22 @@ end # Notifications are value objects passed to formatters to provide them # with information about a particular event of interest. # -# source://rspec-core//lib/rspec/core/notifications.rb#9 +# pkg:gem/rspec-core#lib/rspec/core/notifications.rb:9 module RSpec::Core::Notifications; end # `CustomNotification` is used when sending custom events to formatters / # other registered listeners, it creates attributes based on supplied hash # of options. # -# source://rspec-core//lib/rspec/core/notifications.rb#512 +# pkg:gem/rspec-core#lib/rspec/core/notifications.rb:512 class RSpec::Core::Notifications::CustomNotification < ::Struct class << self - # Build a custom notification based on the supplied option key / values. - # # @param options [Hash] A hash of method / value pairs to create on this notification # @return [CustomNotification] # - # source://rspec-core//lib/rspec/core/notifications.rb#517 + # Build a custom notification based on the supplied option key / values. + # + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:517 def for(options = T.unsafe(nil)); end end end @@ -8300,72 +7216,54 @@ end # @attr call_site [String] An optional call site from which the deprecation # was issued # -# source://rspec-core//lib/rspec/core/notifications.rb#493 +# pkg:gem/rspec-core#lib/rspec/core/notifications.rb:493 class RSpec::Core::Notifications::DeprecationNotification < ::Struct - # An optional call site from which the deprecation - # was issued - # - # @return [String] the current value of call_site + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:493 def call_site; end - # An optional call site from which the deprecation - # was issued - # - # @param value [String] the value to set the attribute call_site to. - # @return [String] the newly set value + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:493 def call_site=(_); end - # A custom message about the deprecation (alias of - # message) - # - # @return [String] the current value of deprecated + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:493 def deprecated; end - # A custom message about the deprecation (alias of - # message) - # - # @param value [String] the value to set the attribute deprecated to. - # @return [String] the newly set value + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:493 def deprecated=(_); end - # A custom message about the deprecation - # - # @return [String] the current value of message + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:493 def message; end - # A custom message about the deprecation - # - # @param value [String] the value to set the attribute message to. - # @return [String] the newly set value + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:493 def message=(_); end - # An optional replacement for the deprecation - # - # @return [String] the current value of replacement + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:493 def replacement; end - # An optional replacement for the deprecation - # - # @param value [String] the value to set the attribute replacement to. - # @return [String] the newly set value + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:493 def replacement=(_); end class << self + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:493 def [](*_arg0); end - # Convenience way to initialize the notification - # # @api + # Convenience way to initialize the notification # - # source://rspec-core//lib/rspec/core/notifications.rb#499 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:499 def from_hash(data); end + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:493 def inspect; end + + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:493 def keyword_init?; end + + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:493 def members; end private + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:493 def new(*_arg0); end end end @@ -8374,39 +7272,42 @@ end # which contain information about the current (or soon to be) example. # It is used by formatters to access information about that example. # -# @attr example [RSpec::Core::Example] the current example # @example # def example_started(notification) -# puts "Hey I started #{notification.example.description}" +# puts "Hey I started #{notification.example.description}" # end # -# source://rspec-core//lib/rspec/core/notifications.rb#38 +# @attr example [RSpec::Core::Example] the current example +# +# pkg:gem/rspec-core#lib/rspec/core/notifications.rb:38 class RSpec::Core::Notifications::ExampleNotification < ::Struct - # the current example - # - # @return [RSpec::Core::Example] the current value of example + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:38 def example; end - # the current example - # - # @param value [RSpec::Core::Example] the value to set the attribute example to. - # @return [RSpec::Core::Example] the newly set value + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:38 def example=(_); end class << self + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:38 def [](*_arg0); end # @private # - # source://rspec-core//lib/rspec/core/notifications.rb#41 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:41 def for(example); end + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:38 def inspect; end + + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:38 def keyword_init?; end + + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:38 def members; end private + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:38 def new(*_arg0); end end end @@ -8416,64 +7317,63 @@ end # # @example # def stop(notification) -# puts "Hey I ran #{notification.examples.size}" +# puts "Hey I ran #{notification.examples.size}" # end # -# source://rspec-core//lib/rspec/core/notifications.rb#69 +# pkg:gem/rspec-core#lib/rspec/core/notifications.rb:69 class RSpec::Core::Notifications::ExamplesNotification - # @return [ExamplesNotification] a new instance of ExamplesNotification - # - # source://rspec-core//lib/rspec/core/notifications.rb#70 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:70 def initialize(reporter); end # @return [Array] list of examples # - # source://rspec-core//lib/rspec/core/notifications.rb#75 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:75 def examples; end # @return [Array] list of failed examples # - # source://rspec-core//lib/rspec/core/notifications.rb#80 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:80 def failed_examples; end - # @return [Array] returns failed examples as notifications + # @return [Array] + # returns failed examples as notifications # - # source://rspec-core//lib/rspec/core/notifications.rb#97 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:97 def failure_notifications; end # @return [String] The list of failed examples, fully formatted in the way # that RSpec's built-in formatters emit. # - # source://rspec-core//lib/rspec/core/notifications.rb#110 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:110 def fully_formatted_failed_examples(colorizer = T.unsafe(nil)); end # @return [String] The list of pending examples, fully formatted in the # way that RSpec's built-in formatters emit. # - # source://rspec-core//lib/rspec/core/notifications.rb#122 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:122 def fully_formatted_pending_examples(colorizer = T.unsafe(nil)); end - # @return [Array] returns examples as notifications + # @return [Array] + # returns examples as notifications # - # source://rspec-core//lib/rspec/core/notifications.rb#91 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:91 def notifications; end # @return [Array] list of pending examples # - # source://rspec-core//lib/rspec/core/notifications.rb#85 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:85 def pending_examples; end - # returns pending examples as notifications - # # @return [Array] + # RSpec::Core::Notifications::PendingExampleFailedAsExpectedNotification>] + # returns pending examples as notifications # - # source://rspec-core//lib/rspec/core/notifications.rb#104 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:104 def pending_notifications; end private - # source://rspec-core//lib/rspec/core/notifications.rb#136 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:136 def format_examples(examples); end end @@ -8481,20 +7381,19 @@ end # things useful for examples that have failure info -- typically a # failed or pending spec. # -# @attr example [RSpec::Core::Example] the current example # @example # def example_failed(notification) -# puts "Hey I failed :(" -# puts "Here's my stack trace" -# puts notification.exception.backtrace.join("\n") +# puts "Hey I failed :(" +# puts "Here's my stack trace" +# puts notification.exception.backtrace.join("\n") # end +# +# @attr [RSpec::Core::Example] example the current example # @see ExampleNotification # -# source://rspec-core//lib/rspec/core/notifications.rb#156 +# pkg:gem/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#213 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:213 def initialize(example, exception_presenter = T.unsafe(nil)); end # Returns the failures colorized formatted backtrace. @@ -8502,7 +7401,7 @@ class RSpec::Core::Notifications::FailedExampleNotification < ::RSpec::Core::Not # @param colorizer [#wrap] An object to colorize the message_lines by # @return [Array] the examples colorized backtrace lines # - # source://rspec-core//lib/rspec/core/notifications.rb#195 + # pkg:gem/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. @@ -8510,46 +7409,47 @@ class RSpec::Core::Notifications::FailedExampleNotification < ::RSpec::Core::Not # @param colorizer [#wrap] An object to colorize the message_lines by # @return [Array] The example failure message colorized # - # source://rspec-core//lib/rspec/core/notifications.rb#180 + # pkg:gem/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#165 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:165 def description; end # @return [Exception] The example failure # - # source://rspec-core//lib/rspec/core/notifications.rb#160 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:160 def exception; end # Returns the failures formatted backtrace. # # @return [Array] the examples backtrace lines # - # source://rspec-core//lib/rspec/core/notifications.rb#187 + # pkg:gem/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#201 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:201 def fully_formatted(failure_number, colorizer = T.unsafe(nil)); end # @return [Array] 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#207 + # pkg:gem/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] The example failure message # - # source://rspec-core//lib/rspec/core/notifications.rb#172 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:172 def message_lines; end class << self + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:157 def new(*_arg0); end end end @@ -8559,30 +7459,34 @@ end # example group. It is used by formatters to access information about that # group. # -# @attr group [RSpec::Core::ExampleGroup] the current group # @example # def example_group_started(notification) -# puts "Hey I started #{notification.group.description}" +# puts "Hey I started #{notification.group.description}" # end +# @attr group [RSpec::Core::ExampleGroup] the current group # -# source://rspec-core//lib/rspec/core/notifications.rb#258 +# pkg:gem/rspec-core#lib/rspec/core/notifications.rb:258 class RSpec::Core::Notifications::GroupNotification < ::Struct - # the current group - # - # @return [RSpec::Core::ExampleGroup] the current value of group + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:258 def group; end - # the current group - # - # @param value [RSpec::Core::ExampleGroup] the value to set the attribute group to. - # @return [RSpec::Core::ExampleGroup] the newly set value + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:258 def group=(_); end class << self + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:258 def [](*_arg0); end + + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:258 def inspect; end + + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:258 def keyword_init?; end + + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:258 def members; end + + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:258 def new(*_arg0); end end end @@ -8592,39 +7496,43 @@ end # # @attr message [String] the message # -# source://rspec-core//lib/rspec/core/notifications.rb#264 +# pkg:gem/rspec-core#lib/rspec/core/notifications.rb:264 class RSpec::Core::Notifications::MessageNotification < ::Struct - # the message - # - # @return [String] the current value of message + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:264 def message; end - # the message - # - # @param value [String] the value to set the attribute message to. - # @return [String] the newly set value + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:264 def message=(_); end class << self + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:264 def [](*_arg0); end + + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:264 def inspect; end + + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:264 def keyword_init?; end + + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:264 def members; end + + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:264 def new(*_arg0); end end end # @private # -# source://rspec-core//lib/rspec/core/notifications.rb#11 +# pkg:gem/rspec-core#lib/rspec/core/notifications.rb:11 module RSpec::Core::Notifications::NullColorizer private - # source://rspec-core//lib/rspec/core/notifications.rb#14 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:14 def wrap(line, _code_or_symbol); end class << self - # source://rspec-core//lib/rspec/core/notifications.rb#14 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:14 def wrap(line, _code_or_symbol); end end end @@ -8632,17 +7540,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#506 +# pkg:gem/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#223 +# pkg:gem/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#220 +# pkg:gem/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 @@ -8654,57 +7562,43 @@ class RSpec::Core::Notifications::PendingExampleFixedNotification < ::RSpec::Cor # @attr number_of_examples [Fixnum] the number of examples to profile # @attr example_groups [Array] example groups run # -# source://rspec-core//lib/rspec/core/notifications.rb#429 +# pkg:gem/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#430 + # pkg:gem/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#436 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:436 def duration; end - # the examples run - # - # @return [Array] the current value of examples - # - # source://rspec-core//lib/rspec/core/notifications.rb#436 + # pkg:gem/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#436 + # pkg:gem/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#455 + # pkg:gem/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#447 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:447 def slow_duration; end # @return [Array] the slowest examples # - # source://rspec-core//lib/rspec/core/notifications.rb#439 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:439 def slowest_examples; end # @return [Array] the slowest example groups # - # source://rspec-core//lib/rspec/core/notifications.rb#464 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:464 def slowest_groups; end private - # source://rspec-core//lib/rspec/core/notifications.rb#470 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:470 def calculate_slowest_groups; end end @@ -8714,49 +7608,48 @@ 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#271 +# pkg:gem/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#282 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:282 def fully_formatted; end - # the seed used to randomize ordering - # - # @return [Fixnum] the current value of seed + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:271 def seed; end - # the seed used to randomize ordering - # - # @param value [Fixnum] the value to set the attribute seed to. - # @return [Fixnum] the newly set value + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:271 def seed=(_); end # @api # @return [Boolean] has the seed been used? # - # source://rspec-core//lib/rspec/core/notifications.rb#275 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:275 def seed_used?; end - # whether the seed has been used or not - # - # @param value [Boolean] the value to set the attribute used to. - # @return [Boolean] the newly set value + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:271 def used=(_); end private - # whether the seed has been used or not - # - # @return [Boolean] the current value of used + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:271 def used; end class << self + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:271 def [](*_arg0); end + + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:271 def inspect; end + + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:271 def keyword_init?; end + + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:271 def members; end + + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:271 def new(*_arg0); end end end @@ -8764,18 +7657,19 @@ end # The `SkippedExampleNotification` extends `ExampleNotification` with # things useful for specs that are skipped. # -# @attr example [RSpec::Core::Example] the current example +# @attr [RSpec::Core::Example] example the current example # @see ExampleNotification # -# source://rspec-core//lib/rspec/core/notifications.rb#230 +# pkg:gem/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#235 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:235 def fully_formatted(pending_number, colorizer = T.unsafe(nil)); end class << self + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:231 def new(*_arg0); end end end @@ -8786,39 +7680,36 @@ end # # @attr count [Fixnum] the number counted # @attr load_time [Float] the number of seconds taken to boot RSpec -# and load the spec files +# and load the spec files # -# source://rspec-core//lib/rspec/core/notifications.rb#26 +# pkg:gem/rspec-core#lib/rspec/core/notifications.rb:26 class RSpec::Core::Notifications::StartNotification < ::Struct - # the number counted - # - # @return [Fixnum] the current value of count + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:26 def count; end - # the number counted - # - # @param value [Fixnum] the value to set the attribute count to. - # @return [Fixnum] the newly set value + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:26 def count=(_); end - # the number of seconds taken to boot RSpec - # and load the spec files - # - # @return [Float] the current value of load_time + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:26 def load_time; end - # the number of seconds taken to boot RSpec - # and load the spec files - # - # @param value [Float] the value to set the attribute load_time to. - # @return [Float] the newly set value + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:26 def load_time=(_); end class << self + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:26 def [](*_arg0); end + + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:26 def inspect; end + + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:26 def keyword_init?; end + + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:26 def members; end + + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:26 def new(*_arg0); end end end @@ -8832,293 +7723,247 @@ end # @attr failed_examples [Array] the failed examples # @attr pending_examples [Array] the pending examples # @attr load_time [Float] the number of seconds taken to boot RSpec -# and load the spec files +# and load the spec files # @attr errors_outside_of_examples_count [Integer] the number of errors that -# have occurred processing -# the spec suite +# have occurred processing +# the spec suite # -# source://rspec-core//lib/rspec/core/notifications.rb#300 +# pkg:gem/rspec-core#lib/rspec/core/notifications.rb:300 class RSpec::Core::Notifications::SummaryNotification < ::Struct include ::RSpec::Core::ShellEscape + # @api public + # # Formats failures into a rerunable command format. # - # @api public # @param colorizer [#wrap] An object which supports wrapping text with - # specific colors. + # specific colors. # @return [String] A colorized summary line. # - # source://rspec-core//lib/rspec/core/notifications.rb#364 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:364 def colorized_rerun_commands(colorizer = T.unsafe(nil)); end + # @api public + # # Wraps the results line with colors based on the configured # colors for failure, pending, and success. Defaults to red, # yellow, green accordingly. # - # @api public # @param colorizer [#wrap] An object which supports wrapping text with - # specific colors. + # specific colors. # @return [String] A colorized results line. # - # source://rspec-core//lib/rspec/core/notifications.rb#347 + # pkg:gem/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 - # - # @return [Float] the current value of duration + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:300 def duration; end - # the time taken (in seconds) to run the suite - # - # @param value [Float] the value to set the attribute duration to. - # @return [Float] the newly set value + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:300 def duration=(_); end - # the number of errors that - # have occurred processing - # the spec suite - # - # @return [Integer] the current value of errors_outside_of_examples_count + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:300 def errors_outside_of_examples_count; end - # the number of errors that - # have occurred processing - # the spec suite - # - # @param value [Integer] the value to set the attribute errors_outside_of_examples_count to. - # @return [Integer] the newly set value + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:300 def errors_outside_of_examples_count=(_); end # @api # @return [Fixnum] the number of examples run # - # source://rspec-core//lib/rspec/core/notifications.rb#306 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:306 def example_count; end - # the examples run - # - # @return [Array] the current value of examples + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:300 def examples; end - # the examples run - # - # @param value [Array] the value to set the attribute examples to. - # @return [Array] the newly set value + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:300 def examples=(_); end - # the failed examples - # - # @return [Array] the current value of failed_examples + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:300 def failed_examples; end - # the failed examples - # - # @param value [Array] the value to set the attribute failed_examples to. - # @return [Array] the newly set value + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:300 def failed_examples=(_); end # @api # @return [Fixnum] the number of failed examples # - # source://rspec-core//lib/rspec/core/notifications.rb#312 + # pkg:gem/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#374 + # pkg:gem/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#380 + # pkg:gem/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#386 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:386 def fully_formatted(colorizer = T.unsafe(nil)); end - # the number of seconds taken to boot RSpec - # and load the spec files - # - # @return [Float] the current value of load_time + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:300 def load_time; end - # the number of seconds taken to boot RSpec - # and load the spec files - # - # @param value [Float] the value to set the attribute load_time to. - # @return [Float] the newly set value + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:300 def load_time=(_); end # @api # @return [Fixnum] the number of pending examples # - # source://rspec-core//lib/rspec/core/notifications.rb#318 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:318 def pending_count; end - # the pending examples - # - # @return [Array] the current value of pending_examples + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:300 def pending_examples; end - # the pending examples - # - # @param value [Array] the value to set the attribute pending_examples to. - # @return [Array] the newly set value + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:300 def pending_examples=(_); end # @api # @return [String] A line summarising the result totals of the spec run. # - # source://rspec-core//lib/rspec/core/notifications.rb#324 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:324 def totals_line; end private - # source://rspec-core//lib/rspec/core/notifications.rb#408 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:408 def duplicate_rerun_locations; end - # source://rspec-core//lib/rspec/core/notifications.rb#402 + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:402 def rerun_argument_for(example); end class << self + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:300 def [](*_arg0); end + + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:300 def inspect; end + + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:300 def keyword_init?; end + + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:300 def members; end + + # pkg:gem/rspec-core#lib/rspec/core/notifications.rb:300 def new(*_arg0); end end end -# # Used in place of a {Reporter} for situations where we don't want reporting output. -# # @private +# # Used in place of a {Reporter} for situations where we don't want reporting output. # -# source://rspec-core//lib/rspec/core/reporter.rb#260 +# pkg:gem/rspec-core#lib/rspec/core/reporter.rb:260 class RSpec::Core::NullReporter class << self private - # source://rspec-core//lib/rspec/core/reporter.rb#261 - def method_missing(*_arg0); end + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:261 + def method_missing(*); end end end # @private # -# source://rspec-core//lib/rspec/core/ordering.rb#4 +# pkg:gem/rspec-core#lib/rspec/core/ordering.rb:4 module RSpec::Core::Ordering; end +# @private # Manages ordering configuration. # # @note This is not intended to be used externally. Use -# the APIs provided by `RSpec::Core::Configuration` instead. -# @private +# the APIs provided by `RSpec::Core::Configuration` instead. # -# source://rspec-core//lib/rspec/core/ordering.rb#144 +# pkg:gem/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#147 + # pkg:gem/rspec-core#lib/rspec/core/ordering.rb:147 def initialize; end - # source://rspec-core//lib/rspec/core/ordering.rb#190 + # pkg:gem/rspec-core#lib/rspec/core/ordering.rb:190 def force(hash); end - # source://rspec-core//lib/rspec/core/ordering.rb#164 + # pkg:gem/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#145 + # pkg:gem/rspec-core#lib/rspec/core/ordering.rb:145 def ordering_registry; end - # source://rspec-core//lib/rspec/core/ordering.rb#201 + # pkg:gem/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#145 + # pkg:gem/rspec-core#lib/rspec/core/ordering.rb:145 def seed; end - # source://rspec-core//lib/rspec/core/ordering.rb#158 + # pkg:gem/rspec-core#lib/rspec/core/ordering.rb:158 def seed=(seed); end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/ordering.rb#154 + # pkg:gem/rspec-core#lib/rspec/core/ordering.rb:154 def seed_used?; end end -# Orders items based on a custom block. -# # @private +# Orders items based on a custom block. # -# source://rspec-core//lib/rspec/core/ordering.rb#71 +# pkg:gem/rspec-core#lib/rspec/core/ordering.rb:71 class RSpec::Core::Ordering::Custom - # @return [Custom] a new instance of Custom - # - # source://rspec-core//lib/rspec/core/ordering.rb#72 + # pkg:gem/rspec-core#lib/rspec/core/ordering.rb:72 def initialize(callable); end - # source://rspec-core//lib/rspec/core/ordering.rb#76 + # pkg:gem/rspec-core#lib/rspec/core/ordering.rb:76 def order(list); end end -# A strategy which delays looking up the ordering until needed -# # @private +# A strategy which delays looking up the ordering until needed # -# source://rspec-core//lib/rspec/core/ordering.rb#83 +# pkg:gem/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 + # pkg:gem/rspec-core#lib/rspec/core/ordering.rb:84 def initialize(registry, name); end - # source://rspec-core//lib/rspec/core/ordering.rb#89 + # pkg:gem/rspec-core#lib/rspec/core/ordering.rb:89 def order(list); end private - # source://rspec-core//lib/rspec/core/ordering.rb#99 + # pkg:gem/rspec-core#lib/rspec/core/ordering.rb:99 def lookup_strategy; end - # source://rspec-core//lib/rspec/core/ordering.rb#95 + # pkg:gem/rspec-core#lib/rspec/core/ordering.rb:95 def strategy; end end -# The default global ordering (defined order). -# # @private +# The default global ordering (defined order). # -# source://rspec-core//lib/rspec/core/ordering.rb#7 +# pkg:gem/rspec-core#lib/rspec/core/ordering.rb:7 class RSpec::Core::Ordering::Identity - # source://rspec-core//lib/rspec/core/ordering.rb#8 + # pkg:gem/rspec-core#lib/rspec/core/ordering.rb:8 def order(items); end end -# Orders items randomly. -# # @private +# Orders items randomly. # -# source://rspec-core//lib/rspec/core/ordering.rb#15 +# pkg:gem/rspec-core#lib/rspec/core/ordering.rb:15 class RSpec::Core::Ordering::Random - # @return [Random] a new instance of Random - # - # source://rspec-core//lib/rspec/core/ordering.rb#16 + # pkg:gem/rspec-core#lib/rspec/core/ordering.rb:16 def initialize(configuration); end - # source://rspec-core//lib/rspec/core/ordering.rb#25 + # pkg:gem/rspec-core#lib/rspec/core/ordering.rb:25 def order(items); end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/ordering.rb#21 + # pkg:gem/rspec-core#lib/rspec/core/ordering.rb:21 def used?; end private @@ -9129,461 +7974,452 @@ class RSpec::Core::Ordering::Random # implemented in C) but has the advantage of not requiring us # to load another part of stdlib, which we try to minimize. # - # source://rspec-core//lib/rspec/core/ordering.rb#39 + # pkg:gem/rspec-core#lib/rspec/core/ordering.rb:39 def jenkins_hash_digest(string); end end -# source://rspec-core//lib/rspec/core/ordering.rb#58 +# pkg:gem/rspec-core#lib/rspec/core/ordering.rb:58 RSpec::Core::Ordering::Random::MAX_32_BIT = T.let(T.unsafe(nil), Integer) -# Orders items by modification time (most recent modified first). -# # @private +# Orders items by modification time (most recent modified first). # -# source://rspec-core//lib/rspec/core/ordering.rb#63 +# pkg:gem/rspec-core#lib/rspec/core/ordering.rb:63 class RSpec::Core::Ordering::RecentlyModified - # source://rspec-core//lib/rspec/core/ordering.rb#64 + # pkg:gem/rspec-core#lib/rspec/core/ordering.rb:64 def order(list); end end -# Stores the different ordering strategies. -# # @private +# Stores the different ordering strategies. # -# source://rspec-core//lib/rspec/core/ordering.rb#107 +# pkg:gem/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#108 + # pkg:gem/rspec-core#lib/rspec/core/ordering.rb:108 def initialize(configuration); end - # source://rspec-core//lib/rspec/core/ordering.rb#122 + # pkg:gem/rspec-core#lib/rspec/core/ordering.rb:122 def fetch(name, &fallback); end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/ordering.rb#126 + # pkg:gem/rspec-core#lib/rspec/core/ordering.rb:126 def has_strategy?(name); end - # source://rspec-core//lib/rspec/core/ordering.rb#130 + # pkg:gem/rspec-core#lib/rspec/core/ordering.rb:130 def register(sym, strategy); end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/ordering.rb#134 + # pkg:gem/rspec-core#lib/rspec/core/ordering.rb:134 def used_random_seed?; end end # @private # -# source://rspec-core//lib/rspec/core/output_wrapper.rb#4 +# pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:4 class RSpec::Core::OutputWrapper # @private - # @return [OutputWrapper] a new instance of OutputWrapper # - # source://rspec-core//lib/rspec/core/output_wrapper.rb#9 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:9 def initialize(output); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def <<(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def advise(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def autoclose=(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def autoclose?(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def beep(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def binmode(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def binmode?(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def close(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def close_on_exec=(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def close_on_exec?(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def close_read(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def close_write(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def closed?(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 + def console_input_events(*args, &block); end + + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def cooked(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def cooked!(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def cursor(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def cursor=(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def each(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def each_byte(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def each_char(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def each_codepoint(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/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 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def echo=(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def echo?(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def eof(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def eof?(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def external_encoding(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def fcntl(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def fdatasync(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def fileno(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def flush(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def fsync(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def getbyte(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def getc(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def getch(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def getpass(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def gets(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def goto(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/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 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 + def hide_cursor(*args, &block); end + + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def iflush(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 + def input_pending?(*args, &block); end + + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def inspect(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def internal_encoding(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def ioctl(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def ioflush(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def isatty(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def lineno(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def lineno=(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#17 + # pkg:gem/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 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def noecho(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def nonblock(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def nonblock=(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def nonblock?(*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 + # pkg:gem/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 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:6 def output; end # @private # - # source://rspec-core//lib/rspec/core/output_wrapper.rb#6 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:6 def output=(_arg0); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def path(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def pathconf(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def pid(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def pos(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def pos=(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def pread(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def pressed?(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def print(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def printf(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def putc(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def puts(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def pwrite(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def raw(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def raw!(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def read(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def read_nonblock(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def readbyte(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def readchar(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def readline(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def readlines(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def readpartial(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 - def ready?(*args, &block); end - - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def reopen(*args, &block); end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/output_wrapper.rb#13 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:13 def respond_to?(name, priv = T.unsafe(nil)); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def rewind(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def seek(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def set_encoding(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def set_encoding_by_bom(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 + def show_cursor(*args, &block); end + + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def stat(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def sync(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def sync=(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def sysread(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def sysseek(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def syswrite(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def tell(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def timeout(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def timeout=(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def to_i(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def to_io(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def to_path(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def tty?(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def ttyname(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def ungetbyte(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def ungetc(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def wait(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def wait_priority(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def wait_readable(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/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 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def winsize(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def winsize=(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def write(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/output_wrapper.rb:23 def write_nonblock(*args, &block); end end # @private # -# source://rspec-core//lib/rspec/core/option_parser.rb#6 +# pkg:gem/rspec-core#lib/rspec/core/option_parser.rb:6 class RSpec::Core::Parser - # @return [Parser] a new instance of Parser - # - # source://rspec-core//lib/rspec/core/option_parser.rb#13 + # pkg:gem/rspec-core#lib/rspec/core/option_parser.rb:13 def initialize(original_args); end - # Returns the value of attribute original_args. - # - # source://rspec-core//lib/rspec/core/option_parser.rb#11 + # pkg:gem/rspec-core#lib/rspec/core/option_parser.rb:11 def original_args; end - # source://rspec-core//lib/rspec/core/option_parser.rb#17 + # pkg:gem/rspec-core#lib/rspec/core/option_parser.rb:17 def parse(source = T.unsafe(nil)); end private - # source://rspec-core//lib/rspec/core/option_parser.rb#312 + # pkg:gem/rspec-core#lib/rspec/core/option_parser.rb:312 def add_tag_filter(options, filter_type, tag_name, value = T.unsafe(nil)); end - # source://rspec-core//lib/rspec/core/option_parser.rb#320 + # pkg:gem/rspec-core#lib/rspec/core/option_parser.rb:320 def configure_only_failures(options); end - # source://rspec-core//lib/rspec/core/option_parser.rb#39 + # pkg:gem/rspec-core#lib/rspec/core/option_parser.rb:39 def parser(options); end - # source://rspec-core//lib/rspec/core/option_parser.rb#316 + # pkg:gem/rspec-core#lib/rspec/core/option_parser.rb:316 def set_fail_fast(options, value); end class << self - # source://rspec-core//lib/rspec/core/option_parser.rb#7 + # pkg:gem/rspec-core#lib/rspec/core/option_parser.rb:7 def parse(args, source = T.unsafe(nil)); end end end @@ -9591,26 +8427,32 @@ end # Provides methods to mark examples as pending. These methods are available # to be called from within any example or hook. # -# source://rspec-core//lib/rspec/core/pending.rb#5 +# pkg:gem/rspec-core#lib/rspec/core/pending.rb:5 module RSpec::Core::Pending + # @overload pending() + # @overload pending(message) + # # Marks an example as pending. The rest of the example will still be # executed, and if it passes the example will fail to indicate that the # pending can be removed. # + # @param message [String] optional message to add to the summary report. + # # @example - # describe "some behaviour" do - # # reported as "Pending: no reason given" - # it "is pending with no message" do - # pending - # raise "broken" - # end + # describe "some behaviour" do + # # reported as "Pending: no reason given" + # it "is pending with no message" do + # pending + # raise "broken" + # end + # + # # reported as "Pending: something else getting finished" + # it "is pending with a custom message" do + # pending("something else getting finished") + # raise "broken" + # end + # end # - # # reported as "Pending: something else getting finished" - # it "is pending with a custom message" do - # pending("something else getting finished") - # raise "broken" - # end - # end # @note When using `pending` inside an example body using this method # hooks, such as `before(:example)`, have already be run. This means that # a failure from the code in the `before` hook will prevent the example @@ -9618,246 +8460,235 @@ module RSpec::Core::Pending # executed. If you need to consider hooks as pending as well you can use # the pending metadata as an alternative, e.g. # `it "does something", pending: "message"`. - # @overload pending - # @overload pending - # @param message [String] optional message to add to the summary report. # - # source://rspec-core//lib/rspec/core/pending.rb#62 + # pkg:gem/rspec-core#lib/rspec/core/pending.rb:62 def pending(message = T.unsafe(nil), &_block); end + # @overload skip() + # @overload skip(message) + # # Marks an example as pending and skips execution. # + # @param message [String] optional message to add to the summary report. + # # @example - # describe "an example" do - # # reported as "Pending: no reason given" - # it "is skipped with no message" do - # skip - # end + # describe "an example" do + # # reported as "Pending: no reason given" + # it "is skipped with no message" do + # skip + # end # - # # reported as "Pending: something else getting finished" - # it "is skipped with a custom message" do - # skip "something else getting finished" - # end - # end - # @overload skip - # @overload skip - # @param message [String] optional message to add to the summary report. - # @raise [SkipDeclaredInExample] + # # reported as "Pending: something else getting finished" + # it "is skipped with a custom message" do + # skip "something else getting finished" + # end + # end # - # source://rspec-core//lib/rspec/core/pending.rb#110 + # pkg:gem/rspec-core#lib/rspec/core/pending.rb:110 def skip(message = T.unsafe(nil)); end class << self + # @private + # # Mark example as fixed. # # @param example [RSpec::Core::Example] the example to mark as fixed - # @private # - # source://rspec-core//lib/rspec/core/pending.rb#152 + # pkg:gem/rspec-core#lib/rspec/core/pending.rb:152 def mark_fixed!(example); end + # @private + # # Mark example as pending. # # @param example [RSpec::Core::Example] the example to mark as pending # @param message_or_bool [Boolean, String] the message to use, or true - # @private # - # source://rspec-core//lib/rspec/core/pending.rb#135 + # pkg:gem/rspec-core#lib/rspec/core/pending.rb:135 def mark_pending!(example, message_or_bool); end + # @private + # # Mark example as skipped. # # @param example [RSpec::Core::Example] the example to mark as skipped # @param message_or_bool [Boolean, String] the message to use, or true - # @private # - # source://rspec-core//lib/rspec/core/pending.rb#124 + # pkg:gem/rspec-core#lib/rspec/core/pending.rb:124 def mark_skipped!(example, message_or_bool); end end end # @private # -# source://rspec-core//lib/rspec/core/pending.rb#29 +# pkg:gem/rspec-core#lib/rspec/core/pending.rb:29 RSpec::Core::Pending::NOT_YET_IMPLEMENTED = T.let(T.unsafe(nil), String) # @private # -# source://rspec-core//lib/rspec/core/pending.rb#26 +# pkg:gem/rspec-core#lib/rspec/core/pending.rb:26 RSpec::Core::Pending::NO_REASON_GIVEN = T.let(T.unsafe(nil), String) -# source://rspec-core//lib/rspec/core/pending.rb#22 +# pkg:gem/rspec-core#lib/rspec/core/pending.rb:22 class RSpec::Core::Pending::PendingExampleFixedError < ::StandardError; end # Raised in the middle of an example to indicate that it should be marked # as skipped. # -# source://rspec-core//lib/rspec/core/pending.rb#8 +# pkg:gem/rspec-core#lib/rspec/core/pending.rb:8 class RSpec::Core::Pending::SkipDeclaredInExample < ::StandardError - # @return [SkipDeclaredInExample] a new instance of SkipDeclaredInExample - # - # source://rspec-core//lib/rspec/core/pending.rb#11 + # pkg:gem/rspec-core#lib/rspec/core/pending.rb:11 def initialize(argument); end - # Returns the value of attribute argument. - # - # source://rspec-core//lib/rspec/core/pending.rb#9 + # pkg:gem/rspec-core#lib/rspec/core/pending.rb:9 def argument; end end # @private # -# source://rspec-core//lib/rspec/core/profiler.rb#4 +# pkg:gem/rspec-core#lib/rspec/core/profiler.rb:4 class RSpec::Core::Profiler - # @return [Profiler] a new instance of Profiler - # - # source://rspec-core//lib/rspec/core/profiler.rb#7 + # pkg:gem/rspec-core#lib/rspec/core/profiler.rb:7 def initialize; end - # source://rspec-core//lib/rspec/core/profiler.rb#20 + # pkg:gem/rspec-core#lib/rspec/core/profiler.rb:20 def example_group_finished(notification); end - # source://rspec-core//lib/rspec/core/profiler.rb#13 + # pkg:gem/rspec-core#lib/rspec/core/profiler.rb:13 def example_group_started(notification); end - # Returns the value of attribute example_groups. - # - # source://rspec-core//lib/rspec/core/profiler.rb#11 + # pkg:gem/rspec-core#lib/rspec/core/profiler.rb:11 def example_groups; end - # source://rspec-core//lib/rspec/core/profiler.rb#28 + # pkg:gem/rspec-core#lib/rspec/core/profiler.rb:28 def example_started(notification); end end -# source://rspec-core//lib/rspec/core/profiler.rb#5 +# pkg:gem/rspec-core#lib/rspec/core/profiler.rb:5 RSpec::Core::Profiler::NOTIFICATIONS = T.let(T.unsafe(nil), Array) # A reporter will send notifications to listeners, usually formatters for the # spec suite run. # -# source://rspec-core//lib/rspec/core/reporter.rb#4 +# pkg:gem/rspec-core#lib/rspec/core/reporter.rb:4 class RSpec::Core::Reporter - # @return [Reporter] a new instance of Reporter - # - # source://rspec-core//lib/rspec/core/reporter.rb#14 + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:14 def initialize(configuration); end # @private # - # source://rspec-core//lib/rspec/core/reporter.rb#215 + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:215 def abort_with(msg, exit_status); end # @private # - # source://rspec-core//lib/rspec/core/reporter.rb#194 + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:194 def close_after; end # @private # - # source://rspec-core//lib/rspec/core/reporter.rb#155 + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:155 def deprecation(hash); end # @private # - # source://rspec-core//lib/rspec/core/reporter.rb#143 + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:143 def example_failed(example); end # @private # - # source://rspec-core//lib/rspec/core/reporter.rb#133 + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:133 def example_finished(example); end # @private # - # source://rspec-core//lib/rspec/core/reporter.rb#122 + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:122 def example_group_finished(group); end # @private # - # source://rspec-core//lib/rspec/core/reporter.rb#117 + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:117 def example_group_started(group); end # @private # - # source://rspec-core//lib/rspec/core/reporter.rb#138 + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:138 def example_passed(example); end # @private # - # source://rspec-core//lib/rspec/core/reporter.rb#149 + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:149 def example_pending(example); end # @private # - # source://rspec-core//lib/rspec/core/reporter.rb#127 + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:127 def example_started(example); end # @private # - # source://rspec-core//lib/rspec/core/reporter.rb#28 + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:28 def examples; end - # Reports a run that exited early without having run any examples. - # # @param exit_code [Integer] the exit_code to be return by the reporter # - # source://rspec-core//lib/rspec/core/reporter.rb#84 + # Reports a run that exited early without having run any examples. + # + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:84 def exit_early(exit_code); end # @private - # @return [Boolean] # - # source://rspec-core//lib/rspec/core/reporter.rb#222 + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:222 def fail_fast_limit_met?; end # @private # - # source://rspec-core//lib/rspec/core/reporter.rb#28 + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:28 def failed_examples; end # @private # - # source://rspec-core//lib/rspec/core/reporter.rb#173 + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:173 def finish; end - # Send a custom message to supporting formatters. - # # @param message [#to_s] A message object to send to formatters # - # source://rspec-core//lib/rspec/core/reporter.rb#99 + # Send a custom message to supporting formatters. + # + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:99 def message(message); end # @private # - # source://rspec-core//lib/rspec/core/reporter.rb#207 + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:207 def notify(event, notification); end + # @private # Provides a way to notify of an exception that is not tied to any # particular example (such as an exception encountered in a :suite hook). # Exceptions will be formatted the same way they normally are. # - # @private - # - # source://rspec-core//lib/rspec/core/reporter.rb#163 + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:163 def notify_non_example_exception(exception, context_description); end # @private # - # source://rspec-core//lib/rspec/core/reporter.rb#28 + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:28 def pending_examples; end # @private # - # source://rspec-core//lib/rspec/core/reporter.rb#45 + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:45 def prepare_default(loader, output_stream, deprecation_stream); end - # Publish a custom event to supporting registered formatters. - # # @param event [Symbol] Name of the custom event to trigger on formatters # @param options [Hash] Hash of arguments to provide via `CustomNotification` + # + # Publish a custom event to supporting registered formatters. # @see RSpec::Core::Notifications::CustomNotification # - # source://rspec-core//lib/rspec/core/reporter.rb#108 + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:108 def publish(event, options = T.unsafe(nil)); end # Registers a listener to a list of notifications. The reporter will send @@ -9868,139 +8699,134 @@ class RSpec::Core::Reporter # @param notifications [Array] Array of symbols represents the events a # listener wishes to subscribe too # - # source://rspec-core//lib/rspec/core/reporter.rb#37 + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:37 def register_listener(listener, *notifications); end # @private # - # source://rspec-core//lib/rspec/core/reporter.rb#52 + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:52 def registered_listeners(notification); end + # @overload report(count, &block) + # @overload report(count, &block) + # @param expected_example_count [Integer] the number of examples being run + # @yield [Block] block yields itself for further reporting. + # # Initializes the report run and yields itself for further reporting. The # block is required, so that the reporter can manage cleaning up after the # run. # # @example # - # reporter.report(group.examples.size) do |r| - # example_groups.map {|g| g.run(r) } - # end - # @overload report - # @overload report - # @param expected_example_count [Integer] the number of examples being run - # @yield [Block] block yields itself for further reporting. + # reporter.report(group.examples.size) do |r| + # example_groups.map {|g| g.run(r) } + # end # - # source://rspec-core//lib/rspec/core/reporter.rb#71 + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:71 def report(expected_example_count); end # @private # - # source://rspec-core//lib/rspec/core/reporter.rb#89 + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:89 def start(expected_example_count, time = T.unsafe(nil)); end # @private # - # source://rspec-core//lib/rspec/core/reporter.rb#201 + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:201 def stop(notification); end private - # source://rspec-core//lib/rspec/core/reporter.rb#243 + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:243 def close; end - # source://rspec-core//lib/rspec/core/reporter.rb#234 + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:234 def ensure_listeners_ready; end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/reporter.rb#247 + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:247 def mute_profile_output?; end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/reporter.rb#253 + # pkg:gem/rspec-core#lib/rspec/core/reporter.rb:253 def seed_used?; end end # @private # -# source://rspec-core//lib/rspec/core/reporter.rb#6 +# pkg:gem/rspec-core#lib/rspec/core/reporter.rb:6 RSpec::Core::Reporter::RSPEC_NOTIFICATIONS = T.let(T.unsafe(nil), RSpec::Core::Set) # @private # -# source://rspec-core//lib/rspec/core/ruby_project.rb#7 +# pkg:gem/rspec-core#lib/rspec/core/ruby_project.rb:7 module RSpec::Core::RubyProject private - # source://rspec-core//lib/rspec/core/ruby_project.rb#12 + # pkg:gem/rspec-core#lib/rspec/core/ruby_project.rb:12 def add_dir_to_load_path(dir); end - # source://rspec-core//lib/rspec/core/ruby_project.rb#8 + # pkg:gem/rspec-core#lib/rspec/core/ruby_project.rb:8 def add_to_load_path(*dirs); end - # source://rspec-core//lib/rspec/core/ruby_project.rb#28 + # pkg:gem/rspec-core#lib/rspec/core/ruby_project.rb:28 def ascend_until; end - # source://rspec-core//lib/rspec/core/ruby_project.rb#20 + # pkg:gem/rspec-core#lib/rspec/core/ruby_project.rb:20 def determine_root; end - # source://rspec-core//lib/rspec/core/ruby_project.rb#24 + # pkg:gem/rspec-core#lib/rspec/core/ruby_project.rb:24 def find_first_parent_containing(dir); end - # source://rspec-core//lib/rspec/core/ruby_project.rb#16 + # pkg:gem/rspec-core#lib/rspec/core/ruby_project.rb:16 def root; end class << self - # source://rspec-core//lib/rspec/core/ruby_project.rb#12 + # pkg:gem/rspec-core#lib/rspec/core/ruby_project.rb:46 def add_dir_to_load_path(dir); end - # source://rspec-core//lib/rspec/core/ruby_project.rb#8 + # pkg:gem/rspec-core#lib/rspec/core/ruby_project.rb:45 def add_to_load_path(*dirs); end - # source://rspec-core//lib/rspec/core/ruby_project.rb#28 + # pkg:gem/rspec-core#lib/rspec/core/ruby_project.rb:50 def ascend_until; end - # source://rspec-core//lib/rspec/core/ruby_project.rb#20 + # pkg:gem/rspec-core#lib/rspec/core/ruby_project.rb:48 def determine_root; end - # source://rspec-core//lib/rspec/core/ruby_project.rb#24 + # pkg:gem/rspec-core#lib/rspec/core/ruby_project.rb:49 def find_first_parent_containing(dir); end - # source://rspec-core//lib/rspec/core/ruby_project.rb#16 + # pkg:gem/rspec-core#lib/rspec/core/ruby_project.rb:47 def root; end end end # Provides the main entry point to run a suite of RSpec examples. # -# source://rspec-core//lib/rspec/core/runner.rb#4 +# pkg:gem/rspec-core#lib/rspec/core/runner.rb:4 class RSpec::Core::Runner - # @return [Runner] a new instance of Runner - # - # source://rspec-core//lib/rspec/core/runner.rb#75 + # pkg:gem/rspec-core#lib/rspec/core/runner.rb:75 def initialize(options, configuration = T.unsafe(nil), world = T.unsafe(nil)); end # @attr_reader # @private # - # source://rspec-core//lib/rspec/core/runner.rb#7 + # pkg:gem/rspec-core#lib/rspec/core/runner.rb:7 def configuration; end # @private # - # source://rspec-core//lib/rspec/core/runner.rb#129 + # pkg:gem/rspec-core#lib/rspec/core/runner.rb:129 def configure(err, out); end # @private # - # source://rspec-core//lib/rspec/core/runner.rb#194 + # pkg:gem/rspec-core#lib/rspec/core/runner.rb:194 def exit_code(examples_passed = T.unsafe(nil)); end # @attr_reader # @private # - # source://rspec-core//lib/rspec/core/runner.rb#7 + # pkg:gem/rspec-core#lib/rspec/core/runner.rb:7 def options; end # Configures and runs a spec suite. @@ -10008,7 +8834,7 @@ class RSpec::Core::Runner # @param err [IO] error stream # @param out [IO] output stream # - # source://rspec-core//lib/rspec/core/runner.rb#85 + # pkg:gem/rspec-core#lib/rspec/core/runner.rb:85 def run(err, out); end # Runs the provided example groups. @@ -10018,7 +8844,7 @@ class RSpec::Core::Runner # or the configured failure exit code (1 by default) if specs # failed. # - # source://rspec-core//lib/rspec/core/runner.rb#113 + # pkg:gem/rspec-core#lib/rspec/core/runner.rb:113 def run_specs(example_groups); end # Wires together the various configuration objects and state holders. @@ -10026,63 +8852,61 @@ class RSpec::Core::Runner # @param err [IO] error stream # @param out [IO] output stream # - # source://rspec-core//lib/rspec/core/runner.rb#98 + # pkg:gem/rspec-core#lib/rspec/core/runner.rb:98 def setup(err, out); end # @attr_reader # @private # - # source://rspec-core//lib/rspec/core/runner.rb#7 + # pkg:gem/rspec-core#lib/rspec/core/runner.rb:7 def world; end private - # source://rspec-core//lib/rspec/core/runner.rb#203 + # pkg:gem/rspec-core#lib/rspec/core/runner.rb:203 def persist_example_statuses; end class << self # Register an `at_exit` hook that runs the suite when the process exits. # # @note This is not generally needed. The `rspec` command takes care - # of running examples for you without involving an `at_exit` - # hook. This is only needed if you are running specs using - # the `ruby` command, and even then, the normal way to invoke - # this is by requiring `rspec/autorun`. + # of running examples for you without involving an `at_exit` + # hook. This is only needed if you are running specs using + # the `ruby` command, and even then, the normal way to invoke + # this is by requiring `rspec/autorun`. # - # source://rspec-core//lib/rspec/core/runner.rb#16 + # pkg:gem/rspec-core#lib/rspec/core/runner.rb:16 def autorun; end # @private - # @return [Boolean] # - # source://rspec-core//lib/rspec/core/runner.rb#141 + # pkg:gem/rspec-core#lib/rspec/core/runner.rb:141 def autorun_disabled?; end # @private # - # source://rspec-core//lib/rspec/core/runner.rb#136 + # pkg:gem/rspec-core#lib/rspec/core/runner.rb:136 def disable_autorun!; end # @private # - # source://rspec-core//lib/rspec/core/runner.rb#180 + # pkg:gem/rspec-core#lib/rspec/core/runner.rb:180 def handle_interrupt; end # @private - # @return [Boolean] # - # source://rspec-core//lib/rspec/core/runner.rb#146 + # pkg:gem/rspec-core#lib/rspec/core/runner.rb:146 def installed_at_exit?; end # Runs the suite of specs and exits the process with an appropriate exit # code. # - # source://rspec-core//lib/rspec/core/runner.rb#43 + # pkg:gem/rspec-core#lib/rspec/core/runner.rb:43 def invoke; end # @private # - # source://rspec-core//lib/rspec/core/runner.rb#29 + # pkg:gem/rspec-core#lib/rspec/core/runner.rb:29 def perform_at_exit; end # Run a suite of RSpec examples. Does not exit. @@ -10101,62 +8925,55 @@ class RSpec::Core::Runner # or the configured failure exit code (1 by default) if specs # failed. # - # source://rspec-core//lib/rspec/core/runner.rb#64 + # pkg:gem/rspec-core#lib/rspec/core/runner.rb:64 def run(args, err = T.unsafe(nil), out = T.unsafe(nil)); end # @private - # @return [Boolean] # - # source://rspec-core//lib/rspec/core/runner.rb#151 + # pkg:gem/rspec-core#lib/rspec/core/runner.rb:151 def running_in_drb?; end # @private # - # source://rspec-core//lib/rspec/core/runner.rb#175 + # pkg:gem/rspec-core#lib/rspec/core/runner.rb:175 def trap_interrupt; end end end +# @private +# # We use this to replace `::Set` so we can have the advantage of # constant time key lookups for unique arrays but without the # potential to pollute a developers environment with an extra # piece of the stdlib. This helps to prevent false positive # builds. # -# @private -# -# source://rspec-core//lib/rspec/core/set.rb#11 +# pkg:gem/rspec-core#lib/rspec/core/set.rb:11 class RSpec::Core::Set include ::Enumerable - # @return [Set] a new instance of Set - # - # source://rspec-core//lib/rspec/core/set.rb#14 + # pkg:gem/rspec-core#lib/rspec/core/set.rb:14 def initialize(array = T.unsafe(nil)); end - # source://rspec-core//lib/rspec/core/set.rb#23 + # pkg:gem/rspec-core#lib/rspec/core/set.rb:23 def <<(key); end - # source://rspec-core//lib/rspec/core/set.rb#48 + # pkg:gem/rspec-core#lib/rspec/core/set.rb:48 def clear; end - # source://rspec-core//lib/rspec/core/set.rb#28 + # pkg:gem/rspec-core#lib/rspec/core/set.rb:28 def delete(key); end - # source://rspec-core//lib/rspec/core/set.rb#32 + # pkg:gem/rspec-core#lib/rspec/core/set.rb:32 def each(&block); end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/set.rb#19 + # pkg:gem/rspec-core#lib/rspec/core/set.rb:19 def empty?; end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/set.rb#37 + # pkg:gem/rspec-core#lib/rspec/core/set.rb:37 def include?(key); end - # source://rspec-core//lib/rspec/core/set.rb#41 + # pkg:gem/rspec-core#lib/rspec/core/set.rb:41 def merge(values); end end @@ -10165,125 +8982,119 @@ end # # @example # -# module LoggedInAsAdmin -# extend RSpec::Core::SharedContext -# before(:example) do -# log_in_as :admin -# end -# end +# module LoggedInAsAdmin +# extend RSpec::Core::SharedContext +# before(:example) do +# log_in_as :admin +# end +# end # -# describe "admin section" do -# include LoggedInAsAdmin -# # ... -# end +# describe "admin section" do +# include LoggedInAsAdmin +# # ... +# end # -# source://rspec-core//lib/rspec/core/shared_context.rb#19 +# pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:19 module RSpec::Core::SharedContext # @private # - # source://rspec-core//lib/rspec/core/shared_context.rb#28 + # pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:28 def __shared_context_recordings; end - # source://rspec-core//lib/rspec/core/shared_context.rb#42 + # pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:42 def after(*args, &block); end - # source://rspec-core//lib/rspec/core/shared_context.rb#42 + # pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:42 def append_after(*args, &block); end - # source://rspec-core//lib/rspec/core/shared_context.rb#42 + # pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:42 def append_before(*args, &block); end - # source://rspec-core//lib/rspec/core/shared_context.rb#42 + # pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:42 def around(*args, &block); end - # source://rspec-core//lib/rspec/core/shared_context.rb#42 + # pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:42 def before(*args, &block); end - # source://rspec-core//lib/rspec/core/shared_context.rb#42 + # pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:42 def context(*args, &block); end - # source://rspec-core//lib/rspec/core/shared_context.rb#42 + # pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:42 def describe(*args, &block); end - # source://rspec-core//lib/rspec/core/shared_context.rb#42 + # pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:42 def hooks(*args, &block); end # @private # - # source://rspec-core//lib/rspec/core/shared_context.rb#21 + # pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:21 def included(group); end - # source://rspec-core//lib/rspec/core/shared_context.rb#42 + # pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:42 def let(*args, &block); end - # source://rspec-core//lib/rspec/core/shared_context.rb#42 + # pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:42 def let!(*args, &block); end - # source://rspec-core//lib/rspec/core/shared_context.rb#42 + # pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:42 def prepend_after(*args, &block); end - # source://rspec-core//lib/rspec/core/shared_context.rb#42 + # pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:42 def prepend_before(*args, &block); end - # source://rspec-core//lib/rspec/core/shared_context.rb#42 + # pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:42 def subject(*args, &block); end - # source://rspec-core//lib/rspec/core/shared_context.rb#42 + # pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:42 def subject!(*args, &block); end class << self # @private # - # source://rspec-core//lib/rspec/core/shared_context.rb#40 + # pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:40 def record(methods); end end end # @private # -# source://rspec-core//lib/rspec/core/shared_context.rb#33 +# pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:33 class RSpec::Core::SharedContext::Recording < ::Struct - # Returns the value of attribute args - # - # @return [Object] the current value of args + # pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:33 def args; end - # Sets the attribute args - # - # @param value [Object] the value to set the attribute args to. - # @return [Object] the newly set value + # pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:33 def args=(_); end - # Returns the value of attribute block - # - # @return [Object] the current value of block + # pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:33 def block; end - # Sets the attribute block - # - # @param value [Object] the value to set the attribute block to. - # @return [Object] the newly set value + # pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:33 def block=(_); end - # Returns the value of attribute method_name - # - # @return [Object] the current value of method_name + # pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:33 def method_name; end - # Sets the attribute method_name - # - # @param value [Object] the value to set the attribute method_name to. - # @return [Object] the newly set value + # pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:33 def method_name=(_); end - # source://rspec-core//lib/rspec/core/shared_context.rb#34 + # pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:34 def playback_onto(group); end class << self + # pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:33 def [](*_arg0); end + + # pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:33 def inspect; end + + # pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:33 def keyword_init?; end + + # pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:33 def members; end + + # pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:33 def new(*_arg0); end end end @@ -10302,104 +9113,73 @@ end # but not in any parent or sibling example groups. Shared example # groups defined at the top level can be included from any example group. # -# source://rspec-core//lib/rspec/core/shared_example_group.rb#57 +# pkg:gem/rspec-core#lib/rspec/core/shared_example_group.rb:57 module RSpec::Core::SharedExampleGroup - # Stores the block for later use. The block will be evaluated - # in the context of an example group via `include_examples`, - # `include_context`, or `it_behaves_like`. - # - # @example - # shared_examples "auditable" do - # it "stores an audit record on save!" do - # expect { auditable.save! }.to change(Audit, :count).by(1) - # end - # end - # - # RSpec.describe Account do - # it_behaves_like "auditable" do - # let(:auditable) { Account.new } - # end - # end - # @overload shared_examples - # @overload shared_examples - # @see ExampleGroup.it_behaves_like - # @see ExampleGroup.include_examples - # @see ExampleGroup.include_context - # - # source://rspec-core//lib/rspec/core/shared_example_group.rb#90 + # pkg:gem/rspec-core#lib/rspec/core/shared_example_group.rb:100 def shared_context(name, *args, &block); end + # @overload shared_examples(name, &block) + # @param name [String, Symbol, Module] identifer to use when looking up + # this shared group + # @param block The block to be eval'd + # @overload shared_examples(name, metadata, &block) + # @param name [String, Symbol, Module] identifer to use when looking up + # this shared group + # @param metadata [Array, Hash] metadata to attach to this + # group; any example group or example with matching metadata will + # automatically include this shared example group. + # @param block The block to be eval'd + # # Stores the block for later use. The block will be evaluated # in the context of an example group via `include_examples`, # `include_context`, or `it_behaves_like`. # # @example # shared_examples "auditable" do - # it "stores an audit record on save!" do - # expect { auditable.save! }.to change(Audit, :count).by(1) - # end + # it "stores an audit record on save!" do + # expect { auditable.save! }.to change(Audit, :count).by(1) + # end # end # # RSpec.describe Account do - # it_behaves_like "auditable" do - # let(:auditable) { Account.new } - # end + # it_behaves_like "auditable" do + # let(:auditable) { Account.new } + # end # end - # @overload shared_examples - # @overload shared_examples + # # @see ExampleGroup.it_behaves_like # @see ExampleGroup.include_examples # @see ExampleGroup.include_context # - # source://rspec-core//lib/rspec/core/shared_example_group.rb#90 + # pkg:gem/rspec-core#lib/rspec/core/shared_example_group.rb:90 def shared_examples(name, *args, &block); end - # Stores the block for later use. The block will be evaluated - # in the context of an example group via `include_examples`, - # `include_context`, or `it_behaves_like`. - # - # @example - # shared_examples "auditable" do - # it "stores an audit record on save!" do - # expect { auditable.save! }.to change(Audit, :count).by(1) - # end - # end - # - # RSpec.describe Account do - # it_behaves_like "auditable" do - # let(:auditable) { Account.new } - # end - # end - # @overload shared_examples - # @overload shared_examples - # @see ExampleGroup.it_behaves_like - # @see ExampleGroup.include_examples - # @see ExampleGroup.include_context - # - # source://rspec-core//lib/rspec/core/shared_example_group.rb#90 + # pkg:gem/rspec-core#lib/rspec/core/shared_example_group.rb:101 def shared_examples_for(name, *args, &block); end end # @private # -# source://rspec-core//lib/rspec/core/shared_example_group.rb#149 +# pkg:gem/rspec-core#lib/rspec/core/shared_example_group.rb:149 class RSpec::Core::SharedExampleGroup::Registry - # source://rspec-core//lib/rspec/core/shared_example_group.rb#150 + # pkg:gem/rspec-core#lib/rspec/core/shared_example_group.rb:150 def add(context, name, *metadata_args, &block); end - # source://rspec-core//lib/rspec/core/shared_example_group.rb#174 + # pkg:gem/rspec-core#lib/rspec/core/shared_example_group.rb:174 def find(lookup_contexts, name); end private + # for 1.8.7 # :nocov: # - # source://rspec-core//lib/rspec/core/shared_example_group.rb#257 + # pkg:gem/rspec-core#lib/rspec/core/shared_example_group.rb:257 def ensure_block_has_source_location(_block); end + # 1.8.7 # :nocov: # - # source://rspec-core//lib/rspec/core/shared_example_group.rb#245 + # pkg:gem/rspec-core#lib/rspec/core/shared_example_group.rb:245 def formatted_location(block); end # TODO: remove this in RSpec 4. This exists only to support @@ -10407,102 +9187,96 @@ class RSpec::Core::SharedExampleGroup::Registry # the legacy behavior of shared context metadata, which we do # not want to support in RSpec 4. # - # source://rspec-core//lib/rspec/core/shared_example_group.rb#189 + # pkg:gem/rspec-core#lib/rspec/core/shared_example_group.rb:189 def legacy_add(context, name, *metadata_args, &block); end - # source://rspec-core//lib/rspec/core/shared_example_group.rb#204 + # pkg:gem/rspec-core#lib/rspec/core/shared_example_group.rb:204 def shared_example_groups; end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/shared_example_group.rb#208 + # pkg:gem/rspec-core#lib/rspec/core/shared_example_group.rb:208 def valid_name?(candidate); end - # source://rspec-core//lib/rspec/core/shared_example_group.rb#215 + # pkg:gem/rspec-core#lib/rspec/core/shared_example_group.rb:215 def warn_if_key_taken(context, key, new_block); end end -# Shared examples top level DSL. -# # @api private # -# source://rspec-core//lib/rspec/core/shared_example_group.rb#106 +# Shared examples top level DSL. +# +# pkg:gem/rspec-core#lib/rspec/core/shared_example_group.rb:106 module RSpec::Core::SharedExampleGroup::TopLevelDSL class << self - # @api private # @private # - # source://rspec-core//lib/rspec/core/shared_example_group.rb#108 + # pkg:gem/rspec-core#lib/rspec/core/shared_example_group.rb:108 def definitions; end - # Adds the top level DSL methods to Module and the top level binding. - # # @api private # - # source://rspec-core//lib/rspec/core/shared_example_group.rb#126 + # Adds the top level DSL methods to Module and the top level binding. + # + # pkg:gem/rspec-core#lib/rspec/core/shared_example_group.rb:126 def expose_globally!; end - # @api private # @private - # @return [Boolean] # - # source://rspec-core//lib/rspec/core/shared_example_group.rb#119 + # pkg:gem/rspec-core#lib/rspec/core/shared_example_group.rb:119 def exposed_globally?; end - # Removes the top level DSL methods to Module and the top level binding. - # # @api private # - # source://rspec-core//lib/rspec/core/shared_example_group.rb#135 + # Removes the top level DSL methods to Module and the top level binding. + # + # pkg:gem/rspec-core#lib/rspec/core/shared_example_group.rb:135 def remove_globally!; end end end # Contains information about the inclusion site of a shared example group. # -# source://rspec-core//lib/rspec/core/example_group.rb#782 +# pkg:gem/rspec-core#lib/rspec/core/example_group.rb:789 class RSpec::Core::SharedExampleGroupInclusionStackFrame # @private - # @return [SharedExampleGroupInclusionStackFrame] a new instance of SharedExampleGroupInclusionStackFrame # - # source://rspec-core//lib/rspec/core/example_group.rb#789 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:796 def initialize(shared_group_name, inclusion_location); end # @return [String] Description of this stack frame, in the form used by # RSpec's built-in formatters. # - # source://rspec-core//lib/rspec/core/example_group.rb#805 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:812 def description; end # @return [String] The {#inclusion_location}, formatted for display by a formatter. # - # source://rspec-core//lib/rspec/core/example_group.rb#795 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:802 def formatted_inclusion_location; end # @return [String] the location where the shared example was included # - # source://rspec-core//lib/rspec/core/example_group.rb#786 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:793 def inclusion_location; end # @return [String] the name of the shared example group # - # source://rspec-core//lib/rspec/core/example_group.rb#784 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:791 def shared_group_name; end class << self # @private # - # source://rspec-core//lib/rspec/core/example_group.rb#811 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:818 def current_backtrace; end # @private # - # source://rspec-core//lib/rspec/core/example_group.rb#829 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:836 def shared_example_group_inclusions; end # @private # - # source://rspec-core//lib/rspec/core/example_group.rb#816 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:823 def with_frame(name, location); end end end @@ -10512,76 +9286,69 @@ end # eval'd when the `SharedExampleGroupModule` instance is included in an example # group. # -# source://rspec-core//lib/rspec/core/shared_example_group.rb#9 +# pkg:gem/rspec-core#lib/rspec/core/shared_example_group.rb:9 class RSpec::Core::SharedExampleGroupModule < ::Module - # @return [SharedExampleGroupModule] a new instance of SharedExampleGroupModule - # - # source://rspec-core//lib/rspec/core/shared_example_group.rb#13 + # pkg:gem/rspec-core#lib/rspec/core/shared_example_group.rb:13 def initialize(description, definition, metadata); end # @private # - # source://rspec-core//lib/rspec/core/shared_example_group.rb#11 + # pkg:gem/rspec-core#lib/rspec/core/shared_example_group.rb:11 def definition; end # @private # - # source://rspec-core//lib/rspec/core/shared_example_group.rb#34 + # pkg:gem/rspec-core#lib/rspec/core/shared_example_group.rb:34 def include_in(klass, inclusion_line, args, customization_block); end # Ruby callback for when a module is included in another module is class. # Our definition evaluates the shared group block in the context of the # including example group. # - # source://rspec-core//lib/rspec/core/shared_example_group.rb#28 + # pkg:gem/rspec-core#lib/rspec/core/shared_example_group.rb:28 def included(klass); end # Provides a human-readable representation of this module. # - # source://rspec-core//lib/rspec/core/shared_example_group.rb#20 + # pkg:gem/rspec-core#lib/rspec/core/shared_example_group.rb:20 def inspect; end - # Provides a human-readable representation of this module. - # - # source://rspec-core//lib/rspec/core/shared_example_group.rb#20 + # pkg:gem/rspec-core#lib/rspec/core/shared_example_group.rb:23 def to_s; end end -# Deals with the fact that `shellwords` only works on POSIX systems. -# # @private +# Deals with the fact that `shellwords` only works on POSIX systems. # -# source://rspec-core//lib/rspec/core/shell_escape.rb#5 +# pkg:gem/rspec-core#lib/rspec/core/shell_escape.rb:5 module RSpec::Core::ShellEscape private - # source://rspec-core//lib/rspec/core/shell_escape.rb#32 + # pkg:gem/rspec-core#lib/rspec/core/shell_escape.rb:32 def conditionally_quote(id); end # :nocov: # - # source://rspec-core//lib/rspec/core/shell_escape.rb#19 + # pkg:gem/rspec-core#lib/rspec/core/shell_escape.rb:19 def escape(shell_command); end - # source://rspec-core//lib/rspec/core/shell_escape.rb#8 + # pkg:gem/rspec-core#lib/rspec/core/shell_escape.rb:8 def quote(argument); end - # source://rspec-core//lib/rspec/core/shell_escape.rb#37 + # pkg:gem/rspec-core#lib/rspec/core/shell_escape.rb:37 def shell_allows_unquoted_ids?; end class << self - # source://rspec-core//lib/rspec/core/shell_escape.rb#32 + # pkg:gem/rspec-core#lib/rspec/core/shell_escape.rb:32 def conditionally_quote(id); end - # source://rspec-core//lib/rspec/core/shell_escape.rb#19 + # pkg:gem/rspec-core#lib/rspec/core/shell_escape.rb:19 def escape(shell_command); end - # source://rspec-core//lib/rspec/core/shell_escape.rb#8 + # pkg:gem/rspec-core#lib/rspec/core/shell_escape.rb:8 def quote(argument); end - # @return [Boolean] - # - # source://rspec-core//lib/rspec/core/shell_escape.rb#37 + # pkg:gem/rspec-core#lib/rspec/core/shell_escape.rb:37 def shell_allows_unquoted_ids?; end end end @@ -10593,288 +9360,259 @@ end # # @private # -# source://rspec-core//lib/rspec/core/shell_escape.rb#30 +# pkg:gem/rspec-core#lib/rspec/core/shell_escape.rb:30 RSpec::Core::ShellEscape::SHELLS_ALLOWING_UNQUOTED_IDS = T.let(T.unsafe(nil), Array) -# Provides an execution context for before/after :suite hooks. -# # @private +# Provides an execution context for before/after :suite hooks. # -# source://rspec-core//lib/rspec/core/example.rb#651 +# pkg:gem/rspec-core#lib/rspec/core/example.rb:651 class RSpec::Core::SuiteHookContext < ::RSpec::Core::Example - # @return [SuiteHookContext] a new instance of SuiteHookContext - # - # source://rspec-core//lib/rspec/core/example.rb#652 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:652 def initialize(hook_description, reporter); end - # source://rspec-core//lib/rspec/core/example.rb#659 + # pkg:gem/rspec-core#lib/rspec/core/example.rb:659 def set_exception(exception); end end +# @private # This avoids issues with reporting time caused by examples that # change the value/meaning of Time.now without properly restoring # it. # -# @private -# -# source://rspec-core//lib/rspec/core.rb#174 +# pkg:gem/rspec-core#lib/rspec/core.rb:174 class RSpec::Core::Time class << self + # pkg:gem/rspec-core#lib/rspec/core.rb:176 def now(in: T.unsafe(nil)); end end end # Version information for RSpec Core. # -# source://rspec-core//lib/rspec/core/version.rb#4 +# pkg:gem/rspec-core#lib/rspec/core/version.rb:4 module RSpec::Core::Version; end # Current version of RSpec Core, in semantic versioning format. # -# source://rspec-core//lib/rspec/core/version.rb#6 +# pkg:gem/rspec-core#lib/rspec/core/version.rb:6 RSpec::Core::Version::STRING = T.let(T.unsafe(nil), String) # @private # -# source://rspec-core//lib/rspec/core/warnings.rb#6 +# pkg:gem/rspec-core#lib/rspec/core/warnings.rb:6 module RSpec::Core::Warnings - # Used internally to print deprecation warnings. - # # @private # - # source://rspec-core//lib/rspec/core/warnings.rb#10 - def deprecate(deprecated, data = T.unsafe(nil)); end - # Used internally to print deprecation warnings. # + # pkg:gem/rspec-core#lib/rspec/core/warnings.rb:10 + def deprecate(deprecated, data = T.unsafe(nil)); end + # @private # - # source://rspec-core//lib/rspec/core/warnings.rb#22 + # Used internally to print deprecation warnings. + # + # pkg:gem/rspec-core#lib/rspec/core/warnings.rb:22 def warn_deprecation(message, opts = T.unsafe(nil)); end # @private # - # source://rspec-core//lib/rspec/core/warnings.rb#27 + # pkg:gem/rspec-core#lib/rspec/core/warnings.rb:27 def warn_with(message, options = T.unsafe(nil)); end end -# Internal container for global non-configuration data. -# # @api private # -# source://rspec-core//lib/rspec/core/world.rb#6 +# Internal container for global non-configuration data. +# +# pkg:gem/rspec-core#lib/rspec/core/world.rb:6 class RSpec::Core::World - # @api private - # @return [World] a new instance of World - # - # source://rspec-core//lib/rspec/core/world.rb#26 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:26 def initialize(configuration = T.unsafe(nil)); end - # @api private # @private # - # source://rspec-core//lib/rspec/core/world.rb#115 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:115 def all_example_groups; end - # @api private # @private # - # source://rspec-core//lib/rspec/core/world.rb#120 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:120 def all_examples; end - # Add exclusion filters to announcement message. - # # @api private # - # source://rspec-core//lib/rspec/core/world.rb#226 + # Add exclusion filters to announcement message. + # + # pkg:gem/rspec-core#lib/rspec/core/world.rb:226 def announce_exclusion_filter(announcements); end - # Notify reporter of filters. - # # @api private # - # source://rspec-core//lib/rspec/core/world.rb#171 + # Notify reporter of filters. + # + # pkg:gem/rspec-core#lib/rspec/core/world.rb:171 def announce_filters; end - # Add inclusion filters to announcement message. - # # @api private # - # source://rspec-core//lib/rspec/core/world.rb#217 + # Add inclusion filters to announcement message. + # + # pkg:gem/rspec-core#lib/rspec/core/world.rb:217 def announce_inclusion_filter(announcements); end - # @api private # @private # - # source://rspec-core//lib/rspec/core/world.rb#210 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:210 def everything_filtered_message; end - # Get count of examples to be run. - # # @api private # - # source://rspec-core//lib/rspec/core/world.rb#109 + # Get count of examples to be run. + # + # pkg:gem/rspec-core#lib/rspec/core/world.rb:109 def example_count(groups = T.unsafe(nil)); end - # @api private # @private # - # source://rspec-core//lib/rspec/core/world.rb#8 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:8 def example_group_counts_by_spec_file; end - # @api private # @private # - # source://rspec-core//lib/rspec/core/world.rb#8 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:8 def example_groups; end - # @api private # @private # - # source://rspec-core//lib/rspec/core/world.rb#102 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:102 def exclusion_filter; end - # @api private # @private # - # source://rspec-core//lib/rspec/core/world.rb#69 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:69 def filter_manager; end - # @api private # @private # - # source://rspec-core//lib/rspec/core/world.rb#8 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:8 def filtered_examples; end - # @api private # @private # - # source://rspec-core//lib/rspec/core/world.rb#97 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:97 def inclusion_filter; end # Used internally to signal that a failure outside of an example # has occurred, and that therefore the exit status should indicate # the run failed. - # - # @api private # @private # - # source://rspec-core//lib/rspec/core/world.rb#24 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:24 def non_example_failure; end # Used internally to signal that a failure outside of an example # has occurred, and that therefore the exit status should indicate # the run failed. - # - # @api private # @private # - # source://rspec-core//lib/rspec/core/world.rb#24 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:24 def non_example_failure=(_arg0); end - # @api private # @private # - # source://rspec-core//lib/rspec/core/world.rb#87 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:87 def num_example_groups_defined_in(file); end - # Apply ordering strategy from configuration to example groups. - # # @api private # - # source://rspec-core//lib/rspec/core/world.rb#52 + # Apply ordering strategy from configuration to example groups. + # + # pkg:gem/rspec-core#lib/rspec/core/world.rb:52 def ordered_example_groups; end - # Find line number of previous declaration. - # # @api private # - # source://rspec-core//lib/rspec/core/world.rb#140 + # Find line number of previous declaration. + # + # pkg:gem/rspec-core#lib/rspec/core/world.rb:140 def preceding_declaration_line(absolute_file_name, filter_line); end + # @api public + # # Prepares filters so that they apply to example groups when they run. # # This is a separate method so that filters can be modified/replaced and # examples refiltered during a process's lifetime, which can be useful for # a custom runner. # - # @api public - # - # source://rspec-core//lib/rspec/core/world.rb#43 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:43 def prepare_example_filtering; end - # Records an example group. - # # @api private # - # source://rspec-core//lib/rspec/core/world.rb#81 + # Records an example group. + # + # pkg:gem/rspec-core#lib/rspec/core/world.rb:81 def record(example_group); end - # @api private # @private # - # source://rspec-core//lib/rspec/core/world.rb#74 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:74 def registered_example_group_files; end - # @api private # @private # - # source://rspec-core//lib/rspec/core/world.rb#205 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:205 def report_filter_message(message); end - # @api private # @private # - # source://rspec-core//lib/rspec/core/world.rb#149 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:149 def reporter; end - # Reset world to 'scratch' before running suite. - # # @api private # - # source://rspec-core//lib/rspec/core/world.rb#60 + # Reset world to 'scratch' before running suite. + # + # pkg:gem/rspec-core#lib/rspec/core/world.rb:60 def reset; end # Used internally to signify that a SystemExit occurred in # `Configuration#load_file_handling_errors`, and thus examples cannot # be counted accurately. Specifically, we cannot accurately report # "No examples found". - # - # @api private # @private # - # source://rspec-core//lib/rspec/core/world.rb#18 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:18 def rspec_is_quitting; end # Used internally to signify that a SystemExit occurred in # `Configuration#load_file_handling_errors`, and thus examples cannot # be counted accurately. Specifically, we cannot accurately report # "No examples found". - # - # @api private # @private # - # source://rspec-core//lib/rspec/core/world.rb#18 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:18 def rspec_is_quitting=(_arg0); end - # @api private # @private # - # source://rspec-core//lib/rspec/core/world.rb#92 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:92 def shared_example_group_registry; end - # @api private # @private # - # source://rspec-core//lib/rspec/core/world.rb#154 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:154 def source_from_file(path); end - # @api private # @private # - # source://rspec-core//lib/rspec/core/world.rb#164 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:164 def syntax_highlighter; end + # @private # Traverses the tree of each top level group. # For each it yields the group, then the children, recursively. # Halts the traversal of a branch of the tree as soon as the passed block returns true. @@ -10882,114 +9620,89 @@ class RSpec::Core::World # This is intended to make it easy to find the top-most group that satisfies some # condition. # - # @api private - # @private - # - # source://rspec-core//lib/rspec/core/world.rb#131 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:131 def traverse_example_group_trees_until(&block); end # Used internally to determine what to do when a SIGINT is received. # - # @api private - # - # source://rspec-core//lib/rspec/core/world.rb#11 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:11 def wants_to_quit; end # Used internally to determine what to do when a SIGINT is received. # - # @api private - # - # source://rspec-core//lib/rspec/core/world.rb#11 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:11 def wants_to_quit=(_arg0); end private - # @api private - # - # source://rspec-core//lib/rspec/core/world.rb#234 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:234 def descending_declaration_line_numbers_by_file; end - # @api private - # - # source://rspec-core//lib/rspec/core/world.rb#252 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:252 def fail_if_config_and_cli_options_invalid; end end -# Provides a null implementation for initial use by configuration. -# -# @api private # @private +# Provides a null implementation for initial use by configuration. # -# source://rspec-core//lib/rspec/core/world.rb#264 +# pkg:gem/rspec-core#lib/rspec/core/world.rb:264 module RSpec::Core::World::Null class << self - # @api private - # - # source://rspec-core//lib/rspec/core/world.rb#280 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:280 def all_example_groups; end # :nocov: # - # @api private - # - # source://rspec-core//lib/rspec/core/world.rb#276 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:276 def example_groups; end - # @api private - # - # source://rspec-core//lib/rspec/core/world.rb#265 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:265 def non_example_failure; end - # @api private - # - # source://rspec-core//lib/rspec/core/world.rb#266 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:266 def non_example_failure=(_); end - # @api private - # - # source://rspec-core//lib/rspec/core/world.rb#268 + # pkg:gem/rspec-core#lib/rspec/core/world.rb:268 def registered_example_group_files; end - # @api private - # - # source://rspec-core//lib/rspec/core/world.rb#272 - def traverse_example_group_trees_until; end + # pkg:gem/rspec-core#lib/rspec/core/world.rb:272 + def traverse_example_group_trees_until(&_block); end end end +# @private +# # Namespace for the example group subclasses generated by top-level # `describe`. # -# @private -# -# source://rspec-core//lib/rspec/core/example_group.rb#839 +# pkg:gem/rspec-core#lib/rspec/core/example_group.rb:846 module RSpec::ExampleGroups extend ::RSpec::Support::RecursiveConstMethods class << self - # source://rspec-core//lib/rspec/core/example_group.rb#842 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:849 def assign_const(group); end - # source://rspec-core//lib/rspec/core/example_group.rb#862 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:869 def base_name_for(group); end - # source://rspec-core//lib/rspec/core/example_group.rb#850 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:857 def constant_scope_for(group); end - # source://rspec-core//lib/rspec/core/example_group.rb#895 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:902 def disambiguate(name, const_scope); end - # source://rspec-core//lib/rspec/core/example_group.rb#856 + # pkg:gem/rspec-core#lib/rspec/core/example_group.rb:863 def remove_all_constants; end end end # @private # -# source://rspec-core//lib/rspec/core.rb#187 +# pkg:gem/rspec-core#lib/rspec/core.rb:187 RSpec::MODULES_TO_AUTOLOAD = T.let(T.unsafe(nil), Hash) # @private # -# source://rspec-core//lib/rspec/core/shared_context.rb#54 +# pkg:gem/rspec-core#lib/rspec/core/shared_context.rb:54 RSpec::SharedContext = RSpec::Core::SharedContext diff --git a/sorbet/rbi/gems/rspec-expectations@3.13.3.rbi b/sorbet/rbi/gems/rspec-expectations@3.13.3.rbi deleted file mode 100644 index 6024feb..0000000 --- a/sorbet/rbi/gems/rspec-expectations@3.13.3.rbi +++ /dev/null @@ -1,8183 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rspec-expectations` gem. -# Please instead update this file by running `bin/tapioca gem rspec-expectations`. - - -# RSpec's top level namespace. All of rspec-expectations is contained -# in the `RSpec::Expectations` and `RSpec::Matchers` namespaces. -# -# source://rspec-expectations//lib/rspec/matchers/english_phrasing.rb#1 -module RSpec - class << self - # source://rspec-core/3.13.3/lib/rspec/core.rb#70 - def clear_examples; end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#85 - def configuration; end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#49 - def configuration=(_arg0); end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#97 - def configure; end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#194 - def const_missing(name); end - - # source://rspec-core/3.13.3/lib/rspec/core/dsl.rb#42 - def context(*args, &example_group_block); end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#122 - def current_example; end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#128 - def current_example=(example); end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#154 - def current_scope; end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#134 - def current_scope=(scope); end - - # source://rspec-core/3.13.3/lib/rspec/core/dsl.rb#42 - def describe(*args, &example_group_block); end - - # source://rspec-core/3.13.3/lib/rspec/core/dsl.rb#42 - def example_group(*args, &example_group_block); end - - # source://rspec-core/3.13.3/lib/rspec/core/dsl.rb#42 - def fcontext(*args, &example_group_block); end - - # source://rspec-core/3.13.3/lib/rspec/core/dsl.rb#42 - def fdescribe(*args, &example_group_block); end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#58 - def reset; end - - # source://rspec-core/3.13.3/lib/rspec/core/shared_example_group.rb#110 - def shared_context(name, *args, &block); end - - # source://rspec-core/3.13.3/lib/rspec/core/shared_example_group.rb#110 - def shared_examples(name, *args, &block); end - - # source://rspec-core/3.13.3/lib/rspec/core/shared_example_group.rb#110 - def shared_examples_for(name, *args, &block); end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#160 - def world; end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#49 - def world=(_arg0); end - - # source://rspec-core/3.13.3/lib/rspec/core/dsl.rb#42 - def xcontext(*args, &example_group_block); end - - # source://rspec-core/3.13.3/lib/rspec/core/dsl.rb#42 - def xdescribe(*args, &example_group_block); end - end -end - -# RSpec::Expectations provides a simple, readable API to express -# the expected outcomes in a code example. To express an expected -# outcome, wrap an object or block in `expect`, call `to` or `to_not` -# (aliased as `not_to`) and pass it a matcher object: -# -# expect(order.total).to eq(Money.new(5.55, :USD)) -# expect(list).to include(user) -# expect(message).not_to match(/foo/) -# expect { do_something }.to raise_error -# -# The last form (the block form) is needed to match against ruby constructs -# that are not objects, but can only be observed when executing a block -# of code. This includes raising errors, throwing symbols, yielding, -# and changing values. -# -# When `expect(...).to` is invoked with a matcher, it turns around -# and calls `matcher.matches?()`. For example, -# in the expression: -# -# expect(order.total).to eq(Money.new(5.55, :USD)) -# -# ...`eq(Money.new(5.55, :USD))` returns a matcher object, and it results -# in the equivalent of `eq.matches?(order.total)`. If `matches?` returns -# `true`, the expectation is met and execution continues. If `false`, then -# the spec fails with the message returned by `eq.failure_message`. -# -# Given the expression: -# -# expect(order.entries).not_to include(entry) -# -# ...the `not_to` method (also available as `to_not`) invokes the equivalent of -# `include.matches?(order.entries)`, but it interprets `false` as success, and -# `true` as a failure, using the message generated by -# `include.failure_message_when_negated`. -# -# rspec-expectations ships with a standard set of useful matchers, and writing -# your own matchers is quite simple. -# -# See [RSpec::Matchers](../RSpec/Matchers) for more information about the -# built-in matchers that ship with rspec-expectations, and how to write your -# own custom matchers. -# -# source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#2 -module RSpec::Expectations - class << self - # The configuration object. - # - # @return [RSpec::Expectations::Configuration] the configuration object - # - # source://rspec-expectations//lib/rspec/expectations/configuration.rb#228 - def configuration; end - - # @private - # - # source://rspec-expectations//lib/rspec/expectations/fail_with.rb#13 - def differ; end - - # Raises an RSpec::Expectations::ExpectationNotMetError with message. - # Adds a diff to the failure message when `expected` and `actual` are - # both present. - # - # @param message [String] - # @param expected [Object] - # @param actual [Object] - # - # source://rspec-expectations//lib/rspec/expectations/fail_with.rb#27 - def fail_with(message, expected = T.unsafe(nil), actual = T.unsafe(nil)); end - end -end - -# Validates the provided matcher to ensure it supports block -# expectations, in order to avoid user confusion when they -# use a block thinking the expectation will be on the return -# value of the block rather than the block itself. -# -# @private -# -# source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#136 -class RSpec::Expectations::BlockExpectationTarget < ::RSpec::Expectations::ExpectationTarget - # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#142 - def not_to(matcher, message = T.unsafe(nil), &block); end - - # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#137 - def to(matcher, message = T.unsafe(nil), &block); end - - # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#142 - def to_not(matcher, message = T.unsafe(nil), &block); end - - private - - # @raise [ExpectationNotMetError] - # - # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#150 - def enforce_block_expectation(matcher); end - - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#158 - def supports_block_expectations?(matcher); end -end - -# @private -# -# source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#4 -class RSpec::Expectations::BlockSnippetExtractor - # @return [BlockSnippetExtractor] a new instance of BlockSnippetExtractor - # - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#17 - def initialize(proc, method_name); end - - # Ideally we should properly handle indentations of multiline snippet, - # but it's not implemented yet since because we use result of this method only when it's a - # single line and implementing the logic introduces additional complexity. - # - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#25 - def body_content_lines; end - - # rubocop should properly handle `Struct.new {}` as an inner class definition. - # - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#7 - def method_name; end - - # rubocop should properly handle `Struct.new {}` as an inner class definition. - # - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#7 - def proc; end - - private - - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#62 - def beginning_line_number; end - - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#39 - def block_token_extractor; end - - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#58 - def file_path; end - - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#31 - def raw_body_lines; end - - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#35 - def raw_body_snippet; end - - # @raise [TargetNotFoundError] - # - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#44 - def source; end - - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#66 - def source_location; end - - class << self - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#9 - def try_extracting_single_line_body_of(proc, method_name); end - end -end - -# source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#72 -class RSpec::Expectations::BlockSnippetExtractor::AmbiguousTargetError < ::RSpec::Expectations::BlockSnippetExtractor::Error; end - -# Locates target block with node information (semantics), which tokens don't have. -# -# @private -# -# source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#200 -class RSpec::Expectations::BlockSnippetExtractor::BlockLocator < ::Struct - # Returns the value of attribute beginning_line_number - # - # @return [Object] the current value of beginning_line_number - def beginning_line_number; end - - # Sets the attribute beginning_line_number - # - # @param value [Object] the value to set the attribute beginning_line_number to. - # @return [Object] the newly set value - def beginning_line_number=(_); end - - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#205 - def body_content_locations; end - - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#201 - def method_call_location; end - - # Returns the value of attribute method_name - # - # @return [Object] the current value of method_name - def method_name; end - - # Sets the attribute method_name - # - # @param value [Object] the value to set the attribute method_name to. - # @return [Object] the newly set value - def method_name=(_); end - - # Returns the value of attribute source - # - # @return [Object] the current value of source - def source; end - - # Sets the attribute source - # - # @param value [Object] the value to set the attribute source to. - # @return [Object] the newly set value - def source=(_); end - - private - - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#218 - def block_body_node; end - - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#223 - def block_wrapper_node; end - - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#234 - def candidate_block_wrapper_nodes; end - - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#243 - def candidate_method_ident_nodes; end - - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#211 - def method_ident_node; end - - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#249 - def method_ident_node?(node); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# Performs extraction of block body snippet using tokens, -# which cannot be done with node information. -# -# @private -# -# source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#77 -class RSpec::Expectations::BlockSnippetExtractor::BlockTokenExtractor < ::Struct - # @return [BlockTokenExtractor] a new instance of BlockTokenExtractor - # - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#80 - def initialize(*_arg0); end - - # Returns the value of attribute beginning_line_number - # - # @return [Object] the current value of beginning_line_number - def beginning_line_number; end - - # Sets the attribute beginning_line_number - # - # @param value [Object] the value to set the attribute beginning_line_number to. - # @return [Object] the newly set value - def beginning_line_number=(_); end - - # Returns the value of attribute body_tokens. - # - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#78 - def body_tokens; end - - # Returns the value of attribute method_name - # - # @return [Object] the current value of method_name - def method_name; end - - # Sets the attribute method_name - # - # @param value [Object] the value to set the attribute method_name to. - # @return [Object] the newly set value - def method_name=(_); end - - # Returns the value of attribute source - # - # @return [Object] the current value of source - def source; end - - # Sets the attribute source - # - # @param value [Object] the value to set the attribute source to. - # @return [Object] the newly set value - def source=(_); end - - # Returns the value of attribute state. - # - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#78 - def state; end - - private - - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#126 - def after_beginning_of_args_state(token); end - - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#130 - def after_beginning_of_body_state(token); end - - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#109 - def after_method_call_state(token); end - - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#113 - def after_opener_state(token); end - - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#193 - def block_locator; end - - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#187 - def correct_block?(body_tokens); end - - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#143 - def finalize_pending_tokens!; end - - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#97 - def finish!; end - - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#149 - def finish_or_find_next_block_if_incorrect!; end - - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#170 - def handle_closer_token(token); end - - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#160 - def handle_opener_token(token); end - - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#105 - def initial_state(token); end - - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#101 - def invoke_state_handler(token); end - - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#166 - def opener_token?(token); end - - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#179 - def opener_token_stack; end - - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#87 - def parse!; end - - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#139 - def pending_tokens; end - - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#183 - def pipe_token?(token); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#70 -class RSpec::Expectations::BlockSnippetExtractor::Error < ::StandardError; end - -# source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#71 -class RSpec::Expectations::BlockSnippetExtractor::TargetNotFoundError < ::RSpec::Expectations::BlockSnippetExtractor::Error; end - -# Provides configuration options for rspec-expectations. -# If you are using rspec-core, you can access this via a -# block passed to `RSpec::Core::Configuration#expect_with`. -# Otherwise, you can access it via RSpec::Expectations.configuration. -# -# @example -# RSpec.configure do |rspec| -# rspec.expect_with :rspec do |c| -# # c is the config object -# end -# end -# -# # or -# -# RSpec::Expectations.configuration -# -# source://rspec-expectations//lib/rspec/expectations/configuration.rb#20 -class RSpec::Expectations::Configuration - # @return [Configuration] a new instance of Configuration - # - # source://rspec-expectations//lib/rspec/expectations/configuration.rb#29 - def initialize; end - - # :nocov: Because this is only really _useful_ on 1.8, and hard to test elsewhere. - # - # Adds `should` and `should_not` to the given classes - # or modules. This can be used to ensure `should` works - # properly on things like proxy objects (particular - # `Delegator`-subclassed objects on 1.8). - # - # @param modules [Array] the list of classes or modules - # to add `should` and `should_not` to. - # - # source://rspec-expectations//lib/rspec/expectations/configuration.rb#116 - def add_should_and_should_not_to(*modules); end - - # Sets or gets the backtrace formatter. The backtrace formatter should - # implement `#format_backtrace(Array)`. This is used - # to format backtraces of errors handled by the `raise_error` - # matcher. - # - # If you are using rspec-core, rspec-core's backtrace formatting - # will be used (including respecting the presence or absence of - # the `--backtrace` option). - # - # source://rspec-expectations//lib/rspec/expectations/configuration.rb#134 - def backtrace_formatter; end - - # Sets or gets the backtrace formatter. The backtrace formatter should - # implement `#format_backtrace(Array)`. This is used - # to format backtraces of errors handled by the `raise_error` - # matcher. - # - # If you are using rspec-core, rspec-core's backtrace formatting - # will be used (including respecting the presence or absence of - # the `--backtrace` option). - # - # source://rspec-expectations//lib/rspec/expectations/configuration.rb#133 - def backtrace_formatter=(_arg0); end - - # Indicates whether or not diffs should be colored. - # Delegates to rspec-core's color option if rspec-core - # is loaded; otherwise you can set it here. - # - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/expectations/configuration.rb#88 - def color?; end - - # @private - # - # source://rspec-expectations//lib/rspec/expectations/configuration.rb#221 - def false_positives_handler; end - - # Sets if custom matcher descriptions and failure messages - # should include clauses from methods defined using `chain`. - # - # @param value [Boolean] - # - # source://rspec-expectations//lib/rspec/expectations/configuration.rb#145 - def include_chain_clauses_in_custom_matcher_descriptions=(_arg0); end - - # Indicates whether or not custom matcher descriptions and failure messages - # should include clauses from methods defined using `chain`. It is - # false by default for backwards compatibility. - # - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/expectations/configuration.rb#150 - def include_chain_clauses_in_custom_matcher_descriptions?; end - - # Configures the maximum character length that RSpec will print while - # formatting an object. You can set length to nil to prevent RSpec from - # doing truncation. - # - # @example - # RSpec.configure do |rspec| - # rspec.expect_with :rspec do |c| - # c.max_formatted_output_length = 200 - # end - # end - # @param length [Fixnum] the number of characters to limit the formatted output to. - # - # source://rspec-expectations//lib/rspec/expectations/configuration.rb#70 - def max_formatted_output_length=(length); end - - # Indicates what RSpec will do about matcher use which will - # potentially cause false positives in tests, generally you want to - # avoid such scenarios so this defaults to `true`. - # - # source://rspec-expectations//lib/rspec/expectations/configuration.rb#211 - def on_potential_false_positives; end - - # Configures what RSpec will do about matcher use which will - # potentially cause false positives in tests. - # - # @param behavior [Symbol] can be set to :warn, :raise or :nothing - # - # source://rspec-expectations//lib/rspec/expectations/configuration.rb#187 - def on_potential_false_positives=(behavior); end - - # @private - # - # source://rspec-expectations//lib/rspec/expectations/configuration.rb#155 - def reset_syntaxes_to_default; end - - # Returns the value of attribute strict_predicate_matchers. - # - # source://rspec-expectations//lib/rspec/expectations/configuration.rb#202 - def strict_predicate_matchers; end - - # Configures RSpec to check predicate matchers to `be(true)` / `be(false)` (strict), - # or `be_truthy` / `be_falsey` (not strict). - # Historically, the default was `false`, but `true` is recommended. - # - # @raise [ArgumentError] - # - # source://rspec-expectations//lib/rspec/expectations/configuration.rb#197 - def strict_predicate_matchers=(flag); end - - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/expectations/configuration.rb#204 - def strict_predicate_matchers?; end - - # The list of configured syntaxes. - # - # @example - # unless RSpec::Matchers.configuration.syntax.include?(:expect) - # raise "this RSpec extension gem requires the rspec-expectations `:expect` syntax" - # end - # @return [Array] the list of configured syntaxes. - # - # source://rspec-expectations//lib/rspec/expectations/configuration.rb#80 - def syntax; end - - # Configures the supported syntax. - # - # @example - # RSpec.configure do |rspec| - # rspec.expect_with :rspec do |c| - # c.syntax = :should - # # or - # c.syntax = :expect - # # or - # c.syntax = [:should, :expect] - # end - # end - # @param values [Array, Symbol] the syntaxes to enable - # - # source://rspec-expectations//lib/rspec/expectations/configuration.rb#46 - def syntax=(values); end - - # Configures whether RSpec will warn about matcher use which will - # potentially cause false positives in tests. - # - # @param boolean [Boolean] - # - # source://rspec-expectations//lib/rspec/expectations/configuration.rb#173 - def warn_about_potential_false_positives=(boolean); end - - # Indicates whether RSpec will warn about matcher use which will - # potentially cause false positives in tests, generally you want to - # avoid such scenarios so this defaults to `true`. - # - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/expectations/configuration.rb#216 - def warn_about_potential_false_positives?; end -end - -# @private -# -# source://rspec-expectations//lib/rspec/expectations/configuration.rb#22 -RSpec::Expectations::Configuration::FALSE_POSITIVE_BEHAVIOURS = T.let(T.unsafe(nil), Hash) - -# Null implementation of a backtrace formatter used by default -# when rspec-core is not loaded. Does no filtering. -# -# @api private -# -# source://rspec-expectations//lib/rspec/expectations/configuration.rb#163 -module RSpec::Expectations::Configuration::NullBacktraceFormatter - class << self - # source://rspec-expectations//lib/rspec/expectations/configuration.rb#164 - def format_backtrace(backtrace); end - end -end - -# @private -# -# source://rspec-expectations//lib/rspec/expectations/handler.rb#4 -module RSpec::Expectations::ExpectationHelper - class << self - # source://rspec-expectations//lib/rspec/expectations/handler.rb#5 - def check_message(msg); end - - # source://rspec-expectations//lib/rspec/expectations/handler.rb#32 - def handle_failure(matcher, message, failure_message_method); end - - # Returns an RSpec-3+ compatible matcher, wrapping a legacy one - # in an adapter if necessary. - # - # @private - # - # source://rspec-expectations//lib/rspec/expectations/handler.rb#18 - def modern_matcher_from(matcher); end - - # source://rspec-expectations//lib/rspec/expectations/handler.rb#23 - def with_matcher(handler, matcher, message); end - end -end - -# Exception raised when an expectation fails. -# -# the user sets an expectation, it can't be caught in their -# code by a bare `rescue`. -# -# @api public -# @note We subclass Exception so that in a stub implementation if -# -# source://rspec-expectations//lib/rspec/expectations.rb#67 -class RSpec::Expectations::ExpectationNotMetError < ::Exception; end - -# Wraps the target of an expectation. -# -# @example -# expect(something) # => ExpectationTarget wrapping something -# expect { do_something } # => ExpectationTarget wrapping the block -# -# # used with `to` -# expect(actual).to eq(3) -# -# # with `not_to` -# expect(actual).not_to eq(3) -# @note `ExpectationTarget` is not intended to be instantiated -# directly by users. Use `expect` instead. -# -# source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#17 -class RSpec::Expectations::ExpectationTarget - include ::RSpec::Expectations::ExpectationTarget::InstanceMethods - - # @api private - # @return [ExpectationTarget] a new instance of ExpectationTarget - # - # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#31 - def initialize(value); end - - # @note this name aligns with `Minitest::Expectation` so that our - # {InstanceMethods} module can be included in that class when - # used in a Minitest context. - # @return [Object] the target of the expectation - # - # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#28 - def target; end - - class << self - # @private - # - # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#36 - def for(value, block); end - end -end - -# Defines instance {ExpectationTarget} instance methods. These are defined -# in a module so we can include it in `Minitest::Expectation` when -# `rspec/expectations/minitest_integration` is loaded in order to -# support usage with Minitest. -# -# source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#53 -module RSpec::Expectations::ExpectationTarget::InstanceMethods - # Runs the given expectation, passing if `matcher` returns false. - # - # @example - # expect(value).not_to eq(5) - # @param matcher [Matcher] - # @param message [String, Proc] optional message to display when the expectation fails - # @return [Boolean] false if the negative expectation succeeds (else raises) - # @see RSpec::Matchers - # - # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#76 - def not_to(matcher = T.unsafe(nil), message = T.unsafe(nil), &block); end - - # Runs the given expectation, passing if `matcher` returns true. - # - # @example - # expect(value).to eq(5) - # expect { perform }.to raise_error - # @param matcher [Matcher] - # @param message [String, Proc] optional message to display when the expectation fails - # @return [Boolean] true if the expectation succeeds (else raises) - # @see RSpec::Matchers - # - # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#63 - def to(matcher = T.unsafe(nil), message = T.unsafe(nil), &block); end - - # Runs the given expectation, passing if `matcher` returns false. - # - # @example - # expect(value).not_to eq(5) - # @param matcher [Matcher] - # @param message [String, Proc] optional message to display when the expectation fails - # @return [Boolean] false if the negative expectation succeeds (else raises) - # @see RSpec::Matchers - # - # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#76 - def to_not(matcher = T.unsafe(nil), message = T.unsafe(nil), &block); end - - private - - # @raise [ArgumentError] - # - # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#84 - def prevent_operator_matchers(verb); end -end - -# Used as a sentinel value to be able to tell when the user -# did not pass an argument. We can't use `nil` for that because -# `nil` is a valid value to pass. -# -# @private -# -# source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#22 -module RSpec::Expectations::ExpectationTarget::UndefinedValue; end - -# @private -# -# source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#4 -class RSpec::Expectations::FailureAggregator - # @return [FailureAggregator] a new instance of FailureAggregator - # - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#97 - def initialize(block_label, metadata); end - - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#27 - def aggregate; end - - # Returns the value of attribute block_label. - # - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#5 - def block_label; end - - # 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#64 - def call(failure, options); end - - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#54 - def failures; end - - # Returns the value of attribute metadata. - # - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#5 - def metadata; end - - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#58 - 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#92 - def assign_backtrace(failure); end - - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#103 - def notify_aggregated_failures; end -end - -# source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#25 -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#19 - def inspect; end -end - -# :nocov: -# `inspect` was apparently used by some versions early in ruby 3 while constructing -# NoMethodError, but seems to be no longer. -# -# @private -# -# source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#14 -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. -# -# @deprecated Use LegacyMatcherAdapter instead. -# @private -# -# source://rspec-expectations//lib/rspec/expectations/handler.rb#179 -RSpec::Expectations::LegacyMacherAdapter = RSpec::Expectations::LegacyMatcherAdapter - -# Wraps a matcher written against one of the legacy protocols in -# order to present the current protocol. -# -# @private -# -# source://rspec-expectations//lib/rspec/expectations/handler.rb#112 -class RSpec::Expectations::LegacyMatcherAdapter < ::RSpec::Matchers::MatcherDelegator - # @return [LegacyMatcherAdapter] a new instance of LegacyMatcherAdapter - # - # source://rspec-expectations//lib/rspec/expectations/handler.rb#113 - def initialize(matcher); end - - class << self - # source://rspec-expectations//lib/rspec/expectations/handler.rb#123 - def wrap(matcher); end - end -end - -# Before RSpec 1.2, the failure message protocol was: -# * `failure_message` -# * `negative_failure_message` -# -# @private -# -# source://rspec-expectations//lib/rspec/expectations/handler.rb#156 -class RSpec::Expectations::LegacyMatcherAdapter::RSpec1 < ::RSpec::Expectations::LegacyMatcherAdapter - # source://rspec-expectations//lib/rspec/expectations/handler.rb#157 - def failure_message; end - - # source://rspec-expectations//lib/rspec/expectations/handler.rb#161 - def failure_message_when_negated; end - - class << self - # Note: `failure_message` is part of the RSpec 3 protocol - # (paired with `failure_message_when_negated`), so we don't check - # for `failure_message` here. - # - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/expectations/handler.rb#168 - def interface_matches?(matcher); end - end -end - -# Starting in RSpec 1.2 (and continuing through all 2.x releases), -# the failure message protocol was: -# * `failure_message_for_should` -# * `failure_message_for_should_not` -# -# @private -# -# source://rspec-expectations//lib/rspec/expectations/handler.rb#132 -class RSpec::Expectations::LegacyMatcherAdapter::RSpec2 < ::RSpec::Expectations::LegacyMatcherAdapter - # source://rspec-expectations//lib/rspec/expectations/handler.rb#133 - def failure_message; end - - # source://rspec-expectations//lib/rspec/expectations/handler.rb#137 - def failure_message_when_negated; end - - class << self - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/expectations/handler.rb#141 - def interface_matches?(matcher); end - end -end - -# Exception raised from `aggregate_failures` when multiple expectations fail. -# -# @note The constant is defined here but the extensive logic of this class -# is lazily defined when `FailureAggregator` is autoloaded, since we do -# not need to waste time defining that functionality unless -# `aggregate_failures` is used. -# -# source://rspec-expectations//lib/rspec/expectations.rb#76 -class RSpec::Expectations::MultipleExpectationsNotMetError < ::RSpec::Expectations::ExpectationNotMetError - # @return [MultipleExpectationsNotMetError] a new instance of MultipleExpectationsNotMetError - # - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#160 - def initialize(failure_aggregator); end - - # @return [String] The user-assigned label for the aggregation block. - # - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#135 - def aggregation_block_label; end - - # @return [Hash] The metadata hash passed to `aggregate_failures`. - # - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#140 - def aggregation_metadata; end - - # @return [Array] The list of expectation failures and other exceptions, combined. - # - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#132 - def all_exceptions; end - - # return [String] A description of the failure/error counts. - # - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#151 - def exception_count_description; end - - # @return [Array] The list of expectation failures. - # - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#122 - def failures; end - - # @return [String] The fully formatted exception message. - # - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#117 - def message; end - - # @return [Array] The list of other exceptions. - # - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#127 - 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#145 - def summary; end - - private - - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#192 - def backtrace_line(line); end - - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#165 - def block_description; end - - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#174 - def enumerated(exceptions, index_offset); end - - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#204 - def enumerated_errors; end - - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#200 - def enumerated_failures; end - - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#182 - def exclusion_patterns; end - - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#188 - def format_backtrace(backtrace); end - - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#219 - def indentation; end - - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#210 - def indented(failure_message, index); end - - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#231 - def index_label(index); end - - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#223 - def longest_index_label_width; end - - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#170 - def pluralize(noun, count); end - - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#227 - def width_of_label(index); end -end - -# @private -# -# source://rspec-expectations//lib/rspec/expectations/handler.rb#73 -class RSpec::Expectations::NegativeExpectationHandler - class << self - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/expectations/handler.rb#87 - def does_not_match?(matcher, actual, &block); end - - # source://rspec-expectations//lib/rspec/expectations/handler.rb#74 - def handle_matcher(actual, initial_matcher, custom_message = T.unsafe(nil), &block); end - - # source://rspec-expectations//lib/rspec/expectations/handler.rb#103 - def opposite_should_method; end - - # source://rspec-expectations//lib/rspec/expectations/handler.rb#99 - def should_method; end - - # source://rspec-expectations//lib/rspec/expectations/handler.rb#95 - def verb; end - end -end - -# @private -# -# source://rspec-expectations//lib/rspec/expectations/handler.rb#45 -class RSpec::Expectations::PositiveExpectationHandler - class << self - # source://rspec-expectations//lib/rspec/expectations/handler.rb#46 - def handle_matcher(actual, initial_matcher, custom_message = T.unsafe(nil), &block); end - - # source://rspec-expectations//lib/rspec/expectations/handler.rb#67 - def opposite_should_method; end - - # source://rspec-expectations//lib/rspec/expectations/handler.rb#63 - def should_method; end - - # source://rspec-expectations//lib/rspec/expectations/handler.rb#59 - def verb; end - end -end - -# Provides methods for enabling and disabling the available -# syntaxes provided by rspec-expectations. -# -# @api private -# -# source://rspec-expectations//lib/rspec/expectations/syntax.rb#6 -module RSpec::Expectations::Syntax - private - - # Determines where we add `should` and `should_not`. - # - # @api private - # - # source://rspec-expectations//lib/rspec/expectations/syntax.rb#11 - def default_should_host; end - - # Disables the `expect` syntax. - # - # @api private - # - # source://rspec-expectations//lib/rspec/expectations/syntax.rb#80 - def disable_expect(syntax_host = T.unsafe(nil)); end - - # Disables the `should` syntax. - # - # @api private - # - # source://rspec-expectations//lib/rspec/expectations/syntax.rb#57 - def disable_should(syntax_host = T.unsafe(nil)); end - - # Enables the `expect` syntax. - # - # @api private - # - # source://rspec-expectations//lib/rspec/expectations/syntax.rb#68 - def enable_expect(syntax_host = T.unsafe(nil)); end - - # Enables the `should` syntax. - # - # @api private - # - # source://rspec-expectations//lib/rspec/expectations/syntax.rb#38 - def enable_should(syntax_host = T.unsafe(nil)); end - - # Indicates whether or not the `expect` syntax is enabled. - # - # @api private - # - # source://rspec-expectations//lib/rspec/expectations/syntax.rb#96 - def expect_enabled?(syntax_host = T.unsafe(nil)); end - - # Indicates whether or not the `should` syntax is enabled. - # - # @api private - # - # source://rspec-expectations//lib/rspec/expectations/syntax.rb#90 - def should_enabled?(syntax_host = T.unsafe(nil)); end - - # Instructs rspec-expectations to warn on first usage of `should` or `should_not`. - # Enabled by default. This is largely here to facilitate testing. - # - # @api private - # - # source://rspec-expectations//lib/rspec/expectations/syntax.rb#18 - def warn_about_should!; end - - # Generates a deprecation warning for the given method if no warning - # has already been issued. - # - # @api private - # - # source://rspec-expectations//lib/rspec/expectations/syntax.rb#25 - def warn_about_should_unless_configured(method_name); end - - class << self - # Determines where we add `should` and `should_not`. - # - # @api private - # - # source://rspec-expectations//lib/rspec/expectations/syntax.rb#11 - def default_should_host; end - - # Disables the `expect` syntax. - # - # @api private - # - # source://rspec-expectations//lib/rspec/expectations/syntax.rb#80 - def disable_expect(syntax_host = T.unsafe(nil)); end - - # Disables the `should` syntax. - # - # @api private - # - # source://rspec-expectations//lib/rspec/expectations/syntax.rb#57 - def disable_should(syntax_host = T.unsafe(nil)); end - - # Enables the `expect` syntax. - # - # @api private - # - # source://rspec-expectations//lib/rspec/expectations/syntax.rb#68 - def enable_expect(syntax_host = T.unsafe(nil)); end - - # Enables the `should` syntax. - # - # @api private - # - # source://rspec-expectations//lib/rspec/expectations/syntax.rb#38 - def enable_should(syntax_host = T.unsafe(nil)); end - - # Indicates whether or not the `expect` syntax is enabled. - # - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/expectations/syntax.rb#96 - def expect_enabled?(syntax_host = T.unsafe(nil)); end - - # Indicates whether or not the `should` syntax is enabled. - # - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/expectations/syntax.rb#90 - def should_enabled?(syntax_host = T.unsafe(nil)); end - - # Instructs rspec-expectations to warn on first usage of `should` or `should_not`. - # Enabled by default. This is largely here to facilitate testing. - # - # @api private - # - # source://rspec-expectations//lib/rspec/expectations/syntax.rb#18 - def warn_about_should!; end - - # Generates a deprecation warning for the given method if no warning - # has already been issued. - # - # @api private - # - # source://rspec-expectations//lib/rspec/expectations/syntax.rb#25 - def warn_about_should_unless_configured(method_name); end - end -end - -# Validates the provided matcher to ensure it supports block -# expectations, in order to avoid user confusion when they -# use a block thinking the expectation will be on the return -# value of the block rather than the block itself. -# -# @private -# -# source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#98 -class RSpec::Expectations::ValueExpectationTarget < ::RSpec::Expectations::ExpectationTarget - # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#104 - def not_to(matcher = T.unsafe(nil), message = T.unsafe(nil), &block); end - - # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#99 - def to(matcher = T.unsafe(nil), message = T.unsafe(nil), &block); end - - private - - # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#111 - def enforce_value_expectation(matcher); end - - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#126 - def supports_value_expectations?(matcher); end -end - -# @private -# -# source://rspec-expectations//lib/rspec/expectations/version.rb#4 -module RSpec::Expectations::Version; end - -# source://rspec-expectations//lib/rspec/expectations/version.rb#5 -RSpec::Expectations::Version::STRING = T.let(T.unsafe(nil), String) - -# RSpec::Matchers provides a number of useful matchers we use to define -# expectations. Any object that implements the [matcher protocol](Matchers/MatcherProtocol) -# can be used as a matcher. -# -# ## Predicates -# -# In addition to matchers that are defined explicitly, RSpec will create -# custom matchers on the fly for any arbitrary predicate, giving your specs a -# much more natural language feel. -# -# A Ruby predicate is a method that ends with a "?" and returns true or false. -# Common examples are `empty?`, `nil?`, and `instance_of?`. -# -# All you need to do is write `expect(..).to be_` followed by the predicate -# without the question mark, and RSpec will figure it out from there. -# For example: -# -# expect([]).to be_empty # => [].empty?() | passes -# expect([]).not_to be_empty # => [].empty?() | fails -# -# In addition to prefixing the predicate matchers with "be_", you can also use "be_a_" -# and "be_an_", making your specs read much more naturally: -# -# expect("a string").to be_an_instance_of(String) # =>"a string".instance_of?(String) # passes -# -# expect(3).to be_a_kind_of(Integer) # => 3.kind_of?(Numeric) | passes -# expect(3).to be_a_kind_of(Numeric) # => 3.kind_of?(Numeric) | passes -# expect(3).to be_an_instance_of(Integer) # => 3.instance_of?(Integer) | passes -# expect(3).not_to be_an_instance_of(Numeric) # => 3.instance_of?(Numeric) | fails -# -# RSpec will also create custom matchers for predicates like `has_key?`. To -# use this feature, just state that the object should have_key(:key) and RSpec will -# call has_key?(:key) on the target. For example: -# -# expect(:a => "A").to have_key(:a) -# expect(:a => "A").to have_key(:b) # fails -# -# You can use this feature to invoke any predicate that begins with "has_", whether it is -# part of the Ruby libraries (like `Hash#has_key?`) or a method you wrote on your own class. -# -# Note that RSpec does not provide composable aliases for these dynamic predicate -# matchers. You can easily define your own aliases, though: -# -# RSpec::Matchers.alias_matcher :a_user_who_is_an_admin, :be_an_admin -# expect(user_list).to include(a_user_who_is_an_admin) -# -# ## Alias Matchers -# -# With {RSpec::Matchers.alias_matcher}, you can easily create an -# alternate name for a given matcher. -# -# The description will also change according to the new name: -# -# RSpec::Matchers.alias_matcher :a_list_that_sums_to, :sum_to -# sum_to(3).description # => "sum to 3" -# a_list_that_sums_to(3).description # => "a list that sums to 3" -# -# or you can specify a custom description like this: -# -# RSpec::Matchers.alias_matcher :a_list_sorted_by, :be_sorted_by do |description| -# description.sub("be sorted by", "a list sorted by") -# end -# -# be_sorted_by(:age).description # => "be sorted by age" -# a_list_sorted_by(:age).description # => "a list sorted by age" -# -# ## Custom Matchers -# -# When you find that none of the stock matchers provide a natural feeling -# expectation, you can very easily write your own using RSpec's matcher DSL -# or writing one from scratch. -# -# ### Matcher DSL -# -# Imagine that you are writing a game in which players can be in various -# zones on a virtual board. To specify that bob should be in zone 4, you -# could say: -# -# expect(bob.current_zone).to eql(Zone.new("4")) -# -# But you might find it more expressive to say: -# -# expect(bob).to be_in_zone("4") -# -# and/or -# -# expect(bob).not_to be_in_zone("3") -# -# You can create such a matcher like so: -# -# RSpec::Matchers.define :be_in_zone do |zone| -# match do |player| -# player.in_zone?(zone) -# end -# end -# -# This will generate a be_in_zone method that returns a matcher -# with logical default messages for failures. You can override the failure -# messages and the generated description as follows: -# -# RSpec::Matchers.define :be_in_zone do |zone| -# match do |player| -# player.in_zone?(zone) -# end -# -# failure_message do |player| -# # generate and return the appropriate string. -# end -# -# failure_message_when_negated do |player| -# # generate and return the appropriate string. -# end -# -# description do -# # generate and return the appropriate string. -# end -# end -# -# Each of the message-generation methods has access to the block arguments -# passed to the create method (in this case, zone). The -# failure message methods (failure_message and -# failure_message_when_negated) are passed the actual value (the -# receiver of expect(..) or expect(..).not_to). -# -# ### Custom Matcher from scratch -# -# You could also write a custom matcher from scratch, as follows: -# -# class BeInZone -# def initialize(expected) -# @expected = expected -# end -# -# def matches?(target) -# @target = target -# @target.current_zone.eql?(Zone.new(@expected)) -# end -# -# def failure_message -# "expected #{@target.inspect} to be in Zone #{@expected}" -# end -# -# def failure_message_when_negated -# "expected #{@target.inspect} not to be in Zone #{@expected}" -# end -# end -# -# ... and a method like this: -# -# def be_in_zone(expected) -# BeInZone.new(expected) -# end -# -# And then expose the method to your specs. This is normally done -# by including the method and the class in a module, which is then -# included in your spec: -# -# module CustomGameMatchers -# class BeInZone -# # ... -# end -# -# def be_in_zone(expected) -# # ... -# end -# end -# -# describe "Player behaviour" do -# include CustomGameMatchers -# # ... -# end -# -# or you can include in globally in a spec_helper.rb file required -# from your spec file(s): -# -# RSpec::configure do |config| -# config.include(CustomGameMatchers) -# end -# -# ### Making custom matchers composable -# -# RSpec's built-in matchers are designed to be composed, in expressions like: -# -# expect(["barn", 2.45]).to contain_exactly( -# a_value_within(0.1).of(2.5), -# a_string_starting_with("bar") -# ) -# -# Custom matchers can easily participate in composed matcher expressions like these. -# Include {RSpec::Matchers::Composable} in your custom matcher to make it support -# being composed (matchers defined using the DSL have this included automatically). -# Within your matcher's `matches?` method (or the `match` block, if using the DSL), -# use `values_match?(expected, actual)` rather than `expected == actual`. -# Under the covers, `values_match?` is able to match arbitrary -# nested data structures containing a mix of both matchers and non-matcher objects. -# It uses `===` and `==` to perform the matching, considering the values to -# match if either returns `true`. The `Composable` mixin also provides some helper -# methods for surfacing the matcher descriptions within your matcher's description -# or failure messages. -# -# RSpec's built-in matchers each have a number of aliases that rephrase the matcher -# from a verb phrase (such as `be_within`) to a noun phrase (such as `a_value_within`), -# which reads better when the matcher is passed as an argument in a composed matcher -# expressions, and also uses the noun-phrase wording in the matcher's `description`, -# for readable failure messages. You can alias your custom matchers in similar fashion -# using {RSpec::Matchers.alias_matcher}. -# -# ## Negated Matchers -# -# Sometimes if you want to test for the opposite using a more descriptive name -# instead of using `not_to`, you can use {RSpec::Matchers.define_negated_matcher}: -# -# RSpec::Matchers.define_negated_matcher :exclude, :include -# include(1, 2).description # => "include 1 and 2" -# exclude(1, 2).description # => "exclude 1 and 2" -# -# While the most obvious negated form may be to add a `not_` prefix, -# the failure messages you get with that form can be confusing (e.g. -# "expected [actual] to not [verb], but did not"). We've found it works -# best to find a more positive name for the negated form, such as -# `avoid_changing` rather than `not_change`. -# -# source://rspec-expectations//lib/rspec/matchers/english_phrasing.rb#2 -module RSpec::Matchers - extend ::RSpec::Matchers::DSL - - # Applied to a proc, specifies that its execution will cause some value to - # change. - # - # You can either pass receiver and message, or a block, - # but not both. - # - # When passing a block, it must use the `{ ... }` format, not - # do/end, as `{ ... }` binds to the `change` method, whereas do/end - # would errantly bind to the `expect(..).to` or `expect(...).not_to` method. - # - # You can chain any of the following off of the end to specify details - # about the change: - # - # * `from` - # * `to` - # - # or any one of: - # - # * `by` - # * `by_at_least` - # * `by_at_most` - # - # == Notes - # - # Evaluates `receiver.message` or `block` before and after it - # evaluates the block passed to `expect`. If the value is the same - # object, its before/after `hash` value is used to see if it has changed. - # Therefore, your object needs to properly implement `hash` to work correctly - # with this matcher. - # - # `expect( ... ).not_to change` supports the form that specifies `from` - # (which specifies what you expect the starting, unchanged value to be) - # but does not support forms with subsequent calls to `by`, `by_at_least`, - # `by_at_most` or `to`. - # - # @example - # expect { - # team.add_player(player) - # }.to change(roster, :count) - # - # expect { - # team.add_player(player) - # }.to change(roster, :count).by(1) - # - # expect { - # team.add_player(player) - # }.to change(roster, :count).by_at_least(1) - # - # expect { - # team.add_player(player) - # }.to change(roster, :count).by_at_most(1) - # - # string = "string" - # expect { - # string.reverse! - # }.to change { string }.from("string").to("gnirts") - # - # string = "string" - # expect { - # string - # }.not_to change { string }.from("string") - # - # expect { - # person.happy_birthday - # }.to change(person, :birthday).from(32).to(33) - # - # expect { - # employee.develop_great_new_social_networking_app - # }.to change(employee, :title).from("Mail Clerk").to("CEO") - # - # expect { - # doctor.leave_office - # }.to change(doctor, :sign).from(/is in/).to(/is out/) - # - # user = User.new(:type => "admin") - # expect { - # user.symbolize_type - # }.to change(user, :type).from(String).to(Symbol) - # @param receiver [Object] - # @param message [Symbol] the message to send the receiver - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - 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`. - # With a regexp or matcher, passes if the block outputs a string `to_stdout` or `to_stderr` that matches. - # - # To capture output from any spawned subprocess as well, use `to_stdout_from_any_process` or - # `to_stderr_from_any_process`. Output from any process that inherits the main process's corresponding - # standard stream will be captured. - # - # @example - # expect { print 'foo' }.to output.to_stdout - # expect { print 'foo' }.to output('foo').to_stdout - # expect { print 'foo' }.to output(/foo/).to_stdout - # - # expect { do_something }.to_not output.to_stdout - # - # expect { warn('foo') }.to output.to_stderr - # expect { warn('foo') }.to output('foo').to_stderr - # expect { warn('foo') }.to output(/foo/).to_stderr - # - # expect { do_something }.to_not output.to_stderr - # - # expect { system('echo foo') }.to output("foo\n").to_stdout_from_any_process - # expect { system('echo foo', out: :err) }.to output("foo\n").to_stderr_from_any_process - # @note `to_stdout` and `to_stderr` work by temporarily replacing `$stdout` or `$stderr`, - # so they're not able to intercept stream output that explicitly uses `STDOUT`/`STDERR` - # or that uses a reference to `$stdout`/`$stderr` that was stored before the - # matcher was used. - # @note `to_stdout_from_any_process` and `to_stderr_from_any_process` use Tempfiles, and - # 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, **_arg1, &block); end - - # With no args, matches if any error is raised. - # With a named error, matches only if that specific error is raised. - # With a named error and message specified as a String, matches only if both match. - # With a named error and message specified as a Regexp, matches only if both match. - # Pass an optional block to perform extra verifications on the exception matched - # - # @example - # expect { do_something_risky }.to raise_error - # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) - # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) { |error| expect(error.data).to eq 42 } - # expect { do_something_risky }.to raise_error { |error| expect(error.data).to eq 42 } - # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, "that was too risky") - # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, /oo ri/) - # expect { do_something_risky }.to raise_error("that was too risky") - # - # expect { do_something_risky }.not_to raise_error - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def a_block_raising(*args, **_arg1, &block); end - - # Given no argument, matches if a proc throws any Symbol. - # - # Given a Symbol, matches if the given proc throws the specified Symbol. - # - # Given a Symbol and an arg, matches if the given proc throws the - # specified Symbol with the specified arg. - # - # @example - # expect { do_something_risky }.to throw_symbol - # expect { do_something_risky }.to throw_symbol(:that_was_risky) - # expect { do_something_risky }.to throw_symbol(:that_was_risky, 'culprit') - # - # expect { do_something_risky }.not_to throw_symbol - # expect { do_something_risky }.not_to throw_symbol(:that_was_risky) - # 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, **_arg1, &block); end - - # Passes if the method called in the expect block yields, regardless - # of whether or not arguments are yielded. - # - # @example - # expect { |b| 5.tap(&b) }.to yield_control - # expect { |b| "a".to_sym(&b) }.not_to yield_control - # @note Your expect block must accept a parameter and pass it on to - # the method-under-test as a block. - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - 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 - # multiple times with arguments matching those given. - # - # Argument matching is done using `===` (the case match operator) - # and `==`. If the expected and actual arguments match with either - # operator, the matcher will pass. - # - # @example - # expect { |b| [1, 2, 3].each(&b) }.to yield_successive_args(1, 2, 3) - # expect { |b| { :a => 1, :b => 2 }.each(&b) }.to yield_successive_args([:a, 1], [:b, 2]) - # expect { |b| [1, 2, 3].each(&b) }.not_to yield_successive_args(1, 2) - # @note Your expect block must accept a parameter and pass it on to - # the method-under-test as a block. - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - 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 - # many there are). - # - # Given arguments, matches if the method called in the expect block - # yields with arguments that match the given arguments. - # - # Argument matching is done using `===` (the case match operator) - # and `==`. If the expected and actual arguments match with either - # operator, the matcher will pass. - # - # @example - # expect { |b| 5.tap(&b) }.to yield_with_args # because #tap yields an arg - # expect { |b| 5.tap(&b) }.to yield_with_args(5) # because 5 == 5 - # expect { |b| 5.tap(&b) }.to yield_with_args(Integer) # because Integer === 5 - # expect { |b| File.open("f.txt", &b) }.to yield_with_args(/txt/) # because /txt/ === "f.txt" - # - # expect { |b| User.transaction(&b) }.not_to yield_with_args # because it yields no args - # expect { |b| 5.tap(&b) }.not_to yield_with_args(1, 2, 3) - # @note Your expect block must accept a parameter and pass it on to - # the method-under-test as a block. - # @note This matcher is not designed for use with methods that yield - # multiple times. - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - 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. - # - # @example - # expect { |b| User.transaction(&b) }.to yield_with_no_args - # expect { |b| 5.tap(&b) }.not_to yield_with_no_args # because it yields with `5` - # expect { |b| "a".to_sym(&b) }.not_to yield_with_no_args # because it does not yield - # @note Your expect block must accept a parameter and pass it on to - # the method-under-test as a block. - # @note This matcher is not designed for use with methods that yield - # multiple times. - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - 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 - # pass if all args are found in collection. - # - # @example - # expect([1, 2, 3]).to contain_exactly(1, 2, 3) - # expect([1, 2, 3]).to contain_exactly(1, 3, 2) - # @note This is also available using the `=~` operator with `should`, - # but `=~` is not supported with `expect`. - # @see #match_array - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - 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 - # actual string. In the case of an array, matches against the last - # `expected.length` elements of the actual array. - # - # @example - # expect("this string").to end_with "string" - # expect([0, 1, 2, 3, 4]).to end_with 4 - # 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, **_arg1, &block); end - - # Passes if actual includes expected. This works for - # collections and Strings. You can also pass in multiple args - # and it will only pass if all args are found in collection. - # - # @example - # expect([1,2,3]).to include(3) - # expect([1,2,3]).to include(2,3) - # expect([1,2,3]).to include(2,3,4) # fails - # expect([1,2,3]).not_to include(4) - # expect("spread").to include("read") - # expect("spread").not_to include("red") - # expect(:a => 1, :b => 2).to include(:a) - # expect(:a => 1, :b => 2).to include(:a, :b) - # expect(:a => 1, :b => 2).to include(:a => 1) - # expect(:a => 1, :b => 2).to include(:b => 2, :a => 1) - # expect(:a => 1, :b => 2).to include(:c) # fails - # expect(:a => 1, :b => 2).not_to include(:a => 2) - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - 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 - # of the actual string. In the case of an array, matches against the first - # `expected.length` elements of the actual array. - # - # @example - # expect("this string").to start_with "this s" - # expect([0, 1, 2, 3, 4]).to start_with 0 - # 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, **_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, **_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, **_arg1, &block); end - - # Passes if actual includes expected. This works for - # collections and Strings. You can also pass in multiple args - # and it will only pass if all args are found in collection. - # - # @example - # expect([1,2,3]).to include(3) - # expect([1,2,3]).to include(2,3) - # expect([1,2,3]).to include(2,3,4) # fails - # expect([1,2,3]).not_to include(4) - # expect("spread").to include("read") - # expect("spread").not_to include("red") - # expect(:a => 1, :b => 2).to include(:a) - # expect(:a => 1, :b => 2).to include(:a, :b) - # expect(:a => 1, :b => 2).to include(:a => 1) - # expect(:a => 1, :b => 2).to include(:b => 2, :a => 1) - # expect(:a => 1, :b => 2).to include(:c) # fails - # expect(:a => 1, :b => 2).not_to include(:a => 2) - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def a_hash_including(*args, **_arg1, &block); end - - # Passes if actual.kind_of?(expected) - # - # @example - # expect(5).to be_a_kind_of(Integer) - # expect(5).to be_a_kind_of(Numeric) - # expect(5).not_to be_a_kind_of(Float) - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - 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, **_arg1, &block); end - - # Passes if actual covers expected. This works for - # Ranges. You can also pass in multiple args - # and it will only pass if all args are found in Range. - # - # ### Warning:: Ruby >= 1.9 only - # - # @example - # expect(1..10).to cover(5) - # expect(1..10).to cover(4, 6) - # expect(1..10).to cover(4, 6, 11) # fails - # expect(1..10).not_to cover(11) - # expect(1..10).not_to cover(5) # fails - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - 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 - # actual string. In the case of an array, matches against the last - # `expected.length` elements of the actual array. - # - # @example - # expect("this string").to end_with "string" - # expect([0, 1, 2, 3, 4]).to end_with 4 - # 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, **_arg1, &block); end - - # Passes if actual includes expected. This works for - # collections and Strings. You can also pass in multiple args - # and it will only pass if all args are found in collection. - # - # @example - # expect([1,2,3]).to include(3) - # expect([1,2,3]).to include(2,3) - # expect([1,2,3]).to include(2,3,4) # fails - # expect([1,2,3]).not_to include(4) - # expect("spread").to include("read") - # expect("spread").not_to include("red") - # expect(:a => 1, :b => 2).to include(:a) - # expect(:a => 1, :b => 2).to include(:a, :b) - # expect(:a => 1, :b => 2).to include(:a => 1) - # expect(:a => 1, :b => 2).to include(:b => 2, :a => 1) - # expect(:a => 1, :b => 2).to include(:c) # fails - # expect(:a => 1, :b => 2).not_to include(:a => 2) - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - 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), - # matches if `expected === actual` || `actual == expected` for each - # pair of elements. - # - # @example - # expect(email).to match(/^([^\s]+)((?:[-a-z0-9]+\.)+[a-z]{2,})$/i) - # expect(email).to match("@example.com") - # @example - # hash = { - # :a => { - # :b => ["foo", 5], - # :c => { :d => 2.05 } - # } - # } - # - # expect(hash).to match( - # :a => { - # :b => a_collection_containing_exactly( - # a_string_starting_with("f"), - # an_instance_of(Integer) - # ), - # :c => { :d => (a_value < 3) } - # } - # ) - # @note The `match_regex` alias is deprecated and is not recommended for use. - # It was added in 2.12.1 to facilitate its use from within custom - # matchers (due to how the custom matcher DSL was evaluated in 2.x, - # `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, **_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 - # of the actual string. In the case of an array, matches against the first - # `expected.length` elements of the actual array. - # - # @example - # expect("this string").to start_with "this s" - # expect([0, 1, 2, 3, 4]).to start_with 0 - # 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, **_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, **_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 - # condition (to be or not to be). - # - # Predicates are any Ruby method that ends in a "?" and returns true or - # false. Given be_ followed by arbitrary_predicate (without the "?"), - # RSpec will match convert that into a query against the target object. - # - # The arbitrary_predicate feature will handle any predicate prefixed with - # "be_an_" (e.g. be_an_instance_of), "be_a_" (e.g. be_a_kind_of) or "be_" - # (e.g. be_empty), letting you choose the prefix that best suits the - # predicate. - # - # @example - # expect(actual).to be_truthy - # expect(actual).to be_falsey - # expect(actual).to be_nil - # expect(actual).to be_[arbitrary_predicate](*args) - # expect(actual).not_to be_nil - # expect(actual).not_to be_[arbitrary_predicate](*args) - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - 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, - # Float, Complex, and Rational). - # - # By default, `be_between` is inclusive (i.e. passes when given either the max or min value), - # but you can make it `exclusive` by chaining that off the matcher. - # - # @example - # expect(5).to be_between(1, 10) - # expect(11).not_to be_between(1, 10) - # expect(10).not_to be_between(1, 10).exclusive - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def a_value_between(*args, **_arg1, &block); end - - # Passes if actual == expected +/- delta - # - # @example - # expect(result).to be_within(0.5).of(3.0) - # 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, **_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 - # first expectation failure like normal. This allows you to see all - # failures from an entire set of expectations without splitting each - # off into its own example (which may slow things down if the example - # setup is expensive). - # - # @example - # aggregate_failures("verifying response") do - # expect(response.status).to eq(200) - # expect(response.headers).to include("Content-Type" => "text/plain") - # expect(response.body).to include("Success") - # end - # @note The implementation of this feature uses a thread-local variable, - # which means that if you have an expectation failure in another thread, - # it'll abort like normal. - # @param label [String] label for this aggregation block, which will be - # included in the aggregated exception message. - # @param metadata [Hash] additional metadata about this failure aggregation - # block. If multiple expectations fail, it will be exposed from the - # {Expectations::MultipleExpectationsNotMetError} exception. Mostly - # intended for internal RSpec use but you can use it as well. - # @raise [Expectations::MultipleExpectationsNotMetError] raised when - # multiple expectations fail. - # @raise [Expectations::ExpectationNotMetError] raised when a single - # expectation fails. - # @raise [Exception] other sorts of exceptions will be raised as normal. - # @yield Block containing as many expectation as you want. The block is - # simply yielded to, so you can trust that anything that works outside - # the block should work within it. - # - # source://rspec-expectations//lib/rspec/matchers.rb#305 - def aggregate_failures(label = T.unsafe(nil), metadata = T.unsafe(nil), &block); end - - # Passes if the provided matcher passes when checked against all - # elements of the collection. - # - # @example - # expect([1, 3, 5]).to all be_odd - # expect([1, 3, 6]).to all be_odd # fails - # @example - # expect([1, 3, 5]).to all( be_odd.and be_an(Integer) ) - # @note The negative form `not_to all` is not supported. Instead - # use `not_to include` or pass a negative form of a matcher - # as the argument (e.g. `all exclude(:foo)`). - # @note You can also use this with compound matchers as well. - # - # source://rspec-expectations//lib/rspec/matchers.rb#662 - def all(expected); end - - # An alternate form of `contain_exactly` that accepts - # the expected contents as a single array arg rather - # than splatted out as individual items. - # - # @example - # expect(results).to contain_exactly(1, 2) - # # is identical to: - # expect(results).to match_array([1, 2]) - # @see #contain_exactly - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def an_array_matching(*args, **_arg1, &block); end - - # Passes if actual.instance_of?(expected) - # - # @example - # expect(5).to be_an_instance_of(Integer) - # expect(5).not_to be_an_instance_of(Numeric) - # expect(5).not_to be_an_instance_of(Float) - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def an_instance_of(*args, **_arg1, &block); end - - # Passes if actual == expected. - # - # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more - # information about equality in Ruby. - # - # @example - # expect(5).to eq(5) - # expect(5).not_to eq(3) - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def an_object_eq_to(*args, **_arg1, &block); end - - # Passes if `actual.eql?(expected)` - # - # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more - # information about equality in Ruby. - # - # @example - # expect(5).to eql(5) - # expect(5).not_to eql(3) - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def an_object_eql_to(*args, **_arg1, &block); end - - # Passes if actual.equal?(expected) (object identity). - # - # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more - # information about equality in Ruby. - # - # @example - # expect(5).to equal(5) # Integers are equal - # 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, **_arg1, &block); end - - # Passes if `actual.exist?` or `actual.exists?` - # - # @example - # expect(File).to exist("path/to/file") - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - 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. - # - # @example - # Person = Struct.new(:name, :age) - # person = Person.new("Bob", 32) - # - # expect(person).to have_attributes(:name => "Bob", :age => 32) - # expect(person).to have_attributes(:name => a_string_starting_with("B"), :age => (a_value > 30) ) - # @example - # expect(person).to have_attributes(:color => "red") - # @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, **_arg1, &block); end - - # Given a `Regexp` or `String`, passes if `actual.match(pattern)` - # Given an arbitrary nested data structure (e.g. arrays and hashes), - # matches if `expected === actual` || `actual == expected` for each - # pair of elements. - # - # @example - # expect(email).to match(/^([^\s]+)((?:[-a-z0-9]+\.)+[a-z]{2,})$/i) - # expect(email).to match("@example.com") - # @example - # hash = { - # :a => { - # :b => ["foo", 5], - # :c => { :d => 2.05 } - # } - # } - # - # expect(hash).to match( - # :a => { - # :b => a_collection_containing_exactly( - # a_string_starting_with("f"), - # an_instance_of(Integer) - # ), - # :c => { :d => (a_value < 3) } - # } - # ) - # @note The `match_regex` alias is deprecated and is not recommended for use. - # It was added in 2.12.1 to facilitate its use from within custom - # matchers (due to how the custom matcher DSL was evaluated in 2.x, - # `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, **_arg1, &block); end - - # Matches if the target object responds to all of the names - # provided. Names can be Strings or Symbols. - # - # @example - # expect("string").to respond_to(:length) - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def an_object_responding_to(*args, **_arg1, &block); end - - # Passes if the submitted block returns true. Yields target to the - # block. - # - # Generally speaking, this should be thought of as a last resort when - # you can't find any other way to specify the behaviour you wish to - # specify. - # - # If you do find yourself in such a situation, you could always write - # a custom matcher, which would likely make your specs more expressive. - # - # @example - # expect(5).to satisfy { |n| n > 3 } - # expect(5).to satisfy("be greater than 3") { |n| n > 3 } - # @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, **_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 - # condition (to be or not to be). - # - # Predicates are any Ruby method that ends in a "?" and returns true or - # false. Given be_ followed by arbitrary_predicate (without the "?"), - # RSpec will match convert that into a query against the target object. - # - # The arbitrary_predicate feature will handle any predicate prefixed with - # "be_an_" (e.g. be_an_instance_of), "be_a_" (e.g. be_a_kind_of) or "be_" - # (e.g. be_empty), letting you choose the prefix that best suits the - # predicate. - # - # @example - # expect(actual).to be_truthy - # expect(actual).to be_falsey - # expect(actual).to be_nil - # expect(actual).to be_[arbitrary_predicate](*args) - # expect(actual).not_to be_nil - # expect(actual).not_to be_[arbitrary_predicate](*args) - # - # source://rspec-expectations//lib/rspec/matchers.rb#349 - def be(*args); end - - # passes if target.kind_of?(klass) - # - # source://rspec-expectations//lib/rspec/matchers.rb#355 - def be_a(klass); end - - # Passes if actual.kind_of?(expected) - # - # @example - # expect(5).to be_a_kind_of(Integer) - # expect(5).to be_a_kind_of(Numeric) - # expect(5).not_to be_a_kind_of(Float) - # - # source://rspec-expectations//lib/rspec/matchers.rb#378 - def be_a_kind_of(expected); end - - # passes if target.kind_of?(klass) - # - # source://rspec-expectations//lib/rspec/matchers.rb#355 - def be_an(klass); end - - # Passes if actual.instance_of?(expected) - # - # @example - # expect(5).to be_an_instance_of(Integer) - # expect(5).not_to be_an_instance_of(Numeric) - # expect(5).not_to be_an_instance_of(Float) - # - # source://rspec-expectations//lib/rspec/matchers.rb#366 - def be_an_instance_of(expected); end - - # Passes if actual.between?(min, max). Works with any Comparable object, - # including String, Symbol, Time, or Numeric (Fixnum, Bignum, Integer, - # Float, Complex, and Rational). - # - # By default, `be_between` is inclusive (i.e. passes when given either the max or min value), - # but you can make it `exclusive` by chaining that off the matcher. - # - # @example - # expect(5).to be_between(1, 10) - # expect(11).not_to be_between(1, 10) - # expect(10).not_to be_between(1, 10).exclusive - # - # source://rspec-expectations//lib/rspec/matchers.rb#395 - def be_between(min, max); end - - # Passes if actual is falsey (false or nil) - # - # source://rspec-expectations//lib/rspec/matchers.rb#316 - def be_falsey; end - - # Passes if actual is falsey (false or nil) - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def be_falsy(*args, **_arg1, &block); end - - # Passes if actual.instance_of?(expected) - # - # @example - # expect(5).to be_an_instance_of(Integer) - # expect(5).not_to be_an_instance_of(Numeric) - # expect(5).not_to be_an_instance_of(Float) - # - # source://rspec-expectations//lib/rspec/matchers.rb#366 - def be_instance_of(expected); end - - # Passes if actual.kind_of?(expected) - # - # @example - # expect(5).to be_a_kind_of(Integer) - # expect(5).to be_a_kind_of(Numeric) - # expect(5).not_to be_a_kind_of(Float) - # - # source://rspec-expectations//lib/rspec/matchers.rb#378 - def be_kind_of(expected); end - - # Passes if actual is nil - # - # source://rspec-expectations//lib/rspec/matchers.rb#324 - def be_nil; end - - # Passes if actual is truthy (anything but false or nil) - # - # source://rspec-expectations//lib/rspec/matchers.rb#310 - def be_truthy; end - - # Passes if actual == expected +/- delta - # - # @example - # expect(result).to be_within(0.5).of(3.0) - # expect(result).not_to be_within(0.5).of(3.0) - # - # source://rspec-expectations//lib/rspec/matchers.rb#405 - def be_within(delta); end - - # Applied to a proc, specifies that its execution will cause some value to - # change. - # - # You can either pass receiver and message, or a block, - # but not both. - # - # When passing a block, it must use the `{ ... }` format, not - # do/end, as `{ ... }` binds to the `change` method, whereas do/end - # would errantly bind to the `expect(..).to` or `expect(...).not_to` method. - # - # You can chain any of the following off of the end to specify details - # about the change: - # - # * `from` - # * `to` - # - # or any one of: - # - # * `by` - # * `by_at_least` - # * `by_at_most` - # - # == Notes - # - # Evaluates `receiver.message` or `block` before and after it - # evaluates the block passed to `expect`. If the value is the same - # object, its before/after `hash` value is used to see if it has changed. - # Therefore, your object needs to properly implement `hash` to work correctly - # with this matcher. - # - # `expect( ... ).not_to change` supports the form that specifies `from` - # (which specifies what you expect the starting, unchanged value to be) - # but does not support forms with subsequent calls to `by`, `by_at_least`, - # `by_at_most` or `to`. - # - # @example - # expect { - # team.add_player(player) - # }.to change(roster, :count) - # - # expect { - # team.add_player(player) - # }.to change(roster, :count).by(1) - # - # expect { - # team.add_player(player) - # }.to change(roster, :count).by_at_least(1) - # - # expect { - # team.add_player(player) - # }.to change(roster, :count).by_at_most(1) - # - # string = "string" - # expect { - # string.reverse! - # }.to change { string }.from("string").to("gnirts") - # - # string = "string" - # expect { - # string - # }.not_to change { string }.from("string") - # - # expect { - # person.happy_birthday - # }.to change(person, :birthday).from(32).to(33) - # - # expect { - # employee.develop_great_new_social_networking_app - # }.to change(employee, :title).from("Mail Clerk").to("CEO") - # - # expect { - # doctor.leave_office - # }.to change(doctor, :sign).from(/is in/).to(/is out/) - # - # user = User.new(:type => "admin") - # expect { - # user.symbolize_type - # }.to change(user, :type).from(String).to(Symbol) - # @param receiver [Object] - # @param message [Symbol] the message to send the receiver - # - # source://rspec-expectations//lib/rspec/matchers.rb#492 - def change(receiver = T.unsafe(nil), message = T.unsafe(nil), &block); end - - # Applied to a proc, specifies that its execution will cause some value to - # change. - # - # You can either pass receiver and message, or a block, - # but not both. - # - # When passing a block, it must use the `{ ... }` format, not - # do/end, as `{ ... }` binds to the `change` method, whereas do/end - # would errantly bind to the `expect(..).to` or `expect(...).not_to` method. - # - # You can chain any of the following off of the end to specify details - # about the change: - # - # * `from` - # * `to` - # - # or any one of: - # - # * `by` - # * `by_at_least` - # * `by_at_most` - # - # == Notes - # - # Evaluates `receiver.message` or `block` before and after it - # evaluates the block passed to `expect`. If the value is the same - # object, its before/after `hash` value is used to see if it has changed. - # Therefore, your object needs to properly implement `hash` to work correctly - # with this matcher. - # - # `expect( ... ).not_to change` supports the form that specifies `from` - # (which specifies what you expect the starting, unchanged value to be) - # but does not support forms with subsequent calls to `by`, `by_at_least`, - # `by_at_most` or `to`. - # - # @example - # expect { - # team.add_player(player) - # }.to change(roster, :count) - # - # expect { - # team.add_player(player) - # }.to change(roster, :count).by(1) - # - # expect { - # team.add_player(player) - # }.to change(roster, :count).by_at_least(1) - # - # expect { - # team.add_player(player) - # }.to change(roster, :count).by_at_most(1) - # - # string = "string" - # expect { - # string.reverse! - # }.to change { string }.from("string").to("gnirts") - # - # string = "string" - # expect { - # string - # }.not_to change { string }.from("string") - # - # expect { - # person.happy_birthday - # }.to change(person, :birthday).from(32).to(33) - # - # expect { - # employee.develop_great_new_social_networking_app - # }.to change(employee, :title).from("Mail Clerk").to("CEO") - # - # expect { - # doctor.leave_office - # }.to change(doctor, :sign).from(/is in/).to(/is out/) - # - # user = User.new(:type => "admin") - # expect { - # user.symbolize_type - # }.to change(user, :type).from(String).to(Symbol) - # @param receiver [Object] - # @param message [Symbol] the message to send the receiver - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - 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 - # pass if all args are found in collection. - # - # @example - # expect([1, 2, 3]).to contain_exactly(1, 2, 3) - # expect([1, 2, 3]).to contain_exactly(1, 3, 2) - # @note This is also available using the `=~` operator with `should`, - # but `=~` is not supported with `expect`. - # @see #match_array - # - # source://rspec-expectations//lib/rspec/matchers.rb#510 - def contain_exactly(*items); end - - # Passes if actual contains all of the expected regardless of order. - # This works for collections. Pass in multiple args and it will only - # pass if all args are found in collection. - # - # @example - # expect([1, 2, 3]).to contain_exactly(1, 2, 3) - # expect([1, 2, 3]).to contain_exactly(1, 3, 2) - # @note This is also available using the `=~` operator with `should`, - # but `=~` is not supported with `expect`. - # @see #match_array - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def containing_exactly(*args, **_arg1, &block); end - - # Passes if actual covers expected. This works for - # Ranges. You can also pass in multiple args - # and it will only pass if all args are found in Range. - # - # ### Warning:: Ruby >= 1.9 only - # - # @example - # expect(1..10).to cover(5) - # expect(1..10).to cover(4, 6) - # expect(1..10).to cover(4, 6, 11) # fails - # expect(1..10).not_to cover(11) - # expect(1..10).not_to cover(5) # fails - # - # source://rspec-expectations//lib/rspec/matchers.rb#528 - def cover(*values); end - - # Passes if actual covers expected. This works for - # Ranges. You can also pass in multiple args - # and it will only pass if all args are found in Range. - # - # ### Warning:: Ruby >= 1.9 only - # - # @example - # expect(1..10).to cover(5) - # expect(1..10).to cover(4, 6) - # expect(1..10).to cover(4, 6, 11) # fails - # expect(1..10).not_to cover(11) - # expect(1..10).not_to cover(5) # fails - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - 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 - # actual string. In the case of an array, matches against the last - # `expected.length` elements of the actual array. - # - # @example - # expect("this string").to end_with "string" - # expect([0, 1, 2, 3, 4]).to end_with 4 - # expect([0, 2, 3, 4, 4]).to end_with 3, 4 - # - # source://rspec-expectations//lib/rspec/matchers.rb#543 - def end_with(*expected); 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 - # actual string. In the case of an array, matches against the last - # `expected.length` elements of the actual array. - # - # @example - # expect("this string").to end_with "string" - # expect([0, 1, 2, 3, 4]).to end_with 4 - # expect([0, 2, 3, 4, 4]).to end_with 3, 4 - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def ending_with(*args, **_arg1, &block); end - - # Passes if actual == expected. - # - # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more - # information about equality in Ruby. - # - # @example - # expect(5).to eq(5) - # expect(5).not_to eq(3) - # - # source://rspec-expectations//lib/rspec/matchers.rb#558 - def eq(expected); end - - # Passes if actual == expected. - # - # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more - # information about equality in Ruby. - # - # @example - # expect(5).to eq(5) - # expect(5).not_to eq(3) - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def eq_to(*args, **_arg1, &block); end - - # Passes if `actual.eql?(expected)` - # - # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more - # information about equality in Ruby. - # - # @example - # expect(5).to eql(5) - # expect(5).not_to eql(3) - # - # source://rspec-expectations//lib/rspec/matchers.rb#572 - def eql(expected); end - - # Passes if `actual.eql?(expected)` - # - # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more - # information about equality in Ruby. - # - # @example - # expect(5).to eql(5) - # expect(5).not_to eql(3) - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def eql_to(*args, **_arg1, &block); end - - # Passes if actual.equal?(expected) (object identity). - # - # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more - # information about equality in Ruby. - # - # @example - # expect(5).to equal(5) # Integers are equal - # expect("5").not_to equal("5") # Strings that look the same are not the same object - # - # source://rspec-expectations//lib/rspec/matchers.rb#586 - def equal(expected); end - - # Passes if actual.equal?(expected) (object identity). - # - # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more - # information about equality in Ruby. - # - # @example - # expect(5).to equal(5) # Integers are equal - # 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, **_arg1, &block); end - - # Passes if `actual.exist?` or `actual.exists?` - # - # @example - # expect(File).to exist("path/to/file") - # - # source://rspec-expectations//lib/rspec/matchers.rb#596 - def exist(*args); end - - # Passes if `actual.exist?` or `actual.exists?` - # - # @example - # expect(File).to exist("path/to/file") - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def existing(*args, **_arg1, &block); end - - # Supports `expect(actual).to matcher` syntax by wrapping `actual` in an - # `ExpectationTarget`. - # - # @example - # expect(actual).to eq(expected) - # expect(actual).not_to eq(expected) - # @return [Expectations::ExpectationTarget] - # @see Expectations::ExpectationTarget#to - # @see Expectations::ExpectationTarget#not_to - # - # source://rspec-expectations//lib/rspec/expectations/syntax.rb#72 - def expect(value = T.unsafe(nil), &block); end - - # Passes if actual's attribute values match the expected attributes hash. - # This works no matter how you define your attribute readers. - # - # @example - # Person = Struct.new(:name, :age) - # person = Person.new("Bob", 32) - # - # expect(person).to have_attributes(:name => "Bob", :age => 32) - # expect(person).to have_attributes(:name => a_string_starting_with("B"), :age => (a_value > 30) ) - # @example - # expect(person).to have_attributes(:color => "red") - # @note It will fail if actual doesn't respond to any of the expected attributes. - # - # source://rspec-expectations//lib/rspec/matchers.rb#616 - def have_attributes(expected); end - - # Passes if actual's attribute values match the expected attributes hash. - # This works no matter how you define your attribute readers. - # - # @example - # Person = Struct.new(:name, :age) - # person = Person.new("Bob", 32) - # - # expect(person).to have_attributes(:name => "Bob", :age => 32) - # expect(person).to have_attributes(:name => a_string_starting_with("B"), :age => (a_value > 30) ) - # @example - # expect(person).to have_attributes(:color => "red") - # @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, **_arg1, &block); end - - # Passes if actual includes expected. This works for - # collections and Strings. You can also pass in multiple args - # and it will only pass if all args are found in collection. - # - # @example - # expect([1,2,3]).to include(3) - # expect([1,2,3]).to include(2,3) - # expect([1,2,3]).to include(2,3,4) # fails - # expect([1,2,3]).not_to include(4) - # expect("spread").to include("read") - # expect("spread").not_to include("red") - # expect(:a => 1, :b => 2).to include(:a) - # expect(:a => 1, :b => 2).to include(:a, :b) - # expect(:a => 1, :b => 2).to include(:a => 1) - # expect(:a => 1, :b => 2).to include(:b => 2, :a => 1) - # expect(:a => 1, :b => 2).to include(:c) # fails - # expect(:a => 1, :b => 2).not_to include(:a => 2) - # - # source://rspec-expectations//lib/rspec/matchers.rb#639 - def include(*expected); end - - # Passes if actual includes expected. This works for - # collections and Strings. You can also pass in multiple args - # and it will only pass if all args are found in collection. - # - # @example - # expect([1,2,3]).to include(3) - # expect([1,2,3]).to include(2,3) - # expect([1,2,3]).to include(2,3,4) # fails - # expect([1,2,3]).not_to include(4) - # expect("spread").to include("read") - # expect("spread").not_to include("red") - # expect(:a => 1, :b => 2).to include(:a) - # expect(:a => 1, :b => 2).to include(:a, :b) - # expect(:a => 1, :b => 2).to include(:a => 1) - # expect(:a => 1, :b => 2).to include(:b => 2, :a => 1) - # expect(:a => 1, :b => 2).to include(:c) # fails - # expect(:a => 1, :b => 2).not_to include(:a => 2) - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - 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), - # matches if `expected === actual` || `actual == expected` for each - # pair of elements. - # - # @example - # expect(email).to match(/^([^\s]+)((?:[-a-z0-9]+\.)+[a-z]{2,})$/i) - # expect(email).to match("@example.com") - # @example - # hash = { - # :a => { - # :b => ["foo", 5], - # :c => { :d => 2.05 } - # } - # } - # - # expect(hash).to match( - # :a => { - # :b => a_collection_containing_exactly( - # a_string_starting_with("f"), - # an_instance_of(Integer) - # ), - # :c => { :d => (a_value < 3) } - # } - # ) - # @note The `match_regex` alias is deprecated and is not recommended for use. - # It was added in 2.12.1 to facilitate its use from within custom - # matchers (due to how the custom matcher DSL was evaluated in 2.x, - # `match` could not be used there), but is no longer needed in 3.x. - # - # source://rspec-expectations//lib/rspec/matchers.rb#697 - def match(expected); end - - # An alternate form of `contain_exactly` that accepts - # the expected contents as a single array arg rather - # than splatted out as individual items. - # - # @example - # expect(results).to contain_exactly(1, 2) - # # is identical to: - # expect(results).to match_array([1, 2]) - # @see #contain_exactly - # - # source://rspec-expectations//lib/rspec/matchers.rb#715 - def match_array(items); end - - # Given a `Regexp` or `String`, passes if `actual.match(pattern)` - # Given an arbitrary nested data structure (e.g. arrays and hashes), - # matches if `expected === actual` || `actual == expected` for each - # pair of elements. - # - # @example - # expect(email).to match(/^([^\s]+)((?:[-a-z0-9]+\.)+[a-z]{2,})$/i) - # expect(email).to match("@example.com") - # @example - # hash = { - # :a => { - # :b => ["foo", 5], - # :c => { :d => 2.05 } - # } - # } - # - # expect(hash).to match( - # :a => { - # :b => a_collection_containing_exactly( - # a_string_starting_with("f"), - # an_instance_of(Integer) - # ), - # :c => { :d => (a_value < 3) } - # } - # ) - # @note The `match_regex` alias is deprecated and is not recommended for use. - # It was added in 2.12.1 to facilitate its use from within custom - # matchers (due to how the custom matcher DSL was evaluated in 2.x, - # `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, **_arg1, &block); end - - # Given a `Regexp` or `String`, passes if `actual.match(pattern)` - # Given an arbitrary nested data structure (e.g. arrays and hashes), - # matches if `expected === actual` || `actual == expected` for each - # pair of elements. - # - # @example - # expect(email).to match(/^([^\s]+)((?:[-a-z0-9]+\.)+[a-z]{2,})$/i) - # expect(email).to match("@example.com") - # @example - # hash = { - # :a => { - # :b => ["foo", 5], - # :c => { :d => 2.05 } - # } - # } - # - # expect(hash).to match( - # :a => { - # :b => a_collection_containing_exactly( - # a_string_starting_with("f"), - # an_instance_of(Integer) - # ), - # :c => { :d => (a_value < 3) } - # } - # ) - # @note The `match_regex` alias is deprecated and is not recommended for use. - # It was added in 2.12.1 to facilitate its use from within custom - # matchers (due to how the custom matcher DSL was evaluated in 2.x, - # `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, **_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`. - # With a regexp or matcher, passes if the block outputs a string `to_stdout` or `to_stderr` that matches. - # - # To capture output from any spawned subprocess as well, use `to_stdout_from_any_process` or - # `to_stderr_from_any_process`. Output from any process that inherits the main process's corresponding - # standard stream will be captured. - # - # @example - # expect { print 'foo' }.to output.to_stdout - # expect { print 'foo' }.to output('foo').to_stdout - # expect { print 'foo' }.to output(/foo/).to_stdout - # - # expect { do_something }.to_not output.to_stdout - # - # expect { warn('foo') }.to output.to_stderr - # expect { warn('foo') }.to output('foo').to_stderr - # expect { warn('foo') }.to output(/foo/).to_stderr - # - # expect { do_something }.to_not output.to_stderr - # - # expect { system('echo foo') }.to output("foo\n").to_stdout_from_any_process - # expect { system('echo foo', out: :err) }.to output("foo\n").to_stderr_from_any_process - # @note `to_stdout` and `to_stderr` work by temporarily replacing `$stdout` or `$stderr`, - # so they're not able to intercept stream output that explicitly uses `STDOUT`/`STDERR` - # or that uses a reference to `$stdout`/`$stderr` that was stored before the - # matcher was used. - # @note `to_stdout_from_any_process` and `to_stderr_from_any_process` use Tempfiles, and - # are thus significantly (~30x) slower than `to_stdout` and `to_stderr`. - # - # source://rspec-expectations//lib/rspec/matchers.rb#752 - def output(expected = T.unsafe(nil)); end - - # With no args, matches if any error is raised. - # With a named error, matches only if that specific error is raised. - # With a named error and message specified as a String, matches only if both match. - # With a named error and message specified as a Regexp, matches only if both match. - # Pass an optional block to perform extra verifications on the exception matched - # - # @example - # expect { do_something_risky }.to raise_error - # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) - # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) { |error| expect(error.data).to eq 42 } - # expect { do_something_risky }.to raise_error { |error| expect(error.data).to eq 42 } - # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, "that was too risky") - # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, /oo ri/) - # expect { do_something_risky }.to raise_error("that was too risky") - # - # expect { do_something_risky }.not_to raise_error - # - # source://rspec-expectations//lib/rspec/matchers.rb#773 - def raise_error(error = T.unsafe(nil), message = T.unsafe(nil), &block); end - - # With no args, matches if any error is raised. - # With a named error, matches only if that specific error is raised. - # With a named error and message specified as a String, matches only if both match. - # With a named error and message specified as a Regexp, matches only if both match. - # Pass an optional block to perform extra verifications on the exception matched - # - # @example - # expect { do_something_risky }.to raise_error - # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) - # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) { |error| expect(error.data).to eq 42 } - # expect { do_something_risky }.to raise_error { |error| expect(error.data).to eq 42 } - # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, "that was too risky") - # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, /oo ri/) - # expect { do_something_risky }.to raise_error("that was too risky") - # - # expect { do_something_risky }.not_to raise_error - # - # source://rspec-expectations//lib/rspec/matchers.rb#773 - def raise_exception(error = T.unsafe(nil), message = T.unsafe(nil), &block); end - - # With no args, matches if any error is raised. - # With a named error, matches only if that specific error is raised. - # With a named error and message specified as a String, matches only if both match. - # With a named error and message specified as a Regexp, matches only if both match. - # Pass an optional block to perform extra verifications on the exception matched - # - # @example - # expect { do_something_risky }.to raise_error - # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) - # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) { |error| expect(error.data).to eq 42 } - # expect { do_something_risky }.to raise_error { |error| expect(error.data).to eq 42 } - # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, "that was too risky") - # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, /oo ri/) - # expect { do_something_risky }.to raise_error("that was too risky") - # - # expect { do_something_risky }.not_to raise_error - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def raising(*args, **_arg1, &block); end - - # Matches if the target object responds to all of the names - # provided. Names can be Strings or Symbols. - # - # @example - # expect("string").to respond_to(:length) - # - # source://rspec-expectations//lib/rspec/matchers.rb#792 - def respond_to(*names); end - - # Matches if the target object responds to all of the names - # provided. Names can be Strings or Symbols. - # - # @example - # expect("string").to respond_to(:length) - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def responding_to(*args, **_arg1, &block); end - - # Passes if the submitted block returns true. Yields target to the - # block. - # - # Generally speaking, this should be thought of as a last resort when - # you can't find any other way to specify the behaviour you wish to - # specify. - # - # If you do find yourself in such a situation, you could always write - # a custom matcher, which would likely make your specs more expressive. - # - # @example - # expect(5).to satisfy { |n| n > 3 } - # expect(5).to satisfy("be greater than 3") { |n| n > 3 } - # @param description [String] optional description to be used for this matcher. - # - # source://rspec-expectations//lib/rspec/matchers.rb#813 - def satisfy(description = T.unsafe(nil), &block); end - - # Passes if the submitted block returns true. Yields target to the - # block. - # - # Generally speaking, this should be thought of as a last resort when - # you can't find any other way to specify the behaviour you wish to - # specify. - # - # If you do find yourself in such a situation, you could always write - # a custom matcher, which would likely make your specs more expressive. - # - # @example - # expect(5).to satisfy { |n| n > 3 } - # expect(5).to satisfy("be greater than 3") { |n| n > 3 } - # @param description [String] optional description to be used for this matcher. - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - 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 - # of the actual string. In the case of an array, matches against the first - # `expected.length` elements of the actual array. - # - # @example - # expect("this string").to start_with "this s" - # expect([0, 1, 2, 3, 4]).to start_with 0 - # expect([0, 2, 3, 4, 4]).to start_with 0, 1 - # - # source://rspec-expectations//lib/rspec/matchers.rb#828 - def start_with(*expected); 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 - # of the actual string. In the case of an array, matches against the first - # `expected.length` elements of the actual array. - # - # @example - # expect("this string").to start_with "this s" - # expect([0, 1, 2, 3, 4]).to start_with 0 - # expect([0, 2, 3, 4, 4]).to start_with 0, 1 - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def starting_with(*args, **_arg1, &block); end - - # Given no argument, matches if a proc throws any Symbol. - # - # Given a Symbol, matches if the given proc throws the specified Symbol. - # - # Given a Symbol and an arg, matches if the given proc throws the - # specified Symbol with the specified arg. - # - # @example - # expect { do_something_risky }.to throw_symbol - # expect { do_something_risky }.to throw_symbol(:that_was_risky) - # expect { do_something_risky }.to throw_symbol(:that_was_risky, 'culprit') - # - # expect { do_something_risky }.not_to throw_symbol - # expect { do_something_risky }.not_to throw_symbol(:that_was_risky) - # expect { do_something_risky }.not_to throw_symbol(:that_was_risky, 'culprit') - # - # source://rspec-expectations//lib/rspec/matchers.rb#850 - def throw_symbol(expected_symbol = T.unsafe(nil), expected_arg = T.unsafe(nil)); end - - # Given no argument, matches if a proc throws any Symbol. - # - # Given a Symbol, matches if the given proc throws the specified Symbol. - # - # Given a Symbol and an arg, matches if the given proc throws the - # specified Symbol with the specified arg. - # - # @example - # expect { do_something_risky }.to throw_symbol - # expect { do_something_risky }.to throw_symbol(:that_was_risky) - # expect { do_something_risky }.to throw_symbol(:that_was_risky, 'culprit') - # - # expect { do_something_risky }.not_to throw_symbol - # expect { do_something_risky }.not_to throw_symbol(:that_was_risky) - # expect { do_something_risky }.not_to throw_symbol(:that_was_risky, 'culprit') - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def throwing(*args, **_arg1, &block); end - - # Passes if actual == expected +/- delta - # - # @example - # expect(result).to be_within(0.5).of(3.0) - # expect(result).not_to be_within(0.5).of(3.0) - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def within(*args, **_arg1, &block); end - - # Passes if the method called in the expect block yields, regardless - # of whether or not arguments are yielded. - # - # @example - # expect { |b| 5.tap(&b) }.to yield_control - # expect { |b| "a".to_sym(&b) }.not_to yield_control - # @note Your expect block must accept a parameter and pass it on to - # the method-under-test as a block. - # - # source://rspec-expectations//lib/rspec/matchers.rb#871 - def yield_control; end - - # Designed for use with methods that repeatedly yield (such as - # iterators). Passes if the method called in the expect block yields - # multiple times with arguments matching those given. - # - # Argument matching is done using `===` (the case match operator) - # and `==`. If the expected and actual arguments match with either - # operator, the matcher will pass. - # - # @example - # expect { |b| [1, 2, 3].each(&b) }.to yield_successive_args(1, 2, 3) - # expect { |b| { :a => 1, :b => 2 }.each(&b) }.to yield_successive_args([:a, 1], [:b, 2]) - # expect { |b| [1, 2, 3].each(&b) }.not_to yield_successive_args(1, 2) - # @note Your expect block must accept a parameter and pass it on to - # the method-under-test as a block. - # - # source://rspec-expectations//lib/rspec/matchers.rb#940 - def yield_successive_args(*args); end - - # Given no arguments, matches if the method called in the expect - # block yields with arguments (regardless of what they are or how - # many there are). - # - # Given arguments, matches if the method called in the expect block - # yields with arguments that match the given arguments. - # - # Argument matching is done using `===` (the case match operator) - # and `==`. If the expected and actual arguments match with either - # operator, the matcher will pass. - # - # @example - # expect { |b| 5.tap(&b) }.to yield_with_args # because #tap yields an arg - # expect { |b| 5.tap(&b) }.to yield_with_args(5) # because 5 == 5 - # expect { |b| 5.tap(&b) }.to yield_with_args(Integer) # because Integer === 5 - # expect { |b| File.open("f.txt", &b) }.to yield_with_args(/txt/) # because /txt/ === "f.txt" - # - # expect { |b| User.transaction(&b) }.not_to yield_with_args # because it yields no args - # expect { |b| 5.tap(&b) }.not_to yield_with_args(1, 2, 3) - # @note Your expect block must accept a parameter and pass it on to - # the method-under-test as a block. - # @note This matcher is not designed for use with methods that yield - # multiple times. - # - # source://rspec-expectations//lib/rspec/matchers.rb#919 - def yield_with_args(*args); end - - # Passes if the method called in the expect block yields with - # no arguments. Fails if it does not yield, or yields with arguments. - # - # @example - # expect { |b| User.transaction(&b) }.to yield_with_no_args - # expect { |b| 5.tap(&b) }.not_to yield_with_no_args # because it yields with `5` - # expect { |b| "a".to_sym(&b) }.not_to yield_with_no_args # because it does not yield - # @note Your expect block must accept a parameter and pass it on to - # the method-under-test as a block. - # @note This matcher is not designed for use with methods that yield - # multiple times. - # - # source://rspec-expectations//lib/rspec/matchers.rb#889 - def yield_with_no_args; end - - # Passes if the method called in the expect block yields, regardless - # of whether or not arguments are yielded. - # - # @example - # expect { |b| 5.tap(&b) }.to yield_control - # expect { |b| "a".to_sym(&b) }.not_to yield_control - # @note Your expect block must accept a parameter and pass it on to - # the method-under-test as a block. - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - 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 - # multiple times with arguments matching those given. - # - # Argument matching is done using `===` (the case match operator) - # and `==`. If the expected and actual arguments match with either - # operator, the matcher will pass. - # - # @example - # expect { |b| [1, 2, 3].each(&b) }.to yield_successive_args(1, 2, 3) - # expect { |b| { :a => 1, :b => 2 }.each(&b) }.to yield_successive_args([:a, 1], [:b, 2]) - # expect { |b| [1, 2, 3].each(&b) }.not_to yield_successive_args(1, 2) - # @note Your expect block must accept a parameter and pass it on to - # the method-under-test as a block. - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - 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 - # many there are). - # - # Given arguments, matches if the method called in the expect block - # yields with arguments that match the given arguments. - # - # Argument matching is done using `===` (the case match operator) - # and `==`. If the expected and actual arguments match with either - # operator, the matcher will pass. - # - # @example - # expect { |b| 5.tap(&b) }.to yield_with_args # because #tap yields an arg - # expect { |b| 5.tap(&b) }.to yield_with_args(5) # because 5 == 5 - # expect { |b| 5.tap(&b) }.to yield_with_args(Integer) # because Integer === 5 - # expect { |b| File.open("f.txt", &b) }.to yield_with_args(/txt/) # because /txt/ === "f.txt" - # - # expect { |b| User.transaction(&b) }.not_to yield_with_args # because it yields no args - # expect { |b| 5.tap(&b) }.not_to yield_with_args(1, 2, 3) - # @note Your expect block must accept a parameter and pass it on to - # the method-under-test as a block. - # @note This matcher is not designed for use with methods that yield - # multiple times. - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - 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. - # - # @example - # expect { |b| User.transaction(&b) }.to yield_with_no_args - # expect { |b| 5.tap(&b) }.not_to yield_with_no_args # because it yields with `5` - # expect { |b| "a".to_sym(&b) }.not_to yield_with_no_args # because it does not yield - # @note Your expect block must accept a parameter and pass it on to - # the method-under-test as a block. - # @note This matcher is not designed for use with methods that yield - # multiple times. - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def yielding_with_no_args(*args, **_arg1, &block); end - - private - - # source://rspec-expectations//lib/rspec/matchers.rb#961 - def method_missing(method, *args, **_arg2, &block); end - - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers.rb#974 - def respond_to_missing?(method, *_arg1); end - - class << self - # Extended from {RSpec::Matchers::DSL#alias_matcher}. - # - # source://rspec-expectations//lib/rspec/matchers.rb#250 - def alias_matcher(*args, &block); end - - # Used by rspec-core to clear the state used to generate - # descriptions after an example. - # - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/generated_descriptions.rb#11 - def clear_generated_description; end - - # Delegates to {RSpec::Expectations.configuration}. - # This is here because rspec-core's `expect_with` option - # looks for a `configuration` method on the mixin - # (`RSpec::Matchers`) to yield to a block. - # - # @return [RSpec::Expectations::Configuration] the configuration object - # - # source://rspec-expectations//lib/rspec/matchers.rb#951 - def configuration; end - - # Generates an an example description based on the last expectation. - # Used by rspec-core's one-liner syntax. - # - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/generated_descriptions.rb#19 - def generated_description; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers.rb#1008 - def is_a_describable_matcher?(obj); end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers.rb#988 - def is_a_matcher?(obj); end - - # @private - # - # source://rspec-expectations//lib/rspec/matchers/generated_descriptions.rb#25 - def last_description; end - - # @private - # - # source://rspec-expectations//lib/rspec/matchers/generated_descriptions.rb#5 - def last_expectation_handler; end - - # @private - # - # source://rspec-expectations//lib/rspec/matchers/generated_descriptions.rb#5 - def last_expectation_handler=(_arg0); end - - # @private - # - # source://rspec-expectations//lib/rspec/matchers/generated_descriptions.rb#5 - def last_matcher; end - - # @private - # - # source://rspec-expectations//lib/rspec/matchers/generated_descriptions.rb#5 - def last_matcher=(_arg0); end - end -end - -# Decorator that wraps a matcher and overrides `description` -# using the provided block in order to support an alias -# of a matcher. This is intended for use when composing -# matchers, so that you can use an expression like -# `include( a_value_within(0.1).of(3) )` rather than -# `include( be_within(0.1).of(3) )`, and have the corresponding -# description read naturally. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#12 -class RSpec::Matchers::AliasedMatcher < ::RSpec::Matchers::MatcherDelegator - # @api private - # @return [AliasedMatcher] a new instance of AliasedMatcher - # - # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#13 - def initialize(base_matcher, description_block); end - - # Provides the description of the aliased matcher. Aliased matchers - # are designed to behave identically to the original matcher except - # for the description and failure messages. The description is different - # to reflect the aliased name. - # - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#36 - def description; end - - # Provides the failure_message of the aliased matcher. Aliased matchers - # are designed to behave identically to the original matcher except - # for the description and failure messages. The failure_message is different - # to reflect the aliased name. - # - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#46 - def failure_message; end - - # Provides the failure_message_when_negated of the aliased matcher. Aliased matchers - # are designed to behave identically to the original matcher except - # for the description and failure messages. The failure_message_when_negated is different - # to reflect the aliased name. - # - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#56 - def failure_message_when_negated; end - - # Forward messages on to the wrapped matcher. - # Since many matchers provide a fluent interface - # (e.g. `a_value_within(0.1).of(3)`), we need to wrap - # the returned value if it responds to `description`, - # so that our override can be applied when it is eventually - # used. - # - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#24 - def method_missing(*_arg0); end -end - -# Decorator used for matchers that have special implementations of -# operators like `==` and `===`. -# -# @private -# -# source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#64 -class RSpec::Matchers::AliasedMatcherWithOperatorSupport < ::RSpec::Matchers::AliasedMatcher; end - -# @private -# -# source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#71 -class RSpec::Matchers::AliasedNegatedMatcher < ::RSpec::Matchers::AliasedMatcher - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#80 - def does_not_match?(*args, &block); end - - # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#84 - def failure_message; end - - # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#88 - def failure_message_when_negated; end - - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#72 - def matches?(*args, &block); end - - private - - # For a matcher that uses the default failure messages, we prefer to - # use the override provided by the `description_block`, because it - # includes the phrasing that the user has expressed a preference for - # 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 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). - # - # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#105 - def optimal_failure_message(same, inverted); end -end - -# source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#94 -RSpec::Matchers::AliasedNegatedMatcher::DefaultFailureMessages = RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages - -# 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. -# -# Autoloading is used to delay when the matcher classes get loaded, allowing -# rspec-matchers to boot faster, and avoiding loading matchers the user is -# not using. -# -# source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#3 -module RSpec::Matchers::BuiltIn; end - -# Provides the implementation for `all`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#7 -class RSpec::Matchers::BuiltIn::All < ::RSpec::Matchers::BuiltIn::BaseMatcher - # @api private - # @return [All] a new instance of All - # - # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#11 - def initialize(matcher); end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#37 - def description; end - - # @api private - # @private - # @raise [NotImplementedError] - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#17 - def does_not_match?(_actual); end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#9 - def failed_objects; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#23 - def failure_message; end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#9 - def matcher; end - - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#63 - def add_new_line_if_needed(message); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#58 - def failure_message_for_item(index, failure_message); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#67 - def indent_multiline_message(message); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#50 - def index_failed_objects; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#74 - def initialize_copy(other); end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#80 - def iterable?; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#43 - def match(_expected, _actual); end -end - -# Used _internally_ as a base class for matchers that ship with -# rspec-expectations and rspec-rails. -# -# ### Warning: -# -# This class is for internal use, and subject to change without notice. -# We strongly recommend that you do not base your custom matchers on this -# class. If/when this changes, we will announce it and remove this warning. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#14 -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 - # @return [BaseMatcher] a new instance of BaseMatcher - # - # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#28 - def initialize(expected = T.unsafe(nil)); end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#23 - def actual; end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#97 - def actual_formatted; end - - # Generates a description using {EnglishPhrasing}. - # - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#60 - def description; end - - # Matchers are not diffable by default. Override this to make your - # subclass diffable. - # - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#69 - def diffable?; end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#23 - def expected; end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#92 - def expected_formatted; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#87 - def expects_call_stack_jump?; end - - # Used to wrap a block of code that will indicate failure by - # raising one of the named exceptions. - # - # This is used by rspec-rails for some of its matchers that - # wrap rails' assertions. - # - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#47 - def match_unless_raises(*exceptions); end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#107 - def matcher_name; end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#26 - def matcher_name=(_arg0); end - - # Indicates if the match is successful. Delegates to `match`, which - # should be defined on a subclass. Takes care of consistently - # initializing the `actual` attribute. - # - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#36 - def matches?(actual); end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#23 - def rescued_exception; end - - # Most matchers are value matchers (i.e. meant to work with `expect(value)`) - # rather than block matchers (i.e. meant to work with `expect { }`), so - # this defaults to false. Block matchers must override this to return true. - # - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#77 - def supports_block_expectations?; end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#82 - def supports_value_expectations?; end - - class << self - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#102 - def matcher_name; end - - private - - # Borrowed from ActiveSupport. - # - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#117 - def underscore(camel_cased_word); end - end -end - -# Provides default implementations of failure messages, based on the `description`. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#193 -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 - # you often only need to override `description`. - # - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#199 - def failure_message; end - - # Provides a good generic negative failure message. Based on `description`. - # When subclassing, if you are not satisfied with this failure message - # you often only need to override `description`. - # - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#208 - def failure_message_when_negated; end - - class << self - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#213 - def has_default_failure_messages?(matcher); end - end -end - -# @api private -# @private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#128 -module RSpec::Matchers::BuiltIn::BaseMatcher::HashFormatting - private - - # `{ :a => 5, :b => 2 }.inspect` produces: - # - # {:a=>5, :b=>2} - # - # ...but it looks much better as: - # - # {:a => 5, :b => 2} - # - # This is idempotent and safe to run on a string multiple times. - # - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#138 - def improve_hash_formatting(inspect_string); end - - class << self - # `{ :a => 5, :b => 2 }.inspect` produces: - # - # {:a=>5, :b=>2} - # - # ...but it looks much better as: - # - # {:a => 5, :b => 2} - # - # This is idempotent and safe to run on a string multiple times. - # - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#138 - def improve_hash_formatting(inspect_string); end - end -end - -# @api private -# @private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#147 -module RSpec::Matchers::BuiltIn::BaseMatcher::StringEncodingFormatting - private - - # Formats a String's encoding as a human readable string - # :nocov: - # - # @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#172 - def format_encoding(value); end - - # :nocov: - # - # @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#153 - def string_encoding_differs?; end - - class << self - # Formats a String's encoding as a human readable string - # :nocov: - # - # @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#172 - def format_encoding(value); end - - # :nocov: - # - # @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#153 - 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. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#20 -RSpec::Matchers::BuiltIn::BaseMatcher::UNDEFINED = T.let(T.unsafe(nil), Object) - -# Provides the implementation for `be`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#101 -class RSpec::Matchers::BuiltIn::Be < ::RSpec::Matchers::BuiltIn::BaseMatcher - include ::RSpec::Matchers::BuiltIn::BeHelpers - - # @api private - # @return [Be] a new instance of Be - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#104 - def initialize(*args); end - - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#121 - def <(operand); end - - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#121 - def <=(operand); end - - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#121 - def ==(operand); end - - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#121 - def ===(operand); end - - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#121 - def =~(operand); end - - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#121 - def >(operand); end - - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#121 - def >=(operand); end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#110 - def failure_message; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#116 - def failure_message_when_negated; end - - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#128 - def match(_, actual); end -end - -# Provides the implementation for `be_a_kind_of`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/be_kind_of.rb#7 -class RSpec::Matchers::BuiltIn::BeAKindOf < ::RSpec::Matchers::BuiltIn::BaseMatcher - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be_kind_of.rb#10 - def match(expected, actual); end -end - -# Provides the implementation for `be_an_instance_of`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/be_instance_of.rb#7 -class RSpec::Matchers::BuiltIn::BeAnInstanceOf < ::RSpec::Matchers::BuiltIn::BaseMatcher - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be_instance_of.rb#10 - def description; end - - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be_instance_of.rb#16 - def match(expected, actual); end -end - -# Provides the implementation for `be_between`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#7 -class RSpec::Matchers::BuiltIn::BeBetween < ::RSpec::Matchers::BuiltIn::BaseMatcher - # @api private - # @return [BeBetween] a new instance of BeBetween - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#8 - def initialize(min, max); end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#57 - def description; end - - # Makes the between comparison exclusive. - # - # @api public - # @example - # expect(3).to be_between(2, 4).exclusive - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#33 - def exclusive; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#51 - def failure_message; end - - # Makes the between comparison inclusive. - # - # @api public - # @example - # expect(3).to be_between(2, 3).inclusive - # @note The matcher is inclusive by default; this simply provides - # a way to be more explicit about it. - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#21 - def inclusive; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#42 - def matches?(actual); end - - private - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#63 - def comparable?; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#71 - def compare; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#67 - def not_comparable_clause; end -end - -# Provides the implementation of `be value`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#136 -class RSpec::Matchers::BuiltIn::BeComparedTo < ::RSpec::Matchers::BuiltIn::BaseMatcher - include ::RSpec::Matchers::BuiltIn::BeHelpers - - # @api private - # @return [BeComparedTo] a new instance of BeComparedTo - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#139 - def initialize(operand, operator); end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#178 - def description; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#151 - def does_not_match?(actual); end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#159 - def failure_message; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#166 - def failure_message_when_negated; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#145 - def matches?(actual); end - - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#184 - def perform_match(actual); end -end - -# Provides the implementation for `be_falsey`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#30 -class RSpec::Matchers::BuiltIn::BeFalsey < ::RSpec::Matchers::BuiltIn::BaseMatcher - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#33 - def failure_message; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#39 - def failure_message_when_negated; end - - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#45 - def match(_, actual); end -end - -# @private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#74 -module RSpec::Matchers::BuiltIn::BeHelpers - private - - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#77 - def args_to_s; end - - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#93 - def args_to_sentence; end - - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#89 - def expected_to_sentence; end - - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#85 - def inspected_args; end - - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#81 - def parenthesize(string); end -end - -# Provides the implementation for `be_nil`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#53 -class RSpec::Matchers::BuiltIn::BeNil < ::RSpec::Matchers::BuiltIn::BaseMatcher - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#56 - def failure_message; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#62 - def failure_message_when_negated; end - - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#68 - def match(_, actual); end -end - -# Provides the implementation of `be_`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#164 -class RSpec::Matchers::BuiltIn::BePredicate < ::RSpec::Matchers::BuiltIn::DynamicPredicate - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#176 - def failure_to_respond_explanation; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#168 - def predicate; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#184 - def predicate_accessible?; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#172 - def predicate_method_name; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#188 - def present_tense_predicate; end -end - -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#166 -RSpec::Matchers::BuiltIn::BePredicate::REGEX = T.let(T.unsafe(nil), Regexp) - -# Provides the implementation for `be_truthy`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#7 -class RSpec::Matchers::BuiltIn::BeTruthy < ::RSpec::Matchers::BuiltIn::BaseMatcher - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#10 - def failure_message; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#16 - def failure_message_when_negated; end - - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#22 - def match(_, actual); end -end - -# Provides the implementation for `be_within`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#7 -class RSpec::Matchers::BuiltIn::BeWithin < ::RSpec::Matchers::BuiltIn::BaseMatcher - # @api private - # @return [BeWithin] a new instance of BeWithin - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#8 - def initialize(delta); end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#52 - def description; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#40 - def failure_message; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#46 - def failure_message_when_negated; end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#32 - def matches?(actual); end - - # Sets the expected value. - # - # @api public - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#14 - def of(expected); end - - # Sets the expected value, and makes the matcher do - # a percent comparison. - # - # @api public - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#24 - def percent_of(expected); end - - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#62 - def needs_expected; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#66 - def not_numeric_clause; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#58 - def numeric?; end -end - -# @private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#159 -module RSpec::Matchers::BuiltIn::CaptureStderr - class << self - # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#164 - def capture(block); end - - # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#160 - def name; end - end -end - -# @private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#139 -module RSpec::Matchers::BuiltIn::CaptureStdout - class << self - # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#144 - def capture(block); end - - # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#140 - def name; end - end -end - -# @private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#179 -class RSpec::Matchers::BuiltIn::CaptureStreamToTempfile < ::Struct - # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#180 - def capture(block); end -end - -# Provides the implementation for `change`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#7 -class RSpec::Matchers::BuiltIn::Change < ::RSpec::Matchers::BuiltIn::BaseMatcher - # @api private - # @return [Change] a new instance of Change - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#87 - def initialize(receiver = T.unsafe(nil), message = T.unsafe(nil), &block); end - - # Specifies the delta of the expected change. - # - # @api public - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#10 - def by(expected_delta); end - - # Specifies a minimum delta of the expected change. - # - # @api public - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#18 - def by_at_least(minimum); end - - # Specifies a maximum delta of the expected change. - # - # @api public - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#26 - def by_at_most(maximum); end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#71 - def description; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#50 - def does_not_match?(event_proc); end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#57 - def failure_message; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#64 - def failure_message_when_negated; end - - # Specifies the original value. - # - # @api public - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#40 - def from(value); end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#45 - def matches?(event_proc); end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#76 - def supports_block_expectations?; end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#81 - def supports_value_expectations?; end - - # Specifies the new value you expect. - # - # @api public - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#34 - def to(value); end - - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#93 - def change_details; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#119 - def negative_failure_reason; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#97 - def perform_change(event_proc); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#114 - def positive_failure_reason; end - - # @api private - # @raise [SyntaxError] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#109 - def raise_block_syntax_error; end -end - -# Encapsulates the details of the before/after values. -# -# Note that this class exposes the `actual_after` value, to allow the -# matchers above to derive failure messages, etc from the value on demand -# as needed, but it intentionally does _not_ expose the `actual_before` -# value. Some usages of the `change` matcher mutate a specific object -# returned by the value proc, which means that failure message snippets, -# etc, which are derived from the `before` value may not be accurate if -# they are lazily computed as needed. We must pre-compute them before -# applying the change in the `expect` block. To ensure that all `change` -# matchers do that properly, we do not expose the `actual_before` value. -# Instead, matchers must pass a block to `perform_change`, which yields -# the `actual_before` value before applying the change. -# -# @private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#352 -class RSpec::Matchers::BuiltIn::ChangeDetails - # @return [ChangeDetails] a new instance of ChangeDetails - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#357 - def initialize(matcher_name, receiver = T.unsafe(nil), message = T.unsafe(nil), &block); end - - # Returns the value of attribute actual_after. - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#353 - def actual_after; end - - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#418 - def actual_delta; end - - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#402 - def changed?; end - - # @yield [@actual_before] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#389 - def perform_change(event_proc); end - - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#378 - def value_representation; end - - private - - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#424 - def evaluate_value_proc; end - - # :nocov: - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#438 - def extract_value_block_snippet; end - - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#428 - def message_notation(receiver, message); end -end - -# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#355 -module RSpec::Matchers::BuiltIn::ChangeDetails::UNDEFINED; end - -# Used to specify a change from a specific value -# (and, optionally, to a specific value). -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#270 -class RSpec::Matchers::BuiltIn::ChangeFromValue < ::RSpec::Matchers::BuiltIn::SpecificValuesChange - # @api private - # @return [ChangeFromValue] a new instance of ChangeFromValue - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#271 - def initialize(change_details, expected_before); end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#285 - def does_not_match?(event_proc); end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#295 - def failure_message_when_negated; end - - # Specifies the new value you expect. - # - # @api public - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#278 - def to(value); end - - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#303 - def change_description; end -end - -# Used to specify a relative change. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#128 -class RSpec::Matchers::BuiltIn::ChangeRelatively < ::RSpec::Matchers::BuiltIn::BaseMatcher - # @api private - # @return [ChangeRelatively] a new instance of ChangeRelatively - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#129 - def initialize(change_details, expected_delta, relativity, &comparer); end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#156 - def description; end - - # @api private - # @private - # @raise [NotImplementedError] - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#150 - def does_not_match?(_event_proc); end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#137 - def failure_message; end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#144 - def matches?(event_proc); end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#162 - def supports_block_expectations?; end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#167 - def supports_value_expectations?; end - - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#173 - def failure_reason; end -end - -# Used to specify a change to a specific value -# (and, optionally, from a specific value). -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#311 -class RSpec::Matchers::BuiltIn::ChangeToValue < ::RSpec::Matchers::BuiltIn::SpecificValuesChange - # @api private - # @return [ChangeToValue] a new instance of ChangeToValue - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#312 - def initialize(change_details, expected_after); end - - # @api private - # @private - # @raise [NotImplementedError] - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#326 - def does_not_match?(_event_proc); end - - # Specifies the original value. - # - # @api public - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#319 - def from(value); end - - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#333 - def change_description; end -end - -# Base class for `and` and `or` compound matchers. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#6 -class RSpec::Matchers::BuiltIn::Compound < ::RSpec::Matchers::BuiltIn::BaseMatcher - # @api private - # @return [Compound] a new instance of Compound - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#10 - def initialize(matcher_1, matcher_2); end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#25 - def description; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#49 - def diffable?; end - - # @api private - # @private - # @raise [NotImplementedError] - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#16 - def does_not_match?(_actual); end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#8 - def evaluator; end - - # @api private - # @return [RSpec::Matchers::MultiMatcherDiff] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#55 - def expected; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#42 - def expects_call_stack_jump?; end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#8 - def matcher_1; end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#8 - def matcher_2; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#30 - def supports_block_expectations?; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#36 - def supports_value_expectations?; end - - protected - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#62 - def diffable_matcher_list; end - - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#96 - def compound_failure_message; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#128 - def diffable_matcher_list_for(matcher); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#90 - def indent_multiline_message(message); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#71 - def initialize_copy(other); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#77 - def match(_expected, actual); end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#102 - def matcher_1_matches?; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#106 - def matcher_2_matches?; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#122 - def matcher_is_diffable?(matcher); end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#110 - def matcher_supports_block_expectations?(matcher); end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#116 - def matcher_supports_value_expectations?(matcher); end -end - -# Matcher used to represent a compound `and` expectation. -# -# @api public -# -# source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#245 -class RSpec::Matchers::BuiltIn::Compound::And < ::RSpec::Matchers::BuiltIn::Compound - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#248 - def failure_message; end - - private - - # @api public - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#265 - def conjunction; end - - # @api public - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#260 - def match(*_arg0); end -end - -# Normally, we evaluate the matching sequentially. For an expression like -# `expect(x).to foo.and bar`, this becomes: -# -# expect(x).to foo -# expect(x).to bar -# -# For block expectations, we need to nest them instead, so that -# `expect { x }.to foo.and bar` becomes: -# -# expect { -# expect { x }.to foo -# }.to bar -# -# This is necessary so that the `expect` block is only executed once. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#159 -class RSpec::Matchers::BuiltIn::Compound::NestedEvaluator - # @api private - # @return [NestedEvaluator] a new instance of NestedEvaluator - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#160 - def initialize(actual, matcher_1, matcher_2); end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#173 - def matcher_matches?(matcher); end - - private - - # Some block matchers (such as `yield_xyz`) pass args to the `expect` block. - # When such a matcher is used as the outer matcher, we need to forward the - # the args on to the `expect` block. - # - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#187 - def inner_matcher_block(outer_args); end - - # For a matcher like `raise_error` or `throw_symbol`, where the block will jump - # up the call stack, we need to order things so that it is the inner matcher. - # For example, we need it to be this: - # - # expect { - # expect { - # x += 1 - # raise "boom" - # }.to raise_error("boom") - # }.to change { x }.by(1) - # - # ...rather than: - # - # expect { - # expect { - # x += 1 - # raise "boom" - # }.to change { x }.by(1) - # }.to raise_error("boom") - # - # In the latter case, the after-block logic in the `change` matcher would never - # get executed because the `raise "boom"` line would jump to the `rescue` in the - # `raise_error` logic, so only the former case will work properly. - # - # This method figures out which matcher should be the inner matcher and which - # should be the outer matcher. - # - # @api private - # @raise [ArgumentError] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#227 - def order_block_matchers; end - - class << self - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#236 - def matcher_expects_call_stack_jump?(matcher); end - end -end - -# Matcher used to represent a compound `or` expectation. -# -# @api public -# -# source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#272 -class RSpec::Matchers::BuiltIn::Compound::Or < ::RSpec::Matchers::BuiltIn::Compound - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#275 - def failure_message; end - - private - - # @api public - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#286 - def conjunction; end - - # @api public - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#281 - def match(*_arg0); end -end - -# For value expectations, we can evaluate the matchers sequentially. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#135 -class RSpec::Matchers::BuiltIn::Compound::SequentialEvaluator - # @api private - # @return [SequentialEvaluator] a new instance of SequentialEvaluator - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#136 - def initialize(actual, *_arg1); end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#140 - def matcher_matches?(matcher); end -end - -# Provides the implementation for `contain_exactly` and `match_array`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#8 -class RSpec::Matchers::BuiltIn::ContainExactly < ::RSpec::Matchers::BuiltIn::BaseMatcher - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#29 - def description; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#11 - def failure_message; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#22 - def failure_message_when_negated; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#34 - def matches?(actual); end - - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#56 - def actual_collection_line; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#137 - def best_solution; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#94 - def convert_actual_to_an_array; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#68 - def describe_collection(collection, surface_descriptions = T.unsafe(nil)); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#52 - def expected_collection_line; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#64 - def extra_elements_line; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#131 - def extra_items; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#44 - def generate_failure_message; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#81 - def match(_expected, _actual); end - - # This cannot always work (e.g. when dealing with unsortable items, - # or matchers as expected items), but it's practically free compared to - # the slowness of the full matching algorithm, and in common cases this - # works, so it's worth a try. - # - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#90 - def match_when_sorted?; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#76 - def message_line(prefix, collection, surface_descriptions = T.unsafe(nil)); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#60 - def missing_elements_line; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#125 - def missing_items; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#141 - def pairings_maximizer; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#104 - def safe_sort(array); end - - # :nocov: - # - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#120 - def to_a_disallowed?(object); end -end - -# Once we started supporting composing matchers, the algorithm for this matcher got -# much more complicated. Consider this expression: -# -# expect(["fool", "food"]).to contain_exactly(/foo/, /fool/) -# -# This should pass (because we can pair /fool/ with "fool" and /foo/ with "food"), but -# the original algorithm used by this matcher would pair the first elements it could -# (/foo/ with "fool"), which would leave /fool/ and "food" unmatched. When we have -# an expected element which is a matcher that matches a superset of actual items -# compared to another expected element matcher, we need to consider every possible pairing. -# -# This class is designed to maximize the number of actual/expected pairings -- or, -# conversely, to minimize the number of unpaired items. It's essentially a brute -# force solution, but with a few heuristics applied to reduce the size of the -# problem space: -# -# * Any items which match none of the items in the other list are immediately -# placed into the `unmatched_expected_indexes` or `unmatched_actual_indexes` array. -# The extra items and missing items in the matcher failure message are derived -# from these arrays. -# * Any items which reciprocally match only each other are paired up and not -# considered further. -# -# What's left is only the items which match multiple items from the other list -# (or vice versa). From here, it performs a brute-force depth-first search, -# looking for a solution which pairs all elements in both lists, or, barring that, -# that produces the fewest unmatched items. -# -# @api private -# @private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#188 -class RSpec::Matchers::BuiltIn::ContainExactly::PairingsMaximizer - # @api private - # @return [PairingsMaximizer] a new instance of PairingsMaximizer - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#225 - def initialize(expected_to_actual_matched_indexes, actual_to_expected_matched_indexes); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#223 - def actual_to_expected_matched_indexes; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#223 - def expected_to_actual_matched_indexes; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#239 - def find_best_solution; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#223 - def solution; end - - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#301 - def apply_pairing_to(indeterminates, original_matches, other_list_index); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#285 - def best_solution_for_pairing(expected_index, actual_index); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#265 - def categorize_indexes(indexes_to_categorize, other_indexes); end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#280 - def reciprocal_single_match?(matches, index, other_list); end -end - -# Starting solution that is worse than any other real solution. -# -# @api private -# @private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#259 -class RSpec::Matchers::BuiltIn::ContainExactly::PairingsMaximizer::NullSolution - class << self - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#260 - def worse_than?(_other); end - end -end - -# @api private -# @private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#190 -class RSpec::Matchers::BuiltIn::ContainExactly::PairingsMaximizer::Solution < ::Struct - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#212 - def +(derived_candidate_solution); end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#196 - def candidate?; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#201 - def ideal?; end - - # Returns the value of attribute indeterminate_actual_indexes - # - # @return [Object] the current value of indeterminate_actual_indexes - def indeterminate_actual_indexes; end - - # Sets the attribute indeterminate_actual_indexes - # - # @param value [Object] the value to set the attribute indeterminate_actual_indexes to. - # @return [Object] the newly set value - def indeterminate_actual_indexes=(_); end - - # Returns the value of attribute indeterminate_expected_indexes - # - # @return [Object] the current value of indeterminate_expected_indexes - def indeterminate_expected_indexes; end - - # Sets the attribute indeterminate_expected_indexes - # - # @param value [Object] the value to set the attribute indeterminate_expected_indexes to. - # @return [Object] the newly set value - def indeterminate_expected_indexes=(_); end - - # Returns the value of attribute unmatched_actual_indexes - # - # @return [Object] the current value of unmatched_actual_indexes - def unmatched_actual_indexes; end - - # Sets the attribute unmatched_actual_indexes - # - # @param value [Object] the value to set the attribute unmatched_actual_indexes to. - # @return [Object] the newly set value - def unmatched_actual_indexes=(_); end - - # Returns the value of attribute unmatched_expected_indexes - # - # @return [Object] the current value of unmatched_expected_indexes - def unmatched_expected_indexes; end - - # Sets the attribute unmatched_expected_indexes - # - # @param value [Object] the value to set the attribute unmatched_expected_indexes to. - # @return [Object] the newly set value - def unmatched_expected_indexes=(_); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#208 - def unmatched_item_count; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#192 - def worse_than?(other); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# Abstract class to implement `once`, `at_least` and other -# count constraints. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#7 -module RSpec::Matchers::BuiltIn::CountExpectation - # Specifies the minimum number of times the method is expected to match - # - # @api public - # - # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#42 - def at_least(number); end - - # Specifies the maximum number of times the method is expected to match - # - # @api public - # - # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#35 - def at_most(number); end - - # Specifies that the method is expected to match the given number of times. - # - # @api public - # - # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#28 - def exactly(number); end - - # Specifies that the method is expected to match once. - # - # @api public - # - # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#10 - def once; end - - # Specifies that the method is expected to match thrice. - # - # @api public - # - # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#22 - def thrice; end - - # No-op. Provides syntactic sugar. - # - # @api public - # - # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#49 - def times; end - - # Specifies that the method is expected to match twice. - # - # @api public - # - # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#16 - def twice; end - - protected - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#55 - def count_expectation_type; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#55 - def expected_count; end - - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#122 - def count_constraint_to_number(n); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#141 - def count_expectation_description; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#145 - def count_failure_reason(action); end - - # :nocov: - # - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#60 - def cover?(count, number); end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#71 - def expected_count_matches?(actual_count); end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#79 - def has_expected_count?; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#159 - def human_readable_count(count); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#150 - def human_readable_expectation_type; end - - # @api private - # @raise [ArgumentError] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#102 - def raise_impossible_count_expectation(count); end - - # @api private - # @raise [ArgumentError] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#111 - def raise_unsupported_count_expectation; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#83 - def set_expected_count(relativity, n); end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#134 - def unsupported_count_expectation?(relativity); end -end - -# Provides the implementation for `cover`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/cover.rb#7 -class RSpec::Matchers::BuiltIn::Cover < ::RSpec::Matchers::BuiltIn::BaseMatcher - # @api private - # @return [Cover] a new instance of Cover - # - # source://rspec-expectations//lib/rspec/matchers/built_in/cover.rb#8 - def initialize(*expected); end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/cover.rb#17 - def does_not_match?(range); end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/cover.rb#12 - def matches?(range); end -end - -# Provides the implementation for dynamic predicate matchers. -# Not intended to be inherited directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#7 -class RSpec::Matchers::BuiltIn::DynamicPredicate < ::RSpec::Matchers::BuiltIn::BaseMatcher - include ::RSpec::Matchers::BuiltIn::BeHelpers - - # @api private - # @return [DynamicPredicate] a new instance of DynamicPredicate - # - # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#10 - def initialize(method_name, *args, **_arg2, &block); end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#43 - def description; end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#23 - def does_not_match?(actual, &block); end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#31 - def failure_message; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#37 - def failure_message_when_negated; end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#16 - def matches?(actual, &block); end - - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#126 - def expectation_of(value); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#121 - def failure_message_expecting(value); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#142 - def failure_to_respond_explanation; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#117 - def method_description; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#88 - def methods_include?(method); end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#68 - def predicate_accessible?; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#101 - def predicate_matches?(value = T.unsafe(nil)); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#97 - def predicate_method_name; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#93 - def predicate_result; end - - # :nocov: - # - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#84 - def private_predicate?; end - - # :nocov: - # - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#62 - def really_responds_to?(method); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#109 - def root; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#136 - def validity_message; end -end - -# Provides the implementation for `end_with`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#81 -class RSpec::Matchers::BuiltIn::EndWith < ::RSpec::Matchers::BuiltIn::StartOrEndWith - private - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#88 - def element_matches?; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#84 - def subset_matches?; end -end - -# Provides the implementation for `eq`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#7 -class RSpec::Matchers::BuiltIn::Eq < ::RSpec::Matchers::BuiltIn::BaseMatcher - # @api private - # @return [String] - # - # 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#32 - def diffable?; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#10 - def failure_message; end - - # @api private - # @return [String] - # - # 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#38 - def match(expected, actual); end -end - -# Provides the implementation for `eql`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#7 -class RSpec::Matchers::BuiltIn::Eql < ::RSpec::Matchers::BuiltIn::BaseMatcher - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#26 - def diffable?; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#10 - def failure_message; end - - # @api private - # @return [String] - # - # 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#32 - def match(expected, actual); end -end - -# Provides the implementation for `equal`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#7 -class RSpec::Matchers::BuiltIn::Equal < ::RSpec::Matchers::BuiltIn::BaseMatcher - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#33 - def diffable?; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#10 - def failure_message; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#20 - def failure_message_when_negated; end - - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#49 - def actual_inspected; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#61 - def detailed_failure_message; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#45 - def expected_is_a_literal_singleton?; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#75 - def inspect_object(o); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#39 - def match(expected, actual); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#57 - def simple_failure_message; end -end - -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#43 -RSpec::Matchers::BuiltIn::Equal::LITERAL_SINGLETONS = T.let(T.unsafe(nil), Array) - -# Provides the implementation for `exist`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#7 -class RSpec::Matchers::BuiltIn::Exist < ::RSpec::Matchers::BuiltIn::BaseMatcher - # @api private - # @return [Exist] a new instance of Exist - # - # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#8 - def initialize(*expected); end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#22 - def does_not_match?(actual); end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#30 - def failure_message; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#36 - def failure_message_when_negated; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#14 - def matches?(actual); end -end - -# Simple class for memoizing actual/expected for this matcher -# and examining the match -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#43 -class RSpec::Matchers::BuiltIn::Exist::ExistenceTest < ::Struct - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#52 - def actual_exists?; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#46 - def valid_test?; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#58 - def validity_message; end - - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#83 - def deprecated(predicate, actual); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#75 - def existence_values; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#79 - def predicates; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#71 - def uniq_truthy_values; end -end - -# Provides the implementation for `has_`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#152 -class RSpec::Matchers::BuiltIn::Has < ::RSpec::Matchers::BuiltIn::DynamicPredicate - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#156 - def predicate; end -end - -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#154 -RSpec::Matchers::BuiltIn::Has::REGEX = T.let(T.unsafe(nil), Regexp) - -# Provides the implementation for `have_attributes`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#7 -class RSpec::Matchers::BuiltIn::HaveAttributes < ::RSpec::Matchers::BuiltIn::BaseMatcher - # @api private - # @return [HaveAttributes] a new instance of HaveAttributes - # - # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#11 - def initialize(expected); end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#19 - def actual; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#43 - def description; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#50 - def diffable?; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#34 - def does_not_match?(actual); end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#56 - def failure_message; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#64 - def failure_message_when_negated; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#25 - def matches?(actual); end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#9 - def respond_to_failed; end - - private - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#85 - def actual_has_attribute?(attribute_key, attribute_value); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#70 - def cache_all_values; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#107 - def formatted_values; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#78 - def perform_match(predicate); end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#89 - def respond_to_attributes?; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#99 - def respond_to_failure_message_or; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#95 - def respond_to_matcher; end -end - -# Provides the implementation for `include`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#9 -class RSpec::Matchers::BuiltIn::Include < ::RSpec::Matchers::BuiltIn::BaseMatcher - include ::RSpec::Matchers::BuiltIn::CountExpectation - - # @api private - # @raise [ArgumentError] - # @return [Include] a new instance of Include - # - # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#15 - def initialize(*expecteds); end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#44 - def description; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#62 - def diffable?; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#33 - def does_not_match?(actual); end - - # @api private - # @return [Array, Hash] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#68 - def expected; end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#12 - def expecteds; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#50 - def failure_message; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#56 - def failure_message_when_negated; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#22 - def matches?(actual); end - - private - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#168 - def actual_collection_includes?(expected_item); end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#154 - def actual_hash_has_key?(expected_key); end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#142 - def actual_hash_includes?(expected_key, expected_value); end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#78 - def check_actual?(actual); end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#84 - def check_expected_count?; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#150 - def comparing_hash_keys?(expected_item); end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#138 - def comparing_hash_to_a_subset?(expected_item); end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#212 - def convert_to_hash?(obj); end - - # :nocov: - # - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#185 - def count_enumerable(expected_item); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#190 - def count_inclusions; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#202 - def diff_would_wrongly_highlight_matched_item?; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#121 - def excluded_from_actual; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#96 - def format_failure_message(preposition); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#116 - def perform_match(&block); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#107 - def readable_list_of(items); end -end - -# Provides the implementation for `match`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#7 -class RSpec::Matchers::BuiltIn::Match < ::RSpec::Matchers::BuiltIn::BaseMatcher - # @api private - # @return [Match] a new instance of Match - # - # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#8 - def initialize(expected); end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#15 - def description; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#25 - def diffable?; end - - # Used to specify the captures we match against - # - # @api private - # @return [self] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#31 - def with_captures(*captures); end - - private - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#45 - def can_safely_call_match?(expected, actual); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#38 - def match(expected, actual); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#52 - def match_captures(expected, actual); end -end - -# Handles operator matcher for `should_not`. -# -# @private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#116 -class RSpec::Matchers::BuiltIn::NegativeOperatorMatcher < ::RSpec::Matchers::BuiltIn::OperatorMatcher - # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#117 - def __delegate_operator(actual, operator, expected); end -end - -# @private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#128 -module RSpec::Matchers::BuiltIn::NullCapture - class << self - # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#133 - def capture(_block); end - - # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#129 - def name; end - end -end - -# Provides the implementation for operator matchers. -# Not intended to be instantiated directly. -# Only available for use with `should`. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#10 -class RSpec::Matchers::BuiltIn::OperatorMatcher - # @api private - # @return [OperatorMatcher] a new instance of OperatorMatcher - # - # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#41 - def initialize(actual); end - - # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#57 - def !=(_expected); end - - # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#57 - def !~(_expected); end - - # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#47 - def <(expected); end - - # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#47 - def <=(expected); end - - # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#47 - def ==(expected); end - - # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#47 - def ===(expected); end - - # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#47 - def =~(expected); end - - # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#47 - def >(expected); end - - # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#47 - def >=(expected); end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#76 - def description; end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#70 - def fail_with_message(message); end - - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#88 - def eval_match(actual, operator, expected); end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#82 - def has_non_generic_implementation_of?(op); end - - class << self - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#29 - def get(klass, operator); end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#18 - def register(klass, operator, matcher); end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#13 - def registry; end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#24 - def unregister(klass, operator); end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#46 - def use_custom_matcher_or_delegate(operator); end - end -end - -# Provides the implementation for `output`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#9 -class RSpec::Matchers::BuiltIn::Output < ::RSpec::Matchers::BuiltIn::BaseMatcher - # @api private - # @return [Output] a new instance of Output - # - # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#10 - def initialize(expected); end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#76 - def description; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#86 - def diffable?; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#24 - def does_not_match?(block); end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#64 - def failure_message; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#70 - def failure_message_when_negated; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#17 - def matches?(block); end - - # Indicates this matcher matches against a block. - # - # @api private - # @return [True] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#93 - def supports_block_expectations?; end - - # Indicates this matcher matches against a block only. - # - # @api private - # @return [False] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#100 - def supports_value_expectations?; end - - # Tells the matcher to match against stderr. - # Works only when the main Ruby process prints to stderr - # - # @api public - # - # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#39 - def to_stderr; end - - # Tells the matcher to match against stderr. - # Works when subprocesses print to stderr as well. - # This is significantly (~30x) slower than `to_stderr` - # - # @api public - # - # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#57 - def to_stderr_from_any_process; end - - # Tells the matcher to match against stdout. - # Works only when the main Ruby process prints to stdout - # - # @api public - # - # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#31 - def to_stdout; end - - # Tells the matcher to match against stdout. - # Works when subprocesses print to stdout as well. - # This is significantly (~30x) slower than `to_stdout` - # - # @api public - # - # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#48 - def to_stdout_from_any_process; end - - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#121 - def actual_output_description; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#106 - def captured?; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#116 - def negative_failure_reason; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#110 - def positive_failure_reason; end -end - -# Handles operator matcher for `should`. -# -# @private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#97 -class RSpec::Matchers::BuiltIn::PositiveOperatorMatcher < ::RSpec::Matchers::BuiltIn::OperatorMatcher - # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#98 - def __delegate_operator(actual, operator, expected); end -end - -# Provides the implementation for `raise_error`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#9 -class RSpec::Matchers::BuiltIn::RaiseError - include ::RSpec::Matchers::Composable - - # @api private - # @return [RaiseError] a new instance of RaiseError - # - # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#22 - def initialize(expected_error_or_message, expected_message, &block); end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#117 - def description; end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#83 - def does_not_match?(given_proc); end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#99 - def expects_call_stack_jump?; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#105 - def failure_message; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#111 - def failure_message_when_negated; end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#52 - def matches?(given_proc, negative_expectation = T.unsafe(nil), &block); end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#89 - def supports_block_expectations?; end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#94 - def supports_value_expectations?; end - - # Specifies the expected error message. - # - # @api public - # - # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#43 - def with_message(expected_message); end - - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#123 - def actual_error_message; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#137 - def block_matches?; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#133 - def error_and_message_match?; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#145 - def eval_block; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#129 - def expectation_matched?; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#226 - def expected_error; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#257 - def expecting_specific_exception?; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#241 - def format_backtrace(backtrace); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#246 - def given_error; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#176 - def handle_warning(message); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#261 - def raise_message_already_set; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#141 - def ready_to_eval_block?; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#155 - def verify_message; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#188 - def warn_about_bare_error!; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#180 - def warn_about_bare_error?; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#214 - def warn_about_negative_false_positive!(expression); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#201 - def warn_about_nil_error!; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#184 - def warn_about_nil_error?; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#160 - def warn_for_negative_false_positives!; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#266 - def warning; end -end - -# Used as a sentinel value to be able to tell when the user did not pass an -# argument. We can't use `nil` for that because we need to warn when `nil` is -# passed in a different way. It's an Object, not a Module, since Module's `===` -# does not evaluate to true when compared to itself. -# -# Note; this _is_ the default value supplied for expected_error_or_message, but -# because there are two method-calls involved, that default is actually supplied -# in the definition of the _matcher_ method, `RSpec::Matchers#raise_error` -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#20 -RSpec::Matchers::BuiltIn::RaiseError::UndefinedValue = T.let(T.unsafe(nil), Object) - -# Used to wrap match data and make it reliable for 1.8.7 -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#72 -class RSpec::Matchers::BuiltIn::ReliableMatchData - # @api private - # @return [ReliableMatchData] a new instance of ReliableMatchData - # - # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#73 - def initialize(match_data); end - - # returns an array of captures from the match data - # - # @api private - # @return Array - # - # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#98 - def captures; end - - # Returns match data names for named captures - # - # @api private - # @return Array - # - # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#90 - def names; end - - protected - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#104 - def match_data; end -end - -# Provides the implementation for `respond_to`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#9 -class RSpec::Matchers::BuiltIn::RespondTo < ::RSpec::Matchers::BuiltIn::BaseMatcher - # @api private - # @return [RespondTo] a new instance of RespondTo - # - # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#10 - def initialize(*names); end - - # Specifies that the method accepts any keyword, i.e. the method has - # a splatted keyword parameter of the form **kw_args. - # - # @api public - # @example - # expect(obj).to respond_to(:message).with_any_keywords - # - # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#48 - def and_any_keywords; end - - # Specifies keyword arguments, if any. - # - # @api public - # @example - # expect(obj).to respond_to(:message).with_keywords(:color, :shape) - # @example with an expected number of arguments - # expect(obj).to respond_to(:message).with(3).arguments.and_keywords(:color, :shape) - # - # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#36 - def and_keywords(*keywords); end - - # Specifies that the number of arguments has no upper limit, i.e. the - # method has a splatted parameter of the form *args. - # - # @api public - # @example - # expect(obj).to respond_to(:message).with_unlimited_arguments - # - # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#60 - def and_unlimited_arguments; end - - # No-op. Intended to be used as syntactic sugar when using `with`. - # - # @api public - # @example - # expect(obj).to respond_to(:message).with(3).arguments - # - # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#71 - def argument; end - - # No-op. Intended to be used as syntactic sugar when using `with`. - # - # @api public - # @example - # expect(obj).to respond_to(:message).with(3).arguments - # - # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#71 - def arguments; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#100 - def description; end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#82 - def does_not_match?(actual); end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#88 - def failure_message; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#94 - def failure_message_when_negated; end - - # Used by other matchers to suppress a check - # - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#106 - def ignoring_method_signature_failure!; end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#77 - def matches?(actual); end - - # Specifies the number of expected arguments. - # - # @api public - # @example - # expect(obj).to respond_to(:message).with(3).arguments - # - # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#24 - def with(n); end - - # Specifies that the method accepts any keyword, i.e. the method has - # a splatted keyword parameter of the form **kw_args. - # - # @api public - # @example - # expect(obj).to respond_to(:message).with_any_keywords - # - # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#48 - def with_any_keywords; end - - # Specifies keyword arguments, if any. - # - # @api public - # @example - # expect(obj).to respond_to(:message).with_keywords(:color, :shape) - # @example with an expected number of arguments - # expect(obj).to respond_to(:message).with(3).arguments.and_keywords(:color, :shape) - # - # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#36 - def with_keywords(*keywords); end - - # Specifies that the number of arguments has no upper limit, i.e. the - # method has a splatted parameter of the form *args. - # - # @api public - # @example - # expect(obj).to respond_to(:message).with_unlimited_arguments - # - # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#60 - def with_unlimited_arguments; end - - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#112 - def find_failing_method_names(actual, filter_method); end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#119 - def matches_arity?(actual, name); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#156 - def pp_names; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#130 - def with_arity; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#139 - def with_arity_string; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#143 - def with_keywords_string; end -end - -# @api private -# @private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#161 -class RSpec::Matchers::BuiltIn::RespondTo::ArityCheck - # @api private - # @return [ArityCheck] a new instance of ArityCheck - # - # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#162 - def initialize(expected_arity, expected_keywords, arbitrary_keywords, unlimited_arguments); end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#178 - def matches?(actual, name); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#187 - def method_signature_for(actual, name); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#183 - def verifier_for(actual, name); end -end - -# Provides the implementation for `satisfy`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#7 -class RSpec::Matchers::BuiltIn::Satisfy < ::RSpec::Matchers::BuiltIn::BaseMatcher - # @api private - # @return [Satisfy] a new instance of Satisfy - # - # source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#8 - def initialize(description = T.unsafe(nil), &block); end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#21 - def description; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#27 - def failure_message; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#33 - def failure_message_when_negated; end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#14 - def matches?(actual, &block); end - - private - - # :nocov: - # - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#40 - def block_representation; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#48 - def extract_block_snippet; end -end - -# Base class for specifying a change from and/or to specific values. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#181 -class RSpec::Matchers::BuiltIn::SpecificValuesChange < ::RSpec::Matchers::BuiltIn::BaseMatcher - # @api private - # @return [SpecificValuesChange] a new instance of SpecificValuesChange - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#185 - def initialize(change_details, from, to); end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#197 - def description; end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#202 - def failure_message; end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#192 - def matches?(event_proc); end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#210 - def supports_block_expectations?; end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#215 - def supports_value_expectations?; end - - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#244 - def after_value_failure; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#238 - def before_value_failure; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#255 - def did_change_failure; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#250 - def did_not_change_failure; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#234 - def matches_after?; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#261 - def not_given_a_block_failure; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#221 - def perform_change(event_proc); end -end - -# @api private -# @private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#183 -RSpec::Matchers::BuiltIn::SpecificValuesChange::MATCH_ANYTHING = BasicObject - -# For RSpec 3.1, the base class was named `StartAndEndWith`. For SemVer reasons, -# we still provide this constant until 4.0. -# -# @deprecated Use StartOrEndWith instead. -# @private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#61 -RSpec::Matchers::BuiltIn::StartAndEndWith = RSpec::Matchers::BuiltIn::StartOrEndWith - -# Base class for the `end_with` and `start_with` matchers. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#7 -class RSpec::Matchers::BuiltIn::StartOrEndWith < ::RSpec::Matchers::BuiltIn::BaseMatcher - # @api private - # @return [StartOrEndWith] a new instance of StartOrEndWith - # - # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#8 - def initialize(*expected); end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#27 - def description; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#15 - def failure_message; end - - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#36 - def match(_expected, actual); end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#48 - def subsets_comparable?; end -end - -# Provides the implementation for `start_with`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#66 -class RSpec::Matchers::BuiltIn::StartWith < ::RSpec::Matchers::BuiltIn::StartOrEndWith - private - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#73 - def element_matches?; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#69 - def subset_matches?; end -end - -# Provides the implementation for `throw_symbol`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#7 -class RSpec::Matchers::BuiltIn::ThrowSymbol - include ::RSpec::Matchers::Composable - - # @api private - # @return [ThrowSymbol] a new instance of ThrowSymbol - # - # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#10 - def initialize(expected_symbol = T.unsafe(nil), expected_arg = T.unsafe(nil)); end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#86 - def description; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#68 - def does_not_match?(given_proc); end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#103 - def expects_call_stack_jump?; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#74 - def failure_message; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#80 - def failure_message_when_negated; end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#18 - def matches?(given_proc); end - - # Indicates this matcher matches against a block. - # - # @api private - # @return [True] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#93 - def supports_block_expectations?; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#98 - def supports_value_expectations?; end - - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#109 - def actual_result; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#118 - def caught; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#114 - def expected(symbol_desc = T.unsafe(nil)); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#122 - def throw_description(symbol, arg); end -end - -# Provides the implementation for `yield_control`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#101 -class RSpec::Matchers::BuiltIn::YieldControl < ::RSpec::Matchers::BuiltIn::BaseMatcher - include ::RSpec::Matchers::BuiltIn::CountExpectation - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#111 - def does_not_match?(block); end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#117 - def failure_message; end - - # @api private - # @return [String] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#123 - def failure_message_when_negated; end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#104 - def matches?(block); end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#128 - def supports_block_expectations?; end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#133 - def supports_value_expectations?; end - - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#139 - def failure_reason; end -end - -# Object that is yielded to `expect` when one of the -# yield matchers is used. Provides information about -# the yield behavior of the object-under-test. -# -# @private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#12 -class RSpec::Matchers::BuiltIn::YieldProbe - # @return [YieldProbe] a new instance of YieldProbe - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#21 - def initialize(block, &callback); end - - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#68 - def assert_used!; end - - # :nocov: - # On 1.8.7, `lambda { }.arity` and `lambda { |*a| }.arity` both return -1, - # so we can't distinguish between accepting no args and an arg splat. - # It's OK to skip, this, though; it just provides a nice error message - # when the user forgets to accept an arg in their block. They'll still get - # the `assert_used!` error message from above, which is sufficient. - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#78 - def assert_valid_expect_block!; end - - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#29 - def has_block?; end - - # Returns the value of attribute num_yields. - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#19 - def num_yields; end - - # Sets the attribute num_yields - # - # @param value the value to set the attribute num_yields to. - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#19 - def num_yields=(_arg0); end - - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#33 - def probe; end - - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#53 - def single_yield_args; end - - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#40 - def to_proc; end - - # Returns the value of attribute yielded_args. - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#19 - def yielded_args; end - - # Sets the attribute yielded_args - # - # @param value the value to set the attribute yielded_args to. - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#19 - def yielded_args=(_arg0); end - - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#57 - def yielded_once?(matcher_name); end - - class << self - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#13 - def probe(block, &callback); end - end -end - -# Provides the implementation for `yield_successive_args`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#296 -class RSpec::Matchers::BuiltIn::YieldSuccessiveArgs < ::RSpec::Matchers::BuiltIn::BaseMatcher - # @api private - # @return [YieldSuccessiveArgs] a new instance of YieldSuccessiveArgs - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#297 - def initialize(*args); end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#337 - def description; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#320 - def does_not_match?(block); end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#325 - def failure_message; end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#331 - def failure_message_when_negated; end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#302 - def matches?(block); end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#342 - def supports_block_expectations?; end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#347 - def supports_value_expectations?; end - - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#353 - def expected_arg_description; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#365 - def negative_failure_reason; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#357 - def positive_failure_reason; end -end - -# Provides the implementation for `yield_with_args`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#199 -class RSpec::Matchers::BuiltIn::YieldWithArgs < ::RSpec::Matchers::BuiltIn::BaseMatcher - # @api private - # @return [YieldWithArgs] a new instance of YieldWithArgs - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#200 - def initialize(*args); end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#233 - def description; end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#218 - def does_not_match?(block); end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#223 - def failure_message; end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#228 - def failure_message_when_negated; end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#205 - def matches?(block); end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#240 - def supports_block_expectations?; end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#245 - def supports_value_expectations?; end - - private - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#288 - def all_args_match?; end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#273 - def args_currently_match?; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#257 - def expected_arg_description; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#261 - def negative_failure_reason; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#251 - def positive_failure_reason; end -end - -# Provides the implementation for `yield_with_no_args`. -# Not intended to be instantiated directly. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#149 -class RSpec::Matchers::BuiltIn::YieldWithNoArgs < ::RSpec::Matchers::BuiltIn::BaseMatcher - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#158 - def does_not_match?(block); end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#163 - def failure_message; end - - # @api private - # @private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#168 - def failure_message_when_negated; end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#151 - def matches?(block); end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#173 - def supports_block_expectations?; end - - # @api private - # @private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#178 - def supports_value_expectations?; end - - private - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#190 - def negative_failure_reason; end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#184 - def positive_failure_reason; end -end - -# Mixin designed to support the composable matcher features -# of RSpec 3+. Mix it into your custom matcher classes to -# allow them to be used in a composable fashion. -# -# @api public -# -# source://rspec-expectations//lib/rspec/matchers/composable.rb#10 -module RSpec::Matchers::Composable - # Creates a compound `and` expectation. The matcher will - # only pass if both sub-matchers pass. - # This can be chained together to form an arbitrarily long - # chain of matchers. - # - # @api public - # @example - # expect(alphabet).to start_with("a").and end_with("z") - # expect(alphabet).to start_with("a") & end_with("z") - # @note The negative form (`expect(...).not_to matcher.and other`) - # is not supported at this time. - # - # source://rspec-expectations//lib/rspec/matchers/composable.rb#22 - def &(matcher); end - - # Delegates to `#matches?`. Allows matchers to be used in composable - # fashion and also supports using matchers in case statements. - # - # @api public - # - # source://rspec-expectations//lib/rspec/matchers/composable.rb#45 - def ===(value); end - - # Creates a compound `and` expectation. The matcher will - # only pass if both sub-matchers pass. - # This can be chained together to form an arbitrarily long - # chain of matchers. - # - # @api public - # @example - # expect(alphabet).to start_with("a").and end_with("z") - # expect(alphabet).to start_with("a") & end_with("z") - # @note The negative form (`expect(...).not_to matcher.and other`) - # is not supported at this time. - # - # source://rspec-expectations//lib/rspec/matchers/composable.rb#22 - def and(matcher); end - - # Creates a compound `or` expectation. The matcher will - # pass if either sub-matcher passes. - # This can be chained together to form an arbitrarily long - # chain of matchers. - # - # @api public - # @example - # expect(stoplight.color).to eq("red").or eq("green").or eq("yellow") - # expect(stoplight.color).to eq("red") | eq("green") | eq("yellow") - # @note The negative form (`expect(...).not_to matcher.or other`) - # is not supported at this time. - # - # source://rspec-expectations//lib/rspec/matchers/composable.rb#38 - def or(matcher); end - - # Creates a compound `or` expectation. The matcher will - # pass if either sub-matcher passes. - # This can be chained together to form an arbitrarily long - # chain of matchers. - # - # @api public - # @example - # expect(stoplight.color).to eq("red").or eq("green").or eq("yellow") - # expect(stoplight.color).to eq("red") | eq("green") | eq("yellow") - # @note The negative form (`expect(...).not_to matcher.or other`) - # is not supported at this time. - # - # source://rspec-expectations//lib/rspec/matchers/composable.rb#38 - def |(matcher); end - - private - - # Returns the description of the given object in a way that is - # aware of composed matchers. If the object is a matcher with - # a `description` method, returns the description; otherwise - # returns `object.inspect`. - # - # You are encouraged to use this in your custom matcher's - # `description`, `failure_message` or - # `failure_message_when_negated` implementation if you are - # supporting matcher arguments. - # - # @api public - # - # source://rspec-expectations//lib/rspec/matchers/composable.rb#82 - def description_of(object); end - - # We should enumerate arrays as long as they are not recursive. - # - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/composable.rb#142 - def should_enumerate?(item); end - - # 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. - # - # You are encouraged to use this in your custom matcher's - # `description`, `failure_message` or - # `failure_message_when_negated` implementation if you are - # supporting any arguments which may be a data structure - # containing matchers. - # - # @api public - # - # source://rspec-expectations//lib/rspec/matchers/composable.rb#98 - def surface_descriptions_in(item); end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/composable.rb#147 - def unreadable_io?(object); end - - # This provides a generic way to fuzzy-match an expected value against - # an actual value. It understands nested data structures (e.g. hashes - # and arrays) and is able to match against a matcher being used as - # the expected value or within the expected value at any level of - # nesting. - # - # Within a custom matcher you are encouraged to use this whenever your - # matcher needs to match two values, unless it needs more precise semantics. - # For example, the `eq` matcher _does not_ use this as it is meant to - # use `==` (and only `==`) for matching. - # - # @api public - # @param expected [Object] what is expected - # @param actual [Object] the actual value - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/composable.rb#66 - def values_match?(expected, actual); end - - # Historically, a single matcher instance was only checked - # against a single value. Given that the matcher was only - # used once, it's been common to memoize some intermediate - # calculation that is derived from the `actual` value in - # order to reuse that intermediate result in the failure - # message. - # - # This can cause a problem when using such a matcher as an - # argument to another matcher in a composed matcher expression, - # since the matcher instance may be checked against multiple - # values and produce invalid results due to the memoization. - # - # To deal with this, we clone any matchers in `expected` via - # this method when using `values_match?`, so that any memoization - # does not "leak" between checks. - # - # @api public - # @private - # - # source://rspec-expectations//lib/rspec/matchers/composable.rb#128 - def with_matchers_cloned(object); end - - class << self - # We should enumerate arrays as long as they are not recursive. - # - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/composable.rb#142 - def should_enumerate?(item); end - - # 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. - # - # You are encouraged to use this in your custom matcher's - # `description`, `failure_message` or - # `failure_message_when_negated` implementation if you are - # supporting any arguments which may be a data structure - # containing matchers. - # - # @api public - # - # source://rspec-expectations//lib/rspec/matchers/composable.rb#98 - def surface_descriptions_in(item); end - - # @api private - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/composable.rb#147 - def unreadable_io?(object); end - end -end - -# Wraps an item in order to surface its `description` via `inspect`. -# -# @api private -# -# source://rspec-expectations//lib/rspec/matchers/composable.rb#158 -class RSpec::Matchers::Composable::DescribableItem < ::Struct - # Inspectable version of the item description - # - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/composable.rb#160 - def inspect; end - - # Returns the value of attribute item - # - # @return [Object] the current value of item - def item; end - - # Sets the attribute item - # - # @param value [Object] the value to set the attribute item to. - # @return [Object] the newly set value - def item=(_); end - - # A pretty printed version of the item description. - # - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/composable.rb#165 - def pretty_print(pp); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# Defines the custom matcher DSL. -# -# source://rspec-expectations//lib/rspec/matchers/dsl.rb#6 -module RSpec::Matchers::DSL - # 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. - # - # @example - # RSpec::Matchers.alias_matcher :a_list_sorted_by, :be_sorted_by do |description| - # description.sub("be sorted by", "a list sorted by") - # end - # - # be_sorted_by(:age).description # => "be sorted by age" - # a_list_sorted_by(:age).description # => "a list sorted by age" - # @example - # RSpec::Matchers.alias_matcher :a_list_that_sums_to, :sum_to - # sum_to(3).description # => "sum to 3" - # a_list_that_sums_to(3).description # => "a list that sums to 3" - # @option options - # @param old_name [Symbol] the original name for the matcher - # @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 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#32 - def alias_matcher(new_name, old_name, options = T.unsafe(nil), &description_override); end - - # Defines a custom matcher. - # - # @param name [Symbol] the name for the matcher - # @see RSpec::Matchers - # @yield [Object] block that is used to define the matcher. - # The block is evaluated in the context of your custom matcher class. - # 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#73 - def define(name, &declarations); end - - # Defines a negated matcher. The returned matcher's `description` and `failure_message` - # 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 - # RSpec::Matchers.define_negated_matcher :exclude, :include - # include(1, 2).description # => "include 1 and 2" - # exclude(1, 2).description # => "exclude 1 and 2" - # @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 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#61 - def define_negated_matcher(negated_name, base_name, &description_override); end - - # Defines a custom matcher. - # - # @param name [Symbol] the name for the matcher - # @see RSpec::Matchers - # @yield [Object] block that is used to define the matcher. - # The block is evaluated in the context of your custom matcher class. - # 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#73 - def matcher(name, &declarations); end - - private - - # :nocov: - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#84 - def warn_about_block_args(name, declarations); end -end - -# Defines default implementations of the matcher -# protocol methods for custom matchers. You can -# 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#385 -module RSpec::Matchers::DSL::DefaultImplementations - include ::RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages - - # The default description. - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#395 - def description; end - - # Used internally by objects returns by `should` and `should_not`. - # - # @api private - # @return [Boolean] - # - # 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#412 - def expects_call_stack_jump?; end - - # Matchers do not support block expectations by default. You - # must opt-in. - # - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#403 - def supports_block_expectations?; end - - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#407 - def supports_value_expectations?; end - - private - - # 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#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 - # return self in order to chain methods together. `chain` handles that - # for you. If the method is invoked and the - # `include_chain_clauses_in_custom_matcher_descriptions` config option - # hash been enabled, the chained method name and args will be added to the - # default description and failure message. - # - # In the common case where you just want the chained method to store some - # value(s) for later use (e.g. in `match`), you can provide one or more - # attribute names instead of a block; the chained method will store its - # arguments in instance variables with those names, and the values will - # be exposed via getters. - # - # @example - # - # RSpec::Matchers.define :have_errors_on do |key| - # chain :with do |message| - # @message = message - # end - # - # match do |actual| - # actual.errors[key] == @message - # end - # end - # - # expect(minor).to have_errors_on(:age).with("Not old enough to participate") - # - # 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 - # the description generated by default doesn't suit your needs. - # - # @example - # - # RSpec::Matchers.define :qualify_for do |expected| - # match { your_match_logic } - # - # description do - # "qualify for #{expected}" - # end - # end - # @yield [Object] actual the actual object (i.e. the value wrapped by `expect`) - # - # 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#259 - def diffable; end - - # 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. - # - # @example - # - # RSpec::Matchers.define :have_strength do |expected| - # match { your_match_logic } - # - # failure_message do |actual| - # "Expected strength of #{expected}, but had #{actual.strength}" - # end - # end - # @yield [Object] actual the actual object (i.e. the value wrapped by `expect`) - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#216 - def failure_message(&definition); end - - # 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. - # - # @example - # - # RSpec::Matchers.define :have_strength do |expected| - # match { your_match_logic } - # - # failure_message_when_negated do |actual| - # "Expected not to have strength of #{expected}, but did" - # end - # end - # @yield [Object] actual the actual object (i.e. the value wrapped by `expect`) - # - # 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 - # or fails. The block should return a boolean value. When the matcher is - # passed to `expect(...).to` and the block returns `true`, then the expectation - # passes. Similarly, when the matcher is passed to `expect(...).not_to` and the - # block returns `false`, then the expectation passes. - # - # By default the match block will swallow expectation errors (e.g. - # caused by using an expectation such as `expect(1).to eq 2`), if you - # wish to allow these to bubble up, pass in the option - # `:notify_expectation_failures => true`. - # - # @example - # - # RSpec::Matchers.define :be_even do - # match do |actual| - # actual.even? - # end - # end - # - # expect(4).to be_even # passes - # expect(3).not_to be_even # passes - # expect(3).to be_even # fails - # expect(4).not_to be_even # fails - # @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#131 - def match(options = T.unsafe(nil), &match_block); end - - # Use this instead of `match` when the block will raise an exception - # rather than returning false to indicate a failure. - # - # @example - # - # RSpec::Matchers.define :accept_as_valid do |candidate_address| - # match_unless_raises ValidationException do |validator| - # validator.validate(candidate_address) - # end - # end - # - # 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#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`) - # when the positive and negative forms require different handling. This - # is rarely necessary, but can be helpful, for example, when specifying - # asynchronous processes that require different timeouts. - # - # By default the match block will swallow expectation errors (e.g. - # caused by using an expectation such as `expect(1).to eq 2`), if you - # wish to allow these to bubble up, pass in the option - # `:notify_expectation_failures => true`. - # - # @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#160 - def match_when_negated(options = T.unsafe(nil), &match_block); end - - # Declares that the matcher can be used in a block expectation. - # Users will not be able to use your matcher in a block - # expectation without declaring this. - # (e.g. `expect { do_something }.to matcher`). - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#267 - def supports_block_expectations; end - - private - - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#312 - def assign_attributes(attr_names); end - - # Does the following: - # - # - 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 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` - # as an arg, but only if their block's arity can handle it. - # - # This compiles the user block into an actual method, allowing - # them to use normal method constructs like `return` - # (e.g. for an early guard statement), while allowing us to define - # an override that can provide the wrapped handling - # (e.g. assigning `@actual`, rescueing errors, etc) and - # can `super` to the user's definition. - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#346 - def define_user_override(method_name, user_def, &our_def); end -end - -# Defines deprecated macro methods from RSpec 2 for backwards compatibility. -# -# @deprecated Use the methods from {Macros} instead. -# -# 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#368 - def failure_message_for_should(&definition); end - - # @deprecated Use {Macros#failure_message_when_negated} instead. - # - # 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#356 - def match_for_should(&definition); end - - # @deprecated Use {Macros#match_when_negated} instead. - # - # 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#146 -RSpec::Matchers::DSL::Macros::RAISE_NOTIFIER = T.let(T.unsafe(nil), Proc) - -# The class used for custom matchers. The block passed to -# `RSpec::Matchers.define` will be evaluated in the context -# 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#433 -class RSpec::Matchers::DSL::Matcher - include ::RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages - include ::RSpec::Matchers::DSL::DefaultImplementations - include ::RSpec::Matchers - include ::RSpec::Matchers::Composable - extend ::RSpec::Matchers::DSL::Macros - extend ::RSpec::Matchers::DSL::Macros::Deprecated - - # @api private - # @return [Matcher] a new instance of Matcher - # - # 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#449 - def actual; end - - # The block parameter used in the expectation - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#456 - def block_arg; end - - # Provides the expected value. This will return an array if - # multiple arguments were passed to the matcher; otherwise it - # will return a single value. - # - # @see #expected_as_array - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#482 - def expected; end - - # Returns the expected value as an an array. This exists primarily - # to aid in upgrading from RSpec 2.x, since in RSpec 2, `expected` - # always returned an array. - # - # @see #expected - # - # 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#499 - def inspect; end - - # The name of the matcher. - # - # 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#453 - def rescued_exception; end - - private - - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#522 - def actual_arg_for(block); end - - # Takes care of forwarding unhandled messages to the - # `@matcher_execution_context` (typically the current - # running `RSpec::Core::Example`). This is needed by - # rspec-rails so that it can define matchers that wrap - # Rails' test helper methods, but it's also a useful - # feature in its own right. - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#532 - def method_missing(method, *args, **_arg2, &block); end - - # Indicates that this matcher responds to messages - # from the `@matcher_execution_context` as well. - # Also, supports getting a method object for such methods. - # - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#507 - def respond_to_missing?(method, include_private = T.unsafe(nil)); end -end - -# source://rspec-expectations//lib/rspec/matchers.rb#959 -RSpec::Matchers::DYNAMIC_MATCHER_REGEX = T.let(T.unsafe(nil), Regexp) - -# Facilitates converting ruby objects to English phrases. -# -# source://rspec-expectations//lib/rspec/matchers/english_phrasing.rb#4 -module RSpec::Matchers::EnglishPhrasing - class << self - # when given an empty list. - # - # Converts an object (often a collection of objects) - # into an English list. - # - # list(['banana', 'kiwi', 'mango']) - # #=> " \"banana\", \"kiwi\", and \"mango\"" - # - # Given an empty collection, returns the empty string. - # - # list([]) #=> "" - # - # @note The returned string has a leading space except - # - # source://rspec-expectations//lib/rspec/matchers/english_phrasing.rb#26 - def list(obj); end - - # Converts a symbol into an English expression. - # - # split_words(:banana_creme_pie) #=> "banana creme pie" - # - # source://rspec-expectations//lib/rspec/matchers/english_phrasing.rb#9 - def split_words(sym); end - end -end - -# 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/multi_matcher_diff.rb#6 -class RSpec::Matchers::MultiMatcherDiff - # @api private - # @return [MultiMatcherDiff] a new instance of MultiMatcherDiff - # - # 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 - # factory and actual value if there are any - # - # @api private - # @param message [String] original failure message - # @param differ [Proc] - # @return [String] - # - # 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/multi_matcher_diff.rb#68 - def diffs(differ); end - - class << self - # Wraps provided matcher list in instance of - # MultiMatcherDiff. - # - # @api private - # @param matchers [Array] list of matchers to wrap - # @return [RSpec::Matchers::MultiMatcherDiff] - # - # source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#37 - def for_many_matchers(matchers); end - - # Wraps provided expected value in instance of - # MultiMatcherDiff. If provided value is already an - # MultiMatcherDiff then it just returns it. - # - # @api private - # @param expected [Any] value to be wrapped - # @param actual [Any] value - # @return [RSpec::Matchers::MultiMatcherDiff] - # - # 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/multi_matcher_diff.rb#58 - def diff_label_for(matcher); end - - # @api private - # - # source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#62 - def truncated(description); end - end -end - -# Default diff label when there is only one matcher in diff -# output -# -# @api private -# @private -# -# 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/multi_matcher_diff.rb#14 -RSpec::Matchers::MultiMatcherDiff::DESCRIPTION_MAX_LENGTH = T.let(T.unsafe(nil), Integer) diff --git a/sorbet/rbi/gems/rspec-expectations@3.13.5.rbi b/sorbet/rbi/gems/rspec-expectations@3.13.5.rbi new file mode 100644 index 0000000..6a72619 --- /dev/null +++ b/sorbet/rbi/gems/rspec-expectations@3.13.5.rbi @@ -0,0 +1,6064 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rspec-expectations` gem. +# Please instead update this file by running `bin/tapioca gem rspec-expectations`. + + +# RSpec's top level namespace. All of rspec-expectations is contained +# in the `RSpec::Expectations` and `RSpec::Matchers` namespaces. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/english_phrasing.rb:1 +module RSpec; end + +# RSpec::Expectations provides a simple, readable API to express +# the expected outcomes in a code example. To express an expected +# outcome, wrap an object or block in `expect`, call `to` or `to_not` +# (aliased as `not_to`) and pass it a matcher object: +# +# expect(order.total).to eq(Money.new(5.55, :USD)) +# expect(list).to include(user) +# expect(message).not_to match(/foo/) +# expect { do_something }.to raise_error +# +# The last form (the block form) is needed to match against ruby constructs +# that are not objects, but can only be observed when executing a block +# of code. This includes raising errors, throwing symbols, yielding, +# and changing values. +# +# When `expect(...).to` is invoked with a matcher, it turns around +# and calls `matcher.matches?()`. For example, +# in the expression: +# +# expect(order.total).to eq(Money.new(5.55, :USD)) +# +# ...`eq(Money.new(5.55, :USD))` returns a matcher object, and it results +# in the equivalent of `eq.matches?(order.total)`. If `matches?` returns +# `true`, the expectation is met and execution continues. If `false`, then +# the spec fails with the message returned by `eq.failure_message`. +# +# Given the expression: +# +# expect(order.entries).not_to include(entry) +# +# ...the `not_to` method (also available as `to_not`) invokes the equivalent of +# `include.matches?(order.entries)`, but it interprets `false` as success, and +# `true` as a failure, using the message generated by +# `include.failure_message_when_negated`. +# +# rspec-expectations ships with a standard set of useful matchers, and writing +# your own matchers is quite simple. +# +# See [RSpec::Matchers](../RSpec/Matchers) for more information about the +# built-in matchers that ship with rspec-expectations, and how to write your +# own custom matchers. +# +# pkg:gem/rspec-expectations#lib/rspec/expectations/expectation_target.rb:2 +module RSpec::Expectations + class << self + # The configuration object. + # @return [RSpec::Expectations::Configuration] the configuration object + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/configuration.rb:237 + def configuration; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/fail_with.rb:13 + def differ; end + + # Raises an RSpec::Expectations::ExpectationNotMetError with message. + # @param [String] message + # @param [Object] expected + # @param [Object] actual + # + # Adds a diff to the failure message when `expected` and `actual` are + # both present. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/fail_with.rb:27 + def fail_with(message, expected = T.unsafe(nil), actual = T.unsafe(nil)); end + end +end + +# @private +# Validates the provided matcher to ensure it supports block +# expectations, in order to avoid user confusion when they +# use a block thinking the expectation will be on the return +# value of the block rather than the block itself. +# +# pkg:gem/rspec-expectations#lib/rspec/expectations/expectation_target.rb:136 +class RSpec::Expectations::BlockExpectationTarget < ::RSpec::Expectations::ExpectationTarget + # pkg:gem/rspec-expectations#lib/rspec/expectations/expectation_target.rb:142 + def not_to(matcher, message = T.unsafe(nil), &block); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/expectation_target.rb:137 + def to(matcher, message = T.unsafe(nil), &block); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/expectation_target.rb:146 + def to_not(matcher, message = T.unsafe(nil), &block); end + + private + + # pkg:gem/rspec-expectations#lib/rspec/expectations/expectation_target.rb:150 + def enforce_block_expectation(matcher); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/expectation_target.rb:158 + def supports_block_expectations?(matcher); end +end + +# @private +# +# pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:4 +class RSpec::Expectations::BlockSnippetExtractor + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:17 + def initialize(proc, method_name); end + + # Ideally we should properly handle indentations of multiline snippet, + # but it's not implemented yet since because we use result of this method only when it's a + # single line and implementing the logic introduces additional complexity. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:25 + def body_content_lines; end + + # rubocop should properly handle `Struct.new {}` as an inner class definition. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:7 + def method_name; end + + # rubocop should properly handle `Struct.new {}` as an inner class definition. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:7 + def proc; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:62 + def beginning_line_number; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:39 + def block_token_extractor; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:58 + def file_path; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:31 + def raw_body_lines; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:35 + def raw_body_snippet; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:44 + def source; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:66 + def source_location; end + + class << self + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:9 + def try_extracting_single_line_body_of(proc, method_name); end + end +end + +# pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:72 +class RSpec::Expectations::BlockSnippetExtractor::AmbiguousTargetError < ::RSpec::Expectations::BlockSnippetExtractor::Error; end + +# @private +# Locates target block with node information (semantics), which tokens don't have. +# +# pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:200 +class RSpec::Expectations::BlockSnippetExtractor::BlockLocator < ::Struct + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:200 + def beginning_line_number; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:200 + def beginning_line_number=(_); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:205 + def body_content_locations; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:201 + def method_call_location; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:200 + def method_name; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:200 + def method_name=(_); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:200 + def source; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:200 + def source=(_); end + + private + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:218 + def block_body_node; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:223 + def block_wrapper_node; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:234 + def candidate_block_wrapper_nodes; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:243 + def candidate_method_ident_nodes; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:211 + def method_ident_node; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:249 + def method_ident_node?(node); end + + class << self + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:200 + def [](*_arg0); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:200 + def inspect; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:200 + def keyword_init?; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:200 + def members; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:200 + def new(*_arg0); end + end +end + +# @private +# Performs extraction of block body snippet using tokens, +# which cannot be done with node information. +# +# pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:77 +class RSpec::Expectations::BlockSnippetExtractor::BlockTokenExtractor < ::Struct + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:80 + def initialize(*); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:77 + def beginning_line_number; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:77 + def beginning_line_number=(_); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:78 + def body_tokens; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:77 + def method_name; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:77 + def method_name=(_); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:77 + def source; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:77 + def source=(_); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:78 + def state; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:126 + def after_beginning_of_args_state(token); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:130 + def after_beginning_of_body_state(token); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:109 + def after_method_call_state(token); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:113 + def after_opener_state(token); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:193 + def block_locator; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:187 + def correct_block?(body_tokens); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:143 + def finalize_pending_tokens!; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:97 + def finish!; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:149 + def finish_or_find_next_block_if_incorrect!; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:170 + def handle_closer_token(token); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:160 + def handle_opener_token(token); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:105 + def initial_state(token); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:101 + def invoke_state_handler(token); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:166 + def opener_token?(token); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:179 + def opener_token_stack; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:87 + def parse!; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:139 + def pending_tokens; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:183 + def pipe_token?(token); end + + class << self + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:77 + def [](*_arg0); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:77 + def inspect; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:77 + def keyword_init?; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:77 + def members; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:77 + def new(*_arg0); end + end +end + +# pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:70 +class RSpec::Expectations::BlockSnippetExtractor::Error < ::StandardError; end + +# pkg:gem/rspec-expectations#lib/rspec/expectations/block_snippet_extractor.rb:71 +class RSpec::Expectations::BlockSnippetExtractor::TargetNotFoundError < ::RSpec::Expectations::BlockSnippetExtractor::Error; end + +# Provides configuration options for rspec-expectations. +# If you are using rspec-core, you can access this via a +# block passed to `RSpec::Core::Configuration#expect_with`. +# Otherwise, you can access it via RSpec::Expectations.configuration. +# +# @example +# RSpec.configure do |rspec| +# rspec.expect_with :rspec do |c| +# # c is the config object +# end +# end +# +# # or +# +# RSpec::Expectations.configuration +# +# pkg:gem/rspec-expectations#lib/rspec/expectations/configuration.rb:20 +class RSpec::Expectations::Configuration + # pkg:gem/rspec-expectations#lib/rspec/expectations/configuration.rb:29 + def initialize; end + + # :nocov: Because this is only really _useful_ on 1.8, and hard to test elsewhere. + # + # Adds `should` and `should_not` to the given classes + # or modules. This can be used to ensure `should` works + # properly on things like proxy objects (particular + # `Delegator`-subclassed objects on 1.8). + # + # @param [Array] modules the list of classes or modules + # to add `should` and `should_not` to. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/configuration.rb:116 + def add_should_and_should_not_to(*modules); end + + # Sets or gets the backtrace formatter. The backtrace formatter should + # implement `#format_backtrace(Array)`. This is used + # to format backtraces of errors handled by the `raise_error` + # matcher. + # + # If you are using rspec-core, rspec-core's backtrace formatting + # will be used (including respecting the presence or absence of + # the `--backtrace` option). + # + # @!attribute [rw] backtrace_formatter + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/configuration.rb:134 + def backtrace_formatter; end + + # Sets or gets the backtrace formatter. The backtrace formatter should + # implement `#format_backtrace(Array)`. This is used + # to format backtraces of errors handled by the `raise_error` + # matcher. + # + # If you are using rspec-core, rspec-core's backtrace formatting + # will be used (including respecting the presence or absence of + # the `--backtrace` option). + # + # @!attribute [rw] backtrace_formatter + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/configuration.rb:133 + def backtrace_formatter=(_arg0); end + + # Indicates whether or not diffs should be colored. + # Delegates to rspec-core's color option if rspec-core + # is loaded; otherwise you can set it here. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/configuration.rb:88 + def color?; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/configuration.rb:230 + def false_positives_handler; end + + # Sets if custom matcher descriptions and failure messages + # should include clauses from methods defined using `chain`. + # @param value [Boolean] + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/configuration.rb:145 + def include_chain_clauses_in_custom_matcher_descriptions=(_arg0); end + + # Indicates whether or not custom matcher descriptions and failure messages + # should include clauses from methods defined using `chain`. It is + # false by default for backwards compatibility. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/configuration.rb:150 + def include_chain_clauses_in_custom_matcher_descriptions?; end + + # Configures the maximum character length that RSpec will print while + # formatting an object. You can set length to nil to prevent RSpec from + # doing truncation. + # @param [Fixnum] length the number of characters to limit the formatted output to. + # @example + # RSpec.configure do |rspec| + # rspec.expect_with :rspec do |c| + # c.max_formatted_output_length = 200 + # end + # end + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/configuration.rb:70 + def max_formatted_output_length=(length); end + + # Configures what RSpec will do about matcher use which would potentially cause + # false positives in tests. Defaults to `:warn` since this is generally the desired behavior, + # but can also be set to `:raise` or `:nothing`. + # + # @overload on_potential_false_positives + # @return [Symbol] the behavior setting + # @overload on_potential_false_positives=(value) + # @param [Symbol] behavior can be set to `:warn`, `:raise` or `:nothing` + # @return [Symbol] the behavior setting + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/configuration.rb:192 + def on_potential_false_positives; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/configuration.rb:194 + def on_potential_false_positives=(behavior); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/configuration.rb:155 + def reset_syntaxes_to_default; end + + # Configures RSpec to check predicate matchers to `be(true)` / `be(false)` (strict), + # or `be_truthy` / `be_falsey` (not strict). + # Historically, the default was `false`, but `true` is recommended. + # + # @overload strict_predicate_matchers + # @return [Boolean] + # @overload strict_predicate_matchers? + # @return [Boolean] + # @overload strict_predicate_matchers=(value) + # @param [Boolean] value + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/configuration.rb:211 + def strict_predicate_matchers; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/configuration.rb:213 + def strict_predicate_matchers=(value); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/configuration.rb:218 + def strict_predicate_matchers?; end + + # The list of configured syntaxes. + # @return [Array] the list of configured syntaxes. + # @example + # unless RSpec::Matchers.configuration.syntax.include?(:expect) + # raise "this RSpec extension gem requires the rspec-expectations `:expect` syntax" + # end + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/configuration.rb:80 + def syntax; end + + # Configures the supported syntax. + # @param [Array, Symbol] values the syntaxes to enable + # @example + # RSpec.configure do |rspec| + # rspec.expect_with :rspec do |c| + # c.syntax = :should + # # or + # c.syntax = :expect + # # or + # c.syntax = [:should, :expect] + # end + # end + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/configuration.rb:46 + def syntax=(values); end + + # Configures whether RSpec will warn about matcher use which will + # potentially cause false positives in tests. + # + # @param [Boolean] boolean + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/configuration.rb:173 + def warn_about_potential_false_positives=(boolean); end + + # Indicates whether RSpec will warn about matcher use which will + # potentially cause false positives in tests, generally you want to + # avoid such scenarios so this defaults to `true`. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/configuration.rb:225 + def warn_about_potential_false_positives?; end +end + +# @private +# +# pkg:gem/rspec-expectations#lib/rspec/expectations/configuration.rb:22 +RSpec::Expectations::Configuration::FALSE_POSITIVE_BEHAVIOURS = T.let(T.unsafe(nil), Hash) + +# @api private +# Null implementation of a backtrace formatter used by default +# when rspec-core is not loaded. Does no filtering. +# +# pkg:gem/rspec-expectations#lib/rspec/expectations/configuration.rb:163 +module RSpec::Expectations::Configuration::NullBacktraceFormatter + class << self + # pkg:gem/rspec-expectations#lib/rspec/expectations/configuration.rb:164 + def format_backtrace(backtrace); end + end +end + +# @private +# +# pkg:gem/rspec-expectations#lib/rspec/expectations/handler.rb:4 +module RSpec::Expectations::ExpectationHelper + class << self + # pkg:gem/rspec-expectations#lib/rspec/expectations/handler.rb:5 + def check_message(msg); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/handler.rb:32 + def handle_failure(matcher, message, failure_message_method); end + + # Returns an RSpec-3+ compatible matcher, wrapping a legacy one + # in an adapter if necessary. + # + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/handler.rb:18 + def modern_matcher_from(matcher); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/handler.rb:23 + def with_matcher(handler, matcher, message); end + end +end + +# Exception raised when an expectation fails. +# +# @note We subclass Exception so that in a stub implementation if +# the user sets an expectation, it can't be caught in their +# code by a bare `rescue`. +# @api public +# +# pkg:gem/rspec-expectations#lib/rspec/expectations.rb:67 +class RSpec::Expectations::ExpectationNotMetError < ::Exception; end + +# Wraps the target of an expectation. +# +# @example +# expect(something) # => ExpectationTarget wrapping something +# expect { do_something } # => ExpectationTarget wrapping the block +# +# # used with `to` +# expect(actual).to eq(3) +# +# # with `not_to` +# expect(actual).not_to eq(3) +# +# @note `ExpectationTarget` is not intended to be instantiated +# directly by users. Use `expect` instead. +# +# pkg:gem/rspec-expectations#lib/rspec/expectations/expectation_target.rb:17 +class RSpec::Expectations::ExpectationTarget + include ::RSpec::Expectations::ExpectationTarget::InstanceMethods + + # @api private + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/expectation_target.rb:31 + def initialize(value); end + + # @note this name aligns with `Minitest::Expectation` so that our + # {InstanceMethods} module can be included in that class when + # used in a Minitest context. + # @return [Object] the target of the expectation + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/expectation_target.rb:28 + def target; end + + class << self + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/expectation_target.rb:36 + def for(value, block); end + end +end + +# Defines instance {ExpectationTarget} instance methods. These are defined +# in a module so we can include it in `Minitest::Expectation` when +# `rspec/expectations/minitest_integration` is loaded in order to +# support usage with Minitest. +# +# pkg:gem/rspec-expectations#lib/rspec/expectations/expectation_target.rb:53 +module RSpec::Expectations::ExpectationTarget::InstanceMethods + # Runs the given expectation, passing if `matcher` returns false. + # @example + # expect(value).not_to eq(5) + # @param [Matcher] + # matcher + # @param [String, Proc] message optional message to display when the expectation fails + # @return [Boolean] false if the negative expectation succeeds (else raises) + # @see RSpec::Matchers + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/expectation_target.rb:76 + def not_to(matcher = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # Runs the given expectation, passing if `matcher` returns true. + # @example + # expect(value).to eq(5) + # expect { perform }.to raise_error + # @param [Matcher] + # matcher + # @param [String, Proc] message optional message to display when the expectation fails + # @return [Boolean] true if the expectation succeeds (else raises) + # @see RSpec::Matchers + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/expectation_target.rb:63 + def to(matcher = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/expectation_target.rb:80 + def to_not(matcher = T.unsafe(nil), message = T.unsafe(nil), &block); end + + private + + # pkg:gem/rspec-expectations#lib/rspec/expectations/expectation_target.rb:84 + def prevent_operator_matchers(verb); end +end + +# @private +# Used as a sentinel value to be able to tell when the user +# did not pass an argument. We can't use `nil` for that because +# `nil` is a valid value to pass. +# +# pkg:gem/rspec-expectations#lib/rspec/expectations/expectation_target.rb:22 +module RSpec::Expectations::ExpectationTarget::UndefinedValue; end + +# @private +# +# pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:4 +class RSpec::Expectations::FailureAggregator + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:97 + def initialize(block_label, metadata); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:27 + def aggregate; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:5 + def block_label; end + + # This method is defined to satisfy the callable interface + # expected by `RSpec::Support.with_failure_notifier`. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:64 + def call(failure, options); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:54 + def failures; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:5 + def metadata; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:58 + def other_errors; end + + private + + # On JRuby 9.1.x.x and before, `caller` and `raise` produce different backtraces with + # regards to `.java` stack frames. It's important that we use `raise` for JRuby to produce + # a backtrace that has a continuous common section with the raised `MultipleExpectationsNotMetError`, + # so that rspec-core's truncation logic can work properly on it to list the backtrace + # relative to the `aggregate_failures` block. + # :nocov: + # Using `caller` performs better (and is simpler) than `raise` on most Rubies. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:92 + def assign_backtrace(failure); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:103 + def notify_aggregated_failures; end +end + +# pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:25 +RSpec::Expectations::FailureAggregator::AGGREGATED_FAILURE = T.let(T.unsafe(nil), RSpec::Expectations::FailureAggregator::AggregatedFailure) + +# @private +# +# pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:8 +class RSpec::Expectations::FailureAggregator::AggregatedFailure + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:19 + def inspect; end +end + +# :nocov: +# `inspect` was apparently used by some versions early in ruby 3 while constructing +# NoMethodError, but seems to be no longer. +# +# @private +# +# pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:14 +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. +# @deprecated Use LegacyMatcherAdapter instead. +# @private +# +# pkg:gem/rspec-expectations#lib/rspec/expectations/handler.rb:179 +RSpec::Expectations::LegacyMacherAdapter = RSpec::Expectations::LegacyMatcherAdapter + +# Wraps a matcher written against one of the legacy protocols in +# order to present the current protocol. +# +# @private +# +# pkg:gem/rspec-expectations#lib/rspec/expectations/handler.rb:112 +class RSpec::Expectations::LegacyMatcherAdapter < ::RSpec::Matchers::MatcherDelegator + # pkg:gem/rspec-expectations#lib/rspec/expectations/handler.rb:113 + def initialize(matcher); end + + class << self + # pkg:gem/rspec-expectations#lib/rspec/expectations/handler.rb:123 + def wrap(matcher); end + end +end + +# Before RSpec 1.2, the failure message protocol was: +# * `failure_message` +# * `negative_failure_message` +# @private +# +# pkg:gem/rspec-expectations#lib/rspec/expectations/handler.rb:156 +class RSpec::Expectations::LegacyMatcherAdapter::RSpec1 < ::RSpec::Expectations::LegacyMatcherAdapter + # pkg:gem/rspec-expectations#lib/rspec/expectations/handler.rb:157 + def failure_message; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/handler.rb:161 + def failure_message_when_negated; end + + class << self + # Note: `failure_message` is part of the RSpec 3 protocol + # (paired with `failure_message_when_negated`), so we don't check + # for `failure_message` here. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/handler.rb:168 + def interface_matches?(matcher); end + end +end + +# Starting in RSpec 1.2 (and continuing through all 2.x releases), +# the failure message protocol was: +# * `failure_message_for_should` +# * `failure_message_for_should_not` +# @private +# +# pkg:gem/rspec-expectations#lib/rspec/expectations/handler.rb:132 +class RSpec::Expectations::LegacyMatcherAdapter::RSpec2 < ::RSpec::Expectations::LegacyMatcherAdapter + # pkg:gem/rspec-expectations#lib/rspec/expectations/handler.rb:133 + def failure_message; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/handler.rb:137 + def failure_message_when_negated; end + + class << self + # pkg:gem/rspec-expectations#lib/rspec/expectations/handler.rb:141 + def interface_matches?(matcher); end + end +end + +# Exception raised from `aggregate_failures` when multiple expectations fail. +# +# @note The constant is defined here but the extensive logic of this class +# is lazily defined when `FailureAggregator` is autoloaded, since we do +# not need to waste time defining that functionality unless +# `aggregate_failures` is used. +# Exception raised from `aggregate_failures` when multiple expectations fail. +# +# pkg:gem/rspec-expectations#lib/rspec/expectations.rb:76 +class RSpec::Expectations::MultipleExpectationsNotMetError < ::RSpec::Expectations::ExpectationNotMetError + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:160 + def initialize(failure_aggregator); end + + # @return [String] The user-assigned label for the aggregation block. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:135 + def aggregation_block_label; end + + # @return [Hash] The metadata hash passed to `aggregate_failures`. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:140 + def aggregation_metadata; end + + # @return [Array] The list of expectation failures and other exceptions, combined. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:132 + def all_exceptions; end + + # return [String] A description of the failure/error counts. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:151 + def exception_count_description; end + + # @return [Array] The list of expectation failures. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:122 + def failures; end + + # @return [String] The fully formatted exception message. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:117 + def message; end + + # @return [Array] The list of other exceptions. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:127 + def other_errors; end + + # @return [String] A summary of the failure, including the block label and a count of failures. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:145 + def summary; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:192 + def backtrace_line(line); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:165 + def block_description; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:174 + def enumerated(exceptions, index_offset); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:204 + def enumerated_errors; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:200 + def enumerated_failures; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:182 + def exclusion_patterns; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:188 + def format_backtrace(backtrace); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:219 + def indentation; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:210 + def indented(failure_message, index); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:231 + def index_label(index); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:223 + def longest_index_label_width; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:170 + def pluralize(noun, count); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/failure_aggregator.rb:227 + def width_of_label(index); end +end + +# @private +# +# pkg:gem/rspec-expectations#lib/rspec/expectations/handler.rb:73 +class RSpec::Expectations::NegativeExpectationHandler + class << self + # pkg:gem/rspec-expectations#lib/rspec/expectations/handler.rb:87 + def does_not_match?(matcher, actual, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/handler.rb:74 + def handle_matcher(actual, initial_matcher, custom_message = T.unsafe(nil), &block); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/handler.rb:103 + def opposite_should_method; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/handler.rb:99 + def should_method; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/handler.rb:95 + def verb; end + end +end + +# @private +# +# pkg:gem/rspec-expectations#lib/rspec/expectations/handler.rb:45 +class RSpec::Expectations::PositiveExpectationHandler + class << self + # pkg:gem/rspec-expectations#lib/rspec/expectations/handler.rb:46 + def handle_matcher(actual, initial_matcher, custom_message = T.unsafe(nil), &block); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/handler.rb:67 + def opposite_should_method; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/handler.rb:63 + def should_method; end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/handler.rb:59 + def verb; end + end +end + +# @api private +# Provides methods for enabling and disabling the available +# syntaxes provided by rspec-expectations. +# +# pkg:gem/rspec-expectations#lib/rspec/expectations/syntax.rb:6 +module RSpec::Expectations::Syntax + private + + # @api private + # Determines where we add `should` and `should_not`. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/syntax.rb:11 + def default_should_host; end + + # @api private + # Disables the `expect` syntax. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/syntax.rb:80 + def disable_expect(syntax_host = T.unsafe(nil)); end + + # @api private + # Disables the `should` syntax. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/syntax.rb:57 + def disable_should(syntax_host = T.unsafe(nil)); end + + # @api private + # Enables the `expect` syntax. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/syntax.rb:68 + def enable_expect(syntax_host = T.unsafe(nil)); end + + # @api private + # Enables the `should` syntax. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/syntax.rb:38 + def enable_should(syntax_host = T.unsafe(nil)); end + + # @api private + # Indicates whether or not the `expect` syntax is enabled. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/syntax.rb:96 + def expect_enabled?(syntax_host = T.unsafe(nil)); end + + # @api private + # Indicates whether or not the `should` syntax is enabled. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/syntax.rb:90 + def should_enabled?(syntax_host = T.unsafe(nil)); end + + # @api private + # Instructs rspec-expectations to warn on first usage of `should` or `should_not`. + # Enabled by default. This is largely here to facilitate testing. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/syntax.rb:18 + def warn_about_should!; end + + # @api private + # Generates a deprecation warning for the given method if no warning + # has already been issued. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/syntax.rb:25 + def warn_about_should_unless_configured(method_name); end + + class << self + # @api private + # Determines where we add `should` and `should_not`. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/syntax.rb:11 + def default_should_host; end + + # @api private + # Disables the `expect` syntax. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/syntax.rb:80 + def disable_expect(syntax_host = T.unsafe(nil)); end + + # @api private + # Disables the `should` syntax. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/syntax.rb:57 + def disable_should(syntax_host = T.unsafe(nil)); end + + # @api private + # Enables the `expect` syntax. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/syntax.rb:68 + def enable_expect(syntax_host = T.unsafe(nil)); end + + # @api private + # Enables the `should` syntax. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/syntax.rb:38 + def enable_should(syntax_host = T.unsafe(nil)); end + + # @api private + # Indicates whether or not the `expect` syntax is enabled. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/syntax.rb:96 + def expect_enabled?(syntax_host = T.unsafe(nil)); end + + # @api private + # Indicates whether or not the `should` syntax is enabled. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/syntax.rb:90 + def should_enabled?(syntax_host = T.unsafe(nil)); end + + # @api private + # Instructs rspec-expectations to warn on first usage of `should` or `should_not`. + # Enabled by default. This is largely here to facilitate testing. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/syntax.rb:18 + def warn_about_should!; end + + # @api private + # Generates a deprecation warning for the given method if no warning + # has already been issued. + # + # pkg:gem/rspec-expectations#lib/rspec/expectations/syntax.rb:25 + def warn_about_should_unless_configured(method_name); end + end +end + +# @private +# Validates the provided matcher to ensure it supports block +# expectations, in order to avoid user confusion when they +# use a block thinking the expectation will be on the return +# value of the block rather than the block itself. +# +# pkg:gem/rspec-expectations#lib/rspec/expectations/expectation_target.rb:98 +class RSpec::Expectations::ValueExpectationTarget < ::RSpec::Expectations::ExpectationTarget + # pkg:gem/rspec-expectations#lib/rspec/expectations/expectation_target.rb:104 + def not_to(matcher = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/expectation_target.rb:99 + def to(matcher = T.unsafe(nil), message = T.unsafe(nil), &block); end + + private + + # pkg:gem/rspec-expectations#lib/rspec/expectations/expectation_target.rb:111 + def enforce_value_expectation(matcher); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/expectation_target.rb:126 + def supports_value_expectations?(matcher); end +end + +# @private +# +# pkg:gem/rspec-expectations#lib/rspec/expectations/version.rb:4 +module RSpec::Expectations::Version; end + +# pkg:gem/rspec-expectations#lib/rspec/expectations/version.rb:5 +RSpec::Expectations::Version::STRING = T.let(T.unsafe(nil), String) + +# RSpec::Matchers provides a number of useful matchers we use to define +# expectations. Any object that implements the [matcher protocol](Matchers/MatcherProtocol) +# can be used as a matcher. +# +# ## Predicates +# +# In addition to matchers that are defined explicitly, RSpec will create +# custom matchers on the fly for any arbitrary predicate, giving your specs a +# much more natural language feel. +# +# A Ruby predicate is a method that ends with a "?" and returns true or false. +# Common examples are `empty?`, `nil?`, and `instance_of?`. +# +# All you need to do is write `expect(..).to be_` followed by the predicate +# without the question mark, and RSpec will figure it out from there. +# For example: +# +# expect([]).to be_empty # => [].empty?() | passes +# expect([]).not_to be_empty # => [].empty?() | fails +# +# In addition to prefixing the predicate matchers with "be_", you can also use "be_a_" +# and "be_an_", making your specs read much more naturally: +# +# expect("a string").to be_an_instance_of(String) # =>"a string".instance_of?(String) # passes +# +# expect(3).to be_a_kind_of(Integer) # => 3.kind_of?(Numeric) | passes +# expect(3).to be_a_kind_of(Numeric) # => 3.kind_of?(Numeric) | passes +# expect(3).to be_an_instance_of(Integer) # => 3.instance_of?(Integer) | passes +# expect(3).not_to be_an_instance_of(Numeric) # => 3.instance_of?(Numeric) | fails +# +# RSpec will also create custom matchers for predicates like `has_key?`. To +# use this feature, just state that the object should have_key(:key) and RSpec will +# call has_key?(:key) on the target. For example: +# +# expect(:a => "A").to have_key(:a) +# expect(:a => "A").to have_key(:b) # fails +# +# You can use this feature to invoke any predicate that begins with "has_", whether it is +# part of the Ruby libraries (like `Hash#has_key?`) or a method you wrote on your own class. +# +# Note that RSpec does not provide composable aliases for these dynamic predicate +# matchers. You can easily define your own aliases, though: +# +# RSpec::Matchers.alias_matcher :a_user_who_is_an_admin, :be_an_admin +# expect(user_list).to include(a_user_who_is_an_admin) +# +# ## Alias Matchers +# +# With {RSpec::Matchers.alias_matcher}, you can easily create an +# alternate name for a given matcher. +# +# The description will also change according to the new name: +# +# RSpec::Matchers.alias_matcher :a_list_that_sums_to, :sum_to +# sum_to(3).description # => "sum to 3" +# a_list_that_sums_to(3).description # => "a list that sums to 3" +# +# or you can specify a custom description like this: +# +# RSpec::Matchers.alias_matcher :a_list_sorted_by, :be_sorted_by do |description| +# description.sub("be sorted by", "a list sorted by") +# end +# +# be_sorted_by(:age).description # => "be sorted by age" +# a_list_sorted_by(:age).description # => "a list sorted by age" +# +# ## Custom Matchers +# +# When you find that none of the stock matchers provide a natural feeling +# expectation, you can very easily write your own using RSpec's matcher DSL +# or writing one from scratch. +# +# ### Matcher DSL +# +# Imagine that you are writing a game in which players can be in various +# zones on a virtual board. To specify that bob should be in zone 4, you +# could say: +# +# expect(bob.current_zone).to eql(Zone.new("4")) +# +# But you might find it more expressive to say: +# +# expect(bob).to be_in_zone("4") +# +# and/or +# +# expect(bob).not_to be_in_zone("3") +# +# You can create such a matcher like so: +# +# RSpec::Matchers.define :be_in_zone do |zone| +# match do |player| +# player.in_zone?(zone) +# end +# end +# +# This will generate a be_in_zone method that returns a matcher +# with logical default messages for failures. You can override the failure +# messages and the generated description as follows: +# +# RSpec::Matchers.define :be_in_zone do |zone| +# match do |player| +# player.in_zone?(zone) +# end +# +# failure_message do |player| +# # generate and return the appropriate string. +# end +# +# failure_message_when_negated do |player| +# # generate and return the appropriate string. +# end +# +# description do +# # generate and return the appropriate string. +# end +# end +# +# Each of the message-generation methods has access to the block arguments +# passed to the create method (in this case, zone). The +# failure message methods (failure_message and +# failure_message_when_negated) are passed the actual value (the +# receiver of expect(..) or expect(..).not_to). +# +# ### Custom Matcher from scratch +# +# You could also write a custom matcher from scratch, as follows: +# +# class BeInZone +# def initialize(expected) +# @expected = expected +# end +# +# def matches?(target) +# @target = target +# @target.current_zone.eql?(Zone.new(@expected)) +# end +# +# def failure_message +# "expected #{@target.inspect} to be in Zone #{@expected}" +# end +# +# def failure_message_when_negated +# "expected #{@target.inspect} not to be in Zone #{@expected}" +# end +# end +# +# ... and a method like this: +# +# def be_in_zone(expected) +# BeInZone.new(expected) +# end +# +# And then expose the method to your specs. This is normally done +# by including the method and the class in a module, which is then +# included in your spec: +# +# module CustomGameMatchers +# class BeInZone +# # ... +# end +# +# def be_in_zone(expected) +# # ... +# end +# end +# +# describe "Player behaviour" do +# include CustomGameMatchers +# # ... +# end +# +# or you can include in globally in a spec_helper.rb file required +# from your spec file(s): +# +# RSpec::configure do |config| +# config.include(CustomGameMatchers) +# end +# +# ### Making custom matchers composable +# +# RSpec's built-in matchers are designed to be composed, in expressions like: +# +# expect(["barn", 2.45]).to contain_exactly( +# a_value_within(0.1).of(2.5), +# a_string_starting_with("bar") +# ) +# +# Custom matchers can easily participate in composed matcher expressions like these. +# Include {RSpec::Matchers::Composable} in your custom matcher to make it support +# being composed (matchers defined using the DSL have this included automatically). +# Within your matcher's `matches?` method (or the `match` block, if using the DSL), +# use `values_match?(expected, actual)` rather than `expected == actual`. +# Under the covers, `values_match?` is able to match arbitrary +# nested data structures containing a mix of both matchers and non-matcher objects. +# It uses `===` and `==` to perform the matching, considering the values to +# match if either returns `true`. The `Composable` mixin also provides some helper +# methods for surfacing the matcher descriptions within your matcher's description +# or failure messages. +# +# RSpec's built-in matchers each have a number of aliases that rephrase the matcher +# from a verb phrase (such as `be_within`) to a noun phrase (such as `a_value_within`), +# which reads better when the matcher is passed as an argument in a composed matcher +# expressions, and also uses the noun-phrase wording in the matcher's `description`, +# for readable failure messages. You can alias your custom matchers in similar fashion +# using {RSpec::Matchers.alias_matcher}. +# +# ## Negated Matchers +# +# Sometimes if you want to test for the opposite using a more descriptive name +# instead of using `not_to`, you can use {RSpec::Matchers.define_negated_matcher}: +# +# RSpec::Matchers.define_negated_matcher :exclude, :include +# include(1, 2).description # => "include 1 and 2" +# exclude(1, 2).description # => "exclude 1 and 2" +# +# While the most obvious negated form may be to add a `not_` prefix, +# the failure messages you get with that form can be confusing (e.g. +# "expected [actual] to not [verb], but did not"). We've found it works +# best to find a more positive name for the negated form, such as +# `avoid_changing` rather than `not_change`. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/english_phrasing.rb:2 +module RSpec::Matchers + extend ::RSpec::Matchers::DSL + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def a_block_changing(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def a_block_outputting(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def a_block_raising(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def a_block_throwing(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def a_block_yielding_control(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def a_block_yielding_successive_args(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def a_block_yielding_with_args(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def a_block_yielding_with_no_args(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def a_collection_containing_exactly(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def a_collection_ending_with(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def a_collection_including(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def a_collection_starting_with(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def a_falsey_value(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def a_falsy_value(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def a_hash_including(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def a_kind_of(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def a_nil_value(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def a_range_covering(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def a_string_ending_with(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def a_string_including(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def a_string_matching(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def a_string_starting_with(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def a_truthy_value(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def a_value(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def a_value_between(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def a_value_within(*args, **, &block); end + + # Allows multiple expectations in the provided block to fail, and then + # aggregates them into a single exception, rather than aborting on the + # first expectation failure like normal. This allows you to see all + # failures from an entire set of expectations without splitting each + # off into its own example (which may slow things down if the example + # setup is expensive). + # + # @param label [String] label for this aggregation block, which will be + # included in the aggregated exception message. + # @param metadata [Hash] additional metadata about this failure aggregation + # block. If multiple expectations fail, it will be exposed from the + # {Expectations::MultipleExpectationsNotMetError} exception. Mostly + # intended for internal RSpec use but you can use it as well. + # @yield Block containing as many expectation as you want. The block is + # simply yielded to, so you can trust that anything that works outside + # the block should work within it. + # @raise [Expectations::MultipleExpectationsNotMetError] raised when + # multiple expectations fail. + # @raise [Expectations::ExpectationNotMetError] raised when a single + # expectation fails. + # @raise [Exception] other sorts of exceptions will be raised as normal. + # + # @example + # aggregate_failures("verifying response") do + # expect(response.status).to eq(200) + # expect(response.headers).to include("Content-Type" => "text/plain") + # expect(response.body).to include("Success") + # end + # + # @note The implementation of this feature uses a thread-local variable, + # which means that if you have an expectation failure in another thread, + # it'll abort like normal. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:305 + def aggregate_failures(label = T.unsafe(nil), metadata = T.unsafe(nil), &block); end + + # Passes if the provided matcher passes when checked against all + # elements of the collection. + # + # @example + # expect([1, 3, 5]).to all be_odd + # expect([1, 3, 6]).to all be_odd # fails + # + # @note The negative form `not_to all` is not supported. Instead + # use `not_to include` or pass a negative form of a matcher + # as the argument (e.g. `all exclude(:foo)`). + # + # @note You can also use this with compound matchers as well. + # + # @example + # expect([1, 3, 5]).to all( be_odd.and be_an(Integer) ) + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:662 + def all(expected); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def an_array_matching(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def an_instance_of(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def an_object_eq_to(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def an_object_eql_to(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def an_object_equal_to(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def an_object_existing(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def an_object_having_attributes(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def an_object_matching(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def an_object_responding_to(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def an_object_satisfying(*args, **, &block); end + + # @example + # expect(actual).to be_truthy + # expect(actual).to be_falsey + # expect(actual).to be_nil + # expect(actual).to be_[arbitrary_predicate](*args) + # expect(actual).not_to be_nil + # expect(actual).not_to be_[arbitrary_predicate](*args) + # + # 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 + # condition (to be or not to be). + # + # Predicates are any Ruby method that ends in a "?" and returns true or + # false. Given be_ followed by arbitrary_predicate (without the "?"), + # RSpec will match convert that into a query against the target object. + # + # The arbitrary_predicate feature will handle any predicate prefixed with + # "be_an_" (e.g. be_an_instance_of), "be_a_" (e.g. be_a_kind_of) or "be_" + # (e.g. be_empty), letting you choose the prefix that best suits the + # predicate. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:349 + def be(*args); end + + # passes if target.kind_of?(klass) + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:355 + def be_a(klass); end + + # Passes if actual.kind_of?(expected) + # + # @example + # expect(5).to be_a_kind_of(Integer) + # expect(5).to be_a_kind_of(Numeric) + # expect(5).not_to be_a_kind_of(Float) + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:378 + def be_a_kind_of(expected); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:358 + def be_an(klass); end + + # Passes if actual.instance_of?(expected) + # + # @example + # expect(5).to be_an_instance_of(Integer) + # expect(5).not_to be_an_instance_of(Numeric) + # expect(5).not_to be_an_instance_of(Float) + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:366 + def be_an_instance_of(expected); end + + # Passes if actual.between?(min, max). Works with any Comparable object, + # including String, Symbol, Time, or Numeric (Fixnum, Bignum, Integer, + # Float, Complex, and Rational). + # + # By default, `be_between` is inclusive (i.e. passes when given either the max or min value), + # but you can make it `exclusive` by chaining that off the matcher. + # + # @example + # expect(5).to be_between(1, 10) + # expect(11).not_to be_between(1, 10) + # expect(10).not_to be_between(1, 10).exclusive + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:395 + def be_between(min, max); end + + # Passes if actual is falsey (false or nil) + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:316 + def be_falsey; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def be_falsy(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:369 + def be_instance_of(expected); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:381 + def be_kind_of(expected); end + + # Passes if actual is nil + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:324 + def be_nil; end + + # Passes if actual is truthy (anything but false or nil) + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:310 + def be_truthy; end + + # Passes if actual == expected +/- delta + # + # @example + # expect(result).to be_within(0.5).of(3.0) + # expect(result).not_to be_within(0.5).of(3.0) + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:405 + def be_within(delta); end + + # Applied to a proc, specifies that its execution will cause some value to + # change. + # + # @param [Object] receiver + # @param [Symbol] message the message to send the receiver + # + # You can either pass receiver and message, or a block, + # but not both. + # + # When passing a block, it must use the `{ ... }` format, not + # do/end, as `{ ... }` binds to the `change` method, whereas do/end + # would errantly bind to the `expect(..).to` or `expect(...).not_to` method. + # + # You can chain any of the following off of the end to specify details + # about the change: + # + # * `from` + # * `to` + # + # or any one of: + # + # * `by` + # * `by_at_least` + # * `by_at_most` + # + # @example + # expect { + # team.add_player(player) + # }.to change(roster, :count) + # + # expect { + # team.add_player(player) + # }.to change(roster, :count).by(1) + # + # expect { + # team.add_player(player) + # }.to change(roster, :count).by_at_least(1) + # + # expect { + # team.add_player(player) + # }.to change(roster, :count).by_at_most(1) + # + # string = "string" + # expect { + # string.reverse! + # }.to change { string }.from("string").to("gnirts") + # + # string = "string" + # expect { + # string + # }.not_to change { string }.from("string") + # + # expect { + # person.happy_birthday + # }.to change(person, :birthday).from(32).to(33) + # + # expect { + # employee.develop_great_new_social_networking_app + # }.to change(employee, :title).from("Mail Clerk").to("CEO") + # + # expect { + # doctor.leave_office + # }.to change(doctor, :sign).from(/is in/).to(/is out/) + # + # user = User.new(:type => "admin") + # expect { + # user.symbolize_type + # }.to change(user, :type).from(String).to(Symbol) + # + # == Notes + # + # Evaluates `receiver.message` or `block` before and after it + # evaluates the block passed to `expect`. If the value is the same + # object, its before/after `hash` value is used to see if it has changed. + # Therefore, your object needs to properly implement `hash` to work correctly + # with this matcher. + # + # `expect( ... ).not_to change` supports the form that specifies `from` + # (which specifies what you expect the starting, unchanged value to be) + # but does not support forms with subsequent calls to `by`, `by_at_least`, + # `by_at_most` or `to`. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:492 + def change(receiver = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def changing(*args, **, &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 + # pass if all args are found in collection. + # + # @note This is also available using the `=~` operator with `should`, + # but `=~` is not supported with `expect`. + # + # @example + # expect([1, 2, 3]).to contain_exactly(1, 2, 3) + # expect([1, 2, 3]).to contain_exactly(1, 3, 2) + # + # @see #match_array + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:510 + def contain_exactly(*items); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def containing_exactly(*args, **, &block); end + + # Passes if actual covers expected. This works for + # Ranges. You can also pass in multiple args + # and it will only pass if all args are found in Range. + # + # @example + # expect(1..10).to cover(5) + # expect(1..10).to cover(4, 6) + # expect(1..10).to cover(4, 6, 11) # fails + # expect(1..10).not_to cover(11) + # expect(1..10).not_to cover(5) # fails + # + # ### Warning:: Ruby >= 1.9 only + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:528 + def cover(*values); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def covering(*args, **, &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 + # actual string. In the case of an array, matches against the last + # `expected.length` elements of the actual array. + # + # @example + # expect("this string").to end_with "string" + # expect([0, 1, 2, 3, 4]).to end_with 4 + # expect([0, 2, 3, 4, 4]).to end_with 3, 4 + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:543 + def end_with(*expected); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def ending_with(*args, **, &block); end + + # Passes if actual == expected. + # + # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more + # information about equality in Ruby. + # + # @example + # expect(5).to eq(5) + # expect(5).not_to eq(3) + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:558 + def eq(expected); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def eq_to(*args, **, &block); end + + # Passes if `actual.eql?(expected)` + # + # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more + # information about equality in Ruby. + # + # @example + # expect(5).to eql(5) + # expect(5).not_to eql(3) + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:572 + def eql(expected); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def eql_to(*args, **, &block); end + + # Passes if actual.equal?(expected) (object identity). + # + # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more + # information about equality in Ruby. + # + # @example + # expect(5).to equal(5) # Integers are equal + # expect("5").not_to equal("5") # Strings that look the same are not the same object + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:586 + def equal(expected); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def equal_to(*args, **, &block); end + + # Passes if `actual.exist?` or `actual.exists?` + # + # @example + # expect(File).to exist("path/to/file") + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:596 + def exist(*args); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def existing(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/expectations/configuration.rb:48 + def expect(value = T.unsafe(nil), &block); end + + # Passes if actual's attribute values match the expected attributes hash. + # This works no matter how you define your attribute readers. + # + # @example + # Person = Struct.new(:name, :age) + # person = Person.new("Bob", 32) + # + # expect(person).to have_attributes(:name => "Bob", :age => 32) + # expect(person).to have_attributes(:name => a_string_starting_with("B"), :age => (a_value > 30) ) + # + # @note It will fail if actual doesn't respond to any of the expected attributes. + # + # @example + # expect(person).to have_attributes(:color => "red") + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:616 + def have_attributes(expected); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def having_attributes(*args, **, &block); end + + # Passes if actual includes expected. This works for + # collections and Strings. You can also pass in multiple args + # and it will only pass if all args are found in collection. + # + # @example + # expect([1,2,3]).to include(3) + # expect([1,2,3]).to include(2,3) + # expect([1,2,3]).to include(2,3,4) # fails + # expect([1,2,3]).not_to include(4) + # expect("spread").to include("read") + # expect("spread").not_to include("red") + # expect(:a => 1, :b => 2).to include(:a) + # expect(:a => 1, :b => 2).to include(:a, :b) + # expect(:a => 1, :b => 2).to include(:a => 1) + # expect(:a => 1, :b => 2).to include(:b => 2, :a => 1) + # expect(:a => 1, :b => 2).to include(:c) # fails + # expect(:a => 1, :b => 2).not_to include(:a => 2) + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:639 + def include(*expected); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def including(*args, **, &block); end + + # Given a `Regexp` or `String`, passes if `actual.match(pattern)` + # Given an arbitrary nested data structure (e.g. arrays and hashes), + # matches if `expected === actual` || `actual == expected` for each + # pair of elements. + # + # @example + # expect(email).to match(/^([^\s]+)((?:[-a-z0-9]+\.)+[a-z]{2,})$/i) + # expect(email).to match("@example.com") + # + # @example + # hash = { + # :a => { + # :b => ["foo", 5], + # :c => { :d => 2.05 } + # } + # } + # + # expect(hash).to match( + # :a => { + # :b => a_collection_containing_exactly( + # a_string_starting_with("f"), + # an_instance_of(Integer) + # ), + # :c => { :d => (a_value < 3) } + # } + # ) + # + # @note The `match_regex` alias is deprecated and is not recommended for use. + # It was added in 2.12.1 to facilitate its use from within custom + # matchers (due to how the custom matcher DSL was evaluated in 2.x, + # `match` could not be used there), but is no longer needed in 3.x. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:697 + def match(expected); end + + # An alternate form of `contain_exactly` that accepts + # the expected contents as a single array arg rather + # than splatted out as individual items. + # + # @example + # expect(results).to contain_exactly(1, 2) + # # is identical to: + # expect(results).to match_array([1, 2]) + # + # @see #contain_exactly + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:715 + def match_array(items); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def match_regex(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def matching(*args, **, &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`. + # With a regexp or matcher, passes if the block outputs a string `to_stdout` or `to_stderr` that matches. + # + # To capture output from any spawned subprocess as well, use `to_stdout_from_any_process` or + # `to_stderr_from_any_process`. Output from any process that inherits the main process's corresponding + # standard stream will be captured. + # + # @example + # expect { print 'foo' }.to output.to_stdout + # expect { print 'foo' }.to output('foo').to_stdout + # expect { print 'foo' }.to output(/foo/).to_stdout + # + # expect { do_something }.to_not output.to_stdout + # + # expect { warn('foo') }.to output.to_stderr + # expect { warn('foo') }.to output('foo').to_stderr + # expect { warn('foo') }.to output(/foo/).to_stderr + # + # expect { do_something }.to_not output.to_stderr + # + # expect { system('echo foo') }.to output("foo\n").to_stdout_from_any_process + # expect { system('echo foo', out: :err) }.to output("foo\n").to_stderr_from_any_process + # + # @note `to_stdout` and `to_stderr` work by temporarily replacing `$stdout` or `$stderr`, + # so they're not able to intercept stream output that explicitly uses `STDOUT`/`STDERR` + # or that uses a reference to `$stdout`/`$stderr` that was stored before the + # matcher was used. + # @note `to_stdout_from_any_process` and `to_stderr_from_any_process` use Tempfiles, and + # are thus significantly (~30x) slower than `to_stdout` and `to_stderr`. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:752 + def output(expected = T.unsafe(nil)); end + + # With no args, matches if any error is raised. + # With a named error, matches only if that specific error is raised. + # With a named error and message specified as a String, matches only if both match. + # With a named error and message specified as a Regexp, matches only if both match. + # Pass an optional block to perform extra verifications on the exception matched + # + # @example + # expect { do_something_risky }.to raise_error + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) { |error| expect(error.data).to eq 42 } + # expect { do_something_risky }.to raise_error { |error| expect(error.data).to eq 42 } + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, "that was too risky") + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, /oo ri/) + # expect { do_something_risky }.to raise_error("that was too risky") + # + # expect { do_something_risky }.not_to raise_error + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:773 + def raise_error(error = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:776 + def raise_exception(error = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def raising(*args, **, &block); end + + # Matches if the target object responds to all of the names + # provided. Names can be Strings or Symbols. + # + # @example + # expect("string").to respond_to(:length) + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:792 + def respond_to(*names); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def responding_to(*args, **, &block); end + + # Passes if the submitted block returns true. Yields target to the + # block. + # + # Generally speaking, this should be thought of as a last resort when + # you can't find any other way to specify the behaviour you wish to + # specify. + # + # If you do find yourself in such a situation, you could always write + # a custom matcher, which would likely make your specs more expressive. + # + # @param description [String] optional description to be used for this matcher. + # + # @example + # expect(5).to satisfy { |n| n > 3 } + # expect(5).to satisfy("be greater than 3") { |n| n > 3 } + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:813 + def satisfy(description = T.unsafe(nil), &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def satisfying(*args, **, &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 + # of the actual string. In the case of an array, matches against the first + # `expected.length` elements of the actual array. + # + # @example + # expect("this string").to start_with "this s" + # expect([0, 1, 2, 3, 4]).to start_with 0 + # expect([0, 2, 3, 4, 4]).to start_with 0, 1 + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:828 + def start_with(*expected); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def starting_with(*args, **, &block); end + + # Given no argument, matches if a proc throws any Symbol. + # + # Given a Symbol, matches if the given proc throws the specified Symbol. + # + # Given a Symbol and an arg, matches if the given proc throws the + # specified Symbol with the specified arg. + # + # @example + # expect { do_something_risky }.to throw_symbol + # expect { do_something_risky }.to throw_symbol(:that_was_risky) + # expect { do_something_risky }.to throw_symbol(:that_was_risky, 'culprit') + # + # expect { do_something_risky }.not_to throw_symbol + # expect { do_something_risky }.not_to throw_symbol(:that_was_risky) + # expect { do_something_risky }.not_to throw_symbol(:that_was_risky, 'culprit') + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:850 + def throw_symbol(expected_symbol = T.unsafe(nil), expected_arg = T.unsafe(nil)); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def throwing(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def within(*args, **, &block); end + + # Passes if the method called in the expect block yields, regardless + # of whether or not arguments are yielded. + # + # @example + # expect { |b| 5.tap(&b) }.to yield_control + # expect { |b| "a".to_sym(&b) }.not_to yield_control + # + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:871 + def yield_control; end + + # Designed for use with methods that repeatedly yield (such as + # iterators). Passes if the method called in the expect block yields + # multiple times with arguments matching those given. + # + # Argument matching is done using `===` (the case match operator) + # and `==`. If the expected and actual arguments match with either + # operator, the matcher will pass. + # + # @example + # expect { |b| [1, 2, 3].each(&b) }.to yield_successive_args(1, 2, 3) + # expect { |b| { :a => 1, :b => 2 }.each(&b) }.to yield_successive_args([:a, 1], [:b, 2]) + # expect { |b| [1, 2, 3].each(&b) }.not_to yield_successive_args(1, 2) + # + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:940 + def yield_successive_args(*args); end + + # Given no arguments, matches if the method called in the expect + # block yields with arguments (regardless of what they are or how + # many there are). + # + # Given arguments, matches if the method called in the expect block + # yields with arguments that match the given arguments. + # + # Argument matching is done using `===` (the case match operator) + # and `==`. If the expected and actual arguments match with either + # operator, the matcher will pass. + # + # @example + # expect { |b| 5.tap(&b) }.to yield_with_args # because #tap yields an arg + # expect { |b| 5.tap(&b) }.to yield_with_args(5) # because 5 == 5 + # expect { |b| 5.tap(&b) }.to yield_with_args(Integer) # because Integer === 5 + # expect { |b| File.open("f.txt", &b) }.to yield_with_args(/txt/) # because /txt/ === "f.txt" + # + # expect { |b| User.transaction(&b) }.not_to yield_with_args # because it yields no args + # expect { |b| 5.tap(&b) }.not_to yield_with_args(1, 2, 3) + # + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # @note This matcher is not designed for use with methods that yield + # multiple times. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:919 + def yield_with_args(*args); end + + # Passes if the method called in the expect block yields with + # no arguments. Fails if it does not yield, or yields with arguments. + # + # @example + # expect { |b| User.transaction(&b) }.to yield_with_no_args + # expect { |b| 5.tap(&b) }.not_to yield_with_no_args # because it yields with `5` + # expect { |b| "a".to_sym(&b) }.not_to yield_with_no_args # because it does not yield + # + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # @note This matcher is not designed for use with methods that yield + # multiple times. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:889 + def yield_with_no_args; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def yielding_control(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def yielding_successive_args(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def yielding_with_args(*args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:251 + def yielding_with_no_args(*args, **, &block); end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:961 + def method_missing(method, *args, **, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:974 + def respond_to_missing?(method, *); end + + class << self + # @!macro [attach] alias_matcher + # @!parse + # alias $1 $2 + # @!visibility private + # We define this override here so we can attach a YARD macro to it. + # It ensures that our docs list all the matcher aliases. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:250 + def alias_matcher(*args, &block); end + + # @api private + # Used by rspec-core to clear the state used to generate + # descriptions after an example. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/generated_descriptions.rb:11 + def clear_generated_description; end + + # Delegates to {RSpec::Expectations.configuration}. + # This is here because rspec-core's `expect_with` option + # looks for a `configuration` method on the mixin + # (`RSpec::Matchers`) to yield to a block. + # @return [RSpec::Expectations::Configuration] the configuration object + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:951 + def configuration; end + + # @api private + # Generates an an example description based on the last expectation. + # Used by rspec-core's one-liner syntax. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/generated_descriptions.rb:19 + def generated_description; end + + # @api private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:1008 + def is_a_describable_matcher?(obj); end + + # @api private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers.rb:988 + def is_a_matcher?(obj); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/generated_descriptions.rb:25 + def last_description; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/generated_descriptions.rb:5 + def last_expectation_handler; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/generated_descriptions.rb:5 + def last_expectation_handler=(_arg0); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/generated_descriptions.rb:5 + def last_matcher; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/generated_descriptions.rb:5 + def last_matcher=(_arg0); end + end +end + +# Decorator that wraps a matcher and overrides `description` +# using the provided block in order to support an alias +# of a matcher. This is intended for use when composing +# matchers, so that you can use an expression like +# `include( a_value_within(0.1).of(3) )` rather than +# `include( be_within(0.1).of(3) )`, and have the corresponding +# description read naturally. +# +# @api private +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/aliased_matcher.rb:12 +class RSpec::Matchers::AliasedMatcher < ::RSpec::Matchers::MatcherDelegator + # pkg:gem/rspec-expectations#lib/rspec/matchers/aliased_matcher.rb:13 + def initialize(base_matcher, description_block); end + + # Provides the description of the aliased matcher. Aliased matchers + # are designed to behave identically to the original matcher except + # for the description and failure messages. The description is different + # to reflect the aliased name. + # + # @api private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/aliased_matcher.rb:36 + def description; end + + # Provides the failure_message of the aliased matcher. Aliased matchers + # are designed to behave identically to the original matcher except + # for the description and failure messages. The failure_message is different + # to reflect the aliased name. + # + # @api private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/aliased_matcher.rb:46 + def failure_message; end + + # Provides the failure_message_when_negated of the aliased matcher. Aliased matchers + # are designed to behave identically to the original matcher except + # for the description and failure messages. The failure_message_when_negated is different + # to reflect the aliased name. + # + # @api private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/aliased_matcher.rb:56 + def failure_message_when_negated; end + + # Forward messages on to the wrapped matcher. + # Since many matchers provide a fluent interface + # (e.g. `a_value_within(0.1).of(3)`), we need to wrap + # the returned value if it responds to `description`, + # so that our override can be applied when it is eventually + # used. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/aliased_matcher.rb:24 + def method_missing(*); end +end + +# Decorator used for matchers that have special implementations of +# operators like `==` and `===`. +# @private +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/aliased_matcher.rb:64 +class RSpec::Matchers::AliasedMatcherWithOperatorSupport < ::RSpec::Matchers::AliasedMatcher; end + +# @private +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/aliased_matcher.rb:71 +class RSpec::Matchers::AliasedNegatedMatcher < ::RSpec::Matchers::AliasedMatcher + # pkg:gem/rspec-expectations#lib/rspec/matchers/aliased_matcher.rb:80 + def does_not_match?(*args, &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/aliased_matcher.rb:84 + def failure_message; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/aliased_matcher.rb:88 + def failure_message_when_negated; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/aliased_matcher.rb:72 + def matches?(*args, &block); end + + private + + # For a matcher that uses the default failure messages, we prefer to + # use the override provided by the `description_block`, because it + # includes the phrasing that the user has expressed a preference for + # 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 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). + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/aliased_matcher.rb:105 + def optimal_failure_message(same, inverted); end +end + +# pkg:gem/rspec-expectations#lib/rspec/matchers/aliased_matcher.rb:94 +RSpec::Matchers::AliasedNegatedMatcher::DefaultFailureMessages = RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages + +# pkg:gem/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 +# +# pkg:gem/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. +# +# Autoloading is used to delay when the matcher classes get loaded, allowing +# rspec-matchers to boot faster, and avoiding loading matchers the user is +# not using. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:3 +module RSpec::Matchers::BuiltIn; end + +# @api private +# Provides the implementation for `all`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/all.rb:7 +class RSpec::Matchers::BuiltIn::All < ::RSpec::Matchers::BuiltIn::BaseMatcher + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/all.rb:11 + def initialize(matcher); end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/all.rb:37 + def description; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/all.rb:17 + def does_not_match?(_actual); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/all.rb:9 + def failed_objects; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/all.rb:23 + def failure_message; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/all.rb:9 + def matcher; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/all.rb:63 + def add_new_line_if_needed(message); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/all.rb:58 + def failure_message_for_item(index, failure_message); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/all.rb:67 + def indent_multiline_message(message); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/all.rb:50 + def index_failed_objects; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/all.rb:74 + def initialize_copy(other); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/all.rb:80 + def iterable?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/all.rb:43 + def match(_expected, _actual); end +end + +# @api private +# +# Used _internally_ as a base class for matchers that ship with +# rspec-expectations and rspec-rails. +# +# ### Warning: +# +# This class is for internal use, and subject to change without notice. +# We strongly recommend that you do not base your custom matchers on this +# class. If/when this changes, we will announce it and remove this warning. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:14 +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 + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:28 + def initialize(expected = T.unsafe(nil)); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:23 + def actual; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:97 + def actual_formatted; end + + # @api private + # Generates a description using {EnglishPhrasing}. + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:60 + def description; end + + # @api private + # Matchers are not diffable by default. Override this to make your + # subclass diffable. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:69 + def diffable?; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:23 + def expected; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:92 + def expected_formatted; end + + # @api private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:87 + def expects_call_stack_jump?; end + + # @api private + # Used to wrap a block of code that will indicate failure by + # raising one of the named exceptions. + # + # This is used by rspec-rails for some of its matchers that + # wrap rails' assertions. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:47 + def match_unless_raises(*exceptions); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:107 + def matcher_name; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:26 + def matcher_name=(_arg0); end + + # @api private + # Indicates if the match is successful. Delegates to `match`, which + # should be defined on a subclass. Takes care of consistently + # initializing the `actual` attribute. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:36 + def matches?(actual); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:23 + def rescued_exception; end + + # @api private + # Most matchers are value matchers (i.e. meant to work with `expect(value)`) + # rather than block matchers (i.e. meant to work with `expect { }`), so + # this defaults to false. Block matchers must override this to return true. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:77 + def supports_block_expectations?; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:82 + def supports_value_expectations?; end + + class << self + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:102 + def matcher_name; end + + private + + # @private + # Borrowed from ActiveSupport. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:117 + def underscore(camel_cased_word); end + end +end + +# @api private +# Provides default implementations of failure messages, based on the `description`. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:193 +module RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages + # @api private + # Provides a good generic failure message. Based on `description`. + # When subclassing, if you are not satisfied with this failure message + # you often only need to override `description`. + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:199 + def failure_message; end + + # @api private + # Provides a good generic negative failure message. Based on `description`. + # When subclassing, if you are not satisfied with this failure message + # you often only need to override `description`. + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:208 + def failure_message_when_negated; end + + class << self + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:213 + def has_default_failure_messages?(matcher); end + end +end + +# @private +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:128 +module RSpec::Matchers::BuiltIn::BaseMatcher::HashFormatting + private + + # `{ :a => 5, :b => 2 }.inspect` produces: + # + # {:a=>5, :b=>2} + # + # ...but it looks much better as: + # + # {:a => 5, :b => 2} + # + # This is idempotent and safe to run on a string multiple times. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:138 + def improve_hash_formatting(inspect_string); end + + class << self + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:141 + def improve_hash_formatting(inspect_string); end + end +end + +# @private +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:147 +module RSpec::Matchers::BuiltIn::BaseMatcher::StringEncodingFormatting + private + + # @api private + # Formats a String's encoding as a human readable string + # @param value [String] + # @return [String] + # @api private + # Formats a String's encoding as a human readable string + # @param _value [String] + # @return [nil] nil as the curent Ruby version does not support String encoding + # :nocov: + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:172 + def format_encoding(value); end + + # @api private + # @return [Boolean] False always as the curent Ruby version does not support String encoding + # :nocov: + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:153 + def string_encoding_differs?; end + + class << self + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:186 + def format_encoding(value); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:165 + def string_encoding_differs?; end + end +end + +# @api private +# Used to detect when no arg is passed to `initialize`. +# `nil` cannot be used because it's a valid value to pass. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/base_matcher.rb:20 +RSpec::Matchers::BuiltIn::BaseMatcher::UNDEFINED = T.let(T.unsafe(nil), Object) + +# @api private +# Provides the implementation for `be`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:101 +class RSpec::Matchers::BuiltIn::Be < ::RSpec::Matchers::BuiltIn::BaseMatcher + include ::RSpec::Matchers::BuiltIn::BeHelpers + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:104 + def initialize(*args); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:121 + def <(operand); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:121 + def <=(operand); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:121 + def ==(operand); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:121 + def ===(operand); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:121 + def =~(operand); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:121 + def >(operand); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:121 + def >=(operand); end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:110 + def failure_message; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:116 + def failure_message_when_negated; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:128 + def match(_, actual); end +end + +# @api private +# Provides the implementation for `be_a_kind_of`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be_kind_of.rb:7 +class RSpec::Matchers::BuiltIn::BeAKindOf < ::RSpec::Matchers::BuiltIn::BaseMatcher + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be_kind_of.rb:10 + def match(expected, actual); end +end + +# @api private +# Provides the implementation for `be_an_instance_of`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be_instance_of.rb:7 +class RSpec::Matchers::BuiltIn::BeAnInstanceOf < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be_instance_of.rb:10 + def description; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be_instance_of.rb:16 + def match(expected, actual); end +end + +# @api private +# Provides the implementation for `be_between`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be_between.rb:7 +class RSpec::Matchers::BuiltIn::BeBetween < ::RSpec::Matchers::BuiltIn::BaseMatcher + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be_between.rb:8 + def initialize(min, max); end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be_between.rb:57 + def description; end + + # @api public + # Makes the between comparison exclusive. + # + # @example + # expect(3).to be_between(2, 4).exclusive + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be_between.rb:33 + def exclusive; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be_between.rb:51 + def failure_message; end + + # @api public + # Makes the between comparison inclusive. + # + # @example + # expect(3).to be_between(2, 3).inclusive + # + # @note The matcher is inclusive by default; this simply provides + # a way to be more explicit about it. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be_between.rb:21 + def inclusive; end + + # @api private + # @return [Boolean] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be_between.rb:42 + def matches?(actual); end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be_between.rb:63 + def comparable?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be_between.rb:71 + def compare; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be_between.rb:67 + def not_comparable_clause; end +end + +# @api private +# Provides the implementation of `be value`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:136 +class RSpec::Matchers::BuiltIn::BeComparedTo < ::RSpec::Matchers::BuiltIn::BaseMatcher + include ::RSpec::Matchers::BuiltIn::BeHelpers + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:139 + def initialize(operand, operator); end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:178 + def description; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:151 + def does_not_match?(actual); end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:159 + def failure_message; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:166 + def failure_message_when_negated; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:145 + def matches?(actual); end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:184 + def perform_match(actual); end +end + +# @api private +# Provides the implementation for `be_falsey`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:30 +class RSpec::Matchers::BuiltIn::BeFalsey < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:33 + def failure_message; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:39 + def failure_message_when_negated; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:45 + def match(_, actual); end +end + +# @private +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:74 +module RSpec::Matchers::BuiltIn::BeHelpers + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:77 + def args_to_s; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:93 + def args_to_sentence; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:89 + def expected_to_sentence; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:85 + def inspected_args; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:81 + def parenthesize(string); end +end + +# @api private +# Provides the implementation for `be_nil`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:53 +class RSpec::Matchers::BuiltIn::BeNil < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:56 + def failure_message; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:62 + def failure_message_when_negated; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:68 + def match(_, actual); end +end + +# @api private +# Provides the implementation of `be_`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/has.rb:164 +class RSpec::Matchers::BuiltIn::BePredicate < ::RSpec::Matchers::BuiltIn::DynamicPredicate + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/has.rb:176 + def failure_to_respond_explanation; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/has.rb:168 + def predicate; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/has.rb:184 + def predicate_accessible?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/has.rb:172 + def predicate_method_name; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/has.rb:188 + def present_tense_predicate; end +end + +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/has.rb:166 +RSpec::Matchers::BuiltIn::BePredicate::REGEX = T.let(T.unsafe(nil), Regexp) + +# @api private +# Provides the implementation for `be_truthy`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:7 +class RSpec::Matchers::BuiltIn::BeTruthy < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:10 + def failure_message; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:16 + def failure_message_when_negated; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be.rb:22 + def match(_, actual); end +end + +# @api private +# Provides the implementation for `be_within`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be_within.rb:7 +class RSpec::Matchers::BuiltIn::BeWithin < ::RSpec::Matchers::BuiltIn::BaseMatcher + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be_within.rb:8 + def initialize(delta); end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be_within.rb:52 + def description; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be_within.rb:40 + def failure_message; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be_within.rb:46 + def failure_message_when_negated; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be_within.rb:32 + def matches?(actual); end + + # @api public + # Sets the expected value. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be_within.rb:14 + def of(expected); end + + # @api public + # Sets the expected value, and makes the matcher do + # a percent comparison. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be_within.rb:24 + def percent_of(expected); end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be_within.rb:62 + def needs_expected; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be_within.rb:66 + def not_numeric_clause; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/be_within.rb:58 + def numeric?; end +end + +# @private +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/output.rb:159 +module RSpec::Matchers::BuiltIn::CaptureStderr + class << self + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/output.rb:164 + def capture(block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/output.rb:160 + def name; end + end +end + +# @private +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/output.rb:139 +module RSpec::Matchers::BuiltIn::CaptureStdout + class << self + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/output.rb:144 + def capture(block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/output.rb:140 + def name; end + end +end + +# @private +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/output.rb:179 +class RSpec::Matchers::BuiltIn::CaptureStreamToTempfile < ::Struct + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/output.rb:180 + def capture(block); end +end + +# @api private +# Provides the implementation for `change`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:7 +class RSpec::Matchers::BuiltIn::Change < ::RSpec::Matchers::BuiltIn::BaseMatcher + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:87 + def initialize(receiver = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # @api public + # Specifies the delta of the expected change. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:10 + def by(expected_delta); end + + # @api public + # Specifies a minimum delta of the expected change. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:18 + def by_at_least(minimum); end + + # @api public + # Specifies a maximum delta of the expected change. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:26 + def by_at_most(maximum); end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:71 + def description; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:50 + def does_not_match?(event_proc); end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:57 + def failure_message; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:64 + def failure_message_when_negated; end + + # @api public + # Specifies the original value. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:40 + def from(value); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:45 + def matches?(event_proc); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:76 + def supports_block_expectations?; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:81 + def supports_value_expectations?; end + + # @api public + # Specifies the new value you expect. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:34 + def to(value); end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:93 + def change_details; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:119 + def negative_failure_reason; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:97 + def perform_change(event_proc); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:114 + def positive_failure_reason; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:109 + def raise_block_syntax_error; end +end + +# @private +# Encapsulates the details of the before/after values. +# +# Note that this class exposes the `actual_after` value, to allow the +# matchers above to derive failure messages, etc from the value on demand +# as needed, but it intentionally does _not_ expose the `actual_before` +# value. Some usages of the `change` matcher mutate a specific object +# returned by the value proc, which means that failure message snippets, +# etc, which are derived from the `before` value may not be accurate if +# they are lazily computed as needed. We must pre-compute them before +# applying the change in the `expect` block. To ensure that all `change` +# matchers do that properly, we do not expose the `actual_before` value. +# Instead, matchers must pass a block to `perform_change`, which yields +# the `actual_before` value before applying the change. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:352 +class RSpec::Matchers::BuiltIn::ChangeDetails + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:357 + def initialize(matcher_name, receiver = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:353 + def actual_after; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:418 + def actual_delta; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:402 + def changed?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:389 + def perform_change(event_proc); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:378 + def value_representation; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:424 + def evaluate_value_proc; end + + # :nocov: + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:438 + def extract_value_block_snippet; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:428 + def message_notation(receiver, message); end +end + +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:355 +module RSpec::Matchers::BuiltIn::ChangeDetails::UNDEFINED; end + +# @api private +# Used to specify a change from a specific value +# (and, optionally, to a specific value). +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:270 +class RSpec::Matchers::BuiltIn::ChangeFromValue < ::RSpec::Matchers::BuiltIn::SpecificValuesChange + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:271 + def initialize(change_details, expected_before); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:285 + def does_not_match?(event_proc); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:295 + def failure_message_when_negated; end + + # @api public + # Specifies the new value you expect. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:278 + def to(value); end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:303 + def change_description; end +end + +# Used to specify a relative change. +# @api private +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:128 +class RSpec::Matchers::BuiltIn::ChangeRelatively < ::RSpec::Matchers::BuiltIn::BaseMatcher + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:129 + def initialize(change_details, expected_delta, relativity, &comparer); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:156 + def description; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:150 + def does_not_match?(_event_proc); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:137 + def failure_message; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:144 + def matches?(event_proc); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:162 + def supports_block_expectations?; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:167 + def supports_value_expectations?; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:173 + def failure_reason; end +end + +# @api private +# Used to specify a change to a specific value +# (and, optionally, from a specific value). +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:311 +class RSpec::Matchers::BuiltIn::ChangeToValue < ::RSpec::Matchers::BuiltIn::SpecificValuesChange + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:312 + def initialize(change_details, expected_after); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:326 + def does_not_match?(_event_proc); end + + # @api public + # Specifies the original value. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:319 + def from(value); end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:333 + def change_description; end +end + +# @api private +# Base class for `and` and `or` compound matchers. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:6 +class RSpec::Matchers::BuiltIn::Compound < ::RSpec::Matchers::BuiltIn::BaseMatcher + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:10 + def initialize(matcher_1, matcher_2); end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:25 + def description; end + + # @api private + # @return [Boolean] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:49 + def diffable?; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:16 + def does_not_match?(_actual); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:8 + def evaluator; end + + # @api private + # @return [RSpec::Matchers::MultiMatcherDiff] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:55 + def expected; end + + # @api private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:42 + def expects_call_stack_jump?; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:8 + def matcher_1; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:8 + def matcher_2; end + + # @api private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:30 + def supports_block_expectations?; end + + # @api private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:36 + def supports_value_expectations?; end + + protected + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:62 + def diffable_matcher_list; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:96 + def compound_failure_message; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:128 + def diffable_matcher_list_for(matcher); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:90 + def indent_multiline_message(message); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:71 + def initialize_copy(other); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:77 + def match(_expected, actual); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:102 + def matcher_1_matches?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:106 + def matcher_2_matches?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:122 + def matcher_is_diffable?(matcher); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:110 + def matcher_supports_block_expectations?(matcher); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:116 + def matcher_supports_value_expectations?(matcher); end +end + +# @api public +# Matcher used to represent a compound `and` expectation. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:245 +class RSpec::Matchers::BuiltIn::Compound::And < ::RSpec::Matchers::BuiltIn::Compound + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:248 + def failure_message; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:265 + def conjunction; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:260 + def match(*); end +end + +# Normally, we evaluate the matching sequentially. For an expression like +# `expect(x).to foo.and bar`, this becomes: +# +# expect(x).to foo +# expect(x).to bar +# +# For block expectations, we need to nest them instead, so that +# `expect { x }.to foo.and bar` becomes: +# +# expect { +# expect { x }.to foo +# }.to bar +# +# This is necessary so that the `expect` block is only executed once. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:159 +class RSpec::Matchers::BuiltIn::Compound::NestedEvaluator + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:160 + def initialize(actual, matcher_1, matcher_2); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:173 + def matcher_matches?(matcher); end + + private + + # Some block matchers (such as `yield_xyz`) pass args to the `expect` block. + # When such a matcher is used as the outer matcher, we need to forward the + # the args on to the `expect` block. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:187 + def inner_matcher_block(outer_args); end + + # For a matcher like `raise_error` or `throw_symbol`, where the block will jump + # up the call stack, we need to order things so that it is the inner matcher. + # For example, we need it to be this: + # + # expect { + # expect { + # x += 1 + # raise "boom" + # }.to raise_error("boom") + # }.to change { x }.by(1) + # + # ...rather than: + # + # expect { + # expect { + # x += 1 + # raise "boom" + # }.to change { x }.by(1) + # }.to raise_error("boom") + # + # In the latter case, the after-block logic in the `change` matcher would never + # get executed because the `raise "boom"` line would jump to the `rescue` in the + # `raise_error` logic, so only the former case will work properly. + # + # This method figures out which matcher should be the inner matcher and which + # should be the outer matcher. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:227 + def order_block_matchers; end + + class << self + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:236 + def matcher_expects_call_stack_jump?(matcher); end + end +end + +# @api public +# Matcher used to represent a compound `or` expectation. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:272 +class RSpec::Matchers::BuiltIn::Compound::Or < ::RSpec::Matchers::BuiltIn::Compound + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:275 + def failure_message; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:286 + def conjunction; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:281 + def match(*); end +end + +# For value expectations, we can evaluate the matchers sequentially. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:135 +class RSpec::Matchers::BuiltIn::Compound::SequentialEvaluator + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:136 + def initialize(actual, *); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/compound.rb:140 + def matcher_matches?(matcher); end +end + +# @api private +# Provides the implementation for `contain_exactly` and `match_array`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:8 +class RSpec::Matchers::BuiltIn::ContainExactly < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:29 + def description; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:11 + def failure_message; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:22 + def failure_message_when_negated; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:34 + def matches?(actual); end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:56 + def actual_collection_line; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:137 + def best_solution; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:94 + def convert_actual_to_an_array; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:68 + def describe_collection(collection, surface_descriptions = T.unsafe(nil)); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:52 + def expected_collection_line; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:64 + def extra_elements_line; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:131 + def extra_items; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:44 + def generate_failure_message; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:81 + def match(_expected, _actual); end + + # This cannot always work (e.g. when dealing with unsortable items, + # or matchers as expected items), but it's practically free compared to + # the slowness of the full matching algorithm, and in common cases this + # works, so it's worth a try. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:90 + def match_when_sorted?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:76 + def message_line(prefix, collection, surface_descriptions = T.unsafe(nil)); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:60 + def missing_elements_line; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:125 + def missing_items; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:141 + def pairings_maximizer; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:104 + def safe_sort(array); end + + # :nocov: + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:120 + def to_a_disallowed?(object); end +end + +# Once we started supporting composing matchers, the algorithm for this matcher got +# much more complicated. Consider this expression: +# +# expect(["fool", "food"]).to contain_exactly(/foo/, /fool/) +# +# This should pass (because we can pair /fool/ with "fool" and /foo/ with "food"), but +# the original algorithm used by this matcher would pair the first elements it could +# (/foo/ with "fool"), which would leave /fool/ and "food" unmatched. When we have +# an expected element which is a matcher that matches a superset of actual items +# compared to another expected element matcher, we need to consider every possible pairing. +# +# This class is designed to maximize the number of actual/expected pairings -- or, +# conversely, to minimize the number of unpaired items. It's essentially a brute +# force solution, but with a few heuristics applied to reduce the size of the +# problem space: +# +# * Any items which match none of the items in the other list are immediately +# placed into the `unmatched_expected_indexes` or `unmatched_actual_indexes` array. +# The extra items and missing items in the matcher failure message are derived +# from these arrays. +# * Any items which reciprocally match only each other are paired up and not +# considered further. +# +# What's left is only the items which match multiple items from the other list +# (or vice versa). From here, it performs a brute-force depth-first search, +# looking for a solution which pairs all elements in both lists, or, barring that, +# that produces the fewest unmatched items. +# +# @private +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:188 +class RSpec::Matchers::BuiltIn::ContainExactly::PairingsMaximizer + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:225 + def initialize(expected_to_actual_matched_indexes, actual_to_expected_matched_indexes); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:223 + def actual_to_expected_matched_indexes; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:223 + def expected_to_actual_matched_indexes; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:239 + def find_best_solution; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:223 + def solution; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:301 + def apply_pairing_to(indeterminates, original_matches, other_list_index); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:285 + def best_solution_for_pairing(expected_index, actual_index); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:265 + def categorize_indexes(indexes_to_categorize, other_indexes); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:280 + def reciprocal_single_match?(matches, index, other_list); end +end + +# @private +# Starting solution that is worse than any other real solution. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:259 +class RSpec::Matchers::BuiltIn::ContainExactly::PairingsMaximizer::NullSolution + class << self + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:260 + def worse_than?(_other); end + end +end + +# @private +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:190 +class RSpec::Matchers::BuiltIn::ContainExactly::PairingsMaximizer::Solution < ::Struct + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:212 + def +(derived_candidate_solution); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:196 + def candidate?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:201 + def ideal?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:190 + def indeterminate_actual_indexes; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:190 + def indeterminate_actual_indexes=(_); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:190 + def indeterminate_expected_indexes; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:190 + def indeterminate_expected_indexes=(_); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:190 + def unmatched_actual_indexes; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:190 + def unmatched_actual_indexes=(_); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:190 + def unmatched_expected_indexes; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:190 + def unmatched_expected_indexes=(_); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:208 + def unmatched_item_count; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:192 + def worse_than?(other); end + + class << self + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:190 + def [](*_arg0); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:190 + def inspect; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:190 + def keyword_init?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:190 + def members; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/contain_exactly.rb:190 + def new(*_arg0); end + end +end + +# @api private +# Abstract class to implement `once`, `at_least` and other +# count constraints. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/count_expectation.rb:7 +module RSpec::Matchers::BuiltIn::CountExpectation + # @api public + # Specifies the minimum number of times the method is expected to match + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/count_expectation.rb:42 + def at_least(number); end + + # @api public + # Specifies the maximum number of times the method is expected to match + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/count_expectation.rb:35 + def at_most(number); end + + # @api public + # Specifies that the method is expected to match the given number of times. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/count_expectation.rb:28 + def exactly(number); end + + # @api public + # Specifies that the method is expected to match once. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/count_expectation.rb:10 + def once; end + + # @api public + # Specifies that the method is expected to match thrice. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/count_expectation.rb:22 + def thrice; end + + # @api public + # No-op. Provides syntactic sugar. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/count_expectation.rb:49 + def times; end + + # @api public + # Specifies that the method is expected to match twice. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/count_expectation.rb:16 + def twice; end + + protected + + # @api private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/count_expectation.rb:55 + def count_expectation_type; end + + # @api private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/count_expectation.rb:55 + def expected_count; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/count_expectation.rb:122 + def count_constraint_to_number(n); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/count_expectation.rb:141 + def count_expectation_description; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/count_expectation.rb:145 + def count_failure_reason(action); end + + # :nocov: + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/count_expectation.rb:60 + def cover?(count, number); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/count_expectation.rb:71 + def expected_count_matches?(actual_count); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/count_expectation.rb:79 + def has_expected_count?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/count_expectation.rb:159 + def human_readable_count(count); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/count_expectation.rb:150 + def human_readable_expectation_type; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/count_expectation.rb:102 + def raise_impossible_count_expectation(count); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/count_expectation.rb:111 + def raise_unsupported_count_expectation; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/count_expectation.rb:83 + def set_expected_count(relativity, n); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/count_expectation.rb:134 + def unsupported_count_expectation?(relativity); end +end + +# @api private +# Provides the implementation for `cover`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/cover.rb:7 +class RSpec::Matchers::BuiltIn::Cover < ::RSpec::Matchers::BuiltIn::BaseMatcher + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/cover.rb:8 + def initialize(*expected); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/cover.rb:17 + def does_not_match?(range); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/cover.rb:12 + def matches?(range); end +end + +# @api private +# Provides the implementation for dynamic predicate matchers. +# Not intended to be inherited directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/has.rb:7 +class RSpec::Matchers::BuiltIn::DynamicPredicate < ::RSpec::Matchers::BuiltIn::BaseMatcher + include ::RSpec::Matchers::BuiltIn::BeHelpers + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/has.rb:10 + def initialize(method_name, *args, **, &block); end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/has.rb:43 + def description; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/has.rb:23 + def does_not_match?(actual, &block); end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/has.rb:31 + def failure_message; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/has.rb:37 + def failure_message_when_negated; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/has.rb:16 + def matches?(actual, &block); end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/has.rb:126 + def expectation_of(value); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/has.rb:121 + def failure_message_expecting(value); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/has.rb:142 + def failure_to_respond_explanation; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/has.rb:117 + def method_description; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/has.rb:88 + def methods_include?(method); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/has.rb:68 + def predicate_accessible?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/has.rb:101 + def predicate_matches?(value = T.unsafe(nil)); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/has.rb:97 + def predicate_method_name; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/has.rb:93 + def predicate_result; end + + # :nocov: + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/has.rb:84 + def private_predicate?; end + + # :nocov: + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/has.rb:62 + def really_responds_to?(method); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/has.rb:109 + def root; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/has.rb:136 + def validity_message; end +end + +# @api private +# Provides the implementation for `end_with`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/start_or_end_with.rb:81 +class RSpec::Matchers::BuiltIn::EndWith < ::RSpec::Matchers::BuiltIn::StartOrEndWith + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/start_or_end_with.rb:88 + def element_matches?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/start_or_end_with.rb:84 + def subset_matches?; end +end + +# @api private +# Provides the implementation for `eq`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/eq.rb:7 +class RSpec::Matchers::BuiltIn::Eq < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/eq.rb:26 + def description; end + + # @api private + # @return [Boolean] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/eq.rb:32 + def diffable?; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/eq.rb:10 + def failure_message; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/eq.rb:20 + def failure_message_when_negated; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/eq.rb:38 + def match(expected, actual); end +end + +# @api private +# Provides the implementation for `eql`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/eql.rb:7 +class RSpec::Matchers::BuiltIn::Eql < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [Boolean] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/eql.rb:26 + def diffable?; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/eql.rb:10 + def failure_message; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/eql.rb:20 + def failure_message_when_negated; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/eql.rb:32 + def match(expected, actual); end +end + +# @api private +# Provides the implementation for `equal`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/equal.rb:7 +class RSpec::Matchers::BuiltIn::Equal < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [Boolean] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/equal.rb:33 + def diffable?; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/equal.rb:10 + def failure_message; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/equal.rb:20 + def failure_message_when_negated; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/equal.rb:49 + def actual_inspected; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/equal.rb:61 + def detailed_failure_message; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/equal.rb:45 + def expected_is_a_literal_singleton?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/equal.rb:75 + def inspect_object(o); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/equal.rb:39 + def match(expected, actual); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/equal.rb:57 + def simple_failure_message; end +end + +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/equal.rb:43 +RSpec::Matchers::BuiltIn::Equal::LITERAL_SINGLETONS = T.let(T.unsafe(nil), Array) + +# @api private +# Provides the implementation for `exist`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/exist.rb:7 +class RSpec::Matchers::BuiltIn::Exist < ::RSpec::Matchers::BuiltIn::BaseMatcher + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/exist.rb:8 + def initialize(*expected); end + + # @api private + # @return [Boolean] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/exist.rb:22 + def does_not_match?(actual); end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/exist.rb:30 + def failure_message; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/exist.rb:36 + def failure_message_when_negated; end + + # @api private + # @return [Boolean] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/exist.rb:14 + def matches?(actual); end +end + +# @api private +# Simple class for memoizing actual/expected for this matcher +# and examining the match +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/exist.rb:43 +class RSpec::Matchers::BuiltIn::Exist::ExistenceTest < ::Struct + # @api private + # @return [Boolean] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/exist.rb:52 + def actual_exists?; end + + # @api private + # @return [Boolean] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/exist.rb:46 + def valid_test?; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/exist.rb:58 + def validity_message; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/exist.rb:83 + def deprecated(predicate, actual); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/exist.rb:75 + def existence_values; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/exist.rb:79 + def predicates; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/exist.rb:71 + def uniq_truthy_values; end +end + +# @api private +# Provides the implementation for `has_`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/has.rb:152 +class RSpec::Matchers::BuiltIn::Has < ::RSpec::Matchers::BuiltIn::DynamicPredicate + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/has.rb:156 + def predicate; end +end + +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/has.rb:154 +RSpec::Matchers::BuiltIn::Has::REGEX = T.let(T.unsafe(nil), Regexp) + +# @api private +# Provides the implementation for `have_attributes`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/have_attributes.rb:7 +class RSpec::Matchers::BuiltIn::HaveAttributes < ::RSpec::Matchers::BuiltIn::BaseMatcher + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/have_attributes.rb:11 + def initialize(expected); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/have_attributes.rb:19 + def actual; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/have_attributes.rb:43 + def description; end + + # @api private + # @return [Boolean] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/have_attributes.rb:50 + def diffable?; end + + # @api private + # @return [Boolean] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/have_attributes.rb:34 + def does_not_match?(actual); end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/have_attributes.rb:56 + def failure_message; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/have_attributes.rb:64 + def failure_message_when_negated; end + + # @api private + # @return [Boolean] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/have_attributes.rb:25 + def matches?(actual); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/have_attributes.rb:9 + def respond_to_failed; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/have_attributes.rb:85 + def actual_has_attribute?(attribute_key, attribute_value); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/have_attributes.rb:70 + def cache_all_values; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/have_attributes.rb:107 + def formatted_values; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/have_attributes.rb:78 + def perform_match(predicate); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/have_attributes.rb:89 + def respond_to_attributes?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/have_attributes.rb:99 + def respond_to_failure_message_or; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/have_attributes.rb:95 + def respond_to_matcher; end +end + +# @api private +# Provides the implementation for `include`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/include.rb:9 +class RSpec::Matchers::BuiltIn::Include < ::RSpec::Matchers::BuiltIn::BaseMatcher + include ::RSpec::Matchers::BuiltIn::CountExpectation + + # @api private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/include.rb:15 + def initialize(*expecteds); end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/include.rb:44 + def description; end + + # @api private + # @return [Boolean] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/include.rb:62 + def diffable?; end + + # @api private + # @return [Boolean] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/include.rb:33 + def does_not_match?(actual); end + + # @api private + # @return [Array, Hash] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/include.rb:68 + def expected; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/include.rb:12 + def expecteds; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/include.rb:50 + def failure_message; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/include.rb:56 + def failure_message_when_negated; end + + # @api private + # @return [Boolean] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/include.rb:22 + def matches?(actual); end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/include.rb:168 + def actual_collection_includes?(expected_item); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/include.rb:154 + def actual_hash_has_key?(expected_key); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/include.rb:142 + def actual_hash_includes?(expected_key, expected_value); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/include.rb:78 + def check_actual?(actual); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/include.rb:84 + def check_expected_count?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/include.rb:150 + def comparing_hash_keys?(expected_item); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/include.rb:138 + def comparing_hash_to_a_subset?(expected_item); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/include.rb:212 + def convert_to_hash?(obj); end + + # :nocov: + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/include.rb:185 + def count_enumerable(expected_item); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/include.rb:190 + def count_inclusions; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/include.rb:202 + def diff_would_wrongly_highlight_matched_item?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/include.rb:121 + def excluded_from_actual; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/include.rb:96 + def format_failure_message(preposition); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/include.rb:116 + def perform_match(&block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/include.rb:107 + def readable_list_of(items); end +end + +# @api private +# Provides the implementation for `match`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/match.rb:7 +class RSpec::Matchers::BuiltIn::Match < ::RSpec::Matchers::BuiltIn::BaseMatcher + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/match.rb:8 + def initialize(expected); end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/match.rb:15 + def description; end + + # @api private + # @return [Boolean] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/match.rb:25 + def diffable?; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/match.rb:38 + def failure_message; end + + # Used to specify the captures we match against + # @return [self] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/match.rb:31 + def with_captures(*captures); end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/match.rb:57 + def can_safely_call_match?(expected, actual); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/match.rb:49 + def match(expected, actual); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/match.rb:64 + def match_captures(expected, actual); end +end + +# @private +# Handles operator matcher for `should_not`. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/operators.rb:116 +class RSpec::Matchers::BuiltIn::NegativeOperatorMatcher < ::RSpec::Matchers::BuiltIn::OperatorMatcher + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/operators.rb:117 + def __delegate_operator(actual, operator, expected); end +end + +# @private +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/output.rb:128 +module RSpec::Matchers::BuiltIn::NullCapture + class << self + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/output.rb:133 + def capture(_block); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/output.rb:129 + def name; end + end +end + +# @api private +# Provides the implementation for operator matchers. +# Not intended to be instantiated directly. +# Only available for use with `should`. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/operators.rb:10 +class RSpec::Matchers::BuiltIn::OperatorMatcher + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/operators.rb:41 + def initialize(actual); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/operators.rb:57 + def !=(_expected); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/operators.rb:57 + def !~(_expected); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/operators.rb:47 + def <(expected); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/operators.rb:47 + def <=(expected); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/operators.rb:47 + def ==(expected); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/operators.rb:47 + def ===(expected); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/operators.rb:47 + def =~(expected); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/operators.rb:47 + def >(expected); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/operators.rb:47 + def >=(expected); end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/operators.rb:76 + def description; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/operators.rb:70 + def fail_with_message(message); end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/operators.rb:88 + def eval_match(actual, operator, expected); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/operators.rb:82 + def has_non_generic_implementation_of?(op); end + + class << self + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/operators.rb:29 + def get(klass, operator); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/operators.rb:18 + def register(klass, operator, matcher); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/operators.rb:13 + def registry; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/operators.rb:24 + def unregister(klass, operator); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/operators.rb:46 + def use_custom_matcher_or_delegate(operator); end + end +end + +# @api private +# Provides the implementation for `output`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/output.rb:9 +class RSpec::Matchers::BuiltIn::Output < ::RSpec::Matchers::BuiltIn::BaseMatcher + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/output.rb:10 + def initialize(expected); end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/output.rb:76 + def description; end + + # @api private + # @return [Boolean] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/output.rb:86 + def diffable?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/output.rb:24 + def does_not_match?(block); end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/output.rb:64 + def failure_message; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/output.rb:70 + def failure_message_when_negated; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/output.rb:17 + def matches?(block); end + + # @api private + # Indicates this matcher matches against a block. + # @return [True] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/output.rb:93 + def supports_block_expectations?; end + + # @api private + # Indicates this matcher matches against a block only. + # @return [False] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/output.rb:100 + def supports_value_expectations?; end + + # @api public + # Tells the matcher to match against stderr. + # Works only when the main Ruby process prints to stderr + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/output.rb:39 + def to_stderr; end + + # @api public + # Tells the matcher to match against stderr. + # Works when subprocesses print to stderr as well. + # This is significantly (~30x) slower than `to_stderr` + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/output.rb:57 + def to_stderr_from_any_process; end + + # @api public + # Tells the matcher to match against stdout. + # Works only when the main Ruby process prints to stdout + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/output.rb:31 + def to_stdout; end + + # @api public + # Tells the matcher to match against stdout. + # Works when subprocesses print to stdout as well. + # This is significantly (~30x) slower than `to_stdout` + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/output.rb:48 + def to_stdout_from_any_process; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/output.rb:121 + def actual_output_description; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/output.rb:106 + def captured?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/output.rb:116 + def negative_failure_reason; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/output.rb:110 + def positive_failure_reason; end +end + +# @private +# Handles operator matcher for `should`. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/operators.rb:97 +class RSpec::Matchers::BuiltIn::PositiveOperatorMatcher < ::RSpec::Matchers::BuiltIn::OperatorMatcher + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/operators.rb:98 + def __delegate_operator(actual, operator, expected); end +end + +# @api private +# Provides the implementation for `raise_error`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:9 +class RSpec::Matchers::BuiltIn::RaiseError + include ::RSpec::Matchers::Composable + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:22 + def initialize(expected_error_or_message, expected_message, &block); end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:117 + def description; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:83 + def does_not_match?(given_proc); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:99 + def expects_call_stack_jump?; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:105 + def failure_message; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:111 + def failure_message_when_negated; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:52 + def matches?(given_proc, negative_expectation = T.unsafe(nil), &block); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:89 + def supports_block_expectations?; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:94 + def supports_value_expectations?; end + + # @api public + # Specifies the expected error message. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:43 + def with_message(expected_message); end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:123 + def actual_error_message; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:137 + def block_matches?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:133 + def error_and_message_match?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:145 + def eval_block; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:129 + def expectation_matched?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:226 + def expected_error; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:257 + def expecting_specific_exception?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:241 + def format_backtrace(backtrace); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:246 + def given_error; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:176 + def handle_warning(message); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:261 + def raise_message_already_set; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:141 + def ready_to_eval_block?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:155 + def verify_message; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:188 + def warn_about_bare_error!; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:180 + def warn_about_bare_error?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:214 + def warn_about_negative_false_positive!(expression); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:201 + def warn_about_nil_error!; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:184 + def warn_about_nil_error?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:160 + def warn_for_negative_false_positives!; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:266 + def warning; end +end + +# Used as a sentinel value to be able to tell when the user did not pass an +# argument. We can't use `nil` for that because we need to warn when `nil` is +# passed in a different way. It's an Object, not a Module, since Module's `===` +# does not evaluate to true when compared to itself. +# +# Note; this _is_ the default value supplied for expected_error_or_message, but +# because there are two method-calls involved, that default is actually supplied +# in the definition of the _matcher_ method, `RSpec::Matchers#raise_error` +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/raise_error.rb:20 +RSpec::Matchers::BuiltIn::RaiseError::UndefinedValue = T.let(T.unsafe(nil), Object) + +# @api private +# Used to wrap match data and make it reliable for 1.8.7 +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/match.rb:84 +class RSpec::Matchers::BuiltIn::ReliableMatchData + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/match.rb:85 + def initialize(match_data); end + + # @api private + # returns an array of captures from the match data + # @return Array + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/match.rb:110 + def captures; end + + # @api private + # Returns match data names for named captures + # @return Array + # :nocov: + # @api private + # Returns match data names for named captures + # @return Array + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/match.rb:102 + def names; end + + protected + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/match.rb:116 + def match_data; end +end + +# @api private +# Provides the implementation for `respond_to`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/respond_to.rb:9 +class RSpec::Matchers::BuiltIn::RespondTo < ::RSpec::Matchers::BuiltIn::BaseMatcher + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/respond_to.rb:10 + def initialize(*names); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/respond_to.rb:52 + def and_any_keywords; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/respond_to.rb:40 + def and_keywords(*keywords); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/respond_to.rb:64 + def and_unlimited_arguments; end + + # @api public + # No-op. Intended to be used as syntactic sugar when using `with`. + # + # @example + # expect(obj).to respond_to(:message).with(3).arguments + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/respond_to.rb:71 + def argument; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/respond_to.rb:74 + def arguments; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/respond_to.rb:100 + def description; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/respond_to.rb:82 + def does_not_match?(actual); end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/respond_to.rb:88 + def failure_message; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/respond_to.rb:94 + def failure_message_when_negated; end + + # @api private + # Used by other matchers to suppress a check + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/respond_to.rb:106 + def ignoring_method_signature_failure!; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/respond_to.rb:77 + def matches?(actual); end + + # @api public + # Specifies the number of expected arguments. + # + # @example + # expect(obj).to respond_to(:message).with(3).arguments + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/respond_to.rb:24 + def with(n); end + + # @api public + # Specifies that the method accepts any keyword, i.e. the method has + # a splatted keyword parameter of the form **kw_args. + # + # @example + # expect(obj).to respond_to(:message).with_any_keywords + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/respond_to.rb:48 + def with_any_keywords; end + + # @api public + # Specifies keyword arguments, if any. + # + # @example + # expect(obj).to respond_to(:message).with_keywords(:color, :shape) + # @example with an expected number of arguments + # expect(obj).to respond_to(:message).with(3).arguments.and_keywords(:color, :shape) + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/respond_to.rb:36 + def with_keywords(*keywords); end + + # @api public + # Specifies that the number of arguments has no upper limit, i.e. the + # method has a splatted parameter of the form *args. + # + # @example + # expect(obj).to respond_to(:message).with_unlimited_arguments + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/respond_to.rb:60 + def with_unlimited_arguments; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/respond_to.rb:112 + def find_failing_method_names(actual, filter_method); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/respond_to.rb:119 + def matches_arity?(actual, name); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/respond_to.rb:156 + def pp_names; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/respond_to.rb:130 + def with_arity; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/respond_to.rb:139 + def with_arity_string; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/respond_to.rb:143 + def with_keywords_string; end +end + +# @private +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/respond_to.rb:161 +class RSpec::Matchers::BuiltIn::RespondTo::ArityCheck + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/respond_to.rb:162 + def initialize(expected_arity, expected_keywords, arbitrary_keywords, unlimited_arguments); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/respond_to.rb:178 + def matches?(actual, name); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/respond_to.rb:187 + def method_signature_for(actual, name); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/respond_to.rb:183 + def verifier_for(actual, name); end +end + +# @api private +# Provides the implementation for `satisfy`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/satisfy.rb:7 +class RSpec::Matchers::BuiltIn::Satisfy < ::RSpec::Matchers::BuiltIn::BaseMatcher + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/satisfy.rb:8 + def initialize(description = T.unsafe(nil), &block); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/satisfy.rb:21 + def description; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/satisfy.rb:27 + def failure_message; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/satisfy.rb:33 + def failure_message_when_negated; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/satisfy.rb:14 + def matches?(actual, &block); end + + private + + # :nocov: + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/satisfy.rb:40 + def block_representation; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/satisfy.rb:48 + def extract_block_snippet; end +end + +# @api private +# Base class for specifying a change from and/or to specific values. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:181 +class RSpec::Matchers::BuiltIn::SpecificValuesChange < ::RSpec::Matchers::BuiltIn::BaseMatcher + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:185 + def initialize(change_details, from, to); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:197 + def description; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:202 + def failure_message; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:192 + def matches?(event_proc); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:210 + def supports_block_expectations?; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:215 + def supports_value_expectations?; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:244 + def after_value_failure; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:238 + def before_value_failure; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:255 + def did_change_failure; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:250 + def did_not_change_failure; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:234 + def matches_after?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:261 + def not_given_a_block_failure; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:221 + def perform_change(event_proc); end +end + +# @private +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/change.rb:183 +RSpec::Matchers::BuiltIn::SpecificValuesChange::MATCH_ANYTHING = BasicObject + +# For RSpec 3.1, the base class was named `StartAndEndWith`. For SemVer reasons, +# we still provide this constant until 4.0. +# @deprecated Use StartOrEndWith instead. +# @private +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/start_or_end_with.rb:61 +RSpec::Matchers::BuiltIn::StartAndEndWith = RSpec::Matchers::BuiltIn::StartOrEndWith + +# @api private +# Base class for the `end_with` and `start_with` matchers. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/start_or_end_with.rb:7 +class RSpec::Matchers::BuiltIn::StartOrEndWith < ::RSpec::Matchers::BuiltIn::BaseMatcher + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/start_or_end_with.rb:8 + def initialize(*expected); end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/start_or_end_with.rb:27 + def description; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/start_or_end_with.rb:15 + def failure_message; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/start_or_end_with.rb:36 + def match(_expected, actual); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/start_or_end_with.rb:48 + def subsets_comparable?; end +end + +# @api private +# Provides the implementation for `start_with`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/start_or_end_with.rb:66 +class RSpec::Matchers::BuiltIn::StartWith < ::RSpec::Matchers::BuiltIn::StartOrEndWith + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/start_or_end_with.rb:73 + def element_matches?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/start_or_end_with.rb:69 + def subset_matches?; end +end + +# @api private +# Provides the implementation for `throw_symbol`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/throw_symbol.rb:7 +class RSpec::Matchers::BuiltIn::ThrowSymbol + include ::RSpec::Matchers::Composable + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/throw_symbol.rb:10 + def initialize(expected_symbol = T.unsafe(nil), expected_arg = T.unsafe(nil)); end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/throw_symbol.rb:86 + def description; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/throw_symbol.rb:68 + def does_not_match?(given_proc); end + + # @api private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/throw_symbol.rb:103 + def expects_call_stack_jump?; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/throw_symbol.rb:74 + def failure_message; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/throw_symbol.rb:80 + def failure_message_when_negated; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/throw_symbol.rb:18 + def matches?(given_proc); end + + # @api private + # Indicates this matcher matches against a block. + # @return [True] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/throw_symbol.rb:93 + def supports_block_expectations?; end + + # @api private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/throw_symbol.rb:98 + def supports_value_expectations?; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/throw_symbol.rb:109 + def actual_result; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/throw_symbol.rb:118 + def caught; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/throw_symbol.rb:114 + def expected(symbol_desc = T.unsafe(nil)); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/throw_symbol.rb:122 + def throw_description(symbol, arg); end +end + +# @api private +# Provides the implementation for `yield_control`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:101 +class RSpec::Matchers::BuiltIn::YieldControl < ::RSpec::Matchers::BuiltIn::BaseMatcher + include ::RSpec::Matchers::BuiltIn::CountExpectation + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:111 + def does_not_match?(block); end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:117 + def failure_message; end + + # @api private + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:123 + def failure_message_when_negated; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:104 + def matches?(block); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:128 + def supports_block_expectations?; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:133 + def supports_value_expectations?; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:139 + def failure_reason; end +end + +# @private +# Object that is yielded to `expect` when one of the +# yield matchers is used. Provides information about +# the yield behavior of the object-under-test. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:12 +class RSpec::Matchers::BuiltIn::YieldProbe + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:21 + def initialize(block, &callback); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:68 + def assert_used!; end + + # :nocov: + # On 1.8.7, `lambda { }.arity` and `lambda { |*a| }.arity` both return -1, + # so we can't distinguish between accepting no args and an arg splat. + # It's OK to skip, this, though; it just provides a nice error message + # when the user forgets to accept an arg in their block. They'll still get + # the `assert_used!` error message from above, which is sufficient. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:78 + def assert_valid_expect_block!; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:29 + def has_block?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:19 + def num_yields; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:19 + def num_yields=(_arg0); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:33 + def probe; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:53 + def single_yield_args; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:40 + def to_proc; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:19 + def yielded_args; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:19 + def yielded_args=(_arg0); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:57 + def yielded_once?(matcher_name); end + + class << self + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:13 + def probe(block, &callback); end + end +end + +# @api private +# Provides the implementation for `yield_successive_args`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:296 +class RSpec::Matchers::BuiltIn::YieldSuccessiveArgs < ::RSpec::Matchers::BuiltIn::BaseMatcher + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:297 + def initialize(*args); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:337 + def description; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:320 + def does_not_match?(block); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:325 + def failure_message; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:331 + def failure_message_when_negated; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:302 + def matches?(block); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:342 + def supports_block_expectations?; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:347 + def supports_value_expectations?; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:353 + def expected_arg_description; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:365 + def negative_failure_reason; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:357 + def positive_failure_reason; end +end + +# @api private +# Provides the implementation for `yield_with_args`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:199 +class RSpec::Matchers::BuiltIn::YieldWithArgs < ::RSpec::Matchers::BuiltIn::BaseMatcher + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:200 + def initialize(*args); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:233 + def description; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:218 + def does_not_match?(block); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:223 + def failure_message; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:228 + def failure_message_when_negated; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:205 + def matches?(block); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:240 + def supports_block_expectations?; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:245 + def supports_value_expectations?; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:288 + def all_args_match?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:273 + def args_currently_match?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:257 + def expected_arg_description; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:261 + def negative_failure_reason; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:251 + def positive_failure_reason; end +end + +# @api private +# Provides the implementation for `yield_with_no_args`. +# Not intended to be instantiated directly. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:149 +class RSpec::Matchers::BuiltIn::YieldWithNoArgs < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:158 + def does_not_match?(block); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:163 + def failure_message; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:168 + def failure_message_when_negated; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:151 + def matches?(block); end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:173 + def supports_block_expectations?; end + + # @private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:178 + def supports_value_expectations?; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:190 + def negative_failure_reason; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/built_in/yield.rb:184 + def positive_failure_reason; end +end + +# Mixin designed to support the composable matcher features +# of RSpec 3+. Mix it into your custom matcher classes to +# allow them to be used in a composable fashion. +# +# @api public +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/composable.rb:10 +module RSpec::Matchers::Composable + # pkg:gem/rspec-expectations#lib/rspec/matchers/composable.rb:25 + def &(matcher); end + + # Delegates to `#matches?`. Allows matchers to be used in composable + # fashion and also supports using matchers in case statements. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/composable.rb:45 + def ===(value); end + + # Creates a compound `and` expectation. The matcher will + # only pass if both sub-matchers pass. + # This can be chained together to form an arbitrarily long + # chain of matchers. + # + # @example + # expect(alphabet).to start_with("a").and end_with("z") + # expect(alphabet).to start_with("a") & end_with("z") + # + # @note The negative form (`expect(...).not_to matcher.and other`) + # is not supported at this time. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/composable.rb:22 + def and(matcher); end + + # Creates a compound `or` expectation. The matcher will + # pass if either sub-matcher passes. + # This can be chained together to form an arbitrarily long + # chain of matchers. + # + # @example + # expect(stoplight.color).to eq("red").or eq("green").or eq("yellow") + # expect(stoplight.color).to eq("red") | eq("green") | eq("yellow") + # + # @note The negative form (`expect(...).not_to matcher.or other`) + # is not supported at this time. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/composable.rb:38 + def or(matcher); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/composable.rb:41 + def |(matcher); end + + private + + # Returns the description of the given object in a way that is + # aware of composed matchers. If the object is a matcher with + # a `description` method, returns the description; otherwise + # returns `object.inspect`. + # + # You are encouraged to use this in your custom matcher's + # `description`, `failure_message` or + # `failure_message_when_negated` implementation if you are + # supporting matcher arguments. + # + # @!visibility public + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/composable.rb:82 + def description_of(object); end + + # @api private + # We should enumerate arrays as long as they are not recursive. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/composable.rb:142 + def should_enumerate?(item); end + + # 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. + # + # You are encouraged to use this in your custom matcher's + # `description`, `failure_message` or + # `failure_message_when_negated` implementation if you are + # supporting any arguments which may be a data structure + # containing matchers. + # + # @!visibility public + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/composable.rb:98 + def surface_descriptions_in(item); end + + # @api private + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/composable.rb:147 + def unreadable_io?(object); end + + # This provides a generic way to fuzzy-match an expected value against + # an actual value. It understands nested data structures (e.g. hashes + # and arrays) and is able to match against a matcher being used as + # the expected value or within the expected value at any level of + # nesting. + # + # Within a custom matcher you are encouraged to use this whenever your + # matcher needs to match two values, unless it needs more precise semantics. + # For example, the `eq` matcher _does not_ use this as it is meant to + # use `==` (and only `==`) for matching. + # + # @param expected [Object] what is expected + # @param actual [Object] the actual value + # + # @!visibility public + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/composable.rb:66 + def values_match?(expected, actual); end + + # @private + # Historically, a single matcher instance was only checked + # against a single value. Given that the matcher was only + # used once, it's been common to memoize some intermediate + # calculation that is derived from the `actual` value in + # order to reuse that intermediate result in the failure + # message. + # + # This can cause a problem when using such a matcher as an + # argument to another matcher in a composed matcher expression, + # since the matcher instance may be checked against multiple + # values and produce invalid results due to the memoization. + # + # To deal with this, we clone any matchers in `expected` via + # this method when using `values_match?`, so that any memoization + # does not "leak" between checks. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/composable.rb:128 + def with_matchers_cloned(object); end + + class << self + # pkg:gem/rspec-expectations#lib/rspec/matchers/composable.rb:154 + def should_enumerate?(item); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/composable.rb:154 + def surface_descriptions_in(item); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/composable.rb:154 + def unreadable_io?(object); end + end +end + +# Wraps an item in order to surface its `description` via `inspect`. +# @api private +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/composable.rb:158 +class RSpec::Matchers::Composable::DescribableItem < ::Struct + # pkg:gem/rspec-expectations#lib/rspec/matchers/composable.rb:160 + def inspect; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/composable.rb:158 + def item; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/composable.rb:158 + def item=(_); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/composable.rb:165 + def pretty_print(pp); end + + class << self + # pkg:gem/rspec-expectations#lib/rspec/matchers/composable.rb:158 + def [](*_arg0); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/composable.rb:158 + def inspect; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/composable.rb:158 + def keyword_init?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/composable.rb:158 + def members; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/composable.rb:158 + def new(*_arg0); end + end +end + +# Defines the custom matcher DSL. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/dsl.rb:6 +module RSpec::Matchers::DSL + # 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. + # + # @example + # RSpec::Matchers.alias_matcher :a_list_that_sums_to, :sum_to + # sum_to(3).description # => "sum to 3" + # a_list_that_sums_to(3).description # => "a list that sums to 3" + # + # @example + # RSpec::Matchers.alias_matcher :a_list_sorted_by, :be_sorted_by do |description| + # description.sub("be sorted by", "a list sorted by") + # end + # + # be_sorted_by(:age).description # => "be sorted by age" + # a_list_sorted_by(:age).description # => "a list sorted by age" + # + # @param new_name [Symbol] the new name for the matcher + # @param old_name [Symbol] the original name for the matcher + # @param options [Hash] options for the aliased matcher + # @option options [Class] :klass the ruby class to use as the decorator. (Not normally used). + # @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. + # @see RSpec::Matchers + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/dsl.rb:32 + def alias_matcher(new_name, old_name, options = T.unsafe(nil), &description_override); end + + # Defines a custom matcher. + # + # @param name [Symbol] the name for the matcher + # @yield [Object] block that is used to define the matcher. + # The block is evaluated in the context of your custom matcher class. + # When args are passed to your matcher, they will be yielded here, + # usually representing the expected value(s). + # @see RSpec::Matchers + # + # pkg:gem/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 overridden to reflect the phrasing of the new name, and the match logic will + # be based on the original matcher but negated. + # + # @example + # RSpec::Matchers.define_negated_matcher :exclude, :include + # include(1, 2).description # => "include 1 and 2" + # exclude(1, 2).description # => "exclude 1 and 2" + # + # @param negated_name [Symbol] the name for the negated matcher + # @param base_name [Symbol] the name of the original matcher that will be negated + # @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. + # @see RSpec::Matchers + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/dsl.rb:61 + def define_negated_matcher(negated_name, base_name, &description_override); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/dsl.rb:79 + def matcher(name, &declarations); end + + private + + # :nocov: + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/dsl.rb:84 + def warn_about_block_args(name, declarations); end +end + +# Defines default implementations of the matcher +# protocol methods for custom matchers. You can +# override any of these using the {RSpec::Matchers::DSL::Macros Macros} methods +# from within an `RSpec::Matchers.define` block. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/dsl.rb:385 +module RSpec::Matchers::DSL::DefaultImplementations + include ::RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages + + # The default description. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/dsl.rb:395 + def description; end + + # @api private + # Used internally by objects returns by `should` and `should_not`. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/dsl.rb:390 + def diffable?; end + + # Most matchers do not expect call stack jumps. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/dsl.rb:412 + def expects_call_stack_jump?; end + + # Matchers do not support block expectations by default. You + # must opt-in. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/dsl.rb:403 + def supports_block_expectations?; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/dsl.rb:407 + def supports_value_expectations?; end + + private + + # pkg:gem/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. +# +# pkg:gem/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 + # return self in order to chain methods together. `chain` handles that + # for you. If the method is invoked and the + # `include_chain_clauses_in_custom_matcher_descriptions` config option + # hash been enabled, the chained method name and args will be added to the + # default description and failure message. + # + # In the common case where you just want the chained method to store some + # value(s) for later use (e.g. in `match`), you can provide one or more + # attribute names instead of a block; the chained method will store its + # arguments in instance variables with those names, and the values will + # be exposed via getters. + # + # @example + # + # RSpec::Matchers.define :have_errors_on do |key| + # chain :with do |message| + # @message = message + # end + # + # match do |actual| + # actual.errors[key] == @message + # end + # end + # + # expect(minor).to have_errors_on(:age).with("Not old enough to participate") + # + # pkg:gem/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 + # the description generated by default doesn't suit your needs. + # + # @example + # + # RSpec::Matchers.define :qualify_for do |expected| + # match { your_match_logic } + # + # description do + # "qualify for #{expected}" + # end + # end + # + # @yield [Object] actual the actual object (i.e. the value wrapped by `expect`) + # + # pkg:gem/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. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/dsl.rb:259 + def diffable; end + + # 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. + # + # @example + # + # RSpec::Matchers.define :have_strength do |expected| + # match { your_match_logic } + # + # failure_message do |actual| + # "Expected strength of #{expected}, but had #{actual.strength}" + # end + # end + # + # @yield [Object] actual the actual object (i.e. the value wrapped by `expect`) + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/dsl.rb:216 + def failure_message(&definition); end + + # 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. + # + # @example + # + # RSpec::Matchers.define :have_strength do |expected| + # match { your_match_logic } + # + # failure_message_when_negated do |actual| + # "Expected not to have strength of #{expected}, but did" + # end + # end + # + # @yield [Object] actual the actual object (i.e. the value wrapped by `expect`) + # + # pkg:gem/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 + # or fails. The block should return a boolean value. When the matcher is + # passed to `expect(...).to` and the block returns `true`, then the expectation + # passes. Similarly, when the matcher is passed to `expect(...).not_to` and the + # block returns `false`, then the expectation passes. + # + # @example + # + # RSpec::Matchers.define :be_even do + # match do |actual| + # actual.even? + # end + # end + # + # expect(4).to be_even # passes + # expect(3).not_to be_even # passes + # expect(3).to be_even # fails + # expect(4).not_to be_even # fails + # + # By default the match block will swallow expectation errors (e.g. + # caused by using an expectation such as `expect(1).to eq 2`), if you + # wish to allow these to bubble up, pass in the option + # `:notify_expectation_failures => true`. + # + # @param [Hash] options for defining the behavior of the match block. + # @yield [Object] actual the actual value (i.e. the value wrapped by `expect`) + # + # pkg:gem/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 + # rather than returning false to indicate a failure. + # + # @example + # + # RSpec::Matchers.define :accept_as_valid do |candidate_address| + # match_unless_raises ValidationException do |validator| + # validator.validate(candidate_address) + # end + # end + # + # expect(email_validator).to accept_as_valid("person@company.com") + # + # @yield [Object] actual the actual object (i.e. the value wrapped by `expect`) + # + # pkg:gem/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`) + # when the positive and negative forms require different handling. This + # is rarely necessary, but can be helpful, for example, when specifying + # asynchronous processes that require different timeouts. + # + # By default the match block will swallow expectation errors (e.g. + # caused by using an expectation such as `expect(1).to eq 2`), if you + # wish to allow these to bubble up, pass in the option + # `:notify_expectation_failures => true`. + # + # @param [Hash] options for defining the behavior of the match block. + # @yield [Object] actual the actual value (i.e. the value wrapped by `expect`) + # + # pkg:gem/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. + # Users will not be able to use your matcher in a block + # expectation without declaring this. + # (e.g. `expect { do_something }.to matcher`). + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/dsl.rb:267 + def supports_block_expectations; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/dsl.rb:312 + def assign_attributes(attr_names); end + + # Does the following: + # + # - 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 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` + # as an arg, but only if their block's arity can handle it. + # + # This compiles the user block into an actual method, allowing + # them to use normal method constructs like `return` + # (e.g. for an early guard statement), while allowing us to define + # an override that can provide the wrapped handling + # (e.g. assigning `@actual`, rescueing errors, etc) and + # can `super` to the user's definition. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/dsl.rb:346 + def define_user_override(method_name, user_def, &our_def); end +end + +# Defines deprecated macro methods from RSpec 2 for backwards compatibility. +# @deprecated Use the methods from {Macros} instead. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/dsl.rb:354 +module RSpec::Matchers::DSL::Macros::Deprecated + # @deprecated Use {Macros#failure_message} instead. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/dsl.rb:368 + def failure_message_for_should(&definition); end + + # @deprecated Use {Macros#failure_message_when_negated} instead. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/dsl.rb:374 + def failure_message_for_should_not(&definition); end + + # @deprecated Use {Macros#match} instead. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/dsl.rb:356 + def match_for_should(&definition); end + + # @deprecated Use {Macros#match_when_negated} instead. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/dsl.rb:362 + def match_for_should_not(&definition); end +end + +# @private +# +# pkg:gem/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 +# `RSpec::Matchers.define` will be evaluated in the context +# of the singleton class of an instance, and will have the +# {RSpec::Matchers::DSL::Macros Macros} methods available. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/dsl.rb:433 +class RSpec::Matchers::DSL::Matcher + include ::RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages + include ::RSpec::Matchers::DSL::DefaultImplementations + include ::RSpec::Matchers + include ::RSpec::Matchers::Composable + extend ::RSpec::Matchers::DSL::Macros + extend ::RSpec::Matchers::DSL::Macros::Deprecated + + # @api private + # + # pkg:gem/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`. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/dsl.rb:449 + def actual; end + + # The block parameter used in the expectation + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/dsl.rb:456 + def block_arg; end + + # Provides the expected value. This will return an array if + # multiple arguments were passed to the matcher; otherwise it + # will return a single value. + # @see #expected_as_array + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/dsl.rb:483 + def expected; end + + # Returns the expected value as an an array. This exists primarily + # to aid in upgrading from RSpec 2.x, since in RSpec 2, `expected` + # always returned an array. + # @see #expected + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/dsl.rb:495 + 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`) + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/dsl.rb:500 + def inspect; end + + # The name of the matcher. + # + # pkg:gem/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. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/dsl.rb:453 + def rescued_exception; end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/dsl.rb:523 + def actual_arg_for(block); end + + # Takes care of forwarding unhandled messages to the + # `@matcher_execution_context` (typically the current + # running `RSpec::Core::Example`). This is needed by + # rspec-rails so that it can define matchers that wrap + # Rails' test helper methods, but it's also a useful + # feature in its own right. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/dsl.rb:533 + def method_missing(method, *args, **, &block); end + + # Indicates that this matcher responds to messages + # from the `@matcher_execution_context` as well. + # Also, supports getting a method object for such methods. + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/dsl.rb:508 + def respond_to_missing?(method, include_private = T.unsafe(nil)); end +end + +# pkg:gem/rspec-expectations#lib/rspec/matchers.rb:959 +RSpec::Matchers::DYNAMIC_MATCHER_REGEX = T.let(T.unsafe(nil), Regexp) + +# Facilitates converting ruby objects to English phrases. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/english_phrasing.rb:4 +module RSpec::Matchers::EnglishPhrasing + class << self + # @note The returned string has a leading space except + # when given an empty list. + # + # Converts an object (often a collection of objects) + # into an English list. + # + # list(['banana', 'kiwi', 'mango']) + # #=> " \"banana\", \"kiwi\", and \"mango\"" + # + # Given an empty collection, returns the empty string. + # + # list([]) #=> "" + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/english_phrasing.rb:26 + def list(obj); end + + # Converts a symbol into an English expression. + # + # split_words(:banana_creme_pie) #=> "banana creme pie" + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/english_phrasing.rb:9 + def split_words(sym); end + end +end + +# pkg:gem/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 +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/matcher_delegator.rb:31 +class RSpec::Matchers::MatcherDelegator < ::RSpec::Matchers::BaseDelegator + include ::RSpec::Matchers::Composable + + # pkg:gem/rspec-expectations#lib/rspec/matchers/matcher_delegator.rb:35 + def initialize(base_matcher); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/matcher_delegator.rb:33 + def base_matcher; end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/matcher_delegator.rb:39 + def method_missing(*args, &block); end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/matcher_delegator.rb:55 + def initialize_copy(other); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/matcher_delegator.rb:44 + def respond_to_missing?(name, include_all = T.unsafe(nil)); end +end + +# @api private +# Handles list of expected and actual value pairs when there is a need +# to render multiple diffs. Also can handle one pair. +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/multi_matcher_diff.rb:6 +class RSpec::Matchers::MultiMatcherDiff + # pkg:gem/rspec-expectations#lib/rspec/matchers/multi_matcher_diff.rb:16 + def initialize(expected_list); end + + # @api private + # Returns message with diff(s) appended for provided differ + # factory and actual value if there are any + # @param [String] message original failure message + # @param [Proc] differ + # @return [String] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/multi_matcher_diff.rb:47 + def message_with_diff(message, differ); end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/multi_matcher_diff.rb:68 + def diffs(differ); end + + class << self + # @api private + # Wraps provided matcher list in instance of + # MultiMatcherDiff. + # @param [Array] matchers list of matchers to wrap + # @return [RSpec::Matchers::MultiMatcherDiff] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/multi_matcher_diff.rb:37 + def for_many_matchers(matchers); end + + # @api private + # Wraps provided expected value in instance of + # MultiMatcherDiff. If provided value is already an + # MultiMatcherDiff then it just returns it. + # @param [Any] expected value to be wrapped + # @param [Any] actual value + # @return [RSpec::Matchers::MultiMatcherDiff] + # + # pkg:gem/rspec-expectations#lib/rspec/matchers/multi_matcher_diff.rb:27 + def from(expected, actual); end + + private + + # pkg:gem/rspec-expectations#lib/rspec/matchers/multi_matcher_diff.rb:58 + def diff_label_for(matcher); end + + # pkg:gem/rspec-expectations#lib/rspec/matchers/multi_matcher_diff.rb:62 + def truncated(description); end + end +end + +# @private +# Default diff label when there is only one matcher in diff +# output +# +# pkg:gem/rspec-expectations#lib/rspec/matchers/multi_matcher_diff.rb:10 +RSpec::Matchers::MultiMatcherDiff::DEFAULT_DIFF_LABEL = T.let(T.unsafe(nil), String) + +# @private +# Maximum readable matcher description length +# +# pkg:gem/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.13.2.rbi b/sorbet/rbi/gems/rspec-mocks@3.13.8.rbi similarity index 51% rename from sorbet/rbi/gems/rspec-mocks@3.13.2.rbi rename to sorbet/rbi/gems/rspec-mocks@3.13.8.rbi index b0c37de..33d9d75 100644 --- a/sorbet/rbi/gems/rspec-mocks@3.13.2.rbi +++ b/sorbet/rbi/gems/rspec-mocks@3.13.8.rbi @@ -8,148 +8,81 @@ # Share the top-level RSpec namespace, because we are a core supported # extension. # -# source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#1 -module RSpec - class << self - # source://rspec-core/3.13.3/lib/rspec/core.rb#70 - def clear_examples; end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#85 - def configuration; end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#49 - def configuration=(_arg0); end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#97 - def configure; end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#194 - def const_missing(name); end - - # source://rspec-core/3.13.3/lib/rspec/core/dsl.rb#42 - def context(*args, &example_group_block); end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#122 - def current_example; end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#128 - def current_example=(example); end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#154 - def current_scope; end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#134 - def current_scope=(scope); end - - # source://rspec-core/3.13.3/lib/rspec/core/dsl.rb#42 - def describe(*args, &example_group_block); end - - # source://rspec-core/3.13.3/lib/rspec/core/dsl.rb#42 - def example_group(*args, &example_group_block); end - - # source://rspec-core/3.13.3/lib/rspec/core/dsl.rb#42 - def fcontext(*args, &example_group_block); end - - # source://rspec-core/3.13.3/lib/rspec/core/dsl.rb#42 - def fdescribe(*args, &example_group_block); end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#58 - def reset; end - - # source://rspec-core/3.13.3/lib/rspec/core/shared_example_group.rb#110 - def shared_context(name, *args, &block); end - - # source://rspec-core/3.13.3/lib/rspec/core/shared_example_group.rb#110 - def shared_examples(name, *args, &block); end - - # source://rspec-core/3.13.3/lib/rspec/core/shared_example_group.rb#110 - def shared_examples_for(name, *args, &block); end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#160 - def world; end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#49 - def world=(_arg0); end - - # source://rspec-core/3.13.3/lib/rspec/core/dsl.rb#42 - def xcontext(*args, &example_group_block); end - - # source://rspec-core/3.13.3/lib/rspec/core/dsl.rb#42 - def xdescribe(*args, &example_group_block); end - end -end +# pkg:gem/rspec-mocks#lib/rspec/mocks/instance_method_stasher.rb:1 +module RSpec; end # Contains top-level utility methods. While this contains a few # public methods, these are not generally meant to be called from # a test or example. They exist primarily for integration with # test frameworks (such as rspec-core). # -# source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#2 +# pkg:gem/rspec-mocks#lib/rspec/mocks/instance_method_stasher.rb:2 module RSpec::Mocks class << self # Adds an allowance (stub) on `subject` # - # @example Defines the implementation of `foo` on `bar`, using the passed block - # x = 0 - # RSpec::Mocks.allow_message(bar, :foo) { x += 1 } # @param subject the subject to which the message will be added # @param message a symbol, representing the message that will be - # added. + # added. # @param opts a hash of options, :expected_from is used to set the - # original call site + # original call site # @yield an optional implementation for the allowance # - # source://rspec-mocks//lib/rspec/mocks.rb#69 + # @example Defines the implementation of `foo` on `bar`, using the passed block + # x = 0 + # RSpec::Mocks.allow_message(bar, :foo) { x += 1 } + # + # pkg:gem/rspec-mocks#lib/rspec/mocks.rb:69 def allow_message(subject, message, opts = T.unsafe(nil), &block); end # Mocks specific configuration, as distinct from `RSpec.configuration` # which is core RSpec configuration. # - # source://rspec-mocks//lib/rspec/mocks/configuration.rb#206 + # pkg:gem/rspec-mocks#lib/rspec/mocks/configuration.rb:206 def configuration; end # @private # - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#386 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:386 def error_generator; end # Sets a message expectation on `subject`. - # - # @example Expect the message `foo` to receive `bar`, then call it - # RSpec::Mocks.expect_message(bar, :foo) - # bar.foo # @param subject the subject on which the message will be expected # @param message a symbol, representing the message that will be - # expected. + # expected. # @param opts a hash of options, :expected_from is used to set the - # original call site + # original call site # @yield an optional implementation for the expectation # - # source://rspec-mocks//lib/rspec/mocks.rb#84 + # @example Expect the message `foo` to receive `bar`, then call it + # RSpec::Mocks.expect_message(bar, :foo) + # bar.foo + # + # pkg:gem/rspec-mocks#lib/rspec/mocks.rb:84 def expect_message(subject, message, opts = T.unsafe(nil), &block); end # Performs per-test/example setup. This should be called before # an test or example begins. # - # source://rspec-mocks//lib/rspec/mocks.rb#38 + # pkg:gem/rspec-mocks#lib/rspec/mocks.rb:38 def setup; end # @private # - # source://rspec-mocks//lib/rspec/mocks.rb#106 + # pkg:gem/rspec-mocks#lib/rspec/mocks.rb:106 def space; end # Cleans up all test double state (including any methods that were # redefined on partial doubles). This _must_ be called after # each example, even if an error was raised during the example. # - # source://rspec-mocks//lib/rspec/mocks.rb#51 + # pkg:gem/rspec-mocks#lib/rspec/mocks.rb:51 def teardown; end # Verifies any message expectations that were set during the # test or example. This should be called at the end of an example. # - # source://rspec-mocks//lib/rspec/mocks.rb#44 + # pkg:gem/rspec-mocks#lib/rspec/mocks.rb:44 def verify; end # Call the passed block and verify mocks after it has executed. This allows @@ -157,383 +90,283 @@ module RSpec::Mocks # # @return [Object] the return value from the block # - # source://rspec-mocks//lib/rspec/mocks.rb#92 + # pkg:gem/rspec-mocks#lib/rspec/mocks.rb:92 def with_temporary_scope; end end end # @private # -# source://rspec-mocks//lib/rspec/mocks/targets.rb#92 +# pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:92 class RSpec::Mocks::AllowanceTarget < ::RSpec::Mocks::TargetBase - # source://rspec-mocks//lib/rspec/mocks/targets.rb#93 + # pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:93 def expression; end - # source://rspec-mocks//lib/rspec/mocks/targets.rb#29 + # pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:29 def not_to(matcher, *_args); end - # source://rspec-mocks//lib/rspec/mocks/targets.rb#6 + # pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:6 def to(matcher, &block); end - # source://rspec-mocks//lib/rspec/mocks/targets.rb#29 + # pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:29 def to_not(matcher, *_args); end end # Handles the implementation of an `and_invoke` implementation. -# # @private # -# source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#737 +# pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:772 class RSpec::Mocks::AndInvokeImplementation - # @return [AndInvokeImplementation] a new instance of AndInvokeImplementation - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#738 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:773 def initialize(procs_to_invoke); end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#742 - def call(*args, **_arg1, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:777 + def call(*args, **, &block); end end # Handles the implementation of an `and_return` implementation. -# # @private # -# source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#721 +# pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:756 class RSpec::Mocks::AndReturnImplementation - # @return [AndReturnImplementation] a new instance of AndReturnImplementation - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#722 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:757 def initialize(values_to_return); end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#726 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:761 def call(*_args_to_ignore, &_block); end end # Represents an `and_call_original` implementation. -# # @private # -# source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#780 +# pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:815 class RSpec::Mocks::AndWrapOriginalImplementation - # @return [AndWrapOriginalImplementation] a new instance of AndWrapOriginalImplementation - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#781 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:816 def initialize(method, block); end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#808 - def call(*args, **_arg1, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:843 + def call(*args, **, &block); end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#788 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:823 def initial_action=(_value); end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#804 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:839 def inner_action; end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#792 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:827 def inner_action=(_value); end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#800 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:835 def present?; end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#796 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:831 def terminal_action=(_value); end private - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#815 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:850 def cannot_modify_further_error; end end -# source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#786 +# pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:821 class RSpec::Mocks::AndWrapOriginalImplementation::CannotModifyFurtherError < ::StandardError; end # Handles the implementation of an `and_yield` declaration. -# # @private # -# source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#694 +# pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:729 class RSpec::Mocks::AndYieldImplementation - # @return [AndYieldImplementation] a new instance of AndYieldImplementation - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#695 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:730 def initialize(args_to_yield, eval_context, error_generator); end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#701 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:736 def call(*_args_to_ignore, &block); end end # @private # -# source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#4 +# pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/chain.rb:4 module RSpec::Mocks::AnyInstance class << self - # source://rspec-mocks//lib/rspec/mocks/any_instance/error_generator.rb#26 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/error_generator.rb:26 def error_generator; end end end # @private # -# source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#6 +# pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/chain.rb:6 class RSpec::Mocks::AnyInstance::Chain include ::RSpec::Mocks::AnyInstance::Chain::Customizations - # @return [Chain] a new instance of Chain - # - # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#7 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/chain.rb:7 def initialize(recorder, *args, &block); end # @private - # @return [Boolean] # - # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#61 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/chain.rb:61 def constrained_to_any_of?(*constraints); end # @private # - # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#75 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/chain.rb:75 def expectation_fulfilled!; end # @private - # @return [Boolean] # - # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#70 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/chain.rb:70 def matches_args?(*args); end - # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#79 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/chain.rb:79 def never; end # @private # - # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#53 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/chain.rb:53 def playback!(instance); end - # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#84 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/chain.rb:84 def with(*args, &block); end private - # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#99 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/chain.rb:99 def last_message; end - # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#95 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/chain.rb:95 def messages; end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#91 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/chain.rb:91 def negated?; end - # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#103 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/chain.rb:103 def record(rspec_method_name, *args, &block); end end +# @private +# # Provides convenience methods for recording customizations on message # expectations. # -# @private -# -# source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#18 +# pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/chain.rb:18 module RSpec::Mocks::AnyInstance::Chain::Customizations - # Records the `and_call_original` message for playback against an instance that - # invokes a method stubbed or mocked using `any_instance`. - # - # @see RSpec::Mocks::MessageExpectation#and_call_original - # - # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/chain.rb:27 def and_call_original(*args, &block); end - # Records the `and_raise` message for playback against an instance that - # invokes a method stubbed or mocked using `any_instance`. - # - # @see RSpec::Mocks::MessageExpectation#and_raise - # - # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/chain.rb:27 def and_raise(*args, &block); end - # Records the `and_return` message for playback against an instance that - # invokes a method stubbed or mocked using `any_instance`. - # - # @see RSpec::Mocks::MessageExpectation#and_return - # - # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/chain.rb:27 def and_return(*args, &block); end - # Records the `and_throw` message for playback against an instance that - # invokes a method stubbed or mocked using `any_instance`. - # - # @see RSpec::Mocks::MessageExpectation#and_throw - # - # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/chain.rb:27 def and_throw(*args, &block); end - # Records the `and_wrap_original` message for playback against an instance that - # invokes a method stubbed or mocked using `any_instance`. - # - # @see RSpec::Mocks::MessageExpectation#and_wrap_original - # - # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/chain.rb:27 def and_wrap_original(*args, &block); end - # Records the `and_yield` message for playback against an instance that - # invokes a method stubbed or mocked using `any_instance`. - # - # @see RSpec::Mocks::MessageExpectation#and_yield - # - # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/chain.rb:27 def and_yield(*args, &block); end - # Records the `at_least` message for playback against an instance that - # invokes a method stubbed or mocked using `any_instance`. - # - # @see RSpec::Mocks::MessageExpectation#at_least - # - # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/chain.rb:27 def at_least(*args, &block); end - # Records the `at_most` message for playback against an instance that - # invokes a method stubbed or mocked using `any_instance`. - # - # @see RSpec::Mocks::MessageExpectation#at_most - # - # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/chain.rb:27 def at_most(*args, &block); end - # Records the `exactly` message for playback against an instance that - # invokes a method stubbed or mocked using `any_instance`. - # - # @see RSpec::Mocks::MessageExpectation#exactly - # - # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/chain.rb:27 def exactly(*args, &block); end - # Records the `never` message for playback against an instance that - # invokes a method stubbed or mocked using `any_instance`. - # - # @see RSpec::Mocks::MessageExpectation#never - # - # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/chain.rb:27 def never(*args, &block); end - # Records the `once` message for playback against an instance that - # invokes a method stubbed or mocked using `any_instance`. - # - # @see RSpec::Mocks::MessageExpectation#once - # - # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/chain.rb:27 def once(*args, &block); end - # Records the `thrice` message for playback against an instance that - # invokes a method stubbed or mocked using `any_instance`. - # - # @see RSpec::Mocks::MessageExpectation#thrice - # - # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/chain.rb:27 def thrice(*args, &block); end - # Records the `time` message for playback against an instance that - # invokes a method stubbed or mocked using `any_instance`. - # - # @see RSpec::Mocks::MessageExpectation#time - # - # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/chain.rb:27 def time(*args, &block); end - # Records the `times` message for playback against an instance that - # invokes a method stubbed or mocked using `any_instance`. - # - # @see RSpec::Mocks::MessageExpectation#times - # - # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/chain.rb:27 def times(*args, &block); end - # Records the `twice` message for playback against an instance that - # invokes a method stubbed or mocked using `any_instance`. - # - # @see RSpec::Mocks::MessageExpectation#twice - # - # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/chain.rb:27 def twice(*args, &block); end - # Records the `with` message for playback against an instance that - # invokes a method stubbed or mocked using `any_instance`. - # - # @see RSpec::Mocks::MessageExpectation#with - # - # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/chain.rb:27 def with(*args, &block); end class << self - # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#26 + # @macro [attach] record + # @method $1(*args, &block) + # Records the `$1` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#$1 + # + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/chain.rb:26 def record(method_name); end end end # @private # -# source://rspec-mocks//lib/rspec/mocks/any_instance/error_generator.rb#5 +# pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/error_generator.rb:5 class RSpec::Mocks::AnyInstance::ErrorGenerator < ::RSpec::Mocks::ErrorGenerator - # source://rspec-mocks//lib/rspec/mocks/any_instance/error_generator.rb#11 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/error_generator.rb:11 def raise_does_not_implement_error(klass, method_name); end - # source://rspec-mocks//lib/rspec/mocks/any_instance/error_generator.rb#15 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/error_generator.rb:15 def raise_message_already_received_by_other_instance_error(method_name, object_inspect, invoked_instance); end - # source://rspec-mocks//lib/rspec/mocks/any_instance/error_generator.rb#20 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/error_generator.rb:20 def raise_not_supported_with_prepend_error(method_name, problem_mod); end - # source://rspec-mocks//lib/rspec/mocks/any_instance/error_generator.rb#6 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/error_generator.rb:6 def raise_second_instance_received_message_error(unfulfilled_expectations); end end # @private # -# source://rspec-mocks//lib/rspec/mocks/any_instance/expect_chain_chain.rb#5 +# pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/expect_chain_chain.rb:5 class RSpec::Mocks::AnyInstance::ExpectChainChain < ::RSpec::Mocks::AnyInstance::StubChain - # @return [ExpectChainChain] a new instance of ExpectChainChain - # - # source://rspec-mocks//lib/rspec/mocks/any_instance/expect_chain_chain.rb#6 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/expect_chain_chain.rb:6 def initialize(*args); end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/any_instance/expect_chain_chain.rb#11 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/expect_chain_chain.rb:11 def expectation_fulfilled?; end - # source://rspec-mocks//lib/rspec/mocks/any_instance/expect_chain_chain.rb#15 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/expect_chain_chain.rb:15 def playback!(instance); end private - # source://rspec-mocks//lib/rspec/mocks/any_instance/expect_chain_chain.rb#21 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/expect_chain_chain.rb:21 def create_message_expectation_on(instance); end - # source://rspec-mocks//lib/rspec/mocks/any_instance/expect_chain_chain.rb#25 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/expect_chain_chain.rb:25 def invocation_order; end end # @private # -# source://rspec-mocks//lib/rspec/mocks/any_instance/expectation_chain.rb#5 +# pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/expectation_chain.rb:5 class RSpec::Mocks::AnyInstance::ExpectationChain < ::RSpec::Mocks::AnyInstance::Chain - # @return [ExpectationChain] a new instance of ExpectationChain - # - # source://rspec-mocks//lib/rspec/mocks/any_instance/expectation_chain.rb#10 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/expectation_chain.rb:10 def initialize(*args, &block); end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/any_instance/expectation_chain.rb#6 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/expectation_chain.rb:6 def expectation_fulfilled?; end private - # source://rspec-mocks//lib/rspec/mocks/any_instance/expectation_chain.rb#17 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/expectation_chain.rb:17 def verify_invocation_order(_rspec_method_name, *_args, &_block); end end +# @private # Delegates messages to each of the given targets in order to # provide the fluent interface that is available off of message # expectations when dealing with `any_instance`. @@ -542,104 +375,95 @@ end # return values and N `MessageExpectation` instances (one per instance # of the `any_instance` klass). # -# @private -# -# source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#103 +# pkg:gem/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#104 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/proxy.rb:104 def initialize(targets); end - # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#118 + # pkg:gem/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#109 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/proxy.rb:109 def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end end # @private # -# source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#5 +# pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/message_chains.rb:5 class RSpec::Mocks::AnyInstance::MessageChains - # @return [MessageChains] a new instance of MessageChains - # - # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#6 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/message_chains.rb:6 def initialize; end # @private # - # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#11 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/message_chains.rb:11 def [](method_name); end # @private # - # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#16 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/message_chains.rb:16 def add(method_name, chain); end # @private - # @return [Boolean] # - # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#43 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/message_chains.rb:43 def all_expectations_fulfilled?; end # @private # - # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#36 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/message_chains.rb:36 def each_unfulfilled_expectation_matching(method_name, *args); end # @private - # @return [Boolean] # - # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#29 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/message_chains.rb:29 def has_expectation?(method_name); end # @private # - # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#64 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/message_chains.rb:64 def playback!(instance, method_name); end # @private # - # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#57 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/message_chains.rb:57 def received_expected_message!(method_name); end # @private # - # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#22 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/message_chains.rb:22 def remove_stub_chains_for!(method_name); end # @private # - # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#50 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/message_chains.rb:50 def unfulfilled_expectations; end private - # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#73 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/message_chains.rb:73 def raise_if_second_instance_to_receive_message(instance); end end # @private # -# source://rspec-mocks//lib/rspec/mocks/any_instance/expectation_chain.rb#22 +# pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/expectation_chain.rb:22 class RSpec::Mocks::AnyInstance::PositiveExpectationChain < ::RSpec::Mocks::AnyInstance::ExpectationChain private - # source://rspec-mocks//lib/rspec/mocks/any_instance/expectation_chain.rb#25 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/expectation_chain.rb:25 def create_message_expectation_on(instance); end - # source://rspec-mocks//lib/rspec/mocks/any_instance/expectation_chain.rb#44 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/expectation_chain.rb:44 def invocation_order; end end -# source://rspec-mocks//lib/rspec/mocks/any_instance/expectation_chain.rb#38 +# pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/expectation_chain.rb:38 RSpec::Mocks::AnyInstance::PositiveExpectationChain::ExpectationInvocationOrder = T.let(T.unsafe(nil), Hash) +# @private # The `AnyInstance::Recorder` is responsible for redefining the klass's # instance method in order to add any stubs/expectations the first time # the method is called. It's not capable of updating a stub on an instance @@ -657,39 +481,35 @@ RSpec::Mocks::AnyInstance::PositiveExpectationChain::ExpectationInvocationOrder # off of the return value of one of these methods) is provided by the # `FluentInterfaceProxy` class below. # -# @private -# -# source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#21 +# pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/proxy.rb:21 class RSpec::Mocks::AnyInstance::Proxy - # @return [Proxy] a new instance of Proxy - # - # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#22 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/proxy.rb:22 def initialize(recorder, target_proxies); end - # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#55 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/proxy.rb:55 def expect_chain(*chain, &block); end - # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#27 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/proxy.rb:27 def klass; end - # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#71 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/proxy.rb:71 def should_not_receive(method_name, &block); end - # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#61 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/proxy.rb:61 def should_receive(method_name, &block); end - # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#31 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/proxy.rb:31 def stub(method_name_or_method_map, &block); end - # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#49 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/proxy.rb:49 def stub_chain(*chain, &block); end - # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#43 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/proxy.rb:43 def unstub(method_name); end private - # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#79 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/proxy.rb:79 def perform_proxying(method_name, args, block, &target_proxy_block); end end @@ -702,59 +522,56 @@ end # @see AnyInstance # @see Chain # -# source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#12 +# pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/recorder.rb:12 class RSpec::Mocks::AnyInstance::Recorder - # @return [Recorder] a new instance of Recorder - # - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#16 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/recorder.rb:16 def initialize(klass); end # @private - # @return [Boolean] # - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#127 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/recorder.rb:127 def already_observing?(method_name); end # @private # - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#122 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/recorder.rb:122 def build_alias_method_name(method_name); end # @private # - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#53 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/recorder.rb:53 def expect_chain(*method_names_and_optional_return_values, &block); end # @private # - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#117 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/recorder.rb:117 def instance_that_received(method_name); end # @private # - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#14 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/recorder.rb:14 def klass; end # @private # - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#14 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/recorder.rb:14 def message_chains; end # @private # - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#132 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/recorder.rb:132 def notify_received_message(_object, message, args, _blk); end # @private # - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#109 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/recorder.rb:109 def playback!(instance, method_name); end # The opposite of `should_receive` # # @see Methods#should_not_receive # - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#75 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/recorder.rb:75 def should_not_receive(method_name, &block); end # Initializes the recording a message expectation to be played back @@ -763,12 +580,12 @@ class RSpec::Mocks::AnyInstance::Recorder # # @see Methods#should_receive # - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#66 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/recorder.rb:66 def should_receive(method_name, &block); end # @private # - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#104 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/recorder.rb:104 def stop_all_observation!; end # Initializes the recording a stub to be played back against any @@ -776,7 +593,7 @@ class RSpec::Mocks::AnyInstance::Recorder # # @see Methods#stub # - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#35 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/recorder.rb:35 def stub(method_name, &block); end # Initializes the recording a stub chain to be played back against any @@ -785,12 +602,12 @@ class RSpec::Mocks::AnyInstance::Recorder # # @see Methods#stub_chain # - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#45 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/recorder.rb:45 def stub_chain(*method_names_and_optional_return_values, &block); end # @private # - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#14 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/recorder.rb:14 def stubs; end # Removes any previously recorded stubs, stub_chains or message @@ -798,151 +615,138 @@ class RSpec::Mocks::AnyInstance::Recorder # # @see Methods#unstub # - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#83 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/recorder.rb:83 def unstub(method_name); end + # @api private + # # Used internally to verify that message expectations have been # fulfilled. # - # @api private - # - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#96 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/recorder.rb:96 def verify; end protected - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#148 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/recorder.rb:148 def stop_observing!(method_name); end private - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#282 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/recorder.rb:284 def allow_no_prepended_module_definition_of(method_name); end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#159 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/recorder.rb:159 def ancestor_is_an_observer?(ancestor, method_name); end - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#235 + # pkg:gem/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#269 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/recorder.rb:271 def mark_invoked!(method_name); end - # @yield [args.first, args] - # - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#178 + # pkg:gem/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#249 + # pkg:gem/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#245 + # pkg:gem/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#183 + # pkg:gem/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#229 + # pkg:gem/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#189 + # pkg:gem/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#197 + # pkg:gem/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#166 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/recorder.rb:166 def super_class_observers_for(method_name); end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#172 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/recorder.rb:172 def super_class_observing?(method_name); end end # @private # -# source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain.rb#5 +# pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/stub_chain.rb:5 class RSpec::Mocks::AnyInstance::StubChain < ::RSpec::Mocks::AnyInstance::Chain # @private - # @return [Boolean] # - # source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain.rb#7 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/stub_chain.rb:7 def expectation_fulfilled?; end private - # source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain.rb#13 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/stub_chain.rb:13 def create_message_expectation_on(instance); end - # source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain.rb#40 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/stub_chain.rb:40 def invocation_order; end - # @raise [NoMethodError] - # - # source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain.rb#44 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/stub_chain.rb:44 def verify_invocation_order(rspec_method_name, *_args, &_block); end end -# source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain.rb#38 +# pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/stub_chain.rb:38 RSpec::Mocks::AnyInstance::StubChain::EmptyInvocationOrder = T.let(T.unsafe(nil), Hash) -# source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain.rb#28 +# pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/stub_chain.rb:28 RSpec::Mocks::AnyInstance::StubChain::InvocationOrder = T.let(T.unsafe(nil), Hash) # @private # -# source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain_chain.rb#5 +# pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/stub_chain_chain.rb:5 class RSpec::Mocks::AnyInstance::StubChainChain < ::RSpec::Mocks::AnyInstance::StubChain - # @return [StubChainChain] a new instance of StubChainChain - # - # source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain_chain.rb#6 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/stub_chain_chain.rb:6 def initialize(*args); end private - # source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain_chain.rb#13 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/stub_chain_chain.rb:13 def create_message_expectation_on(instance); end - # source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain_chain.rb#17 + # pkg:gem/rspec-mocks#lib/rspec/mocks/any_instance/stub_chain_chain.rb:17 def invocation_order; end end # @private # -# source://rspec-mocks//lib/rspec/mocks/targets.rb#103 +# pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:103 class RSpec::Mocks::AnyInstanceAllowanceTarget < ::RSpec::Mocks::TargetBase - # source://rspec-mocks//lib/rspec/mocks/targets.rb#104 + # pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:104 def expression; end - # source://rspec-mocks//lib/rspec/mocks/targets.rb#29 + # pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:29 def not_to(matcher, *_args); end - # source://rspec-mocks//lib/rspec/mocks/targets.rb#6 + # pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:6 def to(matcher, &block); end - # source://rspec-mocks//lib/rspec/mocks/targets.rb#29 + # pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:29 def to_not(matcher, *_args); end end # @private # -# source://rspec-mocks//lib/rspec/mocks/targets.rb#114 +# pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:114 class RSpec::Mocks::AnyInstanceExpectationTarget < ::RSpec::Mocks::TargetBase - # source://rspec-mocks//lib/rspec/mocks/targets.rb#115 + # pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:115 def expression; end - # source://rspec-mocks//lib/rspec/mocks/targets.rb#16 + # pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:16 def not_to(matcher, &block); end - # source://rspec-mocks//lib/rspec/mocks/targets.rb#6 + # pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:6 def to(matcher, &block); end - # source://rspec-mocks//lib/rspec/mocks/targets.rb#16 + # pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:16 def to_not(matcher, &block); end end @@ -971,50 +775,49 @@ end # # @see ArgumentMatchers # -# source://rspec-mocks//lib/rspec/mocks/argument_list_matcher.rb#33 +# pkg:gem/rspec-mocks#lib/rspec/mocks/argument_list_matcher.rb:33 class RSpec::Mocks::ArgumentListMatcher + # @api public + # @param [Array] expected_args a list of expected literals and/or argument matchers + # # Initializes an `ArgumentListMatcher` with a collection of literal # values and/or argument matchers. # - # @api public - # @param expected_args [Array] a list of expected literals and/or argument matchers - # @return [ArgumentListMatcher] a new instance of ArgumentListMatcher # @see ArgumentMatchers # @see #args_match? # - # source://rspec-mocks//lib/rspec/mocks/argument_list_matcher.rb#45 - def initialize(*expected_args, **_arg1); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_list_matcher.rb:45 + def initialize(*expected_args, **); end + # @api public + # @param [Array] actual_args + # # Matches each element in the `expected_args` against the element in the same # position of the arguments passed to `new`. # - # @api public - # @param actual_args [Array] - # @return [Boolean] # @see #initialize # - # source://rspec-mocks//lib/rspec/mocks/argument_list_matcher.rb#58 - def args_match?(*actual_args, **_arg1); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_list_matcher.rb:58 + def args_match?(*actual_args, **); end # @private # - # source://rspec-mocks//lib/rspec/mocks/argument_list_matcher.rb#35 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_list_matcher.rb:35 def expected_args; end + # @private # Resolves abstract arg placeholders like `no_args` and `any_args` into # a more concrete arg list based on the provided `actual_args`. # - # @private - # - # source://rspec-mocks//lib/rspec/mocks/argument_list_matcher.rb#81 + # pkg:gem/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#100 + # pkg:gem/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#92 + # pkg:gem/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 @@ -1022,7 +825,7 @@ end # # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_list_matcher.rb#114 +# pkg:gem/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 @@ -1034,22 +837,12 @@ RSpec::Mocks::ArgumentListMatcher::MATCH_ALL = T.let(T.unsafe(nil), RSpec::Mocks # # @see ArgumentListMatcher # -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#16 +# pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:16 module RSpec::Mocks::ArgumentMatchers - # Matches if `arg.kind_of?(klass)` - # - # @example - # expect(object).to receive(:message).with(kind_of(Thing)) - # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#121 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:125 def a_kind_of(klass); end - # Matches if `arg.instance_of?(klass)` - # - # @example - # expect(object).to receive(:message).with(instance_of(Thing)) - # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#111 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:115 def an_instance_of(klass); end # Acts like an arg splat, matching any number of args at any point in an arg list. @@ -1062,7 +855,7 @@ module RSpec::Mocks::ArgumentMatchers # object.message(1, 2, 3) # object.message(1, 2, 3, 4) # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#26 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:26 def any_args; end # Matches any argument at all. @@ -1070,7 +863,7 @@ module RSpec::Mocks::ArgumentMatchers # @example # expect(object).to receive(:message).with(anything) # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#34 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:34 def anything; end # Matches an array that excludes the specified items. @@ -1079,7 +872,7 @@ module RSpec::Mocks::ArgumentMatchers # 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 + # pkg:gem/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. @@ -1089,7 +882,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#90 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:90 def array_including(*args); end # Matches a boolean value. @@ -1097,7 +890,7 @@ module RSpec::Mocks::ArgumentMatchers # @example # expect(object).to receive(:message).with(boolean()) # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#59 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:59 def boolean; end # Matches if the actual argument responds to the specified messages. @@ -1106,7 +899,7 @@ module RSpec::Mocks::ArgumentMatchers # expect(object).to receive(:message).with(duck_type(:hello)) # expect(object).to receive(:message).with(duck_type(:hello, :goodbye)) # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#51 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:51 def duck_type(*args); end # Matches a hash that doesn't include the specified key(s) or key/value. @@ -1116,7 +909,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#80 + # pkg:gem/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,17 +920,10 @@ module RSpec::Mocks::ArgumentMatchers # expect(object).to receive(:message).with(hash_including(:key)) # expect(object).to receive(:message).with(hash_including(:key, :key2 => val2)) # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#70 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:70 def hash_including(*args); end - # Matches a hash that doesn't include the specified key(s) or key/value. - # - # @example - # expect(object).to receive(:message).with(hash_excluding(:key => val)) - # 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#80 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:105 def hash_not_including(*args); end # Matches if `arg.instance_of?(klass)` @@ -1145,7 +931,7 @@ module RSpec::Mocks::ArgumentMatchers # @example # expect(object).to receive(:message).with(instance_of(Thing)) # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#111 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:111 def instance_of(klass); end # Matches if `arg.kind_of?(klass)` @@ -1153,7 +939,7 @@ module RSpec::Mocks::ArgumentMatchers # @example # expect(object).to receive(:message).with(kind_of(Thing)) # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#121 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:121 def kind_of(klass); end # Matches no arguments. @@ -1161,198 +947,186 @@ module RSpec::Mocks::ArgumentMatchers # @example # expect(object).to receive(:message).with(no_args) # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#42 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:42 def no_args; end class << self # @private # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#128 + # pkg:gem/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#159 +# pkg:gem/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#160 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:160 def ===(_other); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#164 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:164 def description; end end -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#147 +# pkg:gem/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#152 +# pkg:gem/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#153 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:153 def description; end end -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#147 +# pkg:gem/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#274 +# pkg:gem/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 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:275 def initialize(unexpected); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#279 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:279 def ===(actual); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#292 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:292 def description; end private - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#298 + # pkg:gem/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 +# pkg:gem/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#243 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:243 def initialize(expected); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#247 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:247 def ===(actual); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#260 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:260 def description; end private - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#266 + # pkg:gem/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#188 +# pkg:gem/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#189 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:189 def initialize(expected); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#193 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:193 def ===(predicate, actual); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#201 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:201 def description(name); end private - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#207 + # pkg:gem/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#177 +# pkg:gem/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#178 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:178 def ===(value); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#182 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:182 def description; end end -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#147 +# pkg:gem/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#306 +# pkg:gem/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#307 + # pkg:gem/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#311 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:311 def ===(value); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#315 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:315 def description; end end # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#231 +# pkg:gem/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#232 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:232 def ===(actual); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#236 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:236 def description; end end # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#220 +# pkg:gem/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#221 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:221 def ===(actual); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#225 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:225 def description; end end # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#321 +# pkg:gem/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#322 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:322 def initialize(klass); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#326 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:326 def ===(actual); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#330 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:330 def description; end end # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#336 +# pkg:gem/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#337 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:337 def initialize(klass); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#341 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:341 def ===(actual); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#345 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:345 def description; end end # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#170 +# pkg:gem/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#171 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:171 def description; end end -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#147 +# pkg:gem/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. @@ -1365,25 +1139,24 @@ RSpec::Mocks::ArgumentMatchers::NoArgsMatcher::INSTANCE = T.let(T.unsafe(nil), R # # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#143 +# pkg:gem/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#146 + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:146 def inherited(subklass); end private + # pkg:gem/rspec-mocks#lib/rspec/mocks/argument_matchers.rb:144 def new(*_arg0); end end end # @private # -# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#7 +# pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_proxy.rb:7 class RSpec::Mocks::CallbackInvocationStrategy - # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#8 + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_proxy.rb:8 def call(doubled_module); end end @@ -1394,7 +1167,7 @@ end # @deprecated We no longer raise this error but the constant remains until # RSpec 4 for SemVer reasons. # -# source://rspec-mocks//lib/rspec/mocks/error_generator.rb#26 +# pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:26 class RSpec::Mocks::CannotSupportArgMutationsError < ::StandardError; end # When a class's `.new` method is stubbed, we want to use the method @@ -1403,30 +1176,25 @@ class RSpec::Mocks::CannotSupportArgMutationsError < ::StandardError; end # all args...so the method with the actually used signature is `#initialize`. # # This method reference implementation handles that specific case. -# # @private # -# source://rspec-mocks//lib/rspec/mocks/method_reference.rb#184 +# pkg:gem/rspec-mocks#lib/rspec/mocks/method_reference.rb:184 class RSpec::Mocks::ClassNewMethodReference < ::RSpec::Mocks::ObjectMethodReference - # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#207 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_reference.rb:207 def with_signature; end class << self - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#185 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_reference.rb:185 def applies_to?(method_name); end # Ruby 2's Method#== is too strict # - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#198 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_reference.rb:198 def uses_class_new?(klass); end end end -# source://rspec-mocks//lib/rspec/mocks/method_reference.rb#196 +# pkg:gem/rspec-mocks#lib/rspec/mocks/method_reference.rb:196 RSpec::Mocks::ClassNewMethodReference::CLASS_NEW = T.let(T.unsafe(nil), UnboundMethod) # Effectively the same as an ObjectVerifyingDouble (since a class is a type @@ -1435,7 +1203,7 @@ RSpec::Mocks::ClassNewMethodReference::CLASS_NEW = T.let(T.unsafe(nil), UnboundM # # @private # -# source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#119 +# pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_double.rb:121 class RSpec::Mocks::ClassVerifyingDouble < ::Module include ::RSpec::Mocks::TestDouble include ::RSpec::Mocks::VerifyingDouble @@ -1444,11 +1212,9 @@ end # Provides configuration options for rspec-mocks. # -# source://rspec-mocks//lib/rspec/mocks/configuration.rb#4 +# pkg:gem/rspec-mocks#lib/rspec/mocks/configuration.rb:4 class RSpec::Mocks::Configuration - # @return [Configuration] a new instance of Configuration - # - # source://rspec-mocks//lib/rspec/mocks/configuration.rb#5 + # pkg:gem/rspec-mocks#lib/rspec/mocks/configuration.rb:5 def initialize; end # Adds `stub` and `should_receive` to the given @@ -1460,12 +1226,12 @@ class RSpec::Mocks::Configuration # # @example # RSpec.configure do |rspec| - # rspec.mock_with :rspec do |mocks| - # mocks.add_stub_and_should_receive_to Delegator - # end + # rspec.mock_with :rspec do |mocks| + # mocks.add_stub_and_should_receive_to Delegator + # end # end # - # source://rspec-mocks//lib/rspec/mocks/configuration.rb#62 + # pkg:gem/rspec-mocks#lib/rspec/mocks/configuration.rb:62 def add_stub_and_should_receive_to(*modules); end # Sets whether RSpec will warn, ignore, or fail a test when @@ -1478,12 +1244,12 @@ class RSpec::Mocks::Configuration # # @example # RSpec.configure do |config| - # config.mock_with :rspec do |mocks| - # mocks.allow_message_expectations_on_nil = false - # end + # config.mock_with :rspec do |mocks| + # mocks.allow_message_expectations_on_nil = false + # end # end # - # source://rspec-mocks//lib/rspec/mocks/configuration.rb#29 + # pkg:gem/rspec-mocks#lib/rspec/mocks/configuration.rb:29 def allow_message_expectations_on_nil; end # Sets whether RSpec will warn, ignore, or fail a test when @@ -1496,31 +1262,29 @@ class RSpec::Mocks::Configuration # # @example # RSpec.configure do |config| - # config.mock_with :rspec do |mocks| - # mocks.allow_message_expectations_on_nil = false - # end + # config.mock_with :rspec do |mocks| + # mocks.allow_message_expectations_on_nil = false + # end # end # - # source://rspec-mocks//lib/rspec/mocks/configuration.rb#29 + # pkg:gem/rspec-mocks#lib/rspec/mocks/configuration.rb:29 def allow_message_expectations_on_nil=(_arg0); end # Provides a way to perform customisations when verifying doubles. # # @example - # RSpec::Mocks.configuration.before_verifying_doubles do |ref| - # ref.some_method! - # end + # RSpec::Mocks.configuration.before_verifying_doubles do |ref| + # ref.some_method! + # end # - # source://rspec-mocks//lib/rspec/mocks/configuration.rb#128 + # pkg:gem/rspec-mocks#lib/rspec/mocks/configuration.rb:128 def before_verifying_doubles(&block); end # Indicates whether or not diffs should be colored. # Delegates to rspec-core's color option if rspec-core # is loaded; otherwise you can set it here. # - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/configuration.rb#164 + # pkg:gem/rspec-mocks#lib/rspec/mocks/configuration.rb:164 def color?; end # Monkey-patch `Marshal.dump` to enable dumping of mocked or stubbed @@ -1531,14 +1295,13 @@ class RSpec::Mocks::Configuration # # This method is idempotent. # - # source://rspec-mocks//lib/rspec/mocks/configuration.rb#188 + # pkg:gem/rspec-mocks#lib/rspec/mocks/configuration.rb:188 def patch_marshal_to_support_partial_doubles=(val); end - # Resets the configured syntax to the default. - # # @api private + # Resets the configured syntax to the default. # - # source://rspec-mocks//lib/rspec/mocks/configuration.rb#198 + # pkg:gem/rspec-mocks#lib/rspec/mocks/configuration.rb:198 def reset_syntaxes_to_default; end # Returns an array with a list of syntaxes @@ -1546,10 +1309,10 @@ class RSpec::Mocks::Configuration # # @example # unless RSpec::Mocks.configuration.syntax.include?(:expect) - # raise "this RSpec extension gem requires the rspec-mocks `:expect` syntax" + # raise "this RSpec extension gem requires the rspec-mocks `:expect` syntax" # end # - # source://rspec-mocks//lib/rspec/mocks/configuration.rb#104 + # pkg:gem/rspec-mocks#lib/rspec/mocks/configuration.rb:104 def syntax; end # Provides the ability to set either `expect`, @@ -1558,42 +1321,37 @@ class RSpec::Mocks::Configuration # explicitly enable `should` syntax and/or explicitly # disable `expect` syntax. # - # end - # # @example # RSpec.configure do |rspec| - # rspec.mock_with :rspec do |mocks| - # mocks.syntax = [:expect, :should] - # end + # rspec.mock_with :rspec do |mocks| + # mocks.syntax = [:expect, :should] + # end + # end # - # source://rspec-mocks//lib/rspec/mocks/configuration.rb#81 + # pkg:gem/rspec-mocks#lib/rspec/mocks/configuration.rb:81 def syntax=(*values); end + # @private # Used to track whether we are temporarily suppressing verifying partial # doubles with `without_partial_double_verification { ... }` # - # @private - # - # source://rspec-mocks//lib/rspec/mocks/configuration.rb#161 + # pkg:gem/rspec-mocks#lib/rspec/mocks/configuration.rb:161 def temporarily_suppress_partial_double_verification; end + # @private # Used to track whether we are temporarily suppressing verifying partial # doubles with `without_partial_double_verification { ... }` # - # @private - # - # source://rspec-mocks//lib/rspec/mocks/configuration.rb#161 + # pkg:gem/rspec-mocks#lib/rspec/mocks/configuration.rb:161 def temporarily_suppress_partial_double_verification=(_arg0); end # Sets the default for the `transfer_nested_constants` option when # stubbing constants. # - # source://rspec-mocks//lib/rspec/mocks/configuration.rb#145 + # pkg:gem/rspec-mocks#lib/rspec/mocks/configuration.rb:145 def transfer_nested_constants=(_arg0); end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/configuration.rb#139 + # pkg:gem/rspec-mocks#lib/rspec/mocks/configuration.rb:139 def transfer_nested_constants?; end # When this is set to true, an error will be raised when @@ -1602,41 +1360,29 @@ class RSpec::Mocks::Configuration # test suite, with all production code loaded. Setting this for an # isolated unit test will prevent you from being able to isolate it! # - # source://rspec-mocks//lib/rspec/mocks/configuration.rb#120 + # pkg:gem/rspec-mocks#lib/rspec/mocks/configuration.rb:120 def verify_doubled_constant_names=(_arg0); end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/configuration.rb#111 + # pkg:gem/rspec-mocks#lib/rspec/mocks/configuration.rb:111 def verify_doubled_constant_names?; end # When set to true, partial mocks will be verified the same as object # doubles. Any stubs will have their arguments checked against the original # method, and methods that do not exist cannot be stubbed. # - # source://rspec-mocks//lib/rspec/mocks/configuration.rb#150 + # pkg:gem/rspec-mocks#lib/rspec/mocks/configuration.rb:150 def verify_partial_doubles=(val); end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/configuration.rb#154 + # pkg:gem/rspec-mocks#lib/rspec/mocks/configuration.rb:154 def verify_partial_doubles?; end - # Returns an array of blocks to call when verifying doubles - # # @api private + # Returns an array of blocks to call when verifying doubles # - # source://rspec-mocks//lib/rspec/mocks/configuration.rb#135 + # pkg:gem/rspec-mocks#lib/rspec/mocks/configuration.rb:135 def verifying_double_callbacks; end - # Provides a way to perform customisations when verifying doubles. - # - # @example - # RSpec::Mocks.configuration.before_verifying_doubles do |ref| - # ref.some_method! - # end - # - # source://rspec-mocks//lib/rspec/mocks/configuration.rb#128 + # pkg:gem/rspec-mocks#lib/rspec/mocks/configuration.rb:131 def when_declaring_verifying_double(&block); end # Sets whether or not RSpec will yield the receiving instance of a @@ -1646,149 +1392,142 @@ class RSpec::Mocks::Configuration # # @example # RSpec.configure do |rspec| - # rspec.mock_with :rspec do |mocks| - # mocks.yield_receiver_to_any_instance_implementation_blocks = false - # end + # rspec.mock_with :rspec do |mocks| + # mocks.yield_receiver_to_any_instance_implementation_blocks = false + # end # end # - # source://rspec-mocks//lib/rspec/mocks/configuration.rb#46 + # pkg:gem/rspec-mocks#lib/rspec/mocks/configuration.rb:46 def yield_receiver_to_any_instance_implementation_blocks=(_arg0); end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/configuration.rb#31 + # pkg:gem/rspec-mocks#lib/rspec/mocks/configuration.rb:31 def yield_receiver_to_any_instance_implementation_blocks?; end end # Provides information about constants that may (or may not) # have been mutated by rspec-mocks. # -# source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#7 +# pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:7 class RSpec::Mocks::Constant extend ::RSpec::Support::RecursiveConstMethods # @api private - # @return [Constant] a new instance of Constant - # @yield [_self] - # @yieldparam _self [RSpec::Mocks::Constant] the object that the method was called on # - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#11 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:11 def initialize(name); end # @private # - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#29 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:29 def hidden=(_arg0); end # @return [Boolean] Whether or not rspec-mocks has hidden # this constant. # - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#51 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:51 def hidden?; end - # The default `to_s` isn't very useful, so a custom version is provided. - # - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#62 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:65 def inspect; end # @return [Boolean] Whether or not rspec-mocks has mutated # (stubbed or hidden) this constant. # - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#39 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:39 def mutated?; end # @return [String] The fully qualified name of the constant. # - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#21 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:21 def name; end # @return [Object, nil] The original value (e.g. before it # was mutated by rspec-mocks) of the constant, or # nil if the constant was not previously defined. # - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#26 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:26 def original_value; end # @return [Object, nil] The original value (e.g. before it # was mutated by rspec-mocks) of the constant, or # nil if the constant was not previously defined. # - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#26 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:26 def original_value=(_arg0); end # @private # - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#29 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:29 def previously_defined=(_arg0); end # @return [Boolean] Whether or not the constant was defined # before the current example. # - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#33 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:33 def previously_defined?; end # @private # - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#29 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:29 def stubbed=(_arg0); end # @return [Boolean] Whether or not rspec-mocks has stubbed # this constant. # - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#45 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:45 def stubbed?; end # The default `to_s` isn't very useful, so a custom version is provided. # - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#62 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:62 def to_s; end # @private # - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#29 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:29 def valid_name=(_arg0); end # @return [Boolean] Whether or not the provided constant name # is a valid Ruby constant name. # - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#57 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:57 def valid_name?; end class << self # Queries rspec-mocks to find out information about the named constant. # - # @param name [String] the name of the constant + # @param [String] name the name of the constant # @return [Constant] an object containing information about the named # constant. # - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#86 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:86 def original(name); end # @private # - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#68 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:68 def unmutated(name); end end end # Provides a means to stub constants. # -# source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#93 +# pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:93 class RSpec::Mocks::ConstantMutator extend ::RSpec::Support::RecursiveConstMethods class << self # Hides a constant. # - # @note It's recommended that you use `hide_const` in your - # examples. This is an alternate public API that is provided - # so you can hide constants in other contexts (e.g. helper - # classes). - # @param constant_name [String] The fully qualified name of the constant. - # The current constant scoping at the point of call is not considered. + # @param (see ExampleMethods#hide_const) + # # @see ExampleMethods#hide_const + # @note It's recommended that you use `hide_const` in your + # examples. This is an alternate public API that is provided + # so you can hide constants in other contexts (e.g. helper + # classes). # - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#131 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:131 def hide(constant_name); end # Uses the mutator to mutate (stub or hide) a constant. Ensures that @@ -1797,7 +1536,7 @@ class RSpec::Mocks::ConstantMutator # # @private # - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#320 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:320 def mutate(mutator); end # Used internally by the constant stubbing to raise a helpful @@ -1807,25 +1546,22 @@ class RSpec::Mocks::ConstantMutator # # @api private # - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#331 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:331 def raise_on_invalid_const; end # Stubs a constant. # - # @note It's recommended that you use `stub_const` in your - # examples. This is an alternate public API that is provided - # so you can stub constants in other contexts (e.g. helper - # classes). - # @option options - # @param constant_name [String] The fully qualified name of the constant. The current - # constant scoping at the point of call is not considered. - # @param value [Object] The value to make the constant refer to. When the - # example completes, the constant will be restored to its prior state. - # @param options [Hash] Stubbing options. - # @return [Object] the stubbed value of the constant + # @param (see ExampleMethods#stub_const) + # @option (see ExampleMethods#stub_const) + # @return (see ExampleMethods#stub_const) + # # @see ExampleMethods#stub_const + # @note It's recommended that you use `stub_const` in your + # examples. This is an alternate public API that is provided + # so you can stub constants in other contexts (e.g. helper + # classes). # - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#107 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:107 def stub(constant_name, value, options = T.unsafe(nil)); end end end @@ -1834,29 +1570,23 @@ end # # @private # -# source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#139 +# pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:139 class RSpec::Mocks::ConstantMutator::BaseMutator include ::RSpec::Support::RecursiveConstMethods - # @return [BaseMutator] a new instance of BaseMutator - # - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#144 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:144 def initialize(full_constant_name, mutated_value, transfer_nested_constants); end - # Returns the value of attribute full_constant_name. - # - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#142 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:142 def full_constant_name; end - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#160 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:160 def idempotently_reset; end - # Returns the value of attribute original_value. - # - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#142 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:142 def original_value; end - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#153 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:153 def to_constant; end end @@ -1864,15 +1594,15 @@ end # # @private # -# source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#169 +# pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:169 class RSpec::Mocks::ConstantMutator::ConstantHider < ::RSpec::Mocks::ConstantMutator::BaseMutator - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#170 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:170 def mutate; end - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#188 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:188 def reset; end - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#178 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:178 def to_constant; end end @@ -1880,31 +1610,27 @@ end # # @private # -# source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#197 +# pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:197 class RSpec::Mocks::ConstantMutator::DefinedConstantReplacer < ::RSpec::Mocks::ConstantMutator::BaseMutator - # @return [DefinedConstantReplacer] a new instance of DefinedConstantReplacer - # - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#198 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:198 def initialize(*args); end - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#203 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:203 def mutate; end - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#223 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:223 def reset; end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#268 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:268 def should_transfer_nested_constants?; end - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#215 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:215 def to_constant; end - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#232 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:232 def transfer_nested_constants; end - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#238 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:238 def verify_constants_to_transfer!; end end @@ -1912,26 +1638,26 @@ end # # @private # -# source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#278 +# pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:278 class RSpec::Mocks::ConstantMutator::UndefinedConstantSetter < ::RSpec::Mocks::ConstantMutator::BaseMutator - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#279 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:279 def mutate; end - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#299 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:299 def reset; end - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#291 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:291 def to_constant; end private - # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#305 + # pkg:gem/rspec-mocks#lib/rspec/mocks/mutate_const.rb:305 def name_for(parent, name); end end # @private # -# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#104 +# pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_proxy.rb:104 RSpec::Mocks::DEFAULT_CALLBACK_INVOCATION_STRATEGY = T.let(T.unsafe(nil), RSpec::Mocks::CallbackInvocationStrategy) # An implementation of rspec-mocks' reference interface. @@ -1939,43 +1665,39 @@ RSpec::Mocks::DEFAULT_CALLBACK_INVOCATION_STRATEGY = T.let(T.unsafe(nil), RSpec: # an anonymous class or module is passed to {ExampleMethods#instance_double} # or {ExampleMethods#class_double}. # Represents a reference to that object. -# # @see NamedObjectReference # -# source://rspec-mocks//lib/rspec/mocks/object_reference.rb#56 +# pkg:gem/rspec-mocks#lib/rspec/mocks/object_reference.rb:56 class RSpec::Mocks::DirectObjectReference # @param object [Object] the object to which this refers - # @return [DirectObjectReference] a new instance of DirectObjectReference # - # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#58 + # pkg:gem/rspec-mocks#lib/rspec/mocks/object_reference.rb:58 def initialize(object); end # Defined for interface parity with the other object reference # implementations. Raises an `ArgumentError` to indicate that `as_stubbed_const` # is invalid when passing an object argument to `object_double`. # - # @raise [ArgumentError] - # - # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#70 + # pkg:gem/rspec-mocks#lib/rspec/mocks/object_reference.rb:70 def const_to_replace; end # Always returns true for an object as the class is defined. # # @return [true] # - # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#85 + # pkg:gem/rspec-mocks#lib/rspec/mocks/object_reference.rb:85 def defined?; end # @return [String] the object's description (via `#inspect`). # - # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#63 + # pkg:gem/rspec-mocks#lib/rspec/mocks/object_reference.rb:63 def description; end # The target of the verifying double (the object itself). # # @return [Object] # - # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#78 + # pkg:gem/rspec-mocks#lib/rspec/mocks/object_reference.rb:78 def target; end # Yields if the reference target is loaded, providing a generic mechanism @@ -1987,226 +1709,218 @@ class RSpec::Mocks::DirectObjectReference # # @yield [Object] the target of this reference. # - # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#97 + # pkg:gem/rspec-mocks#lib/rspec/mocks/object_reference.rb:97 def when_loaded; end end # A generic test double object. `double`, `instance_double` and friends # return an instance of this. # -# source://rspec-mocks//lib/rspec/mocks/test_double.rb#132 +# pkg:gem/rspec-mocks#lib/rspec/mocks/test_double.rb:135 class RSpec::Mocks::Double include ::RSpec::Mocks::TestDouble end # @private # -# source://rspec-mocks//lib/rspec/mocks/error_generator.rb#36 +# pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:36 class RSpec::Mocks::ErrorGenerator - # @return [ErrorGenerator] a new instance of ErrorGenerator - # - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#39 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:39 def initialize(target = T.unsafe(nil)); end - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#71 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:71 def default_error_message(expectation, expected_args, actual_args); end # @private # - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#132 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:132 def describe_expectation(verb, message, expected_received_count, _actual_received_count, args); end - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#215 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:215 def expectation_on_nil_message(method_name); end # @private # - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#222 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:222 def intro(unwrapped = T.unsafe(nil)); end # @private # - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#235 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:235 def method_call_args_description(args, generic_prefix = T.unsafe(nil), matcher_prefix = T.unsafe(nil)); end # @private # - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#44 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:44 def opts; end - # Sets the attribute opts - # - # @param value the value to set the attribute opts to. + # @private # - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#37 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:37 def opts=(_arg0); end # @private # - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#203 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:203 def raise_already_invoked_error(message, calling_customization); end # @private # - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#193 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:193 def raise_cant_constrain_count_for_negated_have_received_error(count_constraint); end # @private # - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#170 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:170 def raise_double_negation_error(wrapped_expression); end # @private # - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#77 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:77 def raise_expectation_error(message, expected_received_count, argument_list_matcher, actual_received_count, expectation_count_type, args, backtrace_line = T.unsafe(nil), source_id = T.unsafe(nil)); end # @private # - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#164 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:164 def raise_expectation_on_mocked_method(method); end - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#211 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:211 def raise_expectation_on_nil_error(method_name); end # @private # - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#158 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:158 def raise_expectation_on_unstubbed_method(method); end # @private - # @raise [ExpiredTestDoubleError] # - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#123 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:123 def raise_expired_test_double_error; end # @private # - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#187 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:187 def raise_have_received_disallowed(type, reason); end # @private # - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#118 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:118 def raise_invalid_arguments_error(verifier); end # @private # - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#198 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:198 def raise_method_not_stubbed_error(method_name); end # @private # - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#142 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:142 def raise_missing_block_error(args_to_yield); end # @private # - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#59 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:59 def raise_missing_default_stub_error(expectation, args_for_multiple_calls); end # @private - # @raise [NoMethodError] # - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#111 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:111 def raise_non_public_error(method_name, visibility); end # @private # - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#152 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:152 def raise_only_valid_on_a_partial_double(method); end # @private # - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#137 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:137 def raise_out_of_order_error(message); end # @private # - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#67 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:67 def raise_similar_message_args_error(expectation, args_for_multiple_calls, backtrace_line = T.unsafe(nil)); end # @private # - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#54 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:54 def raise_unexpected_message_args_error(expectation, args_for_multiple_calls, source_id = T.unsafe(nil)); end # @private # - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#49 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:49 def raise_unexpected_message_error(message, args); end # @private # - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#87 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:87 def raise_unimplemented_error(doubled_module, method_name, object); end # @private # - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#178 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:178 def raise_verifying_double_not_defined_error(ref); end # @private # - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#147 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:147 def raise_wrong_arity_error(args_to_yield, signature); end private - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#328 + # pkg:gem/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#356 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:356 def arg_list(args); end - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#366 + # pkg:gem/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#302 + # pkg:gem/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#324 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:324 def differ; end - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#268 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:268 def error_message(expectation, args_for_multiple_calls); end - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#257 + # pkg:gem/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#351 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:351 def format_args(args); end - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#360 + # pkg:gem/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#380 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:380 def group_count(index, args); end - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#376 + # pkg:gem/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#320 + # pkg:gem/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#347 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:347 def notify(*args); end - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#342 + # pkg:gem/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 + # pkg:gem/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#372 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:372 def times(count); end - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#264 + # pkg:gem/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#312 + # pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:312 def unpack_string_args(formatted_expected_args, actual_args); end end @@ -2215,29 +1929,15 @@ end # to use rspec-mocks with your test framework. If you're using rspec-core, # it'll take care of doing this for you. # -# source://rspec-mocks//lib/rspec/mocks/example_methods.rb#9 +# pkg:gem/rspec-mocks#lib/rspec/mocks/example_methods.rb:9 module RSpec::Mocks::ExampleMethods include ::RSpec::Mocks::ArgumentMatchers include ::RSpec::Mocks::ExampleMethods::ExpectHost - # Used to wrap an object in preparation for stubbing a method - # on it. - # - # @example - # allow(dbl).to receive(:foo).with(5).and_return(:return_value) - # @note If you disable the `:expect` syntax this method will be undefined. - # - # source://rspec-mocks//lib/rspec/mocks/syntax.rb#128 + # pkg:gem/rspec-mocks#lib/rspec/mocks/configuration.rb:84 def allow(target); end - # Used to wrap a class in preparation for stubbing a method - # on instances of it. - # - # @example - # allow_any_instance_of(MyClass).to receive(:foo) - # @note This is only available when you have enabled the `expect` syntax. - # - # source://rspec-mocks//lib/rspec/mocks/syntax.rb#136 + # pkg:gem/rspec-mocks#lib/rspec/mocks/configuration.rb:84 def allow_any_instance_of(klass); end # Disables warning messages about expectations being set on nil. @@ -2245,26 +1945,47 @@ module RSpec::Mocks::ExampleMethods # By default warning messages are issued when expectations are set on # nil. This is to prevent false-positives and to catch potential bugs # early on. - # # @deprecated Use {RSpec::Mocks::Configuration#allow_message_expectations_on_nil} instead. # - # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#201 + # pkg:gem/rspec-mocks#lib/rspec/mocks/example_methods.rb:201 def allow_message_expectations_on_nil; end + # @overload class_double(doubled_class) + # @param doubled_class [String, Module] + # @overload class_double(doubled_class, name) + # @param doubled_class [String, Module] + # @param name [String/Symbol] name or description to be used in failure messages + # @overload class_double(doubled_class, stubs) + # @param doubled_class [String, Module] + # @param stubs [Hash] hash of message/return-value pairs + # @overload class_double(doubled_class, name, stubs) + # @param doubled_class [String, Module] + # @param name [String/Symbol] name or description to be used in failure messages + # @param stubs [Hash] hash of message/return-value pairs + # @return ClassVerifyingDouble + # # Constructs a test double against a specific class. If the given class # name has been loaded, only class methods defined on the class are # allowed to be stubbed. In all other ways it behaves like a # [double](double). # - # @overload class_double - # @overload class_double - # @overload class_double - # @overload class_double - # @return ClassVerifyingDouble - # - # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#79 + # pkg:gem/rspec-mocks#lib/rspec/mocks/example_methods.rb:79 def class_double(doubled_class, *args); end + # @overload class_spy(doubled_class) + # @param doubled_class [String, Module] + # @overload class_spy(doubled_class, name) + # @param doubled_class [String, Class] + # @param name [String/Symbol] name or description to be used in failure messages + # @overload class_spy(doubled_class, stubs) + # @param doubled_class [String, Module] + # @param stubs [Hash] hash of message/return-value pairs + # @overload class_spy(doubled_class, name, stubs) + # @param doubled_class [String, Class] + # @param name [String/Symbol] name or description to be used in failure messages + # @param stubs [Hash] hash of message/return-value pairs + # @return ClassVerifyingDouble + # # Constructs a test double that is optimized for use with `have_received` # against a specific class. If the given class name has been loaded, # only class methods defined on the class are allowed to be stubbed. @@ -2272,15 +1993,19 @@ module RSpec::Mocks::ExampleMethods # them. An class_spy automatically spies on all class methods to which the # class responds. # - # @overload class_spy - # @overload class_spy - # @overload class_spy - # @overload class_spy - # @return ClassVerifyingDouble - # - # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#191 + # pkg:gem/rspec-mocks#lib/rspec/mocks/example_methods.rb:191 def class_spy(*args); end + # @overload double() + # @overload double(name) + # @param name [String/Symbol] name or description to be used in failure messages + # @overload double(stubs) + # @param stubs (Hash) hash of message/return-value pairs + # @overload double(name, stubs) + # @param name [String/Symbol] name or description to be used in failure messages + # @param stubs (Hash) hash of message/return-value pairs + # @return (Double) + # # Constructs an instance of [RSpec::Mocks::Double](RSpec::Mocks::Double) configured # with an optional name, used for reporting in failure messages, and an optional # hash of message/return-value pairs. @@ -2292,23 +2017,11 @@ module RSpec::Mocks::ExampleMethods # card = double("card", :suit => "Spades", :rank => "A") # card.suit #=> "Spades" # card.rank #=> "A" - # @overload double - # @overload double - # @overload double - # @overload double - # @return [Double] # - # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#34 + # pkg:gem/rspec-mocks#lib/rspec/mocks/example_methods.rb:34 def double(*args); end - # Used to wrap a class in preparation for setting a mock expectation - # on instances of it. - # - # @example - # expect_any_instance_of(MyClass).to receive(:foo) - # @note If you disable the `:expect` syntax this method will be undefined. - # - # source://rspec-mocks//lib/rspec/mocks/syntax.rb#132 + # pkg:gem/rspec-mocks#lib/rspec/mocks/configuration.rb:84 def expect_any_instance_of(klass); end # Verifies that the given object received the expected message during the @@ -2319,6 +2032,9 @@ module RSpec::Mocks::ExampleMethods # Stubbing and verifying messages received in this way implements the # Test Spy pattern. # + # @param method_name [Symbol] name of the method expected to have been + # called. + # # @example # invitation = double('invitation', accept: true) # user.accept_invitation(invitation) @@ -2326,12 +2042,11 @@ module RSpec::Mocks::ExampleMethods # # # You can also use most message expectations: # expect(invitation).to have_received(:accept).with(mailer).once + # # @note `have_received(...).with(...)` is unable to work properly when # passed arguments are mutated after the spy records the received message. - # @param method_name [Symbol] name of the method expected to have been - # called. # - # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#281 + # pkg:gem/rspec-mocks#lib/rspec/mocks/example_methods.rb:281 def have_received(method_name, &block); end # Hides the named constant with the given value. The constant will be @@ -2340,28 +2055,51 @@ module RSpec::Mocks::ExampleMethods # Like method stubs, the constant will be restored to its original value # when the example completes. # - # @example - # hide_const("MyClass") # => MyClass is now an undefined constant # @param constant_name [String] The fully qualified name of the constant. # The current constant scoping at the point of call is not considered. # - # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#256 + # @example + # hide_const("MyClass") # => MyClass is now an undefined constant + # + # pkg:gem/rspec-mocks#lib/rspec/mocks/example_methods.rb:256 def hide_const(constant_name); end + # @overload instance_double(doubled_class) + # @param doubled_class [String, Class] + # @overload instance_double(doubled_class, name) + # @param doubled_class [String, Class] + # @param name [String/Symbol] name or description to be used in failure messages + # @overload instance_double(doubled_class, stubs) + # @param doubled_class [String, Class] + # @param stubs [Hash] hash of message/return-value pairs + # @overload instance_double(doubled_class, name, stubs) + # @param doubled_class [String, Class] + # @param name [String/Symbol] name or description to be used in failure messages + # @param stubs [Hash] hash of message/return-value pairs + # @return InstanceVerifyingDouble + # # Constructs a test double against a specific class. If the given class # name has been loaded, only instance methods defined on the class are # allowed to be stubbed. In all other ways it behaves like a # [double](double). # - # @overload instance_double - # @overload instance_double - # @overload instance_double - # @overload instance_double - # @return InstanceVerifyingDouble - # - # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#56 + # pkg:gem/rspec-mocks#lib/rspec/mocks/example_methods.rb:56 def instance_double(doubled_class, *args); end + # @overload instance_spy(doubled_class) + # @param doubled_class [String, Class] + # @overload instance_spy(doubled_class, name) + # @param doubled_class [String, Class] + # @param name [String/Symbol] name or description to be used in failure messages + # @overload instance_spy(doubled_class, stubs) + # @param doubled_class [String, Class] + # @param stubs [Hash] hash of message/return-value pairs + # @overload instance_spy(doubled_class, name, stubs) + # @param doubled_class [String, Class] + # @param name [String/Symbol] name or description to be used in failure messages + # @param stubs [Hash] hash of message/return-value pairs + # @return InstanceVerifyingDouble + # # Constructs a test double that is optimized for use with `have_received` # against a specific class. If the given class name has been loaded, only # instance methods defined on the class are allowed to be stubbed. With @@ -2369,112 +2107,78 @@ module RSpec::Mocks::ExampleMethods # them. An instance_spy automatically spies on all instance methods to # which the class responds. # - # @overload instance_spy - # @overload instance_spy - # @overload instance_spy - # @overload instance_spy - # @return InstanceVerifyingDouble - # - # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#144 + # pkg:gem/rspec-mocks#lib/rspec/mocks/example_methods.rb:144 def instance_spy(*args); end + # @overload object_double(object_or_name) + # @param object_or_name [String, Object] + # @overload object_double(object_or_name, name) + # @param object_or_name [String, Object] + # @param name [String/Symbol] name or description to be used in failure messages + # @overload object_double(object_or_name, stubs) + # @param object_or_name [String, Object] + # @param stubs [Hash] hash of message/return-value pairs + # @overload object_double(object_or_name, name, stubs) + # @param object_or_name [String, Object] + # @param name [String/Symbol] name or description to be used in failure messages + # @param stubs [Hash] hash of message/return-value pairs + # @return ObjectVerifyingDouble + # # Constructs a test double against a specific object. Only the methods # the object responds to are allowed to be stubbed. If a String argument # is provided, it is assumed to reference a constant object which is used # for verification. In all other ways it behaves like a [double](double). # - # @overload object_double - # @overload object_double - # @overload object_double - # @overload object_double - # @return ObjectVerifyingDouble - # - # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#102 + # pkg:gem/rspec-mocks#lib/rspec/mocks/example_methods.rb:102 def object_double(object_or_name, *args); end + # @overload object_spy(object_or_name) + # @param object_or_name [String, Object] + # @overload object_spy(object_or_name, name) + # @param object_or_name [String, Class] + # @param name [String/Symbol] name or description to be used in failure messages + # @overload object_spy(object_or_name, stubs) + # @param object_or_name [String, Object] + # @param stubs [Hash] hash of message/return-value pairs + # @overload object_spy(object_or_name, name, stubs) + # @param object_or_name [String, Class] + # @param name [String/Symbol] name or description to be used in failure messages + # @param stubs [Hash] hash of message/return-value pairs + # @return ObjectVerifyingDouble + # # Constructs a test double that is optimized for use with `have_received` # against a specific object. Only instance methods defined on the object # are allowed to be stubbed. With a normal double one has to stub # methods in order to be able to spy them. An object_spy automatically # spies on all methods to which the object responds. # - # @overload object_spy - # @overload object_spy - # @overload object_spy - # @overload object_spy - # @return ObjectVerifyingDouble - # - # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#167 + # pkg:gem/rspec-mocks#lib/rspec/mocks/example_methods.rb:167 def object_spy(*args); end - # Used to specify a message that you expect or allow an object - # to receive. The object returned by `receive` supports the same - # fluent interface that `should_receive` and `stub` have always - # supported, allowing you to constrain the arguments or number of - # times, and configure how the object should respond to the message. - # - # @example - # expect(obj).to receive(:hello).with("world").exactly(3).times - # @note If you disable the `:expect` syntax this method will be undefined. - # - # source://rspec-mocks//lib/rspec/mocks/syntax.rb#114 + # pkg:gem/rspec-mocks#lib/rspec/mocks/configuration.rb:84 def receive(method_name, &block); end - # stubs/mocks a chain of messages on an object or test double. - # - # ## Warning: - # - # Chains can be arbitrarily long, which makes it quite painless to - # violate the Law of Demeter in violent ways, so you should consider any - # use of `receive_message_chain` a code smell. Even though not all code smells - # indicate real problems (think fluent interfaces), `receive_message_chain` still - # results in brittle examples. For example, if you write - # `allow(foo).to receive_message_chain(:bar, :baz => 37)` in a spec and then the - # implementation calls `foo.baz.bar`, the stub will not work. - # - # @example - # allow(double).to receive_message_chain("foo.bar") { :baz } - # allow(double).to receive_message_chain(:foo, :bar => :baz) - # allow(double).to receive_message_chain(:foo, :bar) { :baz } - # - # # Given any of ^^ these three forms ^^: - # double.foo.bar # => :baz - # - # # Common use in Rails/ActiveRecord: - # allow(Article).to receive_message_chain("recent.published") { [Article.new] } - # @note If you disable the `:expect` syntax this method will be undefined. - # @overload receive_message_chain - # @overload receive_message_chain - # @overload receive_message_chain - # - # source://rspec-mocks//lib/rspec/mocks/syntax.rb#124 + # pkg:gem/rspec-mocks#lib/rspec/mocks/configuration.rb:84 def receive_message_chain(*messages, &block); end - # Shorthand syntax used to setup message(s), and their return value(s), - # that you expect or allow an object to receive. The method takes a hash - # of messages and their respective return values. Unlike with `receive`, - # you cannot apply further customizations using a block or the fluent - # interface. - # - # @example - # allow(obj).to receive_messages(:speak => "Hello World") - # allow(obj).to receive_messages(:speak => "Hello", :meow => "Meow") - # @note If you disable the `:expect` syntax this method will be undefined. - # - # source://rspec-mocks//lib/rspec/mocks/syntax.rb#118 + # pkg:gem/rspec-mocks#lib/rspec/mocks/configuration.rb:84 def receive_messages(message_return_value_hash, &_block); end + # @overload spy() + # @overload spy(name) + # @param name [String/Symbol] name or description to be used in failure messages + # @overload spy(stubs) + # @param stubs (Hash) hash of message/return-value pairs + # @overload spy(name, stubs) + # @param name [String/Symbol] name or description to be used in failure messages + # @param stubs (Hash) hash of message/return-value pairs + # @return (Double) + # # Constructs a test double that is optimized for use with # `have_received`. With a normal double one has to stub methods in order # to be able to spy them. A spy automatically spies on all methods. # - # @overload spy - # @overload spy - # @overload spy - # @overload spy - # @return [Double] - # - # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#120 + # pkg:gem/rspec-mocks#lib/rspec/mocks/example_methods.rb:120 def spy(*args); end # Stubs the named constant with the given value. @@ -2482,13 +2186,24 @@ module RSpec::Mocks::ExampleMethods # to its original value (or lack of one, if it was # undefined) when the example completes. # + # @param constant_name [String] The fully qualified name of the constant. The current + # constant scoping at the point of call is not considered. + # @param value [Object] The value to make the constant refer to. When the + # example completes, the constant will be restored to its prior state. + # @param options [Hash] Stubbing options. + # @option options :transfer_nested_constants [Boolean, Array] Determines + # what nested constants, if any, will be transferred from the original value + # of the constant to the new value of the constant. This only works if both + # the original and new values are modules (or classes). + # @return [Object] the stubbed value of the constant + # # @example # stub_const("MyClass", Class.new) # => Replaces (or defines) MyClass with a new class object. # stub_const("SomeModel::PER_PAGE", 5) # => Sets SomeModel::PER_PAGE to 5. # # class CardDeck - # SUITS = [:Spades, :Diamonds, :Clubs, :Hearts] - # NUM_CARDS = 52 + # SUITS = [:Spades, :Diamonds, :Clubs, :Hearts] + # NUM_CARDS = 52 # end # # stub_const("CardDeck", Class.new) @@ -2502,15 +2217,8 @@ module RSpec::Mocks::ExampleMethods # stub_const("CardDeck", Class.new, :transfer_nested_constants => [:SUITS]) # CardDeck::SUITS # => our suits array # CardDeck::NUM_CARDS # => uninitialized constant error - # @option options - # @param constant_name [String] The fully qualified name of the constant. The current - # constant scoping at the point of call is not considered. - # @param value [Object] The value to make the constant refer to. When the - # example completes, the constant will be restored to its prior state. - # @param options [Hash] Stubbing options. - # @return [Object] the stubbed value of the constant # - # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#241 + # pkg:gem/rspec-mocks#lib/rspec/mocks/example_methods.rb:241 def stub_const(constant_name, value, options = T.unsafe(nil)); end # Turns off the verifying of partial doubles for the duration of the @@ -2518,30 +2226,28 @@ module RSpec::Mocks::ExampleMethods # time and you wish to define stubs for them but not turn off partial # doubles for the entire run suite. (e.g. view specs in rspec-rails). # - # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#289 + # pkg:gem/rspec-mocks#lib/rspec/mocks/example_methods.rb:289 def without_partial_double_verification; end class << self # @private # - # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#423 + # pkg:gem/rspec-mocks#lib/rspec/mocks/example_methods.rb:423 def declare_double(type, *args); end # @private # - # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#408 + # pkg:gem/rspec-mocks#lib/rspec/mocks/example_methods.rb:408 def declare_verifying_double(type, ref, *args); end - # @private # @private # - # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#401 + # pkg:gem/rspec-mocks#lib/rspec/mocks/example_methods.rb:401 def extended(object); end - # @private # @private # - # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#392 + # pkg:gem/rspec-mocks#lib/rspec/mocks/example_methods.rb:392 def included(klass); end end end @@ -2549,131 +2255,110 @@ end # This module exists to host the `expect` method for cases where # rspec-mocks is used w/o rspec-expectations. # -# source://rspec-mocks//lib/rspec/mocks/example_methods.rb#430 +# pkg:gem/rspec-mocks#lib/rspec/mocks/example_methods.rb:430 module RSpec::Mocks::ExampleMethods::ExpectHost - # source://rspec-mocks//lib/rspec/mocks/syntax.rb#142 + # pkg:gem/rspec-mocks#lib/rspec/mocks/configuration.rb:84 def expect(target); end end # @private # -# source://rspec-mocks//lib/rspec/mocks/message_chain.rb#61 +# pkg:gem/rspec-mocks#lib/rspec/mocks/message_chain.rb:61 class RSpec::Mocks::ExpectChain < ::RSpec::Mocks::MessageChain private - # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#69 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_chain.rb:69 def expectation(object, message, &return_block); end class << self # @api private # - # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#63 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_chain.rb:63 def expect_chain_on(object, *chain, &blk); end end end # @private # -# source://rspec-mocks//lib/rspec/mocks/targets.rb#87 +# pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:87 class RSpec::Mocks::ExpectationTarget < ::RSpec::Mocks::TargetBase include ::RSpec::Mocks::ExpectationTargetMethods end # @private # -# source://rspec-mocks//lib/rspec/mocks/targets.rb#73 +# pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:73 module RSpec::Mocks::ExpectationTargetMethods include ::RSpec::Mocks::TargetDelegationInstanceMethods extend ::RSpec::Mocks::TargetDelegationClassMethods - # source://rspec-mocks//lib/rspec/mocks/targets.rb#81 + # pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:81 def expression; end - # source://rspec-mocks//lib/rspec/mocks/targets.rb#16 + # pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:16 def not_to(matcher, &block); end - # source://rspec-mocks//lib/rspec/mocks/targets.rb#6 + # pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:6 def to(matcher, &block); end - # source://rspec-mocks//lib/rspec/mocks/targets.rb#16 + # pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:16 def to_not(matcher, &block); end end # Raised when a test double is used after it has been torn # down (typically at the end of an rspec-core example). # -# source://rspec-mocks//lib/rspec/mocks/error_generator.rb#10 +# pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:10 class RSpec::Mocks::ExpiredTestDoubleError < ::RSpec::Mocks::MockExpectationError; end # @private # -# source://rspec-mocks//lib/rspec/mocks.rb#112 +# pkg:gem/rspec-mocks#lib/rspec/mocks.rb:112 RSpec::Mocks::IGNORED_BACKTRACE_LINE = T.let(T.unsafe(nil), String) # Represents a configured implementation. Takes into account # any number of sub-implementations. -# # @private # -# source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#757 +# pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:792 class RSpec::Mocks::Implementation - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#760 - def call(*args, **_arg1, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:795 + def call(*args, **, &block); end - # Returns the value of attribute initial_action. - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#758 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:793 def initial_action; end - # Sets the attribute initial_action - # - # @param value the value to set the attribute initial_action to. - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#758 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:793 def initial_action=(_arg0); end - # Returns the value of attribute inner_action. - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#758 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:793 def inner_action; end - # Sets the attribute inner_action - # - # @param value the value to set the attribute inner_action to. - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#758 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:793 def inner_action=(_arg0); end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#767 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:802 def present?; end - # Returns the value of attribute terminal_action. - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#758 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:793 def terminal_action; end - # Sets the attribute terminal_action - # - # @param value the value to set the attribute terminal_action to. - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#758 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:793 def terminal_action=(_arg0); end private - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#773 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:808 def actions; end end # @private # -# source://rspec-mocks//lib/rspec/mocks/method_reference.rb#113 +# pkg:gem/rspec-mocks#lib/rspec/mocks/method_reference.rb:113 class RSpec::Mocks::InstanceMethodReference < ::RSpec::Mocks::MethodReference private - # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#138 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_reference.rb:138 def find_method(mod); end # Ideally, we'd use `respond_to?` for `method_implemented?` but we need a @@ -2682,73 +2367,60 @@ class RSpec::Mocks::InstanceMethodReference < ::RSpec::Mocks::MethodReference # `method_missing`, we'll return `false` even though it meets our # definition of "implemented". However, it's the best we can do. # - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#116 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_reference.rb:125 def method_defined?(mod); end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#116 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_reference.rb:116 def method_implemented?(mod); end - # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#143 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_reference.rb:143 def visibility_from(mod); end end # @private # -# source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#4 +# pkg:gem/rspec-mocks#lib/rspec/mocks/instance_method_stasher.rb:4 class RSpec::Mocks::InstanceMethodStasher - # @return [InstanceMethodStasher] a new instance of InstanceMethodStasher - # - # source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#5 + # pkg:gem/rspec-mocks#lib/rspec/mocks/instance_method_stasher.rb:5 def initialize(object, method); end # ruby 2.0.0-p247 and 2.0.0-p195 both have a bug that we can't work around :(. # https://bugs.ruby-lang.org/issues/8686 # - # source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#91 + # pkg:gem/rspec-mocks#lib/rspec/mocks/instance_method_stasher.rb:91 def handle_restoration_failures; end # @private - # @return [Boolean] # - # source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#49 + # pkg:gem/rspec-mocks#lib/rspec/mocks/instance_method_stasher.rb:49 def method_is_stashed?; end - # Returns the value of attribute original_method. - # - # source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#14 + # pkg:gem/rspec-mocks#lib/rspec/mocks/instance_method_stasher.rb:14 def original_method; end # @private # - # source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#61 + # pkg:gem/rspec-mocks#lib/rspec/mocks/instance_method_stasher.rb:61 def restore; end # @private # - # source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#54 + # pkg:gem/rspec-mocks#lib/rspec/mocks/instance_method_stasher.rb:54 def stash; end private # @private - # @return [Boolean] # - # source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#100 + # pkg:gem/rspec-mocks#lib/rspec/mocks/instance_method_stasher.rb:100 def method_defined_directly_on_klass?; end # @private - # @return [Boolean] # - # source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#105 + # pkg:gem/rspec-mocks#lib/rspec/mocks/instance_method_stasher.rb:105 def method_defined_on_klass?(klass = T.unsafe(nil)); end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#109 + # pkg:gem/rspec-mocks#lib/rspec/mocks/instance_method_stasher.rb:109 def method_owned_by_klass?; end end @@ -2758,12 +2430,12 @@ end # # @private # -# source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#71 +# pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_double.rb:73 class RSpec::Mocks::InstanceVerifyingDouble include ::RSpec::Mocks::TestDouble include ::RSpec::Mocks::VerifyingDouble - # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#75 + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_double.rb:77 def __build_mock_proxy(order_group); end end @@ -2771,488 +2443,446 @@ end # # @private # -# source://rspec-mocks//lib/rspec/mocks/marshal_extension.rb#6 +# pkg:gem/rspec-mocks#lib/rspec/mocks/marshal_extension.rb:6 class RSpec::Mocks::MarshalExtension class << self - # source://rspec-mocks//lib/rspec/mocks/marshal_extension.rb#7 + # pkg:gem/rspec-mocks#lib/rspec/mocks/marshal_extension.rb:7 def patch!; end - # source://rspec-mocks//lib/rspec/mocks/marshal_extension.rb#27 + # pkg:gem/rspec-mocks#lib/rspec/mocks/marshal_extension.rb:27 def unpatch!; end end end # Namespace for mock-related matchers. # -# source://rspec-mocks//lib/rspec/mocks.rb#122 +# pkg:gem/rspec-mocks#lib/rspec/mocks.rb:122 module RSpec::Mocks::Matchers; end # @private # -# source://rspec-mocks//lib/rspec/mocks/matchers/expectation_customization.rb#5 +# pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/expectation_customization.rb:5 class RSpec::Mocks::Matchers::ExpectationCustomization - # @return [ExpectationCustomization] a new instance of ExpectationCustomization - # - # source://rspec-mocks//lib/rspec/mocks/matchers/expectation_customization.rb#8 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/expectation_customization.rb:8 def initialize(method_name, args, block); end - # Returns the value of attribute block. - # - # source://rspec-mocks//lib/rspec/mocks/matchers/expectation_customization.rb#6 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/expectation_customization.rb:6 def block; end - # Sets the attribute block - # - # @param value the value to set the attribute block to. - # - # source://rspec-mocks//lib/rspec/mocks/matchers/expectation_customization.rb#6 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/expectation_customization.rb:6 def block=(_arg0); end - # source://rspec-mocks//lib/rspec/mocks/matchers/expectation_customization.rb#14 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/expectation_customization.rb:14 def playback_onto(expectation); end end # @private # -# source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#5 +# pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:5 class RSpec::Mocks::Matchers::HaveReceived include ::RSpec::Mocks::Matchers::Matcher - # @return [HaveReceived] a new instance of HaveReceived - # - # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#12 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:12 def initialize(method_name, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#53 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:53 def at_least(*args); end - # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#53 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:53 def at_most(*args); end - # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#48 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:48 def description; end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#32 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:32 def does_not_match?(subject); end - # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#53 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:53 def exactly(*args); end - # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#40 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:40 def failure_message; end - # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#44 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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#53 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:53 def once(*args); end - # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#53 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:53 def ordered(*args); end - # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#67 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:67 def setup_allowance(_subject, &_block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#71 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:71 def setup_any_instance_allowance(_subject, &_block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#75 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:75 def setup_any_instance_expectation(_subject, &_block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#79 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:79 def setup_any_instance_negative_expectation(_subject, &_block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#59 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:59 def setup_expectation(subject, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#63 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:63 def setup_negative_expectation(subject, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#53 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:53 def thrice(*args); end - # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#53 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:53 def time(*args); end - # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#53 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:53 def times(*args); end - # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#53 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:53 def twice(*args); end - # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#53 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:53 def with(*args); end private - # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#95 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:95 def apply_constraints_to(expectation); end - # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#112 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:112 def capture_failure_message; end - # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#106 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:106 def count_constraint; end - # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#85 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:85 def disallow(type, reason = T.unsafe(nil)); end - # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#101 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:101 def ensure_count_unconstrained; end - # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#89 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:89 def expect; end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#123 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:123 def expected_messages_received_in_order?; end - # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#128 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:128 def mock_proxy; end - # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#118 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:118 def notify_failure_message; end end -# source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#9 +# pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:9 RSpec::Mocks::Matchers::HaveReceived::ARGS_CONSTRAINTS = T.let(T.unsafe(nil), Array) -# source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#10 +# pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:10 RSpec::Mocks::Matchers::HaveReceived::CONSTRAINTS = T.let(T.unsafe(nil), Array) -# source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#8 +# pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/have_received.rb:8 RSpec::Mocks::Matchers::HaveReceived::COUNT_CONSTRAINTS = T.let(T.unsafe(nil), Array) -# just a "tag" for rspec-mock matchers detection -# # @private +# just a "tag" for rspec-mock matchers detection # -# source://rspec-mocks//lib/rspec/mocks.rb#125 +# pkg:gem/rspec-mocks#lib/rspec/mocks.rb:125 module RSpec::Mocks::Matchers::Matcher; end # @private # -# source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#7 +# pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:7 class RSpec::Mocks::Matchers::Receive include ::RSpec::Mocks::Matchers::Matcher - # @return [Receive] a new instance of Receive - # - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#10 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:10 def initialize(message, block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 - def and_call_original(*args, **_arg1, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:62 + def and_call_original(*args, **, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 - def and_invoke(*args, **_arg1, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:62 + def and_invoke(*args, **, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 - def and_raise(*args, **_arg1, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:62 + def and_raise(*args, **, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 - def and_return(*args, **_arg1, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:62 + def and_return(*args, **, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 - def and_throw(*args, **_arg1, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:62 + def and_throw(*args, **, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 - def and_wrap_original(*args, **_arg1, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:62 + def and_wrap_original(*args, **, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 - def and_yield(*args, **_arg1, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:62 + def and_yield(*args, **, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 - def at_least(*args, **_arg1, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:62 + def at_least(*args, **, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 - def at_most(*args, **_arg1, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:62 + def at_most(*args, **, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#20 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:20 def description; end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#30 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:39 def does_not_match?(subject, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 - def exactly(*args, **_arg1, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:62 + def exactly(*args, **, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 - def inspect(*args, **_arg1, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:62 + def inspect(*args, **, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#16 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:16 def matcher_name; end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#24 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:28 def matches?(subject, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 - def never(*args, **_arg1, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:62 + def never(*args, **, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 - def once(*args, **_arg1, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:62 + def once(*args, **, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 - def ordered(*args, **_arg1, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:62 + def ordered(*args, **, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#41 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:41 def setup_allowance(subject, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#54 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:54 def setup_any_instance_allowance(subject, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#46 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:46 def setup_any_instance_expectation(subject, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#50 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:50 def setup_any_instance_negative_expectation(subject, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#24 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:24 def setup_expectation(subject, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#30 + # pkg:gem/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#62 - def thrice(*args, **_arg1, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:62 + def thrice(*args, **, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 - def time(*args, **_arg1, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:62 + def time(*args, **, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 - def times(*args, **_arg1, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:62 + def times(*args, **, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 - def to_s(*args, **_arg1, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:62 + def to_s(*args, **, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 - def twice(*args, **_arg1, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:62 + def twice(*args, **, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 - def with(*args, **_arg1, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:62 + def with(*args, **, &block); end private - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#71 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:71 def describable; end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#108 + # pkg:gem/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#91 + # pkg:gem/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#96 + # pkg:gem/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#86 + # pkg:gem/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#75 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:75 def warn_if_any_instance(expression, subject); end end # MessageExpectation objects are able to describe themselves in detail. # We use this as a fall back when a MessageExpectation is not available. -# # @private # -# source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#119 +# pkg:gem/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#120 + # pkg:gem/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#127 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive.rb:127 def description_for(verb); end end # @private # -# source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#7 +# pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_message_chain.rb:7 class RSpec::Mocks::Matchers::ReceiveMessageChain include ::RSpec::Mocks::Matchers::Matcher - # @return [ReceiveMessageChain] a new instance of ReceiveMessageChain - # - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#10 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_message_chain.rb:10 def initialize(chain, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#17 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_message_chain.rb:17 def and_call_original(*args, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#17 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_message_chain.rb:17 def and_invoke(*args, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#17 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_message_chain.rb:17 def and_raise(*args, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#17 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_message_chain.rb:17 def and_return(*args, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#17 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_message_chain.rb:17 def and_throw(*args, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#17 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_message_chain.rb:17 def and_yield(*args, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#27 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_message_chain.rb:27 def description; end - # @raise [NegationUnsupportedError] - # - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#53 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_message_chain.rb:60 def does_not_match?(*_args); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#23 + # pkg:gem/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 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_message_chain.rb:59 def matches?(subject, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#31 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_message_chain.rb:31 def setup_allowance(subject, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#36 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_message_chain.rb:36 def setup_any_instance_allowance(subject, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#42 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_message_chain.rb:42 def setup_any_instance_expectation(subject, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#48 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_message_chain.rb:48 def setup_expectation(subject, &block); end - # @raise [NegationUnsupportedError] - # - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#53 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_message_chain.rb:53 def setup_negative_expectation(*_args); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#17 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_message_chain.rb:17 def with(*args, &block); end private - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#70 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_message_chain.rb:70 def formatted_chain; end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#64 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_message_chain.rb:64 def replay_customizations(chain); end end # @private # -# source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#5 +# pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_messages.rb:5 class RSpec::Mocks::Matchers::ReceiveMessages include ::RSpec::Mocks::Matchers::Matcher - # @return [ReceiveMessages] a new instance of ReceiveMessages - # - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#8 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_messages.rb:8 def initialize(message_return_value_hash); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#17 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_messages.rb:17 def description; end - # @raise [NegationUnsupportedError] - # - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#29 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_messages.rb:34 def does_not_match?(_subject); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#13 + # pkg:gem/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 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_messages.rb:27 def matches?(subject); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#36 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_messages.rb:36 def setup_allowance(subject); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#50 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_messages.rb:50 def setup_any_instance_allowance(subject); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#43 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_messages.rb:43 def setup_any_instance_expectation(subject); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#21 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_messages.rb:21 def setup_expectation(subject); end - # @raise [NegationUnsupportedError] - # - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#29 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_messages.rb:29 def setup_negative_expectation(_subject); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#55 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_messages.rb:55 def warn_about_block; end private - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#65 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_messages.rb:65 def any_instance_of(subject); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#69 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_messages.rb:69 def each_message_on(host); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#61 + # pkg:gem/rspec-mocks#lib/rspec/mocks/matchers/receive_messages.rb:61 def proxy_on(subject); end end # @private # -# source://rspec-mocks//lib/rspec/mocks/message_chain.rb#4 +# pkg:gem/rspec-mocks#lib/rspec/mocks/message_chain.rb:4 class RSpec::Mocks::MessageChain - # @return [MessageChain] a new instance of MessageChain - # - # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#7 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_chain.rb:7 def initialize(object, *chain, &blk); end - # Returns the value of attribute block. - # - # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#5 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_chain.rb:5 def block; end - # Returns the value of attribute chain. - # - # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#5 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_chain.rb:5 def chain; end - # Returns the value of attribute object. - # - # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#5 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_chain.rb:5 def object; end # @api private # - # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#13 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_chain.rb:13 def setup_chain; end private - # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#33 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_chain.rb:33 def chain_on(object, *chain, &block); end - # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#54 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_chain.rb:54 def find_matching_expectation; end - # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#49 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_chain.rb:49 def find_matching_stub; end - # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#38 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_chain.rb:38 def format_chain(*chain, &blk); end end @@ -3260,22 +2890,23 @@ end # defined here can be used to configure how it behaves. The methods return # `self` so that they can be chained together to form a fluent interface. # -# source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#44 +# pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:44 class RSpec::Mocks::MessageExpectation include ::RSpec::Mocks::MessageExpectation::ImplementationDetails # Tells the object to delegate to the original unmodified method # when it receives the message. # + # @note This is only available on partial doubles. + # + # @return [nil] No further chaining is supported after this. # @example # expect(counter).to receive(:increment).and_call_original # original_count = counter.count # counter.increment # expect(counter.count).to eq(original_count + 1) - # @note This is only available on partial doubles. - # @return [nil] No further chaining is supported after this. # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#141 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:141 def and_call_original; end # Tells the object to invoke a Proc when it receives the message. Given @@ -3286,6 +2917,7 @@ class RSpec::Mocks::MessageExpectation # If the message is received more times than there are Procs, the result of # the last Proc is returned for every subsequent call. # + # @return [nil] No further chaining is supported after this. # @example # allow(api).to receive(:get_foo).and_invoke(-> { raise ApiTimeout }) # api.get_foo # => raises ApiTimeout @@ -3298,32 +2930,37 @@ class RSpec::Mocks::MessageExpectation # api.get_foo # => :a_foo # api.get_foo # => :a_foo # # etc - # @return [nil] No further chaining is supported after this. # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#109 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:109 def and_invoke(first_proc, *procs, &_block); end + # @overload and_raise + # @overload and_raise(ExceptionClass) + # @overload and_raise(ExceptionClass, message) + # @overload and_raise(exception_instance) + # # Tells the object to raise an exception when the message is received. # + # @return [nil] No further chaining is supported after this. + # @note + # When you pass an exception class, the MessageExpectation will raise + # an instance of it, creating it with `exception` and passing `message` + # if specified. If the exception class initializer requires more than + # one parameters, you must pass in an instance and not the class, + # otherwise this method will raise an ArgumentError exception. + # # @example # allow(car).to receive(:go).and_raise # allow(car).to receive(:go).and_raise(OutOfGas) # allow(car).to receive(:go).and_raise(OutOfGas, "At least 2 oz of gas needed to drive") # allow(car).to receive(:go).and_raise(OutOfGas.new(2, :oz)) - # @note When you pass an exception class, the MessageExpectation will raise - # an instance of it, creating it with `exception` and passing `message` - # if specified. If the exception class initializer requires more than - # one parameters, you must pass in an instance and not the class, - # otherwise this method will raise an ArgumentError exception. - # @overload and_raise - # @overload and_raise - # @overload and_raise - # @overload and_raise - # @return [nil] No further chaining is supported after this. # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#186 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:186 def and_raise(*args); end + # @overload and_return(value) + # @overload and_return(first_value, second_value) + # # Tells the object to return a value when it receives the message. Given # more than one value, the first value is returned the first time the # message is received, the second value is returned the next time, etc, @@ -3332,6 +2969,7 @@ class RSpec::Mocks::MessageExpectation # If the message is received more times than there are values, the last # value is returned for every subsequent call. # + # @return [nil] No further chaining is supported after this. # @example # allow(counter).to receive(:count).and_return(1) # counter.count # => 1 @@ -3344,24 +2982,22 @@ class RSpec::Mocks::MessageExpectation # counter.count # => 3 # counter.count # => 3 # # etc - # @overload and_return - # @overload and_return - # @return [nil] No further chaining is supported after this. # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#71 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:71 def and_return(first_value, *values, &_block); end + # @overload and_throw(symbol) + # @overload and_throw(symbol, object) + # # Tells the object to throw a symbol (with the object if that form is # used) when the message is received. # + # @return [nil] No further chaining is supported after this. # @example # allow(car).to receive(:go).and_throw(:out_of_gas) # allow(car).to receive(:go).and_throw(:out_of_gas, :level => 0.1) - # @overload and_throw - # @overload and_throw - # @return [nil] No further chaining is supported after this. # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#202 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:202 def and_throw(*args); end # Decorates the stubbed method with the supplied block. The original @@ -3369,134 +3005,124 @@ class RSpec::Mocks::MessageExpectation # arguments so you can delegate to it, whilst still being able to # change what args are passed to it and/or change the return value. # + # @note This is only available on partial doubles. + # + # @return [nil] No further chaining is supported after this. # @example # expect(api).to receive(:large_list).and_wrap_original do |original_method, *args, &block| - # original_method.call(*args, &block).first(10) + # original_method.call(*args, &block).first(10) # end - # @note This is only available on partial doubles. - # @return [nil] No further chaining is supported after this. # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#162 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:162 def and_wrap_original(&block); end # Tells the object to yield one or more args to a block when the message # is received. # + # @return [MessageExpectation] self, to support further chaining. # @example # stream.stub(:open).and_yield(StringIO.new) - # @return [MessageExpectation] self, to support further chaining. - # @yield [@eval_context = Object.new] # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#214 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:214 def and_yield(*args, &block); end # Constrain a message expectation to be received at least a specific # number of times. # + # @return [MessageExpectation] self, to support further chaining. # @example # expect(dealer).to receive(:deal_card).at_least(9).times - # @return [MessageExpectation] self, to support further chaining. # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#249 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:249 def at_least(n, &block); end # Constrain a message expectation to be received at most a specific # number of times. # + # @return [MessageExpectation] self, to support further chaining. # @example # expect(dealer).to receive(:deal_card).at_most(10).times - # @return [MessageExpectation] self, to support further chaining. # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#268 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:268 def at_most(n, &block); end # Constrain a message expectation to be received a specific number of # times. # + # @return [MessageExpectation] self, to support further chaining. # @example # expect(dealer).to receive(:deal_card).exactly(10).times - # @return [MessageExpectation] self, to support further chaining. # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#236 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:236 def exactly(n, &block); end - # @return [String] a nice representation of the message expectation - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#396 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:401 def inspect; end # Expect a message not to be received at all. # + # @return [MessageExpectation] self, to support further chaining. # @example # expect(car).to receive(:stop).never - # @return [MessageExpectation] self, to support further chaining. # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#293 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:293 def never; end # Expect a message to be received exactly one time. # + # @return [MessageExpectation] self, to support further chaining. # @example # expect(car).to receive(:go).once - # @return [MessageExpectation] self, to support further chaining. # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#304 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:304 def once(&block); end # Expect messages to be received in a specific order. # + # @return [MessageExpectation] self, to support further chaining. # @example # expect(api).to receive(:prepare).ordered # expect(api).to receive(:run).ordered # expect(api).to receive(:finish).ordered - # @return [MessageExpectation] self, to support further chaining. # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#379 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:379 def ordered(&block); end # Expect a message to be received exactly three times. # + # @return [MessageExpectation] self, to support further chaining. # @example # expect(car).to receive(:go).thrice - # @return [MessageExpectation] self, to support further chaining. # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#326 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:326 def thrice(&block); end - # Syntactic sugar for `exactly`, `at_least` and `at_most` - # - # @example - # expect(dealer).to receive(:deal_card).exactly(10).times - # expect(dealer).to receive(:deal_card).at_least(10).times - # expect(dealer).to receive(:deal_card).at_most(10).times - # @return [MessageExpectation] self, to support further chaining. - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#282 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:286 def time(&block); end # Syntactic sugar for `exactly`, `at_least` and `at_most` # + # @return [MessageExpectation] self, to support further chaining. # @example # expect(dealer).to receive(:deal_card).exactly(10).times # expect(dealer).to receive(:deal_card).at_least(10).times # expect(dealer).to receive(:deal_card).at_most(10).times - # @return [MessageExpectation] self, to support further chaining. # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#282 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:282 def times(&block); end # @return [String] a nice representation of the message expectation # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#396 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:396 def to_s; end # Expect a message to be received exactly two times. # + # @return [MessageExpectation] self, to support further chaining. # @example # expect(car).to receive(:go).twice - # @return [MessageExpectation] self, to support further chaining. # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#315 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:315 def twice(&block); end # Constrains a stub or message expectation to invocations with specific @@ -3509,6 +3135,7 @@ class RSpec::Mocks::MessageExpectation # A message expectation will fail if the message is received with different # arguments. # + # @return [MessageExpectation] self, to support further chaining. # @example # allow(cart).to receive(:add) { :failure } # allow(cart).to receive(:add).with(Book.new(:isbn => 1934356379)) { :success } @@ -3522,259 +3149,211 @@ class RSpec::Mocks::MessageExpectation # # => failed expectation # cart.add(Book.new(:isbn => 1934356379)) # # => passes - # @return [MessageExpectation] self, to support further chaining. # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#359 - def with(*args, **_arg1, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:359 + def with(*args, **, &block); end end +# @private # Contains the parts of `MessageExpectation` that aren't part of # rspec-mocks' public API. The class is very big and could really use # some collaborators it delegates to for this stuff but for now this was # the simplest way to split the public from private stuff to make it # easier to publish the docs for the APIs we want published. # -# @private -# -# source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#409 +# pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:412 module RSpec::Mocks::MessageExpectation::ImplementationDetails - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#420 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:423 def initialize(error_generator, expectation_ordering, expected_from, method_double, type = T.unsafe(nil), opts = T.unsafe(nil), &implementation_block); end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#588 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:602 def actual_received_count_matters?; end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#575 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:589 def additional_expected_calls; end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#532 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:546 def advise(*args); end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#454 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:459 def and_yield_receiver_to_implementation; end - # Sets the attribute argument_list_matcher - # - # @param value the value to set the attribute argument_list_matcher to. - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#413 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:416 def argument_list_matcher=(_arg0); end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#487 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:501 def called_max_times?; end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#564 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:578 def description_for(verb); end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#507 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:521 def ensure_expected_ordering_received!; end - # Returns the value of attribute error_generator. - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#410 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:413 def error_generator; end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#558 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:572 def expectation_count_type; end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#450 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:455 def expected_args; end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#503 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:517 def expected_messages_received?; end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#540 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:554 def generate_error; end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#512 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:526 def ignoring_args?; end - # Returns the value of attribute implementation. - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#410 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:413 def implementation; end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#592 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:606 def increase_actual_received_count!; end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#473 - def invoke(parent_stub, *args, **_arg2, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:478 + def invoke(parent_stub, *args, **, &block); end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#478 - def invoke_without_incrementing_received_count(parent_stub, *args, **_arg2, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:492 + def invoke_without_incrementing_received_count(parent_stub, *args, **, &block); end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#463 - def matches?(message, *args, **_arg2); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:468 + def matches?(message, *args, **); end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#516 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:530 def matches_at_least_count?; end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#520 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:534 def matches_at_most_count?; end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#524 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:538 def matches_exact_count?; end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#494 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:508 def matches_name_but_not_args(message, *args); end - # Returns the value of attribute message. - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#411 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:414 def message; end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#483 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:497 def negative?; end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#584 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:598 def negative_expectation_for?(message); end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#580 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:594 def ordered?; end - # Returns the value of attribute orig_object. - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#412 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:415 def orig_object; end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#571 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:585 def raise_out_of_order_error; end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#554 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:568 def raise_unexpected_message_args_error(args_for_multiple_calls); end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#468 - def safe_invoke(parent_stub, *args, **_arg2, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:473 + def safe_invoke(parent_stub, *args, **, &block); end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#528 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:487 + def safe_invoke_without_incrementing_received_count(parent_stub, *args, **, &block); end + + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:542 def similar_messages; end # @private # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#417 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:420 def type; end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#536 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:550 def unadvise(args); end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#498 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:512 def verify_messages_received; end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#459 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:464 def yield_receiver_to_implementation_block?; end protected - # Sets the attribute error_generator - # - # @param value the value to set the attribute error_generator to. - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#410 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:413 def error_generator=(_arg0); end - # Sets the attribute expected_from - # - # @param value the value to set the attribute expected_from to. - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#413 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:416 def expected_from=(_arg0); end - # Sets the attribute expected_received_count - # - # @param value the value to set the attribute expected_received_count to. - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#413 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:416 def expected_received_count=(_arg0); end - # Sets the attribute implementation - # - # @param value the value to set the attribute implementation to. - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#410 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:413 def implementation=(_arg0); end private - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#600 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:614 def exception_source_id; end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#632 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:666 def has_been_invoked?; end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#655 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:689 def initial_implementation_action=(action); end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#659 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:693 def inner_implementation_action=(action); end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#604 - def invoke_incrementing_actual_calls_by(increment, allowed_to_fail, parent_stub, *args, **_arg4, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:633 + def invoke_incrementing_actual_calls_by(increment, allowed_to_fail, parent_stub, *args, **, &block); end + + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:618 + def invoking_internals; end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#636 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:622 + def invoking_internals=(value); end + + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:670 def raise_already_invoked_error_if_necessary(calling_customization); end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#642 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:676 def set_expected_received_count(relativity, n); end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#665 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:699 def terminal_implementation_action=(action); end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#669 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:703 def warn_about_stub_override; end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#676 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:710 def wrap_original(method_name, &block); end end # @private # -# source://rspec-mocks//lib/rspec/mocks/method_double.rb#4 +# pkg:gem/rspec-mocks#lib/rspec/mocks/method_double.rb:4 class RSpec::Mocks::MethodDouble # @private - # @return [MethodDouble] a new instance of MethodDouble # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#12 + # pkg:gem/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#216 + # pkg:gem/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#166 + # pkg:gem/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#202 + # pkg:gem/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 @@ -3786,37 +3365,37 @@ class RSpec::Mocks::MethodDouble # # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#197 + # pkg:gem/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#181 + # pkg:gem/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#175 + # pkg:gem/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#152 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_double.rb:152 def clear; end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#61 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_double.rb:61 def configure_method; end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#68 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_double.rb:68 def define_proxy_method; end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#9 + # pkg:gem/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 @@ -3824,38 +3403,38 @@ class RSpec::Mocks::MethodDouble # # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#161 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_double.rb:161 def message_expectation_class; end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#41 + # pkg:gem/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 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_double.rb:9 def method_name; end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#9 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_double.rb:9 def method_stasher; end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#9 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_double.rb:9 def object; end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#56 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_double.rb:56 def object_singleton_class; end - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#24 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_double.rb:24 def original_implementation_callable; end - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#34 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_double.rb:34 def original_method; end # The implementation of the proxied method. Subclasses may override this @@ -3863,90 +3442,90 @@ class RSpec::Mocks::MethodDouble # # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#97 - def proxy_method_invoked(_obj, *args, **_arg2, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_double.rb:97 + def proxy_method_invoked(_obj, *args, **, &block); end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#233 + # pkg:gem/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#222 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_double.rb:222 def remove_stub; end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#228 + # pkg:gem/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#146 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_double.rb:146 def reset; end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#103 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_double.rb:103 def restore_original_method; end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#133 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_double.rb:133 def restore_original_visibility; end - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#24 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_double.rb:32 def save_original_implementation_callable!; end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#207 + # pkg:gem/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#122 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_double.rb:122 def show_frozen_warning; end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#9 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_double.rb:9 def stubs; end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#141 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_double.rb:141 def verify; end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#51 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_double.rb:51 def visibility; end private - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#255 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_double.rb:255 def definition_target; end - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#275 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_double.rb:275 def new_rspec_prepended_module; end - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#293 + # pkg:gem/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#259 + # pkg:gem/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 +# pkg:gem/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#253 +# pkg:gem/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. @@ -3955,28 +3534,22 @@ class RSpec::Mocks::MethodDouble::RSpecPrependedModule < ::Module; end # # @private # -# source://rspec-mocks//lib/rspec/mocks/method_reference.rb#10 +# pkg:gem/rspec-mocks#lib/rspec/mocks/method_reference.rb:10 class RSpec::Mocks::MethodReference - # @return [MethodReference] a new instance of MethodReference - # - # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#15 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_reference.rb:15 def initialize(object_reference, method_name); end # A method is defined if we are able to get a `Method` object for it. # In that case, we can assert against metadata like the arity. # - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#46 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_reference.rb:46 def defined?; end # A method is implemented if sending the message does not result in # a `NoMethodError`. It might be dynamically implemented by # `method_missing`. # - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#23 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_reference.rb:23 def implemented?; end # Returns true if we definitively know that sending the method @@ -3986,35 +3559,31 @@ class RSpec::Mocks::MethodReference # cases when we don't know if a method is implemented and # both `implemented?` and `unimplemented?` will return false. # - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#35 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_reference.rb:35 def unimplemented?; end - # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#57 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_reference.rb:57 def visibility; end - # @yield [Support::MethodSignature.new(original)] - # - # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#52 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_reference.rb:52 def with_signature; end private - # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#105 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_reference.rb:105 def original_method; end class << self - # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#11 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_reference.rb:11 def for(object_reference, method_name); end - # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#67 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_reference.rb:67 def instance_method_visibility_for(klass, method_name); end - # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#67 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_reference.rb:78 def method_defined_at_any_visibility?(klass, method_name); end - # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#81 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_reference.rb:81 def method_visibility_for(object, method_name); end end end @@ -4023,12 +3592,12 @@ end # `and_return`) is called on a message expectation which has already been # invoked. # -# source://rspec-mocks//lib/rspec/mocks/error_generator.rb#18 +# pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:18 class RSpec::Mocks::MockExpectationAlreadyInvokedError < ::Exception; end # Raised when a message expectation is not satisfied. # -# source://rspec-mocks//lib/rspec/mocks/error_generator.rb#6 +# pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:6 class RSpec::Mocks::MockExpectationError < ::Exception; end # An implementation of rspec-mocks' reference interface. @@ -4037,36 +3606,32 @@ class RSpec::Mocks::MockExpectationError < ::Exception; end # {ExampleMethods#instance_double}, or {ExampleMethods#class_double}. # Represents a reference to the object named (via a constant lookup) # by the string. -# # @see DirectObjectReference # -# source://rspec-mocks//lib/rspec/mocks/object_reference.rb#109 +# pkg:gem/rspec-mocks#lib/rspec/mocks/object_reference.rb:109 class RSpec::Mocks::NamedObjectReference # @param const_name [String] constant name - # @return [NamedObjectReference] a new instance of NamedObjectReference # - # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#111 + # pkg:gem/rspec-mocks#lib/rspec/mocks/object_reference.rb:111 def initialize(const_name); end # @return [String] the constant name to replace with a double. # - # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#121 + # pkg:gem/rspec-mocks#lib/rspec/mocks/object_reference.rb:121 def const_to_replace; end # @return [Boolean] true if the named constant is defined, false otherwise. # - # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#116 + # pkg:gem/rspec-mocks#lib/rspec/mocks/object_reference.rb:116 def defined?; end - # @return [String] the constant name to replace with a double. - # - # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#121 + # pkg:gem/rspec-mocks#lib/rspec/mocks/object_reference.rb:124 def description; end # @return [Object, nil] the target of the verifying double (the named object), or # nil if it is not defined. # - # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#128 + # pkg:gem/rspec-mocks#lib/rspec/mocks/object_reference.rb:128 def target; end # Yields if the reference target is loaded, providing a generic mechanism @@ -4075,113 +3640,103 @@ class RSpec::Mocks::NamedObjectReference # # @yield [Object] the target object # - # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#137 + # pkg:gem/rspec-mocks#lib/rspec/mocks/object_reference.rb:137 def when_loaded; end private - # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#143 + # pkg:gem/rspec-mocks#lib/rspec/mocks/object_reference.rb:143 def object; end end # @private # -# source://rspec-mocks//lib/rspec/mocks/error_generator.rb#31 +# pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:31 class RSpec::Mocks::NegationUnsupportedError < ::StandardError; end # @private # -# source://rspec-mocks//lib/rspec/mocks/space.rb#209 +# pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:209 class RSpec::Mocks::NestedSpace < ::RSpec::Mocks::Space - # @return [NestedSpace] a new instance of NestedSpace - # - # source://rspec-mocks//lib/rspec/mocks/space.rb#210 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:210 def initialize(parent); end - # source://rspec-mocks//lib/rspec/mocks/space.rb#219 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:219 def constant_mutator_for(name); end - # source://rspec-mocks//lib/rspec/mocks/space.rb#215 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:215 def proxies_of(klass); end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/space.rb#223 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:223 def registered?(object); end private - # source://rspec-mocks//lib/rspec/mocks/space.rb#233 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:233 def any_instance_recorder_not_found_for(id, klass); end - # source://rspec-mocks//lib/rspec/mocks/space.rb#229 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:229 def proxy_not_found_for(id, object); end end # @private # -# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#16 +# pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_proxy.rb:16 class RSpec::Mocks::NoCallbackInvocationStrategy - # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#17 + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_proxy.rb:17 def call(_doubled_module); end end # @private # -# source://rspec-mocks//lib/rspec/mocks/method_reference.rb#149 +# pkg:gem/rspec-mocks#lib/rspec/mocks/method_reference.rb:149 class RSpec::Mocks::ObjectMethodReference < ::RSpec::Mocks::MethodReference private - # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#168 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_reference.rb:168 def find_method(object); end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#164 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_reference.rb:164 def method_defined?(object); end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#160 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_reference.rb:160 def method_implemented?(object); end - # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#172 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_reference.rb:172 def visibility_from(object); end class << self - # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#150 + # pkg:gem/rspec-mocks#lib/rspec/mocks/method_reference.rb:150 def for(object_reference, method_name); end end end # @private # -# source://rspec-mocks//lib/rspec/mocks/object_reference.rb#4 +# pkg:gem/rspec-mocks#lib/rspec/mocks/object_reference.rb:4 class RSpec::Mocks::ObjectReference class << self # Returns an appropriate Object or Module reference based # on the given argument. # - # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#7 + # pkg:gem/rspec-mocks#lib/rspec/mocks/object_reference.rb:7 def for(object_module_or_name, allow_direct_object_refs = T.unsafe(nil)); end private # 1.8.7 # - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#31 + # pkg:gem/rspec-mocks#lib/rspec/mocks/object_reference.rb:31 def anonymous_module?(mod); end - # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#41 + # pkg:gem/rspec-mocks#lib/rspec/mocks/object_reference.rb:41 def name_of(mod); end end end # @private # -# source://rspec-mocks//lib/rspec/mocks/object_reference.rb#47 +# pkg:gem/rspec-mocks#lib/rspec/mocks/object_reference.rb:47 RSpec::Mocks::ObjectReference::MODULE_NAME_METHOD = T.let(T.unsafe(nil), UnboundMethod) # Similar to an InstanceVerifyingDouble, except that it verifies against @@ -4189,7 +3744,7 @@ RSpec::Mocks::ObjectReference::MODULE_NAME_METHOD = T.let(T.unsafe(nil), Unbound # # @private # -# source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#110 +# pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_double.rb:112 class RSpec::Mocks::ObjectVerifyingDouble include ::RSpec::Mocks::TestDouble include ::RSpec::Mocks::VerifyingDouble @@ -4201,106 +3756,98 @@ end # # @private # -# source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#87 +# pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_double.rb:89 module RSpec::Mocks::ObjectVerifyingDoubleMethods include ::RSpec::Mocks::TestDouble include ::RSpec::Mocks::VerifyingDouble - # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#91 + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_double.rb:93 def as_stubbed_const(options = T.unsafe(nil)); end private - # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#98 + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_double.rb:100 def __build_mock_proxy(order_group); end end # @private # -# source://rspec-mocks//lib/rspec/mocks/order_group.rb#4 +# pkg:gem/rspec-mocks#lib/rspec/mocks/order_group.rb:6 class RSpec::Mocks::OrderGroup - # @return [OrderGroup] a new instance of OrderGroup - # - # source://rspec-mocks//lib/rspec/mocks/order_group.rb#5 + # pkg:gem/rspec-mocks#lib/rspec/mocks/order_group.rb:7 def initialize; end - # source://rspec-mocks//lib/rspec/mocks/order_group.rb#48 + # pkg:gem/rspec-mocks#lib/rspec/mocks/order_group.rb:53 def clear; end # @private # - # source://rspec-mocks//lib/rspec/mocks/order_group.rb#26 + # pkg:gem/rspec-mocks#lib/rspec/mocks/order_group.rb:31 def consume; end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/order_group.rb#54 + # pkg:gem/rspec-mocks#lib/rspec/mocks/order_group.rb:61 def empty?; end # @private # - # source://rspec-mocks//lib/rspec/mocks/order_group.rb#37 + # pkg:gem/rspec-mocks#lib/rspec/mocks/order_group.rb:42 def handle_order_constraint(expectation); end - # source://rspec-mocks//lib/rspec/mocks/order_group.rb#16 + # pkg:gem/rspec-mocks#lib/rspec/mocks/order_group.rb:19 def invoked(message); end # @private - # @return [Boolean] # - # source://rspec-mocks//lib/rspec/mocks/order_group.rb#21 + # pkg:gem/rspec-mocks#lib/rspec/mocks/order_group.rb:26 def ready_for?(expectation); end # @private # - # source://rspec-mocks//lib/rspec/mocks/order_group.rb#12 + # pkg:gem/rspec-mocks#lib/rspec/mocks/order_group.rb:15 def register(expectation); end - # source://rspec-mocks//lib/rspec/mocks/order_group.rb#43 + # pkg:gem/rspec-mocks#lib/rspec/mocks/order_group.rb:48 def verify_invocation_order(expectation); end private - # source://rspec-mocks//lib/rspec/mocks/order_group.rb#76 + # pkg:gem/rspec-mocks#lib/rspec/mocks/order_group.rb:87 def expectation_for(message); end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/order_group.rb#64 + # pkg:gem/rspec-mocks#lib/rspec/mocks/order_group.rb:71 def expectations_invoked_in_order?; end - # source://rspec-mocks//lib/rspec/mocks/order_group.rb#72 + # pkg:gem/rspec-mocks#lib/rspec/mocks/order_group.rb:81 def expected_invocations; end - # source://rspec-mocks//lib/rspec/mocks/order_group.rb#68 + # pkg:gem/rspec-mocks#lib/rspec/mocks/order_group.rb:75 def invoked_expectations; end - # source://rspec-mocks//lib/rspec/mocks/order_group.rb#60 + # pkg:gem/rspec-mocks#lib/rspec/mocks/order_group.rb:67 def remaining_expectations; end end # Raised when doubles or partial doubles are used outside of the per-test lifecycle. # -# source://rspec-mocks//lib/rspec/mocks/error_generator.rb#13 +# pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:13 class RSpec::Mocks::OutsideOfExampleError < ::StandardError; end # @private # -# source://rspec-mocks//lib/rspec/mocks/proxy.rb#456 +# pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:456 class RSpec::Mocks::PartialClassDoubleProxy < ::RSpec::Mocks::PartialDoubleProxy include ::RSpec::Mocks::PartialClassDoubleProxyMethods end +# @private # When we mock or stub a method on a class, we have to treat it a bit different, # because normally singleton method definitions only affect the object on which # they are defined, but on classes they affect subclasses, too. As a result, # we need some special handling to get the original method. # -# @private -# -# source://rspec-mocks//lib/rspec/mocks/proxy.rb#380 +# pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:380 module RSpec::Mocks::PartialClassDoubleProxyMethods - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#381 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:381 def initialize(source_space, *args); end # Consider this situation: @@ -4324,384 +3871,351 @@ 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#406 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:406 def original_method_handle_for(message); end protected - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#434 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:434 def method_double_from_ancestor_for(message); end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#429 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:429 def original_unbound_method_handle_from_ancestor_for(message); end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#444 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:444 def superclass_proxy; end end # @private # -# source://rspec-mocks//lib/rspec/mocks/proxy.rb#317 +# pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:317 class RSpec::Mocks::PartialDoubleProxy < ::RSpec::Mocks::Proxy # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#331 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:331 def add_simple_expectation(method_name, response, location); end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#337 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:337 def add_simple_stub(method_name, response); end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#354 - def message_received(message, *args, **_arg2, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:354 + def message_received(message, *args, **, &block); end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#318 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:318 def original_method_handle_for(message); end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#349 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:349 def reset; end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#343 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:343 def visibility_for(method_name); end private - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#364 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:364 def any_instance_class_recorder_observing_method?(klass, method_name); end end # @private # -# source://rspec-mocks//lib/rspec/mocks/proxy.rb#6 +# pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:6 class RSpec::Mocks::Proxy # @private - # @return [Proxy] a new instance of Proxy # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#20 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:20 def initialize(object, order_group, options = T.unsafe(nil)); end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#65 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:65 def add_message_expectation(method_name, opts = T.unsafe(nil), &block); end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#79 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:79 def add_simple_expectation(method_name, response, location); end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#140 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:140 def add_simple_stub(method_name, response); end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#134 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:134 def add_stub(method_name, opts = T.unsafe(nil), &implementation); end + # @private # Tells the object to ignore any messages that aren't explicitly set as # stubs or message expectations. # - # @private - # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#52 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:52 def as_null_object; end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#84 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:84 def build_expectation(method_name); end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#117 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:117 def check_for_unexpected_arguments(expectation); end # @private - # @raise [ArgumentError] # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#34 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:34 def ensure_can_be_proxied!(object); end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#15 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:15 def ensure_implemented(*_args); end # @private - # @return [Boolean] # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#181 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:181 def has_negative_expectation?(message); end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#195 - def message_received(message, *args, **_arg2, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:195 + def message_received(message, *args, **, &block); end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#174 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:174 def messages_arg_list; end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#260 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:260 def method_double_if_exists_for_message(message); end # @private - # @return [Boolean] # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#45 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:45 def null_object?; end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#42 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:42 def object; end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#58 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:58 def original_method_handle_for(_message); end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#254 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:254 def prepended_modules_of_singleton_class; end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#233 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:233 def raise_missing_default_stub_error(expectation, args_for_multiple_calls); end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#228 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:228 def raise_unexpected_message_error(method_name, args); end # @private - # @return [Boolean] # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#167 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:167 def received_message?(method_name, *args, &block); end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#186 - def record_message_received(message, *args, **_arg2, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:186 + def record_message_received(message, *args, **, &block); end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#145 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:145 def remove_stub(method_name); end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#150 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:150 def remove_stub_if_present(method_name); end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#94 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:94 def replay_received_message_on(expectation, &block); end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#160 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:160 def reset; end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#155 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:155 def verify; end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#238 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:238 def visibility_for(_method_name); end private - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#277 - def find_almost_matching_expectation(method_name, *args, **_arg2); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:277 + def find_almost_matching_expectation(method_name, *args, **); end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#301 - def find_almost_matching_stub(method_name, *args, **_arg2); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:301 + def find_almost_matching_stub(method_name, *args, **); end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#284 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:284 def find_best_matching_expectation_for(method_name); end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#270 - def find_matching_expectation(method_name, *args, **_arg2); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:270 + def find_matching_expectation(method_name, *args, **); end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#296 - def find_matching_method_stub(method_name, *args, **_arg2); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:296 + def find_matching_method_stub(method_name, *args, **); end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#266 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:266 def method_double_for(message); end class << self - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#244 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:244 def prepended_modules_of(klass); end end end -# source://rspec-mocks//lib/rspec/mocks/proxy.rb#62 +# pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:62 RSpec::Mocks::Proxy::DEFAULT_MESSAGE_EXPECTATION_OPTS = T.let(T.unsafe(nil), Hash) # @private # -# source://rspec-mocks//lib/rspec/mocks/proxy.rb#8 +# pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:8 class RSpec::Mocks::Proxy::SpecificMessage < ::Struct - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#9 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:9 def ==(expectation); end - # Returns the value of attribute args - # - # @return [Object] the current value of args + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:8 def args; end - # Sets the attribute args - # - # @param value [Object] the value to set the attribute args to. - # @return [Object] the newly set value + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:8 def args=(_); end - # Returns the value of attribute message - # - # @return [Object] the current value of message + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:8 def message; end - # Sets the attribute message - # - # @param value [Object] the value to set the attribute message to. - # @return [Object] the newly set value + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:8 def message=(_); end - # Returns the value of attribute object - # - # @return [Object] the current value of object + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:8 def object; end - # Sets the attribute object - # - # @param value [Object] the value to set the attribute object to. - # @return [Object] the newly set value + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:8 def object=(_); end class << self + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:8 def [](*_arg0); end + + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:8 def inspect; end + + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:8 def keyword_init?; end + + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:8 def members; end + + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:8 def new(*_arg0); end end end # @private # -# source://rspec-mocks//lib/rspec/mocks/proxy.rb#461 +# pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:461 class RSpec::Mocks::ProxyForNil < ::RSpec::Mocks::PartialDoubleProxy - # @return [ProxyForNil] a new instance of ProxyForNil - # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#462 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:462 def initialize(order_group); end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#470 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:470 def add_message_expectation(method_name, opts = T.unsafe(nil), &block); end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#475 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:475 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#467 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:467 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#467 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:467 def disallow_expectations=(_arg0); end - # Returns the value of attribute warn_about_expectations. - # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#468 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:468 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#468 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:468 def warn_about_expectations=(_arg0); end private - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#512 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:512 def raise_error(method_name); end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#482 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:482 def set_expectation_behavior; end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#507 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:507 def warn(method_name); end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#496 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:496 def warn_or_raise!(method_name); end end +# @private # Provides a default space implementation for outside # the scope of an example. Called "root" because it serves # as the root of the space stack. # -# @private -# -# source://rspec-mocks//lib/rspec/mocks/space.rb#9 +# pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:9 class RSpec::Mocks::RootSpace - # source://rspec-mocks//lib/rspec/mocks/space.rb#18 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:18 def any_instance_proxy_for(*_args); end - # source://rspec-mocks//lib/rspec/mocks/space.rb#14 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:14 def any_instance_recorder_for(*_args); end - # source://rspec-mocks//lib/rspec/mocks/space.rb#26 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:26 def any_instance_recorders_from_ancestry_of(_object); end - # source://rspec-mocks//lib/rspec/mocks/space.rb#44 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:44 def new_scope; end - # source://rspec-mocks//lib/rspec/mocks/space.rb#10 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:10 def proxy_for(*_args); end - # source://rspec-mocks//lib/rspec/mocks/space.rb#22 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:22 def register_constant_mutator(_mutator); end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/space.rb#36 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:36 def registered?(_object); end - # source://rspec-mocks//lib/rspec/mocks/space.rb#30 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:30 def reset_all; end - # source://rspec-mocks//lib/rspec/mocks/space.rb#40 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:40 def superclass_proxy_for(*_args); end - # source://rspec-mocks//lib/rspec/mocks/space.rb#33 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:33 def verify_all; end private - # @raise [OutsideOfExampleError] - # - # source://rspec-mocks//lib/rspec/mocks/space.rb#50 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:50 def raise_lifecycle_message; end end @@ -4712,266 +4226,226 @@ end # # @private # -# source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#11 +# pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:11 class RSpec::Mocks::SimpleMessageExpectation - # @return [SimpleMessageExpectation] a new instance of SimpleMessageExpectation - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#12 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:12 def initialize(message, response, error_generator, backtrace_line = T.unsafe(nil)); end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#26 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:26 def called_max_times?; end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#17 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:17 def invoke(*_); end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#22 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:22 def matches?(message, *_); end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#37 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:37 def unadvise(_); end - # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#30 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_expectation.rb:30 def verify_messages_received; end end # @private # -# source://rspec-mocks//lib/rspec/mocks/space.rb#57 +# pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:57 class RSpec::Mocks::Space - # @return [Space] a new instance of Space - # - # source://rspec-mocks//lib/rspec/mocks/space.rb#60 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:60 def initialize; end - # Returns the value of attribute any_instance_mutex. - # - # source://rspec-mocks//lib/rspec/mocks/space.rb#58 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:58 def any_instance_mutex; end - # source://rspec-mocks//lib/rspec/mocks/space.rb#103 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:103 def any_instance_proxy_for(klass); end - # source://rspec-mocks//lib/rspec/mocks/space.rb#93 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:93 def any_instance_recorder_for(klass, only_return_existing = T.unsafe(nil)); end - # Returns the value of attribute any_instance_recorders. - # - # source://rspec-mocks//lib/rspec/mocks/space.rb#58 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:58 def any_instance_recorders; end - # source://rspec-mocks//lib/rspec/mocks/space.rb#131 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:131 def any_instance_recorders_from_ancestry_of(object); end - # source://rspec-mocks//lib/rspec/mocks/space.rb#89 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:89 def constant_mutator_for(name); end - # source://rspec-mocks//lib/rspec/mocks/space.rb#111 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:125 def ensure_registered(object); end - # source://rspec-mocks//lib/rspec/mocks/space.rb#69 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:69 def new_scope; end - # Returns the value of attribute proxies. - # - # source://rspec-mocks//lib/rspec/mocks/space.rb#58 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:58 def proxies; end - # source://rspec-mocks//lib/rspec/mocks/space.rb#107 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:107 def proxies_of(klass); end - # source://rspec-mocks//lib/rspec/mocks/space.rb#111 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:111 def proxy_for(object); end - # Returns the value of attribute proxy_mutex. - # - # source://rspec-mocks//lib/rspec/mocks/space.rb#58 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:58 def proxy_mutex; end - # source://rspec-mocks//lib/rspec/mocks/space.rb#85 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:85 def register_constant_mutator(mutator); end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/space.rb#127 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:127 def registered?(object); end - # source://rspec-mocks//lib/rspec/mocks/space.rb#78 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:78 def reset_all; end - # source://rspec-mocks//lib/rspec/mocks/space.rb#118 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:118 def superclass_proxy_for(klass); end - # source://rspec-mocks//lib/rspec/mocks/space.rb#73 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:73 def verify_all; end private - # source://rspec-mocks//lib/rspec/mocks/space.rb#184 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:184 def any_instance_recorder_not_found_for(id, klass); end - # source://rspec-mocks//lib/rspec/mocks/space.rb#171 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:171 def class_proxy_with_callback_verification_strategy(object, strategy); end - # source://rspec-mocks//lib/rspec/mocks/space.rb#202 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:202 def id_for(object); end - # source://rspec-mocks//lib/rspec/mocks/space.rb#147 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:147 def new_mutex; end - # source://rspec-mocks//lib/rspec/mocks/space.rb#151 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:151 def proxy_not_found_for(id, object); end - # source://rspec-mocks//lib/rspec/mocks/space.rb#166 + # pkg:gem/rspec-mocks#lib/rspec/mocks/space.rb:166 def superclass_proxy_not_found_for(id, object); end end # @private # -# source://rspec-mocks//lib/rspec/mocks/message_chain.rb#75 +# pkg:gem/rspec-mocks#lib/rspec/mocks/message_chain.rb:75 class RSpec::Mocks::StubChain < ::RSpec::Mocks::MessageChain private - # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#82 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_chain.rb:82 def expectation(object, message, &return_block); end class << self - # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#76 + # pkg:gem/rspec-mocks#lib/rspec/mocks/message_chain.rb:76 def stub_chain_on(object, *chain, &blk); end end end +# @api private # Provides methods for enabling and disabling the available syntaxes # provided by rspec-mocks. # -# @api private -# -# source://rspec-mocks//lib/rspec/mocks/syntax.rb#6 +# pkg:gem/rspec-mocks#lib/rspec/mocks/syntax.rb:6 module RSpec::Mocks::Syntax class << self - # Determines where the methods like `should_receive`, and `stub` are added. - # # @api private + # Determines where the methods like `should_receive`, and `stub` are added. # - # source://rspec-mocks//lib/rspec/mocks/syntax.rb#181 + # pkg:gem/rspec-mocks#lib/rspec/mocks/syntax.rb:181 def default_should_syntax_host; end - # Disables the expect syntax (`expect(dbl).to receive`, `allow(dbl).to receive`, etc). - # # @api private + # Disables the expect syntax (`expect(dbl).to receive`, `allow(dbl).to receive`, etc). # - # source://rspec-mocks//lib/rspec/mocks/syntax.rb#150 + # pkg:gem/rspec-mocks#lib/rspec/mocks/syntax.rb:150 def disable_expect(syntax_host = T.unsafe(nil)); end - # Disables the should syntax (`dbl.stub`, `dbl.should_receive`, etc). - # # @api private + # Disables the should syntax (`dbl.stub`, `dbl.should_receive`, etc). # - # source://rspec-mocks//lib/rspec/mocks/syntax.rb#89 + # pkg:gem/rspec-mocks#lib/rspec/mocks/syntax.rb:89 def disable_should(syntax_host = T.unsafe(nil)); end - # Enables the expect syntax (`expect(dbl).to receive`, `allow(dbl).to receive`, etc). - # # @api private + # Enables the expect syntax (`expect(dbl).to receive`, `allow(dbl).to receive`, etc). # - # source://rspec-mocks//lib/rspec/mocks/syntax.rb#110 + # pkg:gem/rspec-mocks#lib/rspec/mocks/syntax.rb:110 def enable_expect(syntax_host = T.unsafe(nil)); end - # Enables the should syntax (`dbl.stub`, `dbl.should_receive`, etc). - # # @api private + # Enables the should syntax (`dbl.stub`, `dbl.should_receive`, etc). # - # source://rspec-mocks//lib/rspec/mocks/syntax.rb#26 + # pkg:gem/rspec-mocks#lib/rspec/mocks/syntax.rb:26 def enable_should(syntax_host = T.unsafe(nil)); end - # Indicates whether or not the expect syntax is enabled. - # # @api private - # @return [Boolean] + # Indicates whether or not the expect syntax is enabled. # - # source://rspec-mocks//lib/rspec/mocks/syntax.rb#175 + # pkg:gem/rspec-mocks#lib/rspec/mocks/syntax.rb:175 def expect_enabled?(syntax_host = T.unsafe(nil)); end - # Indicates whether or not the should syntax is enabled. - # # @api private - # @return [Boolean] + # Indicates whether or not the should syntax is enabled. # - # source://rspec-mocks//lib/rspec/mocks/syntax.rb#169 + # pkg:gem/rspec-mocks#lib/rspec/mocks/syntax.rb:169 def should_enabled?(syntax_host = T.unsafe(nil)); end - # @api private # @private # - # source://rspec-mocks//lib/rspec/mocks/syntax.rb#8 + # pkg:gem/rspec-mocks#lib/rspec/mocks/syntax.rb:8 def warn_about_should!; end - # @api private # @private # - # source://rspec-mocks//lib/rspec/mocks/syntax.rb#13 + # pkg:gem/rspec-mocks#lib/rspec/mocks/syntax.rb:13 def warn_unless_should_configured(method_name, replacement = T.unsafe(nil)); end end end # @private # -# source://rspec-mocks//lib/rspec/mocks/targets.rb#63 +# pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:63 class RSpec::Mocks::TargetBase include ::RSpec::Mocks::TargetDelegationInstanceMethods extend ::RSpec::Mocks::TargetDelegationClassMethods - # @return [TargetBase] a new instance of TargetBase - # - # source://rspec-mocks//lib/rspec/mocks/targets.rb#64 + # pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:64 def initialize(target); end end # @private # -# source://rspec-mocks//lib/rspec/mocks/targets.rb#4 +# pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:4 module RSpec::Mocks::TargetDelegationClassMethods - # source://rspec-mocks//lib/rspec/mocks/targets.rb#14 + # pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:14 def delegate_not_to(matcher_method, options = T.unsafe(nil)); end - # source://rspec-mocks//lib/rspec/mocks/targets.rb#5 + # pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:5 def delegate_to(matcher_method); end - # source://rspec-mocks//lib/rspec/mocks/targets.rb#28 + # pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:28 def disallow_negation(method_name); end end # @private # -# source://rspec-mocks//lib/rspec/mocks/targets.rb#36 +# pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:36 module RSpec::Mocks::TargetDelegationInstanceMethods - # Returns the value of attribute target. - # - # source://rspec-mocks//lib/rspec/mocks/targets.rb#37 + # pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:37 def target; end private - # source://rspec-mocks//lib/rspec/mocks/targets.rb#45 + # pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:45 def define_matcher(matcher, name, &block); end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/targets.rb#41 + # pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:41 def matcher_allowed?(matcher); end - # @raise [NegationUnsupportedError] - # - # source://rspec-mocks//lib/rspec/mocks/targets.rb#55 + # pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:55 def raise_negation_unsupported(method_name, matcher); end - # @raise [UnsupportedMatcherError] - # - # source://rspec-mocks//lib/rspec/mocks/targets.rb#49 + # pkg:gem/rspec-mocks#lib/rspec/mocks/targets.rb:49 def raise_unsupported_matcher(method_name, matcher); end end @@ -4979,12 +4453,12 @@ end # includes this module, and it is provided for cases where you want a # pure test double without subclassing RSpec::Mocks::Double. # -# source://rspec-mocks//lib/rspec/mocks/test_double.rb#6 +# pkg:gem/rspec-mocks#lib/rspec/mocks/test_double.rb:6 module RSpec::Mocks::TestDouble # Creates a new test double with a `name` (that will be used in error # messages only) # - # source://rspec-mocks//lib/rspec/mocks/test_double.rb#9 + # pkg:gem/rspec-mocks#lib/rspec/mocks/test_double.rb:9 def initialize(name = T.unsafe(nil), stubs = T.unsafe(nil)); end # This allows for comparing the mock to other objects that proxy such as @@ -4992,137 +4466,130 @@ module RSpec::Mocks::TestDouble # the comparison, we're sure the call gets delegated to the proxy # target. # - # source://rspec-mocks//lib/rspec/mocks/test_double.rb#36 + # pkg:gem/rspec-mocks#lib/rspec/mocks/test_double.rb:36 def ==(other); end # @private # - # source://rspec-mocks//lib/rspec/mocks/test_double.rb#56 + # pkg:gem/rspec-mocks#lib/rspec/mocks/test_double.rb:58 def __build_mock_proxy_unless_expired(order_group); end # @private # - # source://rspec-mocks//lib/rspec/mocks/test_double.rb#61 + # pkg:gem/rspec-mocks#lib/rspec/mocks/test_double.rb:63 def __disallow_further_usage!; end # Tells the object to respond to all messages. If specific stub values # are declared, they'll work as expected. If not, the receiver is # returned. # - # source://rspec-mocks//lib/rspec/mocks/test_double.rb#23 + # pkg:gem/rspec-mocks#lib/rspec/mocks/test_double.rb:23 def as_null_object; end # Override for default freeze implementation to prevent freezing of test # doubles. # - # source://rspec-mocks//lib/rspec/mocks/test_double.rb#67 + # pkg:gem/rspec-mocks#lib/rspec/mocks/test_double.rb:69 def freeze; end # @private # - # source://rspec-mocks//lib/rspec/mocks/test_double.rb#41 + # pkg:gem/rspec-mocks#lib/rspec/mocks/test_double.rb:41 def inspect; end # Returns true if this object has received `as_null_object` # - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/test_double.rb#28 + # pkg:gem/rspec-mocks#lib/rspec/mocks/test_double.rb:28 def null_object?; end # @private - # @return [Boolean] # - # source://rspec-mocks//lib/rspec/mocks/test_double.rb#51 + # pkg:gem/rspec-mocks#lib/rspec/mocks/test_double.rb:51 def respond_to?(message, incl_private = T.unsafe(nil)); end # @private # - # source://rspec-mocks//lib/rspec/mocks/test_double.rb#46 + # pkg:gem/rspec-mocks#lib/rspec/mocks/test_double.rb:46 def to_s; end private - # source://rspec-mocks//lib/rspec/mocks/test_double.rb#115 + # pkg:gem/rspec-mocks#lib/rspec/mocks/test_double.rb:118 def __build_mock_proxy(order_group); end - # source://rspec-mocks//lib/rspec/mocks/test_double.rb#111 + # pkg:gem/rspec-mocks#lib/rspec/mocks/test_double.rb:114 def __mock_proxy; end - # source://rspec-mocks//lib/rspec/mocks/test_double.rb#119 + # pkg:gem/rspec-mocks#lib/rspec/mocks/test_double.rb:122 def __raise_expired_error; end - # source://rspec-mocks//lib/rspec/mocks/test_double.rb#105 + # pkg:gem/rspec-mocks#lib/rspec/mocks/test_double.rb:108 def assign_stubs(stubs); end - # source://rspec-mocks//lib/rspec/mocks/test_double.rb#124 + # pkg:gem/rspec-mocks#lib/rspec/mocks/test_double.rb:127 def initialize_copy(other); end - # @raise [NoMethodError] - # - # source://rspec-mocks//lib/rspec/mocks/test_double.rb#74 + # pkg:gem/rspec-mocks#lib/rspec/mocks/test_double.rb:76 def method_missing(message, *args, &block); end end # @private # -# source://rspec-mocks//lib/rspec/mocks/test_double.rb#137 +# pkg:gem/rspec-mocks#lib/rspec/mocks/test_double.rb:140 module RSpec::Mocks::TestDoubleFormatter class << self - # source://rspec-mocks//lib/rspec/mocks/test_double.rb#138 + # pkg:gem/rspec-mocks#lib/rspec/mocks/test_double.rb:141 def format(dbl, unwrap = T.unsafe(nil)); end private - # source://rspec-mocks//lib/rspec/mocks/test_double.rb#164 + # pkg:gem/rspec-mocks#lib/rspec/mocks/test_double.rb:167 def name_desc(dbl); end - # source://rspec-mocks//lib/rspec/mocks/test_double.rb#147 + # pkg:gem/rspec-mocks#lib/rspec/mocks/test_double.rb:150 def type_desc(dbl); end - # source://rspec-mocks//lib/rspec/mocks/test_double.rb#159 + # pkg:gem/rspec-mocks#lib/rspec/mocks/test_double.rb:162 def verified_module_desc(dbl); end end end # @private # -# source://rspec-mocks//lib/rspec/mocks/proxy.rb#308 +# pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:308 class RSpec::Mocks::TestDoubleProxy < ::RSpec::Mocks::Proxy - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#309 + # pkg:gem/rspec-mocks#lib/rspec/mocks/proxy.rb:309 def reset; end end # @private # -# source://rspec-mocks//lib/rspec/mocks/error_generator.rb#29 +# pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:29 class RSpec::Mocks::UnsupportedMatcherError < ::StandardError; end # @private # -# source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#6 +# pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_double.rb:6 module RSpec::Mocks::VerifyingDouble - # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#53 + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_double.rb:55 def initialize(doubled_module, *args); end - # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#39 - def __send__(name, *args, **_arg2, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_double.rb:40 + def __send__(name, *args, **, &block); end - # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#20 + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_double.rb:20 def method_missing(message, *args, &block); end - # @return [Boolean] - # - # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#7 + # pkg:gem/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#48 - def send(name, *args, **_arg2, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_double.rb:50 + def send(name, *args, **, &block); end end # @private # -# source://rspec-mocks//lib/rspec/mocks/error_generator.rb#33 +# pkg:gem/rspec-mocks#lib/rspec/mocks/error_generator.rb:33 class RSpec::Mocks::VerifyingDoubleNotDefinedError < ::StandardError; end # Used in place of a `VerifyingExistingMethodDouble` for the specific case @@ -5131,11 +4598,9 @@ class RSpec::Mocks::VerifyingDoubleNotDefinedError < ::StandardError; end # # @private # -# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#215 +# pkg:gem/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#216 + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_proxy.rb:216 def with_signature; end end @@ -5147,25 +4612,19 @@ end # # @private # -# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#180 +# pkg:gem/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#181 + # pkg:gem/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#195 + # pkg:gem/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#191 + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_proxy.rb:191 def with_signature; end class << self - # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#199 + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_proxy.rb:199 def for(object, method_name, proxy); end end end @@ -5173,15 +4632,11 @@ end # A message expectation that knows about the real implementation of the # message being expected, so that it can verify that any expectations # have the valid arguments. -# # @api private # -# source://rspec-mocks//lib/rspec/mocks/verifying_message_expectation.rb#9 +# pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_message_expectation.rb:9 class RSpec::Mocks::VerifyingMessageExpectation < ::RSpec::Mocks::MessageExpectation - # @api private - # @return [VerifyingMessageExpectation] a new instance of VerifyingMessageExpectation - # - # source://rspec-mocks//lib/rspec/mocks/verifying_message_expectation.rb#20 + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_message_expectation.rb:20 def initialize(*args); end # A level of indirection is used here rather than just passing in the @@ -5193,9 +4648,7 @@ class RSpec::Mocks::VerifyingMessageExpectation < ::RSpec::Mocks::MessageExpecta # straight forward to build the object in pieces so for now it stays as # an accessor. # - # @api private - # - # source://rspec-mocks//lib/rspec/mocks/verifying_message_expectation.rb#18 + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_message_expectation.rb:18 def method_reference; end # A level of indirection is used here rather than just passing in the @@ -5207,72 +4660,63 @@ class RSpec::Mocks::VerifyingMessageExpectation < ::RSpec::Mocks::MessageExpecta # straight forward to build the object in pieces so for now it stays as # an accessor. # - # @api private - # - # source://rspec-mocks//lib/rspec/mocks/verifying_message_expectation.rb#18 + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_message_expectation.rb:18 def method_reference=(_arg0); end - # @api private # @private # - # source://rspec-mocks//lib/rspec/mocks/verifying_message_expectation.rb#25 - def with(*args, **_arg1, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_message_expectation.rb:25 + def with(*args, **, &block); end private - # @api private - # - # source://rspec-mocks//lib/rspec/mocks/verifying_message_expectation.rb#38 + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_message_expectation.rb:38 def validate_expected_arguments!; end end # @private # -# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#139 +# pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_proxy.rb:139 class RSpec::Mocks::VerifyingMethodDouble < ::RSpec::Mocks::MethodDouble - # @return [VerifyingMethodDouble] a new instance of VerifyingMethodDouble - # - # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#140 + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_proxy.rb:140 def initialize(object, method_name, proxy, method_reference); end - # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#149 + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_proxy.rb:149 def add_expectation(*args, &block); end - # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#154 + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_proxy.rb:154 def add_stub(*args, &block); end - # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#145 + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_proxy.rb:145 def message_expectation_class; end - # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#159 - def proxy_method_invoked(obj, *args, **_arg2, &block); end + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_proxy.rb:159 + def proxy_method_invoked(obj, *args, **, &block); end - # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#165 + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_proxy.rb:165 def validate_arguments!(actual_args); end end # @private # -# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#134 +# pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_proxy.rb:134 class RSpec::Mocks::VerifyingPartialClassDoubleProxy < ::RSpec::Mocks::VerifyingPartialDoubleProxy include ::RSpec::Mocks::PartialClassDoubleProxyMethods end # @private # -# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#107 +# pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_proxy.rb:107 class RSpec::Mocks::VerifyingPartialDoubleProxy < ::RSpec::Mocks::PartialDoubleProxy include ::RSpec::Mocks::VerifyingProxyMethods - # @return [VerifyingPartialDoubleProxy] a new instance of VerifyingPartialDoubleProxy - # - # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#110 + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_proxy.rb:110 def initialize(object, expectation_ordering, optional_callback_invocation_strategy = T.unsafe(nil)); end - # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#123 + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_proxy.rb:123 def ensure_implemented(_method_name); end - # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#128 + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_proxy.rb:128 def method_reference; end end @@ -5291,51 +4735,49 @@ end # # @private # -# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#71 +# pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_proxy.rb:71 class RSpec::Mocks::VerifyingProxy < ::RSpec::Mocks::TestDoubleProxy include ::RSpec::Mocks::VerifyingProxyMethods - # @return [VerifyingProxy] a new instance of VerifyingProxy - # - # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#74 + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_proxy.rb:74 def initialize(object, order_group, doubled_module, method_reference_class); end - # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#88 + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_proxy.rb:88 def method_reference; end - # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#98 + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_proxy.rb:98 def validate_arguments!(method_name, args); end - # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#94 + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_proxy.rb:94 def visibility_for(method_name); end end # @private # -# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#22 +# pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_proxy.rb:22 module RSpec::Mocks::VerifyingProxyMethods - # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#33 + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_proxy.rb:33 def add_message_expectation(method_name, opts = T.unsafe(nil), &block); end - # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#28 + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_proxy.rb:28 def add_simple_stub(method_name, *args); end - # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#23 + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_proxy.rb:23 def add_stub(method_name, opts = T.unsafe(nil), &implementation); end - # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#38 + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_proxy.rb:38 def ensure_implemented(method_name); end - # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#48 + # pkg:gem/rspec-mocks#lib/rspec/mocks/verifying_proxy.rb:48 def ensure_publicly_implemented(method_name, _object); end end # Version information for RSpec mocks. # -# source://rspec-mocks//lib/rspec/mocks/version.rb#4 +# pkg:gem/rspec-mocks#lib/rspec/mocks/version.rb:4 module RSpec::Mocks::Version; end # Version of RSpec mocks currently in use in SemVer format. # -# source://rspec-mocks//lib/rspec/mocks/version.rb#6 +# pkg:gem/rspec-mocks#lib/rspec/mocks/version.rb:6 RSpec::Mocks::Version::STRING = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rspec-support@3.13.2.rbi b/sorbet/rbi/gems/rspec-support@3.13.2.rbi deleted file mode 100644 index 5678fae..0000000 --- a/sorbet/rbi/gems/rspec-support@3.13.2.rbi +++ /dev/null @@ -1,1630 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# 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#3 -module RSpec - extend ::RSpec::Support::Warnings - - class << self - # source://rspec-core/3.13.3/lib/rspec/core.rb#70 - def clear_examples; end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#85 - def configuration; end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#49 - def configuration=(_arg0); end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#97 - def configure; end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#194 - def const_missing(name); end - - # source://rspec-core/3.13.3/lib/rspec/core/dsl.rb#42 - def context(*args, &example_group_block); end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#122 - def current_example; end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#128 - def current_example=(example); end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#154 - def current_scope; end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#134 - def current_scope=(scope); end - - # source://rspec-core/3.13.3/lib/rspec/core/dsl.rb#42 - def describe(*args, &example_group_block); end - - # source://rspec-core/3.13.3/lib/rspec/core/dsl.rb#42 - def example_group(*args, &example_group_block); end - - # source://rspec-core/3.13.3/lib/rspec/core/dsl.rb#42 - def fcontext(*args, &example_group_block); end - - # source://rspec-core/3.13.3/lib/rspec/core/dsl.rb#42 - def fdescribe(*args, &example_group_block); end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#58 - def reset; end - - # source://rspec-core/3.13.3/lib/rspec/core/shared_example_group.rb#110 - def shared_context(name, *args, &block); end - - # source://rspec-core/3.13.3/lib/rspec/core/shared_example_group.rb#110 - def shared_examples(name, *args, &block); end - - # source://rspec-core/3.13.3/lib/rspec/core/shared_example_group.rb#110 - def shared_examples_for(name, *args, &block); end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#160 - def world; end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#49 - def world=(_arg0); end - - # source://rspec-core/3.13.3/lib/rspec/core/dsl.rb#42 - def xcontext(*args, &example_group_block); end - - # source://rspec-core/3.13.3/lib/rspec/core/dsl.rb#42 - def xdescribe(*args, &example_group_block); end - end -end - -# Consistent implementation for "cleaning" the caller method to strip out -# non-rspec lines. This enables errors to be reported at the call site in -# 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#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#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#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 -# it ignored when we are looking for the first meaningful line of the backtrace outside -# of RSpec. It can show up in the backtrace as the immediate first caller -# when `CallerFilter.first_non_rspec_line` is called from the top level of a required -# 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#30 -RSpec::CallerFilter::IGNORE_REGEX = T.let(T.unsafe(nil), Regexp) - -# 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#11 -RSpec::CallerFilter::RSPEC_LIBS = T.let(T.unsafe(nil), Array) - -# 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#86 - def class_of(object); end - - # Defines a helper method that is optimized to require files from the - # named lib. The passed block MUST be `{ |f| require_relative f }` - # because for `require_relative` to work properly from within the named - # lib the line of code must be IN that lib. - # - # `require_relative` is preferred when available because it is always O(1), - # regardless of the number of dirs in $LOAD_PATH. `require`, on the other - # hand, does a linear O(N) search over the dirs in the $LOAD_PATH until - # it can resolve the file relative to one of the dirs. - # - # @api private - # - # 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 - # yourself in specs. - # - # @private - # - # 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#113 - def failure_notifier; end - - # @api private - # - # 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#29 - def is_a_matcher?(object); end - - # @private - # - # source://rspec-support//lib/rspec/support/matcher_definition.rb#6 - def matcher_definitions; end - - # 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#118 - def notify_failure(failure, options = T.unsafe(nil)); end - - # Used internally to break cyclic dependency between mocks, expectations, - # and support. We don't currently have a consistent implementation of our - # matchers, though we are considering changing that: - # https://github.com/rspec/rspec-mocks/issues/513 - # - # @private - # - # source://rspec-support//lib/rspec/support/matcher_definition.rb#16 - def register_matcher_definition(&block); end - - # source://rspec-support//lib/rspec/support.rb#25 - def require_rspec_core(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#36 - def rspec_description_for_object(object); end - - # source://rspec-support//lib/rspec/support.rb#95 - def thread_local_data; end - - # @api private - # - # source://rspec-support//lib/rspec/support.rb#140 - def warning_notifier; end - - # @api private - # - # source://rspec-support//lib/rspec/support.rb#133 - def warning_notifier=(_arg0); end - - # @api private - # - # source://rspec-support//lib/rspec/support.rb#123 - def with_failure_notifier(callable); end - end -end - -# @private -# -# source://rspec-support//lib/rspec/support.rb#145 -module RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue - class << self - # source://rspec-support//lib/rspec/support.rb#150 - def ===(exception); end - end -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#148 -RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue::AVOID_RESCUING = T.let(T.unsafe(nil), Array) - -# Deals with the slightly different semantics of block arguments. -# For methods, arguments are required unless a default value is provided. -# For blocks, arguments are optional, even if no default value is provided. -# -# However, we want to treat block args as required since you virtually -# always want to pass a value for each received argument and our -# `and_yield` has treated block args as required for many years. -# -# @api private -# -# 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#270 - def classify_parameters; end -end - -# @private -# -# 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#11 - def initialize(string); end - - # source://rspec-support//lib/rspec/support/comparable_version.rb#15 - def <=>(other); end - - # 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#9 - def string; end -end - -# @private -# -# 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#137 -RSpec::Support::DEFAULT_WARNING_NOTIFIER = T.let(T.unsafe(nil), Proc) - -# 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#69 - def initialize(opts = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rspec-support//lib/rspec/support/differ.rb#65 - def color?; end - - # source://rspec-support//lib/rspec/support/differ.rb#13 - def diff(actual, expected); end - - # source://rspec-support//lib/rspec/support/differ.rb#59 - def diff_as_object(actual, expected); end - - # 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#130 - def add_old_hunk_to_hunk(hunk, oldhunk); end - - # 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#80 - def all_strings?(*args); end - - # @return [Boolean] - # - # source://rspec-support//lib/rspec/support/differ.rb#84 - def any_multiline_strings?(*args); end - - # source://rspec-support//lib/rspec/support/differ.rb#155 - def blue(text); end - - # source://rspec-support//lib/rspec/support/differ.rb#117 - def build_hunks(actual, expected); end - - # 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#143 - def color(text, color_code); end - - # source://rspec-support//lib/rspec/support/differ.rb#163 - def color_diff(diff); end - - # source://rspec-support//lib/rspec/support/differ.rb#97 - def diffably_stringify(array); end - - # source://rspec-support//lib/rspec/support/differ.rb#121 - def finalize_output(output, final_line); end - - # source://rspec-support//lib/rspec/support/differ.rb#139 - def format_type; end - - # source://rspec-support//lib/rspec/support/differ.rb#151 - def green(text); end - - # source://rspec-support//lib/rspec/support/differ.rb#204 - def handle_encoding_errors(actual, expected); end - - # 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#108 - def multiline?(string); end - - # @return [Boolean] - # - # source://rspec-support//lib/rspec/support/differ.rb#88 - def no_numbers?(*args); end - - # @return [Boolean] - # - # source://rspec-support//lib/rspec/support/differ.rb#76 - def no_procs?(*args); end - - # source://rspec-support//lib/rspec/support/differ.rb#159 - def normal(text); end - - # source://rspec-support//lib/rspec/support/differ.rb#180 - def object_to_string(object); end - - # source://rspec-support//lib/rspec/support/differ.rb#147 - def red(text); end - - # source://rspec-support//lib/rspec/support/differ.rb#134 - def safely_flatten(array); end -end - -# Replacement for fileutils#mkdir_p because we don't want to require parts -# of stdlib in RSpec. -# -# @api private -# -# 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#15 - def mkdir_p(path); end - - private - - # @api private - # @return [Boolean] - # - # 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#52 - def generate_path(stack, part); end - - # @api private - # - # 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#6 -class RSpec::Support::EncodedString - # @return [EncodedString] a new instance of EncodedString - # - # 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#28 - def <<(string); end - - # source://rspec-support//lib/rspec/support/encoded_string.rb#25 - def ==(*args, &block); end - - # source://rspec-support//lib/rspec/support/encoded_string.rb#25 - def empty?(*args, &block); end - - # source://rspec-support//lib/rspec/support/encoded_string.rb#25 - def encoding(*args, &block); end - - # source://rspec-support//lib/rspec/support/encoded_string.rb#25 - def eql?(*args, &block); end - - # 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#21 - def source_encoding; end - - # 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#46 - def to_s; end - - # source://rspec-support//lib/rspec/support/encoded_string.rb#46 - def to_str; end - - private - - # source://rspec-support//lib/rspec/support/encoded_string.rb#139 - def detect_source_encoding(string); end - - # Encoding Exceptions: - # - # Raised by Encoding and String methods: - # Encoding::UndefinedConversionError: - # when a transcoding operation fails - # if the String contains characters invalid for the target encoding - # e.g. "\x80".encode('UTF-8','ASCII-8BIT') - # vs "\x80".encode('UTF-8','ASCII-8BIT', undef: :replace, replace: '') - # # => '' - # Encoding::CompatibilityError - # when Encoding.compatible?(str1, str2) is nil - # e.g. utf_16le_emoji_string.split("\n") - # e.g. valid_unicode_string.encode(utf8_encoding) << ascii_string - # Encoding::InvalidByteSequenceError: - # when the string being transcoded contains a byte invalid for - # either the source or target encoding - # e.g. "\x80".encode('UTF-8','US-ASCII') - # vs "\x80".encode('UTF-8','US-ASCII', invalid: :replace, replace: '') - # # => '' - # ArgumentError - # when operating on a string with invalid bytes - # e.g."\x80".split("\n") - # TypeError - # when a symbol is passed as an encoding - # Encoding.find(:"UTF-8") - # when calling force_encoding on an object - # that doesn't respond to #to_str - # - # Raised by transcoding methods: - # Encoding::ConverterNotFoundError: - # when a named encoding does not correspond with a known converter - # e.g. 'abc'.force_encoding('UTF-8').encode('foo') - # or a converter path cannot be found - # e.g. "\x80".force_encoding('ASCII-8BIT').encode('Emacs-Mule') - # - # Raised by byte <-> char conversions - # RangeError: out of char range - # e.g. the UTF-16LE emoji: 128169.chr - # - # source://rspec-support//lib/rspec/support/encoded_string.rb#93 - def matching_encoding(string); end - - # http://stackoverflow.com/a/8711118/879854 - # Loop over chars in a string replacing chars - # 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#124 - def remove_invalid_bytes(string); end - - class << self - # source://rspec-support//lib/rspec/support/encoded_string.rb#143 - def pick_encoding(source_a, source_b); end - end -end - -# Ruby's default replacement string is: -# U+FFFD ("\xEF\xBF\xBD"), for Unicode encoding forms, else -# ? ("\x3F") -# -# 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#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#8 -RSpec::Support::EncodedString::UTF_8 = T.let(T.unsafe(nil), String) - -# @private -# -# 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#10 - def initialize(actual, expected); end - - # source://rspec-support//lib/rspec/support/hunk_generator.rb#15 - def hunks; end - - private - - # source://rspec-support//lib/rspec/support/hunk_generator.rb#32 - def actual_lines; end - - # source://rspec-support//lib/rspec/support/hunk_generator.rb#36 - def build_hunk(piece); end - - # source://rspec-support//lib/rspec/support/hunk_generator.rb#44 - def context_lines; end - - # source://rspec-support//lib/rspec/support/hunk_generator.rb#24 - def diffs; end - - # source://rspec-support//lib/rspec/support/hunk_generator.rb#28 - def expected_lines; end -end - -# @api private -# -# 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 -# practice, when this happens only the arity of the method is verified. -# -# @private -# -# 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#398 - def split_args(*args); end -end - -# If a matcher is used in a signature in place of keyword arguments, all -# keyword argument validation needs to be skipped since the matcher is -# opaque. -# -# Instead, keyword arguments will be validated when the method is called -# and they are actually known. -# -# @private -# -# 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#416 - def initialize(signature); end - - # @return [Boolean] - # - # 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#424 - def invalid_kw_args_from(_kw_args); end - - # 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#428 - def non_kw_args_arity_description; end - - # @return [Boolean] - # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#432 - def valid_non_kw_args?(*args); end -end - -# Extracts info about the number of arguments and allowed/required -# keyword args of a given method. -# -# @private -# -# 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#16 - def initialize(method); end - - # @return [Boolean] - # - # 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#38 - def classify_arity(arity = T.unsafe(nil)); end - - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#106 - def classify_parameters; end - - # Without considering what the last arg is, could it - # contain keyword arguments? - # - # @return [Boolean] - # - # 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#51 - def description; end - - # If the last argument is Hash, Ruby will treat only symbol keys as keyword arguments - # the rest will be grouped in another Hash and passed as positional argument. - # - # @return [Boolean] - # - # 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#77 - def invalid_kw_args_from(given_kw_args); end - - # 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#14 - def min_non_kw_args; end - - # 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#23 - def non_kw_args_arity_description; end - - # 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#14 - def required_kw_args; end - - # @return [Boolean] - # - # 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#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#162 -RSpec::Support::MethodSignature::INFINITY = T.let(T.unsafe(nil), Float) - -# Encapsulates expectations about the number of arguments and -# allowed/required keyword args of a given method. -# -# @api private -# -# 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#220 - def initialize; end - - # @api private - # @return [Boolean] - # - # 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#231 - def expect_arbitrary_keywords; end - - # @api private - # - # 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#231 - def expect_unlimited_arguments; end - - # @api private - # - # 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#229 - def keywords; end - - # @api private - # - # 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#229 - def max_count; end - - # @api private - # @raise [ArgumentError] - # - # 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#229 - def min_count; end - - # @api private - # @raise [ArgumentError] - # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#240 - def min_count=(number); end -end - -# Abstract base class for signature verifiers. -# -# @api private -# -# 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#283 - def initialize(signature, args = T.unsafe(nil)); end - - # @api private - # - # 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#281 - def kw_args; end - - # @api private - # - # 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#281 - def min_non_kw_args; end - - # @api private - # - # 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#318 - def valid?; end - - # @api private - # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#290 - def with_expectation(expectation); end - - private - - # @api private - # @return [Boolean] - # - # 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#353 - def invalid_kw_args; end - - # @api private - # - # 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#365 - def split_args(*args); end - - # @api private - # @return [Boolean] - # - # 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#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#65 -class RSpec::Support::Mutex < ::Thread::Mutex - class << self - # 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 Mutexes. -# -# 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#11 -module RSpec::Support::OS - private - - # @api private - # - # source://rspec-support//lib/rspec/support/ruby_features.rb#14 - def windows?; end - - # @api private - # - # 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#14 - def windows?; end - - # @api private - # @return [Boolean] - # - # source://rspec-support//lib/rspec/support/ruby_features.rb#18 - def windows_file_path?; end - end -end - -# Provide additional output details beyond what `inspect` provides when -# printing Time, DateTime, or BigDecimal -# -# @api private -# -# 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#29 - def initialize(max_formatted_output_length = T.unsafe(nil)); end - - # @api private - # - # 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#13 - def max_formatted_output_length; end - - # @api private - # - # 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#70 - def prepare_array(array); end - - # @api private - # - # 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 - # in something that, when `inspect` is called on it, will produce the - # desired output. - # - # This allows us to apply the desired formatting to hash/array data structures - # at any level of nesting, simply by walking that structure and replacing items - # with custom items that have `inspect` defined to return the desired output - # for that item. Then we can just use `Array#inspect` or `Hash#inspect` to - # format the entire thing. - # - # @api private - # - # 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#76 - def prepare_hash(input_hash); end - - # @api private - # @return [Boolean] - # - # 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#86 - def sort_hash_keys(input_hash); end - - # @api private - # - # source://rspec-support//lib/rspec/support/object_formatter.rb#106 - def with_entering_structure(structure); end - - private - - # Returns the substring defined by the start_index and end_index - # If the string ends with a partial ANSI code code then that - # will be removed as printing partial ANSI - # codes to the terminal can lead to corruption - # - # @api private - # - # source://rspec-support//lib/rspec/support/object_formatter.rb#268 - def truncate_string(str, start_index, end_index); end - - class << self - # Methods are deferred to a default instance of the class to maintain the interface - # For example, calling ObjectFormatter.format is still possible - # - # @api private - # - # 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#21 - def format(object); end - - # @api private - # - # 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#127 -class RSpec::Support::ObjectFormatter::BaseInspector < ::Struct - # Returns the value of attribute formatter - # - # @return [Object] the current value of formatter - def formatter; end - - # Sets the attribute formatter - # - # @param value [Object] the value to set the attribute formatter to. - # @return [Object] the newly set value - def formatter=(_); end - - # @api private - # @raise [NotImplementedError] - # - # source://rspec-support//lib/rspec/support/object_formatter.rb#132 - def inspect; end - - # Returns the value of attribute object - # - # @return [Object] the current value of object - def object; end - - # Sets the attribute object - # - # @param value [Object] the value to set the attribute object to. - # @return [Object] the newly set value - def object=(_); end - - # @api private - # - # source://rspec-support//lib/rspec/support/object_formatter.rb#136 - def pretty_print(pp); end - - class << self - def [](*_arg0); end - - # @api private - # @raise [NotImplementedError] - # @return [Boolean] - # - # source://rspec-support//lib/rspec/support/object_formatter.rb#128 - def can_inspect?(_object); end - - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# @api private -# -# 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#182 - def inspect; end - - class << self - # @api private - # @return [Boolean] - # - # 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#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#168 - def inspect; end - - class << self - # @api private - # @return [Boolean] - # - # 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#160 -RSpec::Support::ObjectFormatter::DateTimeInspector::FORMAT = T.let(T.unsafe(nil), String) - -# @api private -# -# 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#229 - def inspect; end - - class << self - # @api private - # @return [Boolean] - # - # 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#187 -class RSpec::Support::ObjectFormatter::DescribableMatcherInspector < ::RSpec::Support::ObjectFormatter::BaseInspector - # @api private - # - # 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#188 - def can_inspect?(object); end - end -end - -# @api private -# -# 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#247 -RSpec::Support::ObjectFormatter::INSPECTOR_CLASSES = T.let(T.unsafe(nil), Array) - -# @api private -# -# 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#118 - def inspect; end - - # @api private - # - # source://rspec-support//lib/rspec/support/object_formatter.rb#122 - def pretty_print(pp); end - - # Returns the value of attribute text - # - # @return [Object] the current value of text - def text; end - - # Sets the attribute text - # - # @param value [Object] the value to set the attribute text to. - # @return [Object] the newly set value - def text=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# @api private -# -# 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#242 - def inspect; end - - class << self - # @api private - # @return [Boolean] - # - # 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#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#149 - def inspect; end - - class << self - # @api private - # @return [Boolean] - # - # 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#142 -RSpec::Support::ObjectFormatter::TimeInspector::FORMAT = T.let(T.unsafe(nil), String) - -# @api private -# -# 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#207 - def inspect; end - - # @api private - # - # 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#216 - def native_object_id; end - - class << self - # @api private - # @return [Boolean] - # - # 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#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#7 -module RSpec::Support::RecursiveConstMethods - # @return [Boolean] - # - # 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#53 - def constants_defined_on(mod); end - - # @raise [NameError] - # - # 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#73 - def normalize_const_name(const_name); end - - # @return [Boolean] - # - # 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#58 - def recursive_const_get(const_name); end -end - -# Allows a thread to lock out other threads from a critical section of code, -# while allowing the thread with the lock to reenter that section. -# -# Based on Monitor as of 2.2 - -# https://github.com/ruby/ruby/blob/eb7ddaa3a47bf48045d26c72eb0f263a53524ebc/lib/monitor.rb#L9 -# -# Depends on Mutex, but Mutex is only available as part of core since 1.9.1: -# exists - http://ruby-doc.org/core-1.9.1/Mutex.html -# dne - http://ruby-doc.org/core-1.9.0/Mutex.html -# -# @private -# -# 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#17 - def initialize; end - - # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#23 - def synchronize; end - - private - - # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#35 - def enter; end - - # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#40 - def exit; end -end - -# Provides query methods for different rubies -# -# @api private -# -# 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#29 - def jruby?; end - - # @api private - # - # 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#33 - def jruby_version; end - - # @api private - # - # source://rspec-support//lib/rspec/support/ruby_features.rb#49 - def mri?; end - - # @api private - # - # 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#41 - def rbx?; end - - # @api private - # - # 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#29 - def jruby?; end - - # @api private - # @return [Boolean] - # - # 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#33 - def jruby_version; end - - # @api private - # @return [Boolean] - # - # 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#45 - def non_mri?; end - - # @api private - # @return [Boolean] - # - # 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#53 - def truffleruby?; end - end -end - -# Provides query methods for ruby features that differ among -# implementations. -# -# @api private -# -# 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#85 - def caller_locations_supported?; end - - # @api private - # - # 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, - # but when you try to fork, it raises an error: - # NotImplementedError: fork is not available on this platform - # - # When we drop support for JRuby 1.7 and/or Ruby 1.8, we can drop - # this special case. - # - # @api private - # @return [Boolean] - # - # 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#160 - def kw_args_supported?; end - - # @api private - # - # 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#212 - def module_refinement_supported?; end - - # @api private - # - # 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#164 - def required_kw_args_supported?; end - - # @api private - # @return [Boolean] - # - # 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#90 - def supports_exception_cause?; end - - # @api private - # @return [Boolean] - # - # 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#100 - 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#85 - def caller_locations_supported?; end - - # @api private - # @return [Boolean] - # - # 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#76 - def fork_supported?; end - - # 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#216 - def module_prepends_supported?; end - - # @api private - # @return [Boolean] - # - # 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#81 - def optional_and_splat_args_supported?; end - - # 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#146 - def ripper_supported?; end - - # source://rspec-support//lib/rspec/support/ruby_features.rb#90 - def supports_exception_cause?; end - - # 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#100 - def supports_syntax_suggest?; end - - # source://rspec-support//lib/rspec/support/ruby_features.rb#121 - def supports_taint?; end - end -end - -# Figures out whether a given method can accept various arguments. -# Surprisingly non-trivial. -# -# @private -# -# 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#5 -module RSpec::Support::Version; end - -# 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#8 -module RSpec::Support::Warnings - # source://rspec-support//lib/rspec/support/warnings.rb#9 - def deprecate(deprecated, options = T.unsafe(nil)); end - - # Used internally to print deprecation warnings - # when rspec-core isn't loaded - # - # @private - # - # 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#31 - def warn_with(message, options = T.unsafe(nil)); end - - # Used internally to print warnings - # - # @private - # - # 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#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#17 - def class_exec(klass, *args, **_arg2, &block); end - - class << self - # 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-support@3.13.7.rbi b/sorbet/rbi/gems/rspec-support@3.13.7.rbi new file mode 100644 index 0000000..7d979a8 --- /dev/null +++ b/sorbet/rbi/gems/rspec-support@3.13.7.rbi @@ -0,0 +1,1272 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# 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`. + + +# pkg:gem/rspec-support#lib/rspec/support.rb:3 +module RSpec + extend ::RSpec::Support::Warnings +end + +# Consistent implementation for "cleaning" the caller method to strip out +# non-rspec lines. This enables errors to be reported at the call site in +# the code using the library, which is far more useful than the particular +# internal method that raised an error. +# +# pkg:gem/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. + # This supports args because it's more efficient when the caller specifies + # these. It allows us to skip frames the caller knows are part of RSpec, + # and to decrease the increment size if the caller is confident the line will + # be found in a small number of stack frames from `skip_frames`. + # + # Note that there is a risk to passing a `skip_frames` value that is too high: + # If it skipped the first non-rspec line, then this method would return the + # 2nd or 3rd (or whatever) non-rspec line. Thus, you generally shouldn't pass + # values for these parameters, particularly since most places that use this are + # not hot spots (generally it gets used for deprecation warnings). However, + # if you do have a hot spot that calls this, passing `skip_frames` can make + # a significant difference. Just make sure that that particular use is tested + # so that if the provided `skip_frames` changes to no longer be accurate in + # such a way that would return the wrong stack frame, a test will fail to tell you. + # + # See benchmarks/skip_frames_for_caller_filter.rb for measurements. + # + # pkg:gem/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 + +# pkg:gem/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 +# it ignored when we are looking for the first meaningful line of the backtrace outside +# of RSpec. It can show up in the backtrace as the immediate first caller +# when `CallerFilter.first_non_rspec_line` is called from the top level of a required +# 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. +# +# pkg:gem/rspec-support#lib/rspec/support/caller_filter.rb:30 +RSpec::CallerFilter::IGNORE_REGEX = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rspec-support#lib/rspec/support/caller_filter.rb:22 +RSpec::CallerFilter::LIB_REGEX = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rspec-support#lib/rspec/support/caller_filter.rb:11 +RSpec::CallerFilter::RSPEC_LIBS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rspec-support#lib/rspec/support.rb:4 +module RSpec::Support + class << self + # @api private + # + # Used internally to get a class of a given object, even if it does not respond to #class. + # + # pkg:gem/rspec-support#lib/rspec/support.rb:86 + def class_of(object); end + + # @api private + # + # Defines a helper method that is optimized to require files from the + # named lib. The passed block MUST be `{ |f| require_relative f }` + # because for `require_relative` to work properly from within the named + # lib the line of code must be IN that lib. + # + # `require_relative` is preferred when available because it is always O(1), + # regardless of the number of dirs in $LOAD_PATH. `require`, on the other + # hand, does a linear O(N) search over the dirs in the $LOAD_PATH until + # it can resolve the file relative to one of the dirs. + # + # pkg:gem/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 + # yourself in specs. + # + # @private + # + # pkg:gem/rspec-support#lib/rspec/support/matcher_definition.rb:24 + def deregister_matcher_definition(&block); end + + # @api private + # + # pkg:gem/rspec-support#lib/rspec/support.rb:113 + def failure_notifier; end + + # @api private + # + # pkg:gem/rspec-support#lib/rspec/support.rb:105 + def failure_notifier=(callable); end + + # @private + # + # pkg:gem/rspec-support#lib/rspec/support/matcher_definition.rb:29 + def is_a_matcher?(object); end + + # @private + # + # pkg:gem/rspec-support#lib/rspec/support/matcher_definition.rb:6 + def matcher_definitions; end + + # pkg:gem/rspec-support#lib/rspec/support.rb:54 + def method_handle_for(object, method_name); end + + # @api private + # + # pkg:gem/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, + # and support. We don't currently have a consistent implementation of our + # matchers, though we are considering changing that: + # https://github.com/rspec/rspec-mocks/issues/513 + # + # @private + # + # pkg:gem/rspec-support#lib/rspec/support/matcher_definition.rb:16 + def register_matcher_definition(&block); end + + # pkg:gem/rspec-support#lib/rspec/support.rb:25 + def require_rspec_support(f); end + + # @api private + # + # gives a string representation of an object for use in RSpec descriptions + # + # pkg:gem/rspec-support#lib/rspec/support/matcher_definition.rb:36 + def rspec_description_for_object(object); end + + # pkg:gem/rspec-support#lib/rspec/support.rb:95 + def thread_local_data; end + + # @api private + # + # pkg:gem/rspec-support#lib/rspec/support.rb:140 + def warning_notifier; end + + # @api private + # + # pkg:gem/rspec-support#lib/rspec/support.rb:133 + def warning_notifier=(_arg0); end + + # @api private + # + # pkg:gem/rspec-support#lib/rspec/support.rb:123 + def with_failure_notifier(callable); end + end +end + +# @private +# +# pkg:gem/rspec-support#lib/rspec/support.rb:145 +module RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue + class << self + # pkg:gem/rspec-support#lib/rspec/support.rb:150 + def ===(exception); end + end +end + +# These exceptions are dangerous to rescue as rescuing them +# would interfere with things we should not interfere with. +# +# pkg:gem/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. +# For methods, arguments are required unless a default value is provided. +# For blocks, arguments are optional, even if no default value is provided. +# +# However, we want to treat block args as required since you virtually +# always want to pass a value for each received argument and our +# `and_yield` has treated block args as required for many years. +# +# @api private +# +# pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:293 +class RSpec::Support::BlockSignature < ::RSpec::Support::MethodSignature + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:295 + def classify_parameters; end +end + +# @private +# +# pkg:gem/rspec-support#lib/rspec/support/comparable_version.rb:6 +class RSpec::Support::ComparableVersion + include ::Comparable + + # pkg:gem/rspec-support#lib/rspec/support/comparable_version.rb:11 + def initialize(string); end + + # pkg:gem/rspec-support#lib/rspec/support/comparable_version.rb:15 + def <=>(other); end + + # pkg:gem/rspec-support#lib/rspec/support/comparable_version.rb:37 + def segments; end + + # pkg:gem/rspec-support#lib/rspec/support/comparable_version.rb:9 + def string; end +end + +# @private +# +# pkg:gem/rspec-support#lib/rspec/support.rb:110 +RSpec::Support::DEFAULT_FAILURE_NOTIFIER = T.let(T.unsafe(nil), Proc) + +# @private +# +# pkg:gem/rspec-support#lib/rspec/support.rb:137 +RSpec::Support::DEFAULT_WARNING_NOTIFIER = T.let(T.unsafe(nil), Proc) + +# pkg:gem/rspec-support#lib/rspec/support/differ.rb:11 +class RSpec::Support::Differ + # pkg:gem/rspec-support#lib/rspec/support/differ.rb:68 + def initialize(opts = T.unsafe(nil)); end + + # pkg:gem/rspec-support#lib/rspec/support/differ.rb:64 + def color?; end + + # pkg:gem/rspec-support#lib/rspec/support/differ.rb:12 + def diff(actual, expected); end + + # pkg:gem/rspec-support#lib/rspec/support/differ.rb:58 + def diff_as_object(actual, expected); end + + # pkg:gem/rspec-support#lib/rspec/support/differ.rb:29 + def diff_as_string(actual, expected); end + + private + + # pkg:gem/rspec-support#lib/rspec/support/differ.rb:129 + def add_old_hunk_to_hunk(hunk, oldhunk); end + + # pkg:gem/rspec-support#lib/rspec/support/differ.rb:125 + def add_to_output(output, string); end + + # pkg:gem/rspec-support#lib/rspec/support/differ.rb:79 + def all_strings?(*args); end + + # pkg:gem/rspec-support#lib/rspec/support/differ.rb:83 + def any_multiline_strings?(*args); end + + # pkg:gem/rspec-support#lib/rspec/support/differ.rb:154 + def blue(text); end + + # pkg:gem/rspec-support#lib/rspec/support/differ.rb:116 + def build_hunks(actual, expected); end + + # pkg:gem/rspec-support#lib/rspec/support/differ.rb:91 + def coerce_to_string(string_or_array); end + + # pkg:gem/rspec-support#lib/rspec/support/differ.rb:142 + def color(text, color_code); end + + # pkg:gem/rspec-support#lib/rspec/support/differ.rb:162 + def color_diff(diff); end + + # pkg:gem/rspec-support#lib/rspec/support/differ.rb:96 + def diffably_stringify(array); end + + # pkg:gem/rspec-support#lib/rspec/support/differ.rb:120 + def finalize_output(output, final_line); end + + # pkg:gem/rspec-support#lib/rspec/support/differ.rb:138 + def format_type; end + + # pkg:gem/rspec-support#lib/rspec/support/differ.rb:150 + def green(text); end + + # pkg:gem/rspec-support#lib/rspec/support/differ.rb:203 + def handle_encoding_errors(actual, expected); end + + # pkg:gem/rspec-support#lib/rspec/support/differ.rb:193 + def hash_to_string(hash); end + + # pkg:gem/rspec-support#lib/rspec/support/differ.rb:107 + def multiline?(string); end + + # pkg:gem/rspec-support#lib/rspec/support/differ.rb:87 + def no_numbers?(*args); end + + # pkg:gem/rspec-support#lib/rspec/support/differ.rb:75 + def no_procs?(*args); end + + # pkg:gem/rspec-support#lib/rspec/support/differ.rb:158 + def normal(text); end + + # pkg:gem/rspec-support#lib/rspec/support/differ.rb:179 + def object_to_string(object); end + + # pkg:gem/rspec-support#lib/rspec/support/differ.rb:146 + def red(text); end + + # pkg:gem/rspec-support#lib/rspec/support/differ.rb:133 + def safely_flatten(array); end +end + +# @api private +# +# Replacement for fileutils#mkdir_p because we don't want to require parts +# of stdlib in RSpec. +# +# pkg:gem/rspec-support#lib/rspec/support/directory_maker.rb:11 +class RSpec::Support::DirectoryMaker + class << self + # @api private + # + # Implements nested directory construction + # + # pkg:gem/rspec-support#lib/rspec/support/directory_maker.rb:15 + def mkdir_p(path); end + + private + + # pkg:gem/rspec-support#lib/rspec/support/directory_maker.rb:57 + def directory_exists?(dirname); end + + # pkg:gem/rspec-support#lib/rspec/support/directory_maker.rb:52 + def generate_path(stack, part); end + + # pkg:gem/rspec-support#lib/rspec/support/directory_maker.rb:49 + def generate_stack(path); end + end +end + +# @private +# +# pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:6 +class RSpec::Support::EncodedString + # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:16 + def initialize(string, encoding = T.unsafe(nil)); end + + # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:28 + def <<(string); end + + # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:25 + def ==(*args, &block); end + + # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:25 + def empty?(*args, &block); end + + # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:25 + def encoding(*args, &block); end + + # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:25 + def eql?(*args, &block); end + + # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:25 + def lines(*args, &block); end + + # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:21 + def source_encoding; end + + # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:41 + def split(regex_or_string); end + + # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:46 + def to_s; end + + # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:49 + def to_str; end + + private + + # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:139 + def detect_source_encoding(string); end + + # Encoding Exceptions: + # + # Raised by Encoding and String methods: + # Encoding::UndefinedConversionError: + # when a transcoding operation fails + # if the String contains characters invalid for the target encoding + # e.g. "\x80".encode('UTF-8','ASCII-8BIT') + # vs "\x80".encode('UTF-8','ASCII-8BIT', undef: :replace, replace: '') + # # => '' + # Encoding::CompatibilityError + # when Encoding.compatible?(str1, str2) is nil + # e.g. utf_16le_emoji_string.split("\n") + # e.g. valid_unicode_string.encode(utf8_encoding) << ascii_string + # Encoding::InvalidByteSequenceError: + # when the string being transcoded contains a byte invalid for + # either the source or target encoding + # e.g. "\x80".encode('UTF-8','US-ASCII') + # vs "\x80".encode('UTF-8','US-ASCII', invalid: :replace, replace: '') + # # => '' + # ArgumentError + # when operating on a string with invalid bytes + # e.g."\x80".split("\n") + # TypeError + # when a symbol is passed as an encoding + # Encoding.find(:"UTF-8") + # when calling force_encoding on an object + # that doesn't respond to #to_str + # + # Raised by transcoding methods: + # Encoding::ConverterNotFoundError: + # when a named encoding does not correspond with a known converter + # e.g. 'abc'.force_encoding('UTF-8').encode('foo') + # or a converter path cannot be found + # e.g. "\x80".force_encoding('ASCII-8BIT').encode('Emacs-Mule') + # + # Raised by byte <-> char conversions + # RangeError: out of char range + # e.g. the UTF-16LE emoji: 128169.chr + # + # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:93 + def matching_encoding(string); end + + # https://github.com/ruby/ruby/blob/eeb05e8c11/doc/NEWS-2.1.0#L120-L123 + # https://github.com/ruby/ruby/blob/v2_1_0/string.c#L8242 + # https://github.com/hsbt/string-scrub + # https://github.com/rubinius/rubinius/blob/v2.5.2/kernel/common/string.rb#L1913-L1972 + # http://stackoverflow.com/a/8711118/879854 + # Loop over chars in a string replacing chars + # with invalid encoding, which is a pretty good proxy + # for the invalid byte sequence that causes an ArgumentError + # + # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:124 + def remove_invalid_bytes(string); end + + class << self + # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:143 + def pick_encoding(source_a, source_b); end + end +end + +# Ruby's default replacement string is: +# U+FFFD ("\xEF\xBF\xBD"), for Unicode encoding forms, else +# ? ("\x3F") +# +# pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:14 +RSpec::Support::EncodedString::REPLACE = T.let(T.unsafe(nil), String) + +# pkg:gem/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. +# +# pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:8 +RSpec::Support::EncodedString::UTF_8 = T.let(T.unsafe(nil), String) + +# @private +# +# pkg:gem/rspec-support#lib/rspec/support/hunk_generator.rb:9 +class RSpec::Support::HunkGenerator + # pkg:gem/rspec-support#lib/rspec/support/hunk_generator.rb:10 + def initialize(actual, expected); end + + # pkg:gem/rspec-support#lib/rspec/support/hunk_generator.rb:15 + def hunks; end + + private + + # pkg:gem/rspec-support#lib/rspec/support/hunk_generator.rb:32 + def actual_lines; end + + # pkg:gem/rspec-support#lib/rspec/support/hunk_generator.rb:36 + def build_hunk(piece); end + + # pkg:gem/rspec-support#lib/rspec/support/hunk_generator.rb:44 + def context_lines; end + + # pkg:gem/rspec-support#lib/rspec/support/hunk_generator.rb:24 + def diffs; end + + # pkg:gem/rspec-support#lib/rspec/support/hunk_generator.rb:28 + def expected_lines; end +end + +# @api private +# +# pkg:gem/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 +# practice, when this happens only the arity of the method is verified. +# +# @private +# +# pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:420 +class RSpec::Support::LooseSignatureVerifier < ::RSpec::Support::MethodSignatureVerifier + private + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:423 + def split_args(args); end +end + +# If a matcher is used in a signature in place of keyword arguments, all +# keyword argument validation needs to be skipped since the matcher is +# opaque. +# +# Instead, keyword arguments will be validated when the method is called +# and they are actually known. +# +# @private +# +# pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:440 +class RSpec::Support::LooseSignatureVerifier::SignatureWithKeywordArgumentsMatcher + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:441 + def initialize(signature); end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:461 + def has_kw_args_in?(args); end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:449 + def invalid_kw_args_from(_kw_args); end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:445 + def missing_kw_args_from(_kw_args); end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:453 + def non_kw_args_arity_description; end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:457 + def valid_non_kw_args?(*args); end +end + +# Extracts info about the number of arguments and allowed/required +# keyword args of a given method. +# +# @private +# +# pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:13 +class RSpec::Support::MethodSignature + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:16 + def initialize(method); end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:123 + def arbitrary_kw_args?; end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:38 + def classify_arity(arity = T.unsafe(nil)); end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:131 + def classify_parameters; end + + # Without considering what the last arg is, could it + # contain keyword arguments? + # + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:117 + def could_contain_kw_args?(args); end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:51 + def description; end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:84 + def has_kw_args_in?(args); end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:77 + def invalid_kw_args_from(given_kw_args); end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:14 + def max_non_kw_args; end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:14 + def min_non_kw_args; end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:73 + def missing_kw_args_from(given_kw_args); end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:23 + def non_kw_args_arity_description; end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:14 + def optional_kw_args; end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:14 + def required_kw_args; end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:127 + def unlimited_args?; end + + # pkg:gem/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 + +# pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:187 +RSpec::Support::MethodSignature::INFINITY = T.let(T.unsafe(nil), Float) + +# Encapsulates expectations about the number of arguments and +# allowed/required keyword args of a given method. +# +# @api private +# +# pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:244 +class RSpec::Support::MethodSignatureExpectation + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:245 + def initialize; end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:272 + def empty?; end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:256 + def expect_arbitrary_keywords; end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:256 + def expect_arbitrary_keywords=(_arg0); end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:256 + def expect_unlimited_arguments; end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:256 + def expect_unlimited_arguments=(_arg0); end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:254 + def keywords; end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:279 + def keywords=(values); end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:254 + def max_count; end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:258 + def max_count=(number); end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:254 + def min_count; end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:265 + def min_count=(number); end +end + +# Abstract base class for signature verifiers. +# +# @api private +# +# pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:305 +class RSpec::Support::MethodSignatureVerifier + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:308 + def initialize(signature, args = T.unsafe(nil)); end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:351 + def error_message; end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:306 + def kw_args; end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:306 + def max_non_kw_args; end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:306 + def min_non_kw_args; end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:306 + def non_kw_args; end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:343 + def valid?; end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:315 + def with_expectation(expectation); end + + private + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:382 + def arbitrary_kw_args?; end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:378 + def invalid_kw_args; end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:374 + def missing_kw_args; end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:390 + def split_args(args); end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:386 + def unlimited_args?; end + + # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:370 + def valid_non_kw_args?; end +end + +# On 1.8.7, it's in the stdlib. +# We don't want to load the stdlib, b/c this is a test tool, and can affect +# the test environment, causing tests to pass where they should fail. +# +# So we're transcribing/modifying it from +# https://github.com/ruby/ruby/blob/v1_8_7_374/lib/thread.rb#L56 +# Some methods we don't need are deleted. Anything I don't +# understand (there's quite a bit, actually) is left in. +# +# Some formatting changes are made to appease the robot overlord: +# https://travis-ci.org/rspec/rspec-core/jobs/54410874 +# @private +# On 1.9 and up, this is in core, so we just use the real one +# +# pkg:gem/rspec-support#lib/rspec/support/reentrant_mutex.rb:65 +class RSpec::Support::Mutex < ::Thread::Mutex + class << self + # pkg:gem/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 Mutexes. +# +# pkg:gem/rspec-support#lib/rspec/support/reentrant_mutex.rb:68 +RSpec::Support::Mutex::NEW_MUTEX_METHOD = T.let(T.unsafe(nil), Method) + +# @api private +# +# Provides query methods for different OS or OS features. +# +# pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:11 +module RSpec::Support::OS + private + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:14 + def windows?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:18 + def windows_file_path?; end + + class << self + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:14 + def windows?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:18 + def windows_file_path?; end + end +end + +# Provide additional output details beyond what `inspect` provides when +# printing Time, DateTime, or BigDecimal +# @api private +# +# pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:10 +class RSpec::Support::ObjectFormatter + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:29 + def initialize(max_formatted_output_length = T.unsafe(nil)); end + + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:34 + def format(object); end + + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:13 + def max_formatted_output_length; end + + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:13 + def max_formatted_output_length=(_arg0); end + + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:72 + def prepare_array(array); end + + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:96 + def prepare_element(element); end + + # Prepares the provided object to be formatted by wrapping it as needed + # in something that, when `inspect` is called on it, will produce the + # desired output. + # + # This allows us to apply the desired formatting to hash/array data structures + # at any level of nesting, simply by walking that structure and replacing items + # with custom items that have `inspect` defined to return the desired output + # for that item. Then we can just use `Array#inspect` or `Hash#inspect` to + # format the entire thing. + # + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:58 + def prepare_for_inspection(object); end + + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:78 + def prepare_hash(input_hash); end + + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:115 + def recursive_structure?(object); end + + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:88 + def sort_hash_keys(input_hash); end + + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:108 + def with_entering_structure(structure); end + + private + + # Returns the substring defined by the start_index and end_index + # If the string ends with a partial ANSI code code then that + # will be removed as printing partial ANSI + # codes to the terminal can lead to corruption + # + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:270 + def truncate_string(str, start_index, end_index); end + + class << self + # Methods are deferred to a default instance of the class to maintain the interface + # For example, calling ObjectFormatter.format is still possible + # + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:17 + def default_instance; end + + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:21 + def format(object); end + + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:25 + def prepare_for_inspection(object); end + end +end + +# pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:129 +class RSpec::Support::ObjectFormatter::BaseInspector < ::Struct + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:129 + def formatter; end + + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:129 + def formatter=(_); end + + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:134 + def inspect; end + + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:129 + def object; end + + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:129 + def object=(_); end + + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:138 + def pretty_print(pp); end + + class << self + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:129 + def [](*_arg0); end + + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:130 + def can_inspect?(_object); end + + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:129 + def inspect; end + + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:129 + def keyword_init?; end + + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:129 + def members; end + + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:129 + def new(*_arg0); end + end +end + +# pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:179 +class RSpec::Support::ObjectFormatter::BigDecimalInspector < ::RSpec::Support::ObjectFormatter::BaseInspector + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:184 + def inspect; end + + class << self + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:180 + def can_inspect?(object); end + end +end + +# pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:161 +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. + # + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:170 + def inspect; end + + class << self + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:164 + def can_inspect?(object); end + end +end + +# pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:162 +RSpec::Support::ObjectFormatter::DateTimeInspector::FORMAT = T.let(T.unsafe(nil), String) + +# pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:226 +class RSpec::Support::ObjectFormatter::DelegatorInspector < ::RSpec::Support::ObjectFormatter::BaseInspector + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:231 + def inspect; end + + class << self + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:227 + def can_inspect?(object); end + end +end + +# pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:189 +class RSpec::Support::ObjectFormatter::DescribableMatcherInspector < ::RSpec::Support::ObjectFormatter::BaseInspector + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:194 + def inspect; end + + class << self + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:190 + def can_inspect?(object); end + end +end + +# pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:11 +RSpec::Support::ObjectFormatter::ELLIPSIS = T.let(T.unsafe(nil), String) + +# pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:249 +RSpec::Support::ObjectFormatter::INSPECTOR_CLASSES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:119 +class RSpec::Support::ObjectFormatter::InspectableItem < ::Struct + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:120 + def inspect; end + + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:124 + def pretty_print(pp); end + + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:119 + def text; end + + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:119 + def text=(_); end + + class << self + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:119 + def [](*_arg0); end + + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:119 + def inspect; end + + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:119 + def keyword_init?; end + + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:119 + def members; end + + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:119 + def new(*_arg0); end + end +end + +# pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:236 +class RSpec::Support::ObjectFormatter::InspectableObjectInspector < ::RSpec::Support::ObjectFormatter::BaseInspector + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:244 + def inspect; end + + class << self + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:237 + def can_inspect?(object); end + end +end + +# pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:143 +class RSpec::Support::ObjectFormatter::TimeInspector < ::RSpec::Support::ObjectFormatter::BaseInspector + # for 1.8.7 + # + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:151 + def inspect; end + + class << self + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:146 + def can_inspect?(object); end + end +end + +# pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:144 +RSpec::Support::ObjectFormatter::TimeInspector::FORMAT = T.let(T.unsafe(nil), String) + +# pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:199 +class RSpec::Support::ObjectFormatter::UninspectableObjectInspector < ::RSpec::Support::ObjectFormatter::BaseInspector + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:209 + def inspect; end + + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:213 + def klass; end + + # http://stackoverflow.com/a/2818916 + # + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:218 + def native_object_id; end + + class << self + # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:202 + def can_inspect?(object); end + end +end + +# pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:200 +RSpec::Support::ObjectFormatter::UninspectableObjectInspector::OBJECT_ID_FORMAT = T.let(T.unsafe(nil), String) + +# Provides recursive constant lookup methods useful for +# constant stubbing. +# +# pkg:gem/rspec-support#lib/rspec/support/recursive_const_methods.rb:7 +module RSpec::Support::RecursiveConstMethods + # pkg:gem/rspec-support#lib/rspec/support/recursive_const_methods.rb:45 + def const_defined_on?(mod, const_name); end + + # pkg:gem/rspec-support#lib/rspec/support/recursive_const_methods.rb:53 + def constants_defined_on(mod); end + + # pkg:gem/rspec-support#lib/rspec/support/recursive_const_methods.rb:49 + def get_const_defined_on(mod, const_name); end + + # pkg:gem/rspec-support#lib/rspec/support/recursive_const_methods.rb:73 + def normalize_const_name(const_name); end + + # pkg:gem/rspec-support#lib/rspec/support/recursive_const_methods.rb:64 + def recursive_const_defined?(const_name); end + + # pkg:gem/rspec-support#lib/rspec/support/recursive_const_methods.rb:58 + def recursive_const_get(const_name); end +end + +# Allows a thread to lock out other threads from a critical section of code, +# while allowing the thread with the lock to reenter that section. +# +# Based on Monitor as of 2.2 - +# https://github.com/ruby/ruby/blob/eb7ddaa3a47bf48045d26c72eb0f263a53524ebc/lib/monitor.rb#L9 +# +# Depends on Mutex, but Mutex is only available as part of core since 1.9.1: +# exists - http://ruby-doc.org/core-1.9.1/Mutex.html +# dne - http://ruby-doc.org/core-1.9.0/Mutex.html +# +# @private +# +# pkg:gem/rspec-support#lib/rspec/support/reentrant_mutex.rb:16 +class RSpec::Support::ReentrantMutex + # pkg:gem/rspec-support#lib/rspec/support/reentrant_mutex.rb:17 + def initialize; end + + # pkg:gem/rspec-support#lib/rspec/support/reentrant_mutex.rb:23 + def synchronize; end + + private + + # pkg:gem/rspec-support#lib/rspec/support/reentrant_mutex.rb:35 + def enter; end + + # pkg:gem/rspec-support#lib/rspec/support/reentrant_mutex.rb:40 + def exit; end +end + +# @api private +# +# Provides query methods for different rubies +# +# pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:26 +module RSpec::Support::Ruby + private + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:29 + def jruby?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:37 + def jruby_9000?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:33 + def jruby_version; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:49 + def mri?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:45 + def non_mri?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:41 + def rbx?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:53 + def truffleruby?; end + + class << self + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:29 + def jruby?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:37 + def jruby_9000?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:33 + def jruby_version; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:49 + def mri?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:45 + def non_mri?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:41 + def rbx?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:53 + def truffleruby?; end + end +end + +# @api private +# +# Provides query methods for ruby features that differ among +# implementations. +# +# pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:62 +module RSpec::Support::RubyFeatures + private + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:85 + def caller_locations_supported?; end + + # pkg:gem/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, + # but when you try to fork, it raises an error: + # NotImplementedError: fork is not available on this platform + # + # When we drop support for JRuby 1.7 and/or Ruby 1.8, we can drop + # this special case. + # + # pkg:gem/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 + # + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:111 + def kw_arg_separation?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:160 + def kw_args_supported?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:216 + def module_prepends_supported?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:212 + def module_refinement_supported?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:81 + def optional_and_splat_args_supported?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:164 + def required_kw_args_supported?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:146 + def ripper_supported?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:90 + def supports_exception_cause?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:168 + def supports_rebinding_module_methods?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:100 + def supports_syntax_suggest?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:121 + def supports_taint?; end + + class << self + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:85 + def caller_locations_supported?; end + + # pkg:gem/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, + # but when you try to fork, it raises an error: + # NotImplementedError: fork is not available on this platform + # + # When we drop support for JRuby 1.7 and/or Ruby 1.8, we can drop + # this special case. + # + # pkg:gem/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 + # + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:111 + def kw_arg_separation?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:160 + def kw_args_supported?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:216 + def module_prepends_supported?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:212 + def module_refinement_supported?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:81 + def optional_and_splat_args_supported?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:164 + def required_kw_args_supported?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:146 + def ripper_supported?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:90 + def supports_exception_cause?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:168 + def supports_rebinding_module_methods?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:100 + def supports_syntax_suggest?; end + + # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:121 + def supports_taint?; end + end +end + +# Figures out whether a given method can accept various arguments. +# Surprisingly non-trivial. +# +# @private +# +# pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:414 +RSpec::Support::StrictSignatureVerifier = RSpec::Support::MethodSignatureVerifier + +# pkg:gem/rspec-support#lib/rspec/support/version.rb:5 +module RSpec::Support::Version; end + +# pkg:gem/rspec-support#lib/rspec/support/version.rb:6 +RSpec::Support::Version::STRING = T.let(T.unsafe(nil), String) + +# pkg:gem/rspec-support#lib/rspec/support/warnings.rb:8 +module RSpec::Support::Warnings + # pkg:gem/rspec-support#lib/rspec/support/warnings.rb:9 + def deprecate(deprecated, options = T.unsafe(nil)); end + + # @private + # + # Used internally to print deprecation warnings + # when rspec-core isn't loaded + # + # pkg:gem/rspec-support#lib/rspec/support/warnings.rb:17 + def warn_deprecation(message, options = T.unsafe(nil)); end + + # @private + # + # Used internally to print longer warnings + # + # pkg:gem/rspec-support#lib/rspec/support/warnings.rb:31 + def warn_with(message, options = T.unsafe(nil)); end + + # @private + # + # Used internally to print warnings + # + # pkg:gem/rspec-support#lib/rspec/support/warnings.rb:24 + def warning(text, options = T.unsafe(nil)); end +end + +# pkg:gem/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 + # + # pkg:gem/rspec-support#lib/rspec/support/with_keywords_when_needed.rb:17 + def class_exec(klass, *args, **, &block); end + + class << self + # Remove this in RSpec 4 in favour of explicitly passed in kwargs where + # this is used. Works around a warning in Ruby 2.7 + # + # pkg:gem/rspec-support#lib/rspec/support/with_keywords_when_needed.rb:17 + def class_exec(klass, *args, **, &block); end + end +end diff --git a/sorbet/rbi/gems/rspec@3.13.0.rbi b/sorbet/rbi/gems/rspec@3.13.0.rbi deleted file mode 100644 index 54598cd..0000000 --- a/sorbet/rbi/gems/rspec@3.13.0.rbi +++ /dev/null @@ -1,83 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rspec` gem. -# Please instead update this file by running `bin/tapioca gem rspec`. - - -# source://rspec//lib/rspec/version.rb#1 -module RSpec - class << self - # source://rspec-core/3.13.3/lib/rspec/core.rb#70 - def clear_examples; end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#85 - def configuration; end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#49 - def configuration=(_arg0); end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#97 - def configure; end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#194 - def const_missing(name); end - - # source://rspec-core/3.13.3/lib/rspec/core/dsl.rb#42 - def context(*args, &example_group_block); end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#122 - def current_example; end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#128 - def current_example=(example); end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#154 - def current_scope; end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#134 - def current_scope=(scope); end - - # source://rspec-core/3.13.3/lib/rspec/core/dsl.rb#42 - def describe(*args, &example_group_block); end - - # source://rspec-core/3.13.3/lib/rspec/core/dsl.rb#42 - def example_group(*args, &example_group_block); end - - # source://rspec-core/3.13.3/lib/rspec/core/dsl.rb#42 - def fcontext(*args, &example_group_block); end - - # source://rspec-core/3.13.3/lib/rspec/core/dsl.rb#42 - def fdescribe(*args, &example_group_block); end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#58 - def reset; end - - # source://rspec-core/3.13.3/lib/rspec/core/shared_example_group.rb#110 - def shared_context(name, *args, &block); end - - # source://rspec-core/3.13.3/lib/rspec/core/shared_example_group.rb#110 - def shared_examples(name, *args, &block); end - - # source://rspec-core/3.13.3/lib/rspec/core/shared_example_group.rb#110 - def shared_examples_for(name, *args, &block); end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#160 - def world; end - - # source://rspec-core/3.13.3/lib/rspec/core.rb#49 - def world=(_arg0); end - - # source://rspec-core/3.13.3/lib/rspec/core/dsl.rb#42 - def xcontext(*args, &example_group_block); end - - # source://rspec-core/3.13.3/lib/rspec/core/dsl.rb#42 - def xdescribe(*args, &example_group_block); end - end -end - -# source://rspec//lib/rspec/version.rb#2 -module RSpec::Version; end - -# source://rspec//lib/rspec/version.rb#3 -RSpec::Version::STRING = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rspec@3.13.2.rbi b/sorbet/rbi/gems/rspec@3.13.2.rbi new file mode 100644 index 0000000..65adec4 --- /dev/null +++ b/sorbet/rbi/gems/rspec@3.13.2.rbi @@ -0,0 +1,15 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rspec` gem. +# Please instead update this file by running `bin/tapioca gem rspec`. + + +# pkg:gem/rspec#lib/rspec/version.rb:1 +module RSpec; end + +# pkg:gem/rspec#lib/rspec/version.rb:2 +module RSpec::Version; end + +# pkg:gem/rspec#lib/rspec/version.rb:3 +RSpec::Version::STRING = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rubocop-ast@1.41.0.rbi b/sorbet/rbi/gems/rubocop-ast@1.41.0.rbi deleted file mode 100644 index 4f3065f..0000000 --- a/sorbet/rbi/gems/rubocop-ast@1.41.0.rbi +++ /dev/null @@ -1,7788 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rubocop-ast` gem. -# Please instead update this file by running `bin/tapioca gem rubocop-ast`. - - -class Parser::Source::Range - include ::RuboCop::AST::Ext::Range -end - -# source://rubocop-ast//lib/rubocop/ast/ext/range.rb#3 -module RuboCop; end - -# ... -# -# source://rubocop-ast//lib/rubocop/ast/ext/range.rb#4 -module RuboCop::AST - extend ::RuboCop::AST::RuboCopCompatibility -end - -# A node extension for `alias` nodes. This will be used in place of a plain -# 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 -class RuboCop::AST::AliasNode < ::RuboCop::AST::Node - # Returns the new identifier as specified by the `alias`. - # - # @return [SymbolNode] the new identifier - # - # source://rubocop-ast//lib/rubocop/ast/node/alias_node.rb#19 - def new_identifier; end - - # Returns the old identifier as specified by the `alias`. - # - # @return [SymbolNode] the old identifier - # - # source://rubocop-ast//lib/rubocop/ast/node/alias_node.rb#12 - def old_identifier; end -end - -# A node extension for `op_asgn` nodes. -# 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 -class RuboCop::AST::AndAsgnNode < ::RuboCop::AST::OpAsgnNode - # The operator being used for assignment as a symbol. - # - # @return [Symbol] the assignment operator - # - # source://rubocop-ast//lib/rubocop/ast/node/and_asgn_node.rb#12 - def operator; end -end - -# A node extension for `until` nodes. This will be used in place of a plain -# node when the builder constructs the AST, making its methods available -# to all `until` nodes within RuboCop. -# -# source://rubocop-ast//lib/rubocop/ast/node/and_node.rb#8 -class RuboCop::AST::AndNode < ::RuboCop::AST::Node - include ::RuboCop::AST::BinaryOperatorNode - include ::RuboCop::AST::PredicateOperatorNode - - # Returns the alternate operator of the `and` as a string. - # Returns `and` for `&&` and vice versa. - # - # @return [String] the alternate of the `and` operator - # - # source://rubocop-ast//lib/rubocop/ast/node/and_node.rb#16 - def alternate_operator; end - - # Returns the inverse keyword of the `and` node as a string. - # Returns `||` for `&&` and `or` for `and`. - # - # @return [String] the inverse of the `and` operator - # - # source://rubocop-ast//lib/rubocop/ast/node/and_node.rb#24 - def inverse_operator; end -end - -# A node extension for `arg`, `optarg`, `restarg`, `kwarg`, `kwoptarg`, -# `kwrestarg`, `blockarg`, `shadowarg` and `forward_arg` nodes. -# 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 -class RuboCop::AST::ArgNode < ::RuboCop::AST::Node - # Checks whether the argument has a default value - # - # @return [Boolean] whether the argument has a default value - # - # source://rubocop-ast//lib/rubocop/ast/node/arg_node.rb#29 - def default?; end - - # Returns the default value of the argument, if any. - # - # @return [Node, nil] the default value of the argument - # - # source://rubocop-ast//lib/rubocop/ast/node/arg_node.rb#20 - def default_value; end - - # Returns the name of an argument. - # - # @return [Symbol, nil] the name of the argument - # - # source://rubocop-ast//lib/rubocop/ast/node/arg_node.rb#13 - def name; end -end - -# A node extension for `args` nodes. This will be used in place of a plain -# node when the builder constructs the AST, making its methods available -# to all `args` nodes within RuboCop. -# -# source://rubocop-ast//lib/rubocop/ast/node/args_node.rb#8 -class RuboCop::AST::ArgsNode < ::RuboCop::AST::Node - include ::RuboCop::AST::CollectionNode - - # Yield each argument from the collection. - # Arguments can be inside `mlhs` nodes in the case of destructuring, so this - # flattens the collection to just `arg`, `optarg`, `restarg`, `kwarg`, - # `kwoptarg`, `kwrestarg`, `blockarg`, `forward_arg` and `shadowarg`. - # - # @return [Array] array of argument nodes. - # - # source://rubocop-ast//lib/rubocop/ast/node/args_node.rb#34 - def argument_list; end - - # It returns true if arguments are empty and delimiters do not exist. - # @example: - # # true - # def x; end - # x { } - # -> {} - # - # # false - # def x(); end - # def x a; end - # x { || } - # -> () {} - # -> a {} - # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/args_node.rb#24 - def empty_and_without_delimiters?; end -end - -# A node extension for `array` nodes. This will be used in place of a plain -# node when the builder constructs the AST, making its methods available -# to all `array` nodes within RuboCop. -# -# source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#8 -class RuboCop::AST::ArrayNode < ::RuboCop::AST::Node - # Checks whether the `array` literal is delimited by either percent or - # square brackets - # - # brackets - # - # @return [Boolean] whether the array is enclosed in percent or square - # - # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#64 - def bracketed?; end - - # Calls the given block for each `value` node in the `array` literal. - # If no block is given, an `Enumerator` is returned. - # - # @return [self] if a block is given - # @return [Enumerator] if no block is given - # - # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#25 - def each_value(&block); end - - # Checks whether the `array` literal is delimited by percent brackets. - # - # @overload percent_literal? - # @overload percent_literal? - # @return [Boolean] whether the array is enclosed in percent brackets - # - # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#51 - def percent_literal?(type = T.unsafe(nil)); end - - # Checks whether the `array` literal is delimited by square brackets. - # - # @return [Boolean] whether the array is enclosed in square brackets - # - # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#36 - def square_brackets?; end - - # Returns an array of all value nodes in the `array` literal. - # - # @return [Array] an array of value nodes - # - # source://ast/2.4.3/lib/ast/node.rb#56 - def values; end -end - -# source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#9 -RuboCop::AST::ArrayNode::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Hash) - -# A node extension for `lvasgn`, `ivasgn`, `cvasgn`, and `gvasgn` nodes. -# 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 -class RuboCop::AST::AsgnNode < ::RuboCop::AST::Node - # The expression being assigned to the variable. - # - # @return [Node] the expression being assigned. - # - # source://rubocop-ast//lib/rubocop/ast/node/asgn_node.rb#20 - def expression; end - - # The name of the variable being assigned as a symbol. - # - # @return [Symbol] the name of the variable being assigned - # - # source://rubocop-ast//lib/rubocop/ast/node/asgn_node.rb#12 - def lhs; end - - # The name of the variable being assigned as a symbol. - # - # @return [Symbol] the name of the variable being assigned - # - # source://rubocop-ast//lib/rubocop/ast/node/asgn_node.rb#12 - def name; end - - # The expression being assigned to the variable. - # - # @return [Node] the expression being assigned. - # - # source://rubocop-ast//lib/rubocop/ast/node/asgn_node.rb#20 - def rhs; end -end - -# Common functionality for primitive literal nodes: `sym`, `str`, -# `int`, `float`, `rational`... -# -# source://rubocop-ast//lib/rubocop/ast/node/mixin/basic_literal_node.rb#7 -module RuboCop::AST::BasicLiteralNode - # Returns the value of the literal. - # - # @return [mixed] the value of the literal - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/basic_literal_node.rb#11 - def value; end -end - -# Common functionality for nodes that are binary operations: -# `or`, `and` ... -# -# source://rubocop-ast//lib/rubocop/ast/node/mixin/binary_operator_node.rb#7 -module RuboCop::AST::BinaryOperatorNode - # Returns all of the conditions, including nested conditions, - # of the binary operation. - # - # operation and the let and right hand side of any nested binary - # operators - # - # @return [Array] the left and right hand side of the binary - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/binary_operator_node.rb#28 - def conditions; end - - # Returns the left hand side node of the binary operation. - # - # @return [Node] the left hand side of the binary operation - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/binary_operator_node.rb#11 - def lhs; end - - # Returns the right hand side node of the binary operation. - # - # @return [Node] the right hand side of the binary operation - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/binary_operator_node.rb#18 - def rhs; end -end - -# A node extension for `block` nodes. This will be used in place of a plain -# node when the builder constructs the AST, making its methods available -# to all `send` nodes within RuboCop. -# -# A `block` node is essentially a method send with a block. Parser nests -# the `send` node inside the `block` node. -# -# source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#11 -class RuboCop::AST::BlockNode < ::RuboCop::AST::Node - include ::RuboCop::AST::MethodIdentifierPredicates - - # Returns a collection of all descendants of this node that are - # argument type nodes. See `ArgsNode#argument_list` for details. - # - # @return [Array] - # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#62 - def argument_list; end - - # The arguments of this block. - # Note that if the block has destructured arguments, `arguments` will - # return a `mlhs` node, whereas `argument_list` will return only - # actual argument nodes. - # - # @return [Array] - # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#50 - 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#89 - 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#75 - 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#96 - 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#124 - def closing_delimiter; end - - # The delimiters for this `block` literal. - # - # @return [Array] the delimiters for the `block` literal - # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#110 - 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#31 - 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#103 - 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#147 - 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#40 - 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#82 - def method_name; end - - # Checks whether this is a multiline block. This is overridden here - # because the general version in `Node` does not work for `block` nodes. - # - # @return [Boolean] whether the `block` literal is on a several lines - # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#140 - 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#117 - def opening_delimiter; end - - # The `send` node associated with this block. - # - # @return [SendNode] the `send` node associated with the `block` node - # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#22 - def send_node; end - - # Checks whether this is a single line block. This is overridden here - # because the general version in `Node` does not work for `block` nodes. - # - # @return [Boolean] whether the `block` literal is on a single line - # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#132 - 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#154 - def void_context?; end - - private - - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#160 - def numbered_arguments; end -end - -# source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#14 -RuboCop::AST::BlockNode::IT_BLOCK_ARGUMENT = T.let(T.unsafe(nil), Array) - -# source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#16 -RuboCop::AST::BlockNode::VOID_CONTEXT_METHODS = T.let(T.unsafe(nil), Array) - -# A node extension for `break` nodes. This will be used in place of a -# plain node when the builder constructs the AST, making its methods -# available to all `break` nodes within RuboCop. -# -# source://rubocop-ast//lib/rubocop/ast/node/break_node.rb#8 -class RuboCop::AST::BreakNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::ParameterizedNode::WrappedArguments -end - -# `RuboCop::AST::Builder` is an AST builder that is utilized to let `Parser` -# generate ASTs with {RuboCop::AST::Node}. -# -# @example -# buffer = Parser::Source::Buffer.new('(string)') -# buffer.source = 'puts :foo' -# -# builder = RuboCop::AST::Builder.new -# require 'parser/ruby25' -# parser = Parser::Ruby25.new(builder) -# root_node = parser.parse(buffer) -# -# source://rubocop-ast//lib/rubocop/ast/builder.rb#128 -class RuboCop::AST::Builder < ::Parser::Builders::Default - include ::RuboCop::AST::BuilderExtensions -end - -# Common functionality between the parser and prism builder -# -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/builder.rb#7 -module RuboCop::AST::BuilderExtensions - # Generates {Node} from the given information. - # - # @api private - # @return [Node] the generated node - # - # source://rubocop-ast//lib/rubocop/ast/builder.rb#100 - def n(type, children, source_map); end - - # Overwrite the base method to allow strings with invalid encoding - # More details here https://github.com/whitequark/parser/issues/283 - # - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/builder.rb#106 - def string_value(token); end - - private - - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/builder.rb#112 - def node_klass(type); end - - class << self - # @api private - # @private - # - # source://rubocop-ast//lib/rubocop/ast/builder.rb#8 - def included(base); end - end -end - -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/builder.rb#14 -RuboCop::AST::BuilderExtensions::NODE_MAP = T.let(T.unsafe(nil), Hash) - -# A node extension for `case_match` nodes. This will be used in place of -# a plain node when the builder constructs the AST, making its methods -# available to all `case_match` nodes within RuboCop. -# -# source://rubocop-ast//lib/rubocop/ast/node/case_match_node.rb#8 -class RuboCop::AST::CaseMatchNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ConditionalNode - - # Returns an array of all the when branches in the `case` statement. - # - # and the `else` (if any). Note that these bodies could be nil. - # - # @return [Array] an array of the bodies of the `in` branches - # - # source://rubocop-ast//lib/rubocop/ast/node/case_match_node.rb#38 - def branches; end - - # @deprecated Use `in_pattern_branches.each` - # - # source://rubocop-ast//lib/rubocop/ast/node/case_match_node.rb#19 - def each_in_pattern(&block); end - - # Checks whether this case statement has an `else` branch. - # - # @return [Boolean] whether the `case` statement has an `else` branch - # - # source://rubocop-ast//lib/rubocop/ast/node/case_match_node.rb#59 - def else?; end - - # Returns the else branch of the `case` statement, if any. - # - # @return [Node] the else branch node of the `case` statement - # @return [EmptyElse] the empty else branch node of the `case` statement - # @return [nil] if the case statement does not have an else branch. - # - # source://rubocop-ast//lib/rubocop/ast/node/case_match_node.rb#52 - def else_branch; end - - # Returns an array of all the `in` pattern branches in the `case` statement. - # - # @return [Array] an array of `in_pattern` nodes - # - # source://rubocop-ast//lib/rubocop/ast/node/case_match_node.rb#30 - def in_pattern_branches; end - - # Returns the keyword of the `case` statement as a string. - # - # @return [String] the keyword of the `case` statement - # - # source://rubocop-ast//lib/rubocop/ast/node/case_match_node.rb#14 - def keyword; end -end - -# A node extension for `case` nodes. This will be used in place of a plain -# node when the builder constructs the AST, making its methods available -# to all `case` nodes within RuboCop. -# -# source://rubocop-ast//lib/rubocop/ast/node/case_node.rb#8 -class RuboCop::AST::CaseNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ConditionalNode - - # Returns an array of all the when branches in the `case` statement. - # - # and the else (if any). Note that these bodies could be nil. - # - # @return [Array] an array of the bodies of the when branches - # - # source://rubocop-ast//lib/rubocop/ast/node/case_node.rb#38 - def branches; end - - # @deprecated Use `when_branches.each` - # - # source://rubocop-ast//lib/rubocop/ast/node/case_node.rb#19 - def each_when(&block); end - - # Checks whether this case statement has an `else` branch. - # - # @return [Boolean] whether the `case` statement has an `else` branch - # - # source://rubocop-ast//lib/rubocop/ast/node/case_node.rb#55 - def else?; end - - # Returns the else branch of the `case` statement, if any. - # - # @return [Node] the else branch node of the `case` statement - # @return [nil] if the case statement does not have an else branch. - # - # source://rubocop-ast//lib/rubocop/ast/node/case_node.rb#48 - def else_branch; end - - # Returns the keyword of the `case` statement as a string. - # - # @return [String] the keyword of the `case` statement - # - # source://rubocop-ast//lib/rubocop/ast/node/case_node.rb#14 - def keyword; end - - # Returns an array of all the when branches in the `case` statement. - # - # @return [Array] an array of `when` nodes - # - # source://rubocop-ast//lib/rubocop/ast/node/case_node.rb#30 - def when_branches; end -end - -# A node extension for `casgn` nodes. -# 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 -class RuboCop::AST::CasgnNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ConstantNode - - # The expression being assigned to the variable. - # - # @return [Node] the expression being assigned. - # - # source://rubocop-ast//lib/rubocop/ast/node/casgn_node.rb#17 - def expression; end - - # source://rubocop-ast//lib/rubocop/ast/node/mixin/constant_node.rb#14 - def lhs; end - - # source://rubocop-ast//lib/rubocop/ast/node/mixin/constant_node.rb#14 - def name; end - - # The expression being assigned to the variable. - # - # @return [Node] the expression being assigned. - # - # source://rubocop-ast//lib/rubocop/ast/node/casgn_node.rb#17 - def rhs; end -end - -# A node extension for `class` nodes. This will be used in place of a plain -# 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 -class RuboCop::AST::ClassNode < ::RuboCop::AST::Node - # The body of this `class` node. - # - # @return [Node, nil] the body of the class - # - # source://rubocop-ast//lib/rubocop/ast/node/class_node.rb#26 - def body; end - - # The identifier for this `class` node. - # - # @return [Node] the identifier of the class - # - # source://rubocop-ast//lib/rubocop/ast/node/class_node.rb#12 - def identifier; end - - # The parent class for this `class` node. - # - # @return [Node, nil] the parent class of the class - # - # source://rubocop-ast//lib/rubocop/ast/node/class_node.rb#19 - def parent_class; end -end - -# A mixin that helps give collection nodes array polymorphism. -# -# source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#6 -module RuboCop::AST::CollectionNode - extend ::RuboCop::SimpleForwardable - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def &(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def *(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def +(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def -(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def <<(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def [](*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def []=(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def all?(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def any?(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def append(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def assoc(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def at(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def bsearch(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def bsearch_index(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def chain(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def chunk(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def chunk_while(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def clear(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def collect(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def collect!(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def collect_concat(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def combination(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def compact(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def compact!(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def concat(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def count(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def cycle(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def deconstruct(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def delete(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def delete_at(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def delete_if(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def detect(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def difference(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def dig(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def drop(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def drop_while(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def each(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def each_cons(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def each_entry(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def each_index(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def each_slice(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def each_with_index(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def each_with_object(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def empty?(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def entries(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def fetch(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def fetch_values(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def fill(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def filter(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def filter!(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def filter_map(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def find(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def find_all(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def find_index(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def first(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def flat_map(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def flatten(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def flatten!(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def grep(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def grep_v(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def group_by(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def include?(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def index(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def inject(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def insert(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def intersect?(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def intersection(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def join(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def keep_if(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def last(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def lazy(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def length(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def map(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def map!(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def max(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def max_by(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def member?(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def min(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def min_by(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def minmax(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def minmax_by(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def none?(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def one?(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def pack(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def partition(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def permutation(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def place(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def pop(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def prepend(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def product(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def push(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def rassoc(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def reduce(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def reject(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def reject!(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def repeated_combination(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def repeated_permutation(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def replace(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def reverse(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def reverse!(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def reverse_each(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def rindex(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def rotate(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def rotate!(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def sample(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def select(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def select!(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def shelljoin(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def shift(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def shuffle(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def shuffle!(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def size(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def slice(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def slice!(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def slice_after(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def slice_before(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def slice_when(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def sort(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def sort!(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def sort_by(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def sort_by!(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def sum(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def take(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def take_while(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def tally(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def to_ary(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def to_h(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def to_set(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def transpose(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def union(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def uniq(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def uniq!(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def unshift(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def values_at(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def zip(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def |(*_arg0, **_arg1, &_arg2); end -end - -# source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#9 -RuboCop::AST::CollectionNode::ARRAY_METHODS = T.let(T.unsafe(nil), Array) - -# Common functionality for nodes that have conditions: -# `if`, `while`, `until`, `case`. -# This currently doesn't include `when` nodes, because they have multiple -# conditions, and need to be checked for that. -# -# source://rubocop-ast//lib/rubocop/ast/node/mixin/conditional_node.rb#9 -module RuboCop::AST::ConditionalNode - # Returns the body associated with the condition. This works together with - # each node's custom destructuring method to select the correct part of - # the node. - # - # @note For `if` nodes, this is the truthy branch. - # @return [Node, nil] the body of the node - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/conditional_node.rb#40 - def body; end - - # Returns the condition of the node. This works together with each node's - # custom destructuring method to select the correct part of the node. - # - # @return [Node, nil] the condition of the node - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/conditional_node.rb#29 - def condition; end - - # Checks whether the condition of the node is written on more than - # one line. - # - # @return [Boolean] whether the condition is on more than one line - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/conditional_node.rb#21 - def multiline_condition?; end - - # Checks whether the condition of the node is written on a single line. - # - # @return [Boolean] whether the condition is on a single line - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/conditional_node.rb#13 - def single_line_condition?; end -end - -# A node extension for `const` nodes. -# -# source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#6 -class RuboCop::AST::ConstNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ConstantNode -end - -# Common functionality for nodes that deal with constants: -# `const`, `casgn`. -# -# source://rubocop-ast//lib/rubocop/ast/node/mixin/constant_node.rb#7 -module RuboCop::AST::ConstantNode - # @return [Boolean] if the constant starts with `::` (aka s(:cbase)) - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/constant_node.rb#27 - def absolute?; end - - # @return [Boolean] if the constant is a Module / Class, according to the standard convention. - # Note: some classes might have uppercase in which case this method - # returns false - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/constant_node.rb#21 - def class_name?; end - - # Yield nodes for the namespace - # - # For `::Foo::Bar::BAZ` => yields: - # s(:cbase), then - # s(:const, :Foo), then - # s(:const, s(:const, :Foo), :Bar) - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/constant_node.rb#44 - def each_path(&block); end - - # @return [Boolean] if the constant is a Module / Class, according to the standard convention. - # Note: some classes might have uppercase in which case this method - # returns false - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/constant_node.rb#21 - def module_name?; end - - # @return [Node, nil] the node associated with the scope (e.g. cbase, const, ...) - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/constant_node.rb#9 - def namespace; end - - # @return [Boolean] if the constant does not start with `::` (aka s(:cbase)) - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/constant_node.rb#34 - def relative?; end - - # @return [Symbol] the demodulized name of the constant: "::Foo::Bar" => :Bar - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/constant_node.rb#14 - def short_name; end -end - -# A node extension for `csend` nodes. This will be used in place of a plain -# node when the builder constructs the AST, making its methods available -# to all `csend` nodes within RuboCop. -# -# source://rubocop-ast//lib/rubocop/ast/node/csend_node.rb#8 -class RuboCop::AST::CsendNode < ::RuboCop::AST::SendNode - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/csend_node.rb#9 - def send_type?; end -end - -# A node extension for `def` nodes. This will be used in place of a plain -# node when the builder constructs the AST, making its methods available -# to all `def` nodes within RuboCop. -# -# source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#8 -class RuboCop::AST::DefNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::MethodIdentifierPredicates - - # Checks whether this method definition node forwards its arguments - # as per the feature added in Ruby 2.7. - # - # @note This is written in a way that may support lead arguments - # which are rumored to be added in a later version of Ruby. - # @return [Boolean] whether the `def` node uses argument forwarding - # - # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#26 - def argument_forwarding?; end - - # An array containing the arguments of the method definition. - # - # @return [Array] the arguments of the method definition - # - # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#40 - def arguments; end - - # The body of the method definition. - # - # @note this can be either a `begin` node, if the method body contains - # multiple expressions, or any other node, if it contains a single - # expression. - # @return [Node] the body of the method definition - # - # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#51 - def body; end - - # @return [Boolean] if the definition is without an `end` or not. - # - # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#63 - def endless?; end - - # The name of the defined method as a symbol. - # - # @return [Symbol] the name of the defined method - # - # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#33 - def method_name; end - - # The receiver of the method definition, if any. - # - # @return [Node, nil] the receiver of the method definition, or `nil`. - # - # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#58 - def receiver; end - - # Checks whether this node body is a void context. - # - # @return [Boolean] whether the `def` node body is a void context - # - # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#15 - def void_context?; end -end - -# A node extension for `defined?` nodes. This will be used in place of a -# plain node when the builder constructs the AST, making its methods -# available to all `send` nodes within RuboCop. -# -# source://rubocop-ast//lib/rubocop/ast/node/defined_node.rb#8 -class RuboCop::AST::DefinedNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::MethodIdentifierPredicates - include ::RuboCop::AST::MethodDispatchNode - - # source://ast/2.4.3/lib/ast/node.rb#56 - def arguments; end - - # source://rubocop-ast//lib/rubocop/ast/node/defined_node.rb#12 - def node_parts; end -end - -# Common functionality for primitive literal nodes: `sym`, `str`, -# `int`, `float`, ... -# -# source://rubocop-ast//lib/rubocop/ast/node/mixin/descendence.rb#7 -module RuboCop::AST::Descendence - # Returns an array of child nodes. - # This is a shorthand for `node.each_child_node.to_a`. - # - # @return [Array] an array of child nodes - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/descendence.rb#38 - def child_nodes; end - - # Returns an array of descendant nodes. - # This is a shorthand for `node.each_descendant.to_a`. - # - # @return [Array] an array of descendant nodes - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/descendence.rb#72 - def descendants; end - - # Calls the given block for each child node. - # If no block is given, an `Enumerator` is returned. - # - # Note that this is different from `node.children.each { |child| ... }` - # which yields all children including non-node elements. - # - # @overload each_child_node - # @overload each_child_node - # @return [self] if a block is given - # @return [Enumerator] if no block is given - # @yieldparam node [Node] each child node - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/descendence.rb#22 - def each_child_node(*types); end - - # Calls the given block for each descendant node with depth first order. - # If no block is given, an `Enumerator` is returned. - # - # @overload each_descendant - # @overload each_descendant - # @overload each_descendant - # @return [self] if a block is given - # @return [Enumerator] if no block is given - # @yieldparam node [Node] each descendant node - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/descendence.rb#60 - def each_descendant(*types, &block); end - - # Calls the given block for the receiver and each descendant node in - # depth-first order. - # If no block is given, an `Enumerator` is returned. - # - # This method would be useful when you treat the receiver node as the root - # of a tree and want to iterate over all nodes in the tree. - # - # @overload each_node - # @overload each_node - # @overload each_node - # @return [self] if a block is given - # @return [Enumerator] if no block is given - # @yieldparam node [Node] each node - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/descendence.rb#95 - def each_node(*types, &block); end - - protected - - # source://rubocop-ast//lib/rubocop/ast/node/mixin/descendence.rb#107 - def visit_descendants(types, &block); end -end - -# A node extension for `dstr` nodes. This will be used -# in place of a plain node when the builder constructs the AST, making -# its methods available to all `dstr` nodes within RuboCop. -# -# source://rubocop-ast//lib/rubocop/ast/node/dstr_node.rb#8 -class RuboCop::AST::DstrNode < ::RuboCop::AST::StrNode - # source://rubocop-ast//lib/rubocop/ast/node/dstr_node.rb#9 - def value; end -end - -# A node extension for `ensure` nodes. This will be used in place of a plain -# 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 -class RuboCop::AST::EnsureNode < ::RuboCop::AST::Node - # Returns the body of the `ensure` clause. - # - # @deprecated Use `EnsureNode#branch` - # @return [Node, nil] The body of the `ensure`. - # - # source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#16 - def body; end - - # Returns an the ensure branch in the exception handling statement. - # - # @return [Node, nil] the body of the ensure branch. - # - # source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#33 - def branch; end - - # Returns the `rescue` node of the `ensure`, if present. - # - # @return [Node, nil] The `rescue` node. - # - # source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#40 - def rescue_node; end - - # Checks whether this node body is a void context. - # Always `true` for `ensure`. - # - # @return [true] whether the `ensure` node body is a void context - # - # source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#48 - def void_context?; end -end - -# source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#9 -RuboCop::AST::EnsureNode::DEPRECATION_WARNING_LOCATION_CACHE = T.let(T.unsafe(nil), Array) - -# source://rubocop-ast//lib/rubocop/ast/ext/range.rb#5 -module RuboCop::AST::Ext; end - -# Extensions to Parser::AST::Range -# -# source://rubocop-ast//lib/rubocop/ast/ext/range.rb#7 -module RuboCop::AST::Ext::Range - # If `exclude_end` is `true`, then the range will be exclusive. - # - # Assume that `node` corresponds to the following array literal: - # - # [ - # :foo, - # :bar - # ] - # - # node.loc.begin.line_span # => 1..1 - # node.source_range.line_span(exclude_end: true) # => 1...4 - # - # @return [Range] the range of line numbers for the node - # - # source://rubocop-ast//lib/rubocop/ast/ext/range.rb#20 - def line_span(exclude_end: T.unsafe(nil)); end -end - -# A node extension for `float` nodes. This will be used in place of a plain -# node when the builder constructs the AST, making its methods available to -# all `float` nodes within RuboCop. -# -# source://rubocop-ast//lib/rubocop/ast/node/float_node.rb#8 -class RuboCop::AST::FloatNode < ::RuboCop::AST::Node - include ::RuboCop::AST::BasicLiteralNode - include ::RuboCop::AST::NumericNode -end - -# A node extension for `for` nodes. This will be used in place of a plain -# 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 -class RuboCop::AST::ForNode < ::RuboCop::AST::Node - # Returns the body of the `for` loop. - # - # @return [Node, nil] The body of the `for` loop. - # - # source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#48 - def body; end - - # Returns the collection the `for` loop is iterating over. - # - # @return [Node] The collection the `for` loop is iterating over - # - # source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#41 - def collection; end - - # Checks whether the `for` node has a `do` keyword. - # - # @return [Boolean] whether the `for` node has a `do` keyword - # - # source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#19 - def do?; end - - # Returns the keyword of the `for` statement as a string. - # - # @return [String] the keyword of the `until` statement - # - # source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#12 - def keyword; end - - # Returns the iteration variable of the `for` loop. - # - # @return [Node] The iteration variable of the `for` loop - # - # source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#34 - def variable; end - - # Checks whether this node body is a void context. - # Always `true` for `for`. - # - # @return [true] whether the `for` node body is a void context - # - # source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#27 - def void_context?; end -end - -# A node extension for `forward-args` nodes. This will be used in place -# of a plain node when the builder constructs the AST, making its methods -# available to all `forward-args` nodes within RuboCop. -# -# Not used with modern emitters: -# -# $ ruby-parse -e "def foo(...); end" -# (def :foo -# (args -# (forward-arg)) nil) -# $ ruby-parse --legacy -e "->(foo) { bar }" -# (def :foo -# (forward-args) nil) -# -# Note the extra 's' with legacy form. -# -# The main RuboCop runs in legacy mode; this node is only used -# if user `AST::Builder.modernize` or `AST::Builder.emit_lambda=true` -# -# source://rubocop-ast//lib/rubocop/ast/node/forward_args_node.rb#23 -class RuboCop::AST::ForwardArgsNode < ::RuboCop::AST::Node - include ::RuboCop::AST::CollectionNode - - # Node wraps itself in an array to be compatible with other - # enumerable argument types. - # - # source://rubocop-ast//lib/rubocop/ast/node/forward_args_node.rb#28 - def to_a; end -end - -# Common functionality for nodes that can be used as hash elements: -# `pair`, `kwsplat` -# -# source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#7 -module RuboCop::AST::HashElementNode - # Returns the delta between this element's delimiter and the argument's. - # - # @note Pairs with different delimiter styles return a delta of 0 - # @return [Integer] the delta between the two delimiters - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#61 - def delimiter_delta(other); end - - # Returns the key of this `hash` element. - # - # @note For keyword splats, this returns the whole node - # @return [Node] the key of the hash element - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#13 - def key; end - - # Returns the delta between this pair's key and the argument pair's. - # - # @note Keys on the same line always return a delta of 0 - # @note Keyword splats always return a delta of 0 for right alignment - # @param alignment [Symbol] whether to check the left or right side - # @return [Integer] the delta between the two keys - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#43 - def key_delta(other, alignment = T.unsafe(nil)); end - - # Checks whether this `hash` element is on the same line as `other`. - # - # @note A multiline element is considered to be on the same line if it - # shares any of its lines with `other` - # @return [Boolean] whether this element is on the same line as `other` - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#32 - def same_line?(other); end - - # Returns the value of this `hash` element. - # - # @note For keyword splats, this returns the whole node - # @return [Node] the value of the hash element - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#22 - def value; end - - # Returns the delta between this element's value and the argument's. - # - # @note Keyword splats always return a delta of 0 - # @return [Integer] the delta between the two values - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#52 - def value_delta(other); end -end - -# A helper class for comparing the positions of different parts of a -# `pair` node. -# -# source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#67 -class RuboCop::AST::HashElementNode::HashElementDelta - # @raise [ArgumentError] - # @return [HashElementDelta] a new instance of HashElementDelta - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#68 - def initialize(first, second); end - - # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#89 - def delimiter_delta; end - - # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#75 - def key_delta(alignment = T.unsafe(nil)); end - - # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#82 - def value_delta; end - - private - - # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#108 - def delta(first, second, alignment = T.unsafe(nil)); end - - # Returns the value of attribute first. - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#98 - def first; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#119 - def keyword_splat?; end - - # Returns the value of attribute second. - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#98 - def second; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#100 - def valid_argument_types?; end -end - -# A node extension for `hash` nodes. This will be used in place of a plain -# 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 -class RuboCop::AST::HashNode < ::RuboCop::AST::Node - # Checks whether the `hash` literal is delimited by curly braces. - # - # @return [Boolean] whether the `hash` literal is enclosed in braces - # - # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#117 - def braces?; end - - # Calls the given block for each `key` node in the `hash` literal. - # If no block is given, an `Enumerator` is returned. - # - # @note `kwsplat` nodes are ignored. - # @return [self] if a block is given - # @return [Enumerator] if no block is given - # - # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#59 - def each_key(&block); end - - # Calls the given block for each `pair` node in the `hash` literal. - # If no block is given, an `Enumerator` is returned. - # - # @note `kwsplat` nodes are ignored. - # @return [self] if a block is given - # @return [Enumerator] if no block is given - # - # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#33 - def each_pair; end - - # Calls the given block for each `value` node in the `hash` literal. - # If no block is given, an `Enumerator` is returned. - # - # @note `kwsplat` nodes are ignored. - # @return [self] if a block is given - # @return [Enumerator] if no block is given - # - # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#83 - def each_value(&block); end - - # Checks whether the `hash` node contains any `pair`- or `kwsplat` nodes. - # - # @return[Boolean] whether the `hash` is empty - # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#22 - def empty?; end - - # Returns an array of all the keys in the `hash` literal. - # - # @note `kwsplat` nodes are ignored. - # @return [Array] an array of keys in the `hash` literal - # - # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#48 - def keys; end - - # Checks whether this `hash` uses a mix of hash rocket and colon - # delimiters for its pairs. - # - # @note `kwsplat` nodes are ignored. - # @return [Boolean] whether the `hash` uses mixed delimiters - # - # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#110 - def mixed_delimiters?; end - - # Returns an array of all the key value pairs in the `hash` literal. - # - # ignored. - # - # @note this may be different from children as `kwsplat` nodes are - # @return [Array] an array of `pair` nodes - # - # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#15 - def pairs; end - - # Checks whether any of the key value pairs in the `hash` literal are on - # the same line. - # - # @note A multiline `pair` is considered to be on the same line if it - # shares any of its lines with another `pair` - # @note `kwsplat` nodes are ignored. - # @return [Boolean] whether any `pair` nodes are on the same line - # - # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#100 - def pairs_on_same_line?; end - - # Returns an array of all the values in the `hash` literal. - # - # @note `kwsplat` nodes are ignored. - # @return [Array] an array of values in the `hash` literal - # - # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#72 - def values; end -end - -# A node extension for `if` nodes. This will be used in place of a plain -# node when the builder constructs the AST, making its methods available -# to all `if` nodes within RuboCop. -# -# source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#8 -class RuboCop::AST::IfNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ConditionalNode - include ::RuboCop::AST::ModifierNode - - # Returns an array of all the branches in the conditional statement. - # - # @return [Array] an array of branch nodes - # - # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#154 - def branches; end - - # @deprecated Use `branches.each` - # - # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#171 - def each_branch(&block); end - - # Checks whether the `if` node has an `else` clause. - # - # @note This returns `true` for nodes containing an `elsif` clause. - # This is legacy behavior, and many cops rely on it. - # @return [Boolean] whether the node has an `else` clause - # - # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#49 - def else?; end - - # Returns the branch of the `if` node that gets evaluated when its - # condition is falsey. - # - # @note This is normalized for `unless` nodes. - # @return [Node] the falsey branch node of the `if` node - # @return [nil] when there is no else branch - # - # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#133 - def else_branch; end - - # Checks whether the `if` is an `elsif`. Parser handles these by nesting - # `if` nodes in the `else` branch. - # - # @return [Boolean] whether the node is an `elsif` - # - # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#39 - def elsif?; end - - # Checks whether the `if` node has at least one `elsif` branch. Returns - # true if this `if` node itself is an `elsif`. - # - # @return [Boolean] whether the `if` node has at least one `elsif` branch - # - # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#111 - def elsif_conditional?; end - - # Checks whether this node is an `if` statement. (This is not true of - # ternary operators and `unless` statements.) - # - # @return [Boolean] whether the node is an `if` statement - # - # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#16 - def if?; end - - # Returns the branch of the `if` node that gets evaluated when its - # condition is truthy. - # - # @note This is normalized for `unless` nodes. - # @return [Node] the truthy branch node of the `if` node - # @return [nil] if the truthy branch is empty - # - # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#122 - def if_branch; end - - # Returns the inverse keyword of the `if` node as a string. Returns `if` - # for `unless` nodes and vice versa. Returns an empty string for ternary - # operators. - # - # @return [String] the inverse keyword of the `if` statement - # - # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#73 - def inverse_keyword; end - - # Returns the keyword of the `if` statement as a string. Returns an empty - # string for ternary operators. - # - # @return [String] the keyword of the `if` statement - # - # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#64 - def keyword; end - - # Checks whether the `if` node is in a modifier form, i.e. a condition - # trailing behind an expression. Only `if` and `unless` nodes without - # other branches can be modifiers. - # - # @return [Boolean] whether the `if` node is a modifier - # - # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#87 - def modifier_form?; end - - # Checks whether the `if` node has nested `if` nodes in any of its - # branches. - # - # @note This performs a shallow search. - # @return [Boolean] whether the `if` node contains nested conditionals - # - # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#97 - def nested_conditional?; end - - # Custom destructuring method. This is used to normalize the branches - # for `if` and `unless` nodes, to aid comparisons and conversions. - # - # @return [Array] the different parts of the `if` statement - # - # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#141 - def node_parts; end - - # Checks whether the `if` node is a ternary operator. - # - # @return [Boolean] whether the `if` node is a ternary operator - # - # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#56 - def ternary?; end - - # Checks whether the `if` node has an `then` clause. - # - # @return [Boolean] whether the node has an `then` clause - # - # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#31 - def then?; end - - # Checks whether this node is an `unless` statement. (This is not true - # of ternary operators and `if` statements.) - # - # @return [Boolean] whether the node is an `unless` statement - # - # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#24 - def unless?; end -end - -# A node extension for `in` nodes. This will be used in place of a plain -# 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 -class RuboCop::AST::InPatternNode < ::RuboCop::AST::Node - # Returns the body of the `in` node. - # - # @return [Node, nil] the body of the `in` node - # - # source://rubocop-ast//lib/rubocop/ast/node/in_pattern_node.rb#33 - def body; end - - # Returns the index of the `in` branch within the `case` statement. - # - # @return [Integer] the index of the `in` branch - # - # source://rubocop-ast//lib/rubocop/ast/node/in_pattern_node.rb#19 - def branch_index; end - - # Returns a node of the pattern in the `in` branch. - # - # @return [Node] a pattern node - # - # source://rubocop-ast//lib/rubocop/ast/node/in_pattern_node.rb#12 - def pattern; end - - # Checks whether the `in` node has a `then` keyword. - # - # @return [Boolean] whether the `in` node has a `then` keyword - # - # source://rubocop-ast//lib/rubocop/ast/node/in_pattern_node.rb#26 - def then?; end -end - -# Used for modern support only! -# Not as thoroughly tested as legacy equivalent -# -# $ ruby-parse -e "foo[:bar]" -# (index -# (send nil :foo) -# (sym :bar)) -# $ ruby-parse --legacy -e "foo[:bar]" -# (send -# (send nil :foo) :[] -# (sym :bar)) -# -# The main RuboCop runs in legacy mode; this node is only used -# if user `AST::Builder.modernize` or `AST::Builder.emit_index=true` -# -# source://rubocop-ast//lib/rubocop/ast/node/index_node.rb#19 -class RuboCop::AST::IndexNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::ParameterizedNode::RestArguments - include ::RuboCop::AST::MethodIdentifierPredicates - include ::RuboCop::AST::MethodDispatchNode - - # For similarity with legacy mode - # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/index_node.rb#29 - def assignment_method?; end - - # For similarity with legacy mode - # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/index_node.rb#24 - def attribute_accessor?; end - - # For similarity with legacy mode - # - # source://rubocop-ast//lib/rubocop/ast/node/index_node.rb#34 - def method_name; end - - private - - # An array containing the arguments of the dispatched method. - # - # @return [Array] the arguments of the dispatched method - # - # source://rubocop-ast//lib/rubocop/ast/node/index_node.rb#43 - def first_argument_index; end -end - -# Used for modern support only! -# Not as thoroughly tested as legacy equivalent -# -# $ ruby-parse -e "foo[:bar] = :baz" -# (indexasgn -# (send nil :foo) -# (sym :bar) -# (sym :baz)) -# $ ruby-parse --legacy -e "foo[:bar] = :baz" -# (send -# (send nil :foo) :[]= -# (sym :bar) -# (sym :baz)) -# -# The main RuboCop runs in legacy mode; this node is only used -# if user `AST::Builder.modernize` or `AST::Builder.emit_index=true` -# -# source://rubocop-ast//lib/rubocop/ast/node/indexasgn_node.rb#21 -class RuboCop::AST::IndexasgnNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::ParameterizedNode::RestArguments - include ::RuboCop::AST::MethodIdentifierPredicates - include ::RuboCop::AST::MethodDispatchNode - - # For similarity with legacy mode - # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/indexasgn_node.rb#31 - def assignment_method?; end - - # For similarity with legacy mode - # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/indexasgn_node.rb#26 - def attribute_accessor?; end - - # For similarity with legacy mode - # - # source://rubocop-ast//lib/rubocop/ast/node/indexasgn_node.rb#36 - def method_name; end - - private - - # An array containing the arguments of the dispatched method. - # - # @return [Array] the arguments of the dispatched method - # - # source://rubocop-ast//lib/rubocop/ast/node/indexasgn_node.rb#45 - def first_argument_index; end -end - -# A node extension for `int` nodes. This will be used in place of a plain -# node when the builder constructs the AST, making its methods available to -# all `int` nodes within RuboCop. -# -# source://rubocop-ast//lib/rubocop/ast/node/int_node.rb#8 -class RuboCop::AST::IntNode < ::RuboCop::AST::Node - include ::RuboCop::AST::BasicLiteralNode - include ::RuboCop::AST::NumericNode -end - -# A node extension for `kwbegin` nodes. This will be used in place of a plain -# node when the builder constructs the AST, making its methods available -# to all `kwbegin` nodes within RuboCop. -# -# source://rubocop-ast//lib/rubocop/ast/node/keyword_begin_node.rb#8 -class RuboCop::AST::KeywordBeginNode < ::RuboCop::AST::Node - # Returns the body of the `kwbegin` block. Returns `self` if the `kwbegin` contains - # multiple nodes. - # - # @return [Node, nil] The body of the `kwbegin`. - # - # source://rubocop-ast//lib/rubocop/ast/node/keyword_begin_node.rb#13 - def body; end - - # Returns the `rescue` node of the `kwbegin` block, if one is present. - # - # @return [Node, nil] The `rescue` node within `kwbegin`. - # - # source://rubocop-ast//lib/rubocop/ast/node/keyword_begin_node.rb#30 - def ensure_node; end - - # Returns the `rescue` node of the `kwbegin` block, if one is present. - # - # @return [Node, nil] The `rescue` node within `kwbegin`. - # - # source://rubocop-ast//lib/rubocop/ast/node/keyword_begin_node.rb#37 - def rescue_node; end -end - -# A node extension for `kwsplat` and `forwarded_kwrestarg` nodes. This will be used in -# place of a plain node when the builder constructs the AST, making its methods available to -# all `kwsplat` and `forwarded_kwrestarg` nodes within RuboCop. -# -# source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#8 -class RuboCop::AST::KeywordSplatNode < ::RuboCop::AST::Node - include ::RuboCop::AST::HashElementNode - - # This is used for duck typing with `pair` nodes which also appear as - # `hash` elements. - # - # @return [false] - # - # source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#26 - def colon?; end - - # This is used for duck typing with `pair` nodes which also appear as - # `hash` elements. - # - # @return [false] - # - # source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#18 - def hash_rocket?; end - - # This provides `forwarded_kwrestarg` node to return true to be compatible with `kwsplat` node. - # - # @return [true] - # - # source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#48 - def kwsplat_type?; end - - # Custom destructuring method. This is used to normalize the branches - # for `pair` and `kwsplat` nodes, to add duck typing to `hash` elements. - # - # @return [Array] the different parts of the `kwsplat` - # - # source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#41 - def node_parts; end - - # Returns the operator for the `kwsplat` as a string. - # - # @return [String] the double splat operator - # - # source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#33 - def operator; end -end - -# source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#11 -RuboCop::AST::KeywordSplatNode::DOUBLE_SPLAT = T.let(T.unsafe(nil), String) - -# Used for modern support only: -# Not as thoroughly tested as legacy equivalent -# -# $ ruby-parse -e "->(foo) { bar }" -# (block -# (lambda) -# (args -# (arg :foo)) -# (send nil :bar)) -# $ ruby-parse --legacy -e "->(foo) { bar }" -# (block -# (send nil :lambda) -# (args -# (arg :foo)) -# (send nil :bar)) -# -# The main RuboCop runs in legacy mode; this node is only used -# if user `AST::Builder.modernize` or `AST::Builder.emit_lambda=true` -# -# source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#23 -class RuboCop::AST::LambdaNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::ParameterizedNode::RestArguments - include ::RuboCop::AST::MethodIdentifierPredicates - include ::RuboCop::AST::MethodDispatchNode - - # For similarity with legacy mode - # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#43 - def assignment_method?; end - - # For similarity with legacy mode - # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#38 - def attribute_accessor?; end - - # For similarity with legacy mode - # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#28 - def lambda?; end - - # For similarity with legacy mode - # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#33 - def lambda_literal?; end - - # For similarity with legacy mode - # - # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#53 - def method_name; end - - # For similarity with legacy mode - # - # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#48 - def receiver; end - - private - - # For similarity with legacy mode - # - # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#60 - def first_argument_index; end -end - -# A node extension for `masgn` nodes. -# 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/masgn_node.rb#8 -class RuboCop::AST::MasgnNode < ::RuboCop::AST::Node - # @return [Array] the assignment nodes of the multiple assignment - # - # source://rubocop-ast//lib/rubocop/ast/node/masgn_node.rb#16 - def assignments; end - - # The RHS (right hand side) of the multiple assignment. This returns - # the nodes as parsed: either a single node if the RHS has a single value, - # or an `array` node containing multiple nodes. - # - # NOTE: Due to how parsing works, `expression` will return the same for - # `a, b = x, y` and `a, b = [x, y]`. - # - # @return [Node] the right hand side of a multiple assignment. - # - # source://rubocop-ast//lib/rubocop/ast/node/masgn_node.rb#39 - def expression; end - - # @return [MlhsNode] the `mlhs` node - # - # source://rubocop-ast//lib/rubocop/ast/node/masgn_node.rb#10 - def lhs; end - - # @return [Array] names of all the variables being assigned - # - # source://rubocop-ast//lib/rubocop/ast/node/masgn_node.rb#21 - def names; end - - # The RHS (right hand side) of the multiple assignment. This returns - # the nodes as parsed: either a single node if the RHS has a single value, - # or an `array` node containing multiple nodes. - # - # NOTE: Due to how parsing works, `expression` will return the same for - # `a, b = x, y` and `a, b = [x, y]`. - # - # @return [Node] the right hand side of a multiple assignment. - # - # source://rubocop-ast//lib/rubocop/ast/node/masgn_node.rb#39 - def rhs; end - - # In contrast to `expression`, `values` always returns a Ruby array - # containing all the nodes being assigned on the RHS. - # - # Literal arrays are considered a singular value; but unlike `expression`, - # implied `array` nodes from assigning multiple values on the RHS are treated - # as separate. - # - # @return [Array] individual values being assigned on the RHS of the multiple assignment - # - # source://rubocop-ast//lib/rubocop/ast/node/masgn_node.rb#52 - def values; end - - private - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/masgn_node.rb#58 - def multiple_rhs?; end -end - -# Common functionality for nodes that are a kind of method dispatch: -# `send`, `csend`, `super`, `zsuper`, `yield`, `defined?`, -# and (modern only): `index`, `indexasgn`, `lambda` -# -# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#8 -module RuboCop::AST::MethodDispatchNode - include ::RuboCop::AST::MethodIdentifierPredicates - extend ::RuboCop::AST::NodePattern::Macros - - # Checks whether the dispatched method is an access modifier. - # - # @return [Boolean] whether the dispatched method is an access modifier - # - # 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#273 - def adjacent_def_modifier?(param0 = T.unsafe(nil)); end - - # Checks whether this node is an arithmetic operation - # - # @return [Boolean] whether the dispatched method is an arithmetic - # operation - # - # 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#107 - def assignment?; end - - # Checks whether the dispatched method is a bare access modifier that - # affects all methods defined after the macro. - # - # @return [Boolean] whether the dispatched method is a bare - # access modifier - # - # 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#278 - def bare_access_modifier_declaration?(param0 = T.unsafe(nil)); end - - # Checks whether this is a binary operation. - # - # @example - # - # foo + bar - # @return [Boolean] whether this method is a binary operation - # - # 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#167 - def block_literal?; end - - # The `block`, `numblock`, or `itblock` node associated with this method dispatch, if any. - # - # @return [BlockNode, nil] the `block`, `numblock`, or `itblock` node associated with this - # method call or `nil` - # - # 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 - # and has an implicit receiver. - # - # @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#100 - def command?(name); end - - # Checks whether the *explicit* receiver of this method dispatch is a - # `const` node. - # - # @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#152 - def const_receiver?; end - - # Checks if this node is part of a chain of `def` or `defs` modifiers. - # - # or `nil` if it isn't a def modifier - # - # @example - # - # 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#199 - def def_modifier(node = T.unsafe(nil)); end - - # Checks if this node is part of a chain of `def` or `defs` modifiers. - # - # See also `def_modifier` that returns the node or `nil` - # - # @example - # - # 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#187 - def def_modifier?(node = T.unsafe(nil)); end - - # Checks whether the dispatched method uses a dot to connect the - # receiver and the method name. - # - # This is useful for comparison operators, which can be called either - # with or without a dot, i.e. `foo == bar` or `foo.== bar`. - # - # @return [Boolean] whether the method was called with a connecting dot - # - # 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 - # receiver and the method name. - # - # @return [Boolean] whether the method was called with a connecting dot - # - # 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`, - # e.g. `foo.(bar)`. - # - # @return [Boolean] whether the method is the implicit form of `#call` - # - # 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#257 - def in_macro_scope?(param0 = T.unsafe(nil)); end - - # Checks whether this is a lambda. Some versions of parser parses - # non-literal lambdas as a method send. - # - # @return [Boolean] whether this method is a lambda - # - # 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.) - # - # @example - # - # -> (foo) { bar } - # @return [Boolean] whether this method is a lambda literal - # - # 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 - # is defined as a method that sits in a class, module, or block body and - # has an implicit receiver. - # - # @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#57 - def macro?; 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/mixin/method_dispatch_node.rb#27 - def method_name; end - - # Checks whether the dispatched method is a non-bare access modifier that - # affects only the method it receives. - # - # @return [Boolean] whether the dispatched method is a non-bare - # access modifier - # - # 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#283 - def non_bare_access_modifier_declaration?(param0 = T.unsafe(nil)); end - - # The receiving node of the method dispatch. - # - # @return [Node, nil] the receiver of the dispatched method or `nil` - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#20 - def receiver; end - - # Checks whether the dispatched method uses a safe navigation operator to - # connect the receiver and the method name. - # - # @return [Boolean] whether the method was called with a connecting dot - # - # 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#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#107 - def setter_method?; end - - # Checks whether the dispatched method is a bare `private` or `protected` - # access modifier that affects all methods defined after the macro. - # - # @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#91 - def special_modifier?; end - - # Checks whether this is a unary operation. - # - # @example - # - # -foo - # @return [Boolean] whether this method is a unary operation - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#235 - def unary_operation?; end -end - -# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#12 -RuboCop::AST::MethodDispatchNode::ARITHMETIC_OPERATORS = T.let(T.unsafe(nil), Array) - -# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#14 -RuboCop::AST::MethodDispatchNode::SPECIAL_MODIFIERS = T.let(T.unsafe(nil), Array) - -# Common predicates for nodes that reference method identifiers: -# `send`, `csend`, `def`, `defs`, `super`, `zsuper` -# -# @note this mixin expects `#method_name` and `#receiver` to be implemented -# -# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#9 -module RuboCop::AST::MethodIdentifierPredicates - # Checks whether the method is an assignment method. - # - # @return [Boolean] whether the method is an assignment - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#142 - def assignment_method?; end - - # Checks whether the method is a bang method. - # - # @return [Boolean] whether the method is a bang method - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#171 - def bang_method?; end - - # Checks whether the method is a camel case method, - # e.g. `Integer()`. - # - # @return [Boolean] whether the method is a camel case method - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#179 - def camel_case_method?; end - - # Checks whether the method is a comparison method. - # - # @return [Boolean] whether the method is a comparison - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#135 - def comparison_method?; end - - # Checks whether the *explicit* receiver of node is a `const` node. - # - # @return [Boolean] whether the receiver of this node is a `const` node - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#193 - def const_receiver?; end - - # Checks whether the method is an Enumerable method. - # - # @return [Boolean] whether the method is an Enumerable method - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#157 - def enumerable_method?; end - - # Checks whether the method is an enumerator method. - # - # @return [Boolean] whether the method is an enumerator - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#149 - def enumerator_method?; end - - # Checks whether the method name matches the argument. - # - # @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_identifier_predicates.rb#79 - def method?(name); end - - # Checks whether this is a negation method, i.e. `!` or keyword `not`. - # - # @return [Boolean] whether this method is a negation method - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#200 - def negation_method?; end - - # Checks whether the method is a nonmutating Array method. - # - # @return [Boolean] whether the method is a nonmutating Array method - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#114 - def nonmutating_array_method?; end - - # Checks whether the method is a nonmutating binary operator method. - # - # @return [Boolean] whether the method is a nonmutating binary operator method - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#93 - def nonmutating_binary_operator_method?; end - - # Checks whether the method is a nonmutating Hash method. - # - # @return [Boolean] whether the method is a nonmutating Hash method - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#121 - def nonmutating_hash_method?; end - - # Checks whether the method is a nonmutating operator method. - # - # @return [Boolean] whether the method is a nonmutating operator method - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#107 - def nonmutating_operator_method?; end - - # Checks whether the method is a nonmutating String method. - # - # @return [Boolean] whether the method is a nonmutating String method - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#128 - def nonmutating_string_method?; end - - # Checks whether the method is a nonmutating unary operator method. - # - # @return [Boolean] whether the method is a nonmutating unary operator method - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#100 - def nonmutating_unary_operator_method?; end - - # Checks whether the method is an operator method. - # - # @return [Boolean] whether the method is an operator - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#86 - def operator_method?; end - - # Checks whether the method is a predicate method. - # - # @return [Boolean] whether the method is a predicate method - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#164 - def predicate_method?; end - - # Checks whether this is a prefix bang method, e.g. `!foo`. - # - # @return [Boolean] whether this method is a prefix bang - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#214 - def prefix_bang?; end - - # Checks whether this is a prefix not method, e.g. `not foo`. - # - # @return [Boolean] whether this method is a prefix not - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#207 - def prefix_not?; end - - # Checks whether the *explicit* receiver of this node is `self`. - # - # @return [Boolean] whether the receiver of this node is `self` - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#186 - def self_receiver?; end -end - -# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#16 -RuboCop::AST::MethodIdentifierPredicates::ENUMERABLE_METHODS = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#10 -RuboCop::AST::MethodIdentifierPredicates::ENUMERATOR_METHODS = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#32 -RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_ARRAY_METHODS = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#24 -RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_BINARY_OPERATOR_METHODS = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#48 -RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_HASH_METHODS = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#28 -RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_OPERATOR_METHODS = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#59 -RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_STRING_METHODS = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#26 -RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_UNARY_OPERATOR_METHODS = T.let(T.unsafe(nil), Set) - -# http://phrogz.net/programmingruby/language.html#table_18.4 -# -# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#20 -RuboCop::AST::MethodIdentifierPredicates::OPERATOR_METHODS = T.let(T.unsafe(nil), Set) - -# A node extension for `mlhs` nodes. -# 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/mlhs_node.rb#8 -class RuboCop::AST::MlhsNode < ::RuboCop::AST::Node - # Returns all the assignment nodes on the left hand side (LHS) of a multiple assignment. - # These are generally assignment nodes (`lvasgn`, `ivasgn`, `cvasgn`, `gvasgn`, `casgn`) - # but can also be `send` nodes in case of `foo.bar, ... =` or `foo[:bar], ... =`, - # or a `splat` node for `*, ... =`. - # - # @return [Array] the assignment nodes of the multiple assignment LHS - # - # source://rubocop-ast//lib/rubocop/ast/node/mlhs_node.rb#15 - def assignments; end -end - -# Common functionality for nodes that can be used as modifiers: -# `if`, `while`, `until` -# -# source://rubocop-ast//lib/rubocop/ast/node/mixin/modifier_node.rb#7 -module RuboCop::AST::ModifierNode - # Checks whether the node is in a modifier form, i.e. a condition - # trailing behind an expression. - # - # @return [Boolean] whether the node is a modifier - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/modifier_node.rb#12 - def modifier_form?; end -end - -# A node extension for `module` nodes. This will be used in place of a -# 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 -class RuboCop::AST::ModuleNode < ::RuboCop::AST::Node - # The body of this `module` node. - # - # @return [Node, nil] the body of the module - # - # source://rubocop-ast//lib/rubocop/ast/node/module_node.rb#19 - def body; end - - # The identifier for this `module` node. - # - # @return [Node] the identifier of the module - # - # source://rubocop-ast//lib/rubocop/ast/node/module_node.rb#12 - def identifier; end -end - -# A node extension for `next` nodes. This will be used in place of a -# plain node when the builder constructs the AST, making its methods -# available to all `next` nodes within RuboCop. -# -# source://rubocop-ast//lib/rubocop/ast/node/next_node.rb#8 -class RuboCop::AST::NextNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::ParameterizedNode::WrappedArguments -end - -# `RuboCop::AST::Node` is a subclass of `Parser::AST::Node`. It provides -# access to parent nodes and an object-oriented way to traverse an AST with -# the power of `Enumerable`. -# -# It has predicate methods for every node type, like this: -# -# @example -# node.send_type? # Equivalent to: `node.type == :send` -# node.op_asgn_type? # Equivalent to: `node.type == :op_asgn` -# -# # Non-word characters (other than a-zA-Z0-9_) in type names are omitted. -# node.defined_type? # Equivalent to: `node.type == :defined?` -# -# # Find the first lvar node under the receiver node. -# lvar_node = node.each_descendant.find(&:lvar_type?) -# -# source://rubocop-ast//lib/rubocop/ast/node.rb#21 -class RuboCop::AST::Node < ::Parser::AST::Node - include ::RuboCop::AST::Sexp - include ::RuboCop::AST::Descendence - extend ::RuboCop::AST::NodePattern::Macros - - # @return [Node] a new instance of Node - # @see https://www.rubydoc.info/gems/ast/AST/Node:initialize - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#142 - def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def __ENCODING___type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def __FILE___type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def __LINE___type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def alias_type?; end - - # Returns an array of ancestor nodes. - # This is a shorthand for `node.each_ancestor.to_a`. - # - # @return [Array] an array of ancestor nodes - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#307 - def ancestors; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def and_asgn_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def and_type?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#532 - def any_block_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def arg_expr_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def arg_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def args_type?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#512 - def argument?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#516 - def argument_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def array_pattern_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def array_pattern_with_tail_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def array_type?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#464 - def assignment?; end - - # Some cops treat the shovel operator as a kind of assignment. - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#414 - def assignment_or_similar?(param0 = T.unsafe(nil)); end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def back_ref_type?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#468 - def basic_conditional?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#422 - def basic_literal?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def begin_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def block_pass_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def block_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def blockarg_expr_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def blockarg_type?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#520 - def boolean_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def break_type?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#504 - def call_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def case_match_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def case_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def casgn_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def cbase_type?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#508 - def chained?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#580 - def class_constructor?(param0 = T.unsafe(nil)); end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#598 - def class_definition?(param0 = T.unsafe(nil)); end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def class_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#204 - def complete!; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#209 - def complete?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def complex_type?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#472 - def conditional?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#353 - def const_name; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def const_pattern_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def const_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def csend_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def cvar_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def cvasgn_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def def_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#373 - def defined_module; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#378 - def defined_module_name; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def defined_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def defs_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def dstr_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def dsym_type?; end - - # Calls the given block for each ancestor node from parent to root. - # If no block is given, an `Enumerator` is returned. - # - # @overload each_ancestor - # @overload each_ancestor - # @overload each_ancestor - # @return [self] if a block is given - # @return [Enumerator] if no block is given - # @yieldparam node [Node] each ancestor node - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#295 - def each_ancestor(*types, &block); end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def eflipflop_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def empty_else_type?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#408 - def empty_source?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def ensure_type?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#456 - def equals_asgn?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def erange_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def false_type?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#430 - def falsey_literal?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def find_pattern_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#321 - def first_line; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def float_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def for_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def forward_arg_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def forward_args_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def forwarded_args_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def forwarded_kwrestarg_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def forwarded_restarg_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#577 - def global_const?(param0 = T.unsafe(nil), param1); end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#536 - def guard_clause?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def gvar_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def gvasgn_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def hash_pattern_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def hash_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def ident_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def if_guard_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def if_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def iflipflop_type?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#438 - def immutable_literal?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def in_match_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def in_pattern_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def index_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def indexasgn_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def int_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def irange_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def itarg_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def itblock_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def ivar_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def ivasgn_type?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#485 - def keyword?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def kwarg_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def kwargs_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def kwbegin_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def kwnilarg_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def kwoptarg_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def kwrestarg_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def kwsplat_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#571 - def lambda?(param0 = T.unsafe(nil)); end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#574 - def lambda_or_proc?(param0 = T.unsafe(nil)); end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def lambda_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#325 - def last_line; end - - # Use is discouraged, this is a potentially slow method and can lead - # to even slower algorithms - # - # @return [Node, nil] the left (aka previous) sibling - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#247 - def left_sibling; end - - # Use is discouraged, this is a potentially slow method and can lead - # to even slower algorithms - # - # @return [Array] the left (aka previous) siblings - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#257 - def left_siblings; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#329 - def line_count; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#418 - def literal?; end - - # Shortcut to safely check if a location is present - # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#544 - def loc?(which_loc); end - - # Shortcut to safely test a particular location, even if - # this location does not exist or is `nil` - # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#552 - def loc_is?(which_loc, str); end - - # NOTE: `loop { }` is a normal method call and thus not a loop keyword. - # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#481 - def loop_keyword?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def lvar_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def lvasgn_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def masgn_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def match_alt_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def match_as_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def match_current_line_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#559 - def match_guard_clause?(param0 = T.unsafe(nil)); end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def match_nil_pattern_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def match_pattern_p_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def match_pattern_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def match_rest_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def match_var_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def match_with_lvasgn_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def match_with_trailing_comma_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def mlhs_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#605 - def module_definition?(param0 = T.unsafe(nil)); end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def module_type?; end - - # Predicates - # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#400 - def multiline?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#434 - def mutable_literal?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#736 - def new_class_or_module_block?(param0 = T.unsafe(nil)); end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def next_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def nil_type?; end - - # Common destructuring method. This can be used to normalize - # destructuring for different variations of the node. - # Some node types override this with their own custom - # destructuring method. - # - # @return [Array] the different parts of the ndde - # - # source://ast/2.4.3/lib/ast/node.rb#56 - def node_parts; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#335 - def nonempty_line_count; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def not_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def nth_ref_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def numargs_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def numblock_type?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#524 - def numeric_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def objc_kwarg_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def objc_restarg_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def objc_varargs_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def op_asgn_type?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#496 - def operator_keyword?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def optarg_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def or_asgn_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def or_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def pair_type?; end - - # Returns the parent node, or `nil` if the receiver is a root node. - # - # @return [Node, nil] the parent node or `nil` - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#186 - def parent; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#195 - def parent?; end - - # Searching the AST - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#384 - def parent_module_name; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#500 - def parenthesized_call?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def pin_type?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#476 - def post_condition_loop?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def postexe_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def preexe_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#564 - def proc?(param0 = T.unsafe(nil)); end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def procarg0_type?; end - - # Some expressions are evaluated for their value, some for their side - # effects, and some for both. - # If we know that expressions are useful only for their return values, - # and have no side effects, that means we can reorder them, change the - # number of times they are evaluated, or replace them with other - # expressions which are equivalent in value. - # So, is evaluation of this node free of side effects? - # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#648 - def pure?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#528 - def range_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def rational_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#346 - def receiver(param0 = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#126 - def recursive_basic_literal?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#126 - def recursive_literal?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def redo_type?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#452 - def reference?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def regexp_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def regopt_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def resbody_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def rescue_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def restarg_expr_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def restarg_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def retry_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def return_type?; end - - # Use is discouraged, this is a potentially slow method and can lead - # to even slower algorithms - # - # @return [Node, nil] the right (aka next) sibling - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#238 - def right_sibling; end - - # Use is discouraged, this is a potentially slow method and can lead - # to even slower algorithms - # - # @return [Array] the right (aka next) siblings - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#266 - def right_siblings; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#200 - def root?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def sclass_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def self_type?; end - - # Most nodes are of 'send' type, so this method is defined - # separately to make this check as fast as possible. - # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#179 - def send_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def shadowarg_type?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#460 - def shorthand_asgn?; end - - # Returns the index of the receiver node in its siblings. (Sibling index - # uses zero based numbering.) - # Use is discouraged, this is a potentially slow method. - # - # @return [Integer, nil] the index of the receiver node in its siblings - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#231 - def sibling_index; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#404 - def single_line?; end - - # NOTE: Some rare nodes may have no source, like `s(:args)` in `foo {}` - # - # @return [String, nil] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#313 - def source; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#339 - def source_length; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#317 - def source_range; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#492 - def special_keyword?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def splat_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#351 - def str_content(param0 = T.unsafe(nil)); end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def str_type?; end - - # @deprecated Use `:class_constructor?` - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#593 - def struct_constructor?(param0 = T.unsafe(nil)); end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def super_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def sym_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def true_type?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#426 - def truthy_literal?; end - - # Determine if the node is one of several node types in a single query - # Allows specific single node types, as well as "grouped" types - # (e.g. `:boolean` for `:true` or `:false`) - # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#161 - def type?(*types); end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def undef_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def unless_guard_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def until_post_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def until_type?; end - - # Override `AST::Node#updated` so that `AST::Processor` does not try to - # mutate our ASTs. Since we keep references from children to parents and - # not just the other way around, we cannot update an AST and share - # identical subtrees. Rather, the entire AST must be copied any time any - # part of it is changed. - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#220 - def updated(type = T.unsafe(nil), children = T.unsafe(nil), properties = T.unsafe(nil)); end - - # Some expressions are evaluated for their value, some for their side - # effects, and some for both - # If we know that an expression is useful only for its side effects, that - # means we can transform it in ways which preserve the side effects, but - # change the return value - # So, does the return value of this node matter? If we changed it to - # `(...; nil)`, might that affect anything? - # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#618 - def value_used?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#448 - def variable?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def when_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def while_post_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def while_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def xstr_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def yield_type?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 - def zsuper_type?; end - - protected - - # source://rubocop-ast//lib/rubocop/ast/node.rb#190 - def parent=(node); end - - private - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#675 - def begin_value_used?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#686 - def case_if_value_used?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#364 - def defined_module0(param0 = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#680 - def for_value_used?; end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#722 - def parent_module_name_for_block(ancestor); end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#710 - def parent_module_name_for_sclass(sclass_node); end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#697 - def parent_module_name_part(node); end - - # source://rubocop-ast//lib/rubocop/ast/node.rb#666 - def visit_ancestors(types); end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node.rb#692 - def while_until_value_used?; end - - class << self - private - - # source://rubocop-ast//lib/rubocop/ast/node.rb#121 - def def_recursive_literal_predicate(kind); end - end -end - -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node.rb#55 -RuboCop::AST::Node::ASSIGNMENTS = T.let(T.unsafe(nil), Set) - -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node.rb#58 -RuboCop::AST::Node::BASIC_CONDITIONALS = T.let(T.unsafe(nil), Set) - -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node.rb#42 -RuboCop::AST::Node::BASIC_LITERALS = T.let(T.unsafe(nil), Set) - -# <=> isn't included here, because it doesn't return a boolean. -# -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node.rb#28 -RuboCop::AST::Node::COMPARISON_OPERATORS = T.let(T.unsafe(nil), Set) - -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node.rb#39 -RuboCop::AST::Node::COMPOSITE_LITERALS = T.let(T.unsafe(nil), Set) - -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node.rb#60 -RuboCop::AST::Node::CONDITIONALS = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node.rb#84 -RuboCop::AST::Node::EMPTY_CHILDREN = T.let(T.unsafe(nil), Array) - -# source://rubocop-ast//lib/rubocop/ast/node.rb#85 -RuboCop::AST::Node::EMPTY_PROPERTIES = T.let(T.unsafe(nil), Hash) - -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node.rb#50 -RuboCop::AST::Node::EQUALS_ASSIGNMENTS = T.let(T.unsafe(nil), Set) - -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node.rb#35 -RuboCop::AST::Node::FALSEY_LITERALS = T.let(T.unsafe(nil), Set) - -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node.rb#89 -RuboCop::AST::Node::GROUP_FOR_TYPE = T.let(T.unsafe(nil), Hash) - -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node.rb#47 -RuboCop::AST::Node::IMMUTABLE_LITERALS = T.let(T.unsafe(nil), Set) - -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node.rb#70 -RuboCop::AST::Node::KEYWORDS = T.let(T.unsafe(nil), Set) - -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node.rb#37 -RuboCop::AST::Node::LITERALS = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node.rb#80 -RuboCop::AST::Node::LITERAL_RECURSIVE_METHODS = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node.rb#81 -RuboCop::AST::Node::LITERAL_RECURSIVE_TYPES = T.let(T.unsafe(nil), Set) - -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node.rb#64 -RuboCop::AST::Node::LOOP_TYPES = T.let(T.unsafe(nil), Set) - -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node.rb#44 -RuboCop::AST::Node::MUTABLE_LITERALS = T.let(T.unsafe(nil), Set) - -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node.rb#76 -RuboCop::AST::Node::OPERATOR_KEYWORDS = T.let(T.unsafe(nil), Set) - -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node.rb#62 -RuboCop::AST::Node::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Set) - -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node.rb#68 -RuboCop::AST::Node::REFERENCES = T.let(T.unsafe(nil), Set) - -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node.rb#53 -RuboCop::AST::Node::SHORTHAND_ASSIGNMENTS = T.let(T.unsafe(nil), Set) - -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node.rb#78 -RuboCop::AST::Node::SPECIAL_KEYWORDS = T.let(T.unsafe(nil), Set) - -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node.rb#31 -RuboCop::AST::Node::TRUTHY_LITERALS = T.let(T.unsafe(nil), Set) - -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node.rb#66 -RuboCop::AST::Node::VARIABLES = T.let(T.unsafe(nil), Set) - -# This class performs a pattern-matching operation on an AST node. -# -# Detailed syntax: /docs/modules/ROOT/pages/node_pattern.adoc -# -# Initialize a new `NodePattern` with `NodePattern.new(pattern_string)`, then -# pass an AST node to `NodePattern#match`. Alternatively, use one of the class -# macros in `NodePattern::Macros` to define your own pattern-matching method. -# -# If the match fails, `nil` will be returned. If the match succeeds, the -# return value depends on whether a block was provided to `#match`, and -# whether the pattern contained any "captures" (values which are extracted -# from a matching AST.) -# -# - With block: #match yields the captures (if any) and passes the return -# value of the block through. -# - With no block, but one capture: the capture is returned. -# - With no block, but multiple captures: captures are returned as an array. -# - With no block and no captures: #match returns `true`. -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#5 -class RuboCop::AST::NodePattern - include ::RuboCop::AST::NodePattern::MethodDefiner - extend ::RuboCop::SimpleForwardable - - # @return [NodePattern] a new instance of NodePattern - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#77 - def initialize(str, compiler: T.unsafe(nil)); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#90 - def ==(other); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#107 - def as_json(_options = T.unsafe(nil)); end - - # Returns the value of attribute ast. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#73 - def ast; end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def captures(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#111 - def encode_with(coder); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#90 - def eql?(other); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#119 - def freeze; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#115 - def init_with(coder); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#103 - def marshal_dump; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#99 - def marshal_load(pattern); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#85 - def match(*args, **rest, &block); end - - # Returns the value of attribute match_code. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#73 - def match_code; end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def named_parameters(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute pattern. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#73 - def pattern; end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def positional_parameters(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#95 - def to_s; end - - class << self - # Yields its argument and any descendants, depth-first. - # - # @yield [element] - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#59 - def descend(element, &block); end - end -end - -# Responsible to build the AST nodes for `NodePattern` -# -# Doc on how this fits in the compiling process: -# /docs/modules/ROOT/pages/node_pattern.adoc -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#10 -class RuboCop::AST::NodePattern::Builder - # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#17 - def emit_atom(type, value); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#29 - def emit_call(type, selector, args = T.unsafe(nil)); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#11 - def emit_capture(capture_token, node); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#25 - def emit_list(type, _begin, children, _end); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#41 - def emit_subsequence(node_list); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#21 - def emit_unary_op(type, _operator = T.unsafe(nil), *children); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#34 - def emit_union(begin_t, pattern_lists, end_t); end - - private - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#53 - def n(type, *args); end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#49 - def optimizable_as_set?(children); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#57 - def union_children(pattern_lists); end -end - -# A NodePattern comment, simplified version of ::Parser::Source::Comment -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#7 -class RuboCop::AST::NodePattern::Comment - # @param range [Parser::Source::Range] - # @return [Comment] a new instance of Comment - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#14 - def initialize(range); end - - # Compares comments. Two comments are equal if they - # correspond to the same source range. - # - # @param other [Object] - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#31 - def ==(other); end - - # @return [String] a human-readable representation of this comment - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#39 - def inspect; end - - # Returns the value of attribute location. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#8 - def loc; end - - # Returns the value of attribute location. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#8 - def location; end - - # @return [String] - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#20 - def text; end -end - -# The top-level compiler holding the global state -# Defers work to its subcompilers -# -# Doc on how this fits in the compiling process: -# /docs/modules/ROOT/pages/node_pattern.adoc -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#11 -class RuboCop::AST::NodePattern::Compiler - extend ::RuboCop::SimpleForwardable - - # @return [Compiler] a new instance of Compiler - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#15 - def initialize; end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def bind(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute binding. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#13 - def binding; end - - # Returns the value of attribute captures. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#13 - def captures; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#42 - def compile_as_atom(node); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#46 - def compile_as_node_pattern(node, **options); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#50 - def compile_sequence(sequence, var:); end - - # Enumerates `enum` while keeping track of state across - # union branches (captures and unification). - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#38 - def each_union(enum, &block); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#74 - def freeze; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#31 - def named_parameter(name); end - - # Returns the value of attribute named_parameters. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#13 - def named_parameters; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#70 - def next_capture; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#54 - def parser; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#26 - def positional_parameter(number); end - - # Returns the value of attribute positional_parameters. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#13 - def positional_parameters; end - - # Utilities - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#60 - def with_temp_variables(*names, &block); end - - private - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#81 - def enforce_same_captures(enum); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#96 - def new_capture; end -end - -# Generates code that evaluates to a value (Ruby object) -# This value responds to `===`. -# -# Doc on how this fits in the compiling process: -# /docs/modules/ROOT/pages/node_pattern.adoc -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#12 -class RuboCop::AST::NodePattern::Compiler::AtomSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler - private - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#28 - def visit_const; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#32 - def visit_named_parameter; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#21 - def visit_number; end - - # Assumes other types are node patterns. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#46 - def visit_other_type; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#36 - def visit_positional_parameter; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#21 - def visit_regexp; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#40 - def visit_set; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#21 - def visit_string; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#21 - def visit_symbol; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#15 - def visit_unify; end -end - -# Holds the list of bound variable names -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#8 -class RuboCop::AST::NodePattern::Compiler::Binding - # @return [Binding] a new instance of Binding - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#9 - def initialize; end - - # Yields the first time a given name is bound - # - # @return [String] bound variable name - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#16 - def bind(name); end - - # Yields for each branch of the given union, forbidding unification of - # bindings which only appear in a subset of the union. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#31 - def union_bind(enum); end - - private - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#69 - def forbid(names); end -end - -# Variant of the Compiler with tracing information for nodes -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#10 -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://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def comments(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#128 - def named_parameters; end - - # Returns the value of attribute node_ids. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#33 - def node_ids; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#132 - def parser; end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def tokens(*_arg0, **_arg1, &_arg2); end -end - -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#36 -class RuboCop::AST::NodePattern::Compiler::Debug::Colorizer - # @api private - # @return [Colorizer] a new instance of Colorizer - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#96 - def initialize(pattern, compiler: T.unsafe(nil)); end - - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#94 - def compiler; end - - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#94 - def node_pattern; end - - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#94 - def pattern; end - - # @api private - # @return [Node] the Ruby AST - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#103 - def test(ruby, trace: T.unsafe(nil)); end - - private - - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#111 - def ruby_ast(ruby); end - - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#116 - def ruby_parser; end -end - -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#37 -RuboCop::AST::NodePattern::Compiler::Debug::Colorizer::COLOR_SCHEME = T.let(T.unsafe(nil), Hash) - -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#92 -RuboCop::AST::NodePattern::Compiler::Debug::Colorizer::Compiler = RuboCop::AST::NodePattern::Compiler::Debug - -# Result of a NodePattern run against a particular AST -# Consider constructor is private -# -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#46 -class RuboCop::AST::NodePattern::Compiler::Debug::Colorizer::Result < ::Struct - # @api private - # @return [Hash] a map for {character_position => color} - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#56 - def color_map(color_scheme = T.unsafe(nil)); end - - # @api private - # @return [String] a Rainbow colorized version of ruby - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#48 - def colorize(color_scheme = T.unsafe(nil)); end - - # Returns the value of attribute colorizer - # - # @return [Object] the current value of colorizer - def colorizer; end - - # Sets the attribute colorizer - # - # @param value [Object] the value to set the attribute colorizer to. - # @return [Object] the newly set value - def colorizer=(_); end - - # @api private - # @return [Hash] a map for {node => matched?}, depth-first - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#66 - def match_map; end - - # @api private - # @return [Boolean] a value of `Trace#matched?` or `:not_visitable` - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#74 - def matched?(node); end - - # Returns the value of attribute returned - # - # @return [Object] the current value of returned - def returned; end - - # Sets the attribute returned - # - # @param value [Object] the value to set the attribute returned to. - # @return [Object] the newly set value - def returned=(_); end - - # Returns the value of attribute ruby_ast - # - # @return [Object] the current value of ruby_ast - def ruby_ast; end - - # Sets the attribute ruby_ast - # - # @param value [Object] the value to set the attribute ruby_ast to. - # @return [Object] the newly set value - def ruby_ast=(_); end - - # Returns the value of attribute trace - # - # @return [Object] the current value of trace - def trace; end - - # Sets the attribute trace - # - # @param value [Object] the value to set the attribute trace to. - # @return [Object] the newly set value - def trace=(_); end - - private - - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#87 - def ast; end - - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#81 - def color_map_for(node, color); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#139 -module RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#140 - def do_compile; end - - private - - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#150 - def node_id; end - - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#146 - def tracer(kind); end -end - -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#156 -class RuboCop::AST::NodePattern::Compiler::Debug::NodePatternSubcompiler < ::RuboCop::AST::NodePattern::Compiler::NodePatternSubcompiler - include ::RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler -end - -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#161 -class RuboCop::AST::NodePattern::Compiler::Debug::SequenceSubcompiler < ::RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler - include ::RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler -end - -# Compiled node pattern requires a named parameter `trace`, -# which should be an instance of this class -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#13 -class RuboCop::AST::NodePattern::Compiler::Debug::Trace - # @return [Trace] a new instance of Trace - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#14 - def initialize; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#18 - def enter(node_id); end - - # return nil (not visited), false (not matched) or true (matched) - # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#28 - def matched?(node_id); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#23 - def success(node_id); end -end - -# Compiles code that evalues to true or false -# for a given value `var` (typically a RuboCop::AST::Node) -# or it's `node.type` if `seq_head` is true -# -# Doc on how this fits in the compiling process: -# /docs/modules/ROOT/pages/node_pattern.adoc -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#13 -class RuboCop::AST::NodePattern::Compiler::NodePatternSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler - # @return [NodePatternSubcompiler] a new instance of NodePatternSubcompiler - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#16 - def initialize(compiler, var: T.unsafe(nil), access: T.unsafe(nil), seq_head: T.unsafe(nil)); end - - # Returns the value of attribute access. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#14 - def access; end - - # Returns the value of attribute seq_head. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#14 - def seq_head; end - - private - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#119 - def access_element; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#123 - def access_node; end - - # @param [Array, nil] - # @return [String, nil] - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#113 - def compile_args(arg_list, first: T.unsafe(nil)); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#129 - def compile_guard_clause; end - - # Compiling helpers - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#107 - def compile_value_match(value); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#133 - def multiple_access(kind); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#30 - def visit_ascend; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#58 - def visit_capture; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#37 - def visit_descend; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#84 - def visit_function_call; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#73 - def visit_intersection; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#25 - def visit_negation; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#88 - def visit_node_type; end - - # Assumes other types are atoms. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#100 - def visit_other_type; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#80 - def visit_predicate; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#92 - def visit_sequence; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#49 - def visit_unify; end - - # Lists - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#64 - def visit_union; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#45 - def visit_wildcard; end -end - -# Compiles terms within a sequence to code that evalues to true or false. -# Compilation of the nodes that can match only a single term is deferred to -# `NodePatternSubcompiler`; only nodes that can match multiple terms are -# compiled here. -# Assumes the given `var` is a `::RuboCop::AST::Node` -# -# Doc on how this fits in the compiling process: -# /docs/modules/ROOT/pages/node_pattern.adoc -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#16 -class RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler - # Calls `compile_sequence`; the actual `compile` method - # will be used for the different terms of the sequence. - # The only case of re-entrant call to `compile` is `visit_capture` - # - # @return [SequenceSubcompiler] a new instance of SequenceSubcompiler - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#25 - def initialize(compiler, sequence:, var:); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#31 - def compile_sequence; end - - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#251 - def in_sync; end - - protected - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#226 - def compile_terms(children = T.unsafe(nil), last_arity = T.unsafe(nil)); end - - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#251 - def cur_index; end - - # yield `sync_code` iff not already in sync - # - # @yield [code] - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#242 - def sync; end - - 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 - def compile_and_advance(term); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#128 - def compile_any_order_branches(matched_var); end - - # @return [Array] Else code, and init code (if any) - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#137 - def compile_any_order_else; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#180 - def compile_captured_repetition(child_code, child_captures); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#119 - def compile_case(when_branches, else_code); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#361 - def compile_child_nb_guard(arity_range); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#319 - def compile_cur_index; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#325 - def compile_index(cur = T.unsafe(nil)); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#353 - def compile_loop(term); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#347 - def compile_loop_advance(to = T.unsafe(nil)); end - - # Assumes `@cur_index` is already updated - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#198 - def compile_matched(kind); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#304 - def compile_max_matched; end - - # @return [String] code that evaluates to `false` if the matched arity is too small - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#270 - def compile_min_check; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#285 - def compile_remaining; end - - # @return [Hash] of {subcompiler => code} - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#373 - def compile_union_forks; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#313 - def empty_loop; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#214 - def handle_prev; end - - # Modifies in place `forks` - # Syncs our state - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#400 - def merge_forks!(forks); end - - # Modifies in place `forks` to insure that `cur_{child|index}_var` are ok - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#384 - def preserve_union_start(forks); end - - # E.g. For sequence `(_ _? <_ _>)`, arities are: 1, 0..1, 2 - # and remaining arities are: 3..4, 2..3, 2..2, 0..0 - # - # @return [Array] total arities (as Ranges) of remaining children nodes - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#259 - def remaining_arities(children, last_arity); end - - # returns truthy iff `@cur_index` switched to relative from end mode (i.e. < 0) - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#341 - def use_index_from_end; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#88 - def visit_any_order; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#150 - def visit_capture; end - - # Single node patterns are all handled here - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#62 - def visit_other_type; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#78 - def visit_repetition; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#159 - def visit_rest; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#104 - def visit_union; end - - # NOTE: assumes `@cur_index != :seq_head`. Node types using `within_loop` must - # have `def in_sequence_head; :raise; end` - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#333 - def within_loop; end -end - -# Shift of 1 from standard Ruby indices -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#18 -RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler::DELTA = T.let(T.unsafe(nil), Integer) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#19 -RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler::POSITIVE = T.let(T.unsafe(nil), Proc) - -# Base class for subcompilers -# Implements visitor pattern -# -# Doc on how this fits in the compiling process: -# /docs/modules/ROOT/pages/node_pattern.adoc -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#12 -class RuboCop::AST::NodePattern::Compiler::Subcompiler - # @return [Subcompiler] a new instance of Subcompiler - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#15 - def initialize(compiler); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#20 - def compile(node); end - - # Returns the value of attribute compiler. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#13 - def compiler; end - - private - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#34 - def do_compile; end - - # Returns the value of attribute node. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#32 - def node; end - - class << self - # @private - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#47 - def inherited(base); end - - # @private - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#42 - def method_added(method); end - - # Returns the value of attribute registry. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#40 - def registry; end - end -end - -# source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#53 -class RuboCop::AST::NodePattern::Invalid < ::StandardError; end - -# Lexer class for `NodePattern` -# -# Doc on how this fits in the compiling process: -# /docs/modules/ROOT/pages/node_pattern.adoc -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#18 -class RuboCop::AST::NodePattern::Lexer < ::RuboCop::AST::NodePattern::LexerRex - # @return [Lexer] a new instance of Lexer - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#31 - def initialize(source); end - - # Returns the value of attribute comments. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#29 - def comments; end - - # Returns the value of attribute source_buffer. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#29 - def source_buffer; end - - # Returns the value of attribute tokens. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#29 - def tokens; end - - private - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#60 - def do_parse; end - - # @return [token] - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#40 - def emit(type); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#48 - def emit_comment; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#52 - def emit_regexp; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#64 - def token(type, value); end -end - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#19 -RuboCop::AST::NodePattern::Lexer::Error = RuboCop::AST::NodePattern::LexerRex::ScanError - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#21 -RuboCop::AST::NodePattern::Lexer::REGEXP_OPTIONS = T.let(T.unsafe(nil), Hash) - -# The generated lexer RuboCop::AST::NodePattern::LexerRex -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#23 -class RuboCop::AST::NodePattern::LexerRex - # Yields on the current action. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#69 - def action; end - - # The file name / path - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#43 - def filename; end - - # The file name / path - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#43 - def filename=(_arg0); end - - # The current location in the parse. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#103 - def location; end - - # The StringScanner for this lexer. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#48 - def match; end - - # The match groups for the current scan. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#60 - def matches; end - - # Lex the next token. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#112 - def next_token; end - - # Parse the given string. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#83 - def parse(str); end - - # Read in and parse the file at +path+. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#93 - def parse_file(path); end - - # The current scanner class. Must be overridden in subclasses. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#76 - def scanner_class; end - - # The StringScanner for this lexer. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#48 - def ss; end - - # The StringScanner for this lexer. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#48 - def ss=(_arg0); end - - # The current lexical state. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#53 - def state; end - - # The current lexical state. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#53 - def state=(_arg0); end -end - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#31 -RuboCop::AST::NodePattern::LexerRex::CALL = T.let(T.unsafe(nil), Regexp) - -# :stopdoc: -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#27 -RuboCop::AST::NodePattern::LexerRex::CONST_NAME = T.let(T.unsafe(nil), Regexp) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#29 -RuboCop::AST::NodePattern::LexerRex::IDENTIFIER = T.let(T.unsafe(nil), Regexp) - -# :startdoc: -# :stopdoc: -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#36 -class RuboCop::AST::NodePattern::LexerRex::LexerError < ::StandardError; end - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#30 -RuboCop::AST::NodePattern::LexerRex::NODE_TYPE = T.let(T.unsafe(nil), Regexp) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#33 -RuboCop::AST::NodePattern::LexerRex::REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#32 -RuboCop::AST::NodePattern::LexerRex::REGEXP_BODY = T.let(T.unsafe(nil), Regexp) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#28 -RuboCop::AST::NodePattern::LexerRex::SYMBOL_NAME = T.let(T.unsafe(nil), Regexp) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#37 -class RuboCop::AST::NodePattern::LexerRex::ScanError < ::RuboCop::AST::NodePattern::LexerRex::LexerError; end - -# Helpers for defining methods based on a pattern string -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#28 -module RuboCop::AST::NodePattern::Macros - # Define a method which applies a pattern to an AST node - # - # The new method will return nil if the node does not match. - # If the node matches, and a block is provided, the new method will - # yield to the block (passing any captures as block arguments). - # If the node matches, and no block is provided, the new method will - # return the captures, or `true` if there were none. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#36 - def def_node_matcher(method_name, pattern_str, **keyword_defaults); end - - # Define a method which recurses over the descendants of an AST node, - # checking whether any of them match the provided pattern - # - # If the method name ends with '?', the new method will return `true` - # as soon as it finds a descendant which matches. Otherwise, it will - # yield all descendants which match. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#46 - def def_node_search(method_name, pattern_str, **keyword_defaults); end -end - -# Functionality to turn `match_code` into methods/lambda -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#7 -module RuboCop::AST::NodePattern::MethodDefiner - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#37 - def as_lambda; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#27 - def compile_as_lambda; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#8 - def def_node_matcher(base, method_name, **defaults); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#21 - def def_node_search(base, method_name, **defaults); end - - private - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#139 - def compile_init; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#50 - def def_helper(base, method_name, **defaults); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#114 - def emit_keyword_list(forwarding: T.unsafe(nil)); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#132 - def emit_lambda_code; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#125 - def emit_method_code; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#63 - def emit_node_search(method_name); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#74 - def emit_node_search_body(method_name, prelude:, on_match:); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#110 - def emit_param_list; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#119 - def emit_params(*first, forwarding: T.unsafe(nil)); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#100 - def emit_retval; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#89 - def emit_yield_capture(when_no_capture = T.unsafe(nil), yield_with: T.unsafe(nil)); end - - # This method minimizes the closure for our method - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#44 - def wrapping_block(method_name, **defaults); end -end - -# Base class for AST Nodes of a `NodePattern` -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#7 -class RuboCop::AST::NodePattern::Node < ::Parser::AST::Node - include ::RuboCop::AST::Descendence - extend ::RuboCop::SimpleForwardable - - # Note: `arity.end` may be `Float::INFINITY` - # - # @return [Integer, Range] An Integer for fixed length terms, otherwise a Range. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#28 - def arity; end - - # @return [Range] arity as a Range - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#68 - def arity_range; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#22 - def capture?; end - - # @return [Node] most nodes have only one child - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#47 - def child; end - - # @return [Array] - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#42 - def children_nodes; end - - # @return [Array, nil] replace node with result, or `nil` if no change requested. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#33 - def in_sequence_head; end - - # that matches within a Set (e.g. `42`, `:sym` but not `/regexp/`) - # - # @return [Boolean] returns true for nodes having a Ruby literal equivalent - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#63 - def matches_within_set?; end - - # @return [Integer] nb of captures that this node will emit - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#52 - def nb_captures; end - - # To be overridden by subclasses - # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#18 - def rest?; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#77 - def source_range; end - - # @return [Boolean] returns whether it matches a variable number of elements - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#57 - def variadic?; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#73 - def with(type: T.unsafe(nil), children: T.unsafe(nil), location: T.unsafe(nil)); end -end - -# Node class for `` -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#179 -class RuboCop::AST::NodePattern::Node::AnyOrder < ::RuboCop::AST::NodePattern::Node - include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#197 - def arity; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#189 - def ends_with_rest?; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#193 - def rest_node; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#185 - def term_nodes; end -end - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#182 -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#96 -class RuboCop::AST::NodePattern::Node::Capture < ::RuboCop::AST::NodePattern::Node - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def arity(*_arg0, **_arg1, &_arg2); end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#100 - def capture?; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#108 - def in_sequence_head; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#104 - def nb_captures; end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def rest?(*_arg0, **_arg1, &_arg2); end -end - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#85 -module RuboCop::AST::NodePattern::Node::ForbidInSeqHead - # @raise [NodePattern::Invalid] - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#86 - def in_sequence_head; end -end - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#139 -RuboCop::AST::NodePattern::Node::FunctionCall = RuboCop::AST::NodePattern::Node::Predicate - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#81 -RuboCop::AST::NodePattern::Node::INT_TO_RANGE = T.let(T.unsafe(nil), Hash) - -# Registry -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#255 -RuboCop::AST::NodePattern::Node::MAP = T.let(T.unsafe(nil), Hash) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#11 -RuboCop::AST::NodePattern::Node::MATCHES_WITHIN_SET = T.let(T.unsafe(nil), Set) - -# Node class for `predicate?(:arg, :list)` -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#130 -class RuboCop::AST::NodePattern::Node::Predicate < ::RuboCop::AST::NodePattern::Node - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#135 - def arg_list; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#131 - def method_name; end -end - -# Node class for `int+` -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#142 -class RuboCop::AST::NodePattern::Node::Repetition < ::RuboCop::AST::NodePattern::Node - include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#155 - def arity; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#145 - def operator; end -end - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#149 -RuboCop::AST::NodePattern::Node::Repetition::ARITIES = T.let(T.unsafe(nil), Hash) - -# Node class for `...` -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#161 -class RuboCop::AST::NodePattern::Node::Rest < ::RuboCop::AST::NodePattern::Node - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#169 - def arity; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#173 - def in_sequence_head; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#165 - def rest?; end -end - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#162 -RuboCop::AST::NodePattern::Node::Rest::ARITY = T.let(T.unsafe(nil), Range) - -# Node class for `(type first second ...)` -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#117 -class RuboCop::AST::NodePattern::Node::Sequence < ::RuboCop::AST::NodePattern::Node - include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead - - # @return [Sequence] a new instance of Sequence - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#120 - def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end -end - -# A list (potentially empty) of nodes; part of a Union -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#205 -class RuboCop::AST::NodePattern::Node::Subsequence < ::RuboCop::AST::NodePattern::Node - include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#208 - def arity; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#213 - def in_sequence_head; end -end - -# Node class for `{ ... }` -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#223 -class RuboCop::AST::NodePattern::Node::Union < ::RuboCop::AST::NodePattern::Node - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#224 - def arity; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#231 - def in_sequence_head; end - - # Each child in a union must contain the same number - # of captures. Only one branch ends up capturing. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#249 - def nb_captures; end -end - -# Parser for NodePattern -# Note: class reopened in `parser.racc` -# -# 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 -class RuboCop::AST::NodePattern::Parser < ::Racc::Parser - extend ::RuboCop::SimpleForwardable - - # @return [Parser] a new instance of 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 - def _reduce_10(val, _values); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#337 - def _reduce_11(val, _values); end - - # reduce 12 omitted - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#343 - def _reduce_13(val, _values); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#347 - def _reduce_14(val, _values); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#351 - def _reduce_15(val, _values); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#355 - def _reduce_16(val, _values); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#359 - def _reduce_17(val, _values); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#363 - def _reduce_18(val, _values); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#367 - def _reduce_19(val, _values); end - - # reduce 1 omitted - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#301 - def _reduce_2(val, _values); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#371 - def _reduce_20(val, _values); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#375 - def _reduce_21(val, _values); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#379 - def _reduce_22(val, _values); end - - # reduce 24 omitted - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#387 - def _reduce_25(val, _values); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#393 - def _reduce_26(val, _values); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#305 - def _reduce_3(val, _values); end - - # reduce 32 omitted - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#413 - def _reduce_33(val, _values); end - - # reduce 36 omitted - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#423 - def _reduce_37(val, _values); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#427 - def _reduce_38(val, _values); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#431 - def _reduce_39(val, _values); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#309 - def _reduce_4(val, _values); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#435 - def _reduce_40(val, _values); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#439 - def _reduce_41(val, _values); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#443 - def _reduce_42(val, _values); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#447 - def _reduce_43(val, _values); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#451 - def _reduce_44(val, _values); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#455 - def _reduce_45(val, _values); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#459 - def _reduce_46(val, _values); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#313 - def _reduce_5(val, _values); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#317 - def _reduce_6(val, _values); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#321 - def _reduce_7(val, _values); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#325 - def _reduce_8(val, _values); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#329 - def _reduce_9(val, _values); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#463 - def _reduce_none(val, _values); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def emit_atom(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def emit_call(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def emit_capture(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def emit_list(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def emit_unary_op(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def emit_union(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#40 - def inspect; end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def next_token(*_arg0, **_arg1, &_arg2); end - - # (Similar API to `parser` gem) - # Parses a source and returns the AST. - # - # @param source_buffer [Parser::Source::Buffer, String] The source buffer to parse. - # @return [NodePattern::Node] - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#31 - def parse(source); end - - private - - # @raise [NodePattern::Invalid] - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#50 - def enforce_unary(node); end - - # Overrides Racc::Parser's method: - # - # @raise [NodePattern::Invalid] - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#59 - def on_error(token, val, _vstack); end -end - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#16 -RuboCop::AST::NodePattern::Parser::Builder = RuboCop::AST::NodePattern::Builder - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#17 -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 -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 -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 -class RuboCop::AST::NodePattern::Parser::WithMeta < ::RuboCop::AST::NodePattern::Parser - # Returns the value of attribute comments. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#98 - def comments; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#100 - def do_parse; end - - # Returns the value of attribute tokens. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#98 - def tokens; end -end - -# Overrides Builder to emit nodes with locations -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#39 -class RuboCop::AST::NodePattern::Parser::WithMeta::Builder < ::RuboCop::AST::NodePattern::Builder - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#40 - def emit_atom(type, token); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#61 - def emit_call(type, selector_t, args = T.unsafe(nil)); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#55 - def emit_list(type, begin_t, children, end_t); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#49 - def emit_unary_op(type, operator_t = T.unsafe(nil), *children); end - - private - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#81 - def join_exprs(left_expr, right_expr); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#75 - def loc(token_or_range); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#71 - def n(type, children, source_map); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#85 - def source_map(token_or_range, begin_t: T.unsafe(nil), end_t: T.unsafe(nil), operator_t: T.unsafe(nil), selector_t: T.unsafe(nil)); end -end - -# Overrides Lexer to token locations and comments -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#10 -class RuboCop::AST::NodePattern::Parser::WithMeta::Lexer < ::RuboCop::AST::NodePattern::Lexer - # @return [Lexer] a new instance of Lexer - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#13 - def initialize(str_or_buffer); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#27 - def emit_comment; end - - # @return [::Parser::Source::Range] last match's position - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#33 - def pos; end - - # Returns the value of attribute source_buffer. - # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#11 - def source_buffer; end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#23 - def token(type, value); end -end - -# Utility to assign a set of values to a constant -# -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#7 -module RuboCop::AST::NodePattern::Sets - class << self - # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#31 - def [](set); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#15 - def name(set); end - - # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#22 - def uniq(name); end - end -end - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#14 -RuboCop::AST::NodePattern::Sets::MAX = T.let(T.unsafe(nil), Integer) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#8 -RuboCop::AST::NodePattern::Sets::REGISTRY = T.let(T.unsafe(nil), Hash) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_0_1 = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_0_1_2 = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_10_10 = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_1_1 = T.let(T.unsafe(nil), Set) - -# 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_ANY_EMPTY_NONE = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -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_ARRAY_HASH = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_ATTR_READER_ATTR_WRITER_ATTR_ACCESSOR = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_ATTR_READER_ATTR_WRITER_ATTR_ACCESSOR_ATTR = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_BRANCH_REF_TAG = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_CALLER_CALLER_LOCATIONS = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_CAPTURE2_CAPTURE2E_CAPTURE3_ETC = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_CIPHER_DIGEST = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_CLASS_EVAL_INSTANCE_EVAL = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_CLASS_EVAL_MODULE_EVAL = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_CLASS_MODULE = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_CLASS_MODULE_STRUCT = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_CLONE_DUP_FREEZE = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_COUNT_LENGTH_SIZE = 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_DOWNCASE_UPCASE = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_EACH_WITH_INDEX_WITH_INDEX = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_EACH_WITH_OBJECT_WITH_OBJECT = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_ESCAPE_ENCODE_UNESCAPE_DECODE = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_EXIST_EXISTS = 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) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -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) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_FIRST_LAST__ETC = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_FIXNUM_BIGNUM = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_FLATTEN_FLATTEN = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_FORMAT_SPRINTF_PRINTF = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_GETHOSTBYADDR_GETHOSTBYNAME = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_GSUB_GSUB = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_GSUB_GSUB_SUB_SUB = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_IF_UNLESS = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_INCLUDE_EXTEND_PREPEND = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_INCLUDE_MEMBER = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_INCLUDE_PREPEND = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_INSTANCE_EVAL_CLASS_EVAL_MODULE_EVAL = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_INSTANCE_EXEC_CLASS_EXEC_MODULE_EXEC = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_INTEGER_BIGDECIMAL_COMPLEX_RATIONAL = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_IO_FILE = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_KEYS_VALUES = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_KEY_HAS_KEY_FETCH_ETC = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_LAMBDA_PROC = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_LAST_FIRST = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_LENGTH_SIZE = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_LOAD_RESTORE = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -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_MAP_FILTER_MAP = 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) - -# 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_MODULE_FUNCTION_RUBY2_KEYWORDS = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_NEW_ = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_NEW_COMPILE = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_NEW_OPEN = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_NIL_ = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_PIPELINE_PIPELINE_R_PIPELINE_RW_ETC = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_PRESENT_ANY_BLANK_ETC = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -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) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_PROP_CONST = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_PUBLIC_CONSTANT_PRIVATE_CONSTANT = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_PUBLIC_PROTECTED_PRIVATE_MODULE_FUNCTION = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_RAISE_FAIL = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_RAISE_FAIL_THROW_ETC = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_READ_BINREAD = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -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) - -# 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) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_SELECT_SELECT_FILTER_FILTER = 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_SET_SORTEDSET = 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_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_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) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_SPRINTF_FORMAT = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_START_WITH_END_WITH = T.let(T.unsafe(nil), Set) - -# 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_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_TO_ENUM_ENUM_FOR = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_TO_H_TO_HASH = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_TO_I_TO_F_TO_C_TO_R = 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_ZERO_POSITIVE_NEGATIVE = 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__AT_SLICE = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET__EQL_ = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET__EQUAL_EQL = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET__FETCH = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -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__PUSH_APPEND = 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___2 = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET___3 = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET___4 = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET___5 = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET___6 = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET___7 = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET___8 = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET___9 = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET___METHOD_____CALLEE__ = 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____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) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -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) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#55 -RuboCop::AST::NodePattern::VAR = T.let(T.unsafe(nil), String) - -# Common functionality for primitive numeric nodes: `int`, `float`, `rational`... -# -# source://rubocop-ast//lib/rubocop/ast/node/mixin/numeric_node.rb#6 -module RuboCop::AST::NumericNode - # Checks whether this is literal has a sign. - # - # @example - # - # +42 - # @return [Boolean] whether this literal has a sign. - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/numeric_node.rb#17 - def sign?; end -end - -# source://rubocop-ast//lib/rubocop/ast/node/mixin/numeric_node.rb#7 -RuboCop::AST::NumericNode::SIGN_REGEX = T.let(T.unsafe(nil), Regexp) - -# A node extension for `op_asgn` nodes. -# 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 -class RuboCop::AST::OpAsgnNode < ::RuboCop::AST::Node - # @return [AsgnNode] the assignment node - # - # source://rubocop-ast//lib/rubocop/ast/node/op_asgn_node.rb#10 - def assignment_node; end - - # The expression being assigned to the variable. - # - # @return [Node] the expression being assigned. - # - # source://rubocop-ast//lib/rubocop/ast/node/op_asgn_node.rb#32 - def expression; end - - # @return [AsgnNode] the assignment node - # - # source://rubocop-ast//lib/rubocop/ast/node/op_asgn_node.rb#10 - def lhs; end - - # The name of the variable being assigned as a symbol. - # - # @return [Symbol] the name of the variable being assigned - # - # source://rubocop-ast//lib/rubocop/ast/node/op_asgn_node.rb#18 - def name; end - - # The operator being used for assignment as a symbol. - # - # @return [Symbol] the assignment operator - # - # source://rubocop-ast//lib/rubocop/ast/node/op_asgn_node.rb#25 - def operator; end - - # The expression being assigned to the variable. - # - # @return [Node] the expression being assigned. - # - # source://rubocop-ast//lib/rubocop/ast/node/op_asgn_node.rb#32 - def rhs; end -end - -# A node extension for `op_asgn` nodes. -# 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 -class RuboCop::AST::OrAsgnNode < ::RuboCop::AST::OpAsgnNode - # The operator being used for assignment as a symbol. - # - # @return [Symbol] the assignment operator - # - # source://rubocop-ast//lib/rubocop/ast/node/or_asgn_node.rb#12 - def operator; end -end - -# A node extension for `or` nodes. This will be used in place of a plain -# node when the builder constructs the AST, making its methods available -# to all `or` nodes within RuboCop. -# -# source://rubocop-ast//lib/rubocop/ast/node/or_node.rb#8 -class RuboCop::AST::OrNode < ::RuboCop::AST::Node - include ::RuboCop::AST::BinaryOperatorNode - include ::RuboCop::AST::PredicateOperatorNode - - # Returns the alternate operator of the `or` as a string. - # Returns `or` for `||` and vice versa. - # - # @return [String] the alternate of the `or` operator - # - # source://rubocop-ast//lib/rubocop/ast/node/or_node.rb#16 - def alternate_operator; end - - # Returns the inverse keyword of the `or` node as a string. - # Returns `and` for `or` and `&&` for `||`. - # - # @return [String] the inverse of the `or` operator - # - # source://rubocop-ast//lib/rubocop/ast/node/or_node.rb#24 - def inverse_operator; end -end - -# A node extension for `pair` nodes. This will be used in place of a plain -# node when the builder constructs the AST, making its methods available -# to all `pair` nodes within RuboCop. -# -# source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#8 -class RuboCop::AST::PairNode < ::RuboCop::AST::Node - include ::RuboCop::AST::HashElementNode - - # Checks whether the `pair` uses a colon delimiter. - # - # @return [Boolean] whether this `pair` uses a colon delimiter - # - # source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#30 - def colon?; end - - # Returns the delimiter of the `pair` as a string. Returns `=>` for a - # colon delimited `pair` and `:` for a hash rocket delimited `pair`. - # - # @param with_spacing [Boolean] whether to include spacing - # @return [String] the delimiter of the `pair` - # - # source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#39 - def delimiter(*deprecated, with_spacing: T.unsafe(nil)); end - - # Checks whether the `pair` uses a hash rocket delimiter. - # - # @return [Boolean] whether this `pair` uses a hash rocket delimiter - # - # source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#23 - def hash_rocket?; end - - # Returns the inverse delimiter of the `pair` as a string. - # - # @param with_spacing [Boolean] whether to include spacing - # @return [String] the inverse delimiter of the `pair` - # - # source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#51 - def inverse_delimiter(*deprecated, with_spacing: T.unsafe(nil)); end - - # Checks whether the `pair` uses hash value omission. - # - # @return [Boolean] whether this `pair` uses hash value omission - # - # source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#69 - def value_omission?; end - - # Checks whether the value starts on its own line. - # - # @return [Boolean] whether the value in the `pair` starts its own line - # - # source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#62 - def value_on_new_line?; end -end - -# source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#15 -RuboCop::AST::PairNode::COLON = T.let(T.unsafe(nil), String) - -# source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#11 -RuboCop::AST::PairNode::HASH_ROCKET = T.let(T.unsafe(nil), String) - -# source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#17 -RuboCop::AST::PairNode::SPACED_COLON = T.let(T.unsafe(nil), String) - -# source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#13 -RuboCop::AST::PairNode::SPACED_HASH_ROCKET = T.let(T.unsafe(nil), String) - -# Requires implementing `arguments`. -# -# Common functionality for nodes that are parameterized: -# `send`, `super`, `zsuper`, `def`, `defs` -# and (modern only): `index`, `indexasgn`, `lambda` -# -# source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#10 -module RuboCop::AST::ParameterizedNode - # Checks whether this node has any arguments. - # - # @return [Boolean] whether this node has any arguments - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#40 - def arguments?; end - - # Whether the last argument of the node is a block pass, - # i.e. `&block`. - # - # @return [Boolean] whether the last argument of the node is a block pass - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#58 - def block_argument?; end - - # A shorthand for getting the first argument of the node. - # Equivalent to `arguments.first`. - # - # @return [Node, nil] the first argument of the node, - # or `nil` if there are no arguments - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#24 - def first_argument; end - - # A shorthand for getting the last argument of the node. - # Equivalent to `arguments.last`. - # - # @return [Node, nil] the last argument of the node, - # or `nil` if there are no arguments - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#33 - def last_argument; end - - # Checks whether this node's arguments are wrapped in parentheses. - # - # @return [Boolean] whether this node's arguments are - # wrapped in parentheses - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#15 - def parenthesized?; end - - # Checks whether any argument of the node is a splat - # argument, i.e. `*splat`. - # - # @return [Boolean] whether the node is a splat argument - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#48 - def rest_argument?; end - - # Checks whether any argument of the node is a splat - # argument, i.e. `*splat`. - # - # @return [Boolean] whether the node is a splat argument - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#48 - def splat_argument?; end -end - -# A specialized `ParameterizedNode`. -# Requires implementing `first_argument_index` -# Implements `arguments` as `children[first_argument_index..-1]` -# and optimizes other calls -# -# source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#83 -module RuboCop::AST::ParameterizedNode::RestArguments - include ::RuboCop::AST::ParameterizedNode - - # @return [Array] arguments, if any - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#89 - def arguments; end - - # Checks whether this node has any arguments. - # - # @return [Boolean] whether this node has any arguments - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#119 - def arguments?; end - - # A shorthand for getting the first argument of the node. - # Equivalent to `arguments.first`. - # - # @return [Node, nil] the first argument of the node, - # or `nil` if there are no arguments - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#103 - def first_argument; end - - # A shorthand for getting the last argument of the node. - # Equivalent to `arguments.last`. - # - # @return [Node, nil] the last argument of the node, - # or `nil` if there are no arguments - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#112 - def last_argument; end -end - -# source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#86 -RuboCop::AST::ParameterizedNode::RestArguments::EMPTY_ARGUMENTS = T.let(T.unsafe(nil), Array) - -# A specialized `ParameterizedNode` for node that have a single child -# containing either `nil`, an argument, or a `begin` node with all the -# arguments -# -# source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#66 -module RuboCop::AST::ParameterizedNode::WrappedArguments - include ::RuboCop::AST::ParameterizedNode - - # @return [Array] The arguments of the node. - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#69 - def arguments; end -end - -# Common functionality for nodes that are predicates: -# `or`, `and` ... -# -# source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#7 -module RuboCop::AST::PredicateOperatorNode - # Checks whether this is a logical operator. - # - # @return [Boolean] whether this is a logical operator - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#32 - def logical_operator?; end - - # Returns the operator as a string. - # - # @return [String] the operator - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#25 - def operator; end - - # Checks whether this is a semantic operator. - # - # @return [Boolean] whether this is a semantic operator - # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#39 - def semantic_operator?; end -end - -# source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#8 -RuboCop::AST::PredicateOperatorNode::LOGICAL_AND = T.let(T.unsafe(nil), String) - -# source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#17 -RuboCop::AST::PredicateOperatorNode::LOGICAL_OPERATORS = T.let(T.unsafe(nil), Array) - -# source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#12 -RuboCop::AST::PredicateOperatorNode::LOGICAL_OR = T.let(T.unsafe(nil), String) - -# source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#10 -RuboCop::AST::PredicateOperatorNode::SEMANTIC_AND = T.let(T.unsafe(nil), String) - -# source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#19 -RuboCop::AST::PredicateOperatorNode::SEMANTIC_OPERATORS = T.let(T.unsafe(nil), Array) - -# source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#14 -RuboCop::AST::PredicateOperatorNode::SEMANTIC_OR = T.let(T.unsafe(nil), String) - -# A `Prism` interface's class that provides a fixed `Prism::ParseLexResult` instead of parsing. -# -# This class implements the `parse_lex` method to return a preparsed `Prism::ParseLexResult` -# rather than parsing the source code. When the parse result is already available externally, -# such as in Ruby LSP, the Prism parsing process can be bypassed. -# -# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#12 -class RuboCop::AST::PrismPreparsed - # @return [PrismPreparsed] a new instance of PrismPreparsed - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#13 - def initialize(prism_result); end - - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#23 - def parse_lex(_source, **_prism_options); end -end - -# A node extension for `procarg0` nodes. -# 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 -class RuboCop::AST::Procarg0Node < ::RuboCop::AST::ArgNode - # Returns the name of an argument. - # - # @return [Symbol, nil] the name of the argument - # - # source://rubocop-ast//lib/rubocop/ast/node/procarg0_node.rb#12 - def name; end -end - -# ProcessedSource contains objects which are generated by Parser -# and other information such as disabled lines for cops. -# It also provides a convenient way to access source lines. -# -# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#31 -class RuboCop::AST::ProcessedSource - # @return [ProcessedSource] a new instance of ProcessedSource - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#49 - def initialize(source, ruby_version, path = T.unsafe(nil), parser_engine: T.unsafe(nil), prism_result: T.unsafe(nil)); end - - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#95 - def [](*args); end - - # Returns the value of attribute ast. - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#41 - def ast; end - - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#73 - def ast_with_comments; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#134 - def blank?; end - - # Returns the value of attribute buffer. - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#41 - def buffer; end - - # Raw source checksum for tracking infinite loops. - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#106 - def checksum; end - - # @return [Comment, nil] the comment at that line, if any. - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#139 - def comment_at_line(line); end - - # Consider using `each_comment_in_lines` instead - # - # @deprecated use contains_comment? - # @return [Boolean] if any of the lines in the given `source_range` has a comment. - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#161 - def commented?(source_range); end - - # Returns the value of attribute comments. - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#41 - def comments; end - - # Should have been called `comments_before_or_at_line`. Doubtful it has of any valid use. - # - # @deprecated Use `each_comment_in_lines` - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#169 - def comments_before_line(line); end - - # Consider using `each_comment_in_lines` instead - # - # @return [Boolean] if any of the lines in the given `source_range` has a comment. - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#161 - def contains_comment?(source_range); end - - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#183 - def current_line(token); end - - # Returns the value of attribute diagnostics. - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#41 - def diagnostics; end - - # @deprecated Use `comments.each` - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#111 - def each_comment(&block); end - - # Enumerates on the comments contained with the given `line_range` - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#149 - def each_comment_in_lines(line_range); end - - # @deprecated Use `tokens.each` - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#121 - def each_token(&block); end - - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#130 - def file_path; end - - # @deprecated Use `comment_at_line`, `each_comment_in_lines`, or `comments.find` - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#116 - def find_comment(&block); end - - # @deprecated Use `tokens.find` - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#126 - def find_token(&block); end - - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#204 - def first_token_of(range_or_node); end - - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#187 - def following_line(token); end - - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#208 - def last_token_of(range_or_node); end - - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#191 - def line_indentation(line_number); end - - # @return [Boolean] if the given line number has a comment. - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#144 - def line_with_comment?(line); end - - # Returns the source lines, line break characters removed, excluding a - # possible __END__ and everything that comes after. - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#81 - def lines; end - - # Returns the value of attribute parser_engine. - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#41 - def parser_engine; end - - # Returns the value of attribute parser_error. - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#41 - def parser_error; end - - # Returns the value of attribute path. - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#41 - def path; end - - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#179 - def preceding_line(token); end - - # Returns the value of attribute raw_source. - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#41 - def raw_source; end - - # Returns the value of attribute ruby_version. - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#41 - def ruby_version; end - - # The tokens list is always sorted by token position, except for cases when heredoc - # is passed as a method argument. In this case tokens are interleaved by - # heredoc contents' tokens. - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#215 - def sorted_tokens; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#173 - def start_with?(string); end - - # Returns the value of attribute tokens. - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#41 - def tokens; end - - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#198 - def tokens_within(range_or_node); end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#99 - def valid_syntax?; end - - private - - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#329 - def builder_class(parser_engine); end - - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#222 - def comment_index; end - - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#366 - def create_parser(ruby_version, parser_engine, prism_result); end - - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#400 - def first_token_index(range_or_node); end - - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#405 - def last_token_index(range_or_node); end - - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#228 - def parse(source, ruby_version, parser_engine, prism_result); end - - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#263 - def parser_class(ruby_version, parser_engine); end - - # Prism is a native extension, a `LoadError` will be raised if linked to an incompatible - # Ruby version. Only raise if it really was caused by Prism not being present. - # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#343 - def require_prism; end - - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#410 - def source_range(range_or_node); end - - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#247 - def tokenize(parser); end - - class << self - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#44 - def from_file(path, ruby_version, parser_engine: T.unsafe(nil)); end - end -end - -# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#35 -RuboCop::AST::ProcessedSource::INVALID_LEVELS = T.let(T.unsafe(nil), Array) - -# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#38 -RuboCop::AST::ProcessedSource::PARSER_ENGINES = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#33 -RuboCop::AST::ProcessedSource::STRING_SOURCE_NAME = T.let(T.unsafe(nil), String) - -# A node extension for `irange` and `erange` nodes. This will be used in -# place of a plain node when the builder constructs the AST, making its -# methods available to all `irange` and `erange` nodes within RuboCop. -# -# source://rubocop-ast//lib/rubocop/ast/node/range_node.rb#8 -class RuboCop::AST::RangeNode < ::RuboCop::AST::Node - # source://rubocop-ast//lib/rubocop/ast/node/range_node.rb#9 - def begin; end - - # source://rubocop-ast//lib/rubocop/ast/node/range_node.rb#13 - def end; end -end - -# A node extension for `rational` nodes. This will be used in place of a plain -# node when the builder constructs the AST, making its methods available to -# all `rational` nodes within RuboCop. -# -# source://rubocop-ast//lib/rubocop/ast/node/rational_node.rb#8 -class RuboCop::AST::RationalNode < ::RuboCop::AST::Node - include ::RuboCop::AST::BasicLiteralNode - include ::RuboCop::AST::NumericNode -end - -# A node extension for `regexp` nodes. This will be used in place of a plain -# node when the builder constructs the AST, making its methods available -# to all `regexp` nodes within RuboCop. -# -# source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#8 -class RuboCop::AST::RegexpNode < ::RuboCop::AST::Node - # @return [String] a string of regexp content - # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#37 - def content; end - - # @return [Bool] if char is one of the delimiters - # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#57 - def delimiter?(char); end - - # @return [String] the regexp delimiters (without %r) - # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#52 - def delimiters; end - - # @return [Bool] if regexp uses the extended regopt - # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#72 - def extended?; end - - # @return [Bool] if regexp uses the fixed-encoding regopt - # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#92 - def fixed_encoding?; end - - # @return [Bool] if regexp uses the ignore-case regopt - # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#77 - def ignore_case?; end - - # @return [Bool] if regexp contains interpolation - # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#62 - def interpolation?; end - - # @return [Bool] if regexp uses the multiline regopt - # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#67 - def multiline_mode?; end - - # @return [Bool] if regexp uses the no-encoding regopt - # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#87 - def no_encoding?; end - - # NOTE: The 'o' option is ignored. - # - # @return [Integer] the Regexp option bits as returned by Regexp#options - # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#32 - def options; end - - # @return [Bool] if the regexp is a %r{...} literal (using any delimiters) - # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#47 - def percent_r_literal?; end - - # @return [RuboCop::AST::Node] a regopt node - # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#25 - def regopt; end - - # @return [Bool] if regexp uses the single-interpolation regopt - # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#82 - def single_interpolation?; end - - # @return [Bool] if the regexp is a /.../ literal - # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#42 - def slash_literal?; end - - # @return [Regexp] a regexp of this node - # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#20 - def to_regexp; end - - private - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#98 - def regopt_include?(option); end -end - -# source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#9 -RuboCop::AST::RegexpNode::OPTIONS = T.let(T.unsafe(nil), Hash) - -# A node extension for `resbody` nodes. This will be used in place of a -# 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 -class RuboCop::AST::ResbodyNode < ::RuboCop::AST::Node - # Returns the body of the `rescue` clause. - # - # @return [Node, nil] The body of the `resbody`. - # - # source://rubocop-ast//lib/rubocop/ast/node/resbody_node.rb#12 - def body; end - - # Returns the index of the `resbody` branch within the exception handling statement. - # - # @return [Integer] the index of the `resbody` branch - # - # source://rubocop-ast//lib/rubocop/ast/node/resbody_node.rb#40 - def branch_index; end - - # Returns the exception variable of the `rescue` clause. - # - # @return [Node, nil] The exception variable of the `resbody`. - # - # source://rubocop-ast//lib/rubocop/ast/node/resbody_node.rb#33 - def exception_variable; end - - # Returns an array of all the exceptions in the `rescue` clause. - # - # @return [Array] an array of exception nodes - # - # source://rubocop-ast//lib/rubocop/ast/node/resbody_node.rb#19 - def exceptions; end -end - -# A node extension for `rescue` nodes. This will be used in place of a -# 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 -class RuboCop::AST::RescueNode < ::RuboCop::AST::Node - # Returns the body of the rescue node. - # - # @return [Node, nil] The body of the rescue node. - # - # source://rubocop-ast//lib/rubocop/ast/node/rescue_node.rb#12 - def body; end - - # Returns an array of all the rescue branches in the exception handling statement. - # - # and the else (if any). Note that these bodies could be nil. - # - # @return [Array] an array of the bodies of the rescue branches - # - # source://rubocop-ast//lib/rubocop/ast/node/rescue_node.rb#27 - def branches; end - - # Checks whether this exception handling statement has an `else` branch. - # - # @return [Boolean] whether the exception handling statement has an `else` branch - # - # source://rubocop-ast//lib/rubocop/ast/node/rescue_node.rb#44 - def else?; end - - # Returns the else branch of the exception handling statement, if any. - # - # @return [Node] the else branch node of the exception handling statement - # @return [nil] if the exception handling statement does not have an else branch. - # - # source://rubocop-ast//lib/rubocop/ast/node/rescue_node.rb#37 - def else_branch; end - - # Returns an array of all the rescue branches in the exception handling statement. - # - # @return [Array] an array of `resbody` nodes - # - # source://rubocop-ast//lib/rubocop/ast/node/rescue_node.rb#19 - def resbody_branches; end -end - -# A node extension for `return` nodes. This will be used in place of a -# plain node when the builder constructs the AST, making its methods -# available to all `return` nodes within RuboCop. -# -# source://rubocop-ast//lib/rubocop/ast/node/return_node.rb#8 -class RuboCop::AST::ReturnNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::ParameterizedNode::WrappedArguments -end - -# Responsible for compatibility with main gem -# -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/rubocop_compatibility.rb#8 -module RuboCop::AST::RuboCopCompatibility - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/rubocop_compatibility.rb#13 - def rubocop_loaded; end -end - -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/rubocop_compatibility.rb#9 -RuboCop::AST::RuboCopCompatibility::INCOMPATIBLE_COPS = T.let(T.unsafe(nil), Hash) - -# A node extension for `sclass` nodes. This will be used in place of a -# 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 -class RuboCop::AST::SelfClassNode < ::RuboCop::AST::Node - # The body of this `sclass` node. - # - # @return [Node, nil] the body of the class - # - # source://rubocop-ast//lib/rubocop/ast/node/self_class_node.rb#19 - def body; end - - # The identifier for this `sclass` node. (Always `self`.) - # - # @return [Node] the identifier of the class - # - # source://rubocop-ast//lib/rubocop/ast/node/self_class_node.rb#12 - def identifier; end -end - -# A node extension for `send` nodes. This will be used in place of a plain -# node when the builder constructs the AST, making its methods available -# to all `send` nodes within RuboCop. -# -# source://rubocop-ast//lib/rubocop/ast/node/send_node.rb#8 -class RuboCop::AST::SendNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::ParameterizedNode::RestArguments - include ::RuboCop::AST::MethodIdentifierPredicates - include ::RuboCop::AST::MethodDispatchNode - - # source://rubocop-ast//lib/rubocop/ast/node/send_node.rb#13 - def attribute_accessor?(param0 = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/send_node.rb#18 - def send_type?; end - - private - - # source://rubocop-ast//lib/rubocop/ast/node/send_node.rb#24 - def first_argument_index; end -end - -# This module provides a shorthand method to create a {Node} like -# `Parser::AST::Sexp`. -# -# @see https://www.rubydoc.info/gems/ast/AST/Sexp -# -# source://rubocop-ast//lib/rubocop/ast/sexp.rb#9 -module RuboCop::AST::Sexp - # Creates a {Node} with type `type` and children `children`. - # - # source://rubocop-ast//lib/rubocop/ast/sexp.rb#11 - def s(type, *children); end -end - -# A node extension for `str`, `dstr`, and `xstr` nodes. This will be used -# in place of a plain node when the builder constructs the AST, making -# its methods available to all `str` nodes within RuboCop. -# -# source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#8 -class RuboCop::AST::StrNode < ::RuboCop::AST::Node - include ::RuboCop::AST::BasicLiteralNode - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#26 - def character_literal?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#22 - def double_quoted?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#30 - def heredoc?; end - - # Checks whether the string literal is delimited by percent brackets. - # - # @overload percent_literal? - # @overload percent_literal? - # @param type [Symbol] an optional percent literal type - # @return [Boolean] whether the string is enclosed in percent brackets - # - # source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#45 - def percent_literal?(type = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#18 - def single_quoted?; end -end - -# source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#11 -RuboCop::AST::StrNode::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Hash) - -# A node extension for `super`- and `zsuper` nodes. This will be used in -# place of a plain node when the builder constructs the AST, making its -# methods available to all `super`- and `zsuper` nodes within RuboCop. -# -# source://rubocop-ast//lib/rubocop/ast/node/super_node.rb#8 -class RuboCop::AST::SuperNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::MethodIdentifierPredicates - include ::RuboCop::AST::MethodDispatchNode - - # source://ast/2.4.3/lib/ast/node.rb#56 - def arguments; end - - # Custom destructuring method. This can be used to normalize - # destructuring for different variations of the node. - # - # @return [Array] the different parts of the `super` node - # - # source://rubocop-ast//lib/rubocop/ast/node/super_node.rb#16 - def node_parts; end -end - -# A node extension for `sym` nodes. This will be used in place of a -# plain node when the builder constructs the AST, making its methods -# available to all `sym` nodes within RuboCop. -# -# source://rubocop-ast//lib/rubocop/ast/node/symbol_node.rb#8 -class RuboCop::AST::SymbolNode < ::RuboCop::AST::Node - include ::RuboCop::AST::BasicLiteralNode -end - -# A basic wrapper around Parser's tokens. -# -# source://rubocop-ast//lib/rubocop/ast/token.rb#6 -class RuboCop::AST::Token - # @return [Token] a new instance of Token - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#18 - def initialize(pos, type, text); end - - # source://rubocop-ast//lib/rubocop/ast/token.rb#33 - def begin_pos; end - - # source://rubocop-ast//lib/rubocop/ast/token.rb#29 - def column; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#102 - def comma?; end - - # Type Predicates - # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#58 - def comment?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#106 - def dot?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#118 - def end?; end - - # source://rubocop-ast//lib/rubocop/ast/token.rb#37 - def end_pos; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#122 - def equal_sign?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#66 - def left_array_bracket?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#82 - def left_brace?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#74 - def left_bracket?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#86 - def left_curly_brace?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#94 - def left_parens?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#70 - def left_ref_bracket?; end - - # source://rubocop-ast//lib/rubocop/ast/token.rb#25 - def line; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#126 - def new_line?; end - - # Returns the value of attribute pos. - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#10 - def pos; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#110 - def regexp_dots?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#114 - def rescue_modifier?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#78 - def right_bracket?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#90 - def right_curly_brace?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#98 - def right_parens?; end - - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#62 - def semicolon?; end - - # Checks if there is whitespace after token - # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#46 - def space_after?; end - - # Checks if there is whitespace before token - # - # @return [Boolean] - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#51 - def space_before?; end - - # Returns the value of attribute text. - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#10 - def text; end - - # source://rubocop-ast//lib/rubocop/ast/token.rb#41 - def to_s; end - - # Returns the value of attribute type. - # - # source://rubocop-ast//lib/rubocop/ast/token.rb#10 - def type; end - - class << self - # source://rubocop-ast//lib/rubocop/ast/token.rb#12 - def from_parser_token(parser_token); end - end -end - -# source://rubocop-ast//lib/rubocop/ast/token.rb#8 -RuboCop::AST::Token::LEFT_CURLY_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop-ast//lib/rubocop/ast/token.rb#7 -RuboCop::AST::Token::LEFT_PAREN_TYPES = T.let(T.unsafe(nil), Array) - -# Provides methods for traversing an AST. -# Does not transform an AST; for that, use Parser::AST::Processor. -# Override methods to perform custom processing. Remember to call `super` -# if you want to recursively process descendant nodes. -# -# source://rubocop-ast//lib/rubocop/ast/traversal.rb#9 -module RuboCop::AST::Traversal - extend ::RuboCop::AST::Traversal::CallbackCompiler - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#183 - def on_(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#132 - def on___ENCODING__(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#132 - def on___FILE__(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#132 - def on___LINE__(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_alias(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_and(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_and_asgn(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 - def on_arg(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#137 - def on_arg_expr(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_args(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_array(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_array_pattern(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_array_pattern_with_tail(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 - def on_back_ref(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_begin(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#160 - def on_block(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#138 - def on_block_pass(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 - def on_blockarg(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_break(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#148 - def on_case(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#148 - def on_case_match(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#155 - def on_casgn(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#132 - def on_cbase(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#156 - def on_class(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 - def on_complex(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#154 - def on_const(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_const_pattern(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#165 - def on_csend(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 - def on_cvar(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#140 - def on_cvasgn(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#157 - def on_def(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#137 - def on_defined?(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#163 - def on_defs(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_dstr(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_dsym(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_eflipflop(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#132 - def on_empty_else(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#148 - def on_ensure(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#148 - def on_erange(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#132 - def on_false(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_find_pattern(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 - def on_float(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#148 - def on_for(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#132 - def on_forward_arg(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#132 - def on_forward_args(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#132 - def on_forwarded_args(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#132 - def on_forwarded_kwrestarg(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#132 - def on_forwarded_restarg(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 - def on_gvar(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#140 - def on_gvasgn(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_hash(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_hash_pattern(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#159 - def on_if(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#137 - def on_if_guard(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_iflipflop(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_in_match(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#148 - def on_in_pattern(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_index(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_indexasgn(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 - def on_int(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#148 - def on_irange(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#162 - def on_itblock(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 - def on_ivar(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#140 - def on_ivasgn(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 - def on_kwarg(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_kwargs(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_kwbegin(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#132 - def on_kwnilarg(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#141 - def on_kwoptarg(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#133 - def on_kwrestarg(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#134 - def on_kwsplat(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#132 - def on_lambda(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 - def on_lvar(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#140 - def on_lvasgn(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_masgn(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_match_alt(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_match_as(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#137 - def on_match_current_line(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#132 - def on_match_nil_pattern(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#148 - def on_match_pattern(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#148 - def on_match_pattern_p(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#134 - def on_match_rest(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 - def on_match_var(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_match_with_lvasgn(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#137 - def on_match_with_trailing_comma(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_mlhs(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#142 - def on_module(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_mrasgn(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_next(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#132 - def on_nil(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#137 - def on_not(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 - def on_nth_ref(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#161 - def on_numblock(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#158 - def on_op_asgn(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#141 - def on_optarg(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_or(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_or_asgn(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_pair(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#137 - def on_pin(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#138 - def on_postexe(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#138 - def on_preexe(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_procarg0(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_rasgn(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 - def on_rational(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#132 - def on_redo(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_regexp(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#144 - def on_regopt(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#148 - def on_resbody(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#148 - def on_rescue(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#133 - def on_restarg(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#132 - def on_retry(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_return(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#142 - def on_sclass(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#132 - def on_self(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#165 - def on_send(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 - def on_shadowarg(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#134 - def on_splat(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 - def on_str(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_super(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 - def on_sym(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#132 - def on_true(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_undef(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#137 - def on_unless_guard(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#142 - def on_until(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_until_post(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#148 - def on_when(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#142 - def on_while(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_while_post(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_xstr(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 - def on_yield(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#132 - def on_zsuper(node); end - - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#17 - def walk(node); end -end - -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/traversal.rb#25 -module RuboCop::AST::Traversal::CallbackCompiler - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#54 - def body(child_node_types, expected_children_count); end - - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#68 - def children_count_check_code(range); end - - # @api private - # - # source://rubocop-ast//lib/rubocop/ast/traversal.rb#38 - def def_callback(type, *child_node_types, expected_children_count: T.unsafe(nil), body: T.unsafe(nil)); end -end - -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/traversal.rb#26 -RuboCop::AST::Traversal::CallbackCompiler::SEND = T.let(T.unsafe(nil), String) - -# How a particular child node should be visited. For example, if a child node -# can be nil it should be guarded behind a nil check. Or, if a child node is a literal -# (like a symbol) then the literal itself should not be visited. -# -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/traversal.rb#32 -RuboCop::AST::Traversal::CallbackCompiler::TEMPLATE = T.let(T.unsafe(nil), Hash) - -# Only for debugging. -# -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/traversal.rb#12 -class RuboCop::AST::Traversal::DebugError < ::RuntimeError; end - -# source://rubocop-ast//lib/rubocop/ast/traversal.rb#109 -RuboCop::AST::Traversal::NO_CHILD_NODES = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/traversal.rb#15 -RuboCop::AST::Traversal::TYPE_TO_METHOD = T.let(T.unsafe(nil), Hash) - -# A node extension for `until` nodes. This will be used in place of a plain -# node when the builder constructs the AST, making its methods available -# to all `until` nodes within RuboCop. -# -# source://rubocop-ast//lib/rubocop/ast/node/until_node.rb#8 -class RuboCop::AST::UntilNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ConditionalNode - include ::RuboCop::AST::ModifierNode - - # Checks whether the `until` node has a `do` keyword. - # - # @return [Boolean] whether the `until` node has a `do` keyword - # - # source://rubocop-ast//lib/rubocop/ast/node/until_node.rb#30 - def do?; end - - # Returns the inverse keyword of the `until` node as a string. - # Returns `while` for `until` nodes and vice versa. - # - # @return [String] the inverse keyword of the `until` statement - # - # source://rubocop-ast//lib/rubocop/ast/node/until_node.rb#23 - def inverse_keyword; end - - # Returns the keyword of the `until` statement as a string. - # - # @return [String] the keyword of the `until` statement - # - # source://rubocop-ast//lib/rubocop/ast/node/until_node.rb#15 - def keyword; end -end - -# A node extension for `lvar`, `ivar`, `cvar` and `gvar` nodes. -# 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/var_node.rb#8 -class RuboCop::AST::VarNode < ::RuboCop::AST::Node - # @return [Symbol] The name of the variable. - # - # source://rubocop-ast//lib/rubocop/ast/node/var_node.rb#10 - def name; end -end - -# source://rubocop-ast//lib/rubocop/ast/version.rb#5 -module RuboCop::AST::Version; end - -# source://rubocop-ast//lib/rubocop/ast/version.rb#6 -RuboCop::AST::Version::STRING = T.let(T.unsafe(nil), String) - -# A node extension for `when` nodes. This will be used in place of a plain -# 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 -class RuboCop::AST::WhenNode < ::RuboCop::AST::Node - # Returns the body of the `when` node. - # - # @return [Node, nil] the body of the `when` node - # - # source://rubocop-ast//lib/rubocop/ast/node/when_node.rb#42 - def body; end - - # Returns the index of the `when` branch within the `case` statement. - # - # @return [Integer] the index of the `when` branch - # - # source://rubocop-ast//lib/rubocop/ast/node/when_node.rb#28 - def branch_index; end - - # Returns an array of all the conditions in the `when` branch. - # - # @return [Array] an array of condition nodes - # - # source://rubocop-ast//lib/rubocop/ast/node/when_node.rb#12 - def conditions; end - - # @deprecated Use `conditions.each` - # - # source://rubocop-ast//lib/rubocop/ast/node/when_node.rb#17 - def each_condition(&block); end - - # Checks whether the `when` node has a `then` keyword. - # - # @return [Boolean] whether the `when` node has a `then` keyword - # - # source://rubocop-ast//lib/rubocop/ast/node/when_node.rb#35 - def then?; end -end - -# A node extension for `while` nodes. This will be used in place of a plain -# node when the builder constructs the AST, making its methods available -# to all `while` nodes within RuboCop. -# -# source://rubocop-ast//lib/rubocop/ast/node/while_node.rb#8 -class RuboCop::AST::WhileNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ConditionalNode - include ::RuboCop::AST::ModifierNode - - # Checks whether the `until` node has a `do` keyword. - # - # @return [Boolean] whether the `until` node has a `do` keyword - # - # source://rubocop-ast//lib/rubocop/ast/node/while_node.rb#30 - def do?; end - - # Returns the inverse keyword of the `while` node as a string. - # Returns `until` for `while` nodes and vice versa. - # - # @return [String] the inverse keyword of the `while` statement - # - # source://rubocop-ast//lib/rubocop/ast/node/while_node.rb#23 - def inverse_keyword; end - - # Returns the keyword of the `while` statement as a string. - # - # @return [String] the keyword of the `while` statement - # - # source://rubocop-ast//lib/rubocop/ast/node/while_node.rb#15 - def keyword; end -end - -# A node extension for `yield` nodes. This will be used in place of a plain -# node when the builder constructs the AST, making its methods available -# to all `yield` nodes within RuboCop. -# -# source://rubocop-ast//lib/rubocop/ast/node/yield_node.rb#8 -class RuboCop::AST::YieldNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::MethodIdentifierPredicates - include ::RuboCop::AST::MethodDispatchNode - - # source://ast/2.4.3/lib/ast/node.rb#56 - def arguments; end - - # Custom destructuring method. This can be used to normalize - # destructuring for different variations of the node. - # - # @return [Array] the different parts of the `send` node - # - # source://rubocop-ast//lib/rubocop/ast/node/yield_node.rb#16 - def node_parts; end -end - -class RuboCop::CommentConfig - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#34 - def initialize(processed_source); end - - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#63 - def comment_only_line?(line_number); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def config(*_arg0, **_arg1, &_arg2); end - - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#51 - def cop_disabled_line_ranges; end - - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#39 - def cop_enabled_at_line?(cop, line_number); end - - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#47 - def cop_opted_in?(cop); end - - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#55 - def extra_enabled_comments; end - - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#30 - def processed_source; end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def registry(*_arg0, **_arg1, &_arg2); end - - private - - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#96 - def analyze; end - - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#124 - def analyze_cop(analysis, directive); end - - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#144 - def analyze_disabled(analysis, directive); end - - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#155 - def analyze_rest(analysis, directive); end - - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#135 - def analyze_single_line(analysis, directive); end - - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#164 - def cop_line_ranges(analysis); end - - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#170 - def each_directive; end - - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#69 - def extra_enabled_comments_with_names(extras:, names:); end - - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#190 - def handle_enable_all(directive, names, extras); end - - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#204 - def handle_switch(directive, names, extras); end - - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#115 - def inject_disabled_cops_directives(analyses); end - - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#183 - def non_comment_token_line_numbers; end - - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#83 - def opt_in_cops; end - - # source://rubocop/1.74.0/lib/rubocop/comment_config.rb#179 - def qualified_cop_name(cop_name); end -end - -class RuboCop::Config - # source://rubocop/1.74.0/lib/rubocop/config.rb#31 - def initialize(hash = T.unsafe(nil), loaded_path = T.unsafe(nil)); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def [](*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def []=(*_arg0, **_arg1, &_arg2); end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#183 - def active_support_extensions_enabled?; end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#98 - def add_excludes_from_higher_level(highest_config); end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#210 - def allowed_camel_case_file?(file); end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#254 - def base_dir_for_path_parameters; end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#284 - def bundler_lock_file_path; end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#56 - def check; end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#151 - def clusivity_config_for_badge?(badge); end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#171 - def cop_enabled?(name); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def delete(*_arg0, **_arg1, &_arg2); end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#110 - def deprecation_check; end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def dig(*_arg0, **_arg1, &_arg2); end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#175 - def disabled_new_cops?; end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def each(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def each_key(*_arg0, **_arg1, &_arg2); end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#179 - def enabled_new_cops?; end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def fetch(*_arg0, **_arg1, &_arg2); end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#232 - def file_to_exclude?(file); end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#191 - def file_to_include?(file); end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#167 - def for_all_cops; end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#137 - def for_badge(badge); end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#124 - def for_cop(cop); end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#162 - def for_department(department_name); end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#131 - def for_enabled_cop(cop); end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#309 - def gem_versions_in_target; end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#313 - def inspect; end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#81 - def internal?; end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def key?(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def keys(*_arg0, **_arg1, &_arg2); end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#52 - def loaded_features; end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#21 - def loaded_path; end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#48 - def loaded_plugins; end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#86 - def make_excludes_absolute; end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def map(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def merge(*_arg0, **_arg1, &_arg2); end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#264 - def parser_engine; end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#245 - def path_relative_to_config(path); end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#241 - def patterns_to_exclude; end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#237 - def patterns_to_include; end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#295 - def pending_cops; end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#224 - def possibly_include_hidden?; end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def replace(*_arg0, **_arg1, &_arg2); end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#76 - def signature; end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#279 - def smart_loaded_path; end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#187 - def string_literals_frozen_by_default?; end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#268 - def target_rails_version; end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def target_ruby_version(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def to_h(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def to_hash(*_arg0, **_arg1, &_arg2); end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#72 - def to_s; end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def transform_values(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def validate(*_arg0, **_arg1, &_arg2); end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#63 - def validate_after_resolution; end - - private - - # source://rubocop/1.74.0/lib/rubocop/config.rb#363 - def department_of(qualified_cop_name); end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#351 - def enable_cop?(qualified_cop_name, cop_options); end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#338 - def gem_version_to_major_minor_float(gem_version); end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#344 - def read_gem_versions_from_target_lockfile; end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#325 - def read_rails_version_from_bundler_lock_file; end - - # source://rubocop/1.74.0/lib/rubocop/config.rb#320 - def target_rails_version_from_bundler_lock_file; end - - class << self - # source://rubocop/1.74.0/lib/rubocop/config.rb#23 - def create(hash, path, check: T.unsafe(nil)); end - end -end - -class RuboCop::ConfigValidator - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#28 - def initialize(config); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def for_all_cops(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def smart_loaded_path(*_arg0, **_arg1, &_arg2); end - - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#65 - def target_ruby_version; end - - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#34 - def validate; end - - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#61 - def validate_after_resolution; end - - private - - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#100 - def alert_about_unrecognized_cops(invalid_cop_names); end - - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#263 - def check_cop_config_value(hash, parent = T.unsafe(nil)); end - - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#73 - def check_obsoletions; end - - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#80 - def check_target_ruby; end - - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#204 - def each_invalid_parameter(cop_name); end - - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#116 - def list_unknown_cops(invalid_cop_names); end - - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#283 - def param_error_message(parent, key, value, supposed_values); end - - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#251 - def reject_conflicting_safe_settings; end - - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#242 - def reject_mutually_exclusive_defaults; end - - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#138 - def suggestion(name); end - - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#71 - def target_ruby; end - - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#216 - def validate_enforced_styles(valid_cop_names); end - - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#165 - def validate_new_cops_parameter; end - - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#190 - def validate_parameter_names(valid_cop_names); end - - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#176 - def validate_parameter_shape(valid_cop_names); end - - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#236 - def validate_support_and_has_list(name, formats, valid); end - - # source://rubocop/1.74.0/lib/rubocop/config_validator.rb#154 - def validate_syntax_cop; end -end - -# Similar to `Forwardable#def_delegators`, but simpler & faster -# -# source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#5 -module RuboCop::SimpleForwardable - # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#6 - def def_delegators(accessor, *methods); end -end diff --git a/sorbet/rbi/gems/rubocop-ast@1.50.0.rbi b/sorbet/rbi/gems/rubocop-ast@1.50.0.rbi new file mode 100644 index 0000000..1ddb25a --- /dev/null +++ b/sorbet/rbi/gems/rubocop-ast@1.50.0.rbi @@ -0,0 +1,7231 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop-ast` gem. +# Please instead update this file by running `bin/tapioca gem rubocop-ast`. + + +class Parser::Source::Range + include ::RuboCop::AST::Ext::Range +end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/ext/range.rb:3 +module RuboCop; end + +# ... +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/ext/range.rb:4 +module RuboCop::AST + extend ::RuboCop::AST::RuboCopCompatibility +end + +# A node extension for `alias` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `alias` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/alias_node.rb:8 +class RuboCop::AST::AliasNode < ::RuboCop::AST::Node + # Returns the new identifier as specified by the `alias`. + # + # @return [SymbolNode] the new identifier + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/alias_node.rb:19 + def new_identifier; end + + # Returns the old identifier as specified by the `alias`. + # + # @return [SymbolNode] the old identifier + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/alias_node.rb:12 + def old_identifier; end +end + +# A node extension for `op_asgn` nodes. +# 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. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/and_asgn_node.rb:8 +class RuboCop::AST::AndAsgnNode < ::RuboCop::AST::OpAsgnNode + # The operator being used for assignment as a symbol. + # + # @return [Symbol] the assignment operator + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/and_asgn_node.rb:12 + def operator; end +end + +# A node extension for `and` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `and` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/and_node.rb:8 +class RuboCop::AST::AndNode < ::RuboCop::AST::Node + include ::RuboCop::AST::BinaryOperatorNode + include ::RuboCop::AST::PredicateOperatorNode + + # Returns the alternate operator of the `and` as a string. + # Returns `and` for `&&` and vice versa. + # + # @return [String] the alternate of the `and` operator + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/and_node.rb:16 + def alternate_operator; end + + # Returns the inverse keyword of the `and` node as a string. + # Returns `||` for `&&` and `or` for `and`. + # + # @return [String] the inverse of the `and` operator + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/and_node.rb:24 + def inverse_operator; end +end + +# A node extension for `arg`, `optarg`, `restarg`, `kwarg`, `kwoptarg`, +# `kwrestarg`, `blockarg`, `shadowarg` and `forward_arg` nodes. +# 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. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/arg_node.rb:9 +class RuboCop::AST::ArgNode < ::RuboCop::AST::Node + # Checks whether the argument has a default value + # + # @return [Boolean] whether the argument has a default value + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/arg_node.rb:29 + def default?; end + + # Returns the default value of the argument, if any. + # + # @return [Node, nil] the default value of the argument + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/arg_node.rb:20 + def default_value; end + + # Returns the name of an argument. + # + # @return [Symbol, nil] the name of the argument + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/arg_node.rb:13 + def name; end +end + +# A node extension for `args` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `args` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/args_node.rb:8 +class RuboCop::AST::ArgsNode < ::RuboCop::AST::Node + include ::RuboCop::AST::CollectionNode + + # Yield each argument from the collection. + # Arguments can be inside `mlhs` nodes in the case of destructuring, so this + # flattens the collection to just `arg`, `optarg`, `restarg`, `kwarg`, + # `kwoptarg`, `kwrestarg`, `blockarg`, `forward_arg` and `shadowarg`. + # + # @return [Array] array of argument nodes. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/args_node.rb:34 + def argument_list; end + + # It returns true if arguments are empty and delimiters do not exist. + # @example: + # # true + # def x; end + # x { } + # -> {} + # + # # false + # def x(); end + # def x a; end + # x { || } + # -> () {} + # -> a {} + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/args_node.rb:24 + def empty_and_without_delimiters?; end +end + +# A node extension for `array` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `array` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/array_node.rb:8 +class RuboCop::AST::ArrayNode < ::RuboCop::AST::Node + # Checks whether the `array` literal is delimited by either percent or + # square brackets + # + # @return [Boolean] whether the array is enclosed in percent or square + # brackets + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/array_node.rb:64 + def bracketed?; end + + # Calls the given block for each `value` node in the `array` literal. + # If no block is given, an `Enumerator` is returned. + # + # @return [self] if a block is given + # @return [Enumerator] if no block is given + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/array_node.rb:25 + def each_value(&block); end + + # Checks whether the `array` literal is delimited by percent brackets. + # + # @overload percent_literal? + # Check for any percent literal. + # + # @overload percent_literal?(type) + # Check for percent literal of type `type`. + # + # @param type [Symbol] an optional percent literal type + # + # @return [Boolean] whether the array is enclosed in percent brackets + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/array_node.rb:51 + def percent_literal?(type = T.unsafe(nil)); end + + # Checks whether the `array` literal is delimited by square brackets. + # + # @return [Boolean] whether the array is enclosed in square brackets + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/array_node.rb:36 + def square_brackets?; end + + # Returns an array of all value nodes in the `array` literal. + # + # @return [Array] an array of value nodes + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/array_node.rb:18 + def values; end +end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/array_node.rb:9 +RuboCop::AST::ArrayNode::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Hash) + +# A node extension for `lvasgn`, `ivasgn`, `cvasgn`, and `gvasgn` nodes. +# 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. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/asgn_node.rb:8 +class RuboCop::AST::AsgnNode < ::RuboCop::AST::Node + # The expression being assigned to the variable. + # + # @return [Node] the expression being assigned. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/asgn_node.rb:20 + def expression; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/asgn_node.rb:15 + def lhs; end + + # The name of the variable being assigned as a symbol. + # + # @return [Symbol] the name of the variable being assigned + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/asgn_node.rb:12 + def name; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/asgn_node.rb:23 + def rhs; end +end + +# Common functionality for primitive literal nodes: `sym`, `str`, +# `int`, `float`, `rational`, `complex`... +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/basic_literal_node.rb:7 +module RuboCop::AST::BasicLiteralNode + # Returns the value of the literal. + # + # @return [mixed] the value of the literal + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/basic_literal_node.rb:11 + def value; end +end + +# Common functionality for nodes that are binary operations: +# `or`, `and` ... +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/binary_operator_node.rb:7 +module RuboCop::AST::BinaryOperatorNode + # Returns all of the conditions, including nested conditions, + # of the binary operation. + # + # @return [Array] the left and right hand side of the binary + # operation and the let and right hand side of any nested binary + # operators + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/binary_operator_node.rb:28 + def conditions; end + + # Returns the left hand side node of the binary operation. + # + # @return [Node] the left hand side of the binary operation + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/binary_operator_node.rb:11 + def lhs; end + + # Returns the right hand side node of the binary operation. + # + # @return [Node] the right hand side of the binary operation + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/binary_operator_node.rb:18 + def rhs; end +end + +# A node extension for `block` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `send` nodes within RuboCop. +# +# A `block` node is essentially a method send with a block. Parser nests +# the `send` node inside the `block` node. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:11 +class RuboCop::AST::BlockNode < ::RuboCop::AST::Node + include ::RuboCop::AST::MethodIdentifierPredicates + + # Returns a collection of all descendants of this node that are + # argument type nodes. See `ArgsNode#argument_list` for details. + # + # @return [Array] + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:62 + def argument_list; end + + # The arguments of this block. + # Note that if the block has destructured arguments, `arguments` will + # return a `mlhs` node, whereas `argument_list` will return only + # actual argument nodes. + # + # @return [Array] + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:50 + def arguments; end + + # Checks whether this block takes any arguments. + # + # @return [Boolean] whether this `block` node takes any arguments + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:89 + def arguments?; end + + # The body of this block. + # + # @return [Node, nil] the body of the `block` node or `nil` + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:75 + def body; end + + # Checks whether the `block` literal is delimited by curly braces. + # + # @return [Boolean] whether the `block` literal is enclosed in braces + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:96 + def braces?; end + + # The closing delimiter for this `block` literal. + # + # @return [String] the closing delimiter for the `block` literal + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:124 + def closing_delimiter; end + + # The delimiters for this `block` literal. + # + # @return [Array] the delimiters for the `block` literal + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:110 + 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 + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:31 + 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` + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:103 + def keywords?; end + + # Checks whether this `block` literal belongs to a lambda. + # + # @return [Boolean] whether the `block` literal belongs to a lambda + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:147 + 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 + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:40 + def last_argument; end + + # The name of the dispatched method as a symbol. + # + # @return [Symbol] the name of the dispatched method + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:82 + def method_name; end + + # Checks whether this is a multiline block. This is overridden here + # because the general version in `Node` does not work for `block` nodes. + # + # @return [Boolean] whether the `block` literal is on a several lines + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:140 + def multiline?; end + + # The opening delimiter for this `block` literal. + # + # @return [String] the opening delimiter for the `block` literal + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:117 + def opening_delimiter; end + + # The `send` node associated with this block. + # + # @return [SendNode] the `send` node associated with the `block` node + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:22 + def send_node; end + + # Checks whether this is a single line block. This is overridden here + # because the general version in `Node` does not work for `block` nodes. + # + # @return [Boolean] whether the `block` literal is on a single line + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:132 + def single_line?; end + + # Checks whether this node body is a void context. + # + # @return [Boolean] whether the `block` node body is a void context + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:154 + def void_context?; end + + private + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:160 + def numbered_arguments; end +end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:14 +RuboCop::AST::BlockNode::IT_BLOCK_ARGUMENT = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/block_node.rb:16 +RuboCop::AST::BlockNode::VOID_CONTEXT_METHODS = T.let(T.unsafe(nil), Array) + +# A node extension for `break` nodes. This will be used in place of a +# plain node when the builder constructs the AST, making its methods +# available to all `break` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/break_node.rb:8 +class RuboCop::AST::BreakNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::ParameterizedNode::WrappedArguments +end + +# `RuboCop::AST::Builder` is an AST builder that is utilized to let `Parser` +# generate ASTs with {RuboCop::AST::Node}. +# +# @example +# buffer = Parser::Source::Buffer.new('(string)') +# buffer.source = 'puts :foo' +# +# builder = RuboCop::AST::Builder.new +# require 'parser/ruby25' +# parser = Parser::Ruby25.new(builder) +# root_node = parser.parse(buffer) +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/builder.rb:129 +class RuboCop::AST::Builder < ::Parser::Builders::Default + include ::RuboCop::AST::BuilderExtensions +end + +# Common functionality between the parser and prism builder +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/builder.rb:7 +module RuboCop::AST::BuilderExtensions + # Generates {Node} from the given information. + # + # @return [Node] the generated node + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/builder.rb:101 + def n(type, children, source_map); end + + # Overwrite the base method to allow strings with invalid encoding + # More details here https://github.com/whitequark/parser/issues/283 + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/builder.rb:107 + def string_value(token); end + + private + + # pkg:gem/rubocop-ast#lib/rubocop/ast/builder.rb:113 + def node_klass(type); end + + class << self + # pkg:gem/rubocop-ast#lib/rubocop/ast/builder.rb:8 + def included(base); end + end +end + +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/builder.rb:14 +RuboCop::AST::BuilderExtensions::NODE_MAP = T.let(T.unsafe(nil), Hash) + +# A parser builder, based on the one provided by prism, +# which is capable of emitting AST for more recent Rubies. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/builder_prism.rb:7 +class RuboCop::AST::BuilderPrism < ::Prism::Translation::Parser::Builder + include ::RuboCop::AST::BuilderExtensions +end + +# A node extension for `case_match` nodes. This will be used in place of +# a plain node when the builder constructs the AST, making its methods +# available to all `case_match` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/case_match_node.rb:8 +class RuboCop::AST::CaseMatchNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ConditionalNode + + # Returns an array of all the when branches in the `case` statement. + # + # @return [Array] an array of the bodies of the `in` branches + # and the `else` (if any). Note that these bodies could be nil. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/case_match_node.rb:38 + def branches; end + + # @deprecated Use `in_pattern_branches.each` + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/case_match_node.rb:19 + def each_in_pattern(&block); end + + # Checks whether this case statement has an `else` branch. + # + # @return [Boolean] whether the `case` statement has an `else` branch + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/case_match_node.rb:59 + def else?; end + + # Returns the else branch of the `case` statement, if any. + # + # @return [Node] the else branch node of the `case` statement + # @return [EmptyElse] the empty else branch node of the `case` statement + # @return [nil] if the case statement does not have an else branch. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/case_match_node.rb:52 + def else_branch; end + + # Returns an array of all the `in` pattern branches in the `case` statement. + # + # @return [Array] an array of `in_pattern` nodes + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/case_match_node.rb:30 + def in_pattern_branches; end + + # Returns the keyword of the `case` statement as a string. + # + # @return [String] the keyword of the `case` statement + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/case_match_node.rb:14 + def keyword; end +end + +# A node extension for `case` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `case` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/case_node.rb:8 +class RuboCop::AST::CaseNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ConditionalNode + + # Returns an array of all the when branches in the `case` statement. + # + # @return [Array] an array of the bodies of the when branches + # and the else (if any). Note that these bodies could be nil. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/case_node.rb:38 + def branches; end + + # @deprecated Use `when_branches.each` + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/case_node.rb:19 + def each_when(&block); end + + # Checks whether this case statement has an `else` branch. + # + # @return [Boolean] whether the `case` statement has an `else` branch + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/case_node.rb:55 + def else?; end + + # Returns the else branch of the `case` statement, if any. + # + # @return [Node] the else branch node of the `case` statement + # @return [nil] if the case statement does not have an else branch. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/case_node.rb:48 + def else_branch; end + + # Returns the keyword of the `case` statement as a string. + # + # @return [String] the keyword of the `case` statement + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/case_node.rb:14 + def keyword; end + + # Returns an array of all the when branches in the `case` statement. + # + # @return [Array] an array of `when` nodes + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/case_node.rb:30 + def when_branches; end +end + +# A node extension for `casgn` nodes. +# 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. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/casgn_node.rb:8 +class RuboCop::AST::CasgnNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ConstantNode + + # The expression being assigned to the variable. + # + # @return [Node] the expression being assigned. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/casgn_node.rb:17 + def expression; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/casgn_node.rb:12 + def lhs; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/casgn_node.rb:11 + def name; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/casgn_node.rb:20 + def rhs; end +end + +# A node extension for `class` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `class` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/class_node.rb:8 +class RuboCop::AST::ClassNode < ::RuboCop::AST::Node + # The body of this `class` node. + # + # @return [Node, nil] the body of the class + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/class_node.rb:26 + def body; end + + # The identifier for this `class` node. + # + # @return [Node] the identifier of the class + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/class_node.rb:12 + def identifier; end + + # The parent class for this `class` node. + # + # @return [Node, nil] the parent class of the class + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/class_node.rb:19 + def parent_class; end +end + +# A mixin that helps give collection nodes array polymorphism. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:6 +module RuboCop::AST::CollectionNode + extend ::RuboCop::SimpleForwardable + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def &(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def *(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def +(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def -(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def <<(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def [](*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def []=(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def all?(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def any?(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def append(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def assoc(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def at(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def bsearch(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def bsearch_index(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def chain(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def chunk(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def chunk_while(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def clear(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def collect(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def collect!(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def collect_concat(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def combination(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def compact(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def compact!(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def concat(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def count(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def cycle(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def deconstruct(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def delete(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def delete_at(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def delete_if(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def detect(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def difference(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def dig(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def drop(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def drop_while(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def each(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def each_cons(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def each_entry(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def each_index(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def each_slice(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def each_with_index(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def each_with_object(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def empty?(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def entries(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def fetch(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def fetch_values(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def fill(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def filter(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def filter!(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def filter_map(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def find(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def find_all(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def find_index(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def first(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def flat_map(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def flatten(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def flatten!(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def grep(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def grep_v(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def group_by(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def include?(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def index(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def inject(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def insert(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def intersect?(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def intersection(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def join(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def keep_if(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def last(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def lazy(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def length(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def map(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def map!(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def max(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def max_by(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def member?(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def min(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def min_by(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def minmax(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def minmax_by(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def none?(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def one?(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def pack(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def partition(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def permutation(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def pop(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def prepend(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def product(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def push(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def rassoc(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def reduce(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def reject(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def reject!(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def repeated_combination(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def repeated_permutation(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def replace(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def reverse(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def reverse!(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def reverse_each(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def rfind(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def rindex(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def rotate(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def rotate!(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def sample(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def select(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def select!(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def shelljoin(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def shift(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def shuffle(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def shuffle!(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def size(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def slice(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def slice!(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def slice_after(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def slice_before(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def slice_when(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def sort(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def sort!(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def sort_by(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def sort_by!(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def sum(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def take(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def take_while(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def tally(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def to_ary(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def to_h(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def to_set(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def transpose(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def union(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def uniq(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def uniq!(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def unshift(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def values_at(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def zip(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 + def |(*, **, &); end +end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:9 +RuboCop::AST::CollectionNode::ARRAY_METHODS = T.let(T.unsafe(nil), Array) + +# A node extension for `complex` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available to +# all `complex` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/complex_node.rb:8 +class RuboCop::AST::ComplexNode < ::RuboCop::AST::Node + include ::RuboCop::AST::BasicLiteralNode + include ::RuboCop::AST::NumericNode +end + +# Common functionality for nodes that have conditions: +# `if`, `while`, `until`, `case`. +# This currently doesn't include `when` nodes, because they have multiple +# conditions, and need to be checked for that. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/conditional_node.rb:9 +module RuboCop::AST::ConditionalNode + # Returns the body associated with the condition. This works together with + # each node's custom destructuring method to select the correct part of + # the node. + # + # @note For `if` nodes, this is the truthy branch. + # + # @return [Node, nil] the body of the node + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/conditional_node.rb:40 + def body; end + + # Returns the condition of the node. This works together with each node's + # custom destructuring method to select the correct part of the node. + # + # @return [Node, nil] the condition of the node + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/conditional_node.rb:29 + def condition; end + + # Checks whether the condition of the node is written on more than + # one line. + # + # @return [Boolean] whether the condition is on more than one line + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/conditional_node.rb:21 + def multiline_condition?; end + + # Checks whether the condition of the node is written on a single line. + # + # @return [Boolean] whether the condition is on a single line + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/conditional_node.rb:13 + def single_line_condition?; end +end + +# A node extension for `const` nodes. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/const_node.rb:6 +class RuboCop::AST::ConstNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ConstantNode +end + +# Common functionality for nodes that deal with constants: +# `const`, `casgn`. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/constant_node.rb:7 +module RuboCop::AST::ConstantNode + # @return [Boolean] if the constant starts with `::` (aka s(:cbase)) + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/constant_node.rb:27 + def absolute?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/constant_node.rb:24 + def class_name?; end + + # Yield nodes for the namespace + # + # For `::Foo::Bar::BAZ` => yields: + # s(:cbase), then + # s(:const, :Foo), then + # s(:const, s(:const, :Foo), :Bar) + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/constant_node.rb:44 + def each_path(&block); end + + # @return [Boolean] if the constant is a Module / Class, according to the standard convention. + # Note: some classes might have uppercase in which case this method + # returns false + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/constant_node.rb:21 + def module_name?; end + + # @return [Node, nil] the node associated with the scope (e.g. cbase, const, ...) + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/constant_node.rb:9 + def namespace; end + + # @return [Boolean] if the constant does not start with `::` (aka s(:cbase)) + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/constant_node.rb:34 + def relative?; end + + # @return [Symbol] the demodulized name of the constant: "::Foo::Bar" => :Bar + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/constant_node.rb:14 + def short_name; end +end + +# A node extension for `csend` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `csend` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/csend_node.rb:8 +class RuboCop::AST::CsendNode < ::RuboCop::AST::SendNode + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/csend_node.rb:9 + def send_type?; end +end + +# A node extension for `def` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `def` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/def_node.rb:8 +class RuboCop::AST::DefNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::MethodIdentifierPredicates + + # Checks whether this method definition node forwards its arguments + # as per the feature added in Ruby 2.7. + # + # @note This is written in a way that may support lead arguments + # which are rumored to be added in a later version of Ruby. + # + # @return [Boolean] whether the `def` node uses argument forwarding + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/def_node.rb:26 + def argument_forwarding?; end + + # An array containing the arguments of the method definition. + # + # @return [Array] the arguments of the method definition + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/def_node.rb:40 + def arguments; end + + # The body of the method definition. + # + # @note this can be either a `begin` node, if the method body contains + # multiple expressions, or any other node, if it contains a single + # expression. + # + # @return [Node] the body of the method definition + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/def_node.rb:51 + def body; end + + # @return [Boolean] if the definition is without an `end` or not. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/def_node.rb:63 + def endless?; end + + # The name of the defined method as a symbol. + # + # @return [Symbol] the name of the defined method + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/def_node.rb:33 + def method_name; end + + # The receiver of the method definition, if any. + # + # @return [Node, nil] the receiver of the method definition, or `nil`. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/def_node.rb:58 + def receiver; end + + # Checks whether this node body is a void context. + # + # @return [Boolean] whether the `def` node body is a void context + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/def_node.rb:15 + def void_context?; end +end + +# A node extension for `defined?` nodes. This will be used in place of a +# plain node when the builder constructs the AST, making its methods +# available to all `send` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/defined_node.rb:8 +class RuboCop::AST::DefinedNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/defined_node.rb:16 + def arguments; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/defined_node.rb:12 + def node_parts; end +end + +# Common functionality for primitive literal nodes: `sym`, `str`, +# `int`, `float`, ... +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/descendence.rb:7 +module RuboCop::AST::Descendence + # Returns an array of child nodes. + # This is a shorthand for `node.each_child_node.to_a`. + # + # @return [Array] an array of child nodes + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/descendence.rb:38 + def child_nodes; end + + # Returns an array of descendant nodes. + # This is a shorthand for `node.each_descendant.to_a`. + # + # @return [Array] an array of descendant nodes + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/descendence.rb:72 + def descendants; end + + # Calls the given block for each child node. + # If no block is given, an `Enumerator` is returned. + # + # Note that this is different from `node.children.each { |child| ... }` + # which yields all children including non-node elements. + # + # @overload each_child_node + # Yield all nodes. + # @overload each_child_node(type, ...) + # Yield only nodes matching any of the types. + # @param [Symbol] type a node type + # @yieldparam [Node] node each child node + # @return [self] if a block is given + # @return [Enumerator] if no block is given + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/descendence.rb:22 + def each_child_node(*types); end + + # Calls the given block for each descendant node with depth first order. + # If no block is given, an `Enumerator` is returned. + # + # @overload each_descendant + # Yield all nodes. + # @overload each_descendant(type) + # Yield only nodes matching the type. + # @param [Symbol] type a node type + # @overload each_descendant(type_a, type_b, ...) + # Yield only nodes matching any of the types. + # @param [Symbol] type_a a node type + # @param [Symbol] type_b a node type + # @yieldparam [Node] node each descendant node + # @return [self] if a block is given + # @return [Enumerator] if no block is given + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/descendence.rb:60 + def each_descendant(*types, &block); end + + # Calls the given block for the receiver and each descendant node in + # depth-first order. + # If no block is given, an `Enumerator` is returned. + # + # This method would be useful when you treat the receiver node as the root + # of a tree and want to iterate over all nodes in the tree. + # + # @overload each_node + # Yield all nodes. + # @overload each_node(type) + # Yield only nodes matching the type. + # @param [Symbol] type a node type + # @overload each_node(type_a, type_b, ...) + # Yield only nodes matching any of the types. + # @param [Symbol] type_a a node type + # @param [Symbol] type_b a node type + # @yieldparam [Node] node each node + # @return [self] if a block is given + # @return [Enumerator] if no block is given + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/descendence.rb:95 + def each_node(*types, &block); end + + protected + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/descendence.rb:115 + def visit_all_descendants(&block); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/descendence.rb:107 + def visit_descendants(types, &block); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/descendence.rb:124 + def visit_descendants_of_types(types, &block); end +end + +# A node extension for `dstr` nodes. This will be used +# in place of a plain node when the builder constructs the AST, making +# its methods available to all `dstr` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/dstr_node.rb:8 +class RuboCop::AST::DstrNode < ::RuboCop::AST::StrNode + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/dstr_node.rb:9 + def value; end +end + +# A node extension for `ensure` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `ensure` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/ensure_node.rb:8 +class RuboCop::AST::EnsureNode < ::RuboCop::AST::Node + # Returns the body of the `ensure` clause. + # + # @return [Node, nil] The body of the `ensure`. + # @deprecated Use `EnsureNode#branch` + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/ensure_node.rb:16 + def body; end + + # Returns an the ensure branch in the exception handling statement. + # + # @return [Node, nil] the body of the ensure branch. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/ensure_node.rb:33 + def branch; end + + # Returns the `rescue` node of the `ensure`, if present. + # + # @return [Node, nil] The `rescue` node. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/ensure_node.rb:40 + def rescue_node; end + + # Checks whether this node body is a void context. + # Always `true` for `ensure`. + # + # @return [true] whether the `ensure` node body is a void context + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/ensure_node.rb:48 + def void_context?; end +end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/ensure_node.rb:9 +RuboCop::AST::EnsureNode::DEPRECATION_WARNING_LOCATION_CACHE = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/ext/range.rb:5 +module RuboCop::AST::Ext; end + +# Extensions to Parser::AST::Range +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/ext/range.rb:7 +module RuboCop::AST::Ext::Range + # @return [Range] the range of line numbers for the node + # If `exclude_end` is `true`, then the range will be exclusive. + # + # Assume that `node` corresponds to the following array literal: + # + # [ + # :foo, + # :bar + # ] + # + # node.loc.begin.line_span # => 1..1 + # node.source_range.line_span(exclude_end: true) # => 1...4 + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/ext/range.rb:20 + def line_span(exclude_end: T.unsafe(nil)); end +end + +# A node extension for `float` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available to +# all `float` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/float_node.rb:8 +class RuboCop::AST::FloatNode < ::RuboCop::AST::Node + include ::RuboCop::AST::BasicLiteralNode + include ::RuboCop::AST::NumericNode +end + +# A node extension for `for` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `for` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/for_node.rb:8 +class RuboCop::AST::ForNode < ::RuboCop::AST::Node + # Returns the body of the `for` loop. + # + # @return [Node, nil] The body of the `for` loop. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/for_node.rb:48 + def body; end + + # Returns the collection the `for` loop is iterating over. + # + # @return [Node] The collection the `for` loop is iterating over + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/for_node.rb:41 + def collection; end + + # Checks whether the `for` node has a `do` keyword. + # + # @return [Boolean] whether the `for` node has a `do` keyword + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/for_node.rb:19 + def do?; end + + # Returns the keyword of the `for` statement as a string. + # + # @return [String] the keyword of the `for` statement + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/for_node.rb:12 + def keyword; end + + # Returns the iteration variable of the `for` loop. + # + # @return [Node] The iteration variable of the `for` loop + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/for_node.rb:34 + def variable; end + + # Checks whether this node body is a void context. + # Always `true` for `for`. + # + # @return [true] whether the `for` node body is a void context + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/for_node.rb:27 + def void_context?; end +end + +# A node extension for `forward-args` nodes. This will be used in place +# of a plain node when the builder constructs the AST, making its methods +# available to all `forward-args` nodes within RuboCop. +# +# Not used with modern emitters: +# +# $ ruby-parse -e "def foo(...); end" +# (def :foo +# (args +# (forward-arg)) nil) +# $ ruby-parse --legacy -e "->(foo) { bar }" +# (def :foo +# (forward-args) nil) +# +# Note the extra 's' with legacy form. +# +# The main RuboCop runs in legacy mode; this node is only used +# if user `AST::Builder.modernize` or `AST::Builder.emit_lambda=true` +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/forward_args_node.rb:23 +class RuboCop::AST::ForwardArgsNode < ::RuboCop::AST::Node + include ::RuboCop::AST::CollectionNode + + # Node wraps itself in an array to be compatible with other + # enumerable argument types. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/forward_args_node.rb:28 + def to_a; end +end + +# Common functionality for nodes that can be used as hash elements: +# `pair`, `kwsplat` +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:7 +module RuboCop::AST::HashElementNode + # Returns the delta between this element's delimiter and the argument's. + # + # @note Pairs with different delimiter styles return a delta of 0 + # + # @return [Integer] the delta between the two delimiters + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:61 + def delimiter_delta(other); end + + # Returns the key of this `hash` element. + # + # @note For keyword splats, this returns the whole node + # + # @return [Node] the key of the hash element + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:13 + def key; end + + # Returns the delta between this pair's key and the argument pair's. + # + # @note Keys on the same line always return a delta of 0 + # @note Keyword splats always return a delta of 0 for right alignment + # + # @param [Symbol] alignment whether to check the left or right side + # @return [Integer] the delta between the two keys + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:43 + def key_delta(other, alignment = T.unsafe(nil)); end + + # Checks whether this `hash` element is on the same line as `other`. + # + # @note A multiline element is considered to be on the same line if it + # shares any of its lines with `other` + # + # @return [Boolean] whether this element is on the same line as `other` + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:32 + def same_line?(other); end + + # Returns the value of this `hash` element. + # + # @note For keyword splats, this returns the whole node + # + # @return [Node] the value of the hash element + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:22 + def value; end + + # Returns the delta between this element's value and the argument's. + # + # @note Keyword splats always return a delta of 0 + # + # @return [Integer] the delta between the two values + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:52 + def value_delta(other); end +end + +# A helper class for comparing the positions of different parts of a +# `pair` node. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:67 +class RuboCop::AST::HashElementNode::HashElementDelta + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:68 + def initialize(first, second); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:89 + def delimiter_delta; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:75 + def key_delta(alignment = T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:82 + def value_delta; end + + private + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:108 + def delta(first, second, alignment = T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:98 + def first; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:119 + def keyword_splat?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:98 + def second; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/hash_element_node.rb:100 + def valid_argument_types?; end +end + +# A node extension for `hash` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `hash` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/hash_node.rb:8 +class RuboCop::AST::HashNode < ::RuboCop::AST::Node + # Checks whether the `hash` literal is delimited by curly braces. + # + # @return [Boolean] whether the `hash` literal is enclosed in braces + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/hash_node.rb:117 + def braces?; end + + # Calls the given block for each `key` node in the `hash` literal. + # If no block is given, an `Enumerator` is returned. + # + # @note `kwsplat` nodes are ignored. + # + # @return [self] if a block is given + # @return [Enumerator] if no block is given + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/hash_node.rb:59 + def each_key; end + + # Calls the given block for each `pair` node in the `hash` literal. + # If no block is given, an `Enumerator` is returned. + # + # @note `kwsplat` nodes are ignored. + # + # @return [self] if a block is given + # @return [Enumerator] if no block is given + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/hash_node.rb:33 + def each_pair; end + + # Calls the given block for each `value` node in the `hash` literal. + # If no block is given, an `Enumerator` is returned. + # + # @note `kwsplat` nodes are ignored. + # + # @return [self] if a block is given + # @return [Enumerator] if no block is given + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/hash_node.rb:83 + def each_value; end + + # Checks whether the `hash` node contains any `pair`- or `kwsplat` nodes. + # + # @return[Boolean] whether the `hash` is empty + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/hash_node.rb:22 + def empty?; end + + # Returns an array of all the keys in the `hash` literal. + # + # @note `kwsplat` nodes are ignored. + # + # @return [Array] an array of keys in the `hash` literal + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/hash_node.rb:48 + def keys; end + + # Checks whether this `hash` uses a mix of hash rocket and colon + # delimiters for its pairs. + # + # @note `kwsplat` nodes are ignored. + # + # @return [Boolean] whether the `hash` uses mixed delimiters + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/hash_node.rb:110 + def mixed_delimiters?; end + + # Returns an array of all the key value pairs in the `hash` literal. + # + # @note this may be different from children as `kwsplat` nodes are + # ignored. + # + # @return [Array] an array of `pair` nodes + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/hash_node.rb:15 + def pairs; end + + # Checks whether any of the key value pairs in the `hash` literal are on + # the same line. + # + # @note A multiline `pair` is considered to be on the same line if it + # shares any of its lines with another `pair` + # + # @note `kwsplat` nodes are ignored. + # + # @return [Boolean] whether any `pair` nodes are on the same line + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/hash_node.rb:100 + def pairs_on_same_line?; end + + # Returns an array of all the values in the `hash` literal. + # + # @note `kwsplat` nodes are ignored. + # + # @return [Array] an array of values in the `hash` literal + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/hash_node.rb:72 + def values; end +end + +# A node extension for `if` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `if` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:8 +class RuboCop::AST::IfNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ConditionalNode + include ::RuboCop::AST::ModifierNode + + # Returns an array of all the branches in the conditional statement. + # + # @return [Array] an array of branch nodes + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:154 + def branches; end + + # @deprecated Use `branches.each` + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:171 + def each_branch(&block); end + + # Checks whether the `if` node has an `else` clause. + # + # @note This returns `true` for nodes containing an `elsif` clause. + # This is legacy behavior, and many cops rely on it. + # + # @return [Boolean] whether the node has an `else` clause + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:49 + def else?; end + + # Returns the branch of the `if` node that gets evaluated when its + # condition is falsey. + # + # @note This is normalized for `unless` nodes. + # + # @return [Node] the falsey branch node of the `if` node + # @return [nil] when there is no else branch + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:133 + def else_branch; end + + # Checks whether the `if` is an `elsif`. Parser handles these by nesting + # `if` nodes in the `else` branch. + # + # @return [Boolean] whether the node is an `elsif` + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:39 + def elsif?; end + + # Checks whether the `if` node has at least one `elsif` branch. Returns + # true if this `if` node itself is an `elsif`. + # + # @return [Boolean] whether the `if` node has at least one `elsif` branch + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:111 + def elsif_conditional?; end + + # Checks whether this node is an `if` statement. (This is not true of + # ternary operators and `unless` statements.) + # + # @return [Boolean] whether the node is an `if` statement + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:16 + def if?; end + + # Returns the branch of the `if` node that gets evaluated when its + # condition is truthy. + # + # @note This is normalized for `unless` nodes. + # + # @return [Node] the truthy branch node of the `if` node + # @return [nil] if the truthy branch is empty + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:122 + def if_branch; end + + # Returns the inverse keyword of the `if` node as a string. Returns `if` + # for `unless` nodes and vice versa. Returns an empty string for ternary + # operators. + # + # @return [String] the inverse keyword of the `if` statement + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:73 + def inverse_keyword; end + + # Returns the keyword of the `if` statement as a string. Returns an empty + # string for ternary operators. + # + # @return [String] the keyword of the `if` statement + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:64 + def keyword; end + + # Checks whether the `if` node is in a modifier form, i.e. a condition + # trailing behind an expression. Only `if` and `unless` nodes without + # other branches can be modifiers. + # + # @return [Boolean] whether the `if` node is a modifier + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:87 + def modifier_form?; end + + # Checks whether the `if` node has nested `if` nodes in any of its + # branches. + # + # @note This performs a shallow search. + # + # @return [Boolean] whether the `if` node contains nested conditionals + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:97 + def nested_conditional?; end + + # Custom destructuring method. This is used to normalize the branches + # for `if` and `unless` nodes, to aid comparisons and conversions. + # + # @return [Array] the different parts of the `if` statement + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:141 + def node_parts; end + + # Checks whether the `if` node is a ternary operator. + # + # @return [Boolean] whether the `if` node is a ternary operator + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:56 + def ternary?; end + + # Checks whether the `if` node has an `then` clause. + # + # @return [Boolean] whether the node has an `then` clause + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:31 + def then?; end + + # Checks whether this node is an `unless` statement. (This is not true + # of ternary operators and `if` statements.) + # + # @return [Boolean] whether the node is an `unless` statement + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/if_node.rb:24 + def unless?; end +end + +# A node extension for `in` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `in` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/in_pattern_node.rb:8 +class RuboCop::AST::InPatternNode < ::RuboCop::AST::Node + # Returns the body of the `in` node. + # + # @return [Node, nil] the body of the `in` node + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/in_pattern_node.rb:33 + def body; end + + # Returns the index of the `in` branch within the `case` statement. + # + # @return [Integer] the index of the `in` branch + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/in_pattern_node.rb:19 + def branch_index; end + + # Returns a node of the pattern in the `in` branch. + # + # @return [Node] a pattern node + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/in_pattern_node.rb:12 + def pattern; end + + # Checks whether the `in` node has a `then` keyword. + # + # @return [Boolean] whether the `in` node has a `then` keyword + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/in_pattern_node.rb:26 + def then?; end +end + +# Used for modern support only! +# Not as thoroughly tested as legacy equivalent +# +# $ ruby-parse -e "foo[:bar]" +# (index +# (send nil :foo) +# (sym :bar)) +# $ ruby-parse --legacy -e "foo[:bar]" +# (send +# (send nil :foo) :[] +# (sym :bar)) +# +# The main RuboCop runs in legacy mode; this node is only used +# if user `AST::Builder.modernize` or `AST::Builder.emit_index=true` +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/index_node.rb:19 +class RuboCop::AST::IndexNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::ParameterizedNode::RestArguments + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode + + # For similarity with legacy mode + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/index_node.rb:29 + def assignment_method?; end + + # For similarity with legacy mode + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/index_node.rb:24 + def attribute_accessor?; end + + # For similarity with legacy mode + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/index_node.rb:34 + def method_name; end + + private + + # An array containing the arguments of the dispatched method. + # + # @return [Array] the arguments of the dispatched method + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/index_node.rb:43 + def first_argument_index; end +end + +# Used for modern support only! +# Not as thoroughly tested as legacy equivalent +# +# $ ruby-parse -e "foo[:bar] = :baz" +# (indexasgn +# (send nil :foo) +# (sym :bar) +# (sym :baz)) +# $ ruby-parse --legacy -e "foo[:bar] = :baz" +# (send +# (send nil :foo) :[]= +# (sym :bar) +# (sym :baz)) +# +# The main RuboCop runs in legacy mode; this node is only used +# if user `AST::Builder.modernize` or `AST::Builder.emit_index=true` +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/indexasgn_node.rb:21 +class RuboCop::AST::IndexasgnNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::ParameterizedNode::RestArguments + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode + + # For similarity with legacy mode + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/indexasgn_node.rb:31 + def assignment_method?; end + + # For similarity with legacy mode + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/indexasgn_node.rb:26 + def attribute_accessor?; end + + # For similarity with legacy mode + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/indexasgn_node.rb:36 + def method_name; end + + private + + # An array containing the arguments of the dispatched method. + # + # @return [Array] the arguments of the dispatched method + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/indexasgn_node.rb:45 + def first_argument_index; end +end + +# A node extension for `int` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available to +# all `int` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/int_node.rb:8 +class RuboCop::AST::IntNode < ::RuboCop::AST::Node + include ::RuboCop::AST::BasicLiteralNode + include ::RuboCop::AST::NumericNode +end + +# A node extension for `kwbegin` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `kwbegin` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/keyword_begin_node.rb:8 +class RuboCop::AST::KeywordBeginNode < ::RuboCop::AST::Node + # Returns the body of the `kwbegin` block. Returns `self` if the `kwbegin` contains + # multiple nodes. + # + # @return [Node, nil] The body of the `kwbegin`. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/keyword_begin_node.rb:13 + def body; end + + # Returns the `rescue` node of the `kwbegin` block, if one is present. + # + # @return [Node, nil] The `rescue` node within `kwbegin`. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/keyword_begin_node.rb:30 + def ensure_node; end + + # Returns the `rescue` node of the `kwbegin` block, if one is present. + # + # @return [Node, nil] The `rescue` node within `kwbegin`. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/keyword_begin_node.rb:37 + def rescue_node; end +end + +# A node extension for `kwsplat` and `forwarded_kwrestarg` nodes. This will be used in +# place of a plain node when the builder constructs the AST, making its methods available to +# all `kwsplat` and `forwarded_kwrestarg` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/keyword_splat_node.rb:8 +class RuboCop::AST::KeywordSplatNode < ::RuboCop::AST::Node + include ::RuboCop::AST::HashElementNode + + # This is used for duck typing with `pair` nodes which also appear as + # `hash` elements. + # + # @return [false] + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/keyword_splat_node.rb:26 + def colon?; end + + # This is used for duck typing with `pair` nodes which also appear as + # `hash` elements. + # + # @return [false] + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/keyword_splat_node.rb:18 + def hash_rocket?; end + + # This provides `forwarded_kwrestarg` node to return true to be compatible with `kwsplat` node. + # + # @return [true] + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/keyword_splat_node.rb:48 + def kwsplat_type?; end + + # Custom destructuring method. This is used to normalize the branches + # for `pair` and `kwsplat` nodes, to add duck typing to `hash` elements. + # + # @return [Array] the different parts of the `kwsplat` + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/keyword_splat_node.rb:41 + def node_parts; end + + # Returns the operator for the `kwsplat` as a string. + # + # @return [String] the double splat operator + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/keyword_splat_node.rb:33 + def operator; end +end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/keyword_splat_node.rb:11 +RuboCop::AST::KeywordSplatNode::DOUBLE_SPLAT = T.let(T.unsafe(nil), String) + +# Used for modern support only: +# Not as thoroughly tested as legacy equivalent +# +# $ ruby-parse -e "->(foo) { bar }" +# (block +# (lambda) +# (args +# (arg :foo)) +# (send nil :bar)) +# $ ruby-parse --legacy -e "->(foo) { bar }" +# (block +# (send nil :lambda) +# (args +# (arg :foo)) +# (send nil :bar)) +# +# The main RuboCop runs in legacy mode; this node is only used +# if user `AST::Builder.modernize` or `AST::Builder.emit_lambda=true` +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/lambda_node.rb:23 +class RuboCop::AST::LambdaNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::ParameterizedNode::RestArguments + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode + + # For similarity with legacy mode + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/lambda_node.rb:43 + def assignment_method?; end + + # For similarity with legacy mode + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/lambda_node.rb:38 + def attribute_accessor?; end + + # For similarity with legacy mode + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/lambda_node.rb:28 + def lambda?; end + + # For similarity with legacy mode + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/lambda_node.rb:33 + def lambda_literal?; end + + # For similarity with legacy mode + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/lambda_node.rb:53 + def method_name; end + + # For similarity with legacy mode + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/lambda_node.rb:48 + def receiver; end + + private + + # For similarity with legacy mode + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/lambda_node.rb:60 + def first_argument_index; end +end + +# A node extension for `masgn` nodes. +# 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. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/masgn_node.rb:8 +class RuboCop::AST::MasgnNode < ::RuboCop::AST::Node + # @return [Array] the assignment nodes of the multiple assignment + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/masgn_node.rb:16 + def assignments; end + + # The RHS (right hand side) of the multiple assignment. This returns + # the nodes as parsed: either a single node if the RHS has a single value, + # or an `array` node containing multiple nodes. + # + # NOTE: Due to how parsing works, `expression` will return the same for + # `a, b = x, y` and `a, b = [x, y]`. + # + # @return [Node] the right hand side of a multiple assignment. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/masgn_node.rb:39 + def expression; end + + # @return [MlhsNode] the `mlhs` node + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/masgn_node.rb:10 + def lhs; end + + # @return [Array] names of all the variables being assigned + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/masgn_node.rb:21 + def names; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/masgn_node.rb:42 + def rhs; end + + # In contrast to `expression`, `values` always returns a Ruby array + # containing all the nodes being assigned on the RHS. + # + # Literal arrays are considered a singular value; but unlike `expression`, + # implied `array` nodes from assigning multiple values on the RHS are treated + # as separate. + # + # @return [Array] individual values being assigned on the RHS of the multiple assignment + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/masgn_node.rb:52 + def values; end + + private + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/masgn_node.rb:58 + def multiple_rhs?; end +end + +# Common functionality for nodes that are a kind of method dispatch: +# `send`, `csend`, `super`, `zsuper`, `yield`, `defined?`, +# and (modern only): `index`, `indexasgn`, `lambda` +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:8 +module RuboCop::AST::MethodDispatchNode + include ::RuboCop::AST::MethodIdentifierPredicates + extend ::RuboCop::AST::NodePattern::Macros + + # Checks whether the dispatched method is an access modifier. + # + # @return [Boolean] whether the dispatched method is an access modifier + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:64 + def access_modifier?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:272 + def adjacent_def_modifier?(param0 = T.unsafe(nil)); end + + # Checks whether this node is an arithmetic operation + # + # @return [Boolean] whether the dispatched method is an arithmetic + # operation + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:175 + def arithmetic_operation?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:110 + def assignment?; end + + # Checks whether the dispatched method is a bare access modifier that + # affects all methods defined after the macro. + # + # @return [Boolean] whether the dispatched method is a bare + # access modifier + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:73 + def bare_access_modifier?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:277 + def bare_access_modifier_declaration?(param0 = T.unsafe(nil)); end + + # Checks whether this is a binary operation. + # + # @example + # + # foo + bar + # + # @return [Boolean] whether this method is a binary operation + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:247 + def binary_operation?; end + + # Whether this method dispatch has an explicit block. + # + # @return [Boolean] whether the dispatched method has a block + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:167 + def block_literal?; end + + # The `block`, `numblock`, or `itblock` node associated with this method dispatch, if any. + # + # @return [BlockNode, nil] the `block`, `numblock`, or `itblock` node associated with this + # method call or `nil` + # + # pkg:gem/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 + # and has an implicit receiver. + # + # @param [Symbol, String] name the method name to check for + # @return [Boolean] whether the method name matches the argument + # + # pkg:gem/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 + # `const` node. + # + # @return [Boolean] whether the receiver of this method dispatch + # is a `const` node + # + # pkg:gem/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. + # + # @example + # + # private def foo; end + # + # @return [Node | nil] returns the `def|defs` node this is a modifier for, + # or `nil` if it isn't a def modifier + # + # pkg:gem/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. + # + # @example + # + # private def foo; end + # + # @return whether the `def|defs` node is a modifier or not. + # See also `def_modifier` that returns the node or `nil` + # + # pkg:gem/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 + # receiver and the method name. + # + # This is useful for comparison operators, which can be called either + # with or without a dot, i.e. `foo == bar` or `foo.== bar`. + # + # @return [Boolean] whether the method was called with a connecting dot + # + # pkg:gem/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 + # receiver and the method name. + # + # @return [Boolean] whether the method was called with a connecting dot + # + # pkg:gem/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`, + # e.g. `foo.(bar)`. + # + # @return [Boolean] whether the method is the implicit form of `#call` + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:160 + def implicit_call?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:256 + def in_macro_scope?(param0 = T.unsafe(nil)); end + + # Checks whether this is a lambda. Some versions of parser parses + # non-literal lambdas as a method send. + # + # @return [Boolean] whether this method is a lambda + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:212 + def lambda?; end + + # Checks whether this is a lambda literal (stabby lambda.) + # + # @example + # + # -> (foo) { bar } + # + # @return [Boolean] whether this method is a lambda literal + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:223 + def lambda_literal?; end + + # Checks whether the dispatched method is a macro method. A macro method + # is defined as a method that sits in a class, module, or block body and + # has an implicit receiver. + # + # @note This does not include DSLs that use nested blocks, like RSpec + # + # @return [Boolean] whether the dispatched method is a macro method + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:57 + def macro?; end + + # The name of the dispatched method as a symbol. + # + # @return [Symbol] the name of the dispatched method + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:27 + def method_name; end + + # Checks whether the dispatched method is a non-bare access modifier that + # affects only the method it receives. + # + # @return [Boolean] whether the dispatched method is a non-bare + # access modifier + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:82 + def non_bare_access_modifier?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:282 + def non_bare_access_modifier_declaration?(param0 = T.unsafe(nil)); end + + # The receiving node of the method dispatch. + # + # @return [Node, nil] the receiver of the dispatched method or `nil` + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:20 + def receiver; end + + # Checks whether the dispatched method uses a safe navigation operator to + # connect the receiver and the method name. + # + # @return [Boolean] whether the method was called with a connecting dot + # + # pkg:gem/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 + # + # pkg:gem/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` + # + # pkg:gem/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 + # + # pkg:gem/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` + # access modifier that affects all methods defined after the macro. + # + # @return [Boolean] whether the dispatched method is a bare + # `private` or `protected` access modifier + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:91 + def special_modifier?; end + + # Checks whether this is a unary operation. + # + # @example + # + # -foo + # + # @return [Boolean] whether this method is a unary operation + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:234 + def unary_operation?; end +end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:12 +RuboCop::AST::MethodDispatchNode::ARITHMETIC_OPERATORS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_dispatch_node.rb:14 +RuboCop::AST::MethodDispatchNode::SPECIAL_MODIFIERS = T.let(T.unsafe(nil), Array) + +# Common predicates for nodes that reference method identifiers: +# `send`, `csend`, `def`, `defs`, `super`, `zsuper` +# +# @note this mixin expects `#method_name` and `#receiver` to be implemented +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:9 +module RuboCop::AST::MethodIdentifierPredicates + # Checks whether the method is an assignment method. + # + # @return [Boolean] whether the method is an assignment + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:142 + def assignment_method?; end + + # Checks whether the method is a bang method. + # + # @return [Boolean] whether the method is a bang method + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:171 + def bang_method?; end + + # Checks whether the method is a camel case method, + # e.g. `Integer()`. + # + # @return [Boolean] whether the method is a camel case method + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:179 + def camel_case_method?; end + + # Checks whether the method is a comparison method. + # + # @return [Boolean] whether the method is a comparison + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:135 + def comparison_method?; end + + # Checks whether the *explicit* receiver of node is a `const` node. + # + # @return [Boolean] whether the receiver of this node is a `const` node + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:193 + def const_receiver?; end + + # Checks whether the method is an Enumerable method. + # + # @return [Boolean] whether the method is an Enumerable method + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:157 + def enumerable_method?; end + + # Checks whether the method is an enumerator method. + # + # @return [Boolean] whether the method is an enumerator + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:149 + def enumerator_method?; end + + # Checks whether the method name matches the argument. + # + # @param [Symbol, String] name the method name to check for + # @return [Boolean] whether the method name matches the argument + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:79 + def method?(name); end + + # Checks whether this is a negation method, i.e. `!` or keyword `not`. + # + # @return [Boolean] whether this method is a negation method + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:200 + def negation_method?; end + + # Checks whether the method is a nonmutating Array method. + # + # @return [Boolean] whether the method is a nonmutating Array method + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:114 + def nonmutating_array_method?; end + + # Checks whether the method is a nonmutating binary operator method. + # + # @return [Boolean] whether the method is a nonmutating binary operator method + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:93 + def nonmutating_binary_operator_method?; end + + # Checks whether the method is a nonmutating Hash method. + # + # @return [Boolean] whether the method is a nonmutating Hash method + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:121 + def nonmutating_hash_method?; end + + # Checks whether the method is a nonmutating operator method. + # + # @return [Boolean] whether the method is a nonmutating operator method + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:107 + def nonmutating_operator_method?; end + + # Checks whether the method is a nonmutating String method. + # + # @return [Boolean] whether the method is a nonmutating String method + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:128 + def nonmutating_string_method?; end + + # Checks whether the method is a nonmutating unary operator method. + # + # @return [Boolean] whether the method is a nonmutating unary operator method + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:100 + def nonmutating_unary_operator_method?; end + + # Checks whether the method is an operator method. + # + # @return [Boolean] whether the method is an operator + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:86 + def operator_method?; end + + # Checks whether the method is a predicate method. + # + # @return [Boolean] whether the method is a predicate method + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:164 + def predicate_method?; end + + # Checks whether this is a prefix bang method, e.g. `!foo`. + # + # @return [Boolean] whether this method is a prefix bang + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:214 + def prefix_bang?; end + + # Checks whether this is a prefix not method, e.g. `not foo`. + # + # @return [Boolean] whether this method is a prefix not + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:207 + def prefix_not?; end + + # Checks whether the *explicit* receiver of this node is `self`. + # + # @return [Boolean] whether the receiver of this node is `self` + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:186 + def self_receiver?; end +end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:16 +RuboCop::AST::MethodIdentifierPredicates::ENUMERABLE_METHODS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:10 +RuboCop::AST::MethodIdentifierPredicates::ENUMERATOR_METHODS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:32 +RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_ARRAY_METHODS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:24 +RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_BINARY_OPERATOR_METHODS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:48 +RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_HASH_METHODS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:28 +RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_OPERATOR_METHODS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:59 +RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_STRING_METHODS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:26 +RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_UNARY_OPERATOR_METHODS = T.let(T.unsafe(nil), Set) + +# http://phrogz.net/programmingruby/language.html#table_18.4 +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/method_identifier_predicates.rb:20 +RuboCop::AST::MethodIdentifierPredicates::OPERATOR_METHODS = T.let(T.unsafe(nil), Set) + +# A node extension for `mlhs` nodes. +# 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. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mlhs_node.rb:8 +class RuboCop::AST::MlhsNode < ::RuboCop::AST::Node + # Returns all the assignment nodes on the left hand side (LHS) of a multiple assignment. + # These are generally assignment nodes (`lvasgn`, `ivasgn`, `cvasgn`, `gvasgn`, `casgn`) + # but can also be `send` nodes in case of `foo.bar, ... =` or `foo[:bar], ... =`, + # or a `splat` node for `*, ... =`. + # + # @return [Array] the assignment nodes of the multiple assignment LHS + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mlhs_node.rb:15 + def assignments; end +end + +# Common functionality for nodes that can be used as modifiers: +# `if`, `while`, `until` +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/modifier_node.rb:7 +module RuboCop::AST::ModifierNode + # Checks whether the node is in a modifier form, i.e. a condition + # trailing behind an expression. + # + # @return [Boolean] whether the node is a modifier + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/modifier_node.rb:12 + def modifier_form?; end +end + +# A node extension for `module` nodes. This will be used in place of a +# plain node when the builder constructs the AST, making its methods +# available to all `module` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/module_node.rb:8 +class RuboCop::AST::ModuleNode < ::RuboCop::AST::Node + # The body of this `module` node. + # + # @return [Node, nil] the body of the module + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/module_node.rb:19 + def body; end + + # The identifier for this `module` node. + # + # @return [Node] the identifier of the module + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/module_node.rb:12 + def identifier; end +end + +# A node extension for `next` nodes. This will be used in place of a +# plain node when the builder constructs the AST, making its methods +# available to all `next` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/next_node.rb:8 +class RuboCop::AST::NextNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::ParameterizedNode::WrappedArguments +end + +# `RuboCop::AST::Node` is a subclass of `Parser::AST::Node`. It provides +# access to parent nodes and an object-oriented way to traverse an AST with +# the power of `Enumerable`. +# +# It has predicate methods for every node type, like this: +# +# @example +# node.send_type? # Equivalent to: `node.type == :send` +# node.op_asgn_type? # Equivalent to: `node.type == :op_asgn` +# +# # Non-word characters (other than a-zA-Z0-9_) in type names are omitted. +# node.defined_type? # Equivalent to: `node.type == :defined?` +# +# # Find the first lvar node under the receiver node. +# lvar_node = node.each_descendant.find(&:lvar_type?) +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:21 +class RuboCop::AST::Node < ::Parser::AST::Node + include ::RuboCop::AST::Sexp + include ::RuboCop::AST::Descendence + extend ::RuboCop::AST::NodePattern::Macros + + # @see https://www.rubydoc.info/gems/ast/AST/Node:initialize + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:162 + def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def __ENCODING___type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def __FILE___type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def __LINE___type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def alias_type?; end + + # Returns an array of ancestor nodes. + # This is a shorthand for `node.each_ancestor.to_a`. + # + # @return [Array] an array of ancestor nodes + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:334 + def ancestors; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def and_asgn_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def and_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:565 + def any_block_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:545 + def any_def_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:569 + def any_match_pattern_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:573 + def any_str_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:577 + def any_sym_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def arg_expr_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def arg_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def args_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:539 + def argument?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:549 + def argument_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def array_pattern_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def array_pattern_with_tail_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def array_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:491 + def assignment?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:441 + def assignment_or_similar?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def back_ref_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:495 + def basic_conditional?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:449 + def basic_literal?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def begin_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def block_pass_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def block_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def blockarg_expr_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def blockarg_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def blocknilarg_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:553 + def boolean_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def break_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:531 + def call_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def case_match_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def case_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def casgn_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def cbase_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:535 + def chained?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:625 + def class_constructor?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:643 + def class_definition?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def class_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:231 + def complete!; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:236 + def complete?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def complex_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:499 + def conditional?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:380 + def const_name; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def const_pattern_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def const_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def csend_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def cvar_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def cvasgn_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def def_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:400 + def defined_module; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:405 + def defined_module_name; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def defined_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def defs_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def dstr_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def dsym_type?; end + + # Calls the given block for each ancestor node from parent to root. + # If no block is given, an `Enumerator` is returned. + # + # @overload each_ancestor + # Yield all nodes. + # @overload each_ancestor(type) + # Yield only nodes matching the type. + # @param [Symbol] type a node type + # @overload each_ancestor(type_a, type_b, ...) + # Yield only nodes matching any of the types. + # @param [Symbol] type_a a node type + # @param [Symbol] type_b a node type + # @yieldparam [Node] node each ancestor node + # @return [self] if a block is given + # @return [Enumerator] if no block is given + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:322 + def each_ancestor(*types, &block); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def eflipflop_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def empty_else_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:435 + def empty_source?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def ensure_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:483 + def equals_asgn?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def erange_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def false_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:457 + def falsey_literal?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def find_pattern_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:348 + def first_line; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def float_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def for_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def forward_arg_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def forward_args_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def forwarded_args_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def forwarded_kwrestarg_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def forwarded_restarg_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:622 + def global_const?(param0 = T.unsafe(nil), param1); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:581 + def guard_clause?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def gvar_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def gvasgn_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def hash_pattern_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def hash_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def ident_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def if_guard_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def if_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def iflipflop_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:465 + def immutable_literal?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def in_match_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def in_pattern_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def index_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def indexasgn_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def int_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def irange_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def itarg_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def itblock_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def ivar_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def ivasgn_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:512 + def keyword?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def kwarg_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def kwargs_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def kwbegin_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def kwnilarg_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def kwoptarg_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def kwrestarg_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def kwsplat_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:616 + def lambda?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:619 + def lambda_or_proc?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def lambda_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:352 + def last_line; end + + # Use is discouraged, this is a potentially slow method and can lead + # to even slower algorithms + # @return [Node, nil] the left (aka previous) sibling + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:274 + def left_sibling; end + + # Use is discouraged, this is a potentially slow method and can lead + # to even slower algorithms + # @return [Array] the left (aka previous) siblings + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:284 + def left_siblings; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:356 + def line_count; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:445 + def literal?; end + + # Shortcut to safely check if a location is present + # @return [Boolean] + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:589 + def loc?(which_loc); end + + # Shortcut to safely test a particular location, even if + # this location does not exist or is `nil` + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:597 + def loc_is?(which_loc, str); end + + # NOTE: `loop { }` is a normal method call and thus not a loop keyword. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:508 + def loop_keyword?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def lvar_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def lvasgn_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def masgn_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def match_alt_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def match_as_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def match_current_line_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:604 + def match_guard_clause?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def match_nil_pattern_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def match_pattern_p_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def match_pattern_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def match_rest_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def match_var_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def match_with_lvasgn_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def match_with_trailing_comma_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def mlhs_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:650 + def module_definition?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def module_type?; end + + # Predicates + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:427 + def multiline?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:461 + def mutable_literal?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:788 + def new_class_or_module_block?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def next_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def nil_type?; end + + # Common destructuring method. This can be used to normalize + # destructuring for different variations of the node. + # Some node types override this with their own custom + # destructuring method. + # + # @return [Array] the different parts of the node + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:305 + def node_parts; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:362 + def nonempty_line_count; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def not_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def nth_ref_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def numargs_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def numblock_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:557 + def numeric_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def objc_kwarg_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def objc_restarg_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def objc_varargs_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def op_asgn_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:523 + def operator_keyword?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def optarg_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def or_asgn_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def or_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def pair_type?; end + + # Returns the parent node, or `nil` if the receiver is a root node. + # + # @return [Node, nil] the parent node or `nil` + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:213 + def parent; end + + # @return [Boolean] + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:222 + def parent?; end + + # Searching the AST + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:411 + def parent_module_name; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:527 + def parenthesized_call?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def pin_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:503 + def post_condition_loop?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def postexe_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def preexe_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:609 + def proc?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def procarg0_type?; end + + # Some expressions are evaluated for their value, some for their side + # effects, and some for both. + # If we know that expressions are useful only for their return values, + # and have no side effects, that means we can reorder them, change the + # number of times they are evaluated, or replace them with other + # expressions which are equivalent in value. + # So, is evaluation of this node free of side effects? + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:693 + def pure?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:561 + def range_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def rational_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:373 + def receiver(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:145 + def recursive_basic_literal?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:145 + def recursive_literal?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def redo_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:479 + def reference?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def regexp_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def regopt_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def resbody_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def rescue_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def restarg_expr_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def restarg_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def retry_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def return_type?; end + + # Use is discouraged, this is a potentially slow method and can lead + # to even slower algorithms + # @return [Node, nil] the right (aka next) sibling + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:265 + def right_sibling; end + + # Use is discouraged, this is a potentially slow method and can lead + # to even slower algorithms + # @return [Array] the right (aka next) siblings + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:293 + def right_siblings; end + + # @return [Boolean] + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:227 + def root?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def sclass_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def self_type?; end + + # Most nodes are of 'send' type, so this method is defined + # separately to make this check as fast as possible. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:206 + def send_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def shadowarg_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:487 + def shorthand_asgn?; end + + # Returns the index of the receiver node in its siblings. (Sibling index + # uses zero based numbering.) + # Use is discouraged, this is a potentially slow method. + # + # @return [Integer, nil] the index of the receiver node in its siblings + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:258 + def sibling_index; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:431 + def single_line?; end + + # NOTE: Some rare nodes may have no source, like `s(:args)` in `foo {}` + # @return [String, nil] + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:340 + def source; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:366 + def source_length; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:344 + def source_range; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:519 + def special_keyword?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def splat_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:378 + def str_content(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def str_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:638 + def struct_constructor?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def super_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def sym_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def true_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:453 + def truthy_literal?; end + + # Determine if the node is one of several node types in a single query + # Allows specific single node types, as well as "grouped" types + # (e.g. `:boolean` for `:true` or `:false`) + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:181 + def type?(*types); end + + # Non-splatting variant of `type?`, used by the traversal hot paths to + # avoid allocating an array per visited node. + # @api private + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:188 + def type_in?(types); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def undef_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def unless_guard_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def until_post_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def until_type?; end + + # Override `AST::Node#updated` so that `AST::Processor` does not try to + # mutate our ASTs. Since we keep references from children to parents and + # not just the other way around, we cannot update an AST and share + # identical subtrees. Rather, the entire AST must be copied any time any + # part of it is changed. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:247 + def updated(type = T.unsafe(nil), children = T.unsafe(nil), properties = T.unsafe(nil)); end + + # Some expressions are evaluated for their value, some for their side + # effects, and some for both + # If we know that an expression is useful only for its side effects, that + # means we can transform it in ways which preserve the side effects, but + # change the return value + # So, does the return value of this node matter? If we changed it to + # `(...; nil)`, might that affect anything? + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:663 + def value_used?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:475 + def variable?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def when_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def while_post_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def while_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def xstr_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def yield_type?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:197 + def zsuper_type?; end + + protected + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:217 + def parent=(node); end + + private + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:727 + def begin_value_used?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:738 + def case_if_value_used?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:391 + def defined_module0(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:732 + def for_value_used?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:774 + def parent_module_name_for_block(ancestor); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:762 + def parent_module_name_for_sclass(sclass_node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:749 + def parent_module_name_part(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:711 + def visit_ancestors(types); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:744 + def while_until_value_used?; end + + class << self + private + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:141 + def def_recursive_literal_predicate(kind); end + end +end + +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:55 +RuboCop::AST::Node::ASSIGNMENTS = T.let(T.unsafe(nil), Set) + +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:58 +RuboCop::AST::Node::BASIC_CONDITIONALS = T.let(T.unsafe(nil), Set) + +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:42 +RuboCop::AST::Node::BASIC_LITERALS = T.let(T.unsafe(nil), Set) + +# @api private +# <=> isn't included here, because it doesn't return a boolean. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:28 +RuboCop::AST::Node::COMPARISON_OPERATORS = T.let(T.unsafe(nil), Set) + +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:39 +RuboCop::AST::Node::COMPOSITE_LITERALS = T.let(T.unsafe(nil), Set) + +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:60 +RuboCop::AST::Node::CONDITIONALS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:91 +RuboCop::AST::Node::EMPTY_CHILDREN = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:92 +RuboCop::AST::Node::EMPTY_PROPERTIES = T.let(T.unsafe(nil), Hash) + +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:50 +RuboCop::AST::Node::EQUALS_ASSIGNMENTS = T.let(T.unsafe(nil), Set) + +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:35 +RuboCop::AST::Node::FALSEY_LITERALS = T.let(T.unsafe(nil), Set) + +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:96 +RuboCop::AST::Node::GROUP_FOR_TYPE = T.let(T.unsafe(nil), Hash) + +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:47 +RuboCop::AST::Node::IMMUTABLE_LITERALS = T.let(T.unsafe(nil), Set) + +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:70 +RuboCop::AST::Node::KEYWORDS = T.let(T.unsafe(nil), Set) + +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:37 +RuboCop::AST::Node::LITERALS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:87 +RuboCop::AST::Node::LITERAL_RECURSIVE_METHODS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:88 +RuboCop::AST::Node::LITERAL_RECURSIVE_TYPES = T.let(T.unsafe(nil), Set) + +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:64 +RuboCop::AST::Node::LOOP_TYPES = T.let(T.unsafe(nil), Set) + +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:44 +RuboCop::AST::Node::MUTABLE_LITERALS = T.let(T.unsafe(nil), Set) + +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:76 +RuboCop::AST::Node::OPERATOR_KEYWORDS = T.let(T.unsafe(nil), Set) + +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:62 +RuboCop::AST::Node::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Set) + +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:68 +RuboCop::AST::Node::REFERENCES = T.let(T.unsafe(nil), Set) + +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:53 +RuboCop::AST::Node::SHORTHAND_ASSIGNMENTS = T.let(T.unsafe(nil), Set) + +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:78 +RuboCop::AST::Node::SPECIAL_KEYWORDS = T.let(T.unsafe(nil), Set) + +# The node types which could have a source matching `SPECIAL_KEYWORDS`: +# `__FILE__` parses as `str`, `__LINE__` as `int` and `__ENCODING__` as +# `const` (or as their own node types when the builder emits them); +# `str` and `sym` also cover word/symbol array elements, string parts +# and hash labels spelling out one of these keywords. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:84 +RuboCop::AST::Node::SPECIAL_KEYWORD_TYPES = T.let(T.unsafe(nil), Set) + +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:31 +RuboCop::AST::Node::TRUTHY_LITERALS = T.let(T.unsafe(nil), Set) + +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node.rb:66 +RuboCop::AST::Node::VARIABLES = T.let(T.unsafe(nil), Set) + +# This class performs a pattern-matching operation on an AST node. +# +# Detailed syntax: /docs/modules/ROOT/pages/node_pattern.adoc +# +# Initialize a new `NodePattern` with `NodePattern.new(pattern_string)`, then +# pass an AST node to `NodePattern#match`. Alternatively, use one of the class +# macros in `NodePattern::Macros` to define your own pattern-matching method. +# +# If the match fails, `nil` will be returned. If the match succeeds, the +# return value depends on whether a block was provided to `#match`, and +# whether the pattern contained any "captures" (values which are extracted +# from a matching AST.) +# +# - With block: #match yields the captures (if any) and passes the return +# value of the block through. +# - With no block, but one capture: the capture is returned. +# - With no block, but multiple captures: captures are returned as an array. +# - With no block and no captures: #match returns `true`. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:5 +class RuboCop::AST::NodePattern + include ::RuboCop::AST::NodePattern::MethodDefiner + extend ::RuboCop::SimpleForwardable + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:78 + def initialize(str, compiler: T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:91 + def ==(other); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:108 + def as_json(_options = T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:74 + def ast; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:76 + def captures(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:112 + def encode_with(coder); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:94 + def eql?(other); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:120 + def freeze; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:116 + def init_with(coder); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:104 + def marshal_dump; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:100 + def marshal_load(pattern); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:86 + def match(*args, **rest, &block); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:74 + def match_code; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:76 + def named_parameters(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:74 + def pattern; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:76 + def positional_parameters(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:96 + def to_s; end + + class << self + # Yields its argument and any descendants, depth-first. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:60 + def descend(element, &block); end + end +end + +# Responsible to build the AST nodes for `NodePattern` +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/builder.rb:10 +class RuboCop::AST::NodePattern::Builder + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/builder.rb:17 + def emit_atom(type, value); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/builder.rb:29 + def emit_call(type, selector, args = T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/builder.rb:11 + def emit_capture(capture_token, node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/builder.rb:25 + def emit_list(type, _begin, children, _end); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/builder.rb:41 + def emit_subsequence(node_list); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/builder.rb:21 + def emit_unary_op(type, _operator = T.unsafe(nil), *children); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/builder.rb:34 + def emit_union(begin_t, pattern_lists, end_t); end + + private + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/builder.rb:53 + def n(type, *args); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/builder.rb:49 + def optimizable_as_set?(children); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/builder.rb:57 + def union_children(pattern_lists); end +end + +# A NodePattern comment, simplified version of ::Parser::Source::Comment +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/comment.rb:7 +class RuboCop::AST::NodePattern::Comment + # @param [Parser::Source::Range] range + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/comment.rb:14 + def initialize(range); end + + # Compares comments. Two comments are equal if they + # correspond to the same source range. + # + # @param [Object] other + # @return [Boolean] + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/comment.rb:31 + def ==(other); end + + # @return [String] a human-readable representation of this comment + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/comment.rb:39 + def inspect; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/comment.rb:9 + def loc; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/comment.rb:8 + def location; end + + # @return [String] + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/comment.rb:20 + def text; end +end + +# The top-level compiler holding the global state +# Defers work to its subcompilers +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:11 +class RuboCop::AST::NodePattern::Compiler + extend ::RuboCop::SimpleForwardable + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:16 + def initialize; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:25 + def bind(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:14 + def binding; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:14 + def captures; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:43 + def compile_as_atom(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:47 + def compile_as_node_pattern(node, **options); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:51 + def compile_sequence(sequence, var:); end + + # Enumerates `enum` while keeping track of state across + # union branches (captures and unification). + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:39 + def each_union(enum, &block); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:75 + def freeze; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:32 + def named_parameter(name); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:14 + def named_parameters; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:71 + def next_capture; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:55 + def parser; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:27 + def positional_parameter(number); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:14 + def positional_parameters; end + + # Utilities + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:61 + def with_temp_variables(*names, &block); end + + private + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:82 + def enforce_same_captures(enum); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler.rb:97 + def new_capture; end +end + +# Generates code that evaluates to a value (Ruby object) +# This value responds to `===`. +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb:12 +class RuboCop::AST::NodePattern::Compiler::AtomSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler + private + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb:28 + def visit_const; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb:32 + def visit_named_parameter; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb:24 + def visit_number; end + + # Assumes other types are node patterns. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb:46 + def visit_other_type; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb:36 + def visit_positional_parameter; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb:26 + def visit_regexp; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb:40 + def visit_set; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb:25 + def visit_string; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb:21 + def visit_symbol; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb:15 + def visit_unify; end +end + +# Holds the list of bound variable names +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/binding.rb:8 +class RuboCop::AST::NodePattern::Compiler::Binding + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/binding.rb:9 + def initialize; end + + # Yields the first time a given name is bound + # + # @return [String] bound variable name + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/binding.rb:16 + def bind(name); end + + # Returns currently bound variable names + # @return [Array] variable names that are currently bound + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/binding.rb:31 + def bound_variables; end + + # Yields for each branch of the given union, forbidding unification of + # bindings which only appear in a subset of the union. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/binding.rb:37 + def union_bind(enum); end + + private + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/binding.rb:75 + def forbid(names); end +end + +# Variant of the Compiler with tracing information for nodes +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:10 +class RuboCop::AST::NodePattern::Compiler::Debug < ::RuboCop::AST::NodePattern::Compiler + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:118 + def initialize; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:131 + def comments(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:123 + def named_parameters; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:35 + def node_ids; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:127 + def parser; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:131 + def tokens(*, **, &); end +end + +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:38 +class RuboCop::AST::NodePattern::Compiler::Debug::Colorizer + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:98 + def initialize(pattern, compiler: T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:96 + def compiler; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:96 + def node_pattern; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:96 + def pattern; end + + # @return [Node] the Ruby AST + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:105 + def test(ruby, trace: T.unsafe(nil)); end + + private + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:113 + def ruby_ast(ruby); end +end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:39 +RuboCop::AST::NodePattern::Compiler::Debug::Colorizer::COLOR_SCHEME = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:94 +RuboCop::AST::NodePattern::Compiler::Debug::Colorizer::Compiler = RuboCop::AST::NodePattern::Compiler::Debug + +# Result of a NodePattern run against a particular AST +# Consider constructor is private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:48 +class RuboCop::AST::NodePattern::Compiler::Debug::Colorizer::Result < ::Struct + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:58 + def color_map(color_scheme = T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:50 + def colorize(color_scheme = T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:48 + def colorizer; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:48 + def colorizer=(_); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:68 + def match_map; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:76 + def matched?(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:48 + def returned; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:48 + def returned=(_); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:48 + def ruby_ast; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:48 + def ruby_ast=(_); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:48 + def trace; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:48 + def trace=(_); end + + private + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:89 + def ast; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:83 + def color_map_for(node, color); end + + class << self + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:48 + def [](*_arg0); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:48 + def inspect; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:48 + def keyword_init?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:48 + def members; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:48 + def new(*_arg0); end + end +end + +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:134 +module RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:135 + def do_compile; end + + private + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:145 + def node_id; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:141 + def tracer(kind); end +end + +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:151 +class RuboCop::AST::NodePattern::Compiler::Debug::NodePatternSubcompiler < ::RuboCop::AST::NodePattern::Compiler::NodePatternSubcompiler + include ::RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler +end + +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:156 +class RuboCop::AST::NodePattern::Compiler::Debug::SequenceSubcompiler < ::RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler + include ::RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler +end + +# Compiled node pattern requires a named parameter `trace`, +# which should be an instance of this class +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:13 +class RuboCop::AST::NodePattern::Compiler::Debug::Trace + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:14 + def initialize; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:19 + def enter(node_id); end + + # return nil (not visited), false (not matched) or true (matched) + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:30 + def matched?(node_id); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/debug.rb:25 + def success(node_id); end +end + +# Compiles code that evalues to true or false +# for a given value `var` (typically a RuboCop::AST::Node) +# or it's `node.type` if `seq_head` is true +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:13 +class RuboCop::AST::NodePattern::Compiler::NodePatternSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:16 + def initialize(compiler, var: T.unsafe(nil), access: T.unsafe(nil), seq_head: T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:14 + def access; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:14 + def seq_head; end + + private + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:119 + def access_element; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:123 + def access_node; end + + # @param [Array, nil] + # @return [String, nil] + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:113 + def compile_args(arg_list, first: T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:129 + def compile_guard_clause; end + + # Compiling helpers + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:107 + def compile_value_match(value); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:133 + def multiple_access(kind); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:30 + def visit_ascend; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:58 + def visit_capture; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:37 + def visit_descend; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:84 + def visit_function_call; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:73 + def visit_intersection; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:25 + def visit_negation; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:88 + def visit_node_type; end + + # Assumes other types are atoms. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:100 + def visit_other_type; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:80 + def visit_predicate; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:92 + def visit_sequence; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:49 + def visit_unify; end + + # Lists + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:64 + def visit_union; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb:45 + def visit_wildcard; end +end + +# Compiles terms within a sequence to code that evalues to true or false. +# Compilation of the nodes that can match only a single term is deferred to +# `NodePatternSubcompiler`; only nodes that can match multiple terms are +# compiled here. +# Assumes the given `var` is a `::RuboCop::AST::Node` +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:16 +class RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler + # Calls `compile_sequence`; the actual `compile` method + # will be used for the different terms of the sequence. + # The only case of re-entrant call to `compile` is `visit_capture` + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:25 + def initialize(compiler, sequence:, var:); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:31 + def compile_sequence; end + + # @api private + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:256 + def in_sync; end + + protected + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:231 + def compile_terms(children = T.unsafe(nil), last_arity = T.unsafe(nil)); end + + # @api private + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:256 + def cur_index; end + + # yield `sync_code` iff not already in sync + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:247 + def sync; end + + private + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:59 + def compile(node); end + + # Compilation helpers + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:170 + def compile_and_advance(term); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:133 + def compile_any_order_branches(matched_var); end + + # @return [Array] Else code, and init code (if any) + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:142 + def compile_any_order_else; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:185 + def compile_captured_repetition(child_code, child_captures); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:124 + def compile_case(when_branches, else_code); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:366 + def compile_child_nb_guard(arity_range); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:324 + def compile_cur_index; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:330 + def compile_index(cur = T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:358 + def compile_loop(term); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:352 + def compile_loop_advance(to = T.unsafe(nil)); end + + # Assumes `@cur_index` is already updated + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:203 + def compile_matched(kind); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:309 + def compile_max_matched; end + + # @return [String] code that evaluates to `false` if the matched arity is too small + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:275 + def compile_min_check; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:290 + def compile_remaining; end + + # Generate initialization code for unification variables + # @param newly_bound [Array] variable names that were newly bound + # @return [String] initialization code + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:424 + def compile_unify_init(newly_bound); end + + # @return [Hash] of {subcompiler => code} + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:378 + def compile_union_forks; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:318 + def empty_loop; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:219 + def handle_prev; end + + # Modifies in place `forks` + # Syncs our state + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:405 + def merge_forks!(forks); end + + # Modifies in place `forks` to insure that `cur_{child|index}_var` are ok + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:389 + def preserve_union_start(forks); end + + # @return [Array] total arities (as Ranges) of remaining children nodes + # E.g. For sequence `(_ _? <_ _>)`, arities are: 1, 0..1, 2 + # and remaining arities are: 3..4, 2..3, 2..2, 0..0 + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:264 + def remaining_arities(children, last_arity); end + + # returns truthy iff `@cur_index` switched to relative from end mode (i.e. < 0) + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:346 + def use_index_from_end; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:88 + def visit_any_order; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:155 + def visit_capture; end + + # Single node patterns are all handled here + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:62 + def visit_other_type; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:78 + def visit_repetition; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:164 + def visit_rest; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:109 + def visit_union; end + + # NOTE: assumes `@cur_index != :seq_head`. Node types using `within_loop` must + # have `def in_sequence_head; :raise; end` + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:338 + def within_loop; end +end + +# Shift of 1 from standard Ruby indices +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:18 +RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler::DELTA = T.let(T.unsafe(nil), Integer) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:19 +RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler::POSITIVE = T.let(T.unsafe(nil), Proc) + +# Base class for subcompilers +# Implements visitor pattern +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/subcompiler.rb:12 +class RuboCop::AST::NodePattern::Compiler::Subcompiler + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/subcompiler.rb:15 + def initialize(compiler); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/subcompiler.rb:20 + def compile(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/subcompiler.rb:13 + def compiler; end + + private + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/subcompiler.rb:34 + def do_compile; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/subcompiler.rb:32 + def node; end + + class << self + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/subcompiler.rb:47 + def inherited(base); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/subcompiler.rb:42 + def method_added(method); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/subcompiler.rb:40 + def registry; end + end +end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:27 +class RuboCop::AST::NodePattern::Invalid < ::StandardError; end + +# Lexer class for `NodePattern` +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rb:18 +class RuboCop::AST::NodePattern::Lexer < ::RuboCop::AST::NodePattern::LexerRex + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rb:31 + def initialize(source); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rb:29 + def comments; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rb:29 + def source_buffer; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rb:29 + def tokens; end + + private + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rb:60 + def do_parse; end + + # @return [token] + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rb:40 + def emit(type); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rb:48 + def emit_comment; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rb:52 + def emit_regexp; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rb:64 + def token(type, value); end +end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rb:19 +RuboCop::AST::NodePattern::Lexer::Error = RuboCop::AST::NodePattern::LexerRex::ScanError + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rb:21 +RuboCop::AST::NodePattern::Lexer::REGEXP_OPTIONS = T.let(T.unsafe(nil), Hash) + +# The generated lexer RuboCop::AST::NodePattern::LexerRex +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:23 +class RuboCop::AST::NodePattern::LexerRex + # Yields on the current action. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:69 + def action; end + + # The file name / path + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:43 + def filename; end + + # The file name / path + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:43 + def filename=(_arg0); end + + # The current location in the parse. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:103 + def location; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:55 + def match; end + + # The match groups for the current scan. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:60 + def matches; end + + # Lex the next token. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:112 + def next_token; end + + # Parse the given string. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:83 + def parse(str); end + + # Read in and parse the file at +path+. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:93 + def parse_file(path); end + + # The current scanner class. Must be overridden in subclasses. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:76 + def scanner_class; end + + # The StringScanner for this lexer. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:48 + def ss; end + + # The StringScanner for this lexer. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:48 + def ss=(_arg0); end + + # The current lexical state. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:53 + def state; end + + # The current lexical state. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:53 + def state=(_arg0); end +end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:31 +RuboCop::AST::NodePattern::LexerRex::CALL = T.let(T.unsafe(nil), Regexp) + +# :stopdoc: +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:27 +RuboCop::AST::NodePattern::LexerRex::CONST_NAME = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:29 +RuboCop::AST::NodePattern::LexerRex::IDENTIFIER = T.let(T.unsafe(nil), Regexp) + +# :startdoc: +# :stopdoc: +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:36 +class RuboCop::AST::NodePattern::LexerRex::LexerError < ::StandardError; end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:30 +RuboCop::AST::NodePattern::LexerRex::NODE_TYPE = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:33 +RuboCop::AST::NodePattern::LexerRex::REGEXP = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:32 +RuboCop::AST::NodePattern::LexerRex::REGEXP_BODY = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:28 +RuboCop::AST::NodePattern::LexerRex::SYMBOL_NAME = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/lexer.rex.rb:37 +class RuboCop::AST::NodePattern::LexerRex::ScanError < ::RuboCop::AST::NodePattern::LexerRex::LexerError; end + +# Helpers for defining methods based on a pattern string +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:30 +module RuboCop::AST::NodePattern::Macros + # Define a method which applies a pattern to an AST node + # + # The new method will return nil if the node does not match. + # If the node matches, and a block is provided, the new method will + # yield to the block (passing any captures as block arguments). + # If the node matches, and no block is provided, the new method will + # return the captures, or `true` if there were none. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:38 + def def_node_matcher(method_name, pattern_str, **keyword_defaults); end + + # Define a method which recurses over the descendants of an AST node, + # checking whether any of them match the provided pattern + # + # If the method name ends with '?', the new method will return `true` + # as soon as it finds a descendant which matches. Otherwise, it will + # yield all descendants which match. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:48 + def def_node_search(method_name, pattern_str, **keyword_defaults); end +end + +# Functionality to turn `match_code` into methods/lambda +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:7 +module RuboCop::AST::NodePattern::MethodDefiner + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:37 + def as_lambda; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:27 + def compile_as_lambda; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:8 + def def_node_matcher(base, method_name, **defaults); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:21 + def def_node_search(base, method_name, **defaults); end + + private + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:139 + def compile_init; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:50 + def def_helper(base, method_name, **defaults); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:114 + def emit_keyword_list(forwarding: T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:132 + def emit_lambda_code; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:125 + def emit_method_code; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:63 + def emit_node_search(method_name); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:74 + def emit_node_search_body(method_name, prelude:, on_match:); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:110 + def emit_param_list; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:119 + def emit_params(*first, forwarding: T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:100 + def emit_retval; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:89 + def emit_yield_capture(when_no_capture = T.unsafe(nil), yield_with: T.unsafe(nil)); end + + # This method minimizes the closure for our method + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/method_definer.rb:44 + def wrapping_block(method_name, **defaults); end +end + +# Base class for AST Nodes of a `NodePattern` +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:7 +class RuboCop::AST::NodePattern::Node < ::Parser::AST::Node + include ::RuboCop::AST::Descendence + extend ::RuboCop::SimpleForwardable + + # @return [Integer, Range] An Integer for fixed length terms, otherwise a Range. + # Note: `arity.end` may be `Float::INFINITY` + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:28 + def arity; end + + # @return [Range] arity as a Range + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:68 + def arity_range; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:22 + def capture?; end + + # @return [Node] most nodes have only one child + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:47 + def child; end + + # @return [Array] + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:42 + def children_nodes; end + + # @return [Array, nil] replace node with result, or `nil` if no change requested. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:33 + def in_sequence_head; end + + # @return [Boolean] returns true for nodes having a Ruby literal equivalent + # that matches within a Set (e.g. `42`, `:sym` but not `/regexp/`) + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:63 + def matches_within_set?; end + + # @return [Integer] nb of captures that this node will emit + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:52 + def nb_captures; end + + # To be overridden by subclasses + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:18 + def rest?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:77 + def source_range; end + + # @return [Boolean] returns whether it matches a variable number of elements + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:57 + def variadic?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:73 + def with(type: T.unsafe(nil), children: T.unsafe(nil), location: T.unsafe(nil)); end +end + +# Node class for `` +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:179 +class RuboCop::AST::NodePattern::Node::AnyOrder < ::RuboCop::AST::NodePattern::Node + include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:197 + def arity; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:189 + def ends_with_rest?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:193 + def rest_node; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:185 + def term_nodes; end +end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:182 +RuboCop::AST::NodePattern::Node::AnyOrder::ARITIES = T.let(T.unsafe(nil), Hash) + +# Node class for `$something` +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:96 +class RuboCop::AST::NodePattern::Node::Capture < ::RuboCop::AST::NodePattern::Node + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:98 + def arity(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:100 + def capture?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:108 + def in_sequence_head; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:104 + def nb_captures; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:98 + def rest?(*, **, &); end +end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:85 +module RuboCop::AST::NodePattern::Node::ForbidInSeqHead + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:86 + def in_sequence_head; end +end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:139 +RuboCop::AST::NodePattern::Node::FunctionCall = RuboCop::AST::NodePattern::Node::Predicate + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:81 +RuboCop::AST::NodePattern::Node::INT_TO_RANGE = T.let(T.unsafe(nil), Hash) + +# Registry +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:255 +RuboCop::AST::NodePattern::Node::MAP = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:11 +RuboCop::AST::NodePattern::Node::MATCHES_WITHIN_SET = T.let(T.unsafe(nil), Set) + +# Node class for `predicate?(:arg, :list)` +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:130 +class RuboCop::AST::NodePattern::Node::Predicate < ::RuboCop::AST::NodePattern::Node + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:135 + def arg_list; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:131 + def method_name; end +end + +# Node class for `int+` +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:142 +class RuboCop::AST::NodePattern::Node::Repetition < ::RuboCop::AST::NodePattern::Node + include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:155 + def arity; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:145 + def operator; end +end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:149 +RuboCop::AST::NodePattern::Node::Repetition::ARITIES = T.let(T.unsafe(nil), Hash) + +# Node class for `...` +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:161 +class RuboCop::AST::NodePattern::Node::Rest < ::RuboCop::AST::NodePattern::Node + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:169 + def arity; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:173 + def in_sequence_head; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:165 + def rest?; end +end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:162 +RuboCop::AST::NodePattern::Node::Rest::ARITY = T.let(T.unsafe(nil), Range) + +# Node class for `(type first second ...)` +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:117 +class RuboCop::AST::NodePattern::Node::Sequence < ::RuboCop::AST::NodePattern::Node + include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:120 + def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end +end + +# A list (potentially empty) of nodes; part of a Union +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:205 +class RuboCop::AST::NodePattern::Node::Subsequence < ::RuboCop::AST::NodePattern::Node + include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:208 + def arity; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:213 + def in_sequence_head; end +end + +# Node class for `{ ... }` +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:223 +class RuboCop::AST::NodePattern::Node::Union < ::RuboCop::AST::NodePattern::Node + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:224 + def arity; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:231 + def in_sequence_head; end + + # Each child in a union must contain the same number + # of captures. Only one branch ends up capturing. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/node.rb:249 + def nb_captures; end +end + +# Parser for NodePattern +# Note: class reopened in `parser.racc` +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:12 +class RuboCop::AST::NodePattern::Parser < ::Racc::Parser + extend ::RuboCop::SimpleForwardable + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.rb:19 + def initialize(builder = T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:335 + def _reduce_10(val, _values); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:339 + def _reduce_11(val, _values); end + + # reduce 12 omitted + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:345 + def _reduce_13(val, _values); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:349 + def _reduce_14(val, _values); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:353 + def _reduce_15(val, _values); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:357 + def _reduce_16(val, _values); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:361 + def _reduce_17(val, _values); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:365 + def _reduce_18(val, _values); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:369 + def _reduce_19(val, _values); end + + # reduce 1 omitted + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:303 + def _reduce_2(val, _values); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:373 + def _reduce_20(val, _values); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:377 + def _reduce_21(val, _values); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:381 + def _reduce_22(val, _values); end + + # reduce 24 omitted + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:389 + def _reduce_25(val, _values); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:395 + def _reduce_26(val, _values); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:307 + def _reduce_3(val, _values); end + + # reduce 32 omitted + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:415 + def _reduce_33(val, _values); end + + # reduce 36 omitted + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:425 + def _reduce_37(val, _values); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:429 + def _reduce_38(val, _values); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:433 + def _reduce_39(val, _values); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:311 + def _reduce_4(val, _values); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:437 + def _reduce_40(val, _values); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:441 + def _reduce_41(val, _values); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:445 + def _reduce_42(val, _values); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:449 + def _reduce_43(val, _values); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:453 + def _reduce_44(val, _values); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:457 + def _reduce_45(val, _values); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:461 + def _reduce_46(val, _values); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:315 + def _reduce_5(val, _values); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:319 + def _reduce_6(val, _values); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:323 + def _reduce_7(val, _values); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:327 + def _reduce_8(val, _values); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:331 + def _reduce_9(val, _values); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:465 + def _reduce_none(val, _values); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.rb:46 + def emit_atom(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.rb:46 + def emit_call(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.rb:46 + def emit_capture(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.rb:46 + def emit_list(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.rb:46 + def emit_unary_op(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.rb:46 + def emit_union(*, **, &); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.rb:40 + def inspect; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.rb:48 + def next_token(*, **, &); end + + # (Similar API to `parser` gem) + # Parses a source and returns the AST. + # + # @param [Parser::Source::Buffer, String] source_buffer The source buffer to parse. + # @return [NodePattern::Node] + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.rb:31 + def parse(source); end + + private + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.rb:50 + def enforce_unary(node); end + + # Overrides Racc::Parser's method: + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.rb:59 + def on_error(token, val, _vstack); end +end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.rb:16 +RuboCop::AST::NodePattern::Parser::Builder = RuboCop::AST::NodePattern::Builder + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.rb:17 +RuboCop::AST::NodePattern::Parser::Lexer = RuboCop::AST::NodePattern::Lexer + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:227 +RuboCop::AST::NodePattern::Parser::Racc_arg = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:295 +RuboCop::AST::NodePattern::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) + +# pkg:gem/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 +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:8 +class RuboCop::AST::NodePattern::Parser::WithMeta < ::RuboCop::AST::NodePattern::Parser + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:98 + def comments; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:100 + def do_parse; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:98 + def tokens; end +end + +# Overrides Builder to emit nodes with locations +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:39 +class RuboCop::AST::NodePattern::Parser::WithMeta::Builder < ::RuboCop::AST::NodePattern::Builder + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:40 + def emit_atom(type, token); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:61 + def emit_call(type, selector_t, args = T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:55 + def emit_list(type, begin_t, children, end_t); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:49 + def emit_unary_op(type, operator_t = T.unsafe(nil), *children); end + + private + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:81 + def join_exprs(left_expr, right_expr); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:75 + def loc(token_or_range); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:71 + def n(type, children, source_map); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:85 + def source_map(token_or_range, begin_t: T.unsafe(nil), end_t: T.unsafe(nil), operator_t: T.unsafe(nil), selector_t: T.unsafe(nil)); end +end + +# Overrides Lexer to token locations and comments +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:10 +class RuboCop::AST::NodePattern::Parser::WithMeta::Lexer < ::RuboCop::AST::NodePattern::Lexer + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:13 + def initialize(str_or_buffer); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:27 + def emit_comment; end + + # @return [::Parser::Source::Range] last match's position + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:33 + def pos; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:11 + def source_buffer; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/with_meta.rb:23 + def token(type, value); end +end + +# Utility to assign a set of values to a constant +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:7 +module RuboCop::AST::NodePattern::Sets + class << self + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:31 + def [](set); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:15 + def name(set); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:22 + def uniq(name); end + end +end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:14 +RuboCop::AST::NodePattern::Sets::MAX = T.let(T.unsafe(nil), Integer) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:8 +RuboCop::AST::NodePattern::Sets::REGISTRY = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_0_1 = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_0_1_2 = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_10_10 = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_1_1 = T.let(T.unsafe(nil), Set) + +# pkg:gem/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) + +# pkg:gem/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) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_ANY_EMPTY_NONE_ETC = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_ANY_NONE = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_ARRAY_HASH = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_ARRAY_HASH_SET_ETC = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_ATTR_READER_ATTR_WRITER_ATTR_ACCESSOR = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_ATTR_READER_ATTR_WRITER_ATTR_ACCESSOR_ATTR = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_BRANCH_REF_TAG = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_CALLER_CALLER_LOCATIONS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_CAPTURE2_CAPTURE2E_CAPTURE3_ETC = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_CIPHER_DIGEST = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_CLASS_EVAL_INSTANCE_EVAL = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_CLASS_EVAL_MODULE_EVAL = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_CLASS_MODULE = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_CLASS_MODULE_STRUCT = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_CLONE_DUP_FREEZE = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_COUNT_LENGTH_SIZE = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_COVER_INCLUDE = T.let(T.unsafe(nil), Set) + +# pkg:gem/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) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_DEF_DELEGATORS_DEF_INSTANCE_DELEGATORS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_DEF_DELEGATOR_DEF_INSTANCE_DELEGATOR = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_DOWNCASE_UPCASE = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_EACH_WITH_INDEX_WITH_INDEX = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_EACH_WITH_OBJECT_WITH_OBJECT = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_ESCAPE_ENCODE_UNESCAPE_DECODE = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_EXIST_EXISTS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_EXTEND_INCLUDE = T.let(T.unsafe(nil), Set) + +# pkg:gem/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) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_FILE_DIR = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_FILE_FILETEST = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_FILE_TEMPFILE = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_FILE_TEMPFILE_STRINGIO = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_FIND_DETECT = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_FIRST_LAST__ETC = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_FIXNUM_BIGNUM = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_FLATTEN_FLATTEN = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_FORMAT_SPRINTF_PRINTF = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_GETHOSTBYADDR_GETHOSTBYNAME = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_GROUP_BY_TO_H_TALLY_ETC = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_GSUB_GSUB = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_GSUB_GSUB_SUB_SUB = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_IF_UNLESS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_INCLUDE_EXTEND_PREPEND = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_INCLUDE_PREPEND = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_INSTANCE_EVAL_CLASS_EVAL_MODULE_EVAL = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_INSTANCE_EXEC_CLASS_EXEC_MODULE_EXEC = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_INTEGER_BIGDECIMAL_COMPLEX_RATIONAL = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_IO_FILE = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_IS_A_KIND_OF = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_KEYS_VALUES = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_KEY_HAS_KEY_FETCH_ETC = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_LAMBDA_PROC = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_LAST_FIRST = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_LAZY_CHAIN = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_LENGTH_SIZE = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_LOAD_RESTORE = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_MAP_COLLECT = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_MAP_FILTER_MAP = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_MATCH_MATCH = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_MATCH_MATCH_ = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_MATCH__MATCH = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_MAX_BY_MIN_BY_MINMAX_BY = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_MEMBER_INCLUDE = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_MODULE_FUNCTION_RUBY2_KEYWORDS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_NEW_ = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_NEW_COMPILE = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_NEW_OPEN = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_NIL_ = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_PIPELINE_PIPELINE_R_PIPELINE_RW_ETC = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_POSITIVE_ZERO = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED_PRIVATE_CLASS_METHOD = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED_PUBLIC = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_PROP_CONST = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_PUBLIC_CONSTANT_PRIVATE_CONSTANT = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_PUBLIC_PROTECTED_PRIVATE_MODULE_FUNCTION = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_RAISE_FAIL = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_RAISE_FAIL_THROW_ETC = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_READ_BINREAD = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_REDUCE_INJECT = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_REJECT_REJECT = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_REQUIRE_REQUIRE_RELATIVE = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_REVERSE_REVERSE_EACH = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_SELECT_FILTER = T.let(T.unsafe(nil), Set) + +# pkg:gem/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) + +# pkg:gem/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) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_SELECT_SELECT_FILTER_FILTER = T.let(T.unsafe(nil), Set) + +# pkg:gem/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) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_SET_SORTEDSET = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_SIG_HELPERS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_SILENCE_REDEFINITION_OF_METHOD_REDEFINE_METHOD = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_SORT_BY_SORT = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_SORT_SORT_MIN_ETC = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_SPAWN_SYSTEM = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_SPRINTF_FORMAT = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_SQUISH_SQUISH = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_STRUCT_CLASS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_STRUCT_IMMUTABLESTRUCT = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_STRUCT_IMMUTABLESTRUCT_INEXACTSTRUCT = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_SUCC_PRED_NEXT = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_TESTS_ALWAYS = T.let(T.unsafe(nil), Set) + +# pkg:gem/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) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_TO_H_TO_HASH = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_TO_H_TO_HASH_MERGE_ETC = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_TO_I_TO_F_TO_C_TO_R = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_TRUE_FALSE = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_TYPE_MEMBER_TYPE_TEMPLATE = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_ZERO_POSITIVE_NEGATIVE = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET__ = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET__AT_SLICE = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET__DUP = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET__EQL_ = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET__EQUAL_EQL = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET__FETCH = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET__GLOB = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET__PUSH_APPEND = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET___ = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET___10 = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET___2 = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET___3 = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET___4 = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET___5 = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET___6 = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET___7 = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET___8 = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET___9 = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET___MATCH_MATCH = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET___METHOD_____CALLEE__ = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET____ = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET____2 = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET____ETC = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET____ETC_2 = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET____ETC_3 = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_____2 = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:56 +RuboCop::AST::NodePattern::VAR = T.let(T.unsafe(nil), String) + +# Common functionality for primitive numeric nodes: `int`, `float`, `rational`, `complex`... +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/numeric_node.rb:6 +module RuboCop::AST::NumericNode + # Checks whether this literal has a sign. + # + # @example + # + # +42 + # + # @return [Boolean] whether this literal has a sign. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/numeric_node.rb:17 + def sign?; end +end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/numeric_node.rb:7 +RuboCop::AST::NumericNode::SIGN_REGEX = T.let(T.unsafe(nil), Regexp) + +# A node extension for `op_asgn` nodes. +# 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. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/op_asgn_node.rb:8 +class RuboCop::AST::OpAsgnNode < ::RuboCop::AST::Node + # @return [AsgnNode] the assignment node + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/op_asgn_node.rb:10 + def assignment_node; end + + # The expression being assigned to the variable. + # + # @return [Node] the expression being assigned. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/op_asgn_node.rb:32 + def expression; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/op_asgn_node.rb:13 + def lhs; end + + # The name of the variable being assigned as a symbol. + # + # @return [Symbol] the name of the variable being assigned + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/op_asgn_node.rb:18 + def name; end + + # The operator being used for assignment as a symbol. + # + # @return [Symbol] the assignment operator + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/op_asgn_node.rb:25 + def operator; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/op_asgn_node.rb:35 + def rhs; end +end + +# A node extension for `op_asgn` nodes. +# 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. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/or_asgn_node.rb:8 +class RuboCop::AST::OrAsgnNode < ::RuboCop::AST::OpAsgnNode + # The operator being used for assignment as a symbol. + # + # @return [Symbol] the assignment operator + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/or_asgn_node.rb:12 + def operator; end +end + +# A node extension for `or` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `or` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/or_node.rb:8 +class RuboCop::AST::OrNode < ::RuboCop::AST::Node + include ::RuboCop::AST::BinaryOperatorNode + include ::RuboCop::AST::PredicateOperatorNode + + # Returns the alternate operator of the `or` as a string. + # Returns `or` for `||` and vice versa. + # + # @return [String] the alternate of the `or` operator + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/or_node.rb:16 + def alternate_operator; end + + # Returns the inverse keyword of the `or` node as a string. + # Returns `and` for `or` and `&&` for `||`. + # + # @return [String] the inverse of the `or` operator + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/or_node.rb:24 + def inverse_operator; end +end + +# A node extension for `pair` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `pair` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/pair_node.rb:8 +class RuboCop::AST::PairNode < ::RuboCop::AST::Node + include ::RuboCop::AST::HashElementNode + + # Checks whether the `pair` uses a colon delimiter. + # + # @return [Boolean] whether this `pair` uses a colon delimiter + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/pair_node.rb:30 + def colon?; end + + # Returns the delimiter of the `pair` as a string. Returns `=>` for a + # hash rocket delimited `pair` and `:` for a colon delimited `pair`. + # + # @param [Boolean] with_spacing whether to include spacing + # @return [String] the delimiter of the `pair` + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/pair_node.rb:39 + def delimiter(*deprecated, with_spacing: T.unsafe(nil)); end + + # Checks whether the `pair` uses a hash rocket delimiter. + # + # @return [Boolean] whether this `pair` uses a hash rocket delimiter + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/pair_node.rb:23 + def hash_rocket?; end + + # Returns the inverse delimiter of the `pair` as a string. + # + # @param [Boolean] with_spacing whether to include spacing + # @return [String] the inverse delimiter of the `pair` + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/pair_node.rb:51 + def inverse_delimiter(*deprecated, with_spacing: T.unsafe(nil)); end + + # Checks whether the `pair` uses hash value omission. + # + # @return [Boolean] whether this `pair` uses hash value omission + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/pair_node.rb:69 + def value_omission?; end + + # Checks whether the value starts on its own line. + # + # @return [Boolean] whether the value in the `pair` starts its own line + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/pair_node.rb:62 + def value_on_new_line?; end +end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/pair_node.rb:15 +RuboCop::AST::PairNode::COLON = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/pair_node.rb:11 +RuboCop::AST::PairNode::HASH_ROCKET = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/pair_node.rb:17 +RuboCop::AST::PairNode::SPACED_COLON = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/pair_node.rb:13 +RuboCop::AST::PairNode::SPACED_HASH_ROCKET = T.let(T.unsafe(nil), String) + +# Requires implementing `arguments`. +# +# Common functionality for nodes that are parameterized: +# `send`, `super`, `zsuper`, `def`, `defs` +# and (modern only): `index`, `indexasgn`, `lambda` +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:10 +module RuboCop::AST::ParameterizedNode + # Checks whether this node has any arguments. + # + # @return [Boolean] whether this node has any arguments + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:40 + def arguments?; end + + # Whether the last argument of the node is a block pass, + # i.e. `&block`. + # + # @return [Boolean] whether the last argument of the node is a block pass + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:58 + def block_argument?; end + + # A shorthand for getting the first argument of the node. + # Equivalent to `arguments.first`. + # + # @return [Node, nil] the first argument of the node, + # or `nil` if there are no arguments + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:24 + def first_argument; end + + # A shorthand for getting the last argument of the node. + # Equivalent to `arguments.last`. + # + # @return [Node, nil] the last argument of the node, + # or `nil` if there are no arguments + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:33 + def last_argument; end + + # Checks whether this node's arguments are wrapped in parentheses. + # + # @return [Boolean] whether this node's arguments are + # wrapped in parentheses + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:15 + def parenthesized?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:52 + def rest_argument?; end + + # Checks whether any argument of the node is a splat + # argument, i.e. `*splat`. + # + # @return [Boolean] whether the node is a splat argument + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:48 + def splat_argument?; end +end + +# A specialized `ParameterizedNode`. +# Requires implementing `first_argument_index` +# Implements `arguments` as `children[first_argument_index..-1]` +# and optimizes other calls +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:84 +module RuboCop::AST::ParameterizedNode::RestArguments + include ::RuboCop::AST::ParameterizedNode + + # @return [Array] arguments, if any + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:90 + def arguments; end + + # Checks whether this node has any arguments. + # + # @return [Boolean] whether this node has any arguments + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:120 + def arguments?; end + + # A shorthand for getting the first argument of the node. + # Equivalent to `arguments.first`. + # + # @return [Node, nil] the first argument of the node, + # or `nil` if there are no arguments + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:104 + def first_argument; end + + # A shorthand for getting the last argument of the node. + # Equivalent to `arguments.last`. + # + # @return [Node, nil] the last argument of the node, + # or `nil` if there are no arguments + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:113 + def last_argument; end +end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:87 +RuboCop::AST::ParameterizedNode::RestArguments::EMPTY_ARGUMENTS = T.let(T.unsafe(nil), Array) + +# A specialized `ParameterizedNode` for node that have a single child +# containing either `nil`, an argument, or a `begin` node with all the +# arguments +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:66 +module RuboCop::AST::ParameterizedNode::WrappedArguments + include ::RuboCop::AST::ParameterizedNode + + # @return [Array] The arguments of the node. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/parameterized_node.rb:70 + def arguments; end +end + +# Common functionality for nodes that are predicates: +# `or`, `and` ... +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/predicate_operator_node.rb:7 +module RuboCop::AST::PredicateOperatorNode + # Checks whether this is a logical operator. + # + # @return [Boolean] whether this is a logical operator + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/predicate_operator_node.rb:32 + def logical_operator?; end + + # Returns the operator as a string. + # + # @return [String] the operator + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/predicate_operator_node.rb:25 + def operator; end + + # Checks whether this is a semantic operator. + # + # @return [Boolean] whether this is a semantic operator + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/predicate_operator_node.rb:39 + def semantic_operator?; end +end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/predicate_operator_node.rb:8 +RuboCop::AST::PredicateOperatorNode::LOGICAL_AND = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/predicate_operator_node.rb:17 +RuboCop::AST::PredicateOperatorNode::LOGICAL_OPERATORS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/predicate_operator_node.rb:12 +RuboCop::AST::PredicateOperatorNode::LOGICAL_OR = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/predicate_operator_node.rb:10 +RuboCop::AST::PredicateOperatorNode::SEMANTIC_AND = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/predicate_operator_node.rb:19 +RuboCop::AST::PredicateOperatorNode::SEMANTIC_OPERATORS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/predicate_operator_node.rb:14 +RuboCop::AST::PredicateOperatorNode::SEMANTIC_OR = T.let(T.unsafe(nil), String) + +# Extends the prism translation parsers so that the conversion of tokens +# into the `parser` gem's format is deferred until the tokens are first +# accessed. Building the tokens is a significant part of the translation +# cost, and not every caller needs them. +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:33 +module RuboCop::AST::PrismLazyTokens + # Same contract as `Parser::Base#tokenize`, except the tokens are + # returned as a callable that performs the conversion when invoked. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:36 + def tokenize_deferred(source_buffer); end + + private + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:54 + def deferred_tokens(source_buffer, tokens, offset_cache); end +end + +# A `Prism` interface's class that provides a fixed `Prism::ParseLexResult` instead of parsing. +# +# This class implements the `parse_lex` method to return a preparsed `Prism::ParseLexResult` +# rather than parsing the source code. When the parse result is already available externally, +# such as in Ruby LSP, the Prism parsing process can be bypassed. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:12 +class RuboCop::AST::PrismPreparsed + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:13 + def initialize(prism_result); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:23 + def parse_lex(_source, **_prism_options); end +end + +# A node extension for `procarg0` nodes. +# 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. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/procarg0_node.rb:8 +class RuboCop::AST::Procarg0Node < ::RuboCop::AST::ArgNode + # Returns the name of an argument. + # + # @return [Symbol, nil] the name of the argument + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/procarg0_node.rb:12 + def name; end +end + +# ProcessedSource contains objects which are generated by Parser +# and other information such as disabled lines for cops. +# It also provides a convenient way to access source lines. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:69 +class RuboCop::AST::ProcessedSource + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:94 + def initialize(source, ruby_version, path = T.unsafe(nil), parser_engine: T.unsafe(nil), prism_result: T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:135 + def [](*args); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:79 + def ast; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:114 + def ast_with_comments; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:174 + def blank?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:79 + def buffer; end + + # Raw source checksum for tracking infinite loops. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:146 + def checksum; end + + # @return [Comment, nil] the comment at that line, if any. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:179 + def comment_at_line(line); end + + # @deprecated use contains_comment? + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:205 + def commented?(source_range); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:79 + def comments; end + + # @deprecated Use `each_comment_in_lines` + # Should have been called `comments_before_or_at_line`. Doubtful it has of any valid use. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:209 + def comments_before_line(line); end + + # @return [Boolean] if any of the lines in the given `source_range` has a comment. + # Consider using `each_comment_in_lines` instead + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:201 + def contains_comment?(source_range); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:225 + def current_line(token); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:79 + def diagnostics; end + + # @deprecated Use `comments.each` + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:151 + def each_comment(&block); end + + # Enumerates on the comments contained with the given `line_range` + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:189 + def each_comment_in_lines(line_range); end + + # @deprecated Use `tokens.each` + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:161 + def each_token(&block); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:170 + def file_path; end + + # @deprecated Use `comment_at_line`, `each_comment_in_lines`, or `comments.find` + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:156 + def find_comment(&block); end + + # @deprecated Use `tokens.find` + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:166 + def find_token(&block); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:259 + def first_token_of(range_or_node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:229 + def following_line(token); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:263 + def last_token_of(range_or_node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:233 + def line_indentation(line_number); end + + # @return [Boolean] if the given line number has a comment. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:184 + def line_with_comment?(line); end + + # Returns the source lines, line break characters removed, excluding a + # possible __END__ and everything that comes after. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:122 + def lines; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:79 + def parser_engine; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:79 + def parser_error; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:79 + def path; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:219 + def preceding_line(token); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:79 + def raw_source; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:79 + def ruby_version; end + + # The tokens list is always sorted by token position, except for cases when heredoc + # is passed as a method argument. In this case tokens are interleaved by + # heredoc contents' tokens. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:270 + def sorted_tokens; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:213 + def start_with?(string); end + + # The tokens of the source. With the prism engine the tokens are built + # lazily on first access, since their conversion is costly and not + # every caller needs them. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:243 + def tokens; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:253 + def tokens_within(range_or_node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:139 + def valid_syntax?; end + + private + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:437 + def builder_class(parser_engine); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:301 + def comment_index; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:447 + def create_parser(ruby_version, parser_engine, prism_result); end + + # Prism is used for all Ruby versions it can parse (3.3 and later); + # the Parser gem does not support Ruby 3.5 or later and is not fully + # compatible with Ruby 3.4. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:496 + def default_parser_engine(ruby_version); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:504 + def first_token_index(range_or_node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:509 + def last_token_index(range_or_node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:479 + def normalize_parser_engine(parser_engine, ruby_version); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:307 + def parse(source, ruby_version, parser_engine, prism_result); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:351 + def parse_and_lex(parser); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:369 + def parser_class(ruby_version, parser_engine); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:359 + def parser_tokens; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:514 + def source_range(range_or_node); end + + # The tokens may be an already converted array, or a deferred conversion + # to be performed when the tokens are first accessed. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:328 + def store_tokens(tokens); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:336 + def tokenize(parser); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:284 + def tokens_sorted?; end + + # `__END__` only starts a data section when it isn't nested inside a + # string or heredoc, which is what the last token's line disambiguates. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:290 + def trim_lines_after_data_marker(all_lines); end + + class << self + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:82 + def from_file(path, ruby_version, parser_engine: T.unsafe(nil)); end + + # Subclasses of the prism translation parsers with lazily built tokens. + # @api private + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:89 + def lazy_tokens_parser_class(base); end + end +end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:73 +RuboCop::AST::ProcessedSource::INVALID_LEVELS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:76 +RuboCop::AST::ProcessedSource::PARSER_ENGINES = T.let(T.unsafe(nil), Array) + +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/processed_source.rb:71 +RuboCop::AST::ProcessedSource::STRING_SOURCE_NAME = T.let(T.unsafe(nil), String) + +# A node extension for `irange` and `erange` nodes. This will be used in +# place of a plain node when the builder constructs the AST, making its +# methods available to all `irange` and `erange` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/range_node.rb:8 +class RuboCop::AST::RangeNode < ::RuboCop::AST::Node + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/range_node.rb:9 + def begin; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/range_node.rb:13 + def end; end +end + +# A node extension for `rational` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available to +# all `rational` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/rational_node.rb:8 +class RuboCop::AST::RationalNode < ::RuboCop::AST::Node + include ::RuboCop::AST::BasicLiteralNode + include ::RuboCop::AST::NumericNode +end + +# A node extension for `regexp` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `regexp` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:8 +class RuboCop::AST::RegexpNode < ::RuboCop::AST::Node + # @return [String] a string of regexp content + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:37 + def content; end + + # @return [Bool] if char is one of the delimiters + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:57 + def delimiter?(char); end + + # @return [String] the regexp delimiters (without %r) + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:52 + def delimiters; end + + # @return [Bool] if regexp uses the extended regopt + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:72 + def extended?; end + + # @return [Bool] if regexp uses the fixed-encoding regopt + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:92 + def fixed_encoding?; end + + # @return [Bool] if regexp uses the ignore-case regopt + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:77 + def ignore_case?; end + + # @return [Bool] if regexp contains interpolation + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:62 + def interpolation?; end + + # @return [Bool] if regexp uses the multiline regopt + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:67 + def multiline_mode?; end + + # @return [Bool] if regexp uses the no-encoding regopt + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:87 + def no_encoding?; end + + # NOTE: The 'o' option is ignored. + # + # @return [Integer] the Regexp option bits as returned by Regexp#options + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:32 + def options; end + + # @return [Bool] if the regexp is a %r{...} literal (using any delimiters) + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:47 + def percent_r_literal?; end + + # @return [RuboCop::AST::Node] a regopt node + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:25 + def regopt; end + + # @return [Bool] if regexp uses the single-interpolation regopt + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:82 + def single_interpolation?; end + + # @return [Bool] if the regexp is a /.../ literal + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:42 + def slash_literal?; end + + # @return [Regexp] a regexp of this node + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:20 + def to_regexp; end + + private + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:98 + def regopt_include?(option); end +end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/regexp_node.rb:9 +RuboCop::AST::RegexpNode::OPTIONS = T.let(T.unsafe(nil), Hash) + +# A node extension for `resbody` nodes. This will be used in place of a +# plain node when the builder constructs the AST, making its methods +# available to all `resbody` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/resbody_node.rb:8 +class RuboCop::AST::ResbodyNode < ::RuboCop::AST::Node + # Returns the body of the `rescue` clause. + # + # @return [Node, nil] The body of the `resbody`. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/resbody_node.rb:12 + def body; end + + # Returns the index of the `resbody` branch within the exception handling statement. + # + # @return [Integer] the index of the `resbody` branch + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/resbody_node.rb:40 + def branch_index; end + + # Returns the exception variable of the `rescue` clause. + # + # @return [Node, nil] The exception variable of the `resbody`. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/resbody_node.rb:33 + def exception_variable; end + + # Returns an array of all the exceptions in the `rescue` clause. + # + # @return [Array] an array of exception nodes + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/resbody_node.rb:19 + def exceptions; end +end + +# A node extension for `rescue` nodes. This will be used in place of a +# plain node when the builder constructs the AST, making its methods +# available to all `rescue` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/rescue_node.rb:8 +class RuboCop::AST::RescueNode < ::RuboCop::AST::Node + # Returns the body of the rescue node. + # + # @return [Node, nil] The body of the rescue node. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/rescue_node.rb:12 + def body; end + + # Returns an array of all the rescue branches in the exception handling statement. + # + # @return [Array] an array of the bodies of the rescue branches + # and the else (if any). Note that these bodies could be nil. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/rescue_node.rb:27 + def branches; end + + # Checks whether this exception handling statement has an `else` branch. + # + # @return [Boolean] whether the exception handling statement has an `else` branch + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/rescue_node.rb:44 + def else?; end + + # Returns the else branch of the exception handling statement, if any. + # + # @return [Node] the else branch node of the exception handling statement + # @return [nil] if the exception handling statement does not have an else branch. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/rescue_node.rb:37 + def else_branch; end + + # Returns an array of all the rescue branches in the exception handling statement. + # + # @return [Array] an array of `resbody` nodes + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/rescue_node.rb:19 + def resbody_branches; end +end + +# A node extension for `return` nodes. This will be used in place of a +# plain node when the builder constructs the AST, making its methods +# available to all `return` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/return_node.rb:8 +class RuboCop::AST::ReturnNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::ParameterizedNode::WrappedArguments +end + +# Responsible for compatibility with main gem +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/rubocop_compatibility.rb:8 +module RuboCop::AST::RuboCopCompatibility + # pkg:gem/rubocop-ast#lib/rubocop/ast/rubocop_compatibility.rb:13 + def rubocop_loaded; end +end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/rubocop_compatibility.rb:9 +RuboCop::AST::RuboCopCompatibility::INCOMPATIBLE_COPS = T.let(T.unsafe(nil), Hash) + +# A node extension for `sclass` nodes. This will be used in place of a +# plain node when the builder constructs the AST, making its methods +# available to all `sclass` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/self_class_node.rb:8 +class RuboCop::AST::SelfClassNode < ::RuboCop::AST::Node + # The body of this `sclass` node. + # + # @return [Node, nil] the body of the class + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/self_class_node.rb:19 + def body; end + + # The identifier for this `sclass` node. (Always `self`.) + # + # @return [Node] the identifier of the class + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/self_class_node.rb:12 + def identifier; end +end + +# A node extension for `send` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `send` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/send_node.rb:8 +class RuboCop::AST::SendNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::ParameterizedNode::RestArguments + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/send_node.rb:13 + def attribute_accessor?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/send_node.rb:18 + def send_type?; end + + private + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/send_node.rb:24 + def first_argument_index; end +end + +# This module provides a shorthand method to create a {Node} like +# `Parser::AST::Sexp`. +# +# @see https://www.rubydoc.info/gems/ast/AST/Sexp +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/sexp.rb:9 +module RuboCop::AST::Sexp + # Creates a {Node} with type `type` and children `children`. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/sexp.rb:11 + def s(type, *children); end +end + +# A node extension for `str`, `dstr`, and `xstr` nodes. This will be used +# in place of a plain node when the builder constructs the AST, making +# its methods available to all `str` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/str_node.rb:8 +class RuboCop::AST::StrNode < ::RuboCop::AST::Node + include ::RuboCop::AST::BasicLiteralNode + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/str_node.rb:26 + def character_literal?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/str_node.rb:22 + def double_quoted?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/str_node.rb:30 + def heredoc?; end + + # Checks whether the string literal is delimited by percent brackets. + # + # @overload percent_literal? + # Check for any string percent literal. + # + # @overload percent_literal?(type) + # Check for a string percent literal of type `type`. + # + # @param type [Symbol] an optional percent literal type + # + # @return [Boolean] whether the string is enclosed in percent brackets + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/str_node.rb:45 + def percent_literal?(type = T.unsafe(nil)); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/str_node.rb:18 + def single_quoted?; end +end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/str_node.rb:11 +RuboCop::AST::StrNode::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Hash) + +# A node extension for `super`- and `zsuper` nodes. This will be used in +# place of a plain node when the builder constructs the AST, making its +# methods available to all `super`- and `zsuper` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/super_node.rb:8 +class RuboCop::AST::SuperNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/super_node.rb:20 + def arguments; end + + # Custom destructuring method. This can be used to normalize + # destructuring for different variations of the node. + # + # @return [Array] the different parts of the `super` node + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/super_node.rb:16 + def node_parts; end +end + +# A node extension for `sym` nodes. This will be used in place of a +# plain node when the builder constructs the AST, making its methods +# available to all `sym` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/symbol_node.rb:8 +class RuboCop::AST::SymbolNode < ::RuboCop::AST::Node + include ::RuboCop::AST::BasicLiteralNode +end + +# A basic wrapper around Parser's tokens. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:6 +class RuboCop::AST::Token + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:18 + def initialize(pos, type, text); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:33 + def begin_pos; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:29 + def column; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:102 + def comma?; end + + # Type Predicates + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:58 + def comment?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:106 + def dot?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:118 + def end?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:37 + def end_pos; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:122 + def equal_sign?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:66 + def left_array_bracket?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:82 + def left_brace?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:74 + def left_bracket?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:86 + def left_curly_brace?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:94 + def left_parens?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:70 + def left_ref_bracket?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:25 + def line; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:126 + def new_line?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:10 + def pos; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:110 + def regexp_dots?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:114 + def rescue_modifier?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:78 + def right_bracket?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:90 + def right_curly_brace?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:98 + def right_parens?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:62 + def semicolon?; end + + # Checks if there is whitespace after token + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:46 + def space_after?; end + + # Checks if there is whitespace before token + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:51 + def space_before?; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:10 + def text; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:41 + def to_s; end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:10 + def type; end + + class << self + # pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:12 + def from_parser_token(parser_token); end + end +end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:8 +RuboCop::AST::Token::LEFT_CURLY_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/token.rb:7 +RuboCop::AST::Token::LEFT_PAREN_TYPES = T.let(T.unsafe(nil), Array) + +# Provides methods for traversing an AST. +# Does not transform an AST; for that, use Parser::AST::Processor. +# Override methods to perform custom processing. Remember to call `super` +# if you want to recursively process descendant nodes. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:9 +module RuboCop::AST::Traversal + extend ::RuboCop::AST::Traversal::CallbackCompiler + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 + def on_(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on___ENCODING__(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on___FILE__(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on___LINE__(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_alias(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_and(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_and_asgn(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_arg(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_arg_expr(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_args(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_array(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_array_pattern(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_array_pattern_with_tail(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_back_ref(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_begin(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 + def on_block(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 + def on_block_pass(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_blockarg(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_blocknilarg(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_break(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 + def on_case(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_case_match(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 + def on_casgn(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_cbase(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 + def on_class(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_complex(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 + def on_const(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_const_pattern(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_csend(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_cvar(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_cvasgn(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 + def on_def(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_defined?(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 + def on_defs(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 + def on_dstr(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_dsym(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_eflipflop(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_empty_else(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_ensure(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_erange(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_false(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_find_pattern(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_float(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_for(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_forward_arg(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_forward_args(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_forwarded_args(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_forwarded_kwrestarg(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_forwarded_restarg(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_gvar(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_gvasgn(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_hash(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_hash_pattern(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 + def on_if(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_if_guard(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_iflipflop(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_in_match(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_in_pattern(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_index(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_indexasgn(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 + def on_int(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_irange(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 + def on_itblock(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_ivar(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_ivasgn(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_kwarg(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_kwargs(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_kwbegin(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_kwnilarg(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_kwoptarg(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_kwrestarg(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_kwsplat(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_lambda(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_lvar(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 + def on_lvasgn(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_masgn(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_match_alt(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_match_as(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_match_current_line(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_match_nil_pattern(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_match_pattern(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_match_pattern_p(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_match_rest(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_match_var(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_match_with_lvasgn(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_match_with_trailing_comma(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_mlhs(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_module(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_mrasgn(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_next(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_nil(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 + def on_not(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_nth_ref(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 + def on_numblock(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 + def on_op_asgn(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 + def on_optarg(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_or(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_or_asgn(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_pair(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_pin(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_postexe(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_preexe(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_procarg0(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_rasgn(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_rational(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_redo(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_regexp(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 + def on_regopt(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_resbody(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_rescue(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 + def on_restarg(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_retry(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_return(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_sclass(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_self(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 + def on_send(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_shadowarg(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 + def on_splat(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_str(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_super(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_sym(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 + def on_true(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_undef(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_unless_guard(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_until(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_until_post(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_when(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 + def on_while(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_while_post(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_xstr(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_yield(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 + def on_zsuper(node); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:17 + def walk(node); end +end + +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:25 +module RuboCop::AST::Traversal::CallbackCompiler + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:54 + def body(child_node_types, expected_children_count); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:68 + def children_count_check_code(range); end + + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:38 + def def_callback(type, *child_node_types, expected_children_count: T.unsafe(nil), body: T.unsafe(nil)); end +end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:26 +RuboCop::AST::Traversal::CallbackCompiler::SEND = T.let(T.unsafe(nil), String) + +# How a particular child node should be visited. For example, if a child node +# can be nil it should be guarded behind a nil check. Or, if a child node is a literal +# (like a symbol) then the literal itself should not be visited. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:32 +RuboCop::AST::Traversal::CallbackCompiler::TEMPLATE = T.let(T.unsafe(nil), Hash) + +# Only for debugging. +# @api private +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:12 +class RuboCop::AST::Traversal::DebugError < ::RuntimeError; end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:110 +RuboCop::AST::Traversal::NO_CHILD_NODES = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:15 +RuboCop::AST::Traversal::TYPE_TO_METHOD = T.let(T.unsafe(nil), Hash) + +# A node extension for `until` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `until` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/until_node.rb:8 +class RuboCop::AST::UntilNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ConditionalNode + include ::RuboCop::AST::ModifierNode + + # Checks whether the `until` node has a `do` keyword. + # + # @return [Boolean] whether the `until` node has a `do` keyword + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/until_node.rb:30 + def do?; end + + # Returns the inverse keyword of the `until` node as a string. + # Returns `while` for `until` nodes and vice versa. + # + # @return [String] the inverse keyword of the `until` statement + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/until_node.rb:23 + def inverse_keyword; end + + # Returns the keyword of the `until` statement as a string. + # + # @return [String] the keyword of the `until` statement + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/until_node.rb:15 + def keyword; end +end + +# A node extension for `lvar`, `ivar`, `cvar` and `gvar` nodes. +# 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. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/var_node.rb:8 +class RuboCop::AST::VarNode < ::RuboCop::AST::Node + # @return [Symbol] The name of the variable. + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/var_node.rb:10 + def name; end +end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/version.rb:5 +module RuboCop::AST::Version; end + +# pkg:gem/rubocop-ast#lib/rubocop/ast/version.rb:6 +RuboCop::AST::Version::STRING = T.let(T.unsafe(nil), String) + +# A node extension for `when` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `when` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/when_node.rb:8 +class RuboCop::AST::WhenNode < ::RuboCop::AST::Node + # Returns the body of the `when` node. + # + # @return [Node, nil] the body of the `when` node + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/when_node.rb:42 + def body; end + + # Returns the index of the `when` branch within the `case` statement. + # + # @return [Integer] the index of the `when` branch + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/when_node.rb:28 + def branch_index; end + + # Returns an array of all the conditions in the `when` branch. + # + # @return [Array] an array of condition nodes + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/when_node.rb:12 + def conditions; end + + # @deprecated Use `conditions.each` + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/when_node.rb:17 + def each_condition(&block); end + + # Checks whether the `when` node has a `then` keyword. + # + # @return [Boolean] whether the `when` node has a `then` keyword + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/when_node.rb:35 + def then?; end +end + +# A node extension for `while` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `while` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/while_node.rb:8 +class RuboCop::AST::WhileNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ConditionalNode + include ::RuboCop::AST::ModifierNode + + # Checks whether the `while` node has a `do` keyword. + # + # @return [Boolean] whether the `while` node has a `do` keyword + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/while_node.rb:30 + def do?; end + + # Returns the inverse keyword of the `while` node as a string. + # Returns `until` for `while` nodes and vice versa. + # + # @return [String] the inverse keyword of the `while` statement + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/while_node.rb:23 + def inverse_keyword; end + + # Returns the keyword of the `while` statement as a string. + # + # @return [String] the keyword of the `while` statement + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/while_node.rb:15 + def keyword; end +end + +# A node extension for `yield` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `yield` nodes within RuboCop. +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/node/yield_node.rb:8 +class RuboCop::AST::YieldNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode + + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/yield_node.rb:20 + def arguments; end + + # Custom destructuring method. This can be used to normalize + # destructuring for different variations of the node. + # + # @return [Array] the different parts of the `send` node + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node/yield_node.rb:16 + def node_parts; end +end + +class RuboCop::CommentConfig; end +class RuboCop::Config; end +class RuboCop::ConfigValidator; end + +# Similar to `Forwardable#def_delegators`, but simpler & faster +# +# pkg:gem/rubocop-ast#lib/rubocop/ast/utilities/simple_forwardable.rb:5 +module RuboCop::SimpleForwardable + # pkg:gem/rubocop-ast#lib/rubocop/ast/utilities/simple_forwardable.rb:6 + def def_delegators(accessor, *methods); end +end diff --git a/sorbet/rbi/gems/rubocop-performance@1.24.0.rbi b/sorbet/rbi/gems/rubocop-performance@1.27.0.rbi similarity index 53% rename from sorbet/rbi/gems/rubocop-performance@1.24.0.rbi rename to sorbet/rbi/gems/rubocop-performance@1.27.0.rbi index 7f56768..8cba41f 100644 --- a/sorbet/rbi/gems/rubocop-performance@1.24.0.rbi +++ b/sorbet/rbi/gems/rubocop-performance@1.27.0.rbi @@ -5,49 +5,31 @@ # Please instead update this file by running `bin/tapioca gem rubocop-performance`. -# source://rubocop-performance//lib/rubocop/performance.rb#3 +# pkg:gem/rubocop-performance#lib/rubocop/performance.rb:3 module RuboCop; end -# source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#4 +# pkg:gem/rubocop-performance#lib/rubocop/cop/mixin.rb:4 module RuboCop::Cop; end module RuboCop::Cop::Lint; end +class RuboCop::Cop::Lint::UnusedMethodArgument < ::RuboCop::Cop::Base; end +module RuboCop::Cop::Naming; end +class RuboCop::Cop::Naming::BlockForwarding < ::RuboCop::Cop::Base; end -class RuboCop::Cop::Lint::UnusedMethodArgument < ::RuboCop::Cop::Base - # source://rubocop/1.74.0/lib/rubocop/cop/lint/unused_method_argument.rb#75 - def not_implemented?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop/1.74.0/lib/rubocop/cop/lint/unused_method_argument.rb#128 - def allowed_exception_class?(node); end - - # source://rubocop/1.74.0/lib/rubocop/cop/lint/unused_method_argument.rb#90 - def autocorrect(corrector, node); end - - # source://rubocop/1.74.0/lib/rubocop/cop/lint/unused_method_argument.rb#94 - def check_argument(variable); end - - # source://rubocop/1.74.0/lib/rubocop/cop/lint/unused_method_argument.rb#102 - def ignored_method?(body); end - - # source://rubocop/1.74.0/lib/rubocop/cop/lint/unused_method_argument.rb#107 - def message(variable); end - - class << self - # source://rubocop-performance//lib/rubocop-performance.rb#12 - def autocorrect_incompatible_with; end - - # source://rubocop/1.74.0/lib/rubocop/cop/lint/unused_method_argument.rb#84 - def joining_forces; end - end +# Cops for the `Performance` department. The department's cops are registered for lazy loading +# and their files are loaded on demand. +# +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance.rb:9 +module RuboCop::Cop::Performance + extend ::RuboCop::Cop::LazyLoader 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. # +# @safety +# This cop is unsafe because it can't tell whether the receiver is a class or an object. +# e.g. the false positive was for `Nokogiri::XML::Node#ancestors`. +# # @example # # bad # A.ancestors.include?(B) @@ -55,27 +37,27 @@ module RuboCop::Cop::Performance; end # # good # A <= B # -# source://rubocop-performance//lib/rubocop/cop/performance/ancestors_include.rb#19 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 @@ -83,6 +65,9 @@ RuboCop::Cop::Performance::AncestorsInclude::RESTRICT_ON_SEND = T.let(T.unsafe(n # 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 # +# @safety +# This cop is unsafe for string slices because strings do not have `#take` and `#drop` methods. +# # @example # # bad # array[..2] @@ -98,37 +83,37 @@ RuboCop::Cop::Performance::AncestorsInclude::RESTRICT_ON_SEND = T.let(T.unsafe(n # array.drop(2) # array.take(3) # -# source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#29 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb:62 def on_csend(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#52 + # pkg:gem/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#66 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb:66 def correction(receiver, range_node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#36 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 a float argument to BigDecimal should be converted to a string. @@ -137,6 +122,11 @@ RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice::SLICE_METHODS = T.let(T. # Also identifies places where an integer string argument to BigDecimal should be converted to # an integer. Initializing from Integer is faster than from String for BigDecimal. # +# NOTE: This cop is disabled by default because the performance of initializing with a String +# and Number differ between versions. Additionally, performance depends on the size of the Number, +# and if it is an Integer or a Float. Since this is very specific to `bigdecimal` internals, +# suggestions from this cop are not unlikely to result in code that performs worse than before. +# # @example # # bad # BigDecimal(1.2, 3, exception: true) @@ -154,28 +144,28 @@ RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice::SLICE_METHODS = T.let(T. # BigDecimal(1, 2) # 4.to_d(6) # -# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#29 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb:34 class RuboCop::Cop::Performance::BigDecimalWithNumericArgument < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#39 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb:44 def big_decimal_with_numeric_argument(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#48 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb:53 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#43 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb:48 def to_d(param0 = T.unsafe(nil)); end end -# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#35 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb:40 RuboCop::Cop::Performance::BigDecimalWithNumericArgument::MSG_FROM_FLOAT_TO_STRING = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#36 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb:41 RuboCop::Cop::Performance::BigDecimalWithNumericArgument::MSG_FROM_INTEGER_TO_STRING = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#37 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb:42 RuboCop::Cop::Performance::BigDecimalWithNumericArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # In Ruby 2.7, `UnboundMethod#bind_call` has been added. @@ -194,34 +184,34 @@ RuboCop::Cop::Performance::BigDecimalWithNumericArgument::RESTRICT_ON_SEND = T.l # # good # umethod.bind_call(obj, foo, bar) # -# source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#22 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 @@ -233,41 +223,41 @@ RuboCop::Cop::Performance::BindCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # @example # # bad # def method(&block) -# do_something if block_given? +# do_something if block_given? # end # # # good # def method(&block) -# do_something if block +# do_something if block # end # # # good - block is reassigned # def method(&block) -# block ||= -> { do_something } -# warn "Using default ..." unless block_given? -# # ... +# block ||= -> { do_something } +# warn "Using default ..." unless block_given? +# # ... # end # -# source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#30 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/block_given_with_explicit_block.rb:30 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#38 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/block_given_with_explicit_block.rb:38 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#36 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/block_given_with_explicit_block.rb:36 def reassigns_block_arg?(param0 = T.unsafe(nil), param1); end class << self - # source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#54 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/block_given_with_explicit_block.rb:54 def autocorrect_incompatible_with; end end end -# source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#34 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/block_given_with_explicit_block.rb:34 RuboCop::Cop::Performance::BlockGivenWithExplicitBlock::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#33 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/block_given_with_explicit_block.rb:33 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`. @@ -285,29 +275,29 @@ RuboCop::Cop::Performance::BlockGivenWithExplicitBlock::RESTRICT_ON_SEND = T.let # caller_locations(2..2).first # caller_locations(1..1).first # -# source://rubocop-performance//lib/rubocop/cop/performance/caller.rb#20 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/caller.rb:40 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/caller.rb#26 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 @@ -324,97 +314,101 @@ RuboCop::Cop::Performance::Caller::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array # this defining a higher level when condition to override a condition # that is inside of the splat expansion. # +# @safety +# This cop is not unsafe autocorrection because it is not a guaranteed +# performance improvement. If the data being processed by the `case` condition is +# normalized in a manner that favors hitting a condition in the splat expansion, +# it is possible that moving the splat condition to the end will use more memory, +# and run slightly slower. +# See for more details: https://github.com/rubocop/rubocop/pull/6163 +# # @example # # bad # case foo # when *condition -# bar +# bar # when baz -# foobar +# foobar # end # # case foo # when *[1, 2, 3, 4] -# bar +# bar # when 5 -# baz +# baz # end # # # good # case foo # when baz -# foobar +# foobar # when *condition -# bar +# bar # end # # case foo # when 1, 2, 3, 4 -# bar +# bar # when 5 -# baz +# baz # end # -# source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#58 +# pkg:gem/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 include ::RuboCop::Cop::CommentsHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#67 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:67 def on_case(case_node); end private - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#84 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:84 def autocorrect(corrector, when_node); end - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#154 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:154 def indent_for(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#101 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:101 def inline_fix_branch(corrector, when_node); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#178 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:178 def needs_reorder?(when_node); end - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#144 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:144 def new_branch_without_then(node, new_condition); end - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#140 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:140 def new_condition_with_then(node, new_condition); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#172 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:172 def non_splat?(condition); end - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#92 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:92 def range(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#108 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:108 def reorder_condition(corrector, when_node); end - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#117 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:117 def reordering_correction(when_node); end - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#96 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:96 def replacement(conditions); end - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#158 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:158 def splat_offenses(when_conditions); end - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#134 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:134 def when_branch_range(when_node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#65 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:65 RuboCop::Cop::Performance::CaseWhenSplat::ARRAY_MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#64 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/case_when_splat.rb:64 RuboCop::Cop::Performance::CaseWhenSplat::MSG = T.let(T.unsafe(nil), String) # Identifies places where a case-insensitive string comparison @@ -426,6 +420,10 @@ RuboCop::Cop::Performance::CaseWhenSplat::MSG = T.let(T.unsafe(nil), String) # If you are working only with ASCII characters, then this cop can be # safely enabled. # +# @safety +# This cop is unsafe because `String#casecmp` and `String#casecmp?` behave +# differently when using Non-ASCII characters. +# # @example # # bad # str.downcase == 'abc' @@ -438,41 +436,41 @@ RuboCop::Cop::Performance::CaseWhenSplat::MSG = T.let(T.unsafe(nil), String) # str.casecmp('ABC').zero? # 'abc'.casecmp(str).zero? # -# source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#30 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/casecmp.rb:30 class RuboCop::Cop::Performance::Casecmp < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#51 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/casecmp.rb:51 def downcase_downcase(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#37 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/casecmp.rb:37 def downcase_eq(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#44 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/casecmp.rb:44 def eq_downcase(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#58 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/casecmp.rb:58 def on_send(node); end private - # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#90 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/casecmp.rb:90 def autocorrect(corrector, node, replacement); end - # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#94 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/casecmp.rb:94 def build_good_method(method, arg, variable); end - # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#73 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/casecmp.rb:73 def take_method_apart(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#35 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/casecmp.rb:35 RuboCop::Cop::Performance::Casecmp::CASE_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#33 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/casecmp.rb:33 RuboCop::Cop::Performance::Casecmp::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#34 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/casecmp.rb:34 RuboCop::Cop::Performance::Casecmp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies usages of `array.compact.flatten.map { |x| x.downcase }`. @@ -491,46 +489,44 @@ RuboCop::Cop::Performance::Casecmp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra # array.map! { |x| x.downcase } # array # -# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#21 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/chain_array_allocation.rb:21 class RuboCop::Cop::Performance::ChainArrayAllocation < ::RuboCop::Cop::Base - # source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#54 + # pkg:gem/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 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/chain_array_allocation.rb:62 def on_send(node); end private - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#75 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/chain_array_allocation.rb:75 def enumerable_select_method?(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#35 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/chain_array_allocation.rb:35 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#43 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/chain_array_allocation.rb:43 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 +# pkg:gem/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 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/chain_array_allocation.rb:48 RuboCop::Cop::Performance::ChainArrayAllocation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) -# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#46 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/chain_array_allocation.rb:46 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#31 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/chain_array_allocation.rb:31 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 @@ -539,7 +535,7 @@ RuboCop::Cop::Performance::ChainArrayAllocation::RETURNS_NEW_ARRAY_WHEN_NO_BLOCK # [1,2].first # => 1 # [1,2].first(1) # => [1] # -# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#28 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/chain_array_allocation.rb:28 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. @@ -549,105 +545,108 @@ RuboCop::Cop::Performance::ChainArrayAllocation::RETURN_NEW_ARRAY_WHEN_ARGS = T. # You can set the minimum number of elements to consider # an offense with `MinSize`. # +# NOTE: Since Ruby 3.4, certain simple arguments to `Array#include?` are +# optimized directly in Ruby. This avoids allocations without changing the +# code, as such no offense will be registered in those cases. Currently that +# includes: strings, `self`, local variables, instance variables, and method +# calls without arguments. Additionally, any number of methods can be chained: +# `[1, 2, 3].include?(@foo)` and `[1, 2, 3].include?(@foo.bar.baz)` both avoid +# the array allocation. +# # @example # # bad # users.select do |user| -# %i[superadmin admin].include?(user.role) +# %i[superadmin admin].include?(user.role) # end # # # good # admin_roles = %i[superadmin admin] # users.select do |user| -# admin_roles.include?(user.role) +# admin_roles.include?(user.role) # end # # # good # ADMIN_ROLES = %i[superadmin admin] # ... # users.select do |user| -# ADMIN_ROLES.include?(user.role) +# ADMIN_ROLES.include?(user.role) # end # -# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#34 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:42 class RuboCop::Cop::Performance::CollectionLiteralInLoop < ::RuboCop::Cop::Base - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#76 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:86 def enumerable_loop?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#70 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:80 def kernel_loop?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#82 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:92 def on_send(node); end private - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#92 - def check_literal?(node, method); end + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:102 + def check_literal?(node, method, arguments); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#130 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:160 def enumerable_method?(method_name); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#112 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:142 def keyword_loop?(type); end - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#122 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:152 def literal_class(node); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#108 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:138 def loop?(ancestor, node); end - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#134 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:164 def min_size; end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#116 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:146 def node_within_enumerable_loop?(node, ancestor); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#99 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:129 def nonmutable_method_of_array_or_hash?(node, method); end - # @return [Boolean] + # Since Ruby 3.4, simple arguments to Array#include? are optimized. + # See https://github.com/ruby/ruby/pull/12123 for more details. # - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#104 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:113 + def optimized_array_include?(node, method, arguments); end + + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:134 def parent_is_loop?(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#56 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:66 +RuboCop::Cop::Performance::CollectionLiteralInLoop::ARRAY_INCLUDE_OPTIMIZED_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:64 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 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:49 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 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:76 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 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:47 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 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:43 RuboCop::Cop::Performance::CollectionLiteralInLoop::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#42 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:50 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 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:68 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 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:46 RuboCop::Cop::Performance::CollectionLiteralInLoop::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#68 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/collection_literal_in_loop.rb:78 RuboCop::Cop::Performance::CollectionLiteralInLoop::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) # Identifies places where `sort { |a, b| a.foo <=> b.foo }` @@ -668,45 +667,43 @@ RuboCop::Cop::Performance::CollectionLiteralInLoop::RESTRICT_ON_SEND = T.let(T.u # array.sort_by!(&:foo) # array.sort_by { |v| v.foo } # array.sort_by do |var| -# var.foo +# var.foo # end # array.max_by(&:foo) # array.min_by(&:foo) # array.minmax_by(&:foo) # array.sort_by { |a| a[:foo] } # -# source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#30 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/compare_with_block.rb:30 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#41 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/compare_with_block.rb:41 def compare?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#55 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/compare_with_block.rb:55 def on_block(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#48 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/compare_with_block.rb:48 def replaceable_body?(param0 = T.unsafe(nil), param1, param2); end private - # source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#114 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/compare_with_block.rb:113 def compare_range(send, node); end - # source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#91 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/compare_with_block.rb:91 def message(send, method, var_a, var_b, args); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#76 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/compare_with_block.rb:76 def slow_compare?(method, args_a, args_b); end end -# source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#34 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/compare_with_block.rb:34 RuboCop::Cop::Performance::CompareWithBlock::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#38 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/compare_with_block.rb:38 RuboCop::Cop::Performance::CompareWithBlock::REPLACEMENT = T.let(T.unsafe(nil), Hash) # Identifies places where `Concurrent.monotonic_time` @@ -720,21 +717,21 @@ RuboCop::Cop::Performance::CompareWithBlock::REPLACEMENT = T.let(T.unsafe(nil), # # good # Process.clock_gettime(Process::CLOCK_MONOTONIC) # -# source://rubocop-performance//lib/rubocop/cop/performance/concurrent_monotonic_time.rb#17 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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. @@ -748,60 +745,77 @@ RuboCop::Cop::Performance::ConcurrentMonotonicTime::RESTRICT_ON_SEND = T.let(T.u # # # bad # def tokens(pattern) -# pattern.scan(TOKEN).reject { |token| token.match?(/\A#{SEPARATORS}\Z/) } +# 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) } +# 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) } +# pattern.scan(TOKEN).reject { |token| token.match?(/\A#{SEPARATORS}\Z/o) } # end # # # good # def separators -# @separators ||= /\A#{SEPARATORS}\Z/ +# @separators ||= /\A#{SEPARATORS}\Z/ # end # -# source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#36 +# pkg:gem/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#45 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/constant_regexp.rb:45 def on_regexp(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#59 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/constant_regexp.rb:59 def regexp_escape?(param0 = T.unsafe(nil)); end private - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#64 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/constant_regexp.rb:64 def include_interpolated_const?(node); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#55 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/constant_regexp.rb:55 def within_allowed_assignment?(node); end class << self - # source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#41 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/constant_regexp.rb:41 def autocorrect_incompatible_with; end end end -# source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#39 +# pkg:gem/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. # +# @safety +# This cop is unsafe because it has known compatibility issues with `ActiveRecord` and other +# frameworks. Before Rails 5.1, `ActiveRecord` will ignore the block that is passed to `count`. +# Other methods, such as `select`, will convert the association to an +# array and then run the block on the array. A simple work around to +# make `count` work with a block is to call `to_a.count {...}`. +# +# For example: +# +# [source,ruby] +# ---- +# Model.where(id: [1, 2, 3]).select { |m| m.method == true }.size +# ---- +# +# becomes: +# +# [source,ruby] +# ---- +# Model.where(id: [1, 2, 3]).to_a.count { |m| m.method == true } +# ---- +# # @example # # bad # [1, 2, 3].select { |e| e > 2 }.size @@ -820,53 +834,51 @@ RuboCop::Cop::Performance::ConstantRegexp::MSG = T.let(T.unsafe(nil), String) # Model.select('field AS field_one').count # Model.select(:value).count # -# source://rubocop-performance//lib/rubocop/cop/performance/count.rb#48 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/count.rb:48 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#55 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/count.rb:55 def count_candidate?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#62 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/count.rb:75 def on_csend(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#62 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/count.rb:62 def on_send(node); end private - # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#79 + # pkg:gem/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 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/count.rb:89 def eligible_node?(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#132 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/count.rb:134 def negate_block_pass_as_inline_block(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#111 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/count.rb:113 def negate_block_pass_reject(corrector, node); end - # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#118 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/count.rb:120 def negate_block_reject(corrector, node); end - # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#128 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/count.rb:130 def negate_expression(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#103 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/count.rb:105 def negate_reject(corrector, node); end - # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#93 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/count.rb:95 def source_starting_at(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/count.rb#52 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/count.rb:52 RuboCop::Cop::Performance::Count::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/count.rb#53 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/count.rb:53 RuboCop::Cop::Performance::Count::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # In Ruby 2.5, `String#delete_prefix` has been added. @@ -880,6 +892,9 @@ RuboCop::Cop::Performance::Count::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # The `delete_prefix('prefix')` method is faster than `gsub(/\Aprefix/, '')`. # +# @safety +# This cop is unsafe because `Pathname` has `sub` but not `delete_prefix`. +# # @example # # # bad @@ -892,6 +907,7 @@ RuboCop::Cop::Performance::Count::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # good # str.delete_prefix('prefix') # str.delete_prefix!('prefix') +# # @example SafeMultiline: true (default) # # # good @@ -899,6 +915,7 @@ RuboCop::Cop::Performance::Count::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # str.gsub!(/^prefix/, '') # str.sub(/^prefix/, '') # str.sub!(/^prefix/, '') +# # @example SafeMultiline: false # # # bad @@ -907,29 +924,29 @@ RuboCop::Cop::Performance::Count::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # str.sub(/^prefix/, '') # str.sub!(/^prefix/, '') # -# source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#49 +# pkg:gem/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 + # pkg:gem/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#71 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/delete_prefix.rb:89 def on_csend(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#71 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/delete_prefix.rb:71 def on_send(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#56 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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. @@ -943,6 +960,9 @@ RuboCop::Cop::Performance::DeletePrefix::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # # The `delete_suffix('suffix')` method is faster than `gsub(/suffix\z/, '')`. # +# @safety +# This cop is unsafe because `Pathname` has `sub` but not `delete_suffix`. +# # @example # # # bad @@ -955,6 +975,7 @@ RuboCop::Cop::Performance::DeletePrefix::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # # good # str.delete_suffix('suffix') # str.delete_suffix!('suffix') +# # @example SafeMultiline: true (default) # # # good @@ -962,6 +983,7 @@ RuboCop::Cop::Performance::DeletePrefix::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # str.gsub!(/suffix$/, '') # str.sub(/suffix$/, '') # str.sub!(/suffix$/, '') +# # @example SafeMultiline: false # # # bad @@ -970,35 +992,40 @@ RuboCop::Cop::Performance::DeletePrefix::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # str.sub(/suffix$/, '') # str.sub!(/suffix$/, '') # -# source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#49 +# pkg:gem/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 + # pkg:gem/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#71 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/delete_suffix.rb:89 def on_csend(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#71 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/delete_suffix.rb:71 def on_send(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#56 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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. # +# @safety +# This cop is unsafe because it assumes that the receiver is an +# `Array` or equivalent, but can't reliably detect it. For example, +# if the receiver is a `Hash`, it may report a false positive. +# # @example # # bad # [].select { |item| true }.first @@ -1014,68 +1041,64 @@ RuboCop::Cop::Performance::DeleteSuffix::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # [].detect { |item| true } # [].reverse.detect { |item| true } # -# source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#30 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/detect.rb:66 def on_csend(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#50 + # pkg:gem/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#70 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/detect.rb:70 def accept_first_call?(receiver, body); end - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#102 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/detect.rb:102 def autocorrect(corrector, node, replacement); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#128 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/detect.rb:128 def lazy?(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#113 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/detect.rb:113 def message_for_method(method, index); end - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#124 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/detect.rb:124 def preferred_method; end - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#79 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/detect.rb:79 def register_offense(node, receiver, second_method, index); end - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#94 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/detect.rb:94 def replacement(method, index); end end -# source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#33 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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. +# Checks for consecutive `#start_with?` or `#end_with?` calls. +# These methods accept multiple arguments, so in some cases like when +# they are separated by `||`, they can be combined into a single method call. # # `IncludeActiveSupportAliases` configuration option is used to check for # `starts_with?` and `ends_with?`. These methods are defined by Active Support. @@ -1084,12 +1107,15 @@ RuboCop::Cop::Performance::Detect::REVERSE_MSG = T.let(T.unsafe(nil), String) # # bad # str.start_with?("a") || str.start_with?(Some::CONST) # str.start_with?("a", "b") || str.start_with?("c") +# !str.start_with?(foo) && !str.start_with?(bar) # str.end_with?(var1) || str.end_with?(var2) # # # good # str.start_with?("a", Some::CONST) # str.start_with?("a", "b", "c") +# !str.start_with?(foo, bar) # str.end_with?(var1, var2) +# # @example IncludeActiveSupportAliases: false (default) # # good # str.starts_with?("a", "b") || str.starts_with?("c") @@ -1097,6 +1123,7 @@ RuboCop::Cop::Performance::Detect::REVERSE_MSG = T.let(T.unsafe(nil), String) # # str.starts_with?("a", "b", "c") # str.ends_with?(var1, var2) +# # @example IncludeActiveSupportAliases: true # # bad # str.starts_with?("a", "b") || str.starts_with?("c") @@ -1106,40 +1133,50 @@ RuboCop::Cop::Performance::Detect::REVERSE_MSG = T.let(T.unsafe(nil), String) # str.starts_with?("a", "b", "c") # str.ends_with?(var1, var2) # -# source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#41 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/double_start_end_with.rb:43 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 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/double_start_end_with.rb:57 + def on_and(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#46 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/double_start_end_with.rb:51 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 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/double_start_end_with.rb:108 + def two_start_end_with_calls(param0 = T.unsafe(nil), methods_to_check:); end + + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/double_start_end_with.rb:114 + def two_start_end_with_calls_negated(param0 = T.unsafe(nil), methods_to_check:); end private - # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#60 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/double_start_end_with.rb:75 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 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/double_start_end_with.rb:65 + def check(node, receiver, method, first_call_args, second_call_args); end + + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/double_start_end_with.rb:104 def check_for_active_support_aliases?; end - # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#82 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/double_start_end_with.rb:100 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, first_call_args, method, combined_args); end + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/double_start_end_with.rb:91 + 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 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/double_start_end_with.rb:83 + def methods; end end -# source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#44 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/double_start_end_with.rb:48 +RuboCop::Cop::Performance::DoubleStartEndWith::METHODS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/double_start_end_with.rb:49 +RuboCop::Cop::Performance::DoubleStartEndWith::METHODS_WITH_ACTIVE_SUPPORT = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/double_start_end_with.rb:46 RuboCop::Cop::Performance::DoubleStartEndWith::MSG = T.let(T.unsafe(nil), String) # Identifies unnecessary use of a regex where `String#end_with?` would suffice. @@ -1148,6 +1185,11 @@ RuboCop::Cop::Performance::DoubleStartEndWith::MSG = T.let(T.unsafe(nil), String # `end$` is unsafe as it will behave incompatible with `end_with?` # for receiver is multiline string. # +# @safety +# This will change to a new method call which isn't guaranteed to be on the +# object. Switching these methods has to be done with knowledge of the types +# of the variables which rubocop doesn't have. +# # @example # # bad # 'abc'.match?(/bc\Z/) @@ -1159,6 +1201,7 @@ RuboCop::Cop::Performance::DoubleStartEndWith::MSG = T.let(T.unsafe(nil), String # # # good # 'abc'.end_with?('bc') +# # @example SafeMultiline: true (default) # # # good @@ -1168,6 +1211,7 @@ RuboCop::Cop::Performance::DoubleStartEndWith::MSG = T.let(T.unsafe(nil), String # /bc$/ =~ 'abc' # 'abc'.match(/bc$/) # /bc$/.match('abc') +# # @example SafeMultiline: false # # # bad @@ -1178,28 +1222,28 @@ RuboCop::Cop::Performance::DoubleStartEndWith::MSG = T.let(T.unsafe(nil), String # 'abc'.match(/bc$/) # /bc$/.match('abc') # -# source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#49 +# pkg:gem/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#63 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/end_with.rb:77 def on_csend(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#63 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/end_with.rb:78 def on_match_with_lvasgn(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#63 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/end_with.rb:63 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#56 + # pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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. @@ -1244,54 +1288,42 @@ RuboCop::Cop::Performance::EndWith::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra # waldo = { a: corge, b: grault } # waldo.size # -# source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#48 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/fixed_size.rb:65 def on_csend(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#56 + # pkg:gem/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#73 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/fixed_size.rb:73 def allowed_argument?(arg); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#77 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/fixed_size.rb:77 def allowed_parent?(node); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#69 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/fixed_size.rb:69 def allowed_variable?(var); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#87 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/fixed_size.rb:87 def contains_double_splat?(node); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#81 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/fixed_size.rb:81 def contains_splat?(node); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#93 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/fixed_size.rb:93 def non_string_argument?(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#49 +# pkg:gem/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 +# pkg:gem/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 @@ -1307,42 +1339,42 @@ RuboCop::Cop::Performance::FixedSize::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar # [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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/flat_map.rb:49 def on_csend(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#39 + # pkg:gem/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#73 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/flat_map.rb:73 def autocorrect(corrector, node); end - # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#53 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/flat_map.rb:53 def offense_for_levels(node, map_node, first_method, flatten); end - # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#59 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/flat_map.rb:59 def offense_for_method(node, map_node, first_method, flatten); end - # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#63 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/flat_map.rb:63 def register_offense(node, map_node, first_method, flatten, message); end end -# source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#24 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 @@ -1357,6 +1389,9 @@ RuboCop::Cop::Performance::FlatMap::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra # both perform an O(n) search through all of the values, calling `values` # allocates a new array while using `value?` does not. # +# @safety +# This cop is unsafe because it can't tell whether the receiver is a hash object. +# # @example # # bad # { a: 1, b: 2 }.keys.include?(:a) @@ -1378,47 +1413,47 @@ RuboCop::Cop::Performance::FlatMap::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra # { 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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/inefficient_hash_search.rb:63 def on_csend(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#51 + # pkg:gem/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#91 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/inefficient_hash_search.rb:90 def correct_argument(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#99 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/inefficient_hash_search.rb:98 def correct_dot(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#95 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/inefficient_hash_search.rb:94 def correct_hash_expression(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#75 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/inefficient_hash_search.rb:75 def correct_method(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#82 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/inefficient_hash_search.rb:82 def current_method(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#67 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/inefficient_hash_search.rb:67 def message(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#71 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/inefficient_hash_search.rb:71 def replacement(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#86 - def use_long_method; end + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/inefficient_hash_search.rb:86 + def use_long_method?; end end -# source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#45 +# pkg:gem/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 @@ -1442,51 +1477,56 @@ RuboCop::Cop::Performance::InefficientHashSearch::RESTRICT_ON_SEND = T.let(T.uns # 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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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`. # +# @safety +# This cop is unsafe because `map { ... }.compact` might yield +# different results than `filter_map`. As illustrated in the example, `filter_map` +# also filters out falsey values, while `compact` only gets rid of `nil`. +# # [source,ruby] # ---- # [true, false, nil].compact #=> [true, false] @@ -1503,55 +1543,53 @@ RuboCop::Cop::Performance::IoReadlines::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # ary.map(&:foo).compact! # ary.compact.map(&:foo) # -# source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#31 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/map_compact.rb:31 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#41 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/map_compact.rb:41 def map_compact(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#54 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/map_compact.rb:65 def on_csend(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#54 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/map_compact.rb:54 def on_send(node); end private - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#95 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/map_compact.rb:95 def compact_method_with_final_newline_range(compact_method_range); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#91 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/map_compact.rb:91 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#87 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/map_compact.rb:87 def map_method_and_compact_method_on_same_line?(map_node, compact_node); end - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#69 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/map_compact.rb:69 def remove_compact_method(corrector, map_node, compact_node, chained_method); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#83 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/map_compact.rb:83 def use_dot?(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#36 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/map_compact.rb:36 RuboCop::Cop::Performance::MapCompact::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#37 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/map_compact.rb:37 RuboCop::Cop::Performance::MapCompact::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks if the map method is used in a chain. # # Autocorrection is not supported because an appropriate block variable name cannot be determined automatically. # +# @safety +# This cop is unsafe because false positives occur if the number of times the first method is executed +# affects the return value of subsequent methods. +# # [source,ruby] # ---- # class X @@ -1581,24 +1619,24 @@ RuboCop::Cop::Performance::MapCompact::RESTRICT_ON_SEND = T.let(T.unsafe(nil), A # # good # array.map { |item| item.foo.bar } # -# source://rubocop-performance//lib/rubocop/cop/performance/map_method_chain.rb#43 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/map_method_chain.rb:43 class RuboCop::Cop::Performance::MapMethodChain < ::RuboCop::Cop::Base - # source://rubocop-performance//lib/rubocop/cop/performance/map_method_chain.rb#49 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/map_method_chain.rb:49 def block_pass_with_symbol_arg?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/map_method_chain.rb#53 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/map_method_chain.rb:53 def on_send(node); end private - # source://rubocop-performance//lib/rubocop/cop/performance/map_method_chain.rb#72 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/map_method_chain.rb:72 def find_begin_of_chained_map_method(node, map_args); end end -# source://rubocop-performance//lib/rubocop/cop/performance/map_method_chain.rb#46 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/map_method_chain.rb:46 RuboCop::Cop::Performance::MapMethodChain::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/map_method_chain.rb#47 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/map_method_chain.rb:47 RuboCop::Cop::Performance::MapMethodChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies places where methods are converted to blocks, with the @@ -1614,16 +1652,16 @@ RuboCop::Cop::Performance::MapMethodChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil # 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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/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. @@ -1634,35 +1672,39 @@ RuboCop::Cop::Performance::MethodObjectAsBlock::MSG = T.let(T.unsafe(nil), Strin # especially in case of single-threaded # applications with multiple `OpenStruct` instantiations. # +# @safety +# This cop is unsafe because `OpenStruct.new` and `Struct.new` +# are not equivalent. +# # @example # # bad # class MyClass -# def my_method -# OpenStruct.new(my_key1: 'my_value1', my_key2: 'my_value2') -# end +# 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 +# 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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 @@ -1671,6 +1713,16 @@ RuboCop::Cop::Performance::OpenStruct::RESTRICT_ON_SEND = T.let(T.unsafe(nil), A # end points of the `Range`. In a great majority of cases, this is what # is wanted. # +# @safety +# This cop is unsafe because `Range#include?` (or `Range#member?`) and `Range#cover?` +# are not equivalent behavior. +# Example of a case where `Range#cover?` may not provide the desired result: +# +# [source,ruby] +# ---- +# ('a'..'z').cover?('yellow') # => true +# ---- +# # @example # # bad # ('a'..'z').include?('b') # => true @@ -1679,24 +1731,24 @@ RuboCop::Cop::Performance::OpenStruct::RESTRICT_ON_SEND = T.let(T.unsafe(nil), A # # good # ('a'..'z').cover?('b') # => true # -# source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#29 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/range_include.rb:29 class RuboCop::Cop::Performance::RangeInclude < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#44 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/range_include.rb:53 def on_csend(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#44 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/range_include.rb:44 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#40 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/range_include.rb:40 def range_include(param0 = T.unsafe(nil)); end end -# source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#32 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/range_include.rb:32 RuboCop::Cop::Performance::RangeInclude::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#33 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/range_include.rb:33 RuboCop::Cop::Performance::RangeInclude::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies the use of a `&block` parameter and `block.call` @@ -1705,73 +1757,69 @@ RuboCop::Cop::Performance::RangeInclude::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # @example # # bad # def method(&block) -# block.call +# block.call # end # def another(&func) -# func.call 1, 2, 3 +# func.call 1, 2, 3 # end # # # good # def method -# yield +# yield # end # def another -# yield 1, 2, 3 +# yield 1, 2, 3 # end # -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#25 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_block_call.rb:60 def on_defs(node); end private - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#99 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_block_call.rb:99 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#65 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_block_call.rb:65 def autocorrect(corrector, node); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#83 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_block_call.rb:83 def calls_to_report(argname, body); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#93 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_block_call.rb:93 def shadowed_block_argument?(body, block_argument_of_method_signature); end end -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#31 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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?`, @@ -1791,6 +1839,9 @@ RuboCop::Cop::Performance::RedundantBlockCall::YIELD = T.let(T.unsafe(nil), Stri # [/pattern/].all?('pattern') # => false # ---- # +# @safety +# This cop is unsafe because `===` and `==` do not always behave the same. +# # @example # # bad # items.all? { |item| pattern === item } @@ -1801,72 +1852,64 @@ RuboCop::Cop::Performance::RedundantBlockCall::YIELD = T.let(T.unsafe(nil), Stri # # 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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 @@ -1877,68 +1920,64 @@ RuboCop::Cop::Performance::RedundantEqualityComparisonBlock::TARGET_METHODS = T. # # bad # do_something if str.match(/regex/) # while regex.match('str') -# do_something +# do_something # end # # # good # method(str =~ /regex/) # return value unless regex =~ 'str' # -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#20 +# pkg:gem/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#30 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_match.rb:30 def match_call?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#39 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_match.rb:39 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#35 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_match.rb:35 def only_truthiness_matters?(param0 = T.unsafe(nil)); end private - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#51 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_match.rb:51 def autocorrect(corrector, node); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#57 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_match.rb:57 def autocorrectable?(node); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#86 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_match.rb:86 def call_like?(arg); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#63 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_match.rb:63 def replacement(node); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#73 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_match.rb:73 def requires_parentheses?(arg); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#80 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_match.rb:80 def requires_parentheses_for_call_like?(arg); end end -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#26 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_match.rb:26 RuboCop::Cop::Performance::RedundantMatch::HIGHER_PRECEDENCE_OPERATOR_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#23 +# pkg:gem/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 +# pkg:gem/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`. # +# @safety +# This cop is unsafe because RuboCop cannot determine if the +# receiver of `merge!` is actually a hash or not. +# # @example # # bad # hash.merge!(a: 1) @@ -1947,6 +1986,7 @@ RuboCop::Cop::Performance::RedundantMatch::RESTRICT_ON_SEND = T.let(T.unsafe(nil # # good # hash[:a] = 1 # hash['key'] = 'value' +# # @example MaxKeyValuePairs: 2 (default) # # bad # hash.merge!(a: 1, b: 2) @@ -1955,121 +1995,103 @@ RuboCop::Cop::Performance::RedundantMatch::RESTRICT_ON_SEND = T.let(T.unsafe(nil # hash[:a] = 1 # hash[:b] = 2 # -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#30 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_merge.rb:170 def receiver; end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#176 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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`. @@ -2081,25 +2103,25 @@ RuboCop::Cop::Performance::RedundantMerge::WITH_MODIFIER_CORRECTION = T.let(T.un # # good # array.sort # -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_sort_block.rb#15 +# pkg:gem/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 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_sort_block.rb:22 def on_block(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_sort_block.rb#29 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_sort_block.rb:30 def on_numblock(node); end private - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_sort_block.rb#40 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_sort_block.rb:41 def register_offense(send, node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_sort_block.rb#19 +# pkg:gem/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 @@ -2112,40 +2134,38 @@ RuboCop::Cop::Performance::RedundantSortBlock::MSG = T.let(T.unsafe(nil), String # # good # 'a,b,c'.split(',') # -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#15 +# pkg:gem/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 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_split_regexp_argument.rb:38 def on_csend(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#27 + # pkg:gem/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 + # pkg:gem/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#42 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_split_regexp_argument.rb:42 def determinist_regexp?(regexp_node); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#46 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_split_regexp_argument.rb:46 def replacement(regexp_node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#20 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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`. @@ -2185,45 +2205,45 @@ RuboCop::Cop::Performance::RedundantSplitRegexpArgument::STR_SPECIAL_CHARS = T.l # 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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_string_chars.rb:113 def build_bad_method(method, args); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#125 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_string_chars.rb:126 def build_call_args(call_args_node); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#85 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_string_chars.rb:86 def build_good_method(method, args); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#100 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_string_chars.rb:101 def build_good_method_for_brackets_or_first_method(method, args); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#79 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_string_chars.rb:80 def build_message(method, args); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#75 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_string_chars.rb:76 def correction_range(receiver, node); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#71 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/redundant_string_chars.rb:72 def offense_range(receiver, node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#47 +# pkg:gem/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 +# pkg:gem/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?` @@ -2235,170 +2255,162 @@ RuboCop::Cop::Performance::RedundantStringChars::RESTRICT_ON_SEND = T.let(T.unsa # @example # # bad # def foo -# if x =~ /re/ -# do_something -# end +# if x =~ /re/ +# do_something +# end # end # # # bad # def foo -# if x !~ /re/ -# do_something -# end +# if x !~ /re/ +# do_something +# end # end # # # bad # def foo -# if x.match(/re/) -# do_something -# end +# if x.match(/re/) +# do_something +# end # end # # # bad # def foo -# if /re/ === x -# do_something -# end +# if /re/ === x +# do_something +# end # end # # # good # def foo -# if x.match?(/re/) -# do_something -# end +# if x.match?(/re/) +# do_something +# end # end # # # good # def foo -# if !x.match?(/re/) -# do_something -# end +# if !x.match?(/re/) +# do_something +# end # end # # # good # def foo -# if x =~ /re/ -# do_something(Regexp.last_match) -# end +# if x =~ /re/ +# do_something(Regexp.last_match) +# end # end # # # good # def foo -# if x.match(/re/) -# do_something($~) -# end +# if x.match(/re/) +# do_something($~) +# end # end # # # good # def foo -# if /re/ === x -# do_something($~) -# end +# if /re/ === x +# do_something($~) +# end # end # -# source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#75 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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#142 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:142 def on_case(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#138 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:138 def on_if(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#123 + # pkg:gem/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#165 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:165 def autocorrect(corrector, node); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#154 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:154 def check_condition(cond); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#250 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:252 def correct_operator(corrector, recv, arg, oper = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#221 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:223 def find_last_match(body, range, scope_root); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#181 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:183 def last_match_used?(match_node); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#246 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:248 def match_gvar?(sym); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#177 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:177 def message(node); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#217 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:219 def modifier_form?(match_node); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#203 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:205 def next_match_pos(body, match_node_pos, scope_root); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#190 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:192 def range_to_search_for_last_matches(match_node, body, scope_root); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#259 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:261 def replace_with_match_predicate_method(corrector, recv, arg, op_range); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#228 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:230 def scope_body(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#240 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:242 def scope_root(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#270 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:272 def swap_receiver_and_arg(corrector, recv, arg); end class << self - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#134 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/regexp_match.rb:134 def autocorrect_incompatible_with; end end end -# source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#112 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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. @@ -2418,35 +2430,33 @@ RuboCop::Cop::Performance::RegexpMatch::TYPES_IMPLEMENTING_MATCH = T.let(T.unsaf # # good # items.reverse_each # -# source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#22 +# pkg:gem/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 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/reverse_each.rb:44 def on_csend(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#33 + # pkg:gem/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 + # pkg:gem/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#54 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/reverse_each.rb:54 def offense_range(node); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#48 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/reverse_each.rb:48 def use_return_value?(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#26 +# pkg:gem/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 +# pkg:gem/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` @@ -2462,36 +2472,36 @@ RuboCop::Cop::Performance::ReverseEach::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # array.last(5).reverse # array.last # -# source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#19 +# pkg:gem/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 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/reverse_first.rb:42 def on_csend(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#30 + # pkg:gem/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 + # pkg:gem/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#56 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/reverse_first.rb:56 def build_good_method(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#50 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/reverse_first.rb:50 def build_message(node, range); end - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#46 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/reverse_first.rb:46 def correction_range(receiver, node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#23 +# pkg:gem/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 +# pkg:gem/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. @@ -2506,37 +2516,34 @@ RuboCop::Cop::Performance::ReverseFirst::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # # good # ary.filter_map { |o| o.bar if o.foo } # -# source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#18 +# pkg:gem/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 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/select_map.rb:37 def on_csend(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#27 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/select_map.rb:27 def on_send(node); end private - # source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#41 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/select_map.rb:41 def map_method_candidate(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#51 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/select_map.rb:51 def offense_range(node, map_method); end end -# source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#24 +# pkg:gem/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 +# pkg:gem/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 @@ -2564,31 +2571,33 @@ RuboCop::Cop::Performance::SelectMap::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar # # # good # [1, 2, 3].count { |e| e > 2 } +# TODO: Add advanced detection of variables that could +# have been assigned to an array or a hash. # -# source://rubocop-performance//lib/rubocop/cop/performance/size.rb#37 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/size.rb:72 def on_csend(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/size.rb#65 + # pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 }` @@ -2601,25 +2610,25 @@ RuboCop::Cop::Performance::Size::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # good # array.sort.reverse # -# source://rubocop-performance//lib/rubocop/cop/performance/sort_reverse.rb#16 +# pkg:gem/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 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sort_reverse.rb:23 def on_block(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/sort_reverse.rb#30 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sort_reverse.rb:31 def on_numblock(node); end private - # source://rubocop-performance//lib/rubocop/cop/performance/sort_reverse.rb#42 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sort_reverse.rb:43 def register_offense(send, node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/sort_reverse.rb#20 +# pkg:gem/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')` @@ -2637,34 +2646,32 @@ RuboCop::Cop::Performance::SortReverse::MSG = T.let(T.unsafe(nil), String) # str.squeeze('a') # str.squeeze!('a') # -# source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#21 +# pkg:gem/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#39 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/squeeze.rb:60 def on_csend(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#39 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/squeeze.rb:39 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#29 + # pkg:gem/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#65 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/squeeze.rb:64 def repeating_literal?(regex_str); end end -# source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#24 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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. @@ -2673,6 +2680,11 @@ RuboCop::Cop::Performance::Squeeze::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra # `^start` is unsafe as it will behave incompatible with `start_with?` # for receiver is multiline string. # +# @safety +# This will change to a new method call which isn't guaranteed to be on the +# object. Switching these methods has to be done with knowledge of the types +# of the variables which rubocop doesn't have. +# # @example # # bad # 'abc'.match?(/\Aab/) @@ -2684,6 +2696,7 @@ RuboCop::Cop::Performance::Squeeze::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra # # # good # 'abc'.start_with?('ab') +# # @example SafeMultiline: true (default) # # # good @@ -2693,6 +2706,7 @@ RuboCop::Cop::Performance::Squeeze::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra # /^ab/ =~ 'abc' # 'abc'.match(/^ab/) # /^ab/.match('abc') +# # @example SafeMultiline: false # # # bad @@ -2703,34 +2717,38 @@ RuboCop::Cop::Performance::Squeeze::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra # 'abc'.match(/^ab/) # /^ab/.match('abc') # -# source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#49 +# pkg:gem/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#63 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/start_with.rb:77 def on_csend(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#63 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/start_with.rb:78 def on_match_with_lvasgn(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#63 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/start_with.rb:63 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#56 + # pkg:gem/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 +# pkg:gem/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 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/start_with.rb:54 RuboCop::Cop::Performance::StartWith::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for calls to `#bytes` counting method and suggests using `bytesize` instead. # The `bytesize` method is more efficient and directly returns the size in bytes, # avoiding the intermediate array allocation that `bytes.size` incurs. # +# @safety +# This cop is unsafe because it assumes that the receiver +# responds to `#bytesize` method. +# # @example # # bad # string_var.bytes.count @@ -2740,24 +2758,24 @@ RuboCop::Cop::Performance::StartWith::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar # string_var.bytesize # "foobar".bytesize # -# source://rubocop-performance//lib/rubocop/cop/performance/string_bytesize.rb#22 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_bytesize.rb:22 class RuboCop::Cop::Performance::StringBytesize < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/string_bytesize.rb#32 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_bytesize.rb:41 def on_csend(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_bytesize.rb#32 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_bytesize.rb:32 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_bytesize.rb#28 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_bytesize.rb:28 def string_bytes_method?(param0 = T.unsafe(nil)); end end -# source://rubocop-performance//lib/rubocop/cop/performance/string_bytesize.rb#25 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_bytesize.rb:25 RuboCop::Cop::Performance::StringBytesize::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/string_bytesize.rb#26 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_bytesize.rb:26 RuboCop::Cop::Performance::StringBytesize::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies places where string identifier argument can be replaced @@ -2773,67 +2791,63 @@ RuboCop::Cop::Performance::StringBytesize::RESTRICT_ON_SEND = T.let(T.unsafe(nil # send('do_something') # attr_accessor 'do_something' # instance_variable_get('@ivar') -# respond_to?("string_#{interpolation}") # # # good # send(:do_something) # attr_accessor :do_something # instance_variable_get(:@ivar) -# respond_to?(:"string_#{interpolation}") # # # good - these methods don't support namespaced symbols # const_get("#{module_path}::Base") # const_source_location("#{module_path}::Base") # const_defined?("#{module_path}::Base") # -# source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#33 +# # good - using a symbol when string interpolation is involved causes a performance regression. +# respond_to?("string_#{interpolation}") +# +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_identifier_argument.rb:33 class RuboCop::Cop::Performance::StringIdentifierArgument < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#64 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_identifier_argument.rb:62 def on_send(node); end private - # source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#105 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_identifier_argument.rb:97 def argument_replacement(node, value); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#95 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_identifier_argument.rb:87 def register_offense(argument, argument_value); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#89 - def string_argument_compatible?(argument, node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#77 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_identifier_argument.rb:75 def string_arguments(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#38 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_identifier_argument.rb:38 RuboCop::Cop::Performance::StringIdentifierArgument::COMMAND_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#43 -RuboCop::Cop::Performance::StringIdentifierArgument::INTERPOLATION_IGNORE_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#36 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_identifier_argument.rb:36 RuboCop::Cop::Performance::StringIdentifierArgument::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#46 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_identifier_argument.rb:44 RuboCop::Cop::Performance::StringIdentifierArgument::MULTIPLE_ARGUMENTS_METHODS = T.let(T.unsafe(nil), Array) # 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#54 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_identifier_argument.rb:52 RuboCop::Cop::Performance::StringIdentifierArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#45 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_identifier_argument.rb:43 RuboCop::Cop::Performance::StringIdentifierArgument::TWO_ARGUMENTS_METHOD = T.let(T.unsafe(nil), Symbol) # Identifies unnecessary use of a regex where `String#include?` would suffice. # +# @safety +# This cop's offenses are not safe to autocorrect if a receiver is nil or a Symbol. +# # @example # # bad # str.match?(/ab/) @@ -2847,34 +2861,32 @@ RuboCop::Cop::Performance::StringIdentifierArgument::TWO_ARGUMENTS_METHOD = T.le # # good # str.include?('ab') # -# source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#23 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_include.rb:23 class RuboCop::Cop::Performance::StringInclude < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#37 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_include.rb:53 def on_csend(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#37 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_include.rb:54 def on_match_with_lvasgn(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#37 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_include.rb:37 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#29 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_include.rb:29 def redundant_regex?(param0 = T.unsafe(nil)); end private - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#59 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_include.rb:58 def literal?(regex_str); end end -# source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#26 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_include.rb:26 RuboCop::Cop::Performance::StringInclude::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#27 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_include.rb:27 RuboCop::Cop::Performance::StringInclude::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies places where `gsub` can be replaced by `tr` or `delete`. @@ -2892,87 +2904,118 @@ RuboCop::Cop::Performance::StringInclude::RESTRICT_ON_SEND = T.let(T.unsafe(nil) # 'abc'.tr('b', 'd') # 'a b c'.delete(' ') # -# source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#20 +# pkg:gem/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 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:45 def on_csend(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#37 + # pkg:gem/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 + # pkg:gem/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#84 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:84 def accept_first_param?(first_param); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#79 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:79 def accept_second_param?(second_param); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#60 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:60 def autocorrect(corrector, node); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#100 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:100 def first_source(first_param); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#143 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:143 def message(node, first_source, second_source); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#149 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:149 def method_suffix(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#49 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:49 def offense(node, first_param, second_param); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#129 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:129 def range(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#153 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:153 def remove_second_param(corrector, node, first_param); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#70 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:70 def replace_method(corrector, node, first_source, second_source, first_param); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#133 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:133 def replacement_method(node, first_source, second_source); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#118 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:118 def source_from_regex_constructor(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#111 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/string_replacement.rb:111 def source_from_regex_literal(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#29 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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. # +# @safety +# Autocorrections are unproblematic wherever an initial value is provided explicitly: +# +# [source,ruby] +# ---- +# [1, 2, 3].reduce(4, :+) # => 10 +# [1, 2, 3].sum(4) # => 10 +# +# [].reduce(4, :+) # => 4 +# [].sum(4) # => 4 +# ---- +# +# This also holds true for non-numeric types which implement a `:+` method: +# +# [source,ruby] +# ---- +# ['l', 'o'].reduce('Hel', :+) # => "Hello" +# ['l', 'o'].sum('Hel') # => "Hello" +# ---- +# +# When no initial value is provided though, `Enumerable#reduce` will pick the first enumerated value +# as initial value and successively add all following values to it, whereas +# `Enumerable#sum` will set an initial value of `0` (`Integer`) which can lead to a `TypeError`: +# +# [source,ruby] +# ---- +# [].reduce(:+) # => nil +# [1, 2, 3].reduce(:+) # => 6 +# ['H', 'e', 'l', 'l', 'o'].reduce(:+) # => "Hello" +# +# [].sum # => 0 +# [1, 2, 3].sum # => 6 +# ['H', 'e', 'l', 'l', 'o'].sum # => in `+': String can't be coerced into Integer (TypeError) +# ---- +# # @example OnlySumOrWithInitialValue: false (default) # # bad # [1, 2, 3].inject(:+) # Autocorrections for cases without initial value are unsafe @@ -2987,6 +3030,7 @@ RuboCop::Cop::Performance::StringReplacement::TR = T.let(T.unsafe(nil), String) # [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, :+) @@ -2998,161 +3042,176 @@ RuboCop::Cop::Performance::StringReplacement::TR = T.let(T.unsafe(nil), String) # [1, 2, 3].sum { |elem| elem ** 2 } # [1, 2, 3].sum(10, &:count) # -# source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#70 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:105 def elem_plus_acc?(param0 = T.unsafe(nil), param1, param2); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#115 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:115 def on_block(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#107 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:113 def on_csend(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#107 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:107 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#82 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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#160 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:160 def array_literal?(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#165 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:165 def autocorrect(corrector, init, range); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#173 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:173 def autocorrect_sum_map(corrector, sum, map, init); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#250 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:250 def build_block_bad_method(method, init, var_acc, var_elem, body); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#217 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:217 def build_block_message(send, init, var_acc, var_elem, body); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#223 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:223 def build_good_method(init, block_pass = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#236 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:236 def build_method_bad_method(init, method, operation); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#198 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:198 def build_method_message(node, method, init, operation); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#209 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:209 def build_sum_map_message(send_node, init); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#155 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:155 def empty_array_literal?(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#130 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:130 def handle_sum_candidate(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#143 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:143 def handle_sum_map_candidate(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#261 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:261 def method_call_with_args_range(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#194 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:194 def sum_block_range(send, node); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#190 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:190 def sum_map_range(map, sum); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#186 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/sum.rb:186 def sum_method_range(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#77 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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. # +# @safety +# This cop's autocorrection is unsafe because `Integer#times` does nothing if receiver is 0 +# or less. However, `Array.new` raises an error if argument is less than 0. +# +# For example: +# +# [source,ruby] +# ---- +# -1.times{} # does nothing +# Array.new(-1) # ArgumentError: negative array size +# ---- +# # @example # # bad # 9.times.map do |i| -# i.to_s +# i.to_s # end # # # good # Array.new(9) do |i| -# i.to_s +# i.to_s # end # -# source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#32 +# pkg:gem/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#51 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/times_map.rb:51 def on_block(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#46 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/times_map.rb:49 def on_csend(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#51 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/times_map.rb:55 + def on_itblock(node); end + + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/times_map.rb:54 def on_numblock(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#46 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/times_map.rb:46 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#39 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/times_map.rb:39 def times_map_call(param0 = T.unsafe(nil)); end private - # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#58 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/times_map.rb:59 def check(node); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#70 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/times_map.rb:71 def handleable_receiver?(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#77 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/times_map.rb:78 def message(map_or_collect, count); end end -# source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#35 +# pkg:gem/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 +# pkg:gem/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 +# pkg:gem/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`. # +# @safety +# This cop's autocorrection is unsafe because `String.new` (without operator) is not +# exactly the same as `+''`. These differ in encoding. `String.new.encoding` is always +# `ASCII-8BIT`. However, `(+'').encoding` is the same as script encoding(e.g. `UTF-8`). +# if you expect `ASCII-8BIT` encoding, disable this cop. +# # @example # # bad # ''.dup # when Ruby 3.2 or lower @@ -3165,30 +3224,30 @@ RuboCop::Cop::Performance::TimesMap::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # +'something' # +'' # -# source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#27 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/unfreeze_string.rb:27 class RuboCop::Cop::Performance::UnfreezeString < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#36 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/unfreeze_string.rb:36 def dup_string?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#47 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/unfreeze_string.rb:47 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#40 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/unfreeze_string.rb:40 def string_new?(param0 = T.unsafe(nil)); end private - # source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#60 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/unfreeze_string.rb:60 def string_value(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#33 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/unfreeze_string.rb:33 RuboCop::Cop::Performance::UnfreezeString::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#34 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/unfreeze_string.rb:34 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`. @@ -3200,25 +3259,31 @@ RuboCop::Cop::Performance::UnfreezeString::RESTRICT_ON_SEND = T.let(T.unsafe(nil # # good # URI::DEFAULT_PARSER # -# source://rubocop-performance//lib/rubocop/cop/performance/uri_default_parser.rb#15 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/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 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/uri_default_parser.rb:19 RuboCop::Cop::Performance::UriDefaultParser::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for `map { |id| [id] }` and suggests replacing it with `zip`. # +# @safety +# This cop is unsafe for novel definitions of `map` and `collect` +# on non-Enumerable objects that do not respond to `zip`. +# To make your object enumerable, define an `each` method +# as described in https://ruby-doc.org/core/Enumerable.html +# # @example # # bad # [1, 2, 3].map { |id| [id] } @@ -3226,134 +3291,118 @@ RuboCop::Cop::Performance::UriDefaultParser::RESTRICT_ON_SEND = T.let(T.unsafe(n # # good # [1, 2, 3].zip # -# source://rubocop-performance//lib/rubocop/cop/performance/zip_without_block.rb#20 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/zip_without_block.rb:20 class RuboCop::Cop::Performance::ZipWithoutBlock < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/zip_without_block.rb#27 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/zip_without_block.rb:27 def map_with_array?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/zip_without_block.rb#34 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/zip_without_block.rb:40 def on_csend(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/zip_without_block.rb#34 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/zip_without_block.rb:35 def on_send(node); end private - # source://rubocop-performance//lib/rubocop/cop/performance/zip_without_block.rb#50 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/zip_without_block.rb:51 def offense_range(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/zip_without_block.rb#43 + # pkg:gem/rubocop-performance#lib/rubocop/cop/performance/zip_without_block.rb:44 def register_offense(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/zip_without_block.rb#23 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/zip_without_block.rb:23 RuboCop::Cop::Performance::ZipWithoutBlock::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/zip_without_block.rb#24 +# pkg:gem/rubocop-performance#lib/rubocop/cop/performance/zip_without_block.rb:24 RuboCop::Cop::Performance::ZipWithoutBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) # Common functionality for handling regexp metacharacters. # -# source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#6 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 + # pkg:gem/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 +# pkg:gem/rubocop-performance#lib/rubocop/performance.rb:5 module RuboCop::Performance; end # A plugin that integrates RuboCop Performance with RuboCop's plugin system. # -# source://rubocop-performance//lib/rubocop/performance/plugin.rb#8 +# pkg:gem/rubocop-performance#lib/rubocop/performance/plugin.rb:8 class RuboCop::Performance::Plugin < ::LintRoller::Plugin - # source://rubocop-performance//lib/rubocop/performance/plugin.rb#9 + # pkg:gem/rubocop-performance#lib/rubocop/performance/plugin.rb:9 def about; end - # source://rubocop-performance//lib/rubocop/performance/plugin.rb#22 + # pkg:gem/rubocop-performance#lib/rubocop/performance/plugin.rb:22 def rules(_context); end - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/performance/plugin.rb#18 + # pkg:gem/rubocop-performance#lib/rubocop/performance/plugin.rb:18 def supported?(context); end end # This module holds the RuboCop Performance version information. # -# source://rubocop-performance//lib/rubocop/performance/version.rb#6 +# pkg:gem/rubocop-performance#lib/rubocop/performance/version.rb:6 module RuboCop::Performance::Version class << self - # source://rubocop-performance//lib/rubocop/performance/version.rb#9 + # pkg:gem/rubocop-performance#lib/rubocop/performance/version.rb:9 def document_version; end end end -# source://rubocop-performance//lib/rubocop/performance/version.rb#7 +# pkg:gem/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-sorbet@0.17.1.rbi b/sorbet/rbi/gems/rubocop-sorbet@0.17.1.rbi new file mode 100644 index 0000000..d3c3671 --- /dev/null +++ b/sorbet/rbi/gems/rubocop-sorbet@0.17.1.rbi @@ -0,0 +1,3628 @@ +# 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`. + + +# pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/version.rb:3 +module RuboCop; end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:4 +module RuboCop::Cop; end + +module RuboCop::Cop::Lint; end + +class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::VoidSorbetAwareBehaviour +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:5 +module RuboCop::Cop::Sorbet; end + +# Disallows incompatible overrides in Sorbet signatures and RBS comments. +# Using `allow_incompatible` suggests a violation of the Liskov +# Substitution Principle, meaning that a subclass is not a valid +# subtype of its superclass. This Cop prevents these design smells +# from occurring. +# +# @example +# +# # bad +# sig { override(allow_incompatible: true).void } +# def foo; end +# +# # @override(allow_incompatible: true) +# #: () -> void +# def foo; end +# +# # @override(allow_incompatible: true) +# #: String +# attr_reader :foo +# +# # good +# sig { override.void } +# +# # @override +# #: () -> void +# def foo; end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:34 +class RuboCop::Cop::Sorbet::AllowIncompatibleOverride < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:80 + def on_block(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:64 + def on_def(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:68 + def on_defs(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:98 + def on_itblock(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:97 + def on_numblock(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:70 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:56 + def override?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:51 + def sig?(param0); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:42 + def sig_dot_override?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:102 + def check_rbs_annotations(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:35 +RuboCop::Cop::Sorbet::AllowIncompatibleOverride::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:37 +RuboCop::Cop::Sorbet::AllowIncompatibleOverride::RBS_ALLOW_INCOMPATIBLE_OVERRIDE = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:38 +RuboCop::Cop::Sorbet::AllowIncompatibleOverride::RBS_ATTRIBUTE_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:39 +RuboCop::Cop::Sorbet::AllowIncompatibleOverride::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# 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) } +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb:18 +class RuboCop::Cop::Sorbet::BindingConstantWithoutTypeAlias < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb:65 + def on_casgn(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb:48 + def requires_type_alias?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb:38 + def type_alias_with_block?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb:29 + def type_alias_without_block(param0 = T.unsafe(nil)); end + + private + + # Given nested send nodes, returns the leaf with explicit receiver. + # + # i.e. in Ruby + # + # a.b.c.d.e.f + # ^^^ + # + # i.e. in AST + # + # (send (send (send (send (send (send nil :a) :b) :c) :d) :e) :f) + # ^^^^^^^^^^^^^^^^^^^^^^^ + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb:98 + def send_leaf(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb:21 +RuboCop::Cop::Sorbet::BindingConstantWithoutTypeAlias::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb:23 +RuboCop::Cop::Sorbet::BindingConstantWithoutTypeAlias::WITHOUT_BLOCK_MSG = T.let(T.unsafe(nil), String) + +# Disallow defining methods in blocks, to prevent running into issues +# caused by https://github.com/sorbet/sorbet/issues/3609. +# +# As a workaround, use `define_method` instead. +# +# The one exception is for `Class.new` blocks, as long as the result is +# assigned to a constant (i.e. as long as it is not an anonymous class). +# Another exception is for ActiveSupport::Concern `class_methods` blocks. +# +# @example +# # bad +# yielding_method do +# def bad(args) +# # ... +# end +# end +# +# # bad +# Class.new do +# def bad(args) +# # ... +# end +# end +# +# # good +# yielding_method do +# define_method(:good) do |args| +# # ... +# end +# end +# +# # good +# MyClass = Class.new do +# def good(args) +# # ... +# end +# end +# +# # good +# module SomeConcern +# extend ActiveSupport::Concern +# +# class_methods do +# def good(args) +# # ... +# end +# end +# end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:55 +class RuboCop::Cop::Sorbet::BlockMethodDefinition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:62 + def activesupport_concern_class_methods_block?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:71 + def module_extends_activesupport_concern?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:80 + def on_block(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:95 + def on_itblock(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:94 + def on_numblock(node); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:187 + def adjust_for_closing_parenthesis(end_pos); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:107 + def autocorrect_method_in_block(corrector, node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:199 + def closing_parenthesis_follows(source); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:176 + def find_end_position_with_arguments(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:183 + def find_end_position_without_arguments(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:168 + def find_method_signature_end_position(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:144 + def handle_method_without_body(node, indent); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:162 + def handle_multiline_method_without_body(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:156 + def handle_single_line_method(node, indent); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:99 + def in_activesupport_concern_class_methods_block?(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:152 + def single_line_method?(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:133 + def transform_args_to_block_args(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:59 +RuboCop::Cop::Sorbet::BlockMethodDefinition::MSG = T.let(T.unsafe(nil), String) + +# Checks for the a mistaken variant of the "obsolete memoization pattern" that used to be required +# on every call, causing the memoized value to be discarded and recomputed on every call. +# +# This cop will correct it to read from the ivar instead of `nil`, which will memoize it correctly. +# +# The result of this correction will be the "obsolete memoization pattern", which can further be corrected by +# the `Sorbet/ObsoleteStrictMemoization` cop. +# +# See `Sorbet/ObsoleteStrictMemoization` for more details. +# +# @safety +# If the computation being memoized had side effects, calling it only once (instead of once on every call +# to the affected method) can be observed, and might be a breaking change. +# +# @example +# # bad +# sig { returns(Foo) } +# def foo +# # This `nil` is likely a mistake, causing the memoized value to be discarded and recomputed on every call. +# @foo = T.let(nil, T.nilable(Foo)) +# @foo ||= some_computation +# end +# +# # good +# sig { returns(Foo) } +# def foo +# # This will now memoize the value as was likely intended, so `some_computation` is only ever called once. +# # ⚠️If `some_computation` has side effects, this might be a breaking change! +# @foo = T.let(@foo, T.nilable(Foo)) +# @foo ||= some_computation +# end +# +# @see Sorbet/ObsoleteStrictMemoization +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/buggy_obsolete_strict_memoization.rb:42 +class RuboCop::Cop::Sorbet::BuggyObsoleteStrictMemoization < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::MatchRange + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp + include ::RuboCop::Cop::Sorbet::TargetSorbetVersion + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::Sorbet::TargetSorbetVersion::ClassMethods + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/buggy_obsolete_strict_memoization.rb:55 + def buggy_legacy_memoization_pattern?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/buggy_obsolete_strict_memoization.rb:66 + def on_begin(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/buggy_obsolete_strict_memoization.rb:77 + def relevant_file?(file); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/buggy_obsolete_strict_memoization.rb:51 +RuboCop::Cop::Sorbet::BuggyObsoleteStrictMemoization::MSG = T.let(T.unsafe(nil), String) + +# Ensures that callback conditionals are bound to the right type +# so that they are type checked properly. +# +# @safety +# 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 +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/callback_conditionals_binding.rb:36 +class RuboCop::Cop::Sorbet::CallbackConditionalsBinding < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/callback_conditionals_binding.rb:82 + def argumentless_unbound_callable_callback_conditional?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/callback_conditionals_binding.rb:92 + def on_send(node); end + + private + + # Find the immediately enclosing class or module name. + # Returns `nil`` if the immediate parent (skipping begin if present) is not a class or module. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/callback_conditionals_binding.rb:129 + def immediately_enclosing_module_name(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/callback_conditionals_binding.rb:40 +RuboCop::Cop::Sorbet::CallbackConditionalsBinding::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/callback_conditionals_binding.rb:42 +RuboCop::Cop::Sorbet::CallbackConditionalsBinding::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Ensure type parameters used in generic methods are always capitalized. +# +# @example +# +# # bad +# sig { type_parameters(:x).params(a: T.type_parameter(:x)).void } +# def foo(a); end +# +# # good +# sig { type_parameters(:X).params(a: T.type_parameter(:X)).void } +# def foo(a: 1); end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb:17 +class RuboCop::Cop::Sorbet::CapitalizedTypeParameters < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::SignatureHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb:51 + def on_csend(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb:47 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb:35 + def on_signature(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb:31 + def t_type_parameter?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb:26 + def type_parameters?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb:57 + def check_type_parameters_case(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb:21 +RuboCop::Cop::Sorbet::CapitalizedTypeParameters::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb:23 +RuboCop::Cop::Sorbet::CapitalizedTypeParameters::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# 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 } +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb:19 +class RuboCop::Cop::Sorbet::CheckedTrueInSignature < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Sorbet::SignatureHelp + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb:24 + def offending_node(param0); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb:35 + def on_signature(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb:28 +RuboCop::Cop::Sorbet::CheckedTrueInSignature::MESSAGE = T.let(T.unsafe(nil), String) + +# Shared helper for cops that unwrap a `T.let` on a constant assignment. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/constant_scope.rb:7 +module RuboCop::Cop::Sorbet::ConstantScope + private + + # True when the constant is assigned directly in a class, module, or + # constants assigned elsewhere (inside a conditional, loop, block, or + # method — error 7027), so removing the annotation there would break + # typechecking. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/constant_scope.rb:15 + def statically_scoped?(node); end +end + +# 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) +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/constants_from_strings.rb:36 +class RuboCop::Cop::Sorbet::ConstantsFromStrings < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/constants_from_strings.rb:50 + def on_csend(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/constants_from_strings.rb:47 + def on_send(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/constants_from_strings.rb:37 +RuboCop::Cop::Sorbet::ConstantsFromStrings::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/constants_from_strings.rb:40 +RuboCop::Cop::Sorbet::ConstantsFromStrings::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for blank lines after signatures. +# +# @example +# # bad +# sig { void } +# +# def foo; end +# +# # good +# sig { void } +# def foo; end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb:17 +class RuboCop::Cop::Sorbet::EmptyLineAfterSig < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Sorbet::SignatureHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb:33 + def on_signature(sig); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb:25 + def sig_or_signable_method_definition?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb:62 + def contains_only_rubocop_directives?(range); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb:66 + def lines_between(node1, node2, buffer: T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb:58 + def next_sibling(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb:22 +RuboCop::Cop::Sorbet::EmptyLineAfterSig::MSG = T.let(T.unsafe(nil), String) + +# Checks that the Sorbet sigil comes as the first magic comment in the file, after the encoding comment if any. +# +# The expected order for magic comments is: (en)?coding, typed, warn_indent then frozen_string_literal. +# +# The ordering is for consistency only, except for the encoding comment which must be first, if present. +# +# 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. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:32 +class RuboCop::Cop::Sorbet::EnforceSigilOrder < ::RuboCop::Cop::Sorbet::ValidSigil + include ::RuboCop::Cop::RangeHelp + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:35 + def on_new_investigation; end + + protected + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:93 + def autocorrect(corrector); end + + # checks + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:70 + def check_magic_comments_order(tokens); end + + # Get all the tokens in `processed_source` that match `MAGIC_REGEX` + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:62 + def extract_magic_comments(processed_source); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:46 +RuboCop::Cop::Sorbet::EnforceSigilOrder::CODING_REGEX = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:48 +RuboCop::Cop::Sorbet::EnforceSigilOrder::FROZEN_REGEX = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:47 +RuboCop::Cop::Sorbet::EnforceSigilOrder::INDENT_REGEX = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:57 +RuboCop::Cop::Sorbet::EnforceSigilOrder::MAGIC_REGEX = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:50 +RuboCop::Cop::Sorbet::EnforceSigilOrder::PREFERRED_ORDER = T.let(T.unsafe(nil), Hash) + +# 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') +# * `Style`: signature style to enforce - 'sig' for sig blocks, 'rbs' for RBS comments, 'both' to allow either (default: 'sig') +# * `AutocorrectStyle`: signature style to use when autocorrecting - 'sig' for sig blocks, 'rbs' for RBS comments (default: 'sig'). Only used when `Style` is 'both'. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:30 +class RuboCop::Cop::Sorbet::EnforceSignatures < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Sorbet::SignatureHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:44 + def accessor?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:48 + def on_def(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:52 + def on_defs(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:64 + def on_new_investigation; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:56 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:60 + def on_signature(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:70 + def scope(node); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:293 + def add_accessor_parameter_if_needed(suggest, symbol, method); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:315 + def allow_rbs?; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:153 + def autocorrect_rbs_to_sigs(corrector, node, rbs_signatures); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:169 + def autocorrect_sigs_to_rbs(corrector, node, sig_nodes); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:334 + def autocorrect_style; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:140 + def autocorrect_with_signature_type(corrector, node, type); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:79 + def check_node(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:148 + def create_signature_suggestion(node, type); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:273 + def in_sclass_context?(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:269 + def instance_initialize?(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:247 + def leftmost_send_ancestor(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:179 + def normalize_runtime_sig_receivers(range, sig_nodes); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:307 + def param_type_placeholder; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:284 + def populate_accessor_suggestion(suggest, node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:261 + def populate_method_definition_suggestion(suggest, node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:253 + def populate_signature_suggestion(suggest, node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:136 + def rbs_checker; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:201 + def rbs_correction_range(comments); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:163 + def remove_rbs(corrector, rbs_signatures); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:192 + def remove_sigs(corrector, sig_nodes); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:311 + def return_type_placeholder; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:299 + def set_void_return_for_writer(suggest, method); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:132 + def sig_checker; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:197 + def sig_correction_range(sig_nodes); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:319 + def signature_style; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:240 + def translate_rbs_to_sigs(input); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:232 + def translate_sigs_to_rbs(input); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:215 + def translated_signature_prefix(translated, reject_sig: T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:303 + def writer_or_accessor?(method); end +end + +# Represents a method parameter with its name and AST node kind. +# @kind is the RuboCop AST node type (:arg, :optarg, :restarg, :kwarg, +# :kwoptarg, :kwrestarg, :forward_arg, :blockarg). +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:41 +class RuboCop::Cop::Sorbet::EnforceSignatures::Param < ::Struct + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:41 + def kind; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:41 + def kind=(_); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:41 + def name; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:41 + def name=(_); end + + class << self + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:41 + def [](*_arg0); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:41 + def inspect; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:41 + def keyword_init?; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:41 + def members; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:41 + def new(*_arg0); end + end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:353 +class RuboCop::Cop::Sorbet::EnforceSignatures::RBSSignatureChecker < ::RuboCop::Cop::Sorbet::EnforceSignatures::SignatureChecker + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:354 + def signatures(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:380 +class RuboCop::Cop::Sorbet::EnforceSignatures::RBSSuggestion + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:383 + def initialize(indent, param_placeholder, return_placeholder); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:381 + def accessor; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:381 + def accessor=(_arg0); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:381 + def params; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:381 + def params=(_arg0); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:392 + def returns=(value); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:396 + def to_autocorrect; end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:418 + def rbi_params(param); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:359 +class RuboCop::Cop::Sorbet::EnforceSignatures::SigSignatureChecker < ::RuboCop::Cop::Sorbet::EnforceSignatures::SignatureChecker + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:362 + def initialize(processed_source); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:375 + def clear_signature(scope); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:371 + def on_signature(node, scope); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:367 + def signature_nodes(scope); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:360 +RuboCop::Cop::Sorbet::EnforceSignatures::SigSignatureChecker::EMPTY_SIGNATURES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:448 +class RuboCop::Cop::Sorbet::EnforceSignatures::SigSuggestion + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:451 + def initialize(indent, param_placeholder, return_placeholder); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:449 + def accessor; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:449 + def accessor=(_arg0); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:449 + def params; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:449 + def params=(_arg0); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:449 + def returns; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:449 + def returns=(_arg0); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:459 + def to_autocorrect; end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:465 + def generate_params; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:472 + def generate_return; end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:343 +class RuboCop::Cop::Sorbet::EnforceSignatures::SignatureChecker + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:344 + def initialize(processed_source); end + + protected + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:350 + def processed_source; end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:36 +RuboCop::Cop::Sorbet::EnforceSignatures::VALID_AUTOCORRECT_STYLES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:35 +RuboCop::Cop::Sorbet::EnforceSignatures::VALID_STYLES = T.let(T.unsafe(nil), Array) + +# 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. +# +# pkg:gem/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 + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb:29 + def on_new_investigation; end + + protected + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb:50 + def autocorrect(corrector); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb:44 + def extract_all_sigils(processed_source); end +end + +# Makes the Sorbet `false` sigil mandatory in all files. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/false_sigil.rb:10 +class RuboCop::Cop::Sorbet::FalseSigil < ::RuboCop::Cop::Sorbet::HasSigil + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/false_sigil.rb:11 + def minimum_strictness; end +end + +# Disallow including the `Comparable` module in `T::Enum`. +# +# @example +# +# # bad +# class Priority < T::Enum +# include Comparable +# +# enums do +# High = new(3) +# Medium = new(2) +# Low = new(1) +# end +# +# def <=>(other) +# serialize <=> other.serialize +# end +# end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/t_enum/forbid_comparable_t_enum.rb:24 +class RuboCop::Cop::Sorbet::ForbidComparableTEnum < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::TEnum + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/t_enum/forbid_comparable_t_enum.rb:32 + def mix_in_comparable?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/t_enum/forbid_comparable_t_enum.rb:36 + def on_send(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/t_enum/forbid_comparable_t_enum.rb:27 +RuboCop::Cop::Sorbet::ForbidComparableTEnum::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/t_enum/forbid_comparable_t_enum.rb:29 +RuboCop::Cop::Sorbet::ForbidComparableTEnum::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# 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 +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb:25 +class RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb:33 + def extend_t_sig_or_helpers?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb:37 + def on_send(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb:29 +RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb:30 +RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Correct `send` expressions in include statements by constant literals. +# +# Sorbet, the static checker, is not (yet) able to support constructs on the +# following form: +# +# ```ruby +# class MyClass +# include send_expr +# end +# ``` +# +# Multiple occurences of this can be found in Shopify's code base like: +# +# ```ruby +# include Rails.application.routes.url_helpers +# ``` +# or +# ```ruby +# include Polaris::Engine.helpers +# ``` +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:29 +class RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:36 + def dynamic_inclusion?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:40 + def on_send(node); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:52 + def neither_const_nor_self?(node); end + + # Returns true if the node is within a module declaration that is not anonymous. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:57 + def within_onymous_module?(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:32 +RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:33 +RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Check that code does not call `mixes_in_class_methods` from Sorbet `T::Helpers`. +# +# Good: +# +# ``` +# module M +# extend ActiveSupport::Concern +# +# class_methods do +# ... +# end +# end +# ``` +# +# Bad: +# +# ``` +# module M +# extend T::Helpers +# +# module ClassMethods +# ... +# end +# +# mixes_in_class_methods(ClassMethods) +# end +# ``` +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_mixes_in_class_methods.rb:33 +class RuboCop::Cop::Sorbet::ForbidMixesInClassMethods < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_mixes_in_class_methods.rb:38 + def mixes_in_class_methods?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_mixes_in_class_methods.rb:45 + def on_csend(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_mixes_in_class_methods.rb:42 + def on_send(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_mixes_in_class_methods.rb:34 +RuboCop::Cop::Sorbet::ForbidMixesInClassMethods::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_mixes_in_class_methods.rb:35 +RuboCop::Cop::Sorbet::ForbidMixesInClassMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# 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 +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb:23 +class RuboCop::Cop::Sorbet::ForbidRBIOutsideOfAllowedPaths < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb:26 + def on_new_investigation; end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb:48 + def allowed_paths; end +end + +# Check that definitions do not use a `sig` block. +# +# Good: +# +# ``` +# #: -> void +# def foo; end +# ``` +# +# Bad: +# +# ``` +# sig { void } +# def foo; end +# ``` +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/forbid_sig.rb:23 +class RuboCop::Cop::Sorbet::ForbidSig < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::SignatureHelp + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/forbid_sig.rb:28 + def on_signature(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/forbid_sig.rb:26 +RuboCop::Cop::Sorbet::ForbidSig::MSG = T.let(T.unsafe(nil), String) + +# Check that definitions do not use a `sig` block. +# +# Good: +# +# ``` +# #: -> void +# def foo; end +# ``` +# +# Bad: +# +# ``` +# T::Sig.sig { void } +# def foo; end +# ``` +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/forbid_sig_with_runtime.rb:23 +class RuboCop::Cop::Sorbet::ForbidSigWithRuntime < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::SignatureHelp + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/forbid_sig_with_runtime.rb:28 + def on_signature(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/forbid_sig_with_runtime.rb:26 +RuboCop::Cop::Sorbet::ForbidSigWithRuntime::MSG = T.let(T.unsafe(nil), String) + +# Check that `sig` is used instead of `T::Sig::WithoutRuntime.sig`. +# +# Good: +# +# ``` +# sig { void } +# def foo; end +# ``` +# +# Bad: +# +# ``` +# T::Sig::WithoutRuntime.sig { void } +# def foo; end +# ``` +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/forbid_sig_without_runtime.rb:23 +class RuboCop::Cop::Sorbet::ForbidSigWithoutRuntime < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::SignatureHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/forbid_sig_without_runtime.rb:29 + def on_signature(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/forbid_sig_without_runtime.rb:27 +RuboCop::Cop::Sorbet::ForbidSigWithoutRuntime::MSG = T.let(T.unsafe(nil), String) + +# Correct superclass `send` expressions by constant literals. +# +# Sorbet, the static checker, is not (yet) able to support constructs on the +# following form: +# +# ```ruby +# class Foo < send_expr; end +# ``` +# +# Multiple occurences of this can be found in Shopify's code base like: +# +# ```ruby +# class ShopScope < Component::TrustedIdScope[ShopIdentity::ShopId] +# ``` +# or +# ```ruby +# class ApiClientEligibility < Struct.new(:api_client, :match_results, :shop) +# ``` +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb:28 +class RuboCop::Cop::Sorbet::ForbidSuperclassConstLiteral < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb:32 + def dynamic_superclass?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb:36 + def on_class(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb:29 +RuboCop::Cop::Sorbet::ForbidSuperclassConstLiteral::MSG = T.let(T.unsafe(nil), String) + +# Disallows using `T.absurd` anywhere. +# Set `AutocorrectToRBS: true` to replace supported calls with RBS inline comments. +# +# @example +# +# # bad +# T.absurd(foo) +# +# # good +# foo #: absurd +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_absurd.rb:18 +class RuboCop::Cop::Sorbet::ForbidTAbsurd < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::Sorbet::RBSAssertionCorrection + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_absurd.rb:33 + def on_csend(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_absurd.rb:28 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_absurd.rb:26 + def t_absurd?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_absurd.rb:43 + def assertion_statement(node, allow_assignment:); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_absurd.rb:37 + def autocorrect_t_absurd_to_rbs(corrector, node); end + + # `unless` is represented as an `if` node with its branches swapped, so its source + # `else` branch is the second child. For `if` and `case`, it is the last child. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_absurd.rb:61 + def inline_else_branch(parent); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_absurd.rb:50 + def inline_else_statement(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_absurd.rb:22 +RuboCop::Cop::Sorbet::ForbidTAbsurd::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_absurd.rb:23 +RuboCop::Cop::Sorbet::ForbidTAbsurd::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Detect and autocorrect `T.any(..., NilClass, ...)` to `T.nilable(...)` +# +# @example +# +# # bad +# T.any(String, NilClass) +# T.any(NilClass, String) +# T.any(NilClass, Symbol, String) +# +# # good +# T.nilable(String) +# T.nilable(String) +# T.nilable(T.any(Symbol, String)) +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_any_with_nil.rb:19 +class RuboCop::Cop::Sorbet::ForbidTAnyWithNil < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_any_with_nil.rb:31 + def nil_const_node?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_any_with_nil.rb:48 + def on_csend(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_any_with_nil.rb:35 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_any_with_nil.rb:26 + def t_any_call?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_any_with_nil.rb:52 + def build_replacement(non_nil_args); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_any_with_nil.rb:22 +RuboCop::Cop::Sorbet::ForbidTAnyWithNil::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_any_with_nil.rb:23 +RuboCop::Cop::Sorbet::ForbidTAnyWithNil::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Disallows using `T.assert_type!` anywhere. +# +# @example +# +# # bad +# T.assert_type!(foo, Integer) +# +# # good +# raise unless foo.is_a?(Integer) +# +# # good +# assert_kind_of(Integer, foo) +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_assert_type.rb:20 +class RuboCop::Cop::Sorbet::ForbidTAssertType < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_assert_type.rb:30 + def on_csend(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_assert_type.rb:27 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_assert_type.rb:25 + def t_assert_type?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_assert_type.rb:21 +RuboCop::Cop::Sorbet::ForbidTAssertType::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_assert_type.rb:22 +RuboCop::Cop::Sorbet::ForbidTAssertType::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Disallows using `T.bind` anywhere. +# Set `AutocorrectToRBS: true` to replace supported calls with RBS inline comments. +# +# @example +# +# # bad +# T.bind(self, Integer) +# +# # good +# #: self as Integer +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_bind.rb:19 +class RuboCop::Cop::Sorbet::ForbidTBind < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::Sorbet::RBSAssertionCorrection + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_bind.rb:34 + def on_csend(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_bind.rb:29 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_bind.rb:27 + def t_bind?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_bind.rb:38 + def autocorrect_t_bind_to_rbs(corrector, node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_bind.rb:23 +RuboCop::Cop::Sorbet::ForbidTBind::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_bind.rb:24 +RuboCop::Cop::Sorbet::ForbidTBind::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Disallows assigning the result of `T.bind`. +# +# `T.bind` changes the type of its first argument and returns that argument. +# Assigning its result can therefore unintentionally change the inferred type +# of both the assignment target and the first argument. +# +# @safety +# Auto-correction is unsafe because replacing `T.bind` with `T.cast` +# removes the scope-wide type rebind of the first argument. Code that +# relies on that narrowed type may no longer type-check. +# +# @example +# +# # bad +# foo = T.bind(self, Integer) +# +# # good +# foo = T.cast(self, Integer) +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_bind_in_assignment.rb:26 +class RuboCop::Cop::Sorbet::ForbidTBindInAssignment < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_bind_in_assignment.rb:42 + def on_csend(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_bind_in_assignment.rb:34 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_bind_in_assignment.rb:32 + def t_bind?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_bind_in_assignment.rb:28 +RuboCop::Cop::Sorbet::ForbidTBindInAssignment::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_bind_in_assignment.rb:29 +RuboCop::Cop::Sorbet::ForbidTBindInAssignment::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Disallows using `T.cast` anywhere. +# Set `AutocorrectToRBS: true` to replace supported calls with RBS inline comments. +# +# @example +# +# # bad +# T.cast(foo, Integer) +# +# # good +# foo #: as Integer +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_cast.rb:19 +class RuboCop::Cop::Sorbet::ForbidTCast < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::Sorbet::RBSAssertionCorrection + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_cast.rb:34 + def on_csend(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_cast.rb:29 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_cast.rb:27 + def t_cast?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_cast.rb:38 + def autocorrect_t_cast_to_rbs(corrector, node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_cast.rb:23 +RuboCop::Cop::Sorbet::ForbidTCast::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_cast.rb:24 +RuboCop::Cop::Sorbet::ForbidTCast::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Disallows instantiating Sorbet collection types. Instantiate the Ruby +# collection directly and declare its type separately when needed. +# +# Checks `T::Array`, `T::Hash`, `T::Set`, `T::Range`, +# `T::Enumerator`, `T::Enumerator::Lazy`, and `T::Enumerator::Chain`, +# with or without type arguments. +# +# Set `AutocorrectToRBS: true` to replace Sorbet constructors with Ruby +# constructors. RBS inline type annotations are added only to assignments. +# Assignments with an existing RBS annotation or an untranslatable type +# are not autocorrected. +# Empty Array and Hash constructors use literals unless arguments, blocks, +# or comments inside the call need to be preserved. +# +# @safety +# Autocorrection removes runtime evaluation of type arguments and changes +# constant lookup. RBS annotations require an RBS-aware type checker. +# +# @example +# # bad +# T::Array[String].new +# T::Hash[Symbol, Integer].new +# T::Set[String].new +# T::Array.new +# +# # good +# Array.new +# Hash.new +# Set.new +# T.let(Array.new, T::Array[String]) +# Set.new #: Set[String] +# +# @example AutocorrectToRBS: true +# # bad +# arr = T::Array[String].new +# items = T::Set[T.nilable(String)].new(values) +# consume(T::Array[String].new) +# +# # good +# arr = [] #: Array[String] +# items = Set.new(values) #: Set[String?] +# consume([]) +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_collection_instantiation.rb:50 +class RuboCop::Cop::Sorbet::ForbidTCollectionInstantiation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::Sorbet::RBSAssertionCorrection + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_collection_instantiation.rb:74 + def on_csend(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_collection_instantiation.rb:65 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_collection_instantiation.rb:58 + def t_collection?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_collection_instantiation.rb:78 + def autocorrect_to_rbs(corrector, node, type); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_collection_instantiation.rb:105 + def empty_collection_literal(node, type); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_collection_instantiation.rb:54 +RuboCop::Cop::Sorbet::ForbidTCollectionInstantiation::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_collection_instantiation.rb:55 +RuboCop::Cop::Sorbet::ForbidTCollectionInstantiation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Disallow using `T::Enum`. +# +# @example +# +# # bad +# class MyEnum < T::Enum +# enums do +# A = new +# B = new +# end +# end +# +# # good +# class MyEnum +# A = "a" +# B = "b" +# C = "c" +# end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_enum.rb:26 +class RuboCop::Cop::Sorbet::ForbidTEnum < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_enum.rb:34 + def on_class(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_enum.rb:30 + def t_enum?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_enum.rb:27 +RuboCop::Cop::Sorbet::ForbidTEnum::MSG = T.let(T.unsafe(nil), String) + +# Forbids `extend T::Helpers` and `include T::Helpers` in classes and modules. +# +# This is useful when using RBS or RBS-inline syntax for type signatures, +# where `T::Helpers` is not needed and including it is redundant. +# +# @example +# +# # bad +# class Example +# extend T::Helpers +# end +# +# # bad +# module Example +# include T::Helpers +# end +# +# # good +# class Example +# end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_helpers.rb:26 +class RuboCop::Cop::Sorbet::ForbidTHelpers < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_helpers.rb:40 + def on_csend(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_helpers.rb:35 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_helpers.rb:31 + def t_helpers?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_helpers.rb:27 +RuboCop::Cop::Sorbet::ForbidTHelpers::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_helpers.rb:28 +RuboCop::Cop::Sorbet::ForbidTHelpers::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Disallows using `T.let` anywhere. +# Set `AutocorrectToRBS: true` to replace supported calls with RBS inline comments. +# +# @example +# +# # bad +# T.let(foo, Integer) +# +# # good +# foo #: Integer +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_let.rb:19 +class RuboCop::Cop::Sorbet::ForbidTLet < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::Sorbet::RBSAssertionCorrection + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_let.rb:34 + def on_csend(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_let.rb:29 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_let.rb:27 + def t_let?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_let.rb:38 + def autocorrect_t_let_to_rbs(corrector, node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_let.rb:23 +RuboCop::Cop::Sorbet::ForbidTLet::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_let.rb:24 +RuboCop::Cop::Sorbet::ForbidTLet::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Disallows using `T.must` anywhere. +# Set `AutocorrectToRBS: true` to replace supported calls with RBS inline comments. +# +# @example +# +# # bad +# T.must(foo) +# +# # good +# foo #: as !nil +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_must.rb:18 +class RuboCop::Cop::Sorbet::ForbidTMust < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::Sorbet::RBSAssertionCorrection + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_must.rb:33 + def on_csend(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_must.rb:28 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_must.rb:26 + def t_must?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_must.rb:37 + def autocorrect_t_must_to_rbs(corrector, node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_must.rb:22 +RuboCop::Cop::Sorbet::ForbidTMust::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_must.rb:23 +RuboCop::Cop::Sorbet::ForbidTMust::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Forbids `extend T::Sig` and `include T::Sig` in classes and modules. +# +# This is useful when using RBS or RBS-inline syntax for type signatures, +# where `T::Sig` is not needed and including it is redundant. +# +# @example +# +# # bad +# class Example +# extend T::Sig +# end +# +# # bad +# module Example +# include T::Sig +# end +# +# # good +# class Example +# end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_sig.rb:26 +class RuboCop::Cop::Sorbet::ForbidTSig < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_sig.rb:40 + def on_csend(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_sig.rb:35 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_sig.rb:31 + def t_sig?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_sig.rb:27 +RuboCop::Cop::Sorbet::ForbidTSig::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_sig.rb:28 +RuboCop::Cop::Sorbet::ForbidTSig::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Disallow using `T::Struct` and `T::Props`. +# +# @example +# +# # bad +# class MyStruct < T::Struct +# const :foo, String +# prop :bar, Integer, default: 0 +# +# def some_method; end +# end +# +# # good +# class MyStruct +# extend T::Sig +# +# sig { returns(String) } +# attr_reader :foo +# +# sig { returns(Integer) } +# attr_accessor :bar +# +# sig { params(foo: String, bar: Integer) } +# def initialize(foo:, bar: 0) +# @foo = foo +# @bar = bar +# end +# +# def some_method; end +# end +# +# @example AutocorrectStyle: rbs +# +# # bad +# class MyStruct < T::Struct +# const :foo, String +# prop :bar, T.nilable(Integer), default: 0 +# end +# +# # good +# class MyStruct +# #: String +# attr_reader :foo +# +# #: Integer? +# attr_accessor :bar +# +# #: (foo: String, ?bar: Integer?) -> void +# def initialize(foo:, bar: 0) +# @foo = foo +# @bar = bar +# end +# end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:63 +class RuboCop::Cop::Sorbet::ForbidTStruct < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::CommentsHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:232 + def on_class(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:277 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:230 + def t_props?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:225 + def t_struct?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:333 + def autocorrect_style; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:285 + def initialize_method(indent, props); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:329 + def previous_line_blank?(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:343 + def rbs?; end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:72 +RuboCop::Cop::Sorbet::ForbidTStruct::MSG_PROPS = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:71 +RuboCop::Cop::Sorbet::ForbidTStruct::MSG_STRUCT = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:141 +class RuboCop::Cop::Sorbet::ForbidTStruct::Property + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:144 + def initialize(node, kind, name, type, default:, factory:, style: T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:165 + def attr_accessor; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:157 + def attr_sig; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:142 + def default; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:142 + def factory; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:189 + def initialize_assign; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:176 + def initialize_param; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:169 + def initialize_sig_param; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:142 + def kind; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:142 + def name; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:196 + def nilable?; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:142 + def node; end + + # A prop is optional when it declares a `default:`, a `factory:`, or + # is nilable (which gives it an implicit `nil` default). RBS marks + # optional keyword parameters with `?name:`, mirroring the default + # value that `initialize_param` emits. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:204 + def optional?; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:213 + def rbs?; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:217 + def rbs_type; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:208 + def type; end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:69 +RuboCop::Cop::Sorbet::ForbidTStruct::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# This class walks down the class body of a T::Struct and collects all the properties that will need to be +# translated into `attr_reader` and `attr_accessor` methods. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:77 +class RuboCop::Cop::Sorbet::ForbidTStruct::TStructWalker + include ::RuboCop::AST::Traversal + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:82 + def initialize(style = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:90 + def extend_t_sig?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:80 + def extend_t_sig_node; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:80 + def has_extend_t_sig; end + + # Override AST::Traversal's callbacks to stop at nested scopes, so their properties and `extend T::Sig` stay + # out of this class. + # RuboCop's separate traversal still visits nested structs and creates a fresh walker for each. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:102 + def on_class(_node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:105 + def on_def(_node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:106 + def on_defs(_node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:103 + def on_module(_node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:104 + def on_sclass(_node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:108 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:80 + def props; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:95 + def t_struct_prop?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:74 +RuboCop::Cop::Sorbet::ForbidTStruct::VALID_AUTOCORRECT_STYLES = T.let(T.unsafe(nil), Array) + +# Disallows using `T.type_alias` anywhere. +# Set `AutocorrectToRBS: true` to replace standalone constant assignments with RBS type aliases. +# Autocorrection is unsafe because it removes the Ruby constant. References to the +# constant must be migrated separately to the lowercase RBS alias name. +# Declarations containing RuboCop directives are not autocorrected. +# +# @example +# +# # bad +# STRING_OR_INTEGER = T.type_alias { T.any(Integer, String) } +# +# # good +# #: type string_or_integer = Integer | String +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_type_alias.rb:22 +class RuboCop::Cop::Sorbet::ForbidTTypeAlias < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::Sorbet::RBSAssertionCorrection + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_type_alias.rb:31 + def on_block(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_type_alias.rb:37 + def on_itblock(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_type_alias.rb:36 + def on_numblock(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_type_alias.rb:29 + def t_type_alias?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_type_alias.rb:41 + def autocorrect_type_alias(corrector, node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_type_alias.rb:69 + def standalone_alias?(assignment); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_type_alias.rb:26 +RuboCop::Cop::Sorbet::ForbidTTypeAlias::MSG = T.let(T.unsafe(nil), String) + +# Disallows using `T.unsafe` anywhere. +# Set `AutocorrectToRBS: true` to replace supported calls with RBS inline comments. +# +# @example +# +# # bad +# T.unsafe(foo) +# +# # good +# foo #: as untyped +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_unsafe.rb:18 +class RuboCop::Cop::Sorbet::ForbidTUnsafe < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::Sorbet::RBSAssertionCorrection + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_unsafe.rb:33 + def on_csend(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_unsafe.rb:28 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_unsafe.rb:26 + def t_unsafe?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_unsafe.rb:37 + def autocorrect_t_unsafe_to_rbs(corrector, node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_unsafe.rb:22 +RuboCop::Cop::Sorbet::ForbidTUnsafe::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_unsafe.rb:23 +RuboCop::Cop::Sorbet::ForbidTUnsafe::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# 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 +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_untyped.rb:20 +class RuboCop::Cop::Sorbet::ForbidTUntyped < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_untyped.rb:27 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_untyped.rb:25 + def t_untyped?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_untyped.rb:21 +RuboCop::Cop::Sorbet::ForbidTUntyped::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_untyped.rb:22 +RuboCop::Cop::Sorbet::ForbidTUntyped::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Disallows defining type aliases that contain shapes +# +# @example +# +# # bad +# Foo = T.type_alias { { foo: Integer } } +# +# # good +# class Foo +# extend T::Sig +# +# sig { params(foo: Integer).void } +# def initialize(foo) +# @foo = foo +# end +# end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_type_aliased_shapes.rb:24 +class RuboCop::Cop::Sorbet::ForbidTypeAliasedShapes < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_type_aliased_shapes.rb:36 + def on_block(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_type_aliased_shapes.rb:41 + def on_itblock(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_type_aliased_shapes.rb:40 + def on_numblock(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_type_aliased_shapes.rb:28 + def shape_type_alias?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_type_aliased_shapes.rb:25 +RuboCop::Cop::Sorbet::ForbidTypeAliasedShapes::MSG = T.let(T.unsafe(nil), String) + +# 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 +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:25 +class RuboCop::Cop::Sorbet::ForbidUntypedStructProps < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:54 + def on_class(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:44 + def subclass_of_t_struct?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:39 + def t_nilable_untyped(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:29 + def t_struct(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:34 + def t_untyped(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:50 + def untyped_props(param0); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:26 +RuboCop::Cop::Sorbet::ForbidUntypedStructProps::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi_versioning/gem_version_annotation_helper.rb:6 +module RuboCop::Cop::Sorbet::GemVersionAnnotationHelper + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi_versioning/gem_version_annotation_helper.rb:9 + def gem_version_annotations; end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi_versioning/gem_version_annotation_helper.rb:17 + def gem_version_annotation?(comment); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi_versioning/gem_version_annotation_helper.rb:21 + def gem_versions(comment); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi_versioning/gem_version_annotation_helper.rb:7 +RuboCop::Cop::Sorbet::GemVersionAnnotationHelper::VERSION_PREFIX = T.let(T.unsafe(nil), String) + +# 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 `SuggestedStrictness` level is specified, it will be used in autocorrect. +# If a `MinimumStrictness` level is specified, it will be used in offense messages and autocorrect. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/has_sigil.rb:18 +class RuboCop::Cop::Sorbet::HasSigil < ::RuboCop::Cop::Sorbet::ValidSigil + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/has_sigil.rb:19 + def require_sigil_on_all_files?; end +end + +# Makes the Sorbet `ignore` sigil mandatory in all files. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/ignore_sigil.rb:10 +class RuboCop::Cop::Sorbet::IgnoreSigil < ::RuboCop::Cop::Sorbet::HasSigil + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/ignore_sigil.rb:11 + def minimum_strictness; end +end + +# Disallows declaring implicit conversion methods. +# Since Sorbet is a nominal (not structural) type system, +# implicit conversion is currently unsupported. +# +# @example +# +# # bad +# def to_str; end +# +# # good +# def to_str(x); end +# +# # bad +# def self.to_str; end +# +# # good +# def self.to_str(x); end +# +# # bad +# alias to_str to_s +# +# @see https://docs.ruby-lang.org/en/master/implicit_conversion_rdoc.html +# @note Since the arity of aliased methods is not checked, false positives may result. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/implicit_conversion_method.rb:31 +class RuboCop::Cop::Sorbet::ImplicitConversionMethod < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/implicit_conversion_method.rb:37 + def on_alias(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/implicit_conversion_method.rb:42 + def on_def(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/implicit_conversion_method.rb:48 + def on_defs(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/implicit_conversion_method.rb:50 + def on_send(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/implicit_conversion_method.rb:32 +RuboCop::Cop::Sorbet::ImplicitConversionMethod::IMPLICIT_CONVERSION_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/implicit_conversion_method.rb:33 +RuboCop::Cop::Sorbet::ImplicitConversionMethod::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/implicit_conversion_method.rb:35 +RuboCop::Cop::Sorbet::ImplicitConversionMethod::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# 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 +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb:20 +class RuboCop::Cop::Sorbet::KeywordArgumentOrdering < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::SignatureHelp + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb:23 + def on_signature(node); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb:34 + def check_order_for_kwoptargs(parameters); end +end + +# Disallow creating a `T::Enum` with less than two values. +# +# @example +# +# # bad +# class ErrorMessages < T::Enum +# enums do +# ServerError = new("There was a server error.") +# end +# end +# +# # good +# class ErrorMessages < T::Enum +# enums do +# ServerError = new("There was a server error.") +# NotFound = new("The resource was not found.") +# end +# end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/t_enum/multiple_t_enum_values.rb:24 +class RuboCop::Cop::Sorbet::MultipleTEnumValues < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::TEnum + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/t_enum/multiple_t_enum_values.rb:30 + def enums_block?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/t_enum/multiple_t_enum_values.rb:40 + def on_block(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/t_enum/multiple_t_enum_values.rb:34 + def on_class(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/t_enum/multiple_t_enum_values.rb:27 +RuboCop::Cop::Sorbet::MultipleTEnumValues::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb:8 +module RuboCop::Cop::Sorbet::MutableConstantSorbetAwareBehaviour + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb:28 + def on_assignment(value); end + + class << self + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb:10 + def prepended(base); end + end +end + +# Checks for the obsolete pattern for initializing instance variables that was required for older Sorbet +# +# It's no longer required, as of Sorbet 0.5.10210 +# See https://sorbet.org/docs/type-assertions#put-type-assertions-behind-memoization +# +# @example +# +# # bad +# sig { returns(Foo) } +# def foo +# @foo = T.let(@foo, T.nilable(Foo)) +# @foo ||= Foo.new +# end +# +# # bad +# sig { returns(Foo) } +# def foo +# # This would have been a mistake, causing the memoized value to be discarded and recomputed on every call. +# @foo = T.let(nil, T.nilable(Foo)) +# @foo ||= Foo.new +# end +# +# # good +# sig { returns(Foo) } +# def foo +# @foo ||= T.let(Foo.new, T.nilable(Foo)) +# end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/obsolete_strict_memoization.rb:37 +class RuboCop::Cop::Sorbet::ObsoleteStrictMemoization < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::MatchRange + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp + include ::RuboCop::Cop::Sorbet::TargetSorbetVersion + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::Sorbet::TargetSorbetVersion::ClassMethods + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/obsolete_strict_memoization.rb:51 + def legacy_memoization_pattern?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/obsolete_strict_memoization.rb:62 + def on_begin(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/obsolete_strict_memoization.rb:86 + def relevant_file?(file); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/obsolete_strict_memoization.rb:47 +RuboCop::Cop::Sorbet::ObsoleteStrictMemoization::MSG = T.let(T.unsafe(nil), String) + +# Shared guards and rewrites for replacing Sorbet runtime assertions +# with equivalent RBS inline comments. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/rbs_assertion_correction.rb:8 +module RuboCop::Cop::Sorbet::RBSAssertionCorrection + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Alignment + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/rbs_assertion_correction.rb:149 + def assertion_ends_line?(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/rbs_assertion_correction.rb:142 + def assertion_statement(node, allow_assignment:); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/rbs_assertion_correction.rb:82 + def autocorrect_argument_list(corrector, node, expression, annotation, context); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/rbs_assertion_correction.rb:17 + def autocorrect_rbs_assertion(corrector, node, allow_assignment: T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/rbs_assertion_correction.rb:37 + def call_argument_context(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/rbs_assertion_correction.rb:105 + def comments_within?(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/rbs_assertion_correction.rb:129 + def inside_single_line_block?(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/rbs_assertion_correction.rb:120 + def nested_rbs_assertion_autocorrectable?(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/rbs_assertion_correction.rb:112 + def one_matching_assertion?(container, node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/rbs_assertion_correction.rb:156 + def range_after_horizontal_whitespace(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/rbs_assertion_correction.rb:133 + def rbs_assertion_autocorrectable?(node, allow_assignment: T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/rbs_assertion_correction.rb:30 + def rbs_assertion_correction_context(node, allow_assignment:); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/rbs_assertion_correction.rb:12 +RuboCop::Cop::Sorbet::RBSAssertionCorrection::COMMENT_START = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/rbs_assertion_correction.rb:13 +RuboCop::Cop::Sorbet::RBSAssertionCorrection::NEWLINES = T.let(T.unsafe(nil), Array) + +# 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. +# +# @safety +# This cop should not be enabled in applications that have not monkey +# patched `Module`. +# +# @example +# # bad +# class Example +# extend T::Sig +# sig { void } +# def no_op; end +# end +# +# # good +# class Example +# sig { void } +# def no_op; end +# end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb:28 +class RuboCop::Cop::Sorbet::RedundantExtendTSig < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb:36 + def extend_t_sig?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb:40 + def on_send(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb:32 +RuboCop::Cop::Sorbet::RedundantExtendTSig::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb:33 +RuboCop::Cop::Sorbet::RedundantExtendTSig::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Prevents unnecessary `T.let` where Sorbet infers the type automatically. +# +# When a signature parameter is assigned to an instance variable in +# `initialize`, the type is inferred from the signature. +# +# When a constant is assigned a constructor call (`.new`), optionally +# followed by `.freeze` (Sorbet 0.6.13304+), the type is inferred from +# the class being instantiated. Generic classes (e.g. `Set`) are +# excluded: Sorbet infers their constructor calls as applied types like +# `T::Set[T.untyped]`, so an annotation is still required. +# +# @example +# +# # bad +# sig { params(a: Integer) } +# def initialize(a) +# @a = T.let(a, Integer) +# end +# +# # good +# sig { params(a: Integer) } +# def initialize(a) +# @a = a +# end +# +# # good +# sig { params(a: Integer) } +# def initialize(a) +# @a = T.let(a, T.any(Integer, String)) +# end +# +# # bad +# DEFAULT_PATH = T.let(Pathname.new("/usr/local").freeze, Pathname) +# +# # good +# DEFAULT_PATH = Pathname.new("/usr/local").freeze +# +# # good — generic classes are not inferred, so T.let is required +# LICENSES = T.let(Set.new(["mit"]).freeze, T::Set[String]) +# +# # good — instance variables are only inferred from signature parameters +# @path = T.let(Pathname.new("/usr/local"), Pathname) +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:48 +class RuboCop::Cop::Sorbet::RedundantTLet < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::SignatureHelp + include ::RuboCop::Cop::Sorbet::ConstantScope + include ::RuboCop::Cop::Sorbet::TargetSorbetVersion + include ::RuboCop::Cop::Sorbet::TLetCorrection + extend ::RuboCop::Cop::Sorbet::TargetSorbetVersion::ClassMethods + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:99 + def on_casgn(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:80 + def on_def(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:78 + def sig_params(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:72 + def t_let(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:75 + def t_let_casgn(param0 = T.unsafe(nil)); end + + private + + # Returns the `.new` call for a constant constructor, looking through + # an optional block and trailing `.freeze`. For example, + # `Foo.new { _1.enabled = true }.freeze` returns the `Foo.new` call, + # while `foo.new` and `Foo.build` return `nil`. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:135 + def constructor_call(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:195 + def expected_type(sig_type, arg_kind); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:180 + def find_redundant_t_let(node, tlet_key, tlet_value, sig_params, method_args); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:151 + def find_sig_node(method_node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:172 + def ivar_assignments(node); end + + # Maps named parameters to their AST types, omitting destructured + # parameters because they have no name and cannot appear in a signature. + # For example, `def initialize(a, (left, right), *rest)` returns + # `{ a: :arg, rest: :restarg }`, omitting `(left, right)`. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:125 + def named_argument_types(method_node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:160 + def normalize_whitespace(source); end + + # Returns the method send wrapped by a block, or the original node when + # no block is present. For example, `Foo.new { _1.enabled = true }` + # returns the `Foo.new` send node. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:147 + def unwrap_block(node); end +end + +# Classes whose constructor calls Sorbet infers as applied generic +# types (e.g. `T::Set[T.untyped]`) rather than the bare class, so +# constants assigned them still need an explicit annotation. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:69 +RuboCop::Cop::Sorbet::RedundantTLet::GENERIC_CLASSES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:63 +RuboCop::Cop::Sorbet::RedundantTLet::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:64 +RuboCop::Cop::Sorbet::RedundantTLet::MSG_CONSTRUCTOR = T.let(T.unsafe(nil), String) + +# Checks for redundant `T.let` declarations and trailing RBS annotations +# where the assigned value is a literal whose type Sorbet can infer +# automatically. +# +# Simple literals (strings, symbols, integers, floats, regexps) infer as +# their own class. Regexp literals are the only simple literals whose +# inference survives a `.freeze` call (Sorbet 0.6.13304+), so +# `T.let(/foo/.freeze, Regexp)` is also redundant; other frozen simple +# literals (e.g. `"hello".freeze`) are not inferred and still need `T.let`. +# +# Array literals of simple literals are also inferred: +# +# * A frozen array (`[...].freeze`) infers as a fixed-size tuple, which is +# a subtype of the annotated `T::Array`, so the annotation is redundant. +# * An unfrozen array infers as `T::Array[]`. It is only +# flagged when that inferred type matches the annotation exactly, to +# avoid silently widening (e.g. `["a", nil]` infers a nilable element). +# +# An array annotation whose direct element type is a fixed-size tuple is +# preserved. Removing `T::Array[[...]]` or `Array[[...]]` can widen each +# tuple into an array with a union element type and lose its positional +# types. +# +# Hashes are excluded: Sorbet infers hash literals as `T.untyped`, so the +# annotation is required. +# +# @example +# # bad +# MAX_RETRIES = T.let(3, Integer) +# GREETING = T.let("hello", String) +# RATE = T.let(1.5, Float) +# PATTERN = T.let(/foo/, Regexp) +# FROZEN_PATTERN = T.let(/foo/.freeze, Regexp) +# STATUS = T.let(:active, Symbol) +# SHELLS = T.let([:bash, :zsh].freeze, T::Array[Symbol]) +# NAMES = T.let(["alice", "bob"], T::Array[String]) +# RBS_GREETING = "hello" #: String +# RBS_NAMES = ["alice", "bob"] #: Array[String] +# +# # good +# MAX_RETRIES = 3 +# GREETING = "hello" +# RATE = 1.5 +# PATTERN = /foo/ +# FROZEN_PATTERN = /foo/.freeze +# STATUS = :active +# SHELLS = [:bash, :zsh].freeze +# NAMES = ["alice", "bob"] +# RBS_GREETING = "hello" +# RBS_NAMES = ["alice", "bob"] +# +# # good — non-regexp frozen simple literals are not inferred +# GREETING = T.let("hello".freeze, String) +# +# # good — hash literals are inferred as T.untyped +# OPTIONS = T.let({ verbose: true }, T::Hash[Symbol, T::Boolean]) +# +# # good — unfrozen array whose annotation is wider than the inferred type +# NAMES = T.let(["alice", "bob"], T::Array[T.nilable(String)]) +# +# # good — the tuple element type is not inferred from the nested literals +# BUCKETS = T.let([[1, "one"]].freeze, T::Array[[Integer, String]]) +# RBS_BUCKETS = [[1, "one"]].freeze #: Array[[Integer, String]] +# +# # good — type is not the literal's own class +# value = T.let("hello", T.nilable(String)) +# +# # good — instance variables need T.let for Sorbet to track their type +# @max_retries = T.let(3, Integer) +# +# # good — local variables may need T.let so Sorbet allows reassignment +# count = T.let(0, Integer) +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let_for_literal.rb:80 +class RuboCop::Cop::Sorbet::RedundantTLetForLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::ConstantScope + include ::RuboCop::Cop::Sorbet::TargetSorbetVersion + include ::RuboCop::Cop::Sorbet::TLetCorrection + extend ::RuboCop::Cop::Sorbet::TargetSorbetVersion::ClassMethods + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let_for_literal.rb:134 + def on_casgn(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let_for_literal.rb:130 + def t_let_with_array?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let_for_literal.rb:125 + def t_let_with_literal_and_class?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let_for_literal.rb:180 + def check_rbs_annotation(node); end + + # An array literal is inferable only when every element is one of the + # simple literals Sorbet reflects into the element type (or a nested + # inferable array). Empty arrays are excluded: they infer as + # `T::Array[T.untyped]` and so still need the annotation. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let_for_literal.rb:230 + def inferable_array?(node); end + + # Returns the underlying literal when its inference is supported by the + # target Sorbet version. Bare literals return themselves. A frozen value + # returns its receiver only for regexps, whose inference survives + # `.freeze` on supported targets. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let_for_literal.rb:165 + def inferable_literal_node(value_node); end + + # The type Sorbet infers for an unfrozen array literal, or nil when the + # element types are not uniform enough to render deterministically + # (mixed classes, booleans, nils and nested arrays are left alone). + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let_for_literal.rb:267 + def inferred_array_type(node); end + + # Strips whitespace and any trailing comma before a closing delimiter, + # so a multi-line annotation (`T::Array[\n String,\n]`) still compares + # equal to the rendered inferred type. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let_for_literal.rb:277 + def normalize(source); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let_for_literal.rb:222 + def rbs_array_type_with_tuple_element?(type); end + + # Returns whether Sorbet's inferred array type makes the annotation + # redundant. A frozen `[:a].freeze` infers as a tuple compatible with + # any `T::Array[...]`; an unfrozen `[:a]` must infer exactly the + # annotated type, such as `T::Array[Symbol]`. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let_for_literal.rb:247 + def redundant_array_annotation?(array_node, type_node, frozen:); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let_for_literal.rb:214 + def redundant_rbs_array_annotation?(array_node, type, frozen:); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let_for_literal.rb:173 + def register_offense(node, value_node, type); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let_for_literal.rb:207 + def register_rbs_offense(node, comment, type); end + + # `T::Array[...]` (with or without a leading `::`) + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let_for_literal.rb:259 + def t_array_type?(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let_for_literal.rb:254 + def t_array_type_with_tuple_element?(node); end +end + +# Element node types allowed inside an inferable array literal: the +# literals whose class Sorbet reflects into the array's element type. +# Regexps and ranges, by contrast, degrade the array to `T.untyped`, so +# they are excluded. Interpolated strings/symbols (`dstr`/`dsym`) infer +# as `String`/`Symbol`, the same as their plain literal forms. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let_for_literal.rb:111 +RuboCop::Cop::Sorbet::RedundantTLetForLiteral::ARRAY_ELEMENT_TYPES = T.let(T.unsafe(nil), Array) + +# Element node types whose inferred class is unambiguous, used to derive +# the element type of an unfrozen array literal. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let_for_literal.rb:115 +RuboCop::Cop::Sorbet::RedundantTLetForLiteral::ELEMENT_TYPE_TO_CLASS = T.let(T.unsafe(nil), Hash) + +# Simple literal node types Sorbet infers, mapped to the class name. +# Interpolated strings/symbols (`dstr`/`dsym`) infer as `String`/`Symbol`. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let_for_literal.rb:96 +RuboCop::Cop::Sorbet::RedundantTLetForLiteral::LITERAL_TYPE_TO_CLASS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let_for_literal.rb:92 +RuboCop::Cop::Sorbet::RedundantTLetForLiteral::MSG = T.let(T.unsafe(nil), String) + +# Checks for the use of Ruby Refinements library. Refinements add +# complexity and incur a performance penalty that can be significant +# for large code bases. Good examples are cases of unrelated +# methods that happen to have the same name as these module methods. +# +# @example +# # bad +# module Foo +# refine(Date) do +# end +# end +# +# # bad +# module Foo +# using(Date) do +# end +# end +# +# # good +# module Foo +# bar.refine(Date) +# end +# +# # good +# module Foo +# bar.using(Date) +# end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/refinement.rb:34 +class RuboCop::Cop::Sorbet::Refinement < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/refinement.rb:38 + def on_send(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/refinement.rb:35 +RuboCop::Cop::Sorbet::Refinement::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/refinement.rb:36 +RuboCop::Cop::Sorbet::Refinement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks that `on_failure` is not used without `checked(:tests)` or `checked(:always)`. +# +# @example +# +# # bad +# sig { params(x: Integer).returns(Integer).on_failure(:raise) } +# def plus_one(x) +# x + 1 +# end +# +# # good +# sig { params(x: Integer).returns(Integer).checked(:always).on_failure(:raise) } +# def plus_one(x) +# x + 1 +# end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/runtime_on_failure_depends_on_checked.rb:22 +class RuboCop::Cop::Sorbet::RuntimeOnFailureDependsOnChecked < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::SignatureHelp + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/runtime_on_failure_depends_on_checked.rb:33 + def checked_tests_or_always?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/runtime_on_failure_depends_on_checked.rb:28 + def on_failure_call?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/runtime_on_failure_depends_on_checked.rb:37 + def on_signature(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/runtime_on_failure_depends_on_checked.rb:25 +RuboCop::Cop::Sorbet::RuntimeOnFailureDependsOnChecked::MSG = T.let(T.unsafe(nil), String) + +# Suggests using `grep` over `select` when using it only for type narrowing. +# +# @example +# +# # bad +# strings_or_integers.select { |e| e.is_a?(String) } +# strings_or_integers.filter { |e| e.is_a?(String) } +# strings_or_integers.select { |e| e.kind_of?(String) } +# +# # good +# strings_or_integers.grep(String) +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/select_by_is_a.rb:19 +class RuboCop::Cop::Sorbet::SelectByIsA < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/select_by_is_a.rb:58 + def on_csend(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/select_by_is_a.rb:43 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/select_by_is_a.rb:26 + def type_narrowing_select?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/select_by_is_a.rb:22 +RuboCop::Cop::Sorbet::SelectByIsA::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/select_by_is_a.rb:23 +RuboCop::Cop::Sorbet::SelectByIsA::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks that setter methods (methods whose name ends with `=`) +# declare a `void` return type, in either a Sorbet `sig` block or an +# RBS inline comment signature. +# +# Sorbet requires setter methods to return `void`. Declaring any other +# return type violates the setter contract and is rejected by Sorbet +# +# @example +# +# # bad +# sig { params(name: String).returns(String) } +# def name=(name); end +# +# # good +# sig { params(name: String).void } +# def name=(name); end +# +# # bad +# #: (String) -> String +# def name=(name); end +# +# # good +# #: (String) -> void +# def name=(name); end +# +# # bad +# #: ( +# #| String name +# #| ) -> String +# def name=(name); end +# +# # good +# #: ( +# #| String name +# #| ) -> void +# def name=(name); end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/setter_return_type.rb:44 +class RuboCop::Cop::Sorbet::SetterReturnType < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::SignatureHelp + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/setter_return_type.rb:53 + def on_def(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/setter_return_type.rb:56 + def on_defs(node); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/setter_return_type.rb:60 + def check(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/setter_return_type.rb:140 + def check_rbs(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/setter_return_type.rb:103 + def check_sig(sig); end + + # Climb past `private`/`public`/`protected` and other send wrappers so + # sig/RBS lookup runs against the real surrounding siblings rather than + # the send's other arguments. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/setter_return_type.rb:80 + def outermost_send_ancestor(node); end + + # The `sig` blocks immediately preceding `target` among its siblings, + # supporting consecutive overload sigs. The scan stops at the first + # non-signature sibling so a setter never inherits another method's sig. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/setter_return_type.rb:88 + def preceding_sigs(target); end + + # Walks the receiver chain of the sig body (the builder call chain) + # and returns the outermost `void` or `returns` node, so a `void` or + # `returns` nested inside a type argument (e.g. `T.proc.void`) is not + # mistaken for the method's return declaration. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/setter_return_type.rb:121 + def return_declaration(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/setter_return_type.rb:72 + def setter?(node); end + + # Range covering `returns(TYPE)` (selector through the closing + # paren / last argument), to be replaced with `void`. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/setter_return_type.rb:133 + def sig_return_range(returns_node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/setter_return_type.rb:49 +RuboCop::Cop::Sorbet::SetterReturnType::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/setter_return_type.rb:51 +RuboCop::Cop::Sorbet::SetterReturnType::NON_SETTER_OPERATORS = T.let(T.unsafe(nil), Array) + +# Checks for the correct order of `sig` builder methods. +# +# Options: +# +# * `Order`: The order in which to enforce the builder methods are called. +# +# @example +# # bad +# sig { void.abstract } +# +# # good +# sig { abstract.void } +# +# # bad +# sig { returns(Integer).params(x: Integer) } +# +# # good +# sig { params(x: Integer).returns(Integer) } +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:24 +class RuboCop::Cop::Sorbet::SignatureBuildOrder < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::SignatureHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:33 + def on_signature(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:29 + def root_call(param0); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:96 + def builder_method_indexes; end + + # Split foo.bar.baz into [foo, foo.bar, foo.bar.baz] + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:83 + def call_chain(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:70 + def expected_source(expected_calls_and_indexes); end +end + +# Mixin for writing cops for signatures, providing a `signature?` node matcher and an `on_signature` trigger. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/signature_help.rb:7 +module RuboCop::Cop::Sorbet::SignatureHelp + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/signature_help.rb:16 + def bare_sig?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/signature_help.rb:42 + def on_block(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/signature_help.rb:47 + def on_itblock(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/signature_help.rb:46 + def on_numblock(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/signature_help.rb:49 + def on_signature(_node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/signature_help.rb:25 + def sig_with_runtime?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/signature_help.rb:34 + def sig_without_runtime?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/signature_help.rb:11 + def signature?(param0 = T.unsafe(nil)); end +end + +# 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 +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb:17 +class RuboCop::Cop::Sorbet::SingleLineRbiClassModuleDefinitions < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb:30 + def on_class(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb:22 + def on_module(node); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb:34 + def convert_newlines_to_semicolons(source); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb:20 +RuboCop::Cop::Sorbet::SingleLineRbiClassModuleDefinitions::MSG = T.let(T.unsafe(nil), String) + +# Makes the Sorbet `strict` sigil mandatory in all files. +# +# @safety +# This cop is unsafe because Sorbet sigils may not exist yet when it is run. +# +# @example +# +# # bad +# +# # bad +# +# # good +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/strict_sigil.rb:25 +class RuboCop::Cop::Sorbet::StrictSigil < ::RuboCop::Cop::Sorbet::HasSigil + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/strict_sigil.rb:26 + def minimum_strictness; end +end + +# Makes the Sorbet `strong` sigil mandatory in all files. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/strong_sigil.rb:10 +class RuboCop::Cop::Sorbet::StrongSigil < ::RuboCop::Cop::Sorbet::HasSigil + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/strong_sigil.rb:11 + def minimum_strictness; end +end + +# Checks that `T::Struct` property names use the configured style. +# The supported styles and name filters match `Naming/MethodName`. +# +# @example EnforcedStyle: snake_case (default) +# # bad +# class User < T::Struct +# const :firstName, String +# prop :lastName, String +# end +# +# # good +# class User < T::Struct +# const :first_name, String +# prop :last_name, String +# end +# +# @example EnforcedStyle: camelCase +# # bad +# class User < T::Struct +# const :first_name, String +# prop :last_name, String +# end +# +# # good +# class User < T::Struct +# const :firstName, String +# prop :lastName, String +# end +# +# @example AllowedPatterns: ['\Alegacy[A-Z]'] +# # good +# class User < T::Struct +# const :legacyName, String +# end +# +# @example ForbiddenIdentifiers: ['legacy_name'] +# # bad +# class User < T::Struct +# const :legacy_name, String +# end +# +# @example ForbiddenPatterns: ['_v1\z'] +# # bad +# class User < T::Struct +# const :name_v1, String +# end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/struct_prop_name.rb:52 +class RuboCop::Cop::Sorbet::StructPropName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::ConfigurableFormatting + include ::RuboCop::Cop::ConfigurableNaming + include ::RuboCop::Cop::ForbiddenIdentifiers + include ::RuboCop::Cop::ForbiddenPattern + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/struct_prop_name.rb:68 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/struct_prop_name.rb:64 + def t_struct?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/struct_prop_name.rb:91 + def forbidden_name?(name); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/struct_prop_name.rb:95 + def message(style); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/struct_prop_name.rb:85 + def within_t_struct?(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/struct_prop_name.rb:58 +RuboCop::Cop::Sorbet::StructPropName::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/struct_prop_name.rb:59 +RuboCop::Cop::Sorbet::StructPropName::MSG_FORBIDDEN = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/struct_prop_name.rb:61 +RuboCop::Cop::Sorbet::StructPropName::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Mixing for writing cops that deal with `T::Enum`s +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/t_enum.rb:7 +module RuboCop::Cop::Sorbet::TEnum + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/t_enum.rb:9 + def initialize(*); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/t_enum.rb:23 + def after_class(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/t_enum.rb:19 + def on_class(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/t_enum.rb:15 + def t_enum?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/t_enum.rb:29 + def in_t_enum_class?; end +end + +# Shared autocorrection helper for cops that unwrap a redundant +# `T.let(value, Type)` down to `value`, preserving heredoc bodies that a +# naive `corrector.replace(t_let_node, value_node.source)` would drop +# (`value_node.source` stops at the marker line, so the body and its +# terminator sit outside it). +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/t_let_correction.rb:11 +module RuboCop::Cop::Sorbet::TLetCorrection + private + + # Returns the comment trailing the heredoc marker, including its leading space. + # For example, the marker line `<<~SQL, String) # query` returns ` # query`. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/t_let_correction.rb:65 + def marker_line_comment(value_node); end + + # Expands the correction range to include every heredoc body and terminator. + # For example, the range for `T.let(<<~SQL, String)` extends through the + # final `SQL` terminator rather than ending at the closing parenthesis. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/t_let_correction.rb:45 + def range_including_heredocs(t_let_node, heredocs); end + + # Replaces `T.let(value, Type)` with `value`. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/t_let_correction.rb:15 + def replace_t_let(corrector, t_let_node, value_node); end + + # Replaces `T.let(value, Type)` with `value` without losing any heredocs + # contained in the value. For example, `T.let(<<~SQL, String)` becomes + # `<<~SQL` followed by its original body and terminator. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/t_let_correction.rb:35 + def replace_t_let_preserving_heredocs(corrector, t_let_node, value_node, heredocs); end + + # Reconstructs the value with its marker-line comment and heredoc bodies. + # For example, `T.let(<<~SQL, String) # query` becomes a source string + # containing `<<~SQL # query`, followed by its body and `SQL` terminator. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/t_let_correction.rb:54 + def source_including_heredocs(value_node, heredocs); end + + # Heredocs at the tail of the value, whose body sits past `value_node`'s + # source range. An interior heredoc, e.g. `Foo.new(a: <<~X, b: 2)`, already + # lives inside `value_node.source` and must not be reattached. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/t_let_correction.rb:25 + def tail_heredocs(value_node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:6 +module RuboCop::Cop::Sorbet::TargetSorbetVersion + mixes_in_class_methods ::RuboCop::Cop::Sorbet::TargetSorbetVersion::ClassMethods + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:28 + def enabled_for_sorbet_static_version?; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:44 + def read_sorbet_static_version_from_bundler_lock_file; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:24 + def sorbet_enabled?; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:35 + def target_sorbet_static_version_from_bundler_lock_file; end + + class << self + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:8 + def included(target); end + end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:13 +module RuboCop::Cop::Sorbet::TargetSorbetVersion::ClassMethods + # Sets the version of the Sorbet static type checker required by this cop + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:15 + def minimum_target_sorbet_static_version(version); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:19 + def supports_target_sorbet_static_version?(version); end +end + +# Makes the Sorbet `true` sigil mandatory in all files. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/true_sigil.rb:10 +class RuboCop::Cop::Sorbet::TrueSigil < ::RuboCop::Cop::Sorbet::HasSigil + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/true_sigil.rb:11 + def minimum_strictness; end +end + +# 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) } +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/type_alias_name.rb:17 +class RuboCop::Cop::Sorbet::TypeAliasName < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/type_alias_name.rb:32 + def on_casgn(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/type_alias_name.rb:21 + def underscored_type_alias?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/type_alias_name.rb:18 +RuboCop::Cop::Sorbet::TypeAliasName::MSG = T.let(T.unsafe(nil), String) + +# Checks that gem versions in RBI annotations are properly formatted per the Bundler gem specification. +# +# @example +# # bad +# # @version > not a version number +# +# # good +# # @version = 1 +# +# # good +# # @version > 1.2.3 +# +# # good +# # @version <= 4.3-preview +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi_versioning/valid_gem_version_annotations.rb:21 +class RuboCop::Cop::Sorbet::ValidGemVersionAnnotations < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::GemVersionAnnotationHelper + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi_versioning/valid_gem_version_annotations.rb:27 + def on_new_investigation; end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi_versioning/valid_gem_version_annotations.rb:50 + def valid_version?(version_string); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi_versioning/valid_gem_version_annotations.rb:24 +RuboCop::Cop::Sorbet::ValidGemVersionAnnotations::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi_versioning/valid_gem_version_annotations.rb:25 +RuboCop::Cop::Sorbet::ValidGemVersionAnnotations::VALID_OPERATORS = T.let(T.unsafe(nil), Array) + +# 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 +# * `ExactStrictness`: If set, make offense if the strictness level in the file is different than this one +# +# If an `ExactStrictness` level is specified, it will be used in offense messages and autocorrect. +# If a `SuggestedStrictness` level is specified, it will be used in autocorrect. +# Otherwise, if a `MinimumStrictness` level is specified, it will be used in offense messages and autocorrect. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:21 +class RuboCop::Cop::Sorbet::ValidSigil < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:24 + def on_new_investigation; end + + protected + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:169 + def autocorrect(corrector); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:110 + def check_double_commented_sigil(sigil, strictness); end + + # checks + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:59 + def check_sigil_present(sigil); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:137 + def check_strictness_level(sigil, strictness); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:98 + def check_strictness_not_empty(sigil, strictness); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:125 + def check_strictness_valid(sigil, strictness); end + + # Default is `nil` + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:203 + def exact_strictness; end + + # extraction + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:47 + def extract_sigil(processed_source); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:53 + def extract_strictness(sigil); end + + # Default is `nil` + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:197 + def minimum_strictness; end + + # Default is `false` + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:186 + def require_sigil_on_all_files?; end + + # Default is `'false'` + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:191 + def suggested_strictness; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:76 + def suggested_strictness_level; end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:43 +RuboCop::Cop::Sorbet::ValidSigil::INVALID_SIGIL_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:42 +RuboCop::Cop::Sorbet::ValidSigil::SIGIL_REGEX = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:41 +RuboCop::Cop::Sorbet::ValidSigil::STRICTNESS_LEVELS = T.let(T.unsafe(nil), Array) + +# Disallows the usage of `.void.checked(:tests)`. +# +# Using `.void` changes the value returned from the method, but only if +# runtime type checking is enabled for the method. Methods marked `.void` +# will return different values in tests compared with non-test +# environments. This is particularly troublesome if branching on the +# result of a `.void` method, because the returned value in test code +# will be the truthy `VOID` value, while the non-test return value may be +# falsy depending on the method's implementation. +# +# - Use `.returns(T.anything).checked(:tests)` to keep the runtime type +# checking for the rest of the parameters. +# - Use `.void.checked(:never)` if you are on an older version of Sorbet +# which does not have `T.anything` (meaning versions 0.5.10781 or +# earlier. Versions released after 2023-04-14 include `T.anything`.) +# +# @example +# +# # bad +# sig { void.checked(:tests) } +# +# # good +# sig { void } +# sig { returns(T.anything).checked(:tests) } +# sig { void.checked(:never) } +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/void_checked_tests.rb:31 +class RuboCop::Cop::Sorbet::VoidCheckedTests < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Sorbet::SignatureHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/void_checked_tests.rb:37 + def checked_tests(param0); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/void_checked_tests.rb:58 + def on_signature(node); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/void_checked_tests.rb:48 + def top_level_void(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/void_checked_tests.rb:41 +RuboCop::Cop::Sorbet::VoidCheckedTests::MESSAGE = T.let(T.unsafe(nil), String) + +# Patches `Lint/Void` to be aware of RBS inline `#: absurd` type +# assertions, which are used to mark unreachable branches in exhaustive +# `case`/`when` matching. +# +# Without this patch, RuboCop 1.85+ flags the expression in the +# unreachable branch as "used in void context" because `Lint/Void` now +# inspects `case`/`when` branch bodies (rubocop/rubocop#14756). +# +# @example +# +# # good (not flagged) +# #: ((String | Integer) x) -> void +# def foo(x) +# case x +# when String +# when Integer +# else +# x #: absurd +# end +# end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/void_sorbet_aware_behaviour.rb:28 +module RuboCop::Cop::Sorbet::VoidSorbetAwareBehaviour + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/void_sorbet_aware_behaviour.rb:31 + def check_expression(expr); end + + private + + # Checks whether `node` is followed by an RBS `#: absurd` inline + # comment on the same line, indicating a deliberate unreachable-type + # assertion that should not be treated as a void-context misuse. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/void_sorbet_aware_behaviour.rb:43 + def rbs_absurd_assertion?(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/void_sorbet_aware_behaviour.rb:29 +RuboCop::Cop::Sorbet::VoidSorbetAwareBehaviour::RBS_ABSURD_PATTERN = T.let(T.unsafe(nil), Regexp) + +module RuboCop::Cop::Style; end + +class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::MutableConstantSorbetAwareBehaviour +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/version.rb:4 +module RuboCop::Sorbet; end + +# pkg:gem/rubocop-sorbet#lib/rubocop/sorbet.rb:12 +class RuboCop::Sorbet::Error < ::StandardError; end + +# A plugin that integrates RuboCop Sorbet with RuboCop's plugin system. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/plugin.rb:10 +class RuboCop::Sorbet::Plugin < ::LintRoller::Plugin + # pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/plugin.rb:11 + def about; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/plugin.rb:24 + def rules(_context); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/plugin.rb:20 + def supported?(context); end +end + +# Pure helpers for parsing RBS inline-comment signatures (`#:` / `#|`). +# +# Every public method takes a `processed_source` and/or comment nodes +# explicitly, so this module is usable both from a Cop and from a plain +# service class such as +# `RuboCop::Cop::Sorbet::EnforceSignatures::RBSSignatureChecker`. +# No Cop::Base state is required. +# +# `rbs_signatures_before` returns `Signature` objects that encapsulate one +# RBS overload each. `rbs_annotations_before` returns the attached `# @` +# comments. `rbs_annotation_after` returns the trailing RBS annotation +# attached to an expression and its comment node. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/rbs_parser.rb:19 +module RuboCop::Sorbet::RBSParser + class << self + # The trailing RBS annotation attached to `node`, as `[comment, text]`. + # The comment must follow the expression on its final line with only + # horizontal whitespace between them. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/rbs_parser.rb:51 + def rbs_annotation_after(processed_source, node); end + + # The Sorbet `# @` annotation comments attached to `node`, in source + # order. Other comments in the contiguous block, including the RBS + # signature itself, are omitted. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/rbs_parser.rb:41 + def rbs_annotations_before(processed_source, node); end + + # The RBS signatures attached to `node`, one `Signature` per overload. + # Climbs `private`/`public`/other send wrappers, collects the contiguous + # comment block above the unwrapped node, and groups the RBS comments. + # A signature separated from the method by a blank line is not attached. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/rbs_parser.rb:32 + def rbs_signatures_before(processed_source, node); end + + private + + # Comments forming a contiguous block immediately above `node`, in source + # order. A blank line or non-comment sibling breaks the run. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/rbs_parser.rb:87 + def comments_above(processed_source, node); end + + # Group already-collected comments into RBS signatures. A `#:` line begins + # a new overload; subsequent `#|` lines continue it. Non-RBS comments are + # skipped. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/rbs_parser.rb:72 + def rbs_signature_groups(comments); end + end +end + +# `# @` begins a Sorbet method annotation used alongside RBS signatures. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/rbs_parser.rb:25 +RuboCop::Sorbet::RBSParser::RBS_ANNOTATION_PREFIX = T.let(T.unsafe(nil), Regexp) + +# `#|` continues the preceding `#:` signature (e.g. multiline params/returns). +# +# pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/rbs_parser.rb:23 +RuboCop::Sorbet::RBSParser::RBS_CONTINUATION_PREFIX = T.let(T.unsafe(nil), Regexp) + +# `#:` begins an RBS signature (each repeated `#:` line is a new overload). +# +# pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/rbs_parser.rb:21 +RuboCop::Sorbet::RBSParser::RBS_SIGNATURE_PREFIX = T.let(T.unsafe(nil), Regexp) + +# One RBS signature (a `#:` line plus any `#|` continuation lines). +# Encapsulates the parsed structure so callers query the signature rather +# than re-parsing comments through the module. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/rbs_parser.rb:109 +class RuboCop::Sorbet::RBSParser::Signature + # pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/rbs_parser.rb:112 + def initialize(processed_source, comments); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/rbs_parser.rb:110 + def comments; end + + # The return type expression as a string, or nil if parsing fails. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/rbs_parser.rb:118 + def return_type; end + + # `[highlight_range, replace_range]` covering the return type, or nil + # if parsing fails or the return type has no source location. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/rbs_parser.rb:124 + def return_type_range; end + + # True if the signature declares a `void` return type. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/rbs_parser.rb:141 + def void?; end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/rbs_parser.rb:151 + def parsed_method_type; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/rbs_parser.rb:147 + def return_type_node; end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/version.rb:5 +RuboCop::Sorbet::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rubocop-sorbet@0.9.0.rbi b/sorbet/rbi/gems/rubocop-sorbet@0.9.0.rbi deleted file mode 100644 index 2d720ef..0000000 --- a/sorbet/rbi/gems/rubocop-sorbet@0.9.0.rbi +++ /dev/null @@ -1,1873 +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#3 -module RuboCop; end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#4 -module RuboCop::Cop; end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#5 -module RuboCop::Cop::Sorbet; end - -# 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 its 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::Base - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#55 - def on_block(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#55 - def on_numblock(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#49 - def on_send(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#41 - def override?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#36 - def sig?(param0); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#27 - def sig_dot_override?(param0 = T.unsafe(nil)); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#22 -RuboCop::Cop::Sorbet::AllowIncompatibleOverride::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#24 -RuboCop::Cop::Sorbet::AllowIncompatibleOverride::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# 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_constant_without_type_alias.rb#18 -class RuboCop::Cop::Sorbet::BindingConstantWithoutTypeAlias < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb#65 - def on_casgn(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb#48 - def requires_type_alias?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb#38 - def type_alias_with_block?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb#29 - def type_alias_without_block(param0 = T.unsafe(nil)); end - - private - - # Given nested send nodes, returns the leaf with explicit receiver. - # - # i.e. in Ruby - # - # a.b.c.d.e.f - # ^^^ - # - # i.e. in AST - # - # (send (send (send (send (send (send nil :a) :b) :c) :d) :e) :f) - # ^^^^^^^^^^^^^^^^^^^^^^^ - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb#98 - def send_leaf(node); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb#21 -RuboCop::Cop::Sorbet::BindingConstantWithoutTypeAlias::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb#23 -RuboCop::Cop::Sorbet::BindingConstantWithoutTypeAlias::WITHOUT_BLOCK_MSG = T.let(T.unsafe(nil), String) - -# Checks for the a mistaken variant of the "obsolete memoization pattern" that used to be required -# on every call, causing the memoized value to be discarded and recomputed on every call. -# -# This cop will correct it to read from the ivar instead of `nil`, which will memoize it correctly. -# -# The result of this correction will be the "obsolete memoization pattern", which can further be corrected by -# the `Sorbet/ObsoleteStrictMemoization` cop. -# -# See `Sorbet/ObsoleteStrictMemoization` for more details. -# -# @example -# # bad -# sig { returns(Foo) } -# def foo -# # This `nil` is likely a mistake, causing the memoized value to be discarded and recomputed on every call. -# @foo = T.let(nil, T.nilable(Foo)) -# @foo ||= some_computation -# end -# -# # good -# sig { returns(Foo) } -# def foo -# # This will now memoize the value as was likely intended, so `some_computation` is only ever called once. -# # ⚠️If `some_computation` has side effects, this might be a breaking change! -# @foo = T.let(@foo, T.nilable(Foo)) -# @foo ||= some_computation -# end -# @see Sorbet/ObsoleteStrictMemoization -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/buggy_obsolete_strict_memoization.rb#42 -class RuboCop::Cop::Sorbet::BuggyObsoleteStrictMemoization < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::MatchRange - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::Sorbet::TargetSorbetVersion - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::Sorbet::TargetSorbetVersion::ClassMethods - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/buggy_obsolete_strict_memoization.rb#55 - def buggy_legacy_memoization_pattern?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/buggy_obsolete_strict_memoization.rb#66 - def on_begin(node); end - - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/buggy_obsolete_strict_memoization.rb#77 - def relevant_file?(file); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/buggy_obsolete_strict_memoization.rb#51 -RuboCop::Cop::Sorbet::BuggyObsoleteStrictMemoization::MSG = T.let(T.unsafe(nil), String) - -# 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#36 -class RuboCop::Cop::Sorbet::CallbackConditionalsBinding < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#82 - def argumentless_unbound_callable_callback_conditional?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#92 - def on_send(node); end - - private - - # Find the immediately enclosing class or module name. - # Returns `nil`` if the immediate parent (skipping begin if present) is not a class or module. - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#129 - def immediately_enclosing_module_name(node); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#40 -RuboCop::Cop::Sorbet::CallbackConditionalsBinding::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#42 -RuboCop::Cop::Sorbet::CallbackConditionalsBinding::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# 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#19 -class RuboCop::Cop::Sorbet::CheckedTrueInSignature < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Sorbet::SignatureHelp - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#24 - def offending_node(param0); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#35 - def on_signature(node); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#28 -RuboCop::Cop::Sorbet::CheckedTrueInSignature::MESSAGE = T.let(T.unsafe(nil), String) - -# 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::Base - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#47 - def on_csend(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#47 - def on_send(node); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#37 -RuboCop::Cop::Sorbet::ConstantsFromStrings::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#40 -RuboCop::Cop::Sorbet::ConstantsFromStrings::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for blank lines after signatures. -# -# @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#17 -class RuboCop::Cop::Sorbet::EmptyLineAfterSig < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Sorbet::SignatureHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#34 - def on_signature(sig); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#25 - def sig_or_signable_method_definition?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#57 - def lines_between(node1, node2, buffer: T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#53 - def next_sibling(node); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#22 -RuboCop::Cop::Sorbet::EmptyLineAfterSig::MSG = T.let(T.unsafe(nil), String) - -# Checks that the Sorbet sigil comes as the first magic comment in the file, after the encoding comment if any. -# -# The expected order for magic comments is: (en)?coding, typed, warn_indent then frozen_string_literal. -# -# The ordering is for consistency only, except for the encoding comment which must be first, if present. -# -# 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#32 -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#35 - def on_new_investigation; end - - protected - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#93 - def autocorrect(corrector); end - - # checks - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#70 - 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#62 - def extract_magic_comments(processed_source); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#46 -RuboCop::Cop::Sorbet::EnforceSigilOrder::CODING_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#48 -RuboCop::Cop::Sorbet::EnforceSigilOrder::FROZEN_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#47 -RuboCop::Cop::Sorbet::EnforceSigilOrder::INDENT_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#57 -RuboCop::Cop::Sorbet::EnforceSigilOrder::MAGIC_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#50 -RuboCop::Cop::Sorbet::EnforceSigilOrder::PREFERRED_ORDER = T.let(T.unsafe(nil), Hash) - -# 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#27 -class RuboCop::Cop::Sorbet::EnforceSignatures < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Sorbet::SignatureHelp - extend ::RuboCop::Cop::AutoCorrector - - # @return [EnforceSignatures] a new instance of EnforceSignatures - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#33 - def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#39 - def accessor?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#43 - def on_def(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#47 - def on_defs(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#51 - def on_send(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#55 - def on_signature(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#59 - def scope(node); end - - private - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#97 - def autocorrect(corrector, node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#68 - def check_node(node); end - - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#81 - def has_rbs_comment?(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#114 - def param_type_placeholder; end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#93 - def preceeding_comments(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#118 - def return_type_placeholder; end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#31 -RuboCop::Cop::Sorbet::EnforceSignatures::RBS_COMMENT_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#122 -class RuboCop::Cop::Sorbet::EnforceSignatures::SigSuggestion - # @return [SigSuggestion] a new instance of SigSuggestion - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#125 - 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#123 - 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#123 - def params=(_arg0); end - - # Returns the value of attribute returns. - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#123 - 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#123 - def returns=(_arg0); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#133 - def to_autocorrect; end - - private - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#145 - def generate_params; end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#157 - def generate_return; end -end - -# 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#29 - def on_new_investigation; end - - protected - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb#50 - def autocorrect(corrector); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb#44 - def extract_all_sigils(processed_source); end -end - -# 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 - -# Disallow including the `Comparable` module in `T::Enum`. -# -# @example -# -# # bad -# class Priority < T::Enum -# include Comparable -# -# enums do -# High = new(3) -# Medium = new(2) -# Low = new(1) -# end -# -# def <=>(other) -# serialize <=> other.serialize -# end -# end -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/t_enum/forbid_comparable_t_enum.rb#24 -class RuboCop::Cop::Sorbet::ForbidComparableTEnum < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Sorbet::TEnum - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/t_enum/forbid_comparable_t_enum.rb#32 - def mix_in_comparable?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/t_enum/forbid_comparable_t_enum.rb#36 - def on_send(node); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/t_enum/forbid_comparable_t_enum.rb#27 -RuboCop::Cop::Sorbet::ForbidComparableTEnum::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/t_enum/forbid_comparable_t_enum.rb#29 -RuboCop::Cop::Sorbet::ForbidComparableTEnum::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# 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::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb#33 - def extend_t_sig_or_helpers?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb#37 - def on_send(node); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb#29 -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#30 -RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Correct `send` expressions in include statements by constant literals. -# -# Sorbet, the static checker, is not (yet) able to support constructs on the -# following form: -# -# ```ruby -# class MyClass -# include send_expr -# end -# ``` -# -# Multiple occurences of this can be found in Shopify's code base like: -# -# ```ruby -# include Rails.application.routes.url_helpers -# ``` -# or -# ```ruby -# include Polaris::Engine.helpers -# ``` -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#29 -class RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#36 - def dynamic_inclusion?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#40 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#52 - def neither_const_nor_self?(node); end - - # Returns true if the node is within a module declaration that is not anonymous. - # - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#57 - def within_onymous_module?(node); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#32 -RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#33 -RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# 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::Base - include ::RuboCop::Cop::RangeHelp - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb#26 - def on_new_investigation; end - - private - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb#48 - def allowed_paths; end -end - -# Check that definitions do not use a `sig` block. -# -# Good: -# -# ``` -# #: -> void -# def foo; end -# ``` -# -# Bad: -# -# ``` -# sig { void } -# def foo; end -# ``` -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/forbid_sig.rb#23 -class RuboCop::Cop::Sorbet::ForbidSig < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Sorbet::SignatureHelp - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/forbid_sig.rb#28 - def on_signature(node); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/forbid_sig.rb#26 -RuboCop::Cop::Sorbet::ForbidSig::MSG = T.let(T.unsafe(nil), String) - -# Check that definitions do not use a `sig` block. -# -# Good: -# -# ``` -# #: -> void -# def foo; end -# ``` -# -# Bad: -# -# ``` -# T::Sig.sig { void } -# def foo; end -# ``` -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/forbid_sig_with_runtime.rb#23 -class RuboCop::Cop::Sorbet::ForbidSigWithRuntime < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Sorbet::SignatureHelp - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/forbid_sig_with_runtime.rb#28 - def on_signature(node); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/forbid_sig_with_runtime.rb#26 -RuboCop::Cop::Sorbet::ForbidSigWithRuntime::MSG = T.let(T.unsafe(nil), String) - -# Check that `sig` is used instead of `T::Sig::WithoutRuntime.sig`. -# -# Good: -# -# ``` -# sig { void } -# def foo; end -# ``` -# -# Bad: -# -# ``` -# T::Sig::WithoutRuntime.sig { void } -# def foo; end -# ``` -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/forbid_sig_without_runtime.rb#23 -class RuboCop::Cop::Sorbet::ForbidSigWithoutRuntime < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Sorbet::SignatureHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/forbid_sig_without_runtime.rb#29 - def on_signature(node); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/forbid_sig_without_runtime.rb#27 -RuboCop::Cop::Sorbet::ForbidSigWithoutRuntime::MSG = T.let(T.unsafe(nil), String) - -# Correct superclass `send` expressions by constant literals. -# -# Sorbet, the static checker, is not (yet) able to support constructs on the -# following form: -# -# ```ruby -# class Foo < send_expr; end -# ``` -# -# Multiple occurences of this can be found in Shopify's code base like: -# -# ```ruby -# class ShopScope < Component::TrustedIdScope[ShopIdentity::ShopId] -# ``` -# or -# ```ruby -# class ApiClientEligibility < Struct.new(:api_client, :match_results, :shop) -# ``` -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb#28 -class RuboCop::Cop::Sorbet::ForbidSuperclassConstLiteral < ::RuboCop::Cop::Base - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb#32 - def dynamic_superclass?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb#36 - def on_class(node); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb#29 -RuboCop::Cop::Sorbet::ForbidSuperclassConstLiteral::MSG = T.let(T.unsafe(nil), String) - -# Disallow using `T::Enum`. -# -# @example -# -# # bad -# class MyEnum < T::Enum -# enums do -# A = new -# B = new -# end -# end -# -# # good -# class MyEnum -# A = "a" -# B = "b" -# C = "c" -# end -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_enum.rb#26 -class RuboCop::Cop::Sorbet::ForbidTEnum < ::RuboCop::Cop::Base - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_enum.rb#34 - def on_class(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_enum.rb#30 - def t_enum?(param0 = T.unsafe(nil)); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_enum.rb#27 -RuboCop::Cop::Sorbet::ForbidTEnum::MSG = T.let(T.unsafe(nil), String) - -# Disallow using `T::Struct` and `T::Props`. -# -# @example -# -# # bad -# class MyStruct < T::Struct -# const :foo, String -# prop :bar, Integer, default: 0 -# -# def some_method; end -# end -# -# # good -# class MyStruct -# extend T::Sig -# -# sig { returns(String) } -# attr_reader :foo -# -# sig { returns(Integer) } -# attr_accessor :bar -# -# sig { params(foo: String, bar: Integer) } -# def initialize(foo:, bar: 0) -# @foo = foo -# @bar = bar -# end -# -# def some_method; end -# end -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#38 -class RuboCop::Cop::Sorbet::ForbidTStruct < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::CommentsHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#169 - def on_class(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#210 - def on_send(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#167 - def t_props?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#162 - def t_struct?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#218 - def initialize_method(indent, props); end - - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#258 - def previous_line_blank?(node); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#47 -RuboCop::Cop::Sorbet::ForbidTStruct::MSG_PROPS = T.let(T.unsafe(nil), String) - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#46 -RuboCop::Cop::Sorbet::ForbidTStruct::MSG_STRUCT = T.let(T.unsafe(nil), String) - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#104 -class RuboCop::Cop::Sorbet::ForbidTStruct::Property - # @return [Property] a new instance of Property - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#107 - def initialize(node, kind, name, type, default:, factory:); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#123 - def attr_accessor; end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#119 - def attr_sig; end - - # Returns the value of attribute default. - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#105 - def default; end - - # Returns the value of attribute factory. - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#105 - def factory; end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#144 - def initialize_assign; end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#131 - def initialize_param; end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#127 - def initialize_sig_param; end - - # Returns the value of attribute kind. - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#105 - def kind; end - - # Returns the value of attribute name. - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#105 - def name; end - - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#151 - def nilable?; end - - # Returns the value of attribute node. - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#105 - def node; end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#155 - def type; end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#44 -RuboCop::Cop::Sorbet::ForbidTStruct::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# This class walks down the class body of a T::Struct and collects all the properties that will need to be -# translated into `attr_reader` and `attr_accessor` methods. -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#51 -class RuboCop::Cop::Sorbet::ForbidTStruct::TStructWalker - include ::RuboCop::AST::Traversal - extend ::RuboCop::AST::NodePattern::Macros - - # @return [TStructWalker] a new instance of TStructWalker - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#57 - def initialize; end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#63 - def extend_t_sig?(param0 = T.unsafe(nil)); end - - # Returns the value of attribute has_extend_t_sig. - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#55 - def has_extend_t_sig; end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#72 - def on_send(node); end - - # Returns the value of attribute props. - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#55 - def props; end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#68 - def t_struct_prop?(param0 = T.unsafe(nil)); end -end - -# 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::Base - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_unsafe.rb#24 - def on_csend(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_unsafe.rb#24 - def on_send(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_unsafe.rb#22 - def t_unsafe?(param0 = T.unsafe(nil)); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_unsafe.rb#18 -RuboCop::Cop::Sorbet::ForbidTUnsafe::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_unsafe.rb#19 -RuboCop::Cop::Sorbet::ForbidTUnsafe::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# 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::Base - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_untyped.rb#27 - def on_send(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_untyped.rb#25 - def t_untyped?(param0 = T.unsafe(nil)); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_untyped.rb#21 -RuboCop::Cop::Sorbet::ForbidTUntyped::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_untyped.rb#22 -RuboCop::Cop::Sorbet::ForbidTUntyped::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Disallows defining type aliases that contain shapes -# -# @example -# -# # bad -# Foo = T.type_alias { { foo: Integer } } -# -# # good -# class Foo -# extend T::Sig -# -# sig { params(foo: Integer).void } -# def initialize(foo) -# @foo = foo -# end -# end -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_type_aliased_shapes.rb#24 -class RuboCop::Cop::Sorbet::ForbidTypeAliasedShapes < ::RuboCop::Cop::Base - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_type_aliased_shapes.rb#36 - def on_block(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_type_aliased_shapes.rb#36 - def on_numblock(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_type_aliased_shapes.rb#28 - def shape_type_alias?(param0 = T.unsafe(nil)); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_type_aliased_shapes.rb#25 -RuboCop::Cop::Sorbet::ForbidTypeAliasedShapes::MSG = T.let(T.unsafe(nil), String) - -# 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::Base - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#54 - 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#39 - def t_nilable_untyped(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#29 - def t_struct(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#34 - def t_untyped(param0 = T.unsafe(nil)); end - - # Search for untyped prop/const declarations and capture their types - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#50 - 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) - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi_versioning/gem_version_annotation_helper.rb#6 -module RuboCop::Cop::Sorbet::GemVersionAnnotationHelper - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi_versioning/gem_version_annotation_helper.rb#9 - def gem_version_annotations; end - - private - - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi_versioning/gem_version_annotation_helper.rb#17 - def gem_version_annotation?(comment); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi_versioning/gem_version_annotation_helper.rb#21 - def gem_versions(comment); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi_versioning/gem_version_annotation_helper.rb#7 -RuboCop::Cop::Sorbet::GemVersionAnnotationHelper::VERSION_PREFIX = T.let(T.unsafe(nil), String) - -# 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 `SuggestedStrictness` level is specified, it will be used in autocorrect. -# 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#18 -class RuboCop::Cop::Sorbet::HasSigil < ::RuboCop::Cop::Sorbet::ValidSigil - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/has_sigil.rb#19 - def require_sigil_on_all_files?; end -end - -# 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 - -# Disallows declaring implicit conversion methods. -# Since Sorbet is a nominal (not structural) type system, -# implicit conversion is currently unsupported. -# -# @example -# -# # bad -# def to_str; end -# -# # good -# def to_str(x); end -# -# # bad -# def self.to_str; end -# -# # good -# def self.to_str(x); end -# -# # bad -# alias to_str to_s -# @note Since the arity of aliased methods is not checked, false positives may result. -# @see https://docs.ruby-lang.org/en/master/implicit_conversion_rdoc.html -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/implicit_conversion_method.rb#31 -class RuboCop::Cop::Sorbet::ImplicitConversionMethod < ::RuboCop::Cop::Base - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/implicit_conversion_method.rb#37 - def on_alias(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/implicit_conversion_method.rb#42 - def on_def(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/implicit_conversion_method.rb#42 - def on_defs(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/implicit_conversion_method.rb#50 - def on_send(node); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/implicit_conversion_method.rb#32 -RuboCop::Cop::Sorbet::ImplicitConversionMethod::IMPLICIT_CONVERSION_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/implicit_conversion_method.rb#33 -RuboCop::Cop::Sorbet::ImplicitConversionMethod::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/implicit_conversion_method.rb#35 -RuboCop::Cop::Sorbet::ImplicitConversionMethod::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# 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#20 -class RuboCop::Cop::Sorbet::KeywordArgumentOrdering < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Sorbet::SignatureHelp - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb#23 - 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 - -# Disallow creating a `T::Enum` with less than two values. -# -# @example -# -# # bad -# class ErrorMessages < T::Enum -# enums do -# ServerError = new("There was a server error.") -# end -# end -# -# # good -# class ErrorMessages < T::Enum -# enums do -# ServerError = new("There was a server error.") -# NotFound = new("The resource was not found.") -# end -# end -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/t_enum/multiple_t_enum_values.rb#24 -class RuboCop::Cop::Sorbet::MultipleTEnumValues < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Sorbet::TEnum - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/t_enum/multiple_t_enum_values.rb#30 - def enums_block?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/t_enum/multiple_t_enum_values.rb#40 - def on_block(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/t_enum/multiple_t_enum_values.rb#34 - def on_class(node); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/t_enum/multiple_t_enum_values.rb#27 -RuboCop::Cop::Sorbet::MultipleTEnumValues::MSG = T.let(T.unsafe(nil), String) - -# 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#18 - def on_assignment(value); end - - class << self - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#10 - def prepended(base); end - end -end - -# Checks for the obsolete pattern for initializing instance variables that was required for older Sorbet -# -# It's no longer required, as of Sorbet 0.5.10210 -# See https://sorbet.org/docs/type-assertions#put-type-assertions-behind-memoization -# -# @example -# -# # bad -# sig { returns(Foo) } -# def foo -# @foo = T.let(@foo, T.nilable(Foo)) -# @foo ||= Foo.new -# end -# -# # bad -# sig { returns(Foo) } -# def foo -# # This would have been a mistake, causing the memoized value to be discarded and recomputed on every call. -# @foo = T.let(nil, T.nilable(Foo)) -# @foo ||= Foo.new -# end -# -# # good -# sig { returns(Foo) } -# def foo -# @foo ||= T.let(Foo.new, T.nilable(Foo)) -# end -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/obsolete_strict_memoization.rb#37 -class RuboCop::Cop::Sorbet::ObsoleteStrictMemoization < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::MatchRange - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::Sorbet::TargetSorbetVersion - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::Sorbet::TargetSorbetVersion::ClassMethods - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/obsolete_strict_memoization.rb#51 - def legacy_memoization_pattern?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/obsolete_strict_memoization.rb#62 - def on_begin(node); end - - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/obsolete_strict_memoization.rb#86 - def relevant_file?(file); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/obsolete_strict_memoization.rb#47 -RuboCop::Cop::Sorbet::ObsoleteStrictMemoization::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::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#36 - def extend_t_sig?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#40 - def on_send(node); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#32 -RuboCop::Cop::Sorbet::RedundantExtendTSig::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#33 -RuboCop::Cop::Sorbet::RedundantExtendTSig::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for the use of Ruby Refinements library. Refinements add -# complexity and incur a performance penalty that can be significant -# for large code bases. Good examples are cases of unrelated -# methods that happen to have the same name as these module methods. -# -# @example -# # bad -# module Foo -# refine(Date) do -# end -# end -# -# # bad -# module Foo -# using(Date) do -# end -# end -# -# # good -# module Foo -# bar.refine(Date) -# end -# -# # good -# module Foo -# bar.using(Date) -# end -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/refinement.rb#34 -class RuboCop::Cop::Sorbet::Refinement < ::RuboCop::Cop::Base - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/refinement.rb#38 - def on_send(node); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/refinement.rb#35 -RuboCop::Cop::Sorbet::Refinement::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/refinement.rb#36 -RuboCop::Cop::Sorbet::Refinement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for the correct order of `sig` builder methods. -# -# Options: -# -# * `Order`: The order in which to enforce the builder methods are called. -# -# @example -# # bad -# sig { void.abstract } -# -# # good -# sig { abstract.void } -# -# # bad -# sig { returns(Integer).params(x: Integer) } -# -# # good -# sig { params(x: Integer).returns(Integer) } -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#24 -class RuboCop::Cop::Sorbet::SignatureBuildOrder < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Sorbet::SignatureHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#33 - def on_signature(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#29 - def root_call(param0); end - - private - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#96 - def builder_method_indexes; end - - # Split foo.bar.baz into [foo, foo.bar, foo.bar.baz] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#83 - def call_chain(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#70 - def expected_source(expected_calls_and_indexes); end -end - -# Mixin for writing cops for signatures, providing a `signature?` node matcher and an `on_signature` trigger. -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#7 -module RuboCop::Cop::Sorbet::SignatureHelp - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#16 - def bare_sig?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#42 - def on_block(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#42 - def on_numblock(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#48 - def on_signature(_node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#25 - def sig_with_runtime?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#34 - def sig_without_runtime?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#11 - def signature?(param0 = T.unsafe(nil)); end -end - -# 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::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb#22 - def on_class(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb#22 - def on_module(node); end - - private - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb#34 - def convert_newlines_to_semicolons(source); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb#20 -RuboCop::Cop::Sorbet::SingleLineRbiClassModuleDefinitions::MSG = T.let(T.unsafe(nil), String) - -# Makes the Sorbet `strict` sigil mandatory in all files. -# -# @example -# -# # bad -# # typed: true -# -# # bad -# # typed: false -# -# # good -# # typed: strict -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/strict_sigil.rb#25 -class RuboCop::Cop::Sorbet::StrictSigil < ::RuboCop::Cop::Sorbet::HasSigil - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/strict_sigil.rb#26 - def minimum_strictness; end -end - -# 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 - -# Mixing for writing cops that deal with `T::Enum`s -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/t_enum.rb#7 -module RuboCop::Cop::Sorbet::TEnum - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/t_enum.rb#9 - def initialize(*_arg0); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/t_enum.rb#23 - def after_class(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/t_enum.rb#19 - def on_class(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/t_enum.rb#15 - def t_enum?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/t_enum.rb#29 - def in_t_enum_class?; end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#6 -module RuboCop::Cop::Sorbet::TargetSorbetVersion - mixes_in_class_methods ::RuboCop::Cop::Sorbet::TargetSorbetVersion::ClassMethods - - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#28 - def enabled_for_sorbet_static_version?; end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#44 - def read_sorbet_static_version_from_bundler_lock_file; end - - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#24 - def sorbet_enabled?; end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#35 - def target_sorbet_static_version_from_bundler_lock_file; end - - class << self - # @private - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#8 - def included(target); end - end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#13 -module RuboCop::Cop::Sorbet::TargetSorbetVersion::ClassMethods - # Sets the version of the Sorbet static type checker required by this cop - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#15 - def minimum_target_sorbet_static_version(version); end - - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#19 - def supports_target_sorbet_static_version?(version); end -end - -# 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 - -# 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::Base - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/type_alias_name.rb#32 - def on_casgn(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/type_alias_name.rb#21 - def underscored_type_alias?(param0 = T.unsafe(nil)); 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) - -# Checks that gem versions in RBI annotations are properly formatted per the Bundler gem specification. -# -# @example -# # bad -# # @version > not a version number -# -# # good -# # @version = 1 -# -# # good -# # @version > 1.2.3 -# -# # good -# # @version <= 4.3-preview -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi_versioning/valid_gem_version_annotations.rb#21 -class RuboCop::Cop::Sorbet::ValidGemVersionAnnotations < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Sorbet::GemVersionAnnotationHelper - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi_versioning/valid_gem_version_annotations.rb#27 - def on_new_investigation; end - - private - - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi_versioning/valid_gem_version_annotations.rb#50 - def valid_version?(version_string); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi_versioning/valid_gem_version_annotations.rb#24 -RuboCop::Cop::Sorbet::ValidGemVersionAnnotations::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi_versioning/valid_gem_version_annotations.rb#25 -RuboCop::Cop::Sorbet::ValidGemVersionAnnotations::VALID_OPERATORS = T.let(T.unsafe(nil), Array) - -# 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 -# * `ExactStrictness`: If set, make offense if the strictness level in the file is different than this one -# -# If an `ExactStrictness` level is specified, it will be used in offense messages and autocorrect. -# If a `SuggestedStrictness` level is specified, it will be used in autocorrect. -# Otherwise, 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#21 -class RuboCop::Cop::Sorbet::ValidSigil < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#24 - def on_new_investigation; end - - protected - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#151 - def autocorrect(corrector); end - - # checks - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#56 - def check_sigil_present(sigil); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#119 - def check_strictness_level(sigil, strictness); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#95 - def check_strictness_not_empty(sigil, strictness); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#107 - def check_strictness_valid(sigil, strictness); end - - # Default is `nil` - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#185 - def exact_strictness; end - - # extraction - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#44 - def extract_sigil(processed_source); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#50 - def extract_strictness(sigil); end - - # Default is `nil` - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#179 - def minimum_strictness; end - - # Default is `false` - # - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#168 - def require_sigil_on_all_files?; end - - # Default is `'false'` - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#173 - def suggested_strictness; end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#73 - def suggested_strictness_level; end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#40 -RuboCop::Cop::Sorbet::ValidSigil::SIGIL_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#39 -RuboCop::Cop::Sorbet::ValidSigil::STRICTNESS_LEVELS = T.let(T.unsafe(nil), Array) - -# Disallows the usage of `.void.checked(:tests)`. -# -# Using `.void` changes the value returned from the method, but only if -# runtime type checking is enabled for the method. Methods marked `.void` -# will return different values in tests compared with non-test -# environments. This is particularly troublesome if branching on the -# result of a `.void` method, because the returned value in test code -# will be the truthy `VOID` value, while the non-test return value may be -# falsy depending on the method's implementation. -# -# - Use `.returns(T.anything).checked(:tests)` to keep the runtime type -# checking for the rest of the parameters. -# - Use `.void.checked(:never)` if you are on an older version of Sorbet -# which does not have `T.anything` (meaning versions 0.5.10781 or -# earlier. Versions released after 2023-04-14 include `T.anything`.) -# -# @example -# -# # bad -# sig { void.checked(:tests) } -# -# # good -# sig { void } -# sig { returns(T.anything).checked(:tests) } -# sig { void.checked(:never) } -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/void_checked_tests.rb#31 -class RuboCop::Cop::Sorbet::VoidCheckedTests < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Sorbet::SignatureHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/void_checked_tests.rb#37 - def checked_tests(param0); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/void_checked_tests.rb#58 - def on_signature(node); end - - private - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/void_checked_tests.rb#48 - def top_level_void(node); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/void_checked_tests.rb#41 -RuboCop::Cop::Sorbet::VoidCheckedTests::MESSAGE = T.let(T.unsafe(nil), String) - -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#4 -module RuboCop::Sorbet; end - -# source://rubocop-sorbet//lib/rubocop/sorbet.rb#16 -RuboCop::Sorbet::CONFIG = T.let(T.unsafe(nil), Hash) - -# source://rubocop-sorbet//lib/rubocop/sorbet.rb#15 -RuboCop::Sorbet::CONFIG_DEFAULT = T.let(T.unsafe(nil), Pathname) - -# source://rubocop-sorbet//lib/rubocop/sorbet.rb#11 -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#11 - def defaults!; end - end -end - -# source://rubocop-sorbet//lib/rubocop/sorbet.rb#14 -RuboCop::Sorbet::PROJECT_ROOT = T.let(T.unsafe(nil), Pathname) - -# A plugin that integrates RuboCop Sorbet with RuboCop's plugin system. -# -# source://rubocop-sorbet//lib/rubocop/sorbet/plugin.rb#10 -class RuboCop::Sorbet::Plugin < ::LintRoller::Plugin - # source://rubocop-sorbet//lib/rubocop/sorbet/plugin.rb#14 - def about; end - - # source://rubocop-sorbet//lib/rubocop/sorbet/plugin.rb#27 - def rules(_context); end - - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/sorbet/plugin.rb#23 - def supported?(context); end -end - -# source://rubocop-sorbet//lib/rubocop/sorbet/plugin.rb#11 -RuboCop::Sorbet::Plugin::RUBOCOP_MIN_VERSION = T.let(T.unsafe(nil), String) - -# source://rubocop-sorbet//lib/rubocop/sorbet/plugin.rb#12 -RuboCop::Sorbet::Plugin::SUPPORTED = T.let(T.unsafe(nil), FalseClass) - -# source://rubocop-sorbet//lib/rubocop/sorbet/version.rb#5 -RuboCop::Sorbet::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rubocop@1.74.0.rbi b/sorbet/rbi/gems/rubocop@1.74.0.rbi deleted file mode 100644 index f570583..0000000 --- a/sorbet/rbi/gems/rubocop@1.74.0.rbi +++ /dev/null @@ -1,61403 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rubocop` gem. -# Please instead update this file by running `bin/tapioca gem rubocop`. - - -class Parser::Source::Comment - include ::RuboCop::Ext::Comment -end - -class Parser::Source::Range - include ::RuboCop::Ext::Range -end - -class Regexp::Expression::Base - include ::RuboCop::Ext::RegexpParser::Expression::Base -end - -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 - -class RuboCop::AST::ProcessedSource - include ::RuboCop::Ext::ProcessedSource -end - -class RuboCop::AST::RegexpNode < ::RuboCop::AST::Node - include ::RuboCop::Ext::RegexpNode -end - -# This is a class that reads optional command line arguments to rubocop from environment variable. -# -# @api private -# -# source://rubocop//lib/rubocop/arguments_env.rb#6 -class RuboCop::ArgumentsEnv - class << self - # @api private - # - # source://rubocop//lib/rubocop/arguments_env.rb#7 - def read_as_arguments; end - end -end - -# This is a class that reads optional command line arguments to rubocop from .rubocop file. -# -# @api private -# -# source://rubocop//lib/rubocop/arguments_file.rb#6 -class RuboCop::ArgumentsFile - class << self - # @api private - # - # source://rubocop//lib/rubocop/arguments_file.rb#7 - def read_as_arguments; end - end -end - -# The CLI is a class responsible of handling all the command line interface -# logic. -# -# source://rubocop//lib/rubocop/cli.rb#8 -class RuboCop::CLI - # @return [CLI] a new instance of CLI - # - # source://rubocop//lib/rubocop/cli.rb#24 - def initialize; end - - # Returns the value of attribute config_store. - # - # source://rubocop//lib/rubocop/cli.rb#22 - def config_store; end - - # Returns the value of attribute options. - # - # source://rubocop//lib/rubocop/cli.rb#22 - def options; end - - # Entry point for the application logic. Here we - # do the command line arguments processing and inspect - # the target files. - # - # - # @api public - # @param args [Array] command line arguments - # @return [Integer] UNIX exit code - # - # source://rubocop//lib/rubocop/cli.rb#39 - def run(args = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cli.rb#156 - def act_on_options; end - - # source://rubocop//lib/rubocop/cli.rb#198 - def apply_default_formatter; end - - # source://rubocop//lib/rubocop/cli.rb#125 - def execute_runners; end - - # source://rubocop//lib/rubocop/cli.rb#182 - def handle_editor_mode; end - - # @raise [Finished] - # - # source://rubocop//lib/rubocop/cli.rb#187 - def handle_exiting_options; end - - # source://rubocop//lib/rubocop/cli.rb#144 - def parallel_by_default!; end - - # source://rubocop//lib/rubocop/cli.rb#80 - def profile_if_needed; end - - # source://rubocop//lib/rubocop/cli.rb#113 - def require_gem(name); end - - # source://rubocop//lib/rubocop/cli.rb#121 - def run_command(name); end - - # source://rubocop//lib/rubocop/cli.rb#174 - def set_options_to_config_loader; end - - # source://rubocop//lib/rubocop/cli.rb#133 - def suggest_extensions; end - - # @raise [OptionArgumentError] - # - # source://rubocop//lib/rubocop/cli.rb#137 - def validate_options_vs_config; end -end - -# Home of subcommands in the CLI. -# -# @api private -# -# source://rubocop//lib/rubocop/cli/command.rb#7 -module RuboCop::CLI::Command - class << self - # Find the command with a given name and run it in an environment. - # - # @api private - # - # source://rubocop//lib/rubocop/cli/command.rb#10 - def run(env, name); end - - private - - # @api private - # - # source://rubocop//lib/rubocop/cli/command.rb#16 - def class_for(name); end - end -end - -# Generate a configuration file acting as a TODO list. -# -# @api private -# -# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#8 -class RuboCop::CLI::Command::AutoGenerateConfig < ::RuboCop::CLI::Command::Base - # @api private - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#25 - def run; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#107 - def add_formatter; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#115 - def add_inheritance_from_auto_generated_file(config_file); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#111 - def execute_runner; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#136 - def existing_configuration(config_file); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#65 - def line_length_cop(config); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#53 - def line_length_enabled?(config); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#61 - def max_line_length(config); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#34 - def maybe_run_line_length_cop; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#73 - def only_exclude?; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#69 - def options_has_only_flag?; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#153 - def relative_path_to_todo_from_options_config; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#100 - def reset_config_and_auto_gen_file; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#91 - def run_all_cops(line_length_contents); end - - # Do an initial run with only Layout/LineLength so that cops that - # depend on Layout/LineLength:Max get the correct value for that - # parameter. - # - # @api private - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#80 - def run_line_length_cop; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#57 - def same_max_line_length?(config1, config2); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#48 - def skip_line_length_cop(reason); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#142 - def write_config_file(file_name, file_string, rubocop_yml_contents); end -end - -# @api private -# -# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#11 -RuboCop::CLI::Command::AutoGenerateConfig::AUTO_GENERATED_FILE = T.let(T.unsafe(nil), String) - -# @api private -# -# 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#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#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#20 -RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_SKIPPED_ONLY_COPS = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#22 -RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_SKIPPED_ONLY_EXCLUDE = T.let(T.unsafe(nil), String) - -# @api private -# -# 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 -RuboCop::CLI::Command::AutoGenerateConfig::YAML_OPTIONAL_DOC_START = T.let(T.unsafe(nil), Regexp) - -# A subcommand in the CLI. -# -# @api private -# -# source://rubocop//lib/rubocop/cli/command/base.rb#8 -class RuboCop::CLI::Command::Base - # @api private - # @return [Base] a new instance of Base - # - # source://rubocop//lib/rubocop/cli/command/base.rb#26 - def initialize(env); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/base.rb#9 - def env; end - - class << self - # @api private - # - # source://rubocop//lib/rubocop/cli/command/base.rb#21 - def by_command_name(name); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/base.rb#14 - def command_name; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/base.rb#14 - def command_name=(_arg0); end - - # @api private - # @private - # - # source://rubocop//lib/rubocop/cli/command/base.rb#16 - def inherited(subclass); end - end -end - -# Run all the selected cops and report the result. -# -# @api private -# -# source://rubocop//lib/rubocop/cli/command/execute_runner.rb#8 -class RuboCop::CLI::Command::ExecuteRunner < ::RuboCop::CLI::Command::Base - include ::RuboCop::Formatter::TextUtil - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#16 - def run; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#85 - def bug_tracker_uri; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#69 - def display_error_summary(errors); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#56 - def display_summary(runner); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#61 - def display_warning_summary(warnings); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#22 - def execute_runner(paths); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#91 - def maybe_print_corrected_source; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#42 - def with_redirect; end -end - -# Combination of short and long formatter names. -# -# @api private -# -# source://rubocop//lib/rubocop/cli/command/execute_runner.rb#12 -RuboCop::CLI::Command::ExecuteRunner::INTEGRATION_FORMATTERS = T.let(T.unsafe(nil), Array) - -# Generate a .rubocop.yml file in the current directory. -# -# @api private -# -# source://rubocop//lib/rubocop/cli/command/init_dotfile.rb#8 -class RuboCop::CLI::Command::InitDotfile < ::RuboCop::CLI::Command::Base - # @api private - # - # source://rubocop//lib/rubocop/cli/command/init_dotfile.rb#13 - def run; end -end - -# @api private -# -# 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#8 -class RuboCop::CLI::Command::LSP < ::RuboCop::CLI::Command::Base - # @api private - # - # source://rubocop//lib/rubocop/cli/command/lsp.rb#11 - def run; end -end - -# Shows the given cops, or all cops by default, and their configurations -# for the current directory. -# -# @api private -# -# source://rubocop//lib/rubocop/cli/command/show_cops.rb#9 -class RuboCop::CLI::Command::ShowCops < ::RuboCop::CLI::Command::Base - # @api private - # @return [ShowCops] a new instance of ShowCops - # - # source://rubocop//lib/rubocop/cli/command/show_cops.rb#24 - def initialize(env); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/show_cops.rb#39 - def run; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/show_cops.rb#89 - def config_lines(cop); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/show_cops.rb#85 - def cops_of_department(cops, department); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/show_cops.rb#45 - def print_available_cops; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/show_cops.rb#68 - def print_cop_details(cops); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/show_cops.rb#56 - def print_cops_of_department(registry, department, show_all); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/show_cops.rb#77 - def selected_cops_of_department(cops, department); end -end - -# @api private -# -# source://rubocop//lib/rubocop/cli/command/show_cops.rb#12 -class RuboCop::CLI::Command::ShowCops::ExactMatcher < ::Struct - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cli/command/show_cops.rb#13 - def match?(name); end - - # Returns the value of attribute pattern - # - # @return [Object] the current value of pattern - def pattern; end - - # Sets the attribute pattern - # - # @param value [Object] the value to set the attribute pattern to. - # @return [Object] the newly set value - def pattern=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# @api private -# -# source://rubocop//lib/rubocop/cli/command/show_cops.rb#18 -class RuboCop::CLI::Command::ShowCops::WildcardMatcher < ::Struct - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cli/command/show_cops.rb#19 - def match?(name); end - - # Returns the value of attribute pattern - # - # @return [Object] the current value of pattern - def pattern; end - - # Sets the attribute pattern - # - # @param value [Object] the value to set the attribute pattern to. - # @return [Object] the newly set value - def pattern=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# Prints out url to documentation of provided cops -# or documentation base url by default. -# -# @api private -# -# source://rubocop//lib/rubocop/cli/command/show_docs_url.rb#9 -class RuboCop::CLI::Command::ShowDocsUrl < ::RuboCop::CLI::Command::Base - # @api private - # @return [ShowDocsUrl] a new instance of ShowDocsUrl - # - # source://rubocop//lib/rubocop/cli/command/show_docs_url.rb#12 - def initialize(env); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/show_docs_url.rb#18 - def run; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/show_docs_url.rb#38 - def cops_array; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/show_docs_url.rb#24 - def print_documentation_url; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/show_docs_url.rb#42 - def registry_hash; end -end - -# Suggest RuboCop extensions to install based on Gemfile dependencies. -# Only primary dependencies are evaluated, so if a dependency depends on a -# gem with an extension, it is not suggested. However, if an extension is -# a transitive dependency, it will not be suggested. -# -# @api private -# -# source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#11 -class RuboCop::CLI::Command::SuggestExtensions < ::RuboCop::CLI::Command::Base - # @api private - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#17 - def run; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#73 - def all_extensions; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#69 - def current_formatter; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#117 - def dependent_gems; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#87 - def extensions; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#109 - def installed_and_not_loaded_extensions; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#91 - def installed_extensions; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#121 - def installed_gems; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#99 - def loaded_extensions; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#113 - def lockfile; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#95 - def not_installed_extensions; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#41 - def print_install_suggestions; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#51 - def print_load_suggestions; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#60 - def print_opt_out_instruction; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#125 - def puts(*args); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#30 - def skip?; end -end - -# Combination of short and long formatter names. -# -# @api private -# -# source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#13 -RuboCop::CLI::Command::SuggestExtensions::INCLUDED_FORMATTERS = T.let(T.unsafe(nil), Array) - -# Display version. -# -# @api private -# -# source://rubocop//lib/rubocop/cli/command/version.rb#8 -class RuboCop::CLI::Command::Version < ::RuboCop::CLI::Command::Base - # @api private - # - # source://rubocop//lib/rubocop/cli/command/version.rb#11 - def run; end -end - -# source://rubocop//lib/rubocop/cli.rb#13 -RuboCop::CLI::DEFAULT_PARALLEL_OPTIONS = T.let(T.unsafe(nil), Array) - -# Execution environment for a CLI command. -# -# @api private -# -# source://rubocop//lib/rubocop/cli/environment.rb#7 -class RuboCop::CLI::Environment - # @api private - # @return [Environment] a new instance of Environment - # - # source://rubocop//lib/rubocop/cli/environment.rb#10 - def initialize(options, config_store, paths); end - - # @api private - # - # source://rubocop//lib/rubocop/cli/environment.rb#8 - def config_store; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/environment.rb#8 - def options; end - - # @api private - # - # source://rubocop//lib/rubocop/cli/environment.rb#8 - def paths; end - - # Run a command in this environment. - # - # @api private - # - # source://rubocop//lib/rubocop/cli/environment.rb#17 - def run(name); end -end - -# source://rubocop//lib/rubocop/cli.rb#20 -class RuboCop::CLI::Finished < ::StandardError; end - -# source://rubocop//lib/rubocop/cli.rb#11 -RuboCop::CLI::STATUS_ERROR = T.let(T.unsafe(nil), Integer) - -# source://rubocop//lib/rubocop/cli.rb#12 -RuboCop::CLI::STATUS_INTERRUPTED = T.let(T.unsafe(nil), Integer) - -# source://rubocop//lib/rubocop/cli.rb#10 -RuboCop::CLI::STATUS_OFFENSES = T.let(T.unsafe(nil), Integer) - -# source://rubocop//lib/rubocop/cli.rb#9 -RuboCop::CLI::STATUS_SUCCESS = T.let(T.unsafe(nil), Integer) - -# This class represents the cache config of the caching RuboCop runs. -# -# @api private -# -# source://rubocop//lib/rubocop/cache_config.rb#6 -class RuboCop::CacheConfig - class << self - # @api private - # - # source://rubocop//lib/rubocop/cache_config.rb#7 - def root_dir; end - end -end - -# Converts RuboCop objects to and from the serialization format JSON. -# -# @api private -# -# source://rubocop//lib/rubocop/cached_data.rb#8 -class RuboCop::CachedData - # @api private - # @return [CachedData] a new instance of CachedData - # - # source://rubocop//lib/rubocop/cached_data.rb#9 - def initialize(filename); end - - # @api private - # - # source://rubocop//lib/rubocop/cached_data.rb#13 - def from_json(text); end - - # @api private - # - # source://rubocop//lib/rubocop/cached_data.rb#17 - def to_json(offenses); end - - private - - # Restore an offense object loaded from a JSON file. - # - # @api private - # - # source://rubocop//lib/rubocop/cached_data.rb#47 - def deserialize_offenses(offenses); end - - # @api private - # - # source://rubocop//lib/rubocop/cached_data.rb#54 - def location_from_source_buffer(offense); end - - # @api private - # - # source://rubocop//lib/rubocop/cached_data.rb#40 - def message(offense); end - - # @api private - # - # source://rubocop//lib/rubocop/cached_data.rb#23 - def serialize_offense(offense); end - - # Delay creation until needed. Some type of offenses will have no buffer associated with them - # and be global only. For these, trying to create the buffer will likely fail, for example - # because of unknown encoding comments. - # - # @api private - # - # source://rubocop//lib/rubocop/cached_data.rb#67 - def source_buffer; end -end - -# and provides a way to check if each cop is enabled at arbitrary line. -# -# source://rubocop//lib/rubocop/comment_config.rb#6 -class RuboCop::CommentConfig - extend ::RuboCop::SimpleForwardable - - # @return [CommentConfig] a new instance of CommentConfig - # - # source://rubocop//lib/rubocop/comment_config.rb#34 - def initialize(processed_source); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/comment_config.rb#63 - def comment_only_line?(line_number); end - - # source://rubocop-ast/1.41.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def config(*_arg0, **_arg1, &_arg2); end - - # source://rubocop//lib/rubocop/comment_config.rb#51 - def cop_disabled_line_ranges; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/comment_config.rb#39 - def cop_enabled_at_line?(cop, line_number); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/comment_config.rb#47 - def cop_opted_in?(cop); end - - # source://rubocop//lib/rubocop/comment_config.rb#55 - def extra_enabled_comments; end - - # Returns the value of attribute processed_source. - # - # source://rubocop//lib/rubocop/comment_config.rb#30 - def processed_source; end - - # source://rubocop-ast/1.41.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def registry(*_arg0, **_arg1, &_arg2); end - - private - - # source://rubocop//lib/rubocop/comment_config.rb#96 - def analyze; end - - # source://rubocop//lib/rubocop/comment_config.rb#124 - def analyze_cop(analysis, directive); end - - # source://rubocop//lib/rubocop/comment_config.rb#144 - def analyze_disabled(analysis, directive); end - - # source://rubocop//lib/rubocop/comment_config.rb#155 - def analyze_rest(analysis, directive); end - - # source://rubocop//lib/rubocop/comment_config.rb#135 - def analyze_single_line(analysis, directive); end - - # source://rubocop//lib/rubocop/comment_config.rb#164 - def cop_line_ranges(analysis); end - - # source://rubocop//lib/rubocop/comment_config.rb#170 - def each_directive; end - - # source://rubocop//lib/rubocop/comment_config.rb#69 - def extra_enabled_comments_with_names(extras:, names:); end - - # source://rubocop//lib/rubocop/comment_config.rb#190 - def handle_enable_all(directive, names, extras); end - - # Collect cops that have been disabled or enabled by name in a directive comment - # so that `Lint/RedundantCopEnableDirective` can register offenses correctly. - # - # source://rubocop//lib/rubocop/comment_config.rb#204 - def handle_switch(directive, names, extras); end - - # source://rubocop//lib/rubocop/comment_config.rb#115 - def inject_disabled_cops_directives(analyses); end - - # source://rubocop//lib/rubocop/comment_config.rb#183 - def non_comment_token_line_numbers; end - - # source://rubocop//lib/rubocop/comment_config.rb#83 - def opt_in_cops; end - - # source://rubocop//lib/rubocop/comment_config.rb#179 - def qualified_cop_name(cop_name); end -end - -# source://rubocop//lib/rubocop/comment_config.rb#9 -RuboCop::CommentConfig::CONFIG_DISABLED_LINE_RANGE_MIN = T.let(T.unsafe(nil), Float) - -# This class provides an API compatible with RuboCop::DirectiveComment -# to be used for cops that are disabled in the config file -# -# source://rubocop//lib/rubocop/comment_config.rb#13 -class RuboCop::CommentConfig::ConfigDisabledCopDirectiveComment - include ::RuboCop::Ext::Comment - - # @return [ConfigDisabledCopDirectiveComment] a new instance of ConfigDisabledCopDirectiveComment - # - # source://rubocop//lib/rubocop/comment_config.rb#21 - def initialize(cop_name); end - - # Returns the value of attribute line_number. - # - # source://rubocop//lib/rubocop/comment_config.rb#16 - def line_number; end - - # Returns the value of attribute loc. - # - # source://rubocop//lib/rubocop/comment_config.rb#16 - def loc; end - - # Returns the value of attribute text. - # - # source://rubocop//lib/rubocop/comment_config.rb#16 - def text; end -end - -# source://rubocop//lib/rubocop/comment_config.rb#19 -class RuboCop::CommentConfig::ConfigDisabledCopDirectiveComment::Expression < ::Struct - # Returns the value of attribute line - # - # @return [Object] the current value of line - def line; end - - # Sets the attribute line - # - # @param value [Object] the value to set the attribute line to. - # @return [Object] the newly set value - def line=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://rubocop//lib/rubocop/comment_config.rb#18 -class RuboCop::CommentConfig::ConfigDisabledCopDirectiveComment::Loc < ::Struct - # Returns the value of attribute expression - # - # @return [Object] the current value of expression - def expression; end - - # Sets the attribute expression - # - # @param value [Object] the value to set the attribute expression to. - # @return [Object] the newly set value - def expression=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://rubocop//lib/rubocop/comment_config.rb#28 -class RuboCop::CommentConfig::CopAnalysis < ::Struct - # Returns the value of attribute line_ranges - # - # @return [Object] the current value of line_ranges - def line_ranges; end - - # Sets the attribute line_ranges - # - # @param value [Object] the value to set the attribute line_ranges to. - # @return [Object] the newly set value - def line_ranges=(_); end - - # Returns the value of attribute start_line_number - # - # @return [Object] the current value of start_line_number - def start_line_number; end - - # Sets the attribute start_line_number - # - # @param value [Object] the value to set the attribute start_line_number to. - # @return [Object] the newly set value - def start_line_number=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# This class represents the configuration of the RuboCop application -# and all its cops. A Config is associated with a YAML configuration -# file from which it was read. Several different Configs can be used -# during a run of the rubocop program, if files in several -# directories are inspected. -# -# source://rubocop//lib/rubocop/config.rb#12 -class RuboCop::Config - include ::RuboCop::PathUtil - include ::RuboCop::FileFinder - extend ::RuboCop::SimpleForwardable - - # @return [Config] a new instance of Config - # - # source://rubocop//lib/rubocop/config.rb#31 - def initialize(hash = T.unsafe(nil), loaded_path = T.unsafe(nil)); end - - # source://rubocop-ast/1.41.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def [](*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast/1.41.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def []=(*_arg0, **_arg1, &_arg2); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config.rb#183 - def active_support_extensions_enabled?; end - - # source://rubocop//lib/rubocop/config.rb#98 - def add_excludes_from_higher_level(highest_config); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config.rb#210 - def allowed_camel_case_file?(file); end - - # Paths specified in configuration files starting with .rubocop are - # relative to the directory where that file is. Paths in other config files - # are relative to the current directory. This is so that paths in - # config/default.yml, for example, are not relative to RuboCop's config - # directory since that wouldn't work. - # - # source://rubocop//lib/rubocop/config.rb#254 - def base_dir_for_path_parameters; end - - # @return [String, nil] - # - # source://rubocop//lib/rubocop/config.rb#284 - def bundler_lock_file_path; end - - # source://rubocop//lib/rubocop/config.rb#56 - def check; end - - # @api private - # @return [Boolean] whether config for this badge has 'Include' or 'Exclude' keys - # - # source://rubocop//lib/rubocop/config.rb#151 - def clusivity_config_for_badge?(badge); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config.rb#171 - def cop_enabled?(name); end - - # source://rubocop-ast/1.41.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def delete(*_arg0, **_arg1, &_arg2); end - - # source://rubocop//lib/rubocop/config.rb#110 - def deprecation_check; end - - # source://rubocop-ast/1.41.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def dig(*_arg0, **_arg1, &_arg2); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config.rb#175 - def disabled_new_cops?; end - - # source://rubocop-ast/1.41.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def each(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast/1.41.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def each_key(*_arg0, **_arg1, &_arg2); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config.rb#179 - def enabled_new_cops?; end - - # source://rubocop-ast/1.41.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def fetch(*_arg0, **_arg1, &_arg2); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config.rb#232 - def file_to_exclude?(file); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config.rb#191 - def file_to_include?(file); end - - # source://rubocop//lib/rubocop/config.rb#167 - 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#137 - def for_badge(badge); end - - # Note: the 'Enabled' attribute is calculated according to the department's - # and 'AllCops' configuration; other attributes are not inherited. - # - # @return [Config] for the given cop / cop name. - # - # source://rubocop//lib/rubocop/config.rb#124 - def for_cop(cop); end - - # Note: the 'Enabled' attribute will be present only if specified - # at the department's level - # - # @return [Config] for the given department name. - # - # source://rubocop//lib/rubocop/config.rb#162 - def for_department(department_name); end - - # If the given cop is enabled, returns its configuration hash. - # Otherwise, returns an empty hash. - # - # @return [Config, Hash] for the given cop / cop name. - # - # source://rubocop//lib/rubocop/config.rb#131 - def for_enabled_cop(cop); end - - # Returns target's locked gem versions (i.e. from Gemfile.lock or gems.locked) - # - # source://rubocop//lib/rubocop/config.rb#309 - def gem_versions_in_target; end - - # source://rubocop//lib/rubocop/config.rb#313 - def inspect; end - - # True if this is a config file that is shipped with RuboCop - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config.rb#81 - def internal?; end - - # source://rubocop-ast/1.41.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def key?(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast/1.41.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def keys(*_arg0, **_arg1, &_arg2); end - - # source://rubocop//lib/rubocop/config.rb#52 - def loaded_features; end - - # Returns the value of attribute loaded_path. - # - # source://rubocop//lib/rubocop/config.rb#21 - def loaded_path; end - - # source://rubocop//lib/rubocop/config.rb#48 - def loaded_plugins; end - - # source://rubocop//lib/rubocop/config.rb#86 - def make_excludes_absolute; end - - # source://rubocop-ast/1.41.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def map(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast/1.41.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def merge(*_arg0, **_arg1, &_arg2); end - - # source://rubocop//lib/rubocop/config.rb#264 - def parser_engine; end - - # source://rubocop//lib/rubocop/config.rb#245 - def path_relative_to_config(path); end - - # source://rubocop//lib/rubocop/config.rb#241 - def patterns_to_exclude; end - - # source://rubocop//lib/rubocop/config.rb#237 - def patterns_to_include; end - - # source://rubocop//lib/rubocop/config.rb#295 - def pending_cops; end - - # Returns true if there's a chance that an Include pattern matches hidden - # files, false if that's definitely not possible. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config.rb#224 - def possibly_include_hidden?; end - - # source://rubocop-ast/1.41.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def replace(*_arg0, **_arg1, &_arg2); end - - # source://rubocop//lib/rubocop/config.rb#76 - def signature; end - - # source://rubocop//lib/rubocop/config.rb#279 - def smart_loaded_path; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config.rb#187 - def string_literals_frozen_by_default?; end - - # source://rubocop//lib/rubocop/config.rb#268 - def target_rails_version; end - - # source://rubocop-ast/1.41.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def target_ruby_version(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast/1.41.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def to_h(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast/1.41.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def to_hash(*_arg0, **_arg1, &_arg2); end - - # source://rubocop//lib/rubocop/config.rb#72 - def to_s; end - - # source://rubocop-ast/1.41.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def transform_values(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast/1.41.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def validate(*_arg0, **_arg1, &_arg2); end - - # source://rubocop//lib/rubocop/config.rb#63 - def validate_after_resolution; end - - private - - # source://rubocop//lib/rubocop/config.rb#363 - def department_of(qualified_cop_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config.rb#351 - def enable_cop?(qualified_cop_name, cop_options); end - - # @param gem_version [Gem::Version] an object like `Gem::Version.new("7.1.2.3")` - # @return [Float] The major and minor version, like `7.1` - # - # source://rubocop//lib/rubocop/config.rb#338 - def gem_version_to_major_minor_float(gem_version); end - - # source://rubocop//lib/rubocop/config.rb#344 - def read_gem_versions_from_target_lockfile; end - - # @return [Float, nil] The Rails version as a `major.minor` Float. - # - # source://rubocop//lib/rubocop/config.rb#325 - def read_rails_version_from_bundler_lock_file; end - - # @return [Float, nil] The Rails version as a `major.minor` Float. - # - # source://rubocop//lib/rubocop/config.rb#320 - def target_rails_version_from_bundler_lock_file; end - - class << self - # source://rubocop//lib/rubocop/config.rb#23 - def create(hash, path, check: T.unsafe(nil)); end - end -end - -# source://rubocop//lib/rubocop/config.rb#17 -class RuboCop::Config::CopConfig < ::Struct - # Returns the value of attribute metadata - # - # @return [Object] the current value of metadata - def metadata; end - - # Sets the attribute metadata - # - # @param value [Object] the value to set the attribute metadata to. - # @return [Object] the newly set value - def metadata=(_); end - - # Returns the value of attribute name - # - # @return [Object] the current value of name - def name; end - - # Sets the attribute name - # - # @param value [Object] the value to set the attribute name to. - # @return [Object] the newly set value - def name=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://rubocop//lib/rubocop/config.rb#20 -RuboCop::Config::DEFAULT_RAILS_VERSION = T.let(T.unsafe(nil), Float) - -# source://rubocop//lib/rubocop/config.rb#19 -RuboCop::Config::EMPTY_CONFIG = T.let(T.unsafe(nil), Hash) - -# This class has methods related to finding configuration path. -# -# @api private -# -# source://rubocop//lib/rubocop/config_finder.rb#8 -class RuboCop::ConfigFinder - extend ::RuboCop::FileFinder - - class << self - # @api private - # - # source://rubocop//lib/rubocop/config_finder.rb#19 - def find_config_path(target_dir); end - - # Returns the path RuboCop inferred as the root of the project. No file - # searches will go past this directory. - # - # @api private - # - # source://rubocop//lib/rubocop/config_finder.rb#26 - def project_root; end - - # @api private - # - # source://rubocop//lib/rubocop/config_finder.rb#17 - def project_root=(_arg0); end - - private - - # @api private - # - # source://rubocop//lib/rubocop/config_finder.rb#69 - def expand_path(path); end - - # @api private - # - # source://rubocop//lib/rubocop/config_finder.rb#40 - def find_project_dotfile(target_dir); end - - # @api private - # - # source://rubocop//lib/rubocop/config_finder.rb#32 - def find_project_root; end - - # @api private - # - # source://rubocop//lib/rubocop/config_finder.rb#44 - def find_project_root_dot_config; end - - # @api private - # - # source://rubocop//lib/rubocop/config_finder.rb#54 - def find_user_dotfile; end - - # @api private - # - # source://rubocop//lib/rubocop/config_finder.rb#62 - def find_user_xdg_config; end - end -end - -# @api private -# -# source://rubocop//lib/rubocop/config_finder.rb#12 -RuboCop::ConfigFinder::DEFAULT_FILE = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/config_finder.rb#9 -RuboCop::ConfigFinder::DOTFILE = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/config_finder.rb#11 -RuboCop::ConfigFinder::RUBOCOP_HOME = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/config_finder.rb#10 -RuboCop::ConfigFinder::XDG_CONFIG = T.let(T.unsafe(nil), String) - -# This class represents the configuration of the RuboCop application -# and all its cops. A Config is associated with a YAML configuration -# file from which it was read. Several different Configs can be used -# during a run of the rubocop program, if files in several -# directories are inspected. -# -# source://rubocop//lib/rubocop/config_loader.rb#17 -class RuboCop::ConfigLoader - extend ::RuboCop::FileFinder - - class << self - # source://rubocop//lib/rubocop/config_loader.rb#148 - def add_excludes_from_files(config, config_file); end - - # Used to add features that were required inside a config or from - # the CLI using `--require`. - # - # @api private - # - # source://rubocop//lib/rubocop/config_loader.rb#237 - def add_loaded_features(loaded_features); end - - # Used to add plugins that were required inside a config or from - # the CLI using `--plugin`. - # - # @api private - # - # source://rubocop//lib/rubocop/config_loader.rb#230 - def add_loaded_plugins(loaded_plugins); end - - # source://rubocop//lib/rubocop/config_loader.rb#91 - def add_missing_namespaces(path, hash); end - - # source://rubocop//lib/rubocop/config_loader.rb#41 - def clear_options; end - - # Returns the path of .rubocop.yml searching upwards in the - # directory structure starting at the given directory where the - # inspected file is. If no .rubocop.yml is found there, the - # 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#115 - def configuration_file_for(target_dir); end - - # source://rubocop//lib/rubocop/config_loader.rb#119 - def configuration_from_file(config_file, check: T.unsafe(nil)); end - - # Returns the value of attribute debug. - # - # 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#33 - def debug=(_arg0); end - - # Returns the value of attribute debug. - # - # source://rubocop//lib/rubocop/config_loader.rb#33 - def debug?; end - - # source://rubocop//lib/rubocop/config_loader.rb#158 - 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#35 - def default_configuration=(_arg0); end - - # Returns the value of attribute disable_pending_cops. - # - # 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#33 - def disable_pending_cops=(_arg0); end - - # Returns the value of attribute enable_pending_cops. - # - # 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#33 - def enable_pending_cops=(_arg0); end - - # Returns the value of attribute ignore_parent_exclusion. - # - # 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#33 - def ignore_parent_exclusion=(_arg0); end - - # Returns the value of attribute ignore_parent_exclusion. - # - # 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#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#33 - def ignore_unrecognized_cops=(_arg0); end - - # This API is primarily intended for testing and documenting plugins. - # When testing a plugin using `rubocop/rspec/support`, the plugin is loaded automatically, - # so this API is usually not needed. It is intended to be used only when implementing tests - # that do not use `rubocop/rspec/support`. - # - # source://rubocop//lib/rubocop/config_loader.rb#170 - def inject_defaults!(config_yml_path); end - - # source://rubocop//lib/rubocop/config_loader.rb#53 - def load_file(file, check: T.unsafe(nil)); end - - # @raise [TypeError] - # - # source://rubocop//lib/rubocop/config_loader.rb#78 - def load_yaml_configuration(absolute_path); end - - # Returns the value of attribute loaded_features. - # - # source://rubocop//lib/rubocop/config_loader.rb#36 - def loaded_features; end - - # Returns the value of attribute loaded_plugins. - # - # source://rubocop//lib/rubocop/config_loader.rb#36 - def loaded_plugins; 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#106 - def merge(base_hash, derived_hash); end - - # Merges the given configuration with the default one. - # - # source://rubocop//lib/rubocop/config_loader.rb#223 - def merge_with_default(config, config_file, unset_nil: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/config_loader.rb#139 - def pending_cops_only_qualified(pending_cops); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_loader.rb#143 - def possible_new_cops?(config); end - - # Returns the path RuboCop inferred as the root of the project. No file - # searches will go past this directory. - # - # @deprecated Use `RuboCop::ConfigFinder.project_root` instead. - # - # source://rubocop//lib/rubocop/config_loader.rb#198 - def project_root; end - - # source://rubocop//lib/rubocop/config_loader.rb#207 - def warn_on_pending_cops(pending_cops); end - - # source://rubocop//lib/rubocop/config_loader.rb#215 - def warn_pending_cop(cop); end - - private - - # source://rubocop//lib/rubocop/config_loader.rb#251 - def check_duplication(yaml_code, absolute_path); end - - # source://rubocop//lib/rubocop/config_loader.rb#243 - 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#271 - def read_file(absolute_path); end - - # source://rubocop//lib/rubocop/config_loader.rb#247 - def resolver; end - - # source://rubocop//lib/rubocop/config_loader.rb#277 - def yaml_tree_to_hash(yaml_tree); end - - # source://rubocop//lib/rubocop/config_loader.rb#287 - def yaml_tree_to_hash!(yaml_tree); end - end -end - -# 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#18 -RuboCop::ConfigLoader::DOTFILE = T.let(T.unsafe(nil), String) - -# 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. -# -# @api private -# -# source://rubocop//lib/rubocop/config_loader_resolver.rb#10 -class RuboCop::ConfigLoaderResolver - # When one .rubocop.yml file inherits from another .rubocop.yml file, the Include paths in the - # base configuration are relative to the directory where the base configuration file is. For the - # derived configuration, we need to make those paths relative to where the derived configuration - # file is. - # - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#64 - 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 - # arguments, will also be merged. And so on. - # - # - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#118 - def merge(base_hash, derived_hash, **opts); end - - # Merges the given configuration with the default one. If - # AllCops:DisabledByDefault is true, it changes the Enabled params so that - # only cops from user configuration are enabled. If - # AllCops:EnabledByDefault is true, it changes the Enabled params so that - # only cops explicitly disabled in user configuration are disabled. - # - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#94 - def merge_with_default(config, config_file, unset_nil:); end - - # An `Enabled: true` setting in user configuration for a cop overrides an - # `Enabled: false` setting for its department. - # - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#138 - def override_department_setting_for_cops(base_hash, derived_hash); end - - # If a cop was previously explicitly enabled, but then superseded by the - # department being disabled, disable it. - # - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#155 - def override_enabled_for_disabled_departments(base_hash, derived_hash); end - - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#38 - def resolve_inheritance(path, hash, file, debug); end - - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#74 - def resolve_inheritance_from_gems(hash); end - - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#11 - def resolve_plugins(rubocop_config, plugins); end - - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#18 - def resolve_requires(path, hash); end - - private - - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#234 - def base_configs(path, inherit_from, file); end - - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#202 - def determine_inherit_mode(hash, key); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#171 - def disabled?(hash, department); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#175 - def duplicate_setting?(base_hash, derived_hash, key, inherited_file); end - - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#196 - def duplicate_setting_warning(opts, key); end - - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#293 - def gem_config_path(gem_name, relative_config_path); end - - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#271 - def handle_disabled_by_default(config, new_default_configuration); end - - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#246 - def inherited_file(path, inherit_from, file); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#230 - def merge_hashes?(base_hash, derived_hash, key); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#267 - def remote_config?(file); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#222 - def should_merge?(mode, key); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#226 - def should_override?(mode, key); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#208 - def should_union?(derived_hash, base_hash, root_mode, key); end - - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#289 - def transform(config, &block); end - - # @api private - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#184 - 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#9 -class RuboCop::ConfigNotFoundError < ::RuboCop::Error; end - -# This class handles obsolete configuration. -# -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion/rule.rb#4 -class RuboCop::ConfigObsoletion - # @api private - # @return [ConfigObsoletion] a new instance of ConfigObsoletion - # - # source://rubocop//lib/rubocop/config_obsoletion.rb#35 - def initialize(config); end - - # @api private - # @raise [ValidationError] - # - # source://rubocop//lib/rubocop/config_obsoletion.rb#41 - def reject_obsolete!; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion.rb#21 - def rules; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion.rb#21 - def warnings; end - - private - - # Cop rules are keyed by the name of the original cop - # - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion.rb#72 - def load_cop_rules(rules); end - - # Parameter rules may apply to multiple cops and multiple parameters - # and are given as an array. Each combination is turned into a separate - # rule object. - # - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion.rb#85 - def load_parameter_rules(rules); end - - # Default rules for obsoletions are in config/obsoletion.yml - # Additional rules files can be added with `RuboCop::ConfigObsoletion.files << filename` - # - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion.rb#52 - def load_rules; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion.rb#98 - def obsoletions; end - - class << self - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion.rb#24 - def files; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion.rb#24 - def files=(_arg0); end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion.rb#26 - def legacy_cop_names; end - end -end - -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion.rb#8 -RuboCop::ConfigObsoletion::COP_RULE_CLASSES = T.let(T.unsafe(nil), Hash) - -# Encapsulation of a ConfigObsoletion rule for changing a parameter -# -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion/changed_enforced_styles.rb#7 -class RuboCop::ConfigObsoletion::ChangedEnforcedStyles < ::RuboCop::ConfigObsoletion::ParameterRule - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/changed_enforced_styles.rb#14 - def message; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_obsoletion/changed_enforced_styles.rb#10 - def violated?; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/changed_enforced_styles.rb#28 - def value; end -end - -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion/changed_enforced_styles.rb#8 -RuboCop::ConfigObsoletion::ChangedEnforcedStyles::BASE_MESSAGE = T.let(T.unsafe(nil), String) - -# Encapsulation of a ConfigObsoletion rule for changing a parameter -# -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion/changed_parameter.rb#7 -class RuboCop::ConfigObsoletion::ChangedParameter < ::RuboCop::ConfigObsoletion::ParameterRule - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/changed_parameter.rb#10 - def message; end -end - -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion/changed_parameter.rb#8 -RuboCop::ConfigObsoletion::ChangedParameter::BASE_MESSAGE = T.let(T.unsafe(nil), String) - -# Base class for ConfigObsoletion rules relating to cops -# -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#7 -class RuboCop::ConfigObsoletion::CopRule < ::RuboCop::ConfigObsoletion::Rule - # @api private - # @return [CopRule] a new instance of CopRule - # - # source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#10 - def initialize(config, old_name); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#15 - def cop_rule?; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#19 - def message; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#8 - def old_name; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#28 - def violated?; end - - # Cop rules currently can only be failures, not warnings - # - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#24 - def warning?; end -end - -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion.rb#7 -RuboCop::ConfigObsoletion::DEFAULT_RULES_FILE = T.let(T.unsafe(nil), String) - -# Encapsulation of a ConfigObsoletion rule for splitting a cop's -# functionality into multiple new cops. -# -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#8 -class RuboCop::ConfigObsoletion::ExtractedCop < ::RuboCop::ConfigObsoletion::CopRule - # @api private - # @return [ExtractedCop] a new instance of ExtractedCop - # - # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#11 - def initialize(config, old_name, gem); end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#9 - def department; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#9 - def gem; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#23 - def rule_message; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#17 - def violated?; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#32 - def affected_cops; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#41 - def plugin_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 -RuboCop::ConfigObsoletion::PARAMETER_RULE_CLASSES = T.let(T.unsafe(nil), Hash) - -# Base class for ConfigObsoletion rules relating to parameters -# -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#7 -class RuboCop::ConfigObsoletion::ParameterRule < ::RuboCop::ConfigObsoletion::Rule - # @api private - # @return [ParameterRule] a new instance of ParameterRule - # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#10 - def initialize(config, cop, parameter, metadata); end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#8 - def cop; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#8 - def metadata; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#8 - def parameter; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#17 - def parameter_rule?; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#21 - def violated?; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#25 - def warning?; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#39 - def alternative; end - - # @api private - # - # 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#47 - def reason; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#51 - def severity; end -end - -# Encapsulation of a ConfigObsoletion rule for removing -# a previously defined cop. -# -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#8 -class RuboCop::ConfigObsoletion::RemovedCop < ::RuboCop::ConfigObsoletion::CopRule - # @api private - # @return [RemovedCop] a new instance of RemovedCop - # - # source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#13 - def initialize(config, old_name, metadata); end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#9 - def metadata; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#9 - def old_name; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#18 - def rule_message; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#36 - def alternatives; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#32 - def reason; end -end - -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#11 -RuboCop::ConfigObsoletion::RemovedCop::BASE_MESSAGE = T.let(T.unsafe(nil), String) - -# Encapsulation of a ConfigObsoletion rule for renaming -# a cop or moving it to a new department. -# -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#8 -class RuboCop::ConfigObsoletion::RenamedCop < ::RuboCop::ConfigObsoletion::CopRule - # @api private - # @return [RenamedCop] a new instance of RenamedCop - # - # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#11 - def initialize(config, old_name, new_name); end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#9 - def new_name; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#16 - def rule_message; end - - private - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#22 - def moved?; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#29 - def verb; end -end - -# Abstract base class for ConfigObsoletion rules -# -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion/rule.rb#7 -class RuboCop::ConfigObsoletion::Rule - # @api private - # @return [Rule] a new instance of Rule - # - # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#8 - def initialize(config); end - - # Does this rule relate to cops? - # - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#13 - def cop_rule?; end - - # Does this rule relate to parameters? - # - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#18 - def parameter_rule?; end - - # @api private - # @raise [NotImplementedError] - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#22 - def violated?; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#28 - def config; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#36 - def smart_loaded_path; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#30 - def to_sentence(collection, connector: T.unsafe(nil)); end -end - -# Encapsulation of a ConfigObsoletion rule for splitting a cop's -# functionality into multiple new cops. -# -# @api private -# -# source://rubocop//lib/rubocop/config_obsoletion/split_cop.rb#8 -class RuboCop::ConfigObsoletion::SplitCop < ::RuboCop::ConfigObsoletion::CopRule - # @api private - # @return [SplitCop] a new instance of SplitCop - # - # source://rubocop//lib/rubocop/config_obsoletion/split_cop.rb#11 - def initialize(config, old_name, metadata); end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/split_cop.rb#9 - def metadata; end - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/split_cop.rb#16 - def rule_message; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/config_obsoletion/split_cop.rb#22 - def alternatives; end -end - -# This class handles collecting the options for regenerating a TODO file. -# -# @api private -# -# source://rubocop//lib/rubocop/config_regeneration.rb#6 -class RuboCop::ConfigRegeneration - # Get options from the comment in the TODO file, and parse them as options - # - # @api private - # - # source://rubocop//lib/rubocop/config_regeneration.rb#12 - def options; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/config_regeneration.rb#29 - def generation_command; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_regeneration.rb#25 - def todo_exists?; end -end - -# @api private -# -# source://rubocop//lib/rubocop/config_regeneration.rb#7 -RuboCop::ConfigRegeneration::AUTO_GENERATED_FILE = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/config_regeneration.rb#8 -RuboCop::ConfigRegeneration::COMMAND_REGEX = T.let(T.unsafe(nil), Regexp) - -# @api private -# -# source://rubocop//lib/rubocop/config_regeneration.rb#9 -RuboCop::ConfigRegeneration::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# Handles caching of configurations and association of inspected -# ruby files to configurations. -# -# source://rubocop//lib/rubocop/config_store.rb#6 -class RuboCop::ConfigStore - # @return [ConfigStore] a new instance of ConfigStore - # - # source://rubocop//lib/rubocop/config_store.rb#10 - def initialize; end - - # If type (file/dir) is known beforehand, - # prefer using #for_file or #for_dir for improved performance - # - # source://rubocop//lib/rubocop/config_store.rb#52 - def for(file_or_dir); end - - # source://rubocop//lib/rubocop/config_store.rb#61 - def for_dir(dir); end - - # source://rubocop//lib/rubocop/config_store.rb#42 - def for_file(file); end - - # source://rubocop//lib/rubocop/config_store.rb#46 - def for_pwd; end - - # source://rubocop//lib/rubocop/config_store.rb#33 - def force_default_config!; end - - # source://rubocop//lib/rubocop/config_store.rb#28 - def options_config=(options_config); end - - # source://rubocop//lib/rubocop/config_store.rb#37 - def unvalidated; end - - # Returns the value of attribute validated. - # - # source://rubocop//lib/rubocop/config_store.rb#7 - def validated; end - - # Returns the value of attribute validated. - # - # source://rubocop//lib/rubocop/config_store.rb#7 - def validated?; end -end - -# Handles validation of configuration, for example cop names, parameter -# names, and Ruby versions. -# -# source://rubocop//lib/rubocop/config_validator.rb#7 -class RuboCop::ConfigValidator - extend ::RuboCop::SimpleForwardable - - # @return [ConfigValidator] a new instance of ConfigValidator - # - # source://rubocop//lib/rubocop/config_validator.rb#28 - def initialize(config); end - - # source://rubocop-ast/1.41.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def for_all_cops(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast/1.41.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def smart_loaded_path(*_arg0, **_arg1, &_arg2); end - - # source://rubocop//lib/rubocop/config_validator.rb#65 - def target_ruby_version; end - - # source://rubocop//lib/rubocop/config_validator.rb#34 - def validate; end - - # Validations that should only be run after all config resolving has - # taken place: - # * The target ruby version is only checked once the entire inheritance - # 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#61 - def validate_after_resolution; end - - private - - # @raise [ValidationError] - # - # source://rubocop//lib/rubocop/config_validator.rb#100 - def alert_about_unrecognized_cops(invalid_cop_names); end - - # source://rubocop//lib/rubocop/config_validator.rb#263 - def check_cop_config_value(hash, parent = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/config_validator.rb#73 - def check_obsoletions; end - - # @raise [ValidationError] - # - # source://rubocop//lib/rubocop/config_validator.rb#80 - def check_target_ruby; end - - # source://rubocop//lib/rubocop/config_validator.rb#204 - def each_invalid_parameter(cop_name); end - - # source://rubocop//lib/rubocop/config_validator.rb#116 - 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#283 - def param_error_message(parent, key, value, supposed_values); end - - # source://rubocop//lib/rubocop/config_validator.rb#251 - def reject_conflicting_safe_settings; end - - # @raise [ValidationError] - # - # source://rubocop//lib/rubocop/config_validator.rb#242 - def reject_mutually_exclusive_defaults; end - - # source://rubocop//lib/rubocop/config_validator.rb#138 - def suggestion(name); end - - # Returns the value of attribute target_ruby. - # - # source://rubocop//lib/rubocop/config_validator.rb#71 - def target_ruby; end - - # source://rubocop//lib/rubocop/config_validator.rb#216 - def validate_enforced_styles(valid_cop_names); end - - # @raise [ValidationError] - # - # source://rubocop//lib/rubocop/config_validator.rb#165 - def validate_new_cops_parameter; end - - # source://rubocop//lib/rubocop/config_validator.rb#190 - def validate_parameter_names(valid_cop_names); end - - # source://rubocop//lib/rubocop/config_validator.rb#176 - def validate_parameter_shape(valid_cop_names); end - - # source://rubocop//lib/rubocop/config_validator.rb#236 - def validate_support_and_has_list(name, formats, valid); end - - # @raise [ValidationError] - # - # source://rubocop//lib/rubocop/config_validator.rb#154 - def validate_syntax_cop; end -end - -# @api private -# -# source://rubocop//lib/rubocop/config_validator.rb#11 -RuboCop::ConfigValidator::COMMON_PARAMS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/config_validator.rb#23 -RuboCop::ConfigValidator::CONFIG_CHECK_AUTOCORRECTS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/config_validator.rb#22 -RuboCop::ConfigValidator::CONFIG_CHECK_DEPARTMENTS = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://rubocop//lib/rubocop/config_validator.rb#21 -RuboCop::ConfigValidator::CONFIG_CHECK_KEYS = T.let(T.unsafe(nil), Set) - -# @api private -# -# source://rubocop//lib/rubocop/config_validator.rb#14 -RuboCop::ConfigValidator::INTERNAL_PARAMS = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://rubocop//lib/rubocop/config_validator.rb#18 -RuboCop::ConfigValidator::NEW_COPS_VALUES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/util.rb#4 -module RuboCop::Cop; end - -# This module checks for nodes that should be aligned to the left or right. -# This amount is determined by the instance variable @column_delta. -# -# source://rubocop//lib/rubocop/cop/mixin/alignment.rb#7 -module RuboCop::Cop::Alignment - private - - # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#26 - def check_alignment(items, base_column = T.unsafe(nil)); end - - # Returns the value of attribute column_delta. - # - # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#12 - def column_delta; end - - # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#14 - def configured_indentation_width; end - - # @api public - # - # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#58 - def display_column(range); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#45 - def each_bad_alignment(items, base_column); end - - # @deprecated Use processed_source.line_with_comment?(line) - # - # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#69 - def end_of_line_comment(line); end - - # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#18 - def indentation(node); end - - # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#22 - def offset(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#78 - def register_offense(offense_node, message_node); end - - # @api public - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#64 - def within?(inner, outer); end -end - -# source://rubocop//lib/rubocop/cop/mixin/alignment.rb#8 -RuboCop::Cop::Alignment::SPACE = T.let(T.unsafe(nil), String) - -# This class does autocorrection of nodes that should just be moved to -# the left or to the right, amount being determined by the instance -# variable column_delta. -# -# source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#8 -class RuboCop::Cop::AlignmentCorrector - extend ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::Alignment - - class << self - # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#29 - def align_end(corrector, processed_source, node, align_to); end - - # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#15 - def correct(corrector, processed_source, node, column_delta); end - - # Returns the value of attribute processed_source. - # - # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#13 - def processed_source; end - - private - - # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#113 - def alignment_column(align_to); end - - # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#40 - def autocorrect_line(corrector, line_begin_pos, expr, column_delta, taboo_ranges); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#81 - def block_comment_within?(expr); end - - # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#87 - def calculate_range(expr, line_begin_pos, column_delta); end - - # Some special kinds of string literals are not composed of literal - # characters between two delimiters: - # - The source map of `?a` responds to :begin and :end but its end is - # nil. - # - The source map of `__FILE__` responds to neither :begin nor :end. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#75 - def delimited_string_literal?(node); end - - # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#99 - def each_line(expr); end - - # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#60 - def inside_string_range(node); end - - # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#54 - def inside_string_ranges(node); end - - # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#107 - def whitespace_range(node); end - end -end - -# This module encapsulates the ability to allow certain identifiers in a cop. -# -# source://rubocop//lib/rubocop/cop/mixin/allowed_identifiers.rb#6 -module RuboCop::Cop::AllowedIdentifiers - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/allowed_identifiers.rb#9 - def allowed_identifier?(name); end - - # source://rubocop//lib/rubocop/cop/mixin/allowed_identifiers.rb#13 - def allowed_identifiers; end -end - -# if a variable starts with a sigil it will be removed -# -# source://rubocop//lib/rubocop/cop/mixin/allowed_identifiers.rb#7 -RuboCop::Cop::AllowedIdentifiers::SIGILS = T.let(T.unsafe(nil), String) - -# This module encapsulates the ability to allow certain methods when -# parsing. Even if the code is in offense, if it contains methods -# that are allowed. This module is equivalent to the IgnoredMethods module, -# which will be deprecated in RuboCop 2.0. -# -# source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#9 -module RuboCop::Cop::AllowedMethods - private - - # @api public - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#13 - def allowed_method?(name); end - - # @api public - # - # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#27 - def allowed_methods; end - - # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#35 - def cop_config_allowed_methods; end - - # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#39 - def cop_config_deprecated_values; end - - # @deprecated Use allowed_method? instead - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#18 - def ignored_method?; end -end - -# This module encapsulates the ability to ignore certain lines when -# parsing. -# -# source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#7 -module RuboCop::Cop::AllowedPattern - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#10 - def allowed_line?(line); end - - # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#42 - def allowed_patterns; end - - # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#58 - def cop_config_deprecated_methods_values; end - - # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#52 - def cop_config_patterns_values; end - - # @deprecated Use allowed_line? instead - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#21 - def ignored_line?(line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#29 - def matches_allowed_pattern?(line); end - - # @deprecated Use matches_allowed_pattern? instead - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#34 - 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 -# -# source://rubocop//lib/rubocop/cop/registry.rb#7 -class RuboCop::Cop::AmbiguousCopName < ::RuboCop::Error - # @return [AmbiguousCopName] a new instance of AmbiguousCopName - # - # source://rubocop//lib/rubocop/cop/registry.rb#11 - def initialize(name, origin, badges); end -end - -# source://rubocop//lib/rubocop/cop/registry.rb#8 -RuboCop::Cop::AmbiguousCopName::MSG = T.let(T.unsafe(nil), String) - -# Representation of an annotation comment in source code (eg. `# TODO: blah blah blah`). -# -# source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#6 -class RuboCop::Cop::AnnotationComment - # @param comment [Parser::Source::Comment] - # @param keywords [Array] - # @return [AnnotationComment] a new instance of AnnotationComment - # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#11 - def initialize(comment, keywords); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#17 - def annotation?; end - - # Returns the range bounds for just the annotation - # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#29 - def bounds; end - - # Returns the value of attribute colon. - # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 - def colon; end - - # Returns the value of attribute comment. - # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 - def comment; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#21 - def correct?(colon:); end - - # Returns the value of attribute keyword. - # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 - def keyword; end - - # Returns the value of attribute margin. - # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 - def margin; end - - # Returns the value of attribute note. - # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 - def note; end - - # Returns the value of attribute space. - # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 - def space; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#65 - def just_keyword_of_sentence?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#61 - def keyword_appearance?; end - - # Returns the value of attribute keywords. - # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#37 - def keywords; end - - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#51 - def regex; end - - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#39 - def split_comment(comment); end -end - -# source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#48 -RuboCop::Cop::AnnotationComment::KEYWORDS_REGEX_CACHE = T.let(T.unsafe(nil), Hash) - -# Handles the `MinSize` configuration option for array-based cops -# `Style/SymbolArray` and `Style/WordArray`, which check for use of the -# relevant percent literal syntax such as `%i[...]` and `%w[...]` -# -# source://rubocop//lib/rubocop/cop/mixin/array_min_size.rb#8 -module RuboCop::Cop::ArrayMinSize - private - - # source://rubocop//lib/rubocop/cop/mixin/array_min_size.rb#19 - def array_style_detected(style, ary_size); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/array_min_size.rb#11 - def below_array_length?(node); end - - # source://rubocop//lib/rubocop/cop/mixin/array_min_size.rb#38 - def largest_brackets_size(style, ary_size); end - - # source://rubocop//lib/rubocop/cop/mixin/array_min_size.rb#15 - def min_size_config; end - - # source://rubocop//lib/rubocop/cop/mixin/array_min_size.rb#48 - def smallest_percent_size(style, ary_size); end -end - -# Common code for ordinary arrays with [] that can be written with % -# syntax. -# -# source://rubocop//lib/rubocop/cop/mixin/array_syntax.rb#7 -module RuboCop::Cop::ArraySyntax - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/array_syntax.rb#10 - def bracketed_array_of?(element_type, node); end -end - -# extend this module to signal autocorrection support -# -# source://rubocop//lib/rubocop/cop/mixin/auto_corrector.rb#6 -module RuboCop::Cop::AutoCorrector - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/auto_corrector.rb#7 - def support_autocorrect?; end -end - -# This module encapsulates the logic for autocorrect behavior for a cop. -# -# source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#6 -module RuboCop::Cop::AutocorrectLogic - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#7 - def autocorrect?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#31 - def autocorrect_enabled?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#15 - def autocorrect_requested?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#11 - def autocorrect_with_disable_uncorrectable?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#19 - def correctable?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#23 - def disable_uncorrectable?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#27 - def safe_autocorrect?; end - - private - - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#51 - def disable_offense(offense_range); end - - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#135 - def disable_offense_at_end_of_line(range, eol_comment); end - - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#139 - def disable_offense_before_and_after(range_by_lines); end - - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#77 - def disable_offense_with_eol_or_surround_comment(range); end - - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#96 - def heredoc_range(node); end - - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#131 - def max_line_length; end - - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#63 - def multiline_ranges(offense_range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#108 - def multiline_string?(node); 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#121 - def range_by_lines(range); end - - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#112 - def range_of_first_line(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#88 - def range_overlaps_offense?(offense_range, range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#104 - def string_continuation?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#92 - def surrounding_heredoc?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#100 - def surrounding_percent_array?(node); end -end - -# Identifier of all cops containing a department and cop name. -# -# All cops are identified by their badge. For example, the badge for -# `RuboCop::Cop::Layout::IndentationStyle` is `Layout/IndentationStyle`. -# Badges can be parsed as either `Department/CopName` or just `CopName` to -# allow for badge references in source files that omit the department for -# RuboCop to infer. -# -# source://rubocop//lib/rubocop/cop/badge.rb#12 -class RuboCop::Cop::Badge - # @return [Badge] a new instance of Badge - # - # source://rubocop//lib/rubocop/cop/badge.rb#34 - def initialize(class_name_parts); end - - # source://rubocop//lib/rubocop/cop/badge.rb#41 - def ==(other); end - - # Returns the value of attribute cop_name. - # - # source://rubocop//lib/rubocop/cop/badge.rb#13 - def cop_name; end - - # Returns the value of attribute department. - # - # source://rubocop//lib/rubocop/cop/badge.rb#13 - def department; end - - # Returns the value of attribute department_name. - # - # source://rubocop//lib/rubocop/cop/badge.rb#13 - def department_name; end - - # source://rubocop//lib/rubocop/cop/badge.rb#41 - def eql?(other); end - - # source://rubocop//lib/rubocop/cop/badge.rb#46 - def hash; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/badge.rb#51 - def match?(other); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/badge.rb#59 - def qualified?; end - - # source://rubocop//lib/rubocop/cop/badge.rb#55 - def to_s; end - - # source://rubocop//lib/rubocop/cop/badge.rb#63 - def with_department(department); end - - class << self - # source://rubocop//lib/rubocop/cop/badge.rb#27 - def camel_case(name_part); end - - # source://rubocop//lib/rubocop/cop/badge.rb#15 - def for(class_name); end - - # source://rubocop//lib/rubocop/cop/badge.rb#23 - def parse(identifier); end - end -end - -# A scaffold for concrete cops. -# -# The Cop::Base class is meant to be extended. -# -# Cops track offenses and can autocorrect them on the fly. -# -# A commissioner object is responsible for traversing the AST and invoking -# the specific callbacks on each cop. -# -# First the callback `on_new_investigation` is called; -# if a cop needs to do its own processing of the AST or depends on -# something else. -# -# Then callbacks like `on_def`, `on_send` (see AST::Traversal) are called -# with their respective nodes. -# -# Finally the callback `on_investigation_end` is called. -# -# Within these callbacks, cops are meant to call `add_offense` or -# `add_global_offense`. Use the `processed_source` method to -# get the currently processed source being investigated. -# -# In case of invalid syntax / unparsable content, -# the callback `on_other_file` is called instead of all the other -# `on_...` callbacks. -# -# Private methods are not meant for custom cops consumption, -# nor are any instance variables. -# -# source://rubocop//lib/rubocop/cop/base.rb#34 -class RuboCop::Cop::Base - include ::RuboCop::AST::Sexp - include ::RuboCop::PathUtil - include ::RuboCop::Cop::Util - include ::RuboCop::Cop::IgnoredNode - include ::RuboCop::Cop::AutocorrectLogic - extend ::RuboCop::AST::Sexp - extend ::RuboCop::AST::NodePattern::Macros - extend ::RuboCop::ExcludeLimit - - # @return [Base] a new instance of Base - # - # source://rubocop//lib/rubocop/cop/base.rb#156 - def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/base.rb#278 - def active_support_extensions_enabled?; end - - # Adds an offense that has no particular location. - # No correction can be applied to global offenses - # - # source://rubocop//lib/rubocop/cop/base.rb#189 - def add_global_offense(message = T.unsafe(nil), severity: T.unsafe(nil)); end - - # Adds an offense on the specified range (or node with an expression) - # Unless that offense is disabled for this range, a corrector will be yielded - # to provide the cop the opportunity to autocorrect the offense. - # If message is not specified, the method `message` will be called. - # - # source://rubocop//lib/rubocop/cop/base.rb#201 - def add_offense(node_or_range, message: T.unsafe(nil), severity: T.unsafe(nil), &block); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/base.rb#357 - def always_autocorrect?; end - - # Called before any investigation - # - # @api private - # - # source://rubocop//lib/rubocop/cop/base.rb#343 - def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/base.rb#324 - def callbacks_needed; end - - # Returns the value of attribute config. - # - # source://rubocop//lib/rubocop/cop/base.rb#43 - def config; end - - # source://rubocop//lib/rubocop/cop/base.rb#252 - def config_to_allow_offenses; end - - # source://rubocop//lib/rubocop/cop/base.rb#256 - def config_to_allow_offenses=(hash); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/base.rb#363 - def contextual_autocorrect?; end - - # Configuration Helpers - # - # source://rubocop//lib/rubocop/cop/base.rb#246 - def cop_config; end - - # source://rubocop//lib/rubocop/cop/base.rb#238 - def cop_name; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/base.rb#295 - def excluded_file?(file); end - - # This method should be overridden when a cop's behavior depends - # on state that lives outside of these locations: - # - # (1) the file under inspection - # (2) the cop's source code - # (3) the config (eg a .rubocop.yml file) - # - # For example, some cops may want to look at other parts of - # the codebase being inspected to find violations. A cop may - # use the presence or absence of file `foo.rb` to determine - # whether a certain violation exists in `bar.rb`. - # - # Overriding this method allows the cop to indicate to RuboCop's - # ResultCache system when those external dependencies change, - # ie when the ResultCache should be invalidated. - # - # source://rubocop//lib/rubocop/cop/base.rb#234 - def external_dependency_checksum; end - - # source://rubocop//lib/rubocop/cop/base.rb#367 - 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 - # - # source://rubocop//lib/rubocop/cop/base.rb#183 - def message(_range = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/base.rb#238 - def name; end - - # @deprecated Make potential errors with previous API more obvious - # - # source://rubocop//lib/rubocop/cop/base.rb#315 - def offenses; end - - # Called after all on_... have been called - # When refining this method, always call `super` - # - # source://rubocop//lib/rubocop/cop/base.rb#170 - def on_investigation_end; end - - # Called before all on_... have been called - # When refining this method, always call `super` - # - # source://rubocop//lib/rubocop/cop/base.rb#164 - def on_new_investigation; end - - # Called instead of all on_... callbacks for unrecognized files / syntax errors - # When refining this method, always call `super` - # - # source://rubocop//lib/rubocop/cop/base.rb#176 - def on_other_file; end - - # There should be very limited reasons for a Cop to do it's own parsing - # - # source://rubocop//lib/rubocop/cop/base.rb#300 - def parse(source, path = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/base.rb#270 - def parser_engine; end - - # Returns the value of attribute processed_source. - # - # source://rubocop//lib/rubocop/cop/base.rb#43 - def processed_source; end - - # Called between investigations - # - # @api private - # - # source://rubocop//lib/rubocop/cop/base.rb#306 - def ready; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/base.rb#286 - def relevant_file?(file); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/base.rb#282 - def string_literals_frozen_by_default?; end - - # Returns a gems locked versions (i.e. from Gemfile.lock or gems.locked) - # - # source://rubocop//lib/rubocop/cop/base.rb#266 - def target_gem_version(gem_name); end - - # source://rubocop//lib/rubocop/cop/base.rb#274 - def target_rails_version; end - - # source://rubocop//lib/rubocop/cop/base.rb#260 - def target_ruby_version; end - - private - - # source://rubocop//lib/rubocop/cop/base.rb#485 - def annotate(message); end - - # source://rubocop//lib/rubocop/cop/base.rb#379 - def apply_correction(corrector); end - - # @return [Symbol] offense status - # - # source://rubocop//lib/rubocop/cop/base.rb#449 - def attempt_correction(range, corrector); end - - # Reserved for Cop::Cop - # - # source://rubocop//lib/rubocop/cop/base.rb#375 - def callback_argument(range); end - - # Called to complete an investigation - # - # source://rubocop//lib/rubocop/cop/base.rb#408 - def complete_investigation; end - - # @return [Symbol, Corrector] offense status - # - # source://rubocop//lib/rubocop/cop/base.rb#423 - def correct(range); end - - # source://rubocop//lib/rubocop/cop/base.rb#393 - def current_corrector; end - - # Reserved for Commissioner: - # - # source://rubocop//lib/rubocop/cop/base.rb#385 - def current_offense_locations; end - - # source://rubocop//lib/rubocop/cop/base.rb#397 - def current_offenses; end - - # source://rubocop//lib/rubocop/cop/base.rb#389 - def currently_disabled_lines; end - - # source://rubocop//lib/rubocop/cop/base.rb#513 - def custom_severity; end - - # source://rubocop//lib/rubocop/cop/base.rb#509 - def default_severity; end - - # source://rubocop//lib/rubocop/cop/base.rb#463 - def disable_uncorrectable(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/base.rb#499 - def enabled_line?(line_number); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/base.rb#491 - def file_name_matches_any?(file, parameter, default_result); end - - # source://rubocop//lib/rubocop/cop/base.rb#481 - def find_message(range, message); end - - # source://rubocop//lib/rubocop/cop/base.rb#505 - def find_severity(_range, severity); end - - # source://rubocop//lib/rubocop/cop/base.rb#526 - def range_for_original(range); end - - # source://rubocop//lib/rubocop/cop/base.rb#470 - def range_from_node_or_range(node_or_range); end - - # Actually private methods - # - # source://rubocop//lib/rubocop/cop/base.rb#418 - def reset_investigation; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/base.rb#534 - def target_satisfies_all_gem_version_requirements?; end - - # @return [Symbol] offense status - # - # source://rubocop//lib/rubocop/cop/base.rb#438 - def use_corrector(range, corrector); end - - class << self - # List of cops that should not try to autocorrect at the same - # time as this cop - # - # @api public - # @return [Array] - # - # source://rubocop//lib/rubocop/cop/base.rb#59 - def autocorrect_incompatible_with; end - - # Naming - # - # source://rubocop//lib/rubocop/cop/base.rb#93 - def badge; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/base.rb#329 - def callbacks_needed; end - - # source://rubocop//lib/rubocop/cop/base.rb#97 - def cop_name; end - - # source://rubocop//lib/rubocop/cop/base.rb#101 - def department; end - - # Returns a url to view this cops documentation online. - # Requires 'DocumentationBaseURL' to be set for your department. - # Will follow the convention of RuboCops own documentation structure, - # overwrite this method to accommodate your custom layout. - # - # @api public - # @return [String, nil] - # - # source://rubocop//lib/rubocop/cop/base.rb#70 - def documentation_url(config = T.unsafe(nil)); end - - # Call for abstract Cop classes - # - # source://rubocop//lib/rubocop/cop/base.rb#81 - def exclude_from_registry; end - - # Returns the value of attribute gem_requirements. - # - # source://rubocop//lib/rubocop/cop/base.rb#138 - def gem_requirements; end - - # @private - # - # source://rubocop//lib/rubocop/cop/base.rb#74 - def inherited(subclass); end - - # Override and return the Force class(es) you need to join - # - # source://rubocop//lib/rubocop/cop/base.rb#118 - def joining_forces; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/base.rb#105 - def lint?; end - - # Returns true if the cop name or the cop namespace matches any of the - # given names. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/base.rb#111 - def match?(given_names); end - - # Register a version requirement for the given gem name. - # This cop will be skipped unless the target satisfies *all* requirements. - # - # @api public - # @param gem_name [String] - # @param version_requirements [Array] The version requirements, - # using the same syntax as a Gemfile, e.g. ">= 1.2.3" - # - # If omitted, any version of the gem will be accepted. - # - # https://guides.rubygems.org/patterns/#declaring-dependencies - # - # source://rubocop//lib/rubocop/cop/base.rb#151 - def requires_gem(gem_name, *version_requirements); end - - # Returns if class supports autocorrect. - # It is recommended to extend AutoCorrector instead of overriding - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/base.rb#87 - def support_autocorrect?; end - - # Override if your cop should be called repeatedly for multiple investigations - # Between calls to `on_new_investigation` and `on_investigation_end`, - # the result of `processed_source` will remain constant. - # You should invalidate any caches that depend on the current `processed_source` - # in the `on_new_investigation` callback. - # If your cop does autocorrections, be aware that your instance may be called - # multiple times with the same `processed_source.path` but different content. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/base.rb#129 - def support_multiple_source?; end - - private - - # source://rubocop//lib/rubocop/cop/base.rb#401 - def restrict_on_send; end - end -end - -# source://rubocop//lib/rubocop/cop/base.rb#405 -RuboCop::Cop::Base::EMPTY_OFFENSES = T.let(T.unsafe(nil), Array) - -# Reports of an investigation. -# Immutable -# Consider creation API private -# -# source://rubocop//lib/rubocop/cop/base.rb#48 -class RuboCop::Cop::Base::InvestigationReport < ::Struct - # Returns the value of attribute cop - # - # @return [Object] the current value of cop - def cop; end - - # Sets the attribute cop - # - # @param value [Object] the value to set the attribute cop to. - # @return [Object] the newly set value - def cop=(_); end - - # Returns the value of attribute corrector - # - # @return [Object] the current value of corrector - def corrector; end - - # Sets the attribute corrector - # - # @param value [Object] the value to set the attribute corrector to. - # @return [Object] the newly set value - def corrector=(_); end - - # Returns the value of attribute offenses - # - # @return [Object] the current value of offenses - def offenses; end - - # Sets the attribute offenses - # - # @param value [Object] the value to set the attribute offenses to. - # @return [Object] the newly set value - def offenses=(_); end - - # Returns the value of attribute processed_source - # - # @return [Object] the current value of processed_source - def processed_source; end - - # Sets the attribute processed_source - # - # @param value [Object] the value to set the attribute processed_source to. - # @return [Object] the newly set value - def processed_source=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# List of methods names to restrict calls for `on_send` / `on_csend` -# -# source://rubocop//lib/rubocop/cop/base.rb#51 -RuboCop::Cop::Base::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) - -# source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#5 -module RuboCop::Cop::Bundler; end - -# A Gem's requirements should be listed only once in a Gemfile. -# -# @example -# # bad -# gem 'rubocop' -# gem 'rubocop' -# -# # bad -# group :development do -# gem 'rubocop' -# end -# -# group :test do -# gem 'rubocop' -# end -# -# # good -# group :development, :test do -# gem 'rubocop' -# end -# -# # good -# gem 'rubocop', groups: [:development, :test] -# -# # good - conditional declaration -# if Dir.exist?(local) -# gem 'rubocop', path: local -# elsif ENV['RUBOCOP_VERSION'] == 'master' -# gem 'rubocop', git: 'https://github.com/rubocop/rubocop.git' -# else -# gem 'rubocop', '~> 0.90.0' -# end -# -# 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#58 - def gem_declarations(param0); end - - # 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#67 - def conditional_declaration?(nodes); end - - # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#60 - def duplicated_gem_nodes; end - - # 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#75 - def within_conditional?(node, conditional_node); end -end - -# 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. -# -# The optional "OnlyFor" configuration array -# can be used to only register offenses when the gems -# use certain options or have version specifiers. -# -# When "version_specifiers" is included, a comment -# will be enforced if the gem has any version specifier. -# -# When "restrictive_version_specifiers" is included, a comment -# will be enforced if the gem has a version specifier that -# holds back the version of the gem. -# -# For any other value in the array, a comment will be enforced for -# a gem if an option by the same name is present. -# A useful use case is to enforce a comment when using -# options that change the source of a gem: -# -# - `bitbucket` -# - `gist` -# - `git` -# - `github` -# - `source` -# -# For a full list of options supported by bundler, -# see https://bundler.io/man/gemfile.5.html -# . -# -# @example OnlyFor: [] (default) -# # bad -# -# gem 'foo' -# -# # good -# -# # Helpers for the foo things. -# gem 'foo' -# @example OnlyFor: ['version_specifiers'] -# # bad -# -# gem 'foo', '< 2.1' -# -# # good -# -# # Version 2.1 introduces breaking change baz -# gem 'foo', '< 2.1' -# @example OnlyFor: ['restrictive_version_specifiers'] -# # bad -# -# gem 'foo', '< 2.1' -# -# # good -# -# gem 'foo', '>= 1.0' -# -# # Version 2.1 introduces breaking change baz -# gem 'foo', '< 2.1' -# @example OnlyFor: ['version_specifiers', 'github'] -# # bad -# -# gem 'foo', github: 'some_account/some_fork_of_foo' -# -# gem 'bar', '< 2.1' -# -# # good -# -# # Using this fork because baz -# gem 'foo', github: 'some_account/some_fork_of_foo' -# -# # Version 2.1 introduces breaking change baz -# gem 'bar', '< 2.1' -# -# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#83 -class RuboCop::Cop::Bundler::GemComment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::VisibilityHelp - include ::RuboCop::Cop::DefNode - include ::RuboCop::Cop::GemDeclaration - - # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#94 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#135 - def checked_options_present?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#109 - def commented?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#105 - def commented_any_descendant?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#159 - def contains_checked_options?(node); end - - # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#163 - def gem_options(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#130 - def ignored_gem?(node); end - - # The args node1 & node2 may represent a RuboCop::AST::Node - # or a Parser::Source::Comment. Both respond to #loc. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#116 - def precede?(node1, node2); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#126 - def preceding_comment?(node1, node2); end - - # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#120 - def preceding_lines(node); end - - # Version specifications that restrict all updates going forward. This excludes versions - # like ">= 1.0" or "!= 2.0.3". - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#152 - def restrictive_version_specified_gem?(node); end - - # Besides the gem name, all other *positional* arguments to `gem` are version specifiers, - # as long as it has one we know there's at least one version specifier. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#145 - def version_specified_gem?(node); end -end - -# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#88 -RuboCop::Cop::Bundler::GemComment::CHECKED_OPTIONS_CONFIG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#87 -RuboCop::Cop::Bundler::GemComment::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#91 -RuboCop::Cop::Bundler::GemComment::RESTRICTIVE_VERSION_PATTERN = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#90 -RuboCop::Cop::Bundler::GemComment::RESTRICTIVE_VERSION_SPECIFIERS_OPTION = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#92 -RuboCop::Cop::Bundler::GemComment::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#89 -RuboCop::Cop::Bundler::GemComment::VERSION_SPECIFIERS_OPTION = T.let(T.unsafe(nil), String) - -# Verifies that a project contains Gemfile or gems.rb file and correct -# associated lock file based on the configuration. -# -# @example EnforcedStyle: Gemfile (default) -# # bad -# Project contains gems.rb and gems.locked files -# -# # bad -# Project contains Gemfile and gems.locked file -# -# # good -# Project contains Gemfile and Gemfile.lock -# @example EnforcedStyle: gems.rb -# # bad -# Project contains Gemfile and Gemfile.lock files -# -# # bad -# Project contains gems.rb and Gemfile.lock file -# -# # good -# Project contains gems.rb and gems.locked files -# -# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#28 -class RuboCop::Cop::Bundler::GemFilename < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#42 - def on_new_investigation; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#87 - def expected_gemfile?(basename); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#79 - def gemfile_offense?(basename); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#92 - def gemfile_required?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#83 - def gems_rb_offense?(basename); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#96 - def gems_rb_required?; end - - # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#57 - def register_gemfile_offense(file_path, basename); end - - # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#68 - def register_gems_rb_offense(file_path, basename); end - - # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#52 - def register_offense(file_path, basename); end -end - -# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#39 -RuboCop::Cop::Bundler::GemFilename::GEMFILE_FILES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#40 -RuboCop::Cop::Bundler::GemFilename::GEMS_RB_FILES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#35 -RuboCop::Cop::Bundler::GemFilename::MSG_GEMFILE_MISMATCHED = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#31 -RuboCop::Cop::Bundler::GemFilename::MSG_GEMFILE_REQUIRED = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#37 -RuboCop::Cop::Bundler::GemFilename::MSG_GEMS_RB_MISMATCHED = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#33 -RuboCop::Cop::Bundler::GemFilename::MSG_GEMS_RB_REQUIRED = T.let(T.unsafe(nil), String) - -# Enforce that Gem version specifications or a commit reference (branch, -# ref, or tag) are either required or forbidden. -# -# @example EnforcedStyle: required (default) -# # bad -# gem 'rubocop' -# -# # good -# gem 'rubocop', '~> 1.12' -# -# # good -# gem 'rubocop', '>= 1.10.0' -# -# # good -# gem 'rubocop', '>= 1.5.0', '< 1.10.0' -# -# # good -# gem 'rubocop', branch: 'feature-branch' -# -# # good -# gem 'rubocop', ref: '74b5bfbb2c4b6fd6cdbbc7254bd7084b36e0c85b' -# -# # good -# gem 'rubocop', tag: 'v1.17.0' -# @example EnforcedStyle: forbidden -# # good -# gem 'rubocop' -# -# # bad -# gem 'rubocop', '~> 1.12' -# -# # bad -# gem 'rubocop', '>= 1.10.0' -# -# # bad -# gem 'rubocop', '>= 1.5.0', '< 1.10.0' -# -# # bad -# gem 'rubocop', branch: 'feature-branch' -# -# # bad -# gem 'rubocop', ref: '74b5bfbb2c4b6fd6cdbbc7254bd7084b36e0c85b' -# -# # bad -# gem 'rubocop', tag: 'v1.17.0' -# -# source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#53 -class RuboCop::Cop::Bundler::GemVersion < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::GemDeclaration - - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#68 - def includes_commit_reference?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#63 - def includes_version_specification?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#72 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#86 - def allowed_gem?(node); end - - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#90 - def allowed_gems; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#112 - def forbidden_offense?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#118 - def forbidden_style?; end - - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#94 - def message(_range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#102 - def offense?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#106 - def required_offense?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#122 - def required_style?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#126 - def version_specification?(expression); end -end - -# source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#58 -RuboCop::Cop::Bundler::GemVersion::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#57 -RuboCop::Cop::Bundler::GemVersion::REQUIRED_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#59 -RuboCop::Cop::Bundler::GemVersion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#60 -RuboCop::Cop::Bundler::GemVersion::VERSION_SPECIFICATION_REGEX = T.let(T.unsafe(nil), Regexp) - -# Passing symbol arguments to `source` (e.g. `source :rubygems`) is -# deprecated because they default to using HTTP requests. Instead, specify -# `'https://rubygems.org'` if possible, or `'http://rubygems.org'` if not. -# -# When autocorrecting, this cop will replace symbol arguments with -# `'https://rubygems.org'`. -# -# This cop will not replace existing sources that use `http://`. This may -# be necessary where HTTPS is not available. For example, where using an -# internal gem server via an intranet, or where HTTPS is prohibited. -# However, you should strongly prefer `https://` where possible, as it is -# more secure. -# -# If you don't allow `http://`, please set `false` to `AllowHttpProtocol`. -# This option is `true` by default for safe autocorrection. -# -# @example -# # bad -# source :gemcutter -# source :rubygems -# source :rubyforge -# -# # good -# source 'https://rubygems.org' # strongly recommended -# @example AllowHttpProtocol: true (default) -# -# # good -# source 'http://rubygems.org' # use only if HTTPS is unavailable -# @example AllowHttpProtocol: false -# -# # bad -# source 'http://rubygems.org' -# -# source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#41 -class RuboCop::Cop::Bundler::InsecureProtocolSource < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#53 - def insecure_protocol_source?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#58 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#79 - def allow_http_protocol?; end -end - -# source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#44 -RuboCop::Cop::Bundler::InsecureProtocolSource::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#48 -RuboCop::Cop::Bundler::InsecureProtocolSource::MSG_HTTP_PROTOCOL = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#50 -RuboCop::Cop::Bundler::InsecureProtocolSource::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Gems should be alphabetically sorted within groups. -# -# @example -# # bad -# gem 'rubocop' -# gem 'rspec' -# -# # good -# gem 'rspec' -# gem 'rubocop' -# -# # good -# gem 'rubocop' -# -# gem 'rspec' -# @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#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#64 - def gem_declarations(param0); end - - # 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#57 - def previous_declaration(node); end -end - -# 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. -# -# source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#6 -module RuboCop::Cop::CheckAssignment - # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 - def on_and_asgn(node); end - - # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 - def on_casgn(node); end - - # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 - def on_cvasgn(node); end - - # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 - def on_gvasgn(node); end - - # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 - def on_ivasgn(node); end - - # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 - def on_lvasgn(node); end - - # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 - def on_masgn(node); end - - # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 - def on_op_asgn(node); end - - # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 - def on_or_asgn(node); end - - # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#19 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#27 - def extract_rhs(node); end - - class << self - # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#27 - def extract_rhs(node); end - end -end - -# This mixin detects collections that are safe to "break" -# by inserting new lines. This is useful for breaking -# up long lines. -# -# Let's look at hashes as an example: -# -# We know hash keys are safe to break across lines. We can add -# linebreaks into hashes on lines longer than the specified maximum. -# Then in further passes cops can clean up the multi-line hash. -# For example, say the maximum line length is as indicated below: -# -# | -# v -# {foo: "0000000000", bar: "0000000000", baz: "0000000000"} -# -# In a LineLength autocorrection pass, a line is added before -# the first key that exceeds the column limit: -# -# {foo: "0000000000", bar: "0000000000", -# baz: "0000000000"} -# -# In a MultilineHashKeyLineBreaks pass, lines are inserted -# before all keys: -# -# {foo: "0000000000", -# bar: "0000000000", -# baz: "0000000000"} -# -# Then in future passes FirstHashElementLineBreak, -# MultilineHashBraceLayout, and TrailingCommaInHashLiteral will -# manipulate as well until we get: -# -# { -# foo: "0000000000", -# bar: "0000000000", -# baz: "0000000000", -# } -# -# (Note: Passes may not happen exactly in this sequence.) -# -# source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#44 -module RuboCop::Cop::CheckLineBreakable - # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#45 - def extract_breakable_node(node, max); end - - private - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#202 - def all_on_same_line?(nodes); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#222 - def already_on_multiple_lines?(node); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#135 - def breakable_collection?(node, elements); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#228 - def chained_to_heredoc?(node); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#189 - def children_could_be_broken_up?(children); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#152 - def contained_by_breakable_collection_on_same_line?(node); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#172 - def contained_by_multiline_collection_that_could_be_broken_up?(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#62 - def extract_breakable_node_from_elements(node, elements, max); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#74 - def extract_first_element_over_column_limit(node, elements, max); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#94 - def first_argument_is_heredoc?(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#209 - def process_args(args); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#119 - def safe_to_ignore?(node); end - - # If a `send` or `csend` node contains a heredoc argument, splitting cannot happen - # after the heredoc or else it will cause a syntax error. - # - # @api private - # - # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#103 - def shift_elements_for_heredoc_arg(node, elements, index); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#114 - def within_column_limit?(element, max, line); end -end - -# Checks for code on multiple lines that could be rewritten on a single line -# without changing semantics or exceeding the `Max` parameter of `Layout/LineLength`. -# -# source://rubocop//lib/rubocop/cop/mixin/check_single_line_suitability.rb#7 -module RuboCop::Cop::CheckSingleLineSuitability - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/check_single_line_suitability.rb#8 - def suitable_as_single_line?(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/check_single_line_suitability.rb#34 - def comment_within?(node); end - - # source://rubocop//lib/rubocop/cop/mixin/check_single_line_suitability.rb#30 - def max_line_length; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/check_single_line_suitability.rb#42 - def safe_to_split?(node); end - - # source://rubocop//lib/rubocop/cop/mixin/check_single_line_suitability.rb#21 - def to_single_line(source); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/check_single_line_suitability.rb#16 - def too_long?(node); end -end - -# Common functionality for checking length of code segments. -# -# source://rubocop//lib/rubocop/cop/mixin/code_length.rb#6 -module RuboCop::Cop::CodeLength - extend ::RuboCop::ExcludeLimit - - # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 - def max=(value); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#49 - def build_code_length_calculator(node); end - - # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#31 - def check_code_length(node); end - - # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#27 - def count_as_one; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#23 - def count_comments?; end - - # Returns true for lines that shall not be included in the count. - # - # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#45 - def irrelevant_line(source_line); end - - # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#58 - def location(node); end - - # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#19 - def max_length; end - - # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#15 - def message(length, max_length); end -end - -# source://rubocop//lib/rubocop/cop/mixin/code_length.rb#9 -RuboCop::Cop::CodeLength::MSG = T.let(T.unsafe(nil), String) - -# Help methods for working with nodes containing comments. -# -# source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#6 -module RuboCop::Cop::CommentsHelp - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#27 - def comments_contain_disables?(node, cop_name); end - - # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#18 - def comments_in_range(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#14 - def contains_comments?(node); end - - # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#7 - def source_range_with_comment(node); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#46 - def begin_pos_with_comment(node); end - - # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#60 - def buffer; end - - # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#41 - def end_position_for(node); end - - # Returns the end line of a node, which might be a comment and not part of the AST - # End line is considered either the line at which another node starts, or - # the line at which the parent node ends. - # - # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#68 - def find_end_line(node); end - - # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#56 - def start_line_position(node); end -end - -# Commissioner class is responsible for processing the AST and delegating -# work to the specified cops. -# -# source://rubocop//lib/rubocop/cop/commissioner.rb#7 -class RuboCop::Cop::Commissioner - include ::RuboCop::AST::Traversal - - # @return [Commissioner] a new instance of Commissioner - # - # source://rubocop//lib/rubocop/cop/commissioner.rb#44 - def initialize(cops, forces = T.unsafe(nil), options = T.unsafe(nil)); end - - # Returns the value of attribute errors. - # - # source://rubocop//lib/rubocop/cop/commissioner.rb#42 - def errors; end - - # @return [InvestigationReport] - # - # source://rubocop//lib/rubocop/cop/commissioner.rb#79 - def investigate(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on___ENCODING__(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on___FILE__(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on___LINE__(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_alias(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_and(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_and_asgn(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_arg(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_arg_expr(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_args(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_array(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_array_pattern(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_array_pattern_with_tail(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_back_ref(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_begin(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_block_pass(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_blockarg(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_break(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_case(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_case_match(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_casgn(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_cbase(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_complex(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_const(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_const_pattern(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_cvar(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_cvasgn(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_defined?(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_dstr(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_dsym(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_eflipflop(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_empty_else(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_ensure(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_erange(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_false(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_find_pattern(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_float(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_for(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_forward_arg(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_forward_args(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_forwarded_args(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_forwarded_kwrestarg(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_forwarded_restarg(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_gvar(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_gvasgn(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_hash(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_hash_pattern(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_if_guard(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_iflipflop(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_in_match(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_in_pattern(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_index(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_indexasgn(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_int(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_irange(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_itblock(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_ivar(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_ivasgn(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_kwarg(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_kwargs(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_kwbegin(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_kwnilarg(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_kwoptarg(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_kwrestarg(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_kwsplat(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_lambda(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_lvar(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_lvasgn(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_masgn(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_match_alt(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_match_as(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_match_current_line(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_match_nil_pattern(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_match_pattern(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_match_pattern_p(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_match_rest(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_match_var(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_match_with_lvasgn(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_match_with_trailing_comma(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_mlhs(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_module(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_next(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_nil(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_not(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_nth_ref(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_op_asgn(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_optarg(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_or(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_or_asgn(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_pair(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_pin(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_postexe(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_preexe(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_procarg0(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_rational(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_redo(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_regexp(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_regopt(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_resbody(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_rescue(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_restarg(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_retry(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_return(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_sclass(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_self(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_shadowarg(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_splat(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_str(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_super(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_sym(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_true(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_undef(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_unless_guard(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_until_post(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_when(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_while(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_while_post(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_xstr(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_yield(node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#68 - def on_zsuper(node); end - - private - - # source://rubocop//lib/rubocop/cop/commissioner.rb#98 - def begin_investigation(processed_source, offset:, original:); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#121 - def build_callbacks(cops); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#116 - def initialize_callbacks; end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#159 - def invoke(callback, cops); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#163 - def invoke_with_argument(callback, cops, arg); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#112 - def reset; end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#131 - def restrict_callbacks(callbacks); end - - # NOTE: mutates `callbacks` in place - # - # source://rubocop//lib/rubocop/cop/commissioner.rb#149 - def restricted_map(callbacks); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#104 - def trigger_responding_cops(callback, node); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#139 - def trigger_restricted_cops(event, node); end - - # Allow blind rescues here, since we're absorbing and packaging or - # re-raising exceptions that can be raised from within the individual - # cops' `#investigate` methods. - # - # source://rubocop//lib/rubocop/cop/commissioner.rb#170 - def with_cop_error_handling(cop, node = T.unsafe(nil)); end -end - -# How a Commissioner returns the results of the investigation -# as a list of Cop::InvestigationReport and any errors caught -# during the investigation. -# Immutable -# Consider creation API private -# -# source://rubocop//lib/rubocop/cop/commissioner.rb#18 -class RuboCop::Cop::Commissioner::InvestigationReport < ::Struct - # Returns the value of attribute cop_reports - # - # @return [Object] the current value of cop_reports - def cop_reports; end - - # Sets the attribute cop_reports - # - # @param value [Object] the value to set the attribute cop_reports to. - # @return [Object] the newly set value - def cop_reports=(_); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#19 - def cops; end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#27 - def correctors; end - - # Returns the value of attribute errors - # - # @return [Object] the current value of errors - def errors; end - - # Sets the attribute errors - # - # @param value [Object] the value to set the attribute errors to. - # @return [Object] the newly set value - def errors=(_); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#35 - def merge(investigation); end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#31 - def offenses; end - - # source://rubocop//lib/rubocop/cop/commissioner.rb#23 - def offenses_per_cop; end - - # Returns the value of attribute processed_source - # - # @return [Object] the current value of processed_source - def processed_source; end - - # Sets the attribute processed_source - # - # @param value [Object] the value to set the attribute processed_source to. - # @return [Object] the newly set value - def processed_source=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://rubocop//lib/rubocop/cop/commissioner.rb#10 -RuboCop::Cop::Commissioner::RESTRICTED_CALLBACKS = T.let(T.unsafe(nil), Array) - -# This class does condition autocorrection -# -# source://rubocop//lib/rubocop/cop/correctors/condition_corrector.rb#6 -class RuboCop::Cop::ConditionCorrector - class << self - # source://rubocop//lib/rubocop/cop/correctors/condition_corrector.rb#8 - def correct_negative_condition(corrector, node); end - - private - - # source://rubocop//lib/rubocop/cop/correctors/condition_corrector.rb#17 - def negated_condition(node); end - end -end - -# Handles `EnforcedStyle` configuration parameters. -# -# source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#6 -module RuboCop::Cop::ConfigurableEnforcedStyle - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#88 - def alternative_style; end - - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#96 - def alternative_styles; end - - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#19 - def ambiguous_style_detected(*possibilities); end - - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#60 - def conflicting_styles_detected; end - - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#11 - def correct_style_detected; end - - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#64 - def detected_style; end - - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#68 - def detected_style=(style); end - - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#60 - def no_acceptable_style!; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#56 - def no_acceptable_style?; end - - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#7 - def opposite_style_detected; end - - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#79 - def style; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#75 - def style_configured?; end - - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#29 - def style_detected(detected); end - - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#107 - def style_parameter_name; end - - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#100 - def supported_styles; end - - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#15 - def unexpected_style_detected(unexpected); end - - # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#60 - def unrecognized_style_detected; end -end - -# source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#23 -RuboCop::Cop::ConfigurableEnforcedStyle::SYMBOL_TO_STRING_CACHE = T.let(T.unsafe(nil), Hash) - -# Shared functionality between mixins that enforce naming conventions -# -# source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#6 -module RuboCop::Cop::ConfigurableFormatting - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - # source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#9 - def check_name(node, name, name_range); end - - # A class emitter method is a singleton method in a class/module, where - # the method has the same name as a class defined in the class/module. - # - # @return [Boolean] - # - # 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 - def report_opposing_styles(node, name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#24 - def valid_name?(node, name, given_style = T.unsafe(nil)); end -end - -# Handles `Max` configuration parameters, especially setting them to an -# appropriate value with --auto-gen-config. -# -# @deprecated Use `exclude_limit ` instead. -# -# source://rubocop//lib/rubocop/cop/mixin/configurable_max.rb#8 -module RuboCop::Cop::ConfigurableMax - private - - # source://rubocop//lib/rubocop/cop/mixin/configurable_max.rb#11 - def max=(value); end - - # source://rubocop//lib/rubocop/cop/mixin/configurable_max.rb#23 - def max_parameter_name; end -end - -# This module provides functionality for checking if names match the -# configured EnforcedStyle. -# -# source://rubocop//lib/rubocop/cop/mixin/configurable_naming.rb#7 -module RuboCop::Cop::ConfigurableNaming - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::ConfigurableFormatting -end - -# source://rubocop//lib/rubocop/cop/mixin/configurable_naming.rb#10 -RuboCop::Cop::ConfigurableNaming::FORMATS = T.let(T.unsafe(nil), Hash) - -# This module provides functionality for checking if numbering match the -# configured EnforcedStyle. -# -# source://rubocop//lib/rubocop/cop/mixin/configurable_numbering.rb#7 -module RuboCop::Cop::ConfigurableNumbering - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::ConfigurableFormatting -end - -# source://rubocop//lib/rubocop/cop/mixin/configurable_numbering.rb#11 -RuboCop::Cop::ConfigurableNumbering::FORMATS = T.let(T.unsafe(nil), Hash) - -# Monkey-patch Cop for tests to provide easy access to messages and -# highlights. -# -# source://rubocop//lib/rubocop/cop/cop.rb#11 -class RuboCop::Cop::Cop < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/cop.rb#73 - def add_offense(node_or_range, location: T.unsafe(nil), message: T.unsafe(nil), severity: T.unsafe(nil), &block); end - - # Called before any investigation - # - # @api private - # - # source://rubocop//lib/rubocop/cop/cop.rb#129 - def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end - - # @deprecated - # - # source://rubocop//lib/rubocop/cop/cop.rb#105 - def corrections; end - - # source://rubocop//lib/rubocop/cop/cop.rb#90 - def find_location(node, loc); end - - # Returns the value of attribute offenses. - # - # source://rubocop//lib/rubocop/cop/cop.rb#12 - def offenses; end - - # Called after all on_... have been called - # - # source://rubocop//lib/rubocop/cop/cop.rb#122 - def on_investigation_end; end - - # Called before all on_... have been called - # - # source://rubocop//lib/rubocop/cop/cop.rb#116 - def on_new_investigation; end - - # @deprecated Use class method - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/cop.rb#96 - def support_autocorrect?; end - - private - - # source://rubocop//lib/rubocop/cop/cop.rb#147 - def apply_correction(corrector); end - - # Override Base - # - # source://rubocop//lib/rubocop/cop/cop.rb#143 - def callback_argument(_range); end - - # source://rubocop//lib/rubocop/cop/cop.rb#164 - def correction_lambda; end - - # source://rubocop//lib/rubocop/cop/cop.rb#170 - def dedupe_on_node(node); end - - # Just for legacy - # - # @yield [corrector] - # - # source://rubocop//lib/rubocop/cop/cop.rb#152 - def emulate_v0_callsequence(corrector); end - - # source://rubocop//lib/rubocop/cop/cop.rb#183 - def range_for_original(range); end - - # source://rubocop//lib/rubocop/cop/cop.rb#177 - def suppress_clobbering; end - - class << self - # @deprecated Use Registry.all - # - # source://rubocop//lib/rubocop/cop/cop.rb#56 - def all; end - - # @private - # - # source://rubocop//lib/rubocop/cop/cop.rb#25 - def inherited(_subclass); end - - # source://rubocop//lib/rubocop/cop/cop.rb#37 - def joining_forces; end - - # @deprecated Use Registry.qualified_cop_name - # - # source://rubocop//lib/rubocop/cop/cop.rb#65 - def qualified_cop_name(name, origin); end - - # @deprecated Use Registry.global - # - # source://rubocop//lib/rubocop/cop/cop.rb#47 - def registry; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/cop.rb#33 - def support_autocorrect?; end - end -end - -# @deprecated -# -# source://rubocop//lib/rubocop/cop/cop.rb#17 -class RuboCop::Cop::Cop::Correction < ::Struct - # source://rubocop//lib/rubocop/cop/cop.rb#18 - def call(corrector); end - - # Returns the value of attribute cop - # - # @return [Object] the current value of cop - def cop; end - - # Sets the attribute cop - # - # @param value [Object] the value to set the attribute cop to. - # @return [Object] the newly set value - def cop=(_); end - - # Returns the value of attribute lambda - # - # @return [Object] the current value of lambda - def lambda; end - - # Sets the attribute lambda - # - # @param value [Object] the value to set the attribute lambda to. - # @return [Object] the newly set value - def lambda=(_); end - - # Returns the value of attribute node - # - # @return [Object] the current value of node - def node; end - - # Sets the attribute node - # - # @param value [Object] the value to set the attribute node to. - # @return [Object] the newly set value - def node=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# This class takes a source buffer and rewrite its source -# based on the different correction rules supplied. -# -# Important! -# The nodes modified by the corrections should be part of the -# AST of the source_buffer. -# -# source://rubocop//lib/rubocop/cop/corrector.rb#11 -class RuboCop::Cop::Corrector < ::Parser::Source::TreeRewriter - # corrector = Corrector.new(cop) - # - # @param source [Parser::Source::Buffer, or anything - # leading to one via `(processed_source.)buffer`] - # @return [Corrector] a new instance of Corrector - # - # source://rubocop//lib/rubocop/cop/corrector.rb#32 - def initialize(source); end - - # Removes `size` characters from the beginning of the given range. - # If `size` is greater than the size of `range`, the removed region can - # overrun the end of `range`. - # - # @param range [Parser::Source::Range, RuboCop::AST::Node] or node - # @param size [Integer] - # - # source://rubocop//lib/rubocop/cop/corrector.rb#63 - def remove_leading(node_or_range, size); end - - # Removes `size` characters prior to the source range. - # - # @param range [Parser::Source::Range, RuboCop::AST::Node] or node - # @param size [Integer] - # - # source://rubocop//lib/rubocop/cop/corrector.rb#51 - def remove_preceding(node_or_range, size); end - - # Removes `size` characters from the end of the given range. - # If `size` is greater than the size of `range`, the removed region can - # overrun the beginning of `range`. - # - # @param range [Parser::Source::Range, RuboCop::AST::Node] or node - # @param size [Integer] - # - # source://rubocop//lib/rubocop/cop/corrector.rb#75 - def remove_trailing(node_or_range, size); end - - # Legacy - # - # source://parser/3.3.7.2/lib/parser/source/tree_rewriter.rb#252 - def rewrite; end - - # Swaps sources at the given ranges. - # - # @param node_or_range1 [Parser::Source::Range, RuboCop::AST::Node] - # @param node_or_range2 [Parser::Source::Range, RuboCop::AST::Node] - # - # source://rubocop//lib/rubocop/cop/corrector.rb#85 - def swap(node_or_range1, node_or_range2); end - - private - - # source://rubocop//lib/rubocop/cop/corrector.rb#119 - def check_range_validity(node_or_range); end - - # source://rubocop//lib/rubocop/cop/corrector.rb#104 - def to_range(node_or_range); end - - # source://rubocop//lib/rubocop/cop/corrector.rb#123 - def validate_buffer(buffer); end - - class << self - # Duck typing for get to a ::Parser::Source::Buffer - # - # source://rubocop//lib/rubocop/cop/corrector.rb#15 - def source_buffer(source); end - end -end - -# noop -# -# source://rubocop//lib/rubocop/cop/corrector.rb#12 -RuboCop::Cop::Corrector::NOOP_CONSUMER = T.let(T.unsafe(nil), Proc) - -# Common functionality for checking def nodes. -# -# source://rubocop//lib/rubocop/cop/mixin/def_node.rb#6 -module RuboCop::Cop::DefNode - include ::RuboCop::Cop::VisibilityHelp - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop//lib/rubocop/cop/mixin/def_node.rb#21 - def non_public_modifier?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/def_node.rb#12 - def non_public?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/def_node.rb#16 - def preceding_non_public_modifier?(node); end -end - -# Help methods for working with `Enumerable#dig` in cops. -# Used by `Style::DigChain` and `Style::SingleArgumentDig` -# -# source://rubocop//lib/rubocop/cop/mixin/dig_help.rb#7 -module RuboCop::Cop::DigHelp - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop//lib/rubocop/cop/mixin/dig_help.rb#11 - def dig?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/dig_help.rb#16 - def single_argument_dig?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/dig_help.rb#22 - def dig_chain_enabled?; end -end - -# Helpers for builtin documentation -# -# source://rubocop//lib/rubocop/cop/documentation.rb#6 -module RuboCop::Cop::Documentation - private - - # @api private - # - # source://rubocop//lib/rubocop/cop/documentation.rb#25 - def base_url_for(cop_class, config); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/documentation.rb#57 - def builtin?(cop_class); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/documentation.rb#47 - def default_base_url; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/documentation.rb#52 - def default_extension; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/documentation.rb#10 - def department_to_basename(department); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/documentation.rb#36 - def extension_for(cop_class, config); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/documentation.rb#15 - def url_for(cop_class, config = T.unsafe(nil)); end - - class << self - # @api private - # - # source://rubocop//lib/rubocop/cop/documentation.rb#25 - def base_url_for(cop_class, config); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/documentation.rb#57 - def builtin?(cop_class); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/documentation.rb#47 - def default_base_url; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/documentation.rb#52 - def default_extension; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/documentation.rb#10 - def department_to_basename(department); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/documentation.rb#36 - def extension_for(cop_class, config); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/documentation.rb#15 - def url_for(cop_class, config = T.unsafe(nil)); end - end -end - -# Common functionality for checking documentation. -# -# source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#6 -module RuboCop::Cop::DocumentationComment - extend ::RuboCop::AST::NodePattern::Macros - - private - - # source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#47 - def annotation_keywords; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#11 - def documentation_comment?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#39 - def interpreter_directive_comment?(comment); end - - # The args node1 & node2 may represent a RuboCop::AST::Node - # or a Parser::Source::Comment. Both respond to #loc. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#31 - def precede?(node1, node2); end - - # The args node1 & node2 may represent a RuboCop::AST::Node - # or a Parser::Source::Comment. Both respond to #loc. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#25 - def preceding_comment?(node1, node2); end - - # source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#35 - def preceding_lines(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#43 - def rubocop_directive_comment?(comment); end -end - -# Common functionality for dealing with duplication. -# -# source://rubocop//lib/rubocop/cop/mixin/duplication.rb#6 -module RuboCop::Cop::Duplication - private - - # Returns the consecutive duplicates, leaving out the first instance of - # the duplicated elements. - # - # @param collection [Array] an array to return consecutive duplicates for - # @return [Array] the consecutive duplicates - # - # source://rubocop//lib/rubocop/cop/mixin/duplication.rb#31 - def consecutive_duplicates(collection); end - - # Returns all duplicates, including the first instance of the duplicated - # elements. - # - # @param collection [Array] an array to return duplicates for - # @return [Array] all the duplicates - # - # source://rubocop//lib/rubocop/cop/mixin/duplication.rb#22 - def duplicates(collection); end - - # Whether the `collection` contains any duplicates. - # - # @param collection [Array] an array to check for duplicates - # @return [Boolean] whether the array contains any duplicates - # - # source://rubocop//lib/rubocop/cop/mixin/duplication.rb#13 - def duplicates?(collection); end - - # Returns a hash of grouped duplicates. The key will be the first - # instance of the element, and the value an `array` of the initial - # element and all duplicate instances. - # - # @param collection [Array] an array to group duplicates for - # @return [Array] the grouped duplicates - # - # source://rubocop//lib/rubocop/cop/mixin/duplication.rb#41 - def grouped_duplicates(collection); end -end - -# This class autocorrects `#each` enumeration to `for` iteration. -# -# source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#6 -class RuboCop::Cop::EachToForCorrector - extend ::RuboCop::AST::NodePattern::Macros - - # @return [EachToForCorrector] a new instance of EachToForCorrector - # - # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#12 - def initialize(block_node); end - - # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#18 - def call(corrector); end - - private - - # Returns the value of attribute argument_node. - # - # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#24 - def argument_node; end - - # Returns the value of attribute block_node. - # - # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#24 - def block_node; end - - # Returns the value of attribute collection_node. - # - # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#24 - def collection_node; end - - # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#26 - def correction; end - - # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#36 - def offending_range; end -end - -# source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#10 -RuboCop::Cop::EachToForCorrector::CORRECTION_WITHOUT_ARGUMENTS = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#9 -RuboCop::Cop::EachToForCorrector::CORRECTION_WITH_ARGUMENTS = T.let(T.unsafe(nil), String) - -# This class does empty line autocorrection -# -# source://rubocop//lib/rubocop/cop/correctors/empty_line_corrector.rb#6 -class RuboCop::Cop::EmptyLineCorrector - class << self - # source://rubocop//lib/rubocop/cop/correctors/empty_line_corrector.rb#8 - def correct(corrector, node); end - - # source://rubocop//lib/rubocop/cop/correctors/empty_line_corrector.rb#19 - def insert_before(corrector, node); end - end -end - -# Common code for empty parameter cops. -# -# source://rubocop//lib/rubocop/cop/mixin/empty_parameter.rb#6 -module RuboCop::Cop::EmptyParameter - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop//lib/rubocop/cop/mixin/empty_parameter.rb#12 - def empty_arguments?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/empty_parameter.rb#16 - def check(node); end -end - -# Functions for checking the alignment of the `end` keyword. -# -# source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#6 -module RuboCop::Cop::EndKeywordAlignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#60 - def accept_end_kw_alignment?(end_loc); end - - # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#50 - def add_offense_for_misalignment(node, align_with); end - - # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#19 - def check_end_kw_alignment(node, align_ranges); end - - # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#15 - def check_end_kw_in_node(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#75 - def line_break_before_keyword?(whole_expression, rhs); end - - # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#35 - def matching_ranges(end_loc, align_ranges); end - - # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#41 - def start_line_range(node); end - - # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#65 - def style_parameter_name; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#69 - def variable_alignment?(whole_expression, rhs, end_alignment_style); end -end - -# source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#10 -RuboCop::Cop::EndKeywordAlignment::MSG = T.let(T.unsafe(nil), String) - -# Common functionality for rewriting endless methods to normal method definitions -# -# source://rubocop//lib/rubocop/cop/mixin/endless_method_rewriter.rb#6 -module RuboCop::Cop::EndlessMethodRewriter - # source://rubocop//lib/rubocop/cop/mixin/endless_method_rewriter.rb#7 - def correct_to_multiline(corrector, node); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/endless_method_rewriter.rb#19 - def arguments(node, missing = T.unsafe(nil)); end -end - -# Common functionality for enforcing a specific superclass. -# -# IMPORTANT: RuboCop core depended on this module when it supported Rails department. -# Rails department has been extracted to RuboCop Rails gem. -# -# It will not be updated to `RuboCop::Cop::Base` v1 API to maintain compatibility -# with existing RuboCop Rails 2.8 or lower. -# -# @api private -# @deprecated This module is deprecated and will be removed by RuboCop 2.0. -# -# source://rubocop//lib/rubocop/cop/mixin/enforce_superclass.rb#15 -module RuboCop::Cop::EnforceSuperclass - # @api private - # - # source://rubocop//lib/rubocop/cop/mixin/enforce_superclass.rb#35 - def on_class(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/mixin/enforce_superclass.rb#39 - def on_send(node); end - - class << self - # @api private - # @private - # - # source://rubocop//lib/rubocop/cop/mixin/enforce_superclass.rb#16 - def included(base); end - end -end - -# Common functionality for checking for a line break before the first -# element in a multi-line collection. -# -# source://rubocop//lib/rubocop/cop/mixin/first_element_line_break.rb#7 -module RuboCop::Cop::FirstElementLineBreak - private - - # source://rubocop//lib/rubocop/cop/mixin/first_element_line_break.rb#23 - def check_children_line_break(node, children, start = T.unsafe(nil), ignore_last: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/first_element_line_break.rb#10 - def check_method_line_break(node, children, ignore_last: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/first_element_line_break.rb#37 - def first_by_line(nodes); end - - # source://rubocop//lib/rubocop/cop/mixin/first_element_line_break.rb#41 - def last_line(nodes, ignore_last:); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/first_element_line_break.rb#18 - def method_uses_parens?(node, limit); end -end - -# This class autocorrects `for` iteration to `#each` enumeration. -# -# source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#6 -class RuboCop::Cop::ForToEachCorrector - extend ::RuboCop::AST::NodePattern::Macros - - # @return [ForToEachCorrector] a new instance of ForToEachCorrector - # - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#11 - def initialize(for_node); end - - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#17 - def call(corrector); end - - private - - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#57 - def collection_end; end - - # Returns the value of attribute collection_node. - # - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#25 - def collection_node; end - - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#31 - def collection_source; end - - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#27 - def correction; end - - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#45 - def end_range; end - - # Returns the value of attribute for_node. - # - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#25 - def for_node; end - - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#53 - def keyword_begin; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#39 - def requires_parentheses?; end - - # Returns the value of attribute variable_node. - # - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#25 - def variable_node; end -end - -# source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#9 -RuboCop::Cop::ForToEachCorrector::CORRECTION = T.let(T.unsafe(nil), String) - -# A scaffold for concrete forces. -# -# source://rubocop//lib/rubocop/cop/force.rb#6 -class RuboCop::Cop::Force - # @return [Force] a new instance of Force - # - # source://rubocop//lib/rubocop/cop/force.rb#32 - def initialize(cops); end - - # Returns the value of attribute cops. - # - # source://rubocop//lib/rubocop/cop/force.rb#17 - def cops; end - - # source://rubocop//lib/rubocop/cop/force.rb#50 - def investigate(_processed_source); end - - # source://rubocop//lib/rubocop/cop/force.rb#36 - def name; end - - # source://rubocop//lib/rubocop/cop/force.rb#40 - def run_hook(method_name, *args); end - - class << self - # source://rubocop//lib/rubocop/cop/force.rb#19 - def all; end - - # source://rubocop//lib/rubocop/cop/force.rb#28 - def force_name; end - - # @private - # - # source://rubocop//lib/rubocop/cop/force.rb#23 - def inherited(subclass); end - end -end - -# @api private -# -# source://rubocop//lib/rubocop/cop/force.rb#8 -class RuboCop::Cop::Force::HookError < ::StandardError - # @api private - # @return [HookError] a new instance of HookError - # - # source://rubocop//lib/rubocop/cop/force.rb#11 - def initialize(joining_cop); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/force.rb#9 - def joining_cop; end -end - -# Common functionality for dealing with frozen string literals. -# -# source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#6 -module RuboCop::Cop::FrozenStringLiteral - private - - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#37 - def frozen_heredoc?(node); end - - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#21 - def frozen_string_literal?(node); end - - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#15 - def frozen_string_literal_comment_exists?; end - - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#78 - def frozen_string_literal_specified?; end - - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#72 - def frozen_string_literals_disabled?; end - - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#44 - def frozen_string_literals_enabled?; end - - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#88 - def leading_comment_lines; end - - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#84 - def leading_magic_comments; end - - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#37 - def uninterpolated_heredoc?(node); end - - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#31 - def uninterpolated_string?(node); end - - class << self - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#15 - def frozen_string_literal_comment_exists?; end - end -end - -# source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#10 -RuboCop::Cop::FrozenStringLiteral::FROZEN_STRING_LITERAL_ENABLED = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#9 -RuboCop::Cop::FrozenStringLiteral::FROZEN_STRING_LITERAL_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#11 -RuboCop::Cop::FrozenStringLiteral::FROZEN_STRING_LITERAL_TYPES_RUBY27 = T.let(T.unsafe(nil), Array) - -# Common functionality for checking gem declarations. -# -# source://rubocop//lib/rubocop/cop/mixin/gem_declaration.rb#6 -module RuboCop::Cop::GemDeclaration - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop//lib/rubocop/cop/mixin/gem_declaration.rb#10 - def gem_declaration?(param0 = T.unsafe(nil)); end -end - -# source://rubocop//lib/rubocop/cop/gemspec/add_runtime_dependency.rb#5 -module RuboCop::Cop::Gemspec; end - -# Prefer `add_dependency` over `add_runtime_dependency` as the latter is -# considered soft-deprecated. -# -# @example -# -# # bad -# Gem::Specification.new do |spec| -# spec.add_runtime_dependency('rubocop') -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.add_dependency('rubocop') -# end -# -# source://rubocop//lib/rubocop/cop/gemspec/add_runtime_dependency.rb#21 -class RuboCop::Cop::Gemspec::AddRuntimeDependency < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/gemspec/add_runtime_dependency.rb#28 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/gemspec/add_runtime_dependency.rb#24 -RuboCop::Cop::Gemspec::AddRuntimeDependency::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/gemspec/add_runtime_dependency.rb#26 -RuboCop::Cop::Gemspec::AddRuntimeDependency::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Enforce that gem dependency version specifications or a commit reference (branch, -# ref, or tag) are either required or forbidden. -# -# @example EnforcedStyle: required (default) -# -# # bad -# Gem::Specification.new do |spec| -# spec.add_dependency 'parser' -# end -# -# # bad -# Gem::Specification.new do |spec| -# spec.add_development_dependency 'parser' -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.add_dependency 'parser', '>= 2.3.3.1', '< 3.0' -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.add_development_dependency 'parser', '>= 2.3.3.1', '< 3.0' -# end -# @example EnforcedStyle: forbidden -# -# # bad -# Gem::Specification.new do |spec| -# spec.add_dependency 'parser', '>= 2.3.3.1', '< 3.0' -# end -# -# # bad -# Gem::Specification.new do |spec| -# spec.add_development_dependency 'parser', '>= 2.3.3.1', '< 3.0' -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.add_dependency 'parser' -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.add_development_dependency 'parser' -# end -# -# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#53 -class RuboCop::Cop::Gemspec::DependencyVersion < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::GemspecHelp - - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#67 - def add_dependency_method_declaration?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#78 - def includes_commit_reference?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#73 - def includes_version_specification?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#82 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#118 - def add_dependency_method?(method_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#96 - def allowed_gem?(node); end - - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#100 - def allowed_gems; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#132 - def forbidden_offense?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#138 - def forbidden_style?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#112 - def match_block_variable_name?(receiver_name); end - - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#104 - def message(_range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#122 - def offense?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#126 - def required_offense?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#142 - def required_style?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#146 - def version_specification?(expression); end -end - -# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#61 -RuboCop::Cop::Gemspec::DependencyVersion::ADD_DEPENDENCY_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#58 -RuboCop::Cop::Gemspec::DependencyVersion::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#57 -RuboCop::Cop::Gemspec::DependencyVersion::REQUIRED_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#64 -RuboCop::Cop::Gemspec::DependencyVersion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# 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 attributes are not set in a gemspec file. -# Removing deprecated attributes allows the user to receive smaller packed gems. -# -# @example -# -# # bad -# Gem::Specification.new do |spec| -# spec.name = 'your_cool_gem_name' -# spec.test_files = Dir.glob('test/**/*') -# end -# -# # bad -# Gem::Specification.new do |spec| -# spec.name = 'your_cool_gem_name' -# spec.test_files += Dir.glob('test/**/*') -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.name = 'your_cool_gem_name' -# end -# -# source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#28 -class RuboCop::Cop::Gemspec::DeprecatedAttributeAssignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#35 - def gem_specification(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#43 - def on_block(block_node); end - - private - - # source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#85 - def format_message_from; end - - # source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#63 - def node_and_method_name(node, attribute); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#71 - def use_deprecated_attributes?(node, block_parameter); end -end - -# source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#32 -RuboCop::Cop::Gemspec::DeprecatedAttributeAssignment::MSG = T.let(T.unsafe(nil), String) - -# Enforce that development dependencies for a gem are specified in -# `Gemfile`, rather than in the `gemspec` using -# `add_development_dependency`. Alternatively, using `EnforcedStyle: -# gemspec`, enforce that all dependencies are specified in `gemspec`, -# rather than in `Gemfile`. -# -# @example EnforcedStyle: Gemfile (default) -# # Specify runtime dependencies in your gemspec, -# # but all other dependencies in your Gemfile. -# -# # bad -# # example.gemspec -# s.add_development_dependency "foo" -# -# # good -# # Gemfile -# gem "foo" -# -# # good -# # gems.rb -# gem "foo" -# -# # good (with AllowedGems: ["bar"]) -# # example.gemspec -# s.add_development_dependency "bar" -# @example EnforcedStyle: gems.rb -# # Specify runtime dependencies in your gemspec, -# # but all other dependencies in your Gemfile. -# # -# # Identical to `EnforcedStyle: Gemfile`, but with a different error message. -# # Rely on Bundler/GemFilename to enforce the use of `Gemfile` vs `gems.rb`. -# -# # bad -# # example.gemspec -# s.add_development_dependency "foo" -# -# # good -# # Gemfile -# gem "foo" -# -# # good -# # gems.rb -# gem "foo" -# -# # good (with AllowedGems: ["bar"]) -# # example.gemspec -# s.add_development_dependency "bar" -# @example EnforcedStyle: gemspec -# # Specify all dependencies in your gemspec. -# -# # bad -# # Gemfile -# gem "foo" -# -# # good -# # example.gemspec -# s.add_development_dependency "foo" -# -# # good (with AllowedGems: ["bar"]) -# # Gemfile -# gem "bar" -# -# source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#70 -class RuboCop::Cop::Gemspec::DevelopmentDependencies < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - # source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#77 - def add_development_dependency?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#82 - def gem?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#86 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#97 - def forbidden_gem?(gem_name); end - - # source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#101 - def message(_range); end -end - -# source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#73 -RuboCop::Cop::Gemspec::DevelopmentDependencies::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#74 -RuboCop::Cop::Gemspec::DevelopmentDependencies::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# An attribute assignment method calls should be listed only once -# in a gemspec. -# -# Assigning to an attribute with the same name using `spec.foo =` will be -# an unintended usage. On the other hand, duplication of methods such -# as `spec.requirements`, `spec.add_runtime_dependency`, and others are -# permitted because it is the intended use of appending values. -# -# @example -# # bad -# Gem::Specification.new do |spec| -# spec.name = 'rubocop' -# spec.name = 'rubocop2' -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.name = 'rubocop' -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.requirements << 'libmagick, v6.0' -# spec.requirements << 'A good graphics card' -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.add_dependency('parallel', '~> 1.10') -# spec.add_dependency('parser', '>= 2.3.3.1', '< 3.0') -# end -# -# source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#37 -class RuboCop::Cop::Gemspec::DuplicatedAssignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::GemspecHelp - - # source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#45 - def assignment_method_declarations(param0); end - - # source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#50 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#68 - def duplicated_assignment_method_nodes; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#62 - def match_block_variable_name?(receiver_name); end - - # source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#76 - def register_offense(node, assignment, line_of_first_occurrence); end -end - -# source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#41 -RuboCop::Cop::Gemspec::DuplicatedAssignment::MSG = T.let(T.unsafe(nil), String) - -# Dependencies in the gemspec should be alphabetically sorted. -# -# @example -# # bad -# spec.add_dependency 'rubocop' -# spec.add_dependency 'rspec' -# -# # good -# spec.add_dependency 'rspec' -# spec.add_dependency 'rubocop' -# -# # good -# spec.add_dependency 'rubocop' -# -# spec.add_dependency 'rspec' -# -# # bad -# spec.add_development_dependency 'rubocop' -# spec.add_development_dependency 'rspec' -# -# # good -# spec.add_development_dependency 'rspec' -# spec.add_development_dependency 'rubocop' -# -# # good -# spec.add_development_dependency 'rubocop' -# -# spec.add_development_dependency 'rspec' -# -# # bad -# spec.add_runtime_dependency 'rubocop' -# spec.add_runtime_dependency 'rspec' -# -# # good -# spec.add_runtime_dependency 'rspec' -# spec.add_runtime_dependency 'rubocop' -# -# # good -# spec.add_runtime_dependency 'rubocop' -# -# spec.add_runtime_dependency 'rspec' -# @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#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#95 - def dependency_declarations(param0); end - - # 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#90 - def get_dependency_name(node); end - - # 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#65 -RuboCop::Cop::Gemspec::OrderedDependencies::MSG = T.let(T.unsafe(nil), String) - -# Requires a gemspec to have `rubygems_mfa_required` metadata set. -# -# This setting tells RubyGems that MFA (Multi-Factor Authentication) is -# required for accounts to be able perform privileged operations, such as -# (see RubyGems' documentation for the full list of privileged -# operations): -# -# * `gem push` -# * `gem yank` -# * `gem owner --add/remove` -# * adding or removing owners using gem ownership page -# -# This helps make your gem more secure, as users can be more -# confident that gem updates were pushed by maintainers. -# -# @example -# # bad -# Gem::Specification.new do |spec| -# # no `rubygems_mfa_required` metadata specified -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.metadata = { -# 'rubygems_mfa_required' => 'true' -# } -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.metadata['rubygems_mfa_required'] = 'true' -# end -# -# # bad -# Gem::Specification.new do |spec| -# spec.metadata = { -# 'rubygems_mfa_required' => 'false' -# } -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.metadata = { -# 'rubygems_mfa_required' => 'true' -# } -# end -# -# # bad -# Gem::Specification.new do |spec| -# spec.metadata['rubygems_mfa_required'] = 'false' -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.metadata['rubygems_mfa_required'] = 'true' -# end -# -# source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#63 -class RuboCop::Cop::Gemspec::RequireMFA < ::RuboCop::Cop::Base - include ::RuboCop::Cop::GemspecHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#70 - def metadata(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#87 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#78 - def rubygems_mfa_required(param0); end - - # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#83 - def true_string?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#115 - def autocorrect(corrector, node, block_var, metadata); end - - # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#139 - def change_value(corrector, value); end - - # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#125 - def correct_metadata(corrector, metadata); end - - # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#133 - def insert_mfa_required(corrector, node, block_var); end - - # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#108 - def mfa_value(metadata_value); end -end - -# source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#67 -RuboCop::Cop::Gemspec::RequireMFA::MSG = T.let(T.unsafe(nil), String) - -# Checks that `required_ruby_version` in a gemspec file is set to a valid -# value (non-blank) and matches `TargetRubyVersion` as set in RuboCop's -# configuration for the gem. -# -# This ensures that RuboCop is using the same Ruby version as the gem. -# -# @example -# # When `TargetRubyVersion` of .rubocop.yml is `2.5`. -# -# # bad -# Gem::Specification.new do |spec| -# # no `required_ruby_version` specified -# end -# -# # bad -# Gem::Specification.new do |spec| -# spec.required_ruby_version = '>= 2.4.0' -# end -# -# # bad -# Gem::Specification.new do |spec| -# spec.required_ruby_version = '>= 2.6.0' -# end -# -# # bad -# Gem::Specification.new do |spec| -# spec.required_ruby_version = '' -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.required_ruby_version = '>= 2.5.0' -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.required_ruby_version = '>= 2.5' -# end -# -# # accepted but not recommended -# Gem::Specification.new do |spec| -# spec.required_ruby_version = ['>= 2.5.0', '< 2.7.0'] -# end -# -# # accepted but not recommended, since -# # Ruby does not really follow semantic versioning -# Gem::Specification.new do |spec| -# spec.required_ruby_version = '~> 2.5' -# end -# -# source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#55 -class RuboCop::Cop::Gemspec::RequiredRubyVersion < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#68 - def defined_ruby_version(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#76 - def on_new_investigation; end - - # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#82 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#63 - def required_ruby_version?(param0); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#94 - def dynamic_version?(node); end - - # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#100 - def extract_ruby_version(required_ruby_version); end - - # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#118 - def not_equal_message(required_ruby_version, target_ruby_version); end -end - -# source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#60 -RuboCop::Cop::Gemspec::RequiredRubyVersion::MISSING_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#57 -RuboCop::Cop::Gemspec::RequiredRubyVersion::NOT_EQUAL_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#56 -RuboCop::Cop::Gemspec::RequiredRubyVersion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks that `RUBY_VERSION` constant is not used in gemspec. -# Using `RUBY_VERSION` is dangerous because value of the -# constant is determined by `rake release`. -# It's possible to have dependency based on ruby version used -# to execute `rake release` and not user's ruby version. -# -# @example -# -# # bad -# Gem::Specification.new do |spec| -# if RUBY_VERSION >= '3.0' -# spec.add_dependency 'gem_a' -# else -# spec.add_dependency 'gem_b' -# end -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.add_dependency 'gem_a' -# end -# -# source://rubocop//lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb#28 -class RuboCop::Cop::Gemspec::RubyVersionGlobalsUsage < ::RuboCop::Cop::Base - include ::RuboCop::Cop::GemspecHelp - - # source://rubocop//lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb#36 - def on_const(node); end - - # source://rubocop//lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb#34 - def ruby_version?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb#44 - def gem_spec_with_ruby_version?(node); end -end - -# source://rubocop//lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb#31 -RuboCop::Cop::Gemspec::RubyVersionGlobalsUsage::MSG = T.let(T.unsafe(nil), String) - -# Common functionality for checking gem declarations. -# -# source://rubocop//lib/rubocop/cop/mixin/gemspec_help.rb#6 -module RuboCop::Cop::GemspecHelp - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop//lib/rubocop/cop/mixin/gemspec_help.rb#20 - def gem_specification(param0); end - - # source://rubocop//lib/rubocop/cop/mixin/gemspec_help.rb#10 - def gem_specification?(param0 = T.unsafe(nil)); end -end - -# Source and spec generator for new cops -# -# This generator will take a cop name and generate a source file -# and spec file when given a valid qualified cop name. -# -# @api private -# -# source://rubocop//lib/rubocop/cop/generator.rb#10 -class RuboCop::Cop::Generator - # @api private - # @raise [ArgumentError] - # @return [Generator] a new instance of Generator - # - # source://rubocop//lib/rubocop/cop/generator.rb#119 - def initialize(name, output: T.unsafe(nil)); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/generator.rb#139 - def inject_config(config_file_path: T.unsafe(nil), version_added: T.unsafe(nil)); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/generator.rb#135 - def inject_require(root_file_path: T.unsafe(nil)); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/generator.rb#152 - def todo; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/generator.rb#127 - def write_source; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/generator.rb#131 - def write_spec; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/cop/generator.rb#166 - def badge; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/generator.rb#189 - def generate(template); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/generator.rb#181 - def generated_source; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/generator.rb#185 - def generated_spec; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/generator.rb#166 - def output; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/generator.rb#214 - def snake_case(camel_case_string); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/generator.rb#204 - def source_path; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/generator.rb#194 - def spec_path; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/generator.rb#168 - def write_unless_file_exists(path, contents); end -end - -# @api private -# -# source://rubocop//lib/rubocop/cop/generator.rb#115 -RuboCop::Cop::Generator::CONFIGURATION_ADDED_MESSAGE = T.let(T.unsafe(nil), String) - -# A class that injects a require directive into the root RuboCop file. -# It looks for other directives that require files in the same (cop) -# namespace and injects the provided one in alpha -# -# source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#9 -class RuboCop::Cop::Generator::ConfigurationInjector - # @return [ConfigurationInjector] a new instance of ConfigurationInjector - # - # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#17 - def initialize(configuration_file_path:, badge:, version_added: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#24 - def inject; end - - private - - # Returns the value of attribute badge. - # - # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#39 - def badge; end - - # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#41 - def configuration_entries; end - - # Returns the value of attribute configuration_file_path. - # - # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#39 - def configuration_file_path; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#59 - def cop_name_line?(yaml); end - - # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#49 - def find_target_line; end - - # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#45 - def new_configuration_entry; end - - # Returns the value of attribute output. - # - # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#39 - def output; end - - # Returns the value of attribute version_added. - # - # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#39 - def version_added; end -end - -# source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#10 -RuboCop::Cop::Generator::ConfigurationInjector::TEMPLATE = T.let(T.unsafe(nil), String) - -# A class that injects a require directive into the root RuboCop file. -# It looks for other directives that require files in the same (cop) -# namespace and injects the provided one in alpha -# -# source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#9 -class RuboCop::Cop::Generator::RequireFileInjector - # @return [RequireFileInjector] a new instance of RequireFileInjector - # - # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#12 - def initialize(source_path:, root_file_path:, output: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#19 - def inject; end - - private - - # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#64 - def injectable_require_directive; end - - # Returns the value of attribute output. - # - # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#29 - def output; end - - # Returns the value of attribute require_entries. - # - # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#29 - def require_entries; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#31 - def require_exists?; end - - # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#68 - def require_path; end - - # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#58 - def require_path_fragments(require_directive); end - - # Returns the value of attribute root_file_path. - # - # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#29 - def root_file_path; end - - # Returns the value of attribute source_path. - # - # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#29 - def source_path; end - - # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#39 - def target_line; end - - # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#35 - def updated_directives; end -end - -# source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#10 -RuboCop::Cop::Generator::RequireFileInjector::REQUIRE_PATH = T.let(T.unsafe(nil), Regexp) - -# @api private -# -# source://rubocop//lib/rubocop/cop/generator.rb#11 -RuboCop::Cop::Generator::SOURCE_TEMPLATE = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/cop/generator.rb#91 -RuboCop::Cop::Generator::SPEC_TEMPLATE = T.let(T.unsafe(nil), String) - -# Common functionality for checking hash alignment. -# -# source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#6 -module RuboCop::Cop::HashAlignmentStyles; end - -# Handles calculation of deltas when the enforced style is 'key'. -# -# source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#8 -class RuboCop::Cop::HashAlignmentStyles::KeyAlignment - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#9 - def checkable_layout?(_node); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#20 - def deltas(first_pair, current_pair); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#13 - def deltas_for_first_pair(first_pair, _node); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#34 - def separator_delta(pair); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#45 - def value_delta(pair); end -end - -# Handles calculation of deltas for `kwsplat` nodes. -# This is a special case that just ensures the kwsplat is aligned with the rest of the hash -# since a `kwsplat` does not have a key, separator or value. -# -# source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#145 -class RuboCop::Cop::HashAlignmentStyles::KeywordSplatAlignment - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#146 - def deltas(first_pair, current_pair); end -end - -# Handles calculation of deltas when the enforced style is 'separator'. -# -# source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#120 -class RuboCop::Cop::HashAlignmentStyles::SeparatorAlignment - include ::RuboCop::Cop::HashAlignmentStyles::ValueAlignment - - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#123 - def deltas_for_first_pair(*_nodes); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#133 - def hash_rocket_delta(first_pair, current_pair); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#129 - def key_delta(first_pair, current_pair); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#137 - def value_delta(first_pair, current_pair); end -end - -# Handles calculation of deltas when the enforced style is 'table'. -# -# source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#81 -class RuboCop::Cop::HashAlignmentStyles::TableAlignment - include ::RuboCop::Cop::HashAlignmentStyles::ValueAlignment - - # @return [TableAlignment] a new instance of TableAlignment - # - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#84 - def initialize; end - - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#88 - def deltas_for_first_pair(first_pair, node); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#106 - def hash_rocket_delta(first_pair, current_pair); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#102 - def key_delta(first_pair, current_pair); end - - # Returns the value of attribute max_key_width. - # - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#100 - def max_key_width; end - - # Sets the attribute max_key_width - # - # @param value the value to set the attribute max_key_width to. - # - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#100 - def max_key_width=(_arg0); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#110 - def value_delta(first_pair, current_pair); end -end - -# Common functionality for checking alignment of hash values. -# -# source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#56 -module RuboCop::Cop::HashAlignmentStyles::ValueAlignment - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#57 - def checkable_layout?(node); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#61 - def deltas(first_pair, current_pair); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#71 - def separator_delta(first_pair, current_pair, key_delta); end -end - -# This module checks for Ruby 3.1's hash value omission syntax. -# -# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#7 -module RuboCop::Cop::HashShorthandSyntax - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#32 - def on_hash_for_mixed_shorthand(hash_node); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#44 - def on_pair(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#144 - def brackets?(method_dispatch_node); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#174 - def breakdown_value_types_of_hash(hash_node); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#121 - def def_node_that_require_parentheses(node); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#203 - def each_omittable_value_pair(hash_value_type_breakdown, &block); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#199 - def each_omitted_value_pair(hash_value_type_breakdown, &block); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#99 - def enforced_shorthand_syntax; end - - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#136 - def find_ancestor_method_dispatch_node(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#186 - def hash_with_mixed_shorthand_syntax?(hash_value_type_breakdown); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#190 - 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#194 - def ignore_explicit_omissible_hash_shorthand_syntax?(hash_value_type_breakdown); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#93 - def ignore_hash_shorthand_syntax?(pair_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#87 - def ignore_mixed_hash_shorthand_syntax?(hash_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#159 - def last_expression?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#167 - def method_dispatch_as_argument?(method_dispatch_node); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#207 - def mixed_shorthand_syntax_check(hash_value_type_breakdown); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#223 - def no_mixed_shorthand_syntax_check(hash_value_type_breakdown); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#67 - def register_offense(node, message, replacement); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#103 - def require_hash_value?(hash_key_source, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#112 - def require_hash_value_for_around_hash_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#148 - def use_element_of_hash_literal_as_receiver?(ancestor, parent); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#153 - def use_modifier_form_without_parenthesized_method_call?(ancestor); end -end - -# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#12 -RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_EXPLICIT_VALUE_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#10 -RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_MSG_PREFIX = T.let(T.unsafe(nil), String) - -# 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#14 -class RuboCop::Cop::HashShorthandSyntax::DefNode < ::Struct - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#23 - def first_argument; end - - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#27 - def last_argument; end - - # Returns the value of attribute node - # - # @return [Object] the current value of node - def node; end - - # Sets the attribute node - # - # @param value [Object] the value to set the attribute node to. - # @return [Object] the newly set value - def node=(_); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#15 - def selector; end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#9 -RuboCop::Cop::HashShorthandSyntax::EXPLICIT_HASH_VALUE_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#8 -RuboCop::Cop::HashShorthandSyntax::OMIT_HASH_VALUE_MSG = T.let(T.unsafe(nil), String) - -# Common functionality for Style/HashExcept and Style/HashSlice cops. -# It registers an offense on methods with blocks that are equivalent -# to Hash#except or Hash#slice. -# -# source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#9 -module RuboCop::Cop::HashSubset - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#21 - def block_with_first_arg_check?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#36 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#36 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#181 - def decorate_source(value); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#189 - def except_key(node); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#168 - def except_key_source(key); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#160 - def extract_body_if_negated(body); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#59 - def extract_offense(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#69 - def extracts_hash_subset?(block); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#138 - def included?(body, negated); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#146 - def not_included?(body, negated); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#197 - def offense_range(node); end - - # @raise [NotImplementedError] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#55 - def preferred_method_name; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#95 - def range_include?(send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#150 - def safe_to_register_offense?(block, except_key); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#123 - def semantically_except_method?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#134 - def semantically_slice_method?(node); end - - # @raise [NotImplementedError] - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#51 - def semantically_subset_method?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#88 - def slices_key?(send_node, method, key_arg, value_arg); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#115 - def supported_subset_method?(method); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#107 - def using_value_variable?(send_node, value_arg); end -end - -# source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#16 -RuboCop::Cop::HashSubset::ACTIVE_SUPPORT_SUBSET_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#18 -RuboCop::Cop::HashSubset::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#13 -RuboCop::Cop::HashSubset::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#15 -RuboCop::Cop::HashSubset::SUBSET_METHODS = T.let(T.unsafe(nil), Array) - -# Common functionality for Style/HashTransformKeys and -# Style/HashTransformValues -# -# source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#7 -module RuboCop::Cop::HashTransformMethod - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#87 - def array_receiver?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#91 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#108 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#101 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#182 - def execute_correction(corrector, node, correction); end - - # @abstract - # @raise [NotImplementedError] - # @return [Captures] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#157 - def extract_captures(_match); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#134 - def handle_possible_offense(node, match, match_desc); end - - # @abstract - # @raise [NotImplementedError] - # @return [String] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#164 - def new_method_name; end - - # @abstract Implemented with `def_node_matcher` - # @raise [NotImplementedError] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#115 - def on_bad_each_with_object(_node); end - - # @abstract Implemented with `def_node_matcher` - # @raise [NotImplementedError] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#120 - def on_bad_hash_brackets_map(_node); end - - # @abstract Implemented with `def_node_matcher` - # @raise [NotImplementedError] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#125 - def on_bad_map_to_h(_node); end - - # @abstract Implemented with `def_node_matcher` - # @raise [NotImplementedError] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#130 - def on_bad_to_h(_node); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#168 - def prepare_correction(node); end -end - -# Internal helper class to hold autocorrect data -# -# source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#31 -class RuboCop::Cop::HashTransformMethod::Autocorrection < ::Struct - # Returns the value of attribute block_node - # - # @return [Object] the current value of block_node - def block_node; end - - # Sets the attribute block_node - # - # @param value [Object] the value to set the attribute block_node to. - # @return [Object] the newly set value - def block_node=(_); end - - # Returns the value of attribute leading - # - # @return [Object] the current value of leading - def leading; end - - # Sets the attribute leading - # - # @param value [Object] the value to set the attribute leading to. - # @return [Object] the newly set value - def leading=(_); end - - # Returns the value of attribute match - # - # @return [Object] the current value of match - def match; end - - # Sets the attribute match - # - # @param value [Object] the value to set the attribute match to. - # @return [Object] the newly set value - def match=(_); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#72 - def set_new_arg_name(transformed_argname, corrector); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#76 - def set_new_body_expression(transforming_body_expr, corrector); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#62 - def set_new_method_name(new_method_name, corrector); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#56 - def strip_prefix_and_suffix(node, corrector); end - - # Returns the value of attribute trailing - # - # @return [Object] the current value of trailing - def trailing; end - - # Sets the attribute trailing - # - # @param value [Object] the value to set the attribute trailing to. - # @return [Object] the newly set value - def trailing=(_); end - - class << self - def [](*_arg0); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#32 - def from_each_with_object(node, match); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#36 - def from_hash_brackets_map(node, match); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#40 - def from_map_to_h(node, match); end - - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#52 - def from_to_h(node, match); end - - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# Internal helper class to hold match data -# -# source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#13 -class RuboCop::Cop::HashTransformMethod::Captures < ::Struct - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#14 - def noop_transformation?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#19 - def transformation_uses_both_args?; end - - # Returns the value of attribute transformed_argname - # - # @return [Object] the current value of transformed_argname - def transformed_argname; end - - # Sets the attribute transformed_argname - # - # @param value [Object] the value to set the attribute transformed_argname to. - # @return [Object] the newly set value - def transformed_argname=(_); end - - # Returns the value of attribute transforming_body_expr - # - # @return [Object] the current value of transforming_body_expr - def transforming_body_expr; end - - # Sets the attribute transforming_body_expr - # - # @param value [Object] the value to set the attribute transforming_body_expr to. - # @return [Object] the newly set value - def transforming_body_expr=(_); end - - # Returns the value of attribute unchanged_body_expr - # - # @return [Object] the current value of unchanged_body_expr - def unchanged_body_expr; end - - # Sets the attribute unchanged_body_expr - # - # @param value [Object] the value to set the attribute unchanged_body_expr to. - # @return [Object] the newly set value - def unchanged_body_expr=(_); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#23 - def use_transformed_argname?; end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#10 -RuboCop::Cop::HashTransformMethod::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Common functionality for working with heredoc strings. -# -# source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#6 -module RuboCop::Cop::Heredoc - # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#9 - def on_dstr(node); end - - # @raise [NotImplementedError] - # - # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#17 - def on_heredoc(_node); end - - # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#9 - def on_str(node); end - - # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#9 - def on_xstr(node); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#28 - def delimiter_string(node); end - - # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#34 - def heredoc_type(node); end - - # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#23 - def indent_level(str); end -end - -# source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#7 -RuboCop::Cop::Heredoc::OPENING_DELIMITER = T.let(T.unsafe(nil), Regexp) - -# This class autocorrects `if...then` structures to a multiline `if` statement -# -# source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#6 -class RuboCop::Cop::IfThenCorrector - # @return [IfThenCorrector] a new instance of IfThenCorrector - # - # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#9 - def initialize(if_node, indentation: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#14 - def call(corrector); end - - private - - # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#50 - def branch_body_indentation; end - - # Returns the value of attribute if_node. - # - # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#20 - def if_node; end - - # Returns the value of attribute indentation. - # - # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#20 - def indentation; end - - # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#22 - def replacement(node = T.unsafe(nil), indentation = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#36 - def rewrite_else_branch(else_branch, indentation); end -end - -# source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#7 -RuboCop::Cop::IfThenCorrector::DEFAULT_INDENTATION_WIDTH = T.let(T.unsafe(nil), Integer) - -# @deprecated IgnoredMethods class has been replaced with AllowedMethods. -# -# source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#46 -RuboCop::Cop::IgnoredMethods = RuboCop::Cop::AllowedMethods - -# Handles adding and checking ignored nodes. -# -# source://rubocop//lib/rubocop/cop/ignored_node.rb#6 -module RuboCop::Cop::IgnoredNode - # source://rubocop//lib/rubocop/cop/ignored_node.rb#7 - def ignore_node(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/ignored_node.rb#24 - def ignored_node?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/ignored_node.rb#11 - def part_of_ignored_node?(node); end - - private - - # source://rubocop//lib/rubocop/cop/ignored_node.rb#31 - def ignored_nodes; end -end - -# @deprecated IgnoredPattern class has been replaced with AllowedPattern. -# -# source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#66 -RuboCop::Cop::IgnoredPattern = RuboCop::Cop::AllowedPattern - -# Common functionality for checking integer nodes. -# -# source://rubocop//lib/rubocop/cop/mixin/integer_node.rb#6 -module RuboCop::Cop::IntegerNode - private - - # source://rubocop//lib/rubocop/cop/mixin/integer_node.rb#9 - def integer_part(node); end -end - -# Common functionality for working with string interpolations. -# -# @abstract Subclasses are expected to implement {#on_interpolation}. -# -# source://rubocop//lib/rubocop/cop/mixin/interpolation.rb#8 -module RuboCop::Cop::Interpolation - # source://rubocop//lib/rubocop/cop/mixin/interpolation.rb#9 - def on_dstr(node); end - - # source://rubocop//lib/rubocop/cop/mixin/interpolation.rb#9 - def on_dsym(node); end - - # source://rubocop//lib/rubocop/cop/mixin/interpolation.rb#17 - def on_node_with_interpolations(node); end - - # source://rubocop//lib/rubocop/cop/mixin/interpolation.rb#9 - def on_regexp(node); end - - # source://rubocop//lib/rubocop/cop/mixin/interpolation.rb#9 - def on_xstr(node); end -end - -# This class autocorrects lambda literal to method notation. -# -# source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#6 -class RuboCop::Cop::LambdaLiteralToMethodCorrector - # @return [LambdaLiteralToMethodCorrector] a new instance of LambdaLiteralToMethodCorrector - # - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#7 - def initialize(block_node); end - - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#13 - def call(corrector); end - - private - - # @return [Boolean] - # - # 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#34 - def arguments; end - - # 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#98 - def arguments_end_pos; end - - # 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#106 - def block_end; end - - # Returns the value of attribute block_node. - # - # 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#59 - def insert_arguments(corrector); end - - # 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#88 - def lambda_arg_string; end - - # Returns the value of attribute method. - # - # 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#92 - def needs_separating_space?; end - - # 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#66 - def remove_leading_whitespace(corrector); end - - # 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#36 - def remove_unparenthesized_whitespace(corrector); end - - # 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#49 - def replace_selector(corrector); end - - # 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#134 - def separating_space?; end -end - -# source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#5 -module RuboCop::Cop::Layout; end - -# Bare access modifiers (those not applying to specific methods) should be -# indented as deep as method definitions, or as deep as the `class`/`module` -# keyword, depending on configuration. -# -# @example EnforcedStyle: indent (default) -# # bad -# class Plumbus -# private -# def smooth; end -# end -# -# # good -# class Plumbus -# private -# def smooth; end -# end -# @example EnforcedStyle: outdent -# # bad -# class Plumbus -# private -# def smooth; end -# end -# -# # good -# class Plumbus -# private -# def smooth; end -# end -# -# source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#35 -class RuboCop::Cop::Layout::AccessModifierIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#43 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#43 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#43 - def on_module(node); end - - # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#43 - def on_sclass(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#54 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#58 - def check_body(body, node); end - - # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#69 - def check_modifier(send_node, end_range); end - - # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#92 - def expected_indent_offset; end - - # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#88 - def message(range); end - - # An offset that is not expected, but correct if the configuration is - # changed. - # - # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#98 - def unexpected_indent_offset; end -end - -# source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#41 -RuboCop::Cop::Layout::AccessModifierIndentation::MSG = T.let(T.unsafe(nil), String) - -# Check that the arguments on a multi-line method call are aligned. -# -# @example EnforcedStyle: with_first_argument (default) -# # good -# -# foo :bar, -# :baz, -# key: value -# -# foo( -# :bar, -# :baz, -# key: value -# ) -# -# # bad -# -# foo :bar, -# :baz, -# key: value -# -# foo( -# :bar, -# :baz, -# key: value -# ) -# @example EnforcedStyle: with_fixed_indentation -# # good -# -# foo :bar, -# :baz, -# key: value -# -# # bad -# -# foo :bar, -# :baz, -# key: value -# -# source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#45 -class RuboCop::Cop::Layout::ArgumentAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#54 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#54 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#91 - def arguments_or_first_arg_pairs(node); end - - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#79 - def arguments_with_last_arg_pairs(node); end - - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#107 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#67 - def autocorrect_incompatible_with_other_cops?; end - - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#123 - def base_column(node, first_argument); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#143 - def enforce_hash_argument_with_separator?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#115 - def fixed_indentation?; end - - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#71 - def flattened_arguments(node); end - - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#111 - def message(_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#100 - def multiple_arguments?(node); end - - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#134 - def target_method_lineno(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#119 - def with_first_argument_style?; end -end - -# source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#49 -RuboCop::Cop::Layout::ArgumentAlignment::ALIGN_PARAMS_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#51 -RuboCop::Cop::Layout::ArgumentAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), String) - -# Check that the elements of a multi-line array literal are -# aligned. -# -# @example EnforcedStyle: with_first_element (default) -# # good -# -# array = [1, 2, 3, -# 4, 5, 6] -# array = ['run', -# 'forrest', -# 'run'] -# -# # bad -# -# array = [1, 2, 3, -# 4, 5, 6] -# array = ['run', -# 'forrest', -# 'run'] -# @example EnforcedStyle: with_fixed_indentation -# # good -# -# array = [1, 2, 3, -# 4, 5, 6] -# -# # bad -# -# array = [1, 2, 3, -# 4, 5, 6] -# -# source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#36 -class RuboCop::Cop::Layout::ArrayAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#46 - def on_array(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#55 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#67 - def base_column(node, args); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#63 - def fixed_indentation?; end - - # source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#59 - def message(_range); end - - # source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#78 - def target_method_lineno(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#40 -RuboCop::Cop::Layout::ArrayAlignment::ALIGN_ELEMENTS_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#43 -RuboCop::Cop::Layout::ArrayAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), String) - -# Checks the indentation of the first line of the -# right-hand-side of a multi-line assignment. -# -# The indentation of the remaining lines can be corrected with -# other cops such as `Layout/IndentationConsistency` and `Layout/EndAlignment`. -# -# @example -# # bad -# value = -# if foo -# 'bar' -# end -# -# # good -# value = -# if foo -# 'bar' -# end -# -# source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#25 -class RuboCop::Cop::Layout::AssignmentIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CheckAssignment - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - private - - # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#43 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#34 - def check_assignment(node, rhs); end - - # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#47 - def leftmost_multiple_assignment(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#30 -RuboCop::Cop::Layout::AssignmentIndentation::MSG = T.let(T.unsafe(nil), String) - -# Checks whether the end keyword of `begin` is aligned properly. -# -# Two modes are supported through the `EnforcedStyleAlignWith` configuration -# parameter. If it's set to `start_of_line` (which is the default), the -# `end` shall be aligned with the start of the line where the `begin` -# keyword is. If it's set to `begin`, the `end` shall be aligned with the -# `begin` keyword. -# -# `Layout/EndAlignment` cop aligns with keywords (e.g. `if`, `while`, `case`) -# by default. On the other hand, `||= begin` that this cop targets tends to -# align with the start of the line, it defaults to `EnforcedStyleAlignWith: start_of_line`. -# These style can be configured by each cop. -# -# @example EnforcedStyleAlignWith: start_of_line (default) -# # bad -# foo ||= begin -# do_something -# end -# -# # good -# foo ||= begin -# do_something -# end -# @example EnforcedStyleAlignWith: begin -# # bad -# foo ||= begin -# do_something -# end -# -# # good -# foo ||= begin -# do_something -# end -# -# source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#41 -class RuboCop::Cop::Layout::BeginEndAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::EndKeywordAlignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#47 - def on_kwbegin(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#62 - def alignment_node(node); end - - # source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#58 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#53 - def check_begin_alignment(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#45 -RuboCop::Cop::Layout::BeginEndAlignment::MSG = T.let(T.unsafe(nil), String) - -# Checks whether the end keywords are aligned properly for do -# end blocks. -# -# Three modes are supported through the `EnforcedStyleAlignWith` -# configuration parameter: -# -# `start_of_block` : the `end` shall be aligned with the -# start of the line where the `do` appeared. -# -# `start_of_line` : the `end` shall be aligned with the -# start of the line where the expression started. -# -# `either` (which is the default) : the `end` is allowed to be in either -# location. The autocorrect will default to `start_of_line`. -# -# @example EnforcedStyleAlignWith: either (default) -# # bad -# -# foo.bar -# .each do -# baz -# end -# -# # good -# -# foo.bar -# .each do -# baz -# end -# @example EnforcedStyleAlignWith: start_of_block -# # bad -# -# foo.bar -# .each do -# baz -# end -# -# # good -# -# foo.bar -# .each do -# baz -# end -# @example EnforcedStyleAlignWith: start_of_line -# # bad -# -# foo.bar -# .each do -# baz -# end -# -# # good -# -# foo.bar -# .each do -# baz -# end -# -# source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#66 -class RuboCop::Cop::Layout::BlockAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#74 - def block_end_align_target?(param0 = T.unsafe(nil), param1); end - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#85 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#85 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#91 - def style_parameter_name; end - - private - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#247 - def add_space_before(corrector, loc, delta); end - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#224 - def alt_start_msg(start_loc, source_line_column); end - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#146 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#97 - def block_end_align_target(node); end - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#115 - def check_block_alignment(start_node, block_node); end - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#197 - def compute_do_source_line_column(node, end_loc); end - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#239 - def compute_start_col(ancestor_node, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#111 - def disqualified_parent?(parent, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#107 - def end_align_target?(node, parent); end - - # In offense message, we want to show the assignment LHS rather than - # the entire assignment. - # - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#192 - def find_lhs_node(node); end - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#163 - def format_message(start_loc, end_loc, do_source_line_column, error_source_line_column); end - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#234 - def format_source_line_column(source_line_column); end - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#216 - def loc_to_source_line_column(loc); end - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#128 - def register_offense(block_node, start_loc, end_loc, do_source_line_column); end - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#251 - def remove_space_before(corrector, end_pos, delta); end - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#173 - def start_for_block_node(block_node); end - - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#180 - def start_for_line_node(block_node); end -end - -# source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#71 -RuboCop::Cop::Layout::BlockAlignment::MSG = T.let(T.unsafe(nil), String) - -# Checks whether the end statement of a do..end block -# is on its own line. -# -# @example -# # bad -# blah do |i| -# foo(i) end -# -# # good -# blah do |i| -# foo(i) -# end -# -# # bad -# blah { |i| -# foo(i) } -# -# # good -# blah { |i| -# foo(i) -# } -# -# source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#27 -class RuboCop::Cop::Layout::BlockEndNewline < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#33 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#33 - def on_numblock(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#66 - def last_heredoc_argument(node); end - - # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#62 - def message(node); end - - # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#76 - def offense_range(node); end - - # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#49 - def register_offense(node, offense_range); end -end - -# source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#31 -RuboCop::Cop::Layout::BlockEndNewline::MSG = T.let(T.unsafe(nil), String) - -# Checks how the `when` and ``in``s of a `case` expression -# are indented in relation to its `case` or `end` keyword. -# -# It will register a separate offense for each misaligned `when` and `in`. -# -# @example -# # If Layout/EndAlignment is set to keyword style (default) -# # *case* and *end* should always be aligned to same depth, -# # and therefore *when* should always be aligned to both - -# # regardless of configuration. -# -# # bad for all styles -# case n -# when 0 -# x * 2 -# else -# y / 3 -# end -# -# case n -# in pattern -# x * 2 -# else -# y / 3 -# end -# -# # good for all styles -# case n -# when 0 -# x * 2 -# else -# y / 3 -# end -# -# case n -# in pattern -# x * 2 -# else -# y / 3 -# end -# @example EnforcedStyle: case (default) -# # if EndAlignment is set to other style such as -# # start_of_line (as shown below), then *when* alignment -# # configuration does have an effect. -# -# # bad -# a = case n -# when 0 -# x * 2 -# else -# y / 3 -# end -# -# a = case n -# in pattern -# x * 2 -# else -# y / 3 -# end -# -# # good -# a = case n -# when 0 -# x * 2 -# else -# y / 3 -# end -# -# a = case n -# in pattern -# x * 2 -# else -# y / 3 -# end -# @example EnforcedStyle: end -# # bad -# a = case n -# when 0 -# x * 2 -# else -# y / 3 -# end -# -# a = case n -# in pattern -# x * 2 -# else -# y / 3 -# end -# -# # good -# a = case n -# when 0 -# x * 2 -# else -# y / 3 -# end -# -# a = case n -# in pattern -# x * 2 -# else -# y / 3 -# end -# -# source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#112 -class RuboCop::Cop::Layout::CaseIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#120 - def on_case(case_node); end - - # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#127 - def on_case_match(case_match_node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#193 - def base_column(case_node, base); end - - # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#150 - def check_when(when_node, branch_type); end - - # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#182 - def detect_incorrect_style(when_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#136 - def end_and_last_conditional_same_line?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#146 - def enforced_style_end?; end - - # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#169 - def incorrect_style(when_node, branch_type); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#161 - def indent_one_step?; end - - # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#165 - def indentation_width; end - - # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#207 - def replacement(node); end - - # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#200 - def whitespace_range(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#118 -RuboCop::Cop::Layout::CaseIndentation::MSG = T.let(T.unsafe(nil), String) - -# Checks if the code style follows the `ExpectedOrder` configuration: -# -# `Categories` allows us to map macro names into a category. -# -# Consider an example of code style that covers the following order: -# -# * Module inclusion (`include`, `prepend`, `extend`) -# * Constants -# * Associations (`has_one`, `has_many`) -# * Public attribute macros (`attr_accessor`, `attr_writer`, `attr_reader`) -# * Other macros (`validates`, `validate`) -# * Public class methods -# * Initializer -# * Public instance methods -# * Protected attribute macros (`attr_accessor`, `attr_writer`, `attr_reader`) -# * Protected instance methods -# * Private attribute macros (`attr_accessor`, `attr_writer`, `attr_reader`) -# * Private instance methods -# -# You can configure the following order: -# -# [source,yaml] -# ---- -# Layout/ClassStructure: -# ExpectedOrder: -# - module_inclusion -# - constants -# - association -# - public_attribute_macros -# - public_delegate -# - macros -# - public_class_methods -# - initializer -# - public_methods -# - protected_attribute_macros -# - protected_methods -# - private_attribute_macros -# - private_delegate -# - private_methods -# ---- -# -# Instead of putting all literals in the expected order, is also -# possible to group categories of macros. Visibility levels are handled -# automatically. -# -# [source,yaml] -# ---- -# Layout/ClassStructure: -# Categories: -# association: -# - has_many -# - has_one -# attribute_macros: -# - attr_accessor -# - attr_reader -# - attr_writer -# macros: -# - validates -# - validate -# module_inclusion: -# - include -# - prepend -# - extend -# ---- -# -# @example -# # bad -# # Expect extend be before constant -# class Person < ApplicationRecord -# has_many :orders -# ANSWER = 42 -# -# extend SomeModule -# include AnotherModule -# end -# -# # good -# class Person -# # extend and include go first -# extend SomeModule -# include AnotherModule -# -# # inner classes -# CustomError = Class.new(StandardError) -# -# # constants are next -# SOME_CONSTANT = 20 -# -# # afterwards we have public attribute macros -# attr_reader :name -# -# # followed by other macros (if any) -# validates :name -# -# # then we have public delegate macros -# delegate :to_s, to: :name -# -# # public class methods are next in line -# def self.some_method -# end -# -# # initialization goes between class methods and instance methods -# def initialize -# end -# -# # followed by other public instance methods -# def some_method -# end -# -# # protected attribute macros and methods go next -# protected -# -# attr_reader :protected_name -# -# def some_protected_method -# end -# -# # private attribute macros, delegate macros and methods -# # are grouped near the end -# private -# -# attr_reader :private_name -# -# delegate :some_private_delegate, to: :name -# -# def some_private_method -# end -# end -# -# 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 - extend ::RuboCop::Cop::AutoCorrector - - # 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_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#174 - def autocorrect(corrector, node); end - - # 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#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#340 - def categories; end - - # 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} - # - # @param node to be analysed - # @return String when the node type is a `:block` then - # {classify} recursively with the first children - # @return String when the node type is a `:send` then {find_category} - # by method name - # @return String otherwise trying to {humanize_node} of the current node - # - # 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#271 - def dynamic_constant?(node); end - - # 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#334 - def expected_order; end - - # Categorize a node according to the {expected_order} - # Try to match {categories} values against the node's method_name given - # also its visibility. - # - # @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#212 - def find_category(node); end - - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#324 - def find_heredoc(node); end - - # 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#246 - def ignore?(node, classification); end - - # @return [Boolean] - # - # 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#289 - def marked_as_private_constant?(node, name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#279 - def private_constant?(node); end - - # 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#225 - def walk_over_nested_class_definition(class_node); end - - # @return [Boolean] - # - # 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#147 -RuboCop::Cop::Layout::ClassStructure::HUMANIZED_NODE_TYPE = T.let(T.unsafe(nil), Hash) - -# 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. -# -# @example -# -# # bad -# class Foo -# def bar -# <<~SQL -# 'Hi' -# SQL -# end -# end -# -# # good -# class Foo -# def bar -# <<~SQL -# 'Hi' -# SQL -# end -# end -# -# # bad -# -# # heredoc contents is before closing heredoc. -# foo arg, -# <<~EOS -# Hi -# EOS -# -# # good -# foo arg, -# <<~EOS -# Hi -# EOS -# -# # good -# foo arg, -# <<~EOS -# Hi -# EOS -# -# 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#57 - def on_heredoc(node); end - - private - - # @return [Boolean] - # - # 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#82 - def closing_indentation(node); end - - # 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#90 - def heredoc_closing(node); end - - # 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#117 - def indent_level(source_line); end - - # 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#109 - def message(node); end - - # 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#53 -RuboCop::Cop::Layout::ClosingHeredocIndentation::MSG = T.let(T.unsafe(nil), String) - -# 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#52 -RuboCop::Cop::Layout::ClosingHeredocIndentation::SIMPLE_HEREDOC = T.let(T.unsafe(nil), String) - -# Checks the indentation of hanging closing parentheses in -# method calls, method definitions, and grouped expressions. A hanging -# closing parenthesis means `)` preceded by a line break. -# -# @example -# -# # bad -# some_method( -# a, -# b -# ) -# -# some_method( -# a, b -# ) -# -# some_method(a, b, c -# ) -# -# some_method(a, -# b, -# c -# ) -# -# some_method(a, -# x: 1, -# y: 2 -# ) -# -# # Scenario 1: When First Parameter Is On Its Own Line -# -# # good: when first param is on a new line, right paren is *always* -# # outdented by IndentationWidth -# some_method( -# a, -# b -# ) -# -# # good -# some_method( -# a, b -# ) -# -# # Scenario 2: When First Parameter Is On The Same Line -# -# # good: when all other params are also on the same line, outdent -# # right paren by IndentationWidth -# some_method(a, b, c -# ) -# -# # good: when all other params are on multiple lines, but are lined -# # up, align right paren with left paren -# some_method(a, -# b, -# c -# ) -# -# # good: when other params are not lined up on multiple lines, outdent -# # right paren by IndentationWidth -# some_method(a, -# x: 1, -# y: 2 -# ) -# -# source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#71 -class RuboCop::Cop::Layout::ClosingParenthesisIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#84 - def on_begin(node); end - - # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#79 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#88 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#88 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#79 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#157 - def all_elements_aligned?(elements); end - - # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#95 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#99 - def check(node, elements); end - - # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#107 - def check_for_elements(node, elements); end - - # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#125 - def check_for_no_elements(node); end - - # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#171 - def correct_column_candidates(node, left_paren); end - - # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#144 - def expected_column(left_paren, elements); end - - # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#167 - def first_argument_line(elements); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#187 - def line_break_after_left_paren?(left_paren, elements); end - - # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#179 - def message(correct_column, left_paren, right_paren); end -end - -# source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#77 -RuboCop::Cop::Layout::ClosingParenthesisIndentation::MSG_ALIGN = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#75 -RuboCop::Cop::Layout::ClosingParenthesisIndentation::MSG_INDENT = T.let(T.unsafe(nil), String) - -# Checks the indentation of comments. -# -# @example -# # bad -# # comment here -# def method_name -# end -# -# # comment here -# a = 'hello' -# -# # yet another comment -# if true -# true -# end -# -# # good -# # comment here -# def method_name -# end -# -# # comment here -# a = 'hello' -# -# # yet another comment -# if true -# true -# end -# @example AllowForAlignment: false (default) -# # bad -# a = 1 # A really long comment -# # spanning two lines. -# -# # good -# # A really long comment spanning one line. -# a = 1 -# @example AllowForAlignment: true -# # good -# a = 1 # A really long comment -# # spanning two lines. -# -# source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#48 -class RuboCop::Cop::Layout::CommentIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#55 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#61 - def autocorrect(corrector, comment); end - - # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#88 - def autocorrect_one(corrector, comment); end - - # Corrects all comment lines that occur immediately before the given - # comment and have the same indentation. This is to avoid a long chain - # of correcting, saving the file, parsing and inspecting again, and - # then correcting one more line, and so on. - # - # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#71 - def autocorrect_preceding_comments(corrector, comment); end - - # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#92 - def check(comment, comment_index); end - - # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#145 - def correct_indentation(next_line); end - - # Returns true if: - # a) the cop is configured to allow extra indentation for alignment, and - # b) the currently inspected comment is aligned with the nearest preceding end-of-line - # comment. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#121 - def correctly_aligned_with_preceding_comment?(comment_index, column); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#156 - def less_indented?(line); end - - # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#140 - def line_after_comment(comment); end - - # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#131 - def message(column, correct_comment_indentation); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#135 - def own_line_comment?(comment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#82 - def should_correct?(preceding_comment, reference_comment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#162 - def two_alternatives?(line); end -end - -# source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#52 -RuboCop::Cop::Layout::CommentIndentation::MSG = T.let(T.unsafe(nil), String) - -# Checks for conditions that are not on the same line as -# if/while/until. -# -# @example -# -# # bad -# if -# some_condition -# do_something -# end -# -# # good -# if some_condition -# do_something -# end -# -# source://rubocop//lib/rubocop/cop/layout/condition_position.rb#21 -class RuboCop::Cop::Layout::ConditionPosition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#27 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#33 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#33 - def on_while(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#40 - def check(node); end - - # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#54 - def message(condition); end -end - -# source://rubocop//lib/rubocop/cop/layout/condition_position.rb#25 -RuboCop::Cop::Layout::ConditionPosition::MSG = T.let(T.unsafe(nil), String) - -# Checks whether the end keywords of method definitions are -# aligned properly. -# -# Two modes are supported through the EnforcedStyleAlignWith configuration -# parameter. If it's set to `start_of_line` (which is the default), the -# `end` shall be aligned with the start of the line where the `def` -# keyword is. If it's set to `def`, the `end` shall be aligned with the -# `def` keyword. -# -# @example EnforcedStyleAlignWith: start_of_line (default) -# # bad -# -# private def foo -# end -# -# # good -# -# private def foo -# end -# @example EnforcedStyleAlignWith: def -# # bad -# -# private def foo -# end -# -# # good -# -# private def foo -# end -# -# source://rubocop//lib/rubocop/cop/layout/def_end_alignment.rb#36 -class RuboCop::Cop::Layout::DefEndAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::EndKeywordAlignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/def_end_alignment.rb#43 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/layout/def_end_alignment.rb#43 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/layout/def_end_alignment.rb#48 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/def_end_alignment.rb#63 - def autocorrect(corrector, node); end -end - -# source://rubocop//lib/rubocop/cop/layout/def_end_alignment.rb#41 -RuboCop::Cop::Layout::DefEndAlignment::MSG = T.let(T.unsafe(nil), String) - -# Checks the . position in multi-line method calls. -# -# @example EnforcedStyle: leading (default) -# # bad -# something. -# method -# -# # good -# something -# .method -# @example EnforcedStyle: trailing -# # bad -# something -# .method -# -# # good -# something. -# method -# -# source://rubocop//lib/rubocop/cop/layout/dot_position.rb#25 -class RuboCop::Cop::Layout::DotPosition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#34 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#34 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#49 - def autocorrect(corrector, dot, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#99 - def correct_dot_position_style?(dot_line, selector_line); end - - # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#126 - def end_range(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#122 - def heredoc?(node); end - - # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#114 - def last_heredoc_line(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#95 - def line_between?(first_line, second_line); end - - # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#64 - def message(dot); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#74 - def proper_dot_position?(node); end - - # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#106 - def receiver_end_line(node); end - - # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#130 - def selector_range(node); end - - class << self - # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#30 - def autocorrect_incompatible_with; end - end -end - -# Checks the alignment of else keywords. Normally they should -# be aligned with an if/unless/while/until/begin/def/rescue keyword, but there -# are special cases when they should follow the same rules as the -# alignment of end. -# -# @example -# # bad -# if something -# code -# else -# code -# end -# -# # bad -# if something -# code -# elsif something -# code -# end -# -# # good -# if something -# code -# else -# code -# end -# -# source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#32 -class RuboCop::Cop::Layout::ElseAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::EndKeywordAlignment - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::CheckAssignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#57 - def on_case(node); end - - # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#63 - def on_case_match(node); end - - # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#40 - def on_if(node, base = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#51 - def on_rescue(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#147 - def assignment_node(node); end - - # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#71 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#106 - def base_for_method_definition(node); end - - # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#80 - def base_range_of_if(node, base); end - - # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#89 - def base_range_of_rescue(node); end - - # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#131 - def check_alignment(base_range, else_range); end - - # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#115 - def check_assignment(node, rhs); end - - # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#75 - def check_nested(node, base); end -end - -# source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#38 -RuboCop::Cop::Layout::ElseAlignment::MSG = T.let(T.unsafe(nil), String) - -# Checks empty comment. -# -# @example -# # bad -# -# # -# class Foo -# end -# -# # good -# -# # -# # Description of `Foo` class. -# # -# class Foo -# end -# @example AllowBorderComment: true (default) -# # good -# -# def foo -# end -# -# ################# -# -# def bar -# end -# @example AllowBorderComment: false -# # bad -# -# def foo -# end -# -# ################# -# -# def bar -# end -# @example AllowMarginComment: true (default) -# # good -# -# # -# # Description of `Foo` class. -# # -# class Foo -# end -# @example AllowMarginComment: false -# # bad -# -# # -# # Description of `Foo` class. -# # -# class Foo -# end -# -# source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#63 -class RuboCop::Cop::Layout::EmptyComment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#69 - def on_new_investigation; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#133 - def allow_border_comment?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#137 - def allow_margin_comment?; end - - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#97 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#129 - def comment_text(comment); end - - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#108 - def concat_consecutive_comments(comments); end - - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#141 - def current_token(comment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#119 - def empty_comment_only?(comment_text); end - - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#85 - def investigate(comments); end - - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#145 - def previous_token(node); end -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. -# -# 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 -# -# # bad -# def foo -# return if need_return? -# bar -# end -# -# # good -# def foo -# return if need_return? -# -# bar -# end -# -# # good -# def foo -# return if something? -# return if something_different? -# -# bar -# end -# -# # also good -# def foo -# if something? -# do_something -# return if need_return? -# end -# end -# -# 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#63 - def on_if(node); end - - private - - # 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#106 - def contains_guard_clause?(node); end - - # @return [Boolean] - # - # 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#181 - def heredoc?(node); end - - # 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#148 - def last_heredoc_argument(node); end - - # 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#199 - def multiple_statements_on_line?(node); end - - # @return [Boolean] - # - # 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#117 - def next_line_empty?(line); end - - # @return [Boolean] - # - # 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#127 - def next_line_rescue_or_ensure?(node); end - - # @return [Boolean] - # - # 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#132 - def next_sibling_parent_empty_or_else?(node); end - - # 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#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#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 -# # good -# # frozen_string_literal: true -# -# # Some documentation for Person -# class Person -# # Some code -# end -# -# # bad -# # frozen_string_literal: true -# # Some documentation for Person -# class Person -# # Some code -# end -# -# source://rubocop//lib/rubocop/cop/layout/empty_line_after_magic_comment.rb#23 -class RuboCop::Cop::Layout::EmptyLineAfterMagicComment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_magic_comment.rb#29 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_magic_comment.rb#61 - def comments_before_code(source); end - - # Find the last magic comment in the source file. - # - # Take all comments that precede the first line of code (or just take - # them all in the case when there is no code), select the - # magic comments, and return the last magic comment in the file. - # - # @return [Parser::Source::Comment] if magic comments exist before code - # @return [nil] otherwise - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_magic_comment.rb#55 - def last_magic_comment(source); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_magic_comment.rb#43 - def offending_range(last_magic_comment); end -end - -# source://rubocop//lib/rubocop/cop/layout/empty_line_after_magic_comment.rb#27 -RuboCop::Cop::Layout::EmptyLineAfterMagicComment::MSG = T.let(T.unsafe(nil), String) - -# Enforces empty line after multiline condition. -# -# @example -# # bad -# if multiline && -# condition -# do_something -# end -# -# # good -# if multiline && -# condition -# -# do_something -# end -# -# # bad -# case x -# when foo, -# bar -# do_something -# end -# -# # good -# case x -# when foo, -# bar -# -# do_something -# end -# -# # bad -# begin -# do_something -# rescue FooError, -# BarError -# handle_error -# end -# -# # good -# begin -# do_something -# rescue FooError, -# BarError -# -# handle_error -# end -# -# source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#54 -class RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#82 - def on_case(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#60 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#93 - def on_rescue(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#70 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#75 - def on_until_post(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#70 - def on_while(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#75 - def on_while_post(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#127 - def autocorrect(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#105 - def check_condition(condition); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#120 - def multiline_rescue_exceptions?(exception_nodes); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#116 - def multiline_when_condition?(when_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#112 - def next_line_empty?(line); end -end - -# source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#58 -RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition::MSG = T.let(T.unsafe(nil), String) - -# Checks whether class/module/method definitions are -# separated by one or more empty lines. -# -# `NumberOfEmptyLines` can be an integer (default is 1) or -# an array (e.g. [1, 2]) to specify a minimum and maximum -# number of empty lines permitted. -# -# `AllowAdjacentOneLineDefs` configures whether adjacent -# one-line definitions are considered an offense. -# -# @example EmptyLineBetweenMethodDefs: true (default) -# # checks for empty lines between method definitions. -# -# # bad -# def a -# end -# def b -# end -# -# # good -# def a -# end -# -# def b -# end -# @example EmptyLineBetweenClassDefs: true (default) -# # checks for empty lines between class definitions. -# -# # bad -# class A -# end -# class B -# end -# def b -# end -# -# # good -# class A -# end -# -# class B -# end -# -# def b -# end -# @example EmptyLineBetweenModuleDefs: true (default) -# # checks for empty lines between module definitions. -# -# # bad -# module A -# end -# module B -# end -# def b -# end -# -# # good -# module A -# end -# -# module B -# end -# -# def b -# end -# @example AllowAdjacentOneLineDefs: true (default) -# -# # good -# class ErrorA < BaseError; end -# class ErrorB < BaseError; end -# class ErrorC < BaseError; end -# -# # good -# class ErrorA < BaseError; end -# -# class ErrorB < BaseError; end -# -# class ErrorC < BaseError; end -# @example AllowAdjacentOneLineDefs: false -# -# # bad -# class ErrorA < BaseError; end -# class ErrorB < BaseError; end -# class ErrorC < BaseError; end -# -# # good -# class ErrorA < BaseError; end -# -# class ErrorB < BaseError; end -# -# class ErrorC < BaseError; end -# -# source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#102 -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#139 - def autocorrect(corrector, prev_def, node, count); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#124 - def check_defs(nodes); end - - # We operate on `begin` nodes, instead of using `OnMethodDef`, - # so that we can walk over pairs of consecutive nodes and - # efficiently access a node's predecessor; #prev_node ends up - # doing a linear scan over siblings, so we don't want to call - # it on each def. - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#117 - def on_begin(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#287 - def allowance_range?; end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#269 - def autocorrect_insert_lines(corrector, newline_pos, count); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#262 - def autocorrect_remove_lines(corrector, newline_pos, count); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#222 - 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#166 - def candidate?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#186 - def class_candidate?(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#250 - def def_end(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#158 - def def_location(correction_node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#242 - def def_start(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#173 - def empty_line_between_macros; end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#254 - def end_loc(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#200 - def expected_lines; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#218 - def line_count_allowed?(count); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#234 - def lines_between_defs(first_def_node, second_def_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#177 - def macro_candidate?(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#230 - def maximum_empty_lines; end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#194 - def message(node, count: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#182 - def method_candidate?(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#226 - def minimum_empty_lines; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#190 - def module_candidate?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#209 - def multiple_blank_lines_groups?(first_def_node, second_def_node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#276 - def node_type(node); end - - class << self - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#108 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#106 -RuboCop::Cop::Layout::EmptyLineBetweenDefs::MSG = T.let(T.unsafe(nil), String) - -# Checks for two or more consecutive blank lines. -# -# @example -# -# # bad - It has two empty lines. -# some_method -# # one empty line -# # two empty lines -# some_method -# -# # good -# some_method -# # one empty line -# some_method -# -# source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#21 -class RuboCop::Cop::Layout::EmptyLines < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#28 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#45 - def each_extra_empty_line(lines); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#63 - def exceeds_line_offset?(line_diff); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#67 - def previous_and_current_lines_empty?(line); end -end - -# source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#26 -RuboCop::Cop::Layout::EmptyLines::LINE_OFFSET = T.let(T.unsafe(nil), Integer) - -# source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#25 -RuboCop::Cop::Layout::EmptyLines::MSG = T.let(T.unsafe(nil), String) - -# Access modifiers should be surrounded by blank lines. -# -# @example EnforcedStyle: around (default) -# -# # bad -# class Foo -# def bar; end -# private -# def baz; end -# end -# -# # good -# class Foo -# def bar; end -# -# private -# -# def baz; end -# end -# @example EnforcedStyle: only_before -# -# # bad -# class Foo -# def bar; end -# private -# def baz; end -# end -# -# # good -# class Foo -# def bar; end -# -# private -# def baz; end -# end -# -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#43 -class RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # @return [EmptyLinesAroundAccessModifier] a new instance of EmptyLinesAroundAccessModifier - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#56 - def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#81 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#62 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#71 - def on_module(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#81 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#76 - def on_sclass(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#87 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#115 - def allowed_only_before_style?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#166 - def block_start?(line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#172 - def body_end?(line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#160 - def class_def?(line); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#124 - def correct_next_line_if_denied_style(corrector, node, line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#156 - def empty_lines_around?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#104 - def expected_empty_lines?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#225 - def inside_block?(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#182 - def message(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#191 - def message_for_around_style(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#201 - def message_for_only_before_style(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#178 - def next_empty_line_range(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#150 - def next_line_empty?(last_send_line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#229 - def no_empty_lines_around_block_body?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#143 - def previous_line_empty?(send_line); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#139 - def previous_line_ignoring_comments(processed_source, send_line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#219 - def should_insert_line_after?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#211 - def should_insert_line_before?(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#48 -RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_AFTER = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#52 -RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_AFTER_FOR_ONLY_BEFORE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#49 -RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_BEFORE_AND_AFTER = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#51 -RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_BEFORE_FOR_ONLY_BEFORE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#54 -RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks if empty lines exist around the arguments -# of a method invocation. -# -# @example -# # bad -# do_something( -# foo -# -# ) -# -# process(bar, -# -# baz: qux, -# thud: fred) -# -# some_method( -# -# [1,2,3], -# x: y -# ) -# -# # good -# do_something( -# foo -# ) -# -# process(bar, -# baz: qux, -# thud: fred) -# -# some_method( -# [1,2,3], -# x: y -# ) -# -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#41 -class RuboCop::Cop::Layout::EmptyLinesAroundArguments < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#47 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#47 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#65 - def empty_lines(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#71 - def extra_lines(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#93 - def inner_lines(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#84 - def line_numbers(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#97 - def outer_lines(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#78 - def processed_lines(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#61 - def receiver_and_method_call_on_different_lines?(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#45 -RuboCop::Cop::Layout::EmptyLinesAroundArguments::MSG = T.let(T.unsafe(nil), String) - -# Checks for a newline after an attribute accessor or a group of them. -# `alias` syntax and `alias_method`, `public`, `protected`, and `private` methods are allowed -# by default. These are customizable with `AllowAliasSyntax` and `AllowedMethods` options. -# -# @example -# # bad -# attr_accessor :foo -# def do_something -# end -# -# # good -# attr_accessor :foo -# -# def do_something -# end -# -# # good -# attr_accessor :foo -# attr_reader :bar -# attr_writer :baz -# attr :qux -# -# def do_something -# end -# @example AllowAliasSyntax: true (default) -# # good -# attr_accessor :foo -# alias :foo? :foo -# -# def do_something -# end -# @example AllowAliasSyntax: false -# # bad -# attr_accessor :foo -# alias :foo? :foo -# -# def do_something -# end -# -# # good -# attr_accessor :foo -# -# alias :foo? :foo -# -# def do_something -# end -# @example AllowedMethods: ['private'] -# # good -# attr_accessor :foo -# private :foo -# -# def do_something -# end -# -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#63 -class RuboCop::Cop::Layout::EmptyLinesAroundAttributeAccessor < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::AllowedMethods - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#70 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#123 - def allow_alias?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#133 - def allow_alias_syntax?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#127 - def attribute_or_allowed_method?(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#83 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#107 - def next_line_empty?(line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#94 - def next_line_empty_or_enable_directive_comment?(line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#101 - def next_line_enable_directive_comment?(line); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#117 - def next_line_node(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#111 - def require_empty_line?(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#68 -RuboCop::Cop::Layout::EmptyLinesAroundAttributeAccessor::MSG = T.let(T.unsafe(nil), String) - -# Checks if empty lines exist around the bodies of begin-end -# blocks. -# -# @example -# -# # bad -# begin -# -# # ... -# -# end -# -# # good -# begin -# # ... -# end -# -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_begin_body.rb#23 -class RuboCop::Cop::Layout::EmptyLinesAroundBeginBody < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Layout::EmptyLinesAroundBody - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_begin_body.rb#29 - def on_kwbegin(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_begin_body.rb#35 - def style; end -end - -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_begin_body.rb#27 -RuboCop::Cop::Layout::EmptyLinesAroundBeginBody::KIND = T.let(T.unsafe(nil), String) - -# Checks if empty lines around the bodies of blocks match -# the configuration. -# -# @example EnforcedStyle: no_empty_lines (default) -# # good -# -# foo do |bar| -# # ... -# end -# @example EnforcedStyle: empty_lines -# # good -# -# foo do |bar| -# -# # ... -# -# end -# -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_block_body.rb#24 -class RuboCop::Cop::Layout::EmptyLinesAroundBlockBody < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Layout::EmptyLinesAroundBody - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_block_body.rb#30 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_block_body.rb#30 - def on_numblock(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_block_body.rb#28 -RuboCop::Cop::Layout::EmptyLinesAroundBlockBody::KIND = T.let(T.unsafe(nil), String) - -# Common functionality for checking if presence/absence of empty lines -# around some kind of body matches the configuration. -# -# source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#8 -module RuboCop::Cop::Layout::EmptyLinesAroundBody - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#20 - def constant_definition?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#23 - def empty_line_required?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#26 - def check(node, body, adjusted_first_line: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#81 - def check_beginning(style, first_line); end - - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#67 - def check_both(style, first_line, last_line); end - - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#108 - def check_deferred_empty_line(body); end - - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#43 - def check_empty_lines_except_namespace(body, first_line, last_line); end - - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#51 - def check_empty_lines_special(body, first_line, last_line); end - - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#85 - def check_ending(style, last_line); end - - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#98 - def check_line(style, line, msg); end - - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#89 - def check_source(style, line_no, desc); end - - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#159 - def deferred_message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#132 - def first_child_requires_empty_line?(body); end - - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#140 - def first_empty_line_required_child(body); end - - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#155 - def message(type, desc); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#122 - def namespace?(body, with_one_child: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#148 - def previous_line_ignoring_comments(send_line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#163 - def valid_body_style?(body); end -end - -# source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#15 -RuboCop::Cop::Layout::EmptyLinesAroundBody::MSG_DEFERRED = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#13 -RuboCop::Cop::Layout::EmptyLinesAroundBody::MSG_EXTRA = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#14 -RuboCop::Cop::Layout::EmptyLinesAroundBody::MSG_MISSING = T.let(T.unsafe(nil), String) - -# Checks if empty lines around the bodies of classes match -# the configuration. -# -# @example EnforcedStyle: no_empty_lines (default) -# # good -# -# class Foo -# def bar -# # ... -# end -# end -# @example EnforcedStyle: empty_lines -# # good -# -# class Foo -# -# def bar -# # ... -# end -# -# end -# @example EnforcedStyle: empty_lines_except_namespace -# # good -# -# class Foo -# class Bar -# -# # ... -# -# end -# end -# @example EnforcedStyle: empty_lines_special -# # good -# class Foo -# -# def bar; end -# -# end -# @example EnforcedStyle: beginning_only -# # good -# -# class Foo -# -# def bar -# # ... -# end -# end -# @example EnforcedStyle: ending_only -# # good -# -# class Foo -# def bar -# # ... -# end -# -# end -# -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_class_body.rb#67 -class RuboCop::Cop::Layout::EmptyLinesAroundClassBody < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Layout::EmptyLinesAroundBody - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_class_body.rb#73 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_class_body.rb#79 - def on_sclass(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_class_body.rb#71 -RuboCop::Cop::Layout::EmptyLinesAroundClassBody::KIND = T.let(T.unsafe(nil), String) - -# Checks if empty lines exist around the bodies of `begin` -# sections. This cop doesn't check empty lines at `begin` body -# beginning/end and around method definition body. -# `Layout/EmptyLinesAroundBeginBody` or `Layout/EmptyLinesAroundMethodBody` -# can be used for this purpose. -# -# @example -# -# # good -# -# begin -# do_something -# rescue -# do_something2 -# else -# do_something3 -# ensure -# do_something4 -# end -# -# # good -# -# def foo -# do_something -# rescue -# do_something2 -# end -# -# # bad -# -# begin -# do_something -# -# rescue -# -# do_something2 -# -# else -# -# do_something3 -# -# ensure -# -# do_something4 -# end -# -# # bad -# -# def foo -# do_something -# -# rescue -# -# do_something2 -# end -# -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#61 -class RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - 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#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#80 - def check_body(body, line_of_def_or_kwbegin); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#112 - def keyword_locations(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#129 - def keyword_locations_in_ensure(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#125 - def keyword_locations_in_rescue(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#95 - def last_body_and_end_on_same_line?(body); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#104 - def message(location, keyword); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#108 - def style; end -end - -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#65 -RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords::MSG = T.let(T.unsafe(nil), String) - -# Checks if empty lines exist around the bodies of methods. -# -# @example -# -# # good -# -# def foo -# # ... -# end -# -# # bad -# -# def bar -# -# # ... -# -# end -# -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#23 -class RuboCop::Cop::Layout::EmptyLinesAroundMethodBody < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Layout::EmptyLinesAroundBody - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#29 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#29 - def on_defs(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#47 - def offending_endless_method?(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#52 - def register_offense_for_endless_method(node); end - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#43 - def style; end -end - -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#27 -RuboCop::Cop::Layout::EmptyLinesAroundMethodBody::KIND = T.let(T.unsafe(nil), String) - -# Checks if empty lines around the bodies of modules match -# the configuration. -# -# @example EnforcedStyle: no_empty_lines (default) -# # good -# -# module Foo -# def bar -# # ... -# end -# end -# @example EnforcedStyle: empty_lines -# # good -# -# module Foo -# -# def bar -# # ... -# end -# -# end -# @example EnforcedStyle: empty_lines_except_namespace -# # good -# -# module Foo -# module Bar -# -# # ... -# -# end -# end -# @example EnforcedStyle: empty_lines_special -# # good -# module Foo -# -# def bar; end -# -# end -# -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_module_body.rb#47 -class RuboCop::Cop::Layout::EmptyLinesAroundModuleBody < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Layout::EmptyLinesAroundBody - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_module_body.rb#53 - def on_module(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_module_body.rb#51 -RuboCop::Cop::Layout::EmptyLinesAroundModuleBody::KIND = T.let(T.unsafe(nil), String) - -# Checks whether the end keywords are aligned properly. -# -# Three modes are supported through the `EnforcedStyleAlignWith` -# configuration parameter: -# -# If it's set to `keyword` (which is the default), the `end` -# shall be aligned with the start of the keyword (if, class, etc.). -# -# If it's set to `variable` the `end` shall be aligned with the -# left-hand-side of the variable assignment, if there is one. -# -# If it's set to `start_of_line`, the `end` shall be aligned with the -# start of the line where the matching keyword appears. -# -# This `Layout/EndAlignment` cop aligns with keywords (e.g. `if`, `while`, `case`) -# by default. On the other hand, `Layout/BeginEndAlignment` cop aligns with -# `EnforcedStyleAlignWith: start_of_line` by default due to `||= begin` tends -# to align with the start of the line. `Layout/DefEndAlignment` cop also aligns with -# `EnforcedStyleAlignWith: start_of_line` by default. -# These style can be configured by each cop. -# -# @example EnforcedStyleAlignWith: keyword (default) -# # bad -# -# variable = if true -# end -# -# # good -# -# variable = if true -# end -# -# variable = -# if true -# end -# @example EnforcedStyleAlignWith: variable -# # bad -# -# variable = if true -# end -# -# # good -# -# variable = if true -# end -# -# variable = -# if true -# end -# @example EnforcedStyleAlignWith: start_of_line -# # bad -# -# variable = if true -# end -# -# puts(if true -# end) -# -# # good -# -# variable = if true -# end -# -# puts(if true -# end) -# -# variable = -# if true -# end -# -# source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#77 -class RuboCop::Cop::Layout::EndAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CheckAssignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::EndKeywordAlignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#111 - def on_case(node); end - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#111 - def on_case_match(node); end - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#83 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#99 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#95 - def on_module(node); end - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#87 - def on_sclass(node); end - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#107 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#103 - def on_while(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#167 - def alignment_node(node); end - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#184 - def alignment_node_for_variable_style(node); end - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#148 - def asgn_variable_align_with(outer_node, inner_node); end - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#202 - def assignment_or_operator_method(node); end - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#122 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#137 - def check_asgn_alignment(outer_node, inner_node); end - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#126 - def check_assignment(node, rhs); end - - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#158 - def check_other_alignment(node); end -end - -# Checks for Windows-style line endings in the source code. -# -# @example EnforcedStyle: native (default) -# # The `native` style means that CR+LF (Carriage Return + Line Feed) is -# # enforced on Windows, and LF is enforced on other platforms. -# -# # bad -# puts 'Hello' # Return character is LF on Windows. -# puts 'Hello' # Return character is CR+LF on other than Windows. -# -# # good -# puts 'Hello' # Return character is CR+LF on Windows. -# puts 'Hello' # Return character is LF on other than Windows. -# @example EnforcedStyle: lf -# # The `lf` style means that LF (Line Feed) is enforced on -# # all platforms. -# -# # bad -# puts 'Hello' # Return character is CR+LF on all platforms. -# -# # good -# puts 'Hello' # Return character is LF on all platforms. -# @example EnforcedStyle: crlf -# # The `crlf` style means that CR+LF (Carriage Return + Line Feed) is -# # enforced on all platforms. -# -# # bad -# puts 'Hello' # Return character is LF on all platforms. -# -# # good -# puts 'Hello' # Return character is CR+LF on all platforms. -# -# source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#40 -class RuboCop::Cop::Layout::EndOfLine < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#71 - def offense_message(line); end - - # source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#47 - def on_new_investigation; end - - # If there is no LF on the last line, we don't care if there's no CR. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#67 - def unimportant_missing_cr?(index, last_line, line); end - - private - - # source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#85 - def last_line(processed_source); end -end - -# source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#44 -RuboCop::Cop::Layout::EndOfLine::MSG_DETECTED = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#45 -RuboCop::Cop::Layout::EndOfLine::MSG_MISSING = T.let(T.unsafe(nil), String) - -# Checks for extra/unnecessary whitespace. -# -# @example -# -# # good if AllowForAlignment is true -# name = "RuboCop" -# # Some comment and an empty line -# -# website += "/rubocop/rubocop" unless cond -# puts "rubocop" if debug -# -# # bad for any configuration -# set_app("RuboCop") -# website = "https://github.com/rubocop/rubocop" -# -# # good only if AllowBeforeTrailingComments is true -# object.method(arg) # this is a comment -# -# # good even if AllowBeforeTrailingComments is false or not set -# object.method(arg) # this is a comment -# -# # good with either AllowBeforeTrailingComments or AllowForAlignment -# object.method(arg) # this is a comment -# another_object.method(arg) # this is another comment -# some_object.method(arg) # this is some comment -# -# source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#31 -class RuboCop::Cop::Layout::ExtraSpacing < ::RuboCop::Cop::Base - include ::RuboCop::Cop::PrecedingFollowingAlignment - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#39 - def on_new_investigation; end - - private - - # 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#147 - def align_equal_sign(corrector, token, align_to); end - - # 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 - def aligned_locations(locs); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#103 - def aligned_tok?(token); end - - # 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#179 - def allow_for_trailing_comments?; end - - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#72 - def check_assignment(token); end - - # 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#62 - def check_tokens(ast, token1, token2); end - - # @yield [range_between(start_pos, end_pos)] - # - # 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#133 - def force_equal_sign_alignment?; end - - # @return [Boolean] - # - # 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#118 - def ignored_ranges(ast); end -end - -# source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#37 -RuboCop::Cop::Layout::ExtraSpacing::MSG_UNALIGNED_ASGN = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#36 -RuboCop::Cop::Layout::ExtraSpacing::MSG_UNNECESSARY = T.let(T.unsafe(nil), String) - -# Checks the indentation of the first argument in a method call. -# Arguments after the first one are checked by `Layout/ArgumentAlignment`, -# not by this cop. -# -# For indenting the first parameter of method _definitions_, check out -# `Layout/FirstParameterIndentation`. -# -# This cop will respect `Layout/ArgumentAlignment` and will not work when -# `EnforcedStyle: with_fixed_indentation` is specified for `Layout/ArgumentAlignment`. -# -# @example -# -# # bad -# some_method( -# first_param, -# second_param) -# -# foo = some_method( -# first_param, -# second_param) -# -# foo = some_method(nested_call( -# nested_first_param), -# second_param) -# -# foo = some_method( -# nested_call( -# nested_first_param), -# second_param) -# -# some_method nested_call( -# nested_first_param), -# second_param -# @example EnforcedStyle: special_for_inner_method_call_in_parentheses (default) -# # Same as `special_for_inner_method_call` except that the special rule -# # only applies if the outer method call encloses its arguments in -# # parentheses. -# -# # good -# some_method( -# first_param, -# second_param) -# -# foo = some_method( -# first_param, -# second_param) -# -# foo = some_method(nested_call( -# nested_first_param), -# second_param) -# -# foo = some_method( -# nested_call( -# nested_first_param), -# second_param) -# -# some_method nested_call( -# nested_first_param), -# second_param -# @example EnforcedStyle: consistent -# # The first argument should always be indented one step more than the -# # preceding line. -# -# # good -# some_method( -# first_param, -# second_param) -# -# foo = some_method( -# first_param, -# second_param) -# -# foo = some_method(nested_call( -# nested_first_param), -# second_param) -# -# foo = some_method( -# nested_call( -# nested_first_param), -# second_param) -# -# some_method nested_call( -# nested_first_param), -# second_param -# @example EnforcedStyle: consistent_relative_to_receiver -# # The first argument should always be indented one level relative to -# # the parent that is receiving the argument -# -# # good -# some_method( -# first_param, -# second_param) -# -# foo = some_method( -# first_param, -# second_param) -# -# foo = some_method(nested_call( -# nested_first_param), -# second_param) -# -# foo = some_method( -# nested_call( -# nested_first_param), -# second_param) -# -# some_method nested_call( -# nested_first_param), -# second_params -# @example EnforcedStyle: special_for_inner_method_call -# # The first argument should normally be indented one step more than -# # the preceding line, but if it's an argument for a method call that -# # is itself an argument in a method call, then the inner argument -# # should be indented relative to the inner method. -# -# # good -# some_method( -# first_param, -# second_param) -# -# foo = some_method( -# first_param, -# second_param) -# -# foo = some_method(nested_call( -# nested_first_param), -# second_param) -# -# foo = some_method( -# nested_call( -# nested_first_param), -# second_param) -# -# some_method nested_call( -# nested_first_param), -# second_param -# -# source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#147 -class RuboCop::Cop::Layout::FirstArgumentIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#222 - def eligible_method_call?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#155 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#155 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#155 - def on_super(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#174 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#178 - def bare_operator?(node); end - - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#198 - def base_indentation(node); end - - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#226 - def base_range(send_node, arg_node); end - - # Returns the column of the given range. For single line ranges, this - # is simple. For ranges with line breaks, we look a the last code line. - # - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#238 - def column_of(range); end - - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#259 - def comment_lines; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#276 - def enable_layout_first_method_argument_line_break?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#271 - def enforce_first_argument_with_fixed_indentation?; end - - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#182 - def message(arg_node); end - - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#267 - def on_new_investigation; end - - # Takes the line number of a given code line and returns a string - # containing the previous line that's not a comment line or a blank - # line. - # - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#250 - def previous_code_line(line_number); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#170 - def should_check?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#206 - def special_inner_call_indentation?(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#153 -RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), String) - -# 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 `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 -# same line as the opening parenthesis of the method call, shall have -# their first element indented one step (two spaces) more than the -# position inside the opening parenthesis. -# -# Other array literals shall have their first element indented one step -# more than the start of the line where the opening square bracket is. -# -# This default style is called 'special_inside_parentheses'. Alternative -# styles are 'consistent' and 'align_brackets'. Here are examples: -# -# @example EnforcedStyle: special_inside_parentheses (default) -# # The `special_inside_parentheses` style enforces that the first -# # element in an array literal where the opening bracket and first -# # element are on separate lines is indented one step (two spaces) more -# # than the position inside the opening parenthesis. -# -# # bad -# array = [ -# :value -# ] -# and_in_a_method_call([ -# :no_difference -# ]) -# -# # good -# array = [ -# :value -# ] -# but_in_a_method_call([ -# :its_like_this -# ]) -# @example EnforcedStyle: consistent -# # The `consistent` style enforces that the first element in an array -# # literal where the opening bracket and the first element are on -# # separate lines is indented the same as an array literal which is not -# # defined inside a method call. -# -# # bad -# array = [ -# :value -# ] -# but_in_a_method_call([ -# :its_like_this -# ]) -# -# # good -# array = [ -# :value -# ] -# and_in_a_method_call([ -# :no_difference -# ]) -# @example EnforcedStyle: align_brackets -# # The `align_brackets` style enforces that the opening and closing -# # brackets are indented to the same position. -# -# # bad -# and_now_for_something = [ -# :completely_different -# ] -# -# # good -# and_now_for_something = [ -# :completely_different -# ] -# -# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#82 -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 - def on_array(node); end - - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#97 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#97 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#108 - 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#146 - def base_description(indent_base_type); end - - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#112 - def brace_alignment_style; end - - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#116 - def check(array_node, left_parenthesis); end - - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#130 - def check_right_bracket(right_bracket, first_elem, left_bracket, left_parenthesis); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#182 - def enforce_first_argument_with_fixed_indentation?; end - - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#159 - def message(base_description); end - - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#167 - def message_for_right_bracket(indent_base_type); end -end - -# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#88 -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 -# -# # bad -# [ :a, -# :b] -# -# # good -# [ -# :a, -# :b] -# -# # good -# [:a, :b] -# @example AllowMultilineFinalElement: false (default) -# -# # bad -# [ :a, { -# :b => :c -# }] -# -# # good -# [ -# :a, { -# :b => :c -# }] -# @example AllowMultilineFinalElement: true -# -# # good -# [:a, { -# :b => :c -# }] -# -# 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#49 - def on_array(node); end - - private - - # @return [Boolean] - # - # 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#62 - def ignore_last_element?; end -end - -# 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 -# where the opening brace and the first key are on separate lines. The -# other keys' indentations are handled by the HashAlignment cop. -# -# By default, `Hash` literals that are arguments in a method call with -# parentheses, and where the opening curly brace of the hash is on the -# same line as the opening parenthesis of the method call, shall have -# their first key indented one step (two spaces) more than the position -# inside the opening parenthesis. -# -# Other hash literals shall have their first key indented one step more -# than the start of the line where the opening curly brace is. -# -# This default style is called 'special_inside_parentheses'. Alternative -# styles are 'consistent' and 'align_braces'. Here are examples: -# -# @example EnforcedStyle: special_inside_parentheses (default) -# # The `special_inside_parentheses` style enforces that the first key -# # in a hash literal where the opening brace and the first key are on -# # separate lines is indented one step (two spaces) more than the -# # position inside the opening parentheses. -# -# # bad -# hash = { -# key: :value -# } -# and_in_a_method_call({ -# no: :difference -# }) -# takes_multi_pairs_hash(x: { -# a: 1, -# b: 2 -# }, -# y: { -# c: 1, -# d: 2 -# }) -# -# # good -# special_inside_parentheses -# hash = { -# key: :value -# } -# but_in_a_method_call({ -# its_like: :this -# }) -# takes_multi_pairs_hash(x: { -# a: 1, -# b: 2 -# }, -# y: { -# c: 1, -# d: 2 -# }) -# @example EnforcedStyle: consistent -# # The `consistent` style enforces that the first key in a hash -# # literal where the opening brace and the first key are on -# # separate lines is indented the same as a hash literal which is not -# # defined inside a method call. -# -# # bad -# hash = { -# key: :value -# } -# but_in_a_method_call({ -# its_like: :this -# }) -# -# # good -# hash = { -# key: :value -# } -# and_in_a_method_call({ -# no: :difference -# }) -# @example EnforcedStyle: align_braces -# # The `align_brackets` style enforces that the opening and closing -# # braces are indented to the same position. -# -# # bad -# and_now_for_something = { -# completely: :different -# } -# takes_multi_pairs_hash(x: { -# a: 1, -# b: 2 -# }, -# y: { -# c: 1, -# d: 2 -# }) -# -# # good -# and_now_for_something = { -# completely: :different -# } -# takes_multi_pairs_hash(x: { -# a: 1, -# b: 2 -# }, -# y: { -# c: 1, -# d: 2 -# }) -# -# source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#113 -class RuboCop::Cop::Layout::FirstHashElementIndentation < ::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_hash_element_indentation.rb#126 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#122 - def on_hash(node); end - - # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#126 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#137 - def autocorrect(corrector, node); end - - # Returns the description of what the correct indentation is based on. - # - # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#191 - def base_description(indent_base_type); end - - # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#141 - def brace_alignment_style; end - - # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#145 - def check(hash_node, left_parenthesis); end - - # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#184 - def check_based_on_longest_key(hash_node, left_brace, left_parenthesis); end - - # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#164 - def check_right_brace(right_brace, first_pair, left_brace, left_parenthesis); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#227 - def enforce_first_argument_with_fixed_indentation?; end - - # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#204 - def message(base_description); end - - # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#212 - def message_for_right_brace(indent_base_type); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#178 - def separator_style?(first_pair); end -end - -# source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#119 -RuboCop::Cop::Layout::FirstHashElementIndentation::MSG = T.let(T.unsafe(nil), String) - -# Checks for a line break before the first element in a -# multi-line hash. -# -# @example -# -# # bad -# { a: 1, -# b: 2} -# -# # good -# { -# a: 1, -# b: 2 } -# -# # good -# { -# a: 1, b: { -# c: 3 -# }} -# @example AllowMultilineFinalElement: false (default) -# -# # bad -# { a: 1, b: { -# c: 3 -# }} -# @example AllowMultilineFinalElement: true -# -# # bad -# { a: 1, -# b: { -# c: 3 -# }} -# -# # good -# { a: 1, b: { -# c: 3 -# }} -# -# 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#52 - def on_hash(node); end - - private - - # @return [Boolean] - # - # 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#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 -# -# # 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", -# qux: "b", -# }) -# -# # good -# method( -# foo, bar, { -# baz: "a", -# qux: "b", -# }) -# @example AllowMultilineFinalElement: true -# -# # bad -# method(foo, -# bar, -# { -# baz: "a", -# qux: "b", -# } -# ) -# -# # good -# method(foo, bar, { -# baz: "a", -# qux: "b", -# }) -# -# # good -# method( -# foo, -# bar, -# { -# baz: "a", -# qux: "b", -# } -# ) -# @example AllowedMethods: ['some_method'] -# -# # good -# some_method(foo, bar, -# baz) -# -# source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#71 -class RuboCop::Cop::Layout::FirstMethodArgumentLineBreak < ::RuboCop::Cop::Base - include ::RuboCop::Cop::FirstElementLineBreak - include ::RuboCop::Cop::AllowedMethods - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#78 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#78 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#78 - def on_super(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#99 - def ignore_last_element?; end -end - -# source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#76 -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 -# -# # bad -# def method(foo, bar, -# baz) -# do_something -# end -# -# # good -# def method( -# foo, bar, -# baz) -# do_something -# end -# -# # ignored -# def method foo, -# bar -# do_something -# end -# @example AllowMultilineFinalElement: false (default) -# -# # bad -# def method(foo, bar, baz = { -# :a => "b", -# }) -# do_something -# end -# -# # good -# def method( -# foo, bar, baz = { -# :a => "b", -# }) -# do_something -# end -# @example AllowMultilineFinalElement: true -# -# # good -# def method(foo, bar, baz = { -# :a => "b", -# }) -# do_something -# end -# -# 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#62 - def on_def(node); end - - # 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#69 - def ignore_last_element?; end -end - -# 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 -# definition. Parameters after the first one are checked by -# `Layout/ParameterAlignment`, not by this cop. -# -# For indenting the first argument of method _calls_, check out -# `Layout/FirstArgumentIndentation`, which supports options related to -# nesting that are irrelevant for method _definitions_. -# -# @example -# -# # bad -# def some_method( -# first_param, -# second_param) -# 123 -# end -# @example EnforcedStyle: consistent (default) -# # The first parameter should always be indented one step more than the -# # preceding line. -# -# # good -# def some_method( -# first_param, -# second_param) -# 123 -# end -# @example EnforcedStyle: align_parentheses -# # The first parameter should always be indented one step more than the -# # opening parenthesis. -# -# # good -# def some_method( -# first_param, -# second_param) -# 123 -# end -# -# source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#44 -class RuboCop::Cop::Layout::FirstParameterIndentation < ::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_parameter_indentation.rb#53 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#53 - def on_defs(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#63 - def autocorrect(corrector, node); end - - # Returns the description of what the correct indentation is based on. - # - # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#83 - def base_description(_); end - - # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#67 - def brace_alignment_style; end - - # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#71 - def check(def_node); end - - # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#91 - def message(base_description); end -end - -# source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#50 -RuboCop::Cop::Layout::FirstParameterIndentation::MSG = T.let(T.unsafe(nil), String) - -# Check that the keys, separators, and values of a multi-line hash -# literal are aligned according to configuration. The configuration -# options are: -# -# * key (left align keys, one space before hash rockets and values) -# * separator (align hash rockets and colons, right align keys) -# * table (left align keys, hash rockets, and values) -# -# The treatment of hashes passed as the last argument to a method call -# can also be configured. The options are: -# -# * always_inspect -# * always_ignore -# * ignore_implicit (without curly braces) -# -# Alternatively you can specify multiple allowed styles. That's done by -# passing a list of styles to EnforcedStyles. -# -# @example EnforcedLastArgumentHashStyle: ignore_explicit -# # Ignore only explicit hashes. -# -# # bad -# do_something(foo: 1, -# bar: 2) -# -# # good -# do_something({foo: 1, -# bar: 2}) -# @example EnforcedHashRocketStyle: separator -# # bad -# { -# :foo => bar, -# :ba => baz -# } -# { -# :foo => bar, -# :ba => baz -# } -# -# # good -# { -# :foo => bar, -# :ba => baz -# } -# @example EnforcedHashRocketStyle: table -# # bad -# { -# :foo => bar, -# :ba => baz -# } -# -# # good -# { -# :foo => bar, -# :ba => baz -# } -# @example EnforcedColonStyle: key (default) -# # bad -# { -# foo: bar, -# ba: baz -# } -# { -# foo: bar, -# ba: baz -# } -# -# # good -# { -# foo: bar, -# ba: baz -# } -# @example EnforcedColonStyle: separator -# # bad -# { -# foo: bar, -# ba: baz -# } -# -# # good -# { -# foo: bar, -# ba: baz -# } -# @example EnforcedColonStyle: table -# # bad -# { -# foo: bar, -# ba: baz -# } -# -# # good -# { -# foo: bar, -# ba: baz -# } -# @example EnforcedLastArgumentHashStyle: always_inspect (default) -# # Inspect both implicit and explicit hashes. -# -# # bad -# do_something(foo: 1, -# bar: 2) -# -# # bad -# do_something({foo: 1, -# bar: 2}) -# -# # good -# do_something(foo: 1, -# bar: 2) -# -# # good -# do_something( -# foo: 1, -# bar: 2 -# ) -# -# # good -# do_something({foo: 1, -# bar: 2}) -# -# # good -# do_something({ -# foo: 1, -# bar: 2 -# }) -# @example EnforcedLastArgumentHashStyle: always_ignore -# # Ignore both implicit and explicit hashes. -# -# # good -# do_something(foo: 1, -# bar: 2) -# -# # good -# do_something({foo: 1, -# bar: 2}) -# @example EnforcedLastArgumentHashStyle: ignore_implicit -# # Ignore only implicit hashes. -# -# # bad -# do_something({foo: 1, -# bar: 2}) -# -# # good -# do_something(foo: 1, -# bar: 2) -# @example EnforcedHashRocketStyle: key (default) -# # bad -# { -# :foo => bar, -# :ba => baz -# } -# { -# :foo => bar, -# :ba => baz -# } -# -# # good -# { -# :foo => bar, -# :ba => baz -# } -# -# source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#178 -class RuboCop::Cop::Layout::HashAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::HashAlignmentStyles - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # Returns the value of attribute column_deltas. - # - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#219 - def column_deltas; end - - # Sets the attribute column_deltas - # - # @param value the value to set the attribute column_deltas to. - # - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#219 - def column_deltas=(_arg0); end - - # Returns the value of attribute offenses_by. - # - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#219 - def offenses_by; end - - # Sets the attribute offenses_by - # - # @param value the value to set the attribute offenses_by to. - # - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#219 - def offenses_by=(_arg0); end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#195 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#209 - def on_hash(node); end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#195 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#195 - def on_super(node); end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#195 - def on_yield(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#267 - def add_offenses; end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#373 - def adjust(corrector, delta, range); end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#302 - def alignment_for(pair); end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#316 - def alignment_for_colons; end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#312 - def alignment_for_hash_rockets; end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#235 - def argument_before_hash(hash_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#223 - def autocorrect_incompatible_with_other_cops?(node); end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#285 - def check_delta(delta, node:, alignment:); end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#248 - def check_pairs(node); end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#339 - def correct_key_value(corrector, delta, key, value, separator); end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#335 - def correct_no_value(corrector, key_delta, key); end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#320 - def correct_node(corrector, node, delta); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#244 - def double_splat?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#386 - def enforce_first_argument_with_fixed_indentation?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#382 - def good_alignment?(column_deltas); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#293 - def ignore_hash_argument?(node); end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#355 - def new_alignment(key); end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#275 - def register_offenses_with_format(offenses, format); end - - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#239 - def reset!; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#391 - def same_line?(node1, node2); end -end - -# source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#183 -RuboCop::Cop::Layout::HashAlignment::MESSAGES = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#193 -RuboCop::Cop::Layout::HashAlignment::SEPARATOR_ALIGNMENT_STYLES = T.let(T.unsafe(nil), Array) - -# Checks for the placement of the closing parenthesis -# in a method call that passes a HEREDOC string as an argument. -# It should be placed at the end of the line containing the -# opening HEREDOC tag. -# -# @example -# # bad -# -# foo(<<-SQL -# bar -# SQL -# ) -# -# foo(<<-SQL, 123, <<-NOSQL, -# bar -# SQL -# baz -# NOSQL -# ) -# -# foo( -# bar(<<-SQL -# baz -# SQL -# ), -# 123, -# ) -# -# # good -# -# foo(<<-SQL) -# bar -# SQL -# -# foo(<<-SQL, 123, <<-NOSQL) -# bar -# SQL -# baz -# NOSQL -# -# foo( -# bar(<<-SQL), -# baz -# SQL -# 123, -# ) -# -# source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#53 -class RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#64 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#64 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#185 - def add_correct_closing_paren(node, corrector); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#272 - def add_correct_external_trailing_comma(node, corrector); end - - # Autocorrection note: - # - # Commas are a bit tricky to handle when the method call is - # embedded in another expression. Here's an example: - # - # [ - # first_array_value, - # foo(<<-SQL, 123, 456, - # SELECT * FROM db - # SQL - # ), - # third_array_value, - # ] - # - # The "internal" trailing comma is after `456`. - # The "external" trailing comma is after `)`. - # - # To autocorrect, we remove the latter, and move the former up: - # - # [ - # first_array_value, - # foo(<<-SQL, 123, 456), - # SELECT * FROM db - # SQL - # third_array_value, - # ] - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#108 - def autocorrect(corrector, node); end - - # Closing parenthesis helpers. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#163 - def end_keyword_before_closing_parenthesis?(parenthesized_send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#223 - def exist_argument_between_heredoc_end_and_closing_parentheses?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#290 - def external_trailing_comma?(node); end - - # Returns nil if no trailing external comma. - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#295 - def external_trailing_comma_offset_from_loc_end(node); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#138 - def extract_heredoc(node); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#134 - def extract_heredoc_argument(node); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#231 - def find_most_bottom_of_heredoc_end(arguments); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#180 - def fix_closing_parenthesis(node, corrector); end - - # External trailing comma helpers. - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#267 - def fix_external_trailing_comma(node, corrector); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#150 - def heredoc_node?(node); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#198 - def incorrect_parenthesis_removal_begin(node); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#214 - def incorrect_parenthesis_removal_end(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#245 - def internal_trailing_comma?(node); end - - # Returns nil if no trailing internal comma. - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#250 - def internal_trailing_comma_offset_from_last_arg(node); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#116 - def outermost_send_on_same_line(heredoc); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#189 - def remove_incorrect_closing_paren(node, corrector); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#278 - def remove_incorrect_external_trailing_comma(node, corrector); end - - # Internal trailing comma helpers. - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#239 - def remove_internal_trailing_comma(node, corrector); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#208 - def safe_to_remove_line_containing_closing_paren?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#127 - def send_missing_closing_parens?(parent, child, heredoc); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#154 - def single_line_send_with_heredoc_receiver?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#306 - def space?(pos); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#169 - def subsequent_closing_parentheses_in_same_line?(outermost_send); end - - class << self - # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#60 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#57 -RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis::MSG = T.let(T.unsafe(nil), String) - -# Checks the indentation of the here document bodies. The bodies -# are indented one step. -# -# 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. -# -# @example -# # bad -# <<-RUBY -# something -# RUBY -# -# # good -# <<~RUBY -# something -# RUBY -# -# source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#24 -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#36 - def on_heredoc(node); end - - private - - # 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#115 - def adjust_squiggly(corrector, node); end - - # 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#155 - def heredoc_body(node); end - - # 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#151 - def heredoc_indent_type(node); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#126 - def indented_body(node); end - - # 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#91 - def line_too_long?(node); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#103 - def longest_line(lines); end - - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#111 - def max_line_length; end - - # 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#57 - def register_offense(node, heredoc_indent_type); end - - # 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#107 - def unlimited_heredoc_length?; end - - # 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#32 -RuboCop::Cop::Layout::HeredocIndentation::TYPE_MSG = T.let(T.unsafe(nil), String) - -# 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. -# -# The difference between `indented_internal_methods` and `normal` is -# that the `indented_internal_methods` style prescribes that in -# classes and modules the `protected` and `private` modifier keywords -# shall be indented the same as public methods and that protected and -# private members shall be indented one step more than the modifiers. -# Other than that, both styles mean that entities on the same logical -# depth shall have the same indentation. -# -# @example EnforcedStyle: normal (default) -# # bad -# class A -# def test -# puts 'hello' -# puts 'world' -# end -# end -# -# # bad -# class A -# def test -# puts 'hello' -# puts 'world' -# end -# -# protected -# -# def foo -# end -# -# private -# -# def bar -# end -# end -# -# # good -# class A -# def test -# puts 'hello' -# puts 'world' -# end -# end -# -# # good -# class A -# def test -# puts 'hello' -# puts 'world' -# end -# -# protected -# -# def foo -# end -# -# private -# -# def bar -# end -# end -# @example EnforcedStyle: indented_internal_methods -# # bad -# class A -# def test -# puts 'hello' -# puts 'world' -# end -# end -# -# # bad -# class A -# def test -# puts 'hello' -# puts 'world' -# end -# -# protected -# -# def foo -# end -# -# private -# -# def bar -# end -# end -# -# # good -# class A -# def test -# puts 'hello' -# puts 'world' -# end -# end -# -# # good -# class A -# def test -# puts 'hello' -# puts 'world' -# end -# -# protected -# -# def foo -# end -# -# private -# -# def bar -# end -# end -# -# source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#121 -class RuboCop::Cop::Layout::IndentationConsistency < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#128 - def on_begin(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#132 - def on_kwbegin(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#138 - def autocorrect(corrector, node); end - - # Not all nodes define `bare_access_modifier?` (for example, - # `RuboCop::AST::DefNode` does not), so we must check `send_type?` first - # to avoid a NoMethodError. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#145 - def bare_access_modifier?(node); end - - # Returns an integer representing the correct indentation, or nil to - # indicate that the correct indentation is that of the first child that - # is not an access modifier. - # - # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#152 - def base_column_for_normal_style(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#172 - def check(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#187 - def check_indented_internal_methods_style(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#180 - def check_normal_style(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#126 -RuboCop::Cop::Layout::IndentationConsistency::MSG = T.let(T.unsafe(nil), String) - -# Checks that the indentation method is consistent. -# Either tabs only or spaces only are used for indentation. -# -# @example EnforcedStyle: spaces (default) -# # bad -# # This example uses a tab to indent bar. -# def foo -# bar -# end -# -# # good -# # This example uses spaces to indent bar. -# def foo -# bar -# end -# @example EnforcedStyle: tabs -# # bad -# # This example uses spaces to indent bar. -# def foo -# bar -# end -# -# # good -# # This example uses a tab to indent bar. -# def foo -# bar -# end -# -# source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#34 -class RuboCop::Cop::Layout::IndentationStyle < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#42 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#58 - def autocorrect(corrector, range); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#82 - def autocorrect_lambda_for_spaces(corrector, range); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#77 - def autocorrect_lambda_for_tabs(corrector, range); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#66 - def find_offense(line, lineno); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#88 - def in_string_literal?(ranges, tabs_range); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#109 - def message(_node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#92 - def string_literal_ranges(ast); end -end - -# source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#40 -RuboCop::Cop::Layout::IndentationStyle::MSG = T.let(T.unsafe(nil), String) - -# Checks for indentation that doesn't use the specified number of spaces. -# The indentation width can be configured using the `Width` setting. The default width is 2. -# -# See also the `Layout/IndentationConsistency` cop which is the companion to this one. -# -# @example Width: 2 (default) -# # bad -# class A -# def test -# puts 'hello' -# end -# end -# -# # good -# class A -# def test -# puts 'hello' -# end -# end -# @example AllowedPatterns: ['^\s*module'] -# # bad -# module A -# class B -# def test -# puts 'hello' -# end -# end -# end -# -# # good -# module A -# class B -# def test -# puts 'hello' -# end -# end -# end -# -# source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#44 -class RuboCop::Cop::Layout::IndentationWidth < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::EndKeywordAlignment - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::CheckAssignment - include ::RuboCop::Cop::AllowedPattern - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#56 - def access_modifier?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#81 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#138 - def on_case(case_node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#146 - def on_case_match(case_match); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#95 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#104 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#121 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#121 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#69 - def on_ensure(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#64 - def on_for(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#156 - def on_if(node, base = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#73 - def on_kwbegin(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#95 - def on_module(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#81 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#64 - def on_resbody(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#60 - def on_rescue(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#95 - def on_sclass(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#104 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#128 - def on_until(node, base = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#128 - def on_while(node, base = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#227 - def access_modifier_indentation_style; end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#165 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#235 - def check_assignment(node, rhs); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#255 - def check_if(node, body, else_clause, base_loc); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#268 - def check_indentation(base_loc, body_node, style = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#169 - def check_members(base, members); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#193 - def check_members_for_indented_internal_methods_style(members); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#199 - def check_members_for_normal_style(base, members); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#340 - def check_rescue?(rescue_node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#376 - def configured_indentation_width; end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#207 - def each_member(members); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#231 - def indentation_consistency_style; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#323 - def indentation_to_check?(base_loc, body_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#219 - def indented_internal_methods_style?; end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#380 - def leftmost_modifier_of(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#302 - def message(configured_indentation_width, indentation, name); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#359 - def offending_range(body_node, indentation); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#278 - def offense(body_node, indentation, style); end - - # Returns true if the given node is within another node that has - # already been marked for autocorrection by this cop. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#313 - def other_offense_in_same_range?(node); end - - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#181 - def select_check_member(member); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#344 - def skip_check?(base_loc, body_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#223 - def special_modifier?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#367 - def starts_with_access_modifier?(body_node); end -end - -# source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#52 -RuboCop::Cop::Layout::IndentationWidth::MSG = T.let(T.unsafe(nil), String) - -# Checks for indentation of the first non-blank non-comment -# line in a file. -# -# @example -# # bad -# class A -# def foo; end -# end -# -# # good -# class A -# def foo; end -# end -# -# source://rubocop//lib/rubocop/cop/layout/initial_indentation.rb#20 -class RuboCop::Cop::Layout::InitialIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/initial_indentation.rb#26 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/layout/initial_indentation.rb#36 - def first_token; end - - # @yield [range_between(space_range.begin_pos, token.begin_pos)] - # - # source://rubocop//lib/rubocop/cop/layout/initial_indentation.rb#40 - def space_before(token); end -end - -# source://rubocop//lib/rubocop/cop/layout/initial_indentation.rb#24 -RuboCop::Cop::Layout::InitialIndentation::MSG = T.let(T.unsafe(nil), String) - -# Checks whether comments have a leading space after the -# `#` denoting the start of the comment. The leading space is not -# required for some RDoc special syntax, like `#++`, `#--`, -# `#:nodoc`, `=begin`- and `=end` comments, "shebang" directives, -# or rackup options. -# -# @example AllowSteepAnnotation: true -# -# # good -# -# [1, 2, 3].each_with_object([]) do |n, list| #$ Array[Integer] -# list << n -# end -# -# name = 'John' #: String -# @example AllowDoxygenCommentStyle: false (default) -# -# # bad -# -# #** -# # Some comment -# # Another line of comment -# #* -# @example AllowDoxygenCommentStyle: true -# -# # good -# -# #** -# # Some comment -# # Another line of comment -# #* -# @example AllowGemfileRubyComment: false (default) -# -# # bad -# -# #ruby=2.7.0 -# #ruby-gemset=myproject -# @example AllowGemfileRubyComment: true -# -# # good -# -# #ruby=2.7.0 -# #ruby-gemset=myproject -# @example AllowRBSInlineAnnotation: false (default) -# -# # bad -# -# include Enumerable #[Integer] -# -# attr_reader :name #: String -# attr_reader :age #: Integer? -# @example AllowRBSInlineAnnotation: true -# -# # good -# -# include Enumerable #[Integer] -# -# attr_reader :name #: String -# attr_reader :age #: Integer? -# @example AllowSteepAnnotation: false (default) -# -# # bad -# [1, 2, 3].each_with_object([]) do |n, list| #$ Array[Integer] -# list << n -# end -# -# name = 'John' #: String -# @example -# -# # bad -# #Some comment -# -# # good -# # Some comment -# -# source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#89 -class RuboCop::Cop::Layout::LeadingCommentSpace < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#95 - def on_new_investigation; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#149 - def allow_doxygen_comment?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#157 - def allow_gemfile_ruby_comment?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#173 - def allow_rbs_inline_annotation?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#181 - def allow_steep_annotation?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#119 - def allowed_on_first_line?(comment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#153 - def doxygen_comment_style?(comment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#161 - def gemfile?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#169 - def gemfile_ruby_comment?(comment); end - - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#115 - def hash_mark(expr); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#145 - def rackup_config_file?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#141 - def rackup_options?(comment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#177 - def rbs_inline_annotation?(comment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#165 - def ruby_comment_in_gemfile?(comment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#123 - def shebang?(comment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#127 - def shebang_continuation?(comment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#185 - def steep_annotation?(comment); end -end - -# source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#93 -RuboCop::Cop::Layout::LeadingCommentSpace::MSG = T.let(T.unsafe(nil), String) - -# Checks for unnecessary leading blank lines at the beginning -# of a file. -# -# @example -# -# # bad -# # (start of file) -# -# class Foo -# end -# -# # bad -# # (start of file) -# -# # a comment -# -# # good -# # (start of file) -# class Foo -# end -# -# # good -# # (start of file) -# # a comment -# -# source://rubocop//lib/rubocop/cop/layout/leading_empty_lines.rb#30 -class RuboCop::Cop::Layout::LeadingEmptyLines < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/leading_empty_lines.rb#35 - def on_new_investigation; end -end - -# source://rubocop//lib/rubocop/cop/layout/leading_empty_lines.rb#33 -RuboCop::Cop::Layout::LeadingEmptyLines::MSG = T.let(T.unsafe(nil), String) - -# Checks that strings broken over multiple lines (by a backslash) contain -# trailing spaces instead of leading spaces (default) or leading spaces -# instead of trailing spaces. -# -# @example EnforcedStyle: trailing (default) -# # bad -# 'this text contains a lot of' \ -# ' spaces' -# -# # good -# 'this text contains a lot of ' \ -# 'spaces' -# -# # bad -# 'this text is too' \ -# ' long' -# -# # good -# 'this text is too ' \ -# 'long' -# @example EnforcedStyle: leading -# # bad -# 'this text contains a lot of ' \ -# 'spaces' -# -# # good -# 'this text contains a lot of' \ -# ' spaces' -# -# # bad -# 'this text is too ' \ -# 'long' -# -# # good -# 'this text is too' \ -# ' long' -# -# source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#43 -class RuboCop::Cop::Layout::LineContinuationLeadingSpace < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#63 - def on_dstr(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#122 - def autocorrect(corrector, offense_range, insert_pos, spaces); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#115 - def continuation?(line, line_num, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#147 - def enforced_style_leading?; end - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#85 - def investigate(first_line, second_line, end_of_first_line); end - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#93 - def investigate_leading_style(first_line, second_line, end_of_first_line); end - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#104 - def investigate_trailing_style(first_line, second_line, end_of_first_line); end - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#127 - def leading_offense_range(end_of_first_line, matches); end - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#139 - def message(_range); end - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#81 - def raw_lines(node); end - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#133 - def trailing_offense_range(end_of_first_line, matches); end - - class << self - # When both cops are activated and run in the same iteration of the correction loop, - # `Style/StringLiterals` undoes the moving of spaces that - # `Layout/LineContinuationLeadingSpace` performs. This is because `Style/StringLiterals` - # takes the original string content and transforms it, rather than just modifying the - # delimiters, in order to handle escaping for quotes within the string. - # - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#59 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#49 -RuboCop::Cop::Layout::LineContinuationLeadingSpace::LEADING_STYLE_OFFENSE = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#47 -RuboCop::Cop::Layout::LineContinuationLeadingSpace::LINE_1_ENDING = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#48 -RuboCop::Cop::Layout::LineContinuationLeadingSpace::LINE_2_BEGINNING = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#50 -RuboCop::Cop::Layout::LineContinuationLeadingSpace::TRAILING_STYLE_OFFENSE = T.let(T.unsafe(nil), Regexp) - -# Checks that the backslash of a line continuation is separated from -# preceding text by exactly one space (default) or zero spaces. -# -# @example EnforcedStyle: space (default) -# # bad -# 'a'\ -# 'b' \ -# 'c' -# -# # good -# 'a' \ -# 'b' \ -# 'c' -# @example EnforcedStyle: no_space -# # bad -# 'a' \ -# 'b' \ -# 'c' -# -# # good -# 'a'\ -# 'b'\ -# 'c' -# -# source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#30 -class RuboCop::Cop::Layout::LineContinuationSpacing < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#34 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#81 - def autocorrect(corrector, range); end - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#111 - def comment_ranges(comments); end - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#65 - def find_offensive_spacing(line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#121 - def ignore_range?(backtick_range); end - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#91 - def ignored_literal_ranges(ast); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#130 - def ignored_parent?(node); end - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#125 - def ignored_ranges; end - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#49 - def investigate(line, line_number); end - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#115 - def last_line(processed_source); end - - # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#73 - def message(_range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#136 - def no_space_style?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#140 - def space_style?; end -end - -# Checks the indentation of the next line after a line that ends with a string -# literal and a backslash. -# -# If `EnforcedStyle: aligned` is set, the concatenated string parts shall be aligned with the -# first part. There are some exceptions, such as implicit return values, where the -# concatenated string parts shall be indented regardless of `EnforcedStyle` configuration. -# -# If `EnforcedStyle: indented` is set, it's the second line that shall be indented one step -# more than the first line. Lines 3 and forward shall be aligned with line 2. -# -# @example -# # bad -# def some_method -# 'x' \ -# 'y' \ -# 'z' -# end -# -# my_hash = { -# first: 'a message' \ -# 'in two parts' -# } -# -# # good -# def some_method -# 'x' \ -# 'y' \ -# 'z' -# end -# @example EnforcedStyle: aligned (default) -# # bad -# puts 'x' \ -# 'y' -# -# my_hash = { -# first: 'a message' \ -# 'in two parts' -# } -# -# # good -# puts 'x' \ -# 'y' -# -# my_hash = { -# first: 'a message' \ -# 'in two parts' -# } -# @example EnforcedStyle: indented -# # bad -# result = 'x' \ -# 'y' -# -# my_hash = { -# first: 'a message' \ -# 'in two parts' -# } -# -# # good -# result = 'x' \ -# 'y' -# -# my_hash = { -# first: 'a message' \ -# 'in two parts' -# } -# -# source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#74 -class RuboCop::Cop::Layout::LineEndStringConcatenationIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - # 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 - def on_dstr(node); end - - private - - # 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#109 - def always_indented?(dstr_node); end - - # 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#113 - def check_aligned(children, start_index); end - - # 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#103 - def strings_concatenated_with_backslash?(dstr_node); end -end - -# source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#79 -RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::MSG_ALIGN = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#80 -RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::MSG_INDENT = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#81 -RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::PARENT_TYPES_FOR_INDENTED = T.let(T.unsafe(nil), Array) - -# Checks the length of lines in the source code. -# The maximum length is configurable. -# The tab size is configured in the `IndentationWidth` -# of the `Layout/IndentationStyle` cop. -# It also ignores a shebang line by default. -# -# This cop has some autocorrection capabilities. -# It can programmatically shorten certain long lines by -# inserting line breaks into expressions that can be safely -# split across lines. These include arrays, hashes, and -# method calls with argument lists. -# -# If autocorrection is enabled, the following cops -# are recommended to further format the broken lines. -# (Many of these are enabled by default.) -# -# * `Layout/ArgumentAlignment` -# * `Layout/ArrayAlignment` -# * `Layout/BlockAlignment` -# * `Layout/BlockEndNewline` -# * `Layout/ClosingParenthesisIndentation` -# * `Layout/FirstArgumentIndentation` -# * `Layout/FirstArrayElementIndentation` -# * `Layout/FirstHashElementIndentation` -# * `Layout/FirstParameterIndentation` -# * `Layout/HashAlignment` -# * `Layout/IndentationWidth` -# * `Layout/MultilineArrayLineBreaks` -# * `Layout/MultilineBlockLayout` -# * `Layout/MultilineHashBraceLayout` -# * `Layout/MultilineHashKeyLineBreaks` -# * `Layout/MultilineMethodArgumentLineBreaks` -# * `Layout/MultilineMethodParameterLineBreaks` -# * `Layout/ParameterAlignment` -# * `Style/BlockDelimiters` -# -# Together, these cops will pretty print hashes, arrays, -# method calls, etc. For example, let's say the max columns -# is 25: -# -# @example -# -# # bad -# {foo: "0000000000", bar: "0000000000", baz: "0000000000"} -# -# # good -# {foo: "0000000000", -# bar: "0000000000", baz: "0000000000"} -# -# # good (with recommended cops enabled) -# { -# foo: "0000000000", -# bar: "0000000000", -# baz: "0000000000", -# } -# -# source://rubocop//lib/rubocop/cop/layout/line_length.rb#63 -class RuboCop::Cop::Layout::LineLength < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CheckLineBreakable - include ::RuboCop::Cop::AllowedPattern - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::LineLengthHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 - def max=(value); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#87 - def on_array(node); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#74 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#87 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#87 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#83 - def on_dstr(node); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#87 - def on_hash(node); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#102 - def on_investigation_end; end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#96 - def on_new_investigation; end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#74 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#87 - def on_potential_breakable_node(node); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#87 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#79 - def on_str(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#307 - def allow_heredoc?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#315 - def allow_string_split?; end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#311 - def allowed_heredoc; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#264 - def allowed_line?(line, line_index); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#179 - def breakable_block_range(block_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#366 - def breakable_dstr?(node); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#228 - def breakable_dstr_begin_position(node); end - - # Returns the value of attribute breakable_range. - # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#110 - def breakable_range; end - - # Sets the attribute breakable_range - # - # @param value the value to set the attribute breakable_range to. - # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#110 - def breakable_range=(_arg0); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#187 - def breakable_range_after_semicolon(semicolon_token); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#233 - def breakable_range_by_line_index; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#170 - def breakable_string?(node); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#237 - def breakable_string_delimiters; end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#200 - def breakable_string_position(node); end - - # Locate where to break a string that is too long, ensuring that escape characters - # are not bisected. - # If the string contains spaces, use them to determine a place for a clean break; - # otherwise, the string will be broken at the line length limit. - # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#212 - def breakable_string_range(node); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#342 - def check_directive_line(line, line_index); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#133 - def check_for_breakable_block(block_node); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#155 - def check_for_breakable_dstr(node); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#112 - def check_for_breakable_node(node); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#125 - def check_for_breakable_semicolons(processed_source); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#143 - def check_for_breakable_str(node); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#252 - def check_line(line, line_index); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#359 - def check_uri_line(line, line_index); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#292 - def excess_range(uri_range, line, line_index); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#319 - def extract_heredocs(ast); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#241 - def heredocs; end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#245 - def highlight_start(line); end - - # Find the largest possible substring of a string node to retain before a break - # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#380 - def largest_possible_string(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#338 - def line_in_heredoc?(line_number); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#329 - def line_in_permitted_heredoc?(line_number); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#303 - def max; end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#274 - def register_offense(loc, line, line_index, length: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#270 - def shebang?(line, line_index); end - - # source://rubocop//lib/rubocop/cop/layout/line_length.rb#371 - def string_delimiter(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/line_length.rb#72 -RuboCop::Cop::Layout::LineLength::MSG = T.let(T.unsafe(nil), String) - -# Checks that the closing brace in an array literal is either -# on the same line as the last array element or on a new line. -# -# When using the `symmetrical` (default) style: -# -# If an array's opening brace is on the same line as the first element -# of the array, then the closing brace should be on the same line as -# the last element of the array. -# -# If an array's opening brace is on the line above the first element -# of the array, then the closing brace should be on the line below -# the last element of the array. -# -# When using the `new_line` style: -# -# The closing brace of a multi-line array literal must be on the line -# after the last element of the array. -# -# When using the `same_line` style: -# -# The closing brace of a multi-line array literal must be on the same -# line as the last element of the array. -# -# @example EnforcedStyle: symmetrical (default) -# # bad -# [ :a, -# :b -# ] -# -# # bad -# [ -# :a, -# :b ] -# -# # good -# [ :a, -# :b ] -# -# # good -# [ -# :a, -# :b -# ] -# @example EnforcedStyle: new_line -# # bad -# [ -# :a, -# :b ] -# -# # bad -# [ :a, -# :b ] -# -# # good -# [ :a, -# :b -# ] -# -# # good -# [ -# :a, -# :b -# ] -# @example EnforcedStyle: same_line -# # bad -# [ :a, -# :b -# ] -# -# # bad -# [ -# :a, -# :b -# ] -# -# # good -# [ -# :a, -# :b ] -# -# # good -# [ :a, -# :b ] -# -# source://rubocop//lib/rubocop/cop/layout/multiline_array_brace_layout.rb#91 -class RuboCop::Cop::Layout::MultilineArrayBraceLayout < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MultilineLiteralBraceLayout - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/multiline_array_brace_layout.rb#109 - def on_array(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/multiline_array_brace_layout.rb#103 -RuboCop::Cop::Layout::MultilineArrayBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/multiline_array_brace_layout.rb#106 -RuboCop::Cop::Layout::MultilineArrayBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/multiline_array_brace_layout.rb#99 -RuboCop::Cop::Layout::MultilineArrayBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/multiline_array_brace_layout.rb#95 -RuboCop::Cop::Layout::MultilineArrayBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# Ensures that each item in a multi-line array -# starts on a separate line. -# -# @example -# -# # bad -# [ -# a, b, -# c -# ] -# -# # good -# [ -# a, -# b, -# c -# ] -# -# # good -# [ -# a, -# b, -# foo( -# bar -# ) -# ] -# @example AllowMultilineFinalElement: false (default) -# -# # bad -# [a, b, foo( -# bar -# )] -# @example AllowMultilineFinalElement: true -# -# # good -# [a, b, foo( -# bar -# )] -# -# 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#53 - def on_array(node); end - - private - - # @return [Boolean] - # - # 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#51 -RuboCop::Cop::Layout::MultilineArrayLineBreaks::MSG = T.let(T.unsafe(nil), String) - -# Checks whether the multiline assignments have a newline -# after the assignment operator. -# -# @example EnforcedStyle: new_line (default) -# # bad -# foo = if expression -# 'bar' -# end -# -# # good -# foo = -# if expression -# 'bar' -# end -# -# # good -# foo = -# begin -# compute -# rescue => e -# nil -# end -# @example EnforcedStyle: same_line -# # good -# foo = if expression -# 'bar' -# end -# @example SupportedTypes: ['block', 'case', 'class', 'if', 'kwbegin', 'module'] (default) -# # good -# foo = -# if expression -# 'bar' -# end -# -# # good -# foo = -# [1].map do |i| -# i + 1 -# end -# @example SupportedTypes: ['block'] -# # good -# foo = if expression -# 'bar' -# end -# -# # good -# foo = -# [1].map do |i| -# 'bar' * i -# end -# -# source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#60 -class RuboCop::Cop::Layout::MultilineAssignmentLayout < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CheckAssignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#72 - def check_assignment(node, rhs); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#81 - def check_by_enforced_style(node, rhs); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#90 - def check_new_line_offense(node, rhs); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#98 - def check_same_line_offense(node, rhs); end - - private - - # source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#111 - def supported_types; end -end - -# source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#66 -RuboCop::Cop::Layout::MultilineAssignmentLayout::NEW_LINE_OFFENSE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#69 -RuboCop::Cop::Layout::MultilineAssignmentLayout::SAME_LINE_OFFENSE = T.let(T.unsafe(nil), String) - -# Checks whether the multiline do end blocks have a newline -# after the start of the block. Additionally, it checks whether the block -# arguments, if any, are on the same line as the start of the -# block. Putting block arguments on separate lines, because the whole -# line would otherwise be too long, is accepted. -# -# @example -# # bad -# blah do |i| foo(i) -# bar(i) -# end -# -# # bad -# blah do -# |i| foo(i) -# bar(i) -# end -# -# # good -# blah do |i| -# foo(i) -# bar(i) -# end -# -# # bad -# blah { |i| foo(i) -# bar(i) -# } -# -# # good -# blah { |i| -# foo(i) -# bar(i) -# } -# -# # good -# blah { | -# long_list, -# of_parameters, -# that_would_not, -# fit_on_one_line -# | -# foo(i) -# bar(i) -# } -# -# source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#51 -class RuboCop::Cop::Layout::MultilineBlockLayout < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#59 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#59 - def on_numblock(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#98 - def add_offense_for_expression(node, expr, msg); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#75 - def args_on_beginning_line?(node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#105 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#120 - def autocorrect_arguments(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#130 - def autocorrect_body(corrector, node, block_body); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#142 - def block_arg_string(node, args); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#90 - def characters_needed_for_space_and_pipes(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#154 - def include_trailing_comma?(args); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#79 - def line_break_necessary_in_args?(node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#83 - def needed_length_for_args(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#56 -RuboCop::Cop::Layout::MultilineBlockLayout::ARG_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#55 -RuboCop::Cop::Layout::MultilineBlockLayout::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#57 -RuboCop::Cop::Layout::MultilineBlockLayout::PIPE_SIZE = T.let(T.unsafe(nil), Integer) - -# Checks that the closing brace in a hash literal is either -# on the same line as the last hash element, or a new line. -# -# When using the `symmetrical` (default) style: -# -# If a hash's opening brace is on the same line as the first element -# of the hash, then the closing brace should be on the same line as -# the last element of the hash. -# -# If a hash's opening brace is on the line above the first element -# of the hash, then the closing brace should be on the line below -# the last element of the hash. -# -# When using the `new_line` style: -# -# The closing brace of a multi-line hash literal must be on the line -# after the last element of the hash. -# -# When using the `same_line` style: -# -# The closing brace of a multi-line hash literal must be on the same -# line as the last element of the hash. -# -# @example EnforcedStyle: symmetrical (default) -# -# # bad -# { a: 1, -# b: 2 -# } -# # bad -# { -# a: 1, -# b: 2 } -# -# # good -# { a: 1, -# b: 2 } -# -# # good -# { -# a: 1, -# b: 2 -# } -# @example EnforcedStyle: new_line -# # bad -# { -# a: 1, -# b: 2 } -# -# # bad -# { a: 1, -# b: 2 } -# -# # good -# { a: 1, -# b: 2 -# } -# -# # good -# { -# a: 1, -# b: 2 -# } -# @example EnforcedStyle: same_line -# # bad -# { a: 1, -# b: 2 -# } -# -# # bad -# { -# a: 1, -# b: 2 -# } -# -# # good -# { -# a: 1, -# b: 2 } -# -# # good -# { a: 1, -# b: 2 } -# -# source://rubocop//lib/rubocop/cop/layout/multiline_hash_brace_layout.rb#91 -class RuboCop::Cop::Layout::MultilineHashBraceLayout < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MultilineLiteralBraceLayout - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/multiline_hash_brace_layout.rb#109 - def on_hash(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/multiline_hash_brace_layout.rb#103 -RuboCop::Cop::Layout::MultilineHashBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/multiline_hash_brace_layout.rb#106 -RuboCop::Cop::Layout::MultilineHashBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/multiline_hash_brace_layout.rb#99 -RuboCop::Cop::Layout::MultilineHashBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/multiline_hash_brace_layout.rb#95 -RuboCop::Cop::Layout::MultilineHashBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# Ensures that each key in a multi-line hash -# starts on a separate line. -# -# @example -# -# # bad -# { -# a: 1, b: 2, -# c: 3 -# } -# -# # good -# { -# a: 1, -# b: 2, -# c: 3 -# } -# -# # good -# { -# a: 1, -# b: { -# c: 3, -# } -# } -# @example AllowMultilineFinalElement: false (default) -# -# # bad -# { a: 1, b: { -# c: 3, -# }} -# @example AllowMultilineFinalElement: true -# -# # good -# { a: 1, b: { -# c: 3, -# }} -# -# 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#52 - def on_hash(node); end - - private - - # @return [Boolean] - # - # 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#64 - def starts_with_curly_brace?(node); end -end - -# 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 -# starts on a separate line. -# -# NOTE: This cop does not move the first argument, if you want that to -# be on a separate line, see `Layout/FirstMethodArgumentLineBreak`. -# -# @example -# -# # bad -# foo(a, b, -# c -# ) -# -# # bad -# foo(a, b, { -# foo: "bar", -# }) -# -# # good -# foo( -# a, -# b, -# c -# ) -# -# # good -# foo(a, b, c) -# @example AllowMultilineFinalElement: false (default) -# -# # bad -# foo(a, b, -# c -# ) -# -# # bad -# foo( -# a, b, { -# foo: "bar", -# } -# ) -# -# # good -# foo( -# a, -# b, -# { -# foo: "bar", -# } -# ) -# @example AllowMultilineFinalElement: true -# -# # bad -# foo(a, b, -# c -# ) -# -# # good -# foo( -# a, b, { -# foo: "bar", -# } -# ) -# -# # good -# foo( -# a, -# b, -# { -# foo: "bar", -# } -# ) -# -# source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#80 -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#86 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#86 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#106 - def ignore_last_element?; end -end - -# source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#84 -RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks::MSG = T.let(T.unsafe(nil), String) - -# Checks that the closing brace in a method call is either -# on the same line as the last method argument, or a new line. -# -# When using the `symmetrical` (default) style: -# -# If a method call's opening brace is on the same line as the first -# argument of the call, then the closing brace should be on the same -# line as the last argument of the call. -# -# If a method call's opening brace is on the line above the first -# argument of the call, then the closing brace should be on the line -# below the last argument of the call. -# -# When using the `new_line` style: -# -# The closing brace of a multi-line method call must be on the line -# after the last argument of the call. -# -# When using the `same_line` style: -# -# The closing brace of a multi-line method call must be on the same -# line as the last argument of the call. -# -# @example EnforcedStyle: symmetrical (default) -# # bad -# foo(a, -# b -# ) -# -# # bad -# foo( -# a, -# b) -# -# # good -# foo(a, -# b) -# -# # good -# foo( -# a, -# b -# ) -# @example EnforcedStyle: new_line -# # bad -# foo( -# a, -# b) -# -# # bad -# foo(a, -# b) -# -# # good -# foo(a, -# b -# ) -# -# # good -# foo( -# a, -# b -# ) -# @example EnforcedStyle: same_line -# # bad -# foo(a, -# b -# ) -# -# # bad -# foo( -# a, -# b -# ) -# -# # good -# foo( -# a, -# b) -# -# # good -# foo(a, -# b) -# -# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#91 -class RuboCop::Cop::Layout::MultilineMethodCallBraceLayout < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MultilineLiteralBraceLayout - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#109 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#109 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#116 - def children(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#120 - def ignored_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#124 - def single_line_ignoring_receiver?(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#103 -RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#106 -RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#99 -RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#95 -RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# Checks the indentation of the method name part in method calls -# that span more than one line. -# -# @example EnforcedStyle: aligned (default) -# # bad -# while myvariable -# .b -# # do something -# end -# -# # good -# while myvariable -# .b -# # do something -# end -# -# # good -# Thing.a -# .b -# .c -# @example EnforcedStyle: indented -# # good -# while myvariable -# .b -# -# # do something -# end -# @example EnforcedStyle: indented_relative_to_receiver -# # good -# while myvariable -# .a -# .b -# -# # do something -# end -# -# # good -# myvariable = Thing -# .a -# .b -# .c -# -# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#49 -class RuboCop::Cop::Layout::MultilineMethodCallIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::MultilineExpressionIndentation - extend ::RuboCop::Cop::AutoCorrector - - # @raise [ValidationError] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#55 - def validate_config; end - - private - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#136 - def align_with_base_message(rhs); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#152 - def alignment_base(node, rhs, given_style); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#67 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#140 - def base_source; end - - # 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#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#217 - def get_dot_right_above(node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#113 - def message(node, lhs, rhs); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#144 - def no_base_message(lhs, rhs, node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#87 - def offending_range(node, lhs, rhs, given_style); end - - # @yield [operation_rhs.first_argument] - # - # 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#257 - def operator_rhs?(node, receiver); end - - # a - # .b - # .c - # - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#193 - def receiver_alignment_base(node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#131 - def relative_to_receiver_message(rhs); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#71 - def relevant_node?(send_node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#75 - def right_hand_side(send_node); end - - # a.b - # .c - # - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#181 - def semantic_alignment_base(node, rhs); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#201 - def semantic_alignment_node(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#127 - def should_align_with_base?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#123 - def should_indent_relative_to_receiver?; end - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#163 - def syntactic_alignment_base(lhs, rhs); end -end - -# Checks that the closing brace in a method definition is either -# on the same line as the last method parameter, or a new line. -# -# When using the `symmetrical` (default) style: -# -# If a method definition's opening brace is on the same line as the -# first parameter of the definition, then the closing brace should be -# on the same line as the last parameter of the definition. -# -# If a method definition's opening brace is on the line above the first -# parameter of the definition, then the closing brace should be on the -# line below the last parameter of the definition. -# -# When using the `new_line` style: -# -# The closing brace of a multi-line method definition must be on the line -# after the last parameter of the definition. -# -# When using the `same_line` style: -# -# The closing brace of a multi-line method definition must be on the same -# line as the last parameter of the definition. -# -# @example EnforcedStyle: symmetrical (default) -# # bad -# def foo(a, -# b -# ) -# end -# -# # bad -# def foo( -# a, -# b) -# end -# -# # good -# def foo(a, -# b) -# end -# -# # good -# def foo( -# a, -# b -# ) -# end -# @example EnforcedStyle: new_line -# # bad -# def foo( -# a, -# b) -# end -# -# # bad -# def foo(a, -# b) -# end -# -# # good -# def foo(a, -# b -# ) -# end -# -# # good -# def foo( -# a, -# b -# ) -# end -# @example EnforcedStyle: same_line -# # bad -# def foo(a, -# b -# ) -# end -# -# # bad -# def foo( -# a, -# b -# ) -# end -# -# # good -# def foo( -# a, -# b) -# end -# -# # good -# def foo(a, -# b) -# end -# -# source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#103 -class RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MultilineLiteralBraceLayout - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#121 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#121 - def on_defs(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#115 -RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#118 -RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#111 -RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#107 -RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -# Ensures that each parameter in a multi-line method definition -# starts on a separate line. -# -# NOTE: This cop does not move the first argument, if you want that to -# be on a separate line, see `Layout/FirstMethodParameterLineBreak`. -# -# @example -# -# # bad -# def foo(a, b, -# c -# ) -# end -# -# # good -# def foo( -# a, -# b, -# c -# ) -# end -# -# # good -# def foo( -# a, -# b = { -# foo: "bar", -# } -# ) -# end -# -# # good -# def foo(a, b, c) -# end -# @example AllowMultilineFinalElement: false (default) -# -# # bad -# def foo(a, b = { -# foo: "bar", -# }) -# end -# @example AllowMultilineFinalElement: true -# -# # good -# def foo(a, b = { -# foo: "bar", -# }) -# end -# -# 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#63 - def on_def(node); end - - private - - # @return [Boolean] - # - # 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#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 -# span more than one line. -# -# The `aligned` style checks that operators are aligned if they are part of an `if` or `while` -# condition, an explicit `return` statement, etc. In other contexts, the second operand should -# be indented regardless of enforced style. -# -# @example EnforcedStyle: aligned (default) -# # bad -# if a + -# b -# something && -# something_else -# end -# -# # good -# if a + -# b -# something && -# something_else -# end -# @example EnforcedStyle: indented -# # bad -# if a + -# b -# something && -# something_else -# end -# -# # good -# if a + -# b -# something && -# something_else -# end -# -# source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#43 -class RuboCop::Cop::Layout::MultilineOperationIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::MultilineExpressionIndentation - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#49 - def on_and(node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#53 - def on_or(node); end - - # @raise [ValidationError] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#57 - def validate_config; end - - private - - # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#68 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#78 - def check_and_or(node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#109 - def message(node, lhs, rhs); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#83 - def offending_range(node, lhs, rhs, given_style); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#72 - def relevant_node?(node); end - - # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#120 - def right_hand_side(send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#96 - def should_align?(node, rhs, given_style); end -end - -# Check that the parameters on a multi-line method call or definition are aligned. -# -# To set the alignment of the first argument, use the -# `Layout/FirstParameterIndentation` cop. -# -# @example EnforcedStyle: with_first_parameter (default) -# # good -# -# def foo(bar, -# baz) -# 123 -# end -# -# def foo( -# bar, -# baz -# ) -# 123 -# end -# -# # bad -# -# def foo(bar, -# baz) -# 123 -# end -# -# # bad -# -# def foo( -# bar, -# baz) -# 123 -# end -# @example EnforcedStyle: with_fixed_indentation -# # good -# -# def foo(bar, -# baz) -# 123 -# end -# -# def foo( -# bar, -# baz -# ) -# 123 -# end -# -# # bad -# -# def foo(bar, -# baz) -# 123 -# end -# -# # bad -# -# def foo( -# bar, -# baz) -# 123 -# end -# -# source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#70 -class RuboCop::Cop::Layout::ParameterAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#80 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#80 - def on_defs(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#89 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#101 - def base_column(node, args); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#97 - def fixed_indentation?; end - - # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#93 - def message(_node); end - - # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#112 - def target_method_lineno(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#74 -RuboCop::Cop::Layout::ParameterAlignment::ALIGN_PARAMS_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#77 -RuboCop::Cop::Layout::ParameterAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), String) - -# Checks whether certain expressions, e.g. method calls, that could fit -# completely on a single line, are broken up into multiple lines unnecessarily. -# -# @example any configuration -# # bad -# foo( -# a, -# b -# ) -# -# puts 'string that fits on ' \ -# 'a single line' -# -# things -# .select { |thing| thing.cond? } -# .join('-') -# -# # good -# foo(a, b) -# -# puts 'string that fits on a single line' -# -# things.select { |thing| thing.cond? }.join('-') -# @example InspectBlocks: false (default) -# # good -# foo(a) do |x| -# puts x -# end -# @example InspectBlocks: true -# # bad -# foo(a) do |x| -# puts x -# end -# -# # good -# foo(a) { |x| puts x } -# -# source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#45 -class RuboCop::Cop::Layout::RedundantLineBreak < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CheckAssignment - include ::RuboCop::Cop::CheckSingleLineSuitability - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#56 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#52 - def on_lvasgn(node); end - - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#56 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#74 - def check_assignment(node, _rhs); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#104 - def configured_to_not_be_inspected?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#121 - def convertible_block?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#70 - def end_with_percent_blank_string?(processed_source); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#98 - def index_access_call_chained?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#87 - def offense?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#111 - def other_cop_takes_precedence?(node); end - - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#80 - def register_offense(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#94 - def require_backslash?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#117 - def single_line_block_chain_enabled?; end -end - -# source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#50 -RuboCop::Cop::Layout::RedundantLineBreak::MSG = T.let(T.unsafe(nil), String) - -# Checks whether the rescue and ensure keywords are aligned -# properly. -# -# @example -# -# # bad -# begin -# something -# rescue -# puts 'error' -# end -# -# # good -# begin -# something -# rescue -# puts 'error' -# end -# -# source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#24 -class RuboCop::Cop::Layout::RescueEnsureAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::EndKeywordAlignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#40 - def on_ensure(node); end - - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#44 - def on_new_investigation; end - - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#36 - def on_resbody(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#187 - def access_modifier?(node); end - - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#164 - def access_modifier_node(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#150 - def aligned_with_leading_dot?(do_keyword_line, send_node_loc, rescue_keyword_column); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#137 - def aligned_with_line_break_method?(ancestor_node, node); end - - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#196 - def alignment_location(alignment_node); end - - # We will use ancestor or wrapper with access modifier. - # - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#117 - def alignment_node(node); end - - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#96 - def alignment_source(node, starting_loc); end - - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#133 - def ancestor_node(node); end - - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#156 - def assignment_node(node); end - - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#73 - def autocorrect(corrector, node, alignment_location); end - - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#204 - def begin_end_alignment_style; end - - # Check alignment of node with rescue or ensure modifiers. - # - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#57 - def check(node); end - - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#83 - def format_message(alignment_node, alignment_loc, kw_loc); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#174 - def modifier?(node); end - - # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#180 - def whitespace_range(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#34 -RuboCop::Cop::Layout::RescueEnsureAlignment::ALTERNATIVE_ACCESS_MODIFIERS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#32 -RuboCop::Cop::Layout::RescueEnsureAlignment::ANCESTOR_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#33 -RuboCop::Cop::Layout::RescueEnsureAlignment::ANCESTOR_TYPES_WITH_ACCESS_MODIFIERS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#29 -RuboCop::Cop::Layout::RescueEnsureAlignment::MSG = T.let(T.unsafe(nil), String) - -# Checks if method calls are chained onto single line blocks. It considers that a -# line break before the dot improves the readability of the code. -# -# @example -# # bad -# example.select { |item| item.cond? }.join('-') -# -# # good -# example.select { |item| item.cond? } -# .join('-') -# -# # good (not a concern for this cop) -# example.select do |item| -# item.cond? -# end.join('-') -# -# source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#22 -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#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#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#40 - def offending_range(node); end - - # 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 -RuboCop::Cop::Layout::SingleLineBlockChain::MSG = T.let(T.unsafe(nil), String) - -# Checks for colon (`:`) not followed by some kind of space. -# N.B. this cop does not handle spaces after a ternary operator, which are -# instead handled by `Layout/SpaceAroundOperators`. -# -# @example -# # bad -# def f(a:, b:2); {a:3}; end -# -# # good -# def f(a:, b: 2); {a: 3}; end -# -# source://rubocop//lib/rubocop/cop/layout/space_after_colon.rb#16 -class RuboCop::Cop::Layout::SpaceAfterColon < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_after_colon.rb#29 - def on_kwoptarg(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_after_colon.rb#21 - def on_pair(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_after_colon.rb#43 - def followed_by_space?(colon); end - - # source://rubocop//lib/rubocop/cop/layout/space_after_colon.rb#39 - def register_offense(colon); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_after_colon.rb#19 -RuboCop::Cop::Layout::SpaceAfterColon::MSG = T.let(T.unsafe(nil), String) - -# Checks for comma (`,`) not followed by some kind of space. -# -# @example -# -# # bad -# [1,2] -# { foo:bar,} -# -# # good -# [1, 2] -# { foo:bar, } -# -# source://rubocop//lib/rubocop/cop/layout/space_after_comma.rb#17 -class RuboCop::Cop::Layout::SpaceAfterComma < ::RuboCop::Cop::Base - include ::RuboCop::Cop::SpaceAfterPunctuation - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_after_comma.rb#26 - def kind(token); end - - # 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. -# -# @example -# -# # bad -# def func (x) end -# def method= (y) end -# -# # good -# def func(x) end -# def method=(y) end -# -# source://rubocop//lib/rubocop/cop/layout/space_after_method_name.rb#17 -class RuboCop::Cop::Layout::SpaceAfterMethodName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_after_method_name.rb#23 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_after_method_name.rb#23 - def on_defs(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_after_method_name.rb#21 -RuboCop::Cop::Layout::SpaceAfterMethodName::MSG = T.let(T.unsafe(nil), String) - -# Checks for space after `!`. -# -# @example -# # bad -# ! something -# -# # good -# !something -# -# source://rubocop//lib/rubocop/cop/layout/space_after_not.rb#14 -class RuboCop::Cop::Layout::SpaceAfterNot < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_after_not.rb#21 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_after_not.rb#33 - def whitespace_after_operator?(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_after_not.rb#18 -RuboCop::Cop::Layout::SpaceAfterNot::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_after_not.rb#19 -RuboCop::Cop::Layout::SpaceAfterNot::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for semicolon (`;`) not followed by some kind of space. -# -# @example -# # bad -# x = 1;y = 2 -# -# # good -# x = 1; y = 2 -# -# source://rubocop//lib/rubocop/cop/layout/space_after_semicolon.rb#14 -class RuboCop::Cop::Layout::SpaceAfterSemicolon < ::RuboCop::Cop::Base - include ::RuboCop::Cop::SpaceAfterPunctuation - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_after_semicolon.rb#23 - def kind(token); end - - # source://rubocop//lib/rubocop/cop/layout/space_after_semicolon.rb#18 - def space_style_before_rcurly; end -end - -# Checks the spacing inside and after block parameters pipes. Line breaks -# inside parameter pipes are checked by `Layout/MultilineBlockLayout` and -# not by this cop. -# -# @example EnforcedStyleInsidePipes: no_space (default) -# # bad -# {}.each { | x, y |puts x } -# ->( x, y ) { puts x } -# -# # good -# {}.each { |x, y| puts x } -# ->(x, y) { puts x } -# @example EnforcedStyleInsidePipes: space -# # bad -# {}.each { |x, y| puts x } -# ->(x, y) { puts x } -# -# # good -# {}.each { | x, y | puts x } -# ->( x, y ) { puts x } -# -# source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#27 -class RuboCop::Cop::Layout::SpaceAroundBlockParameters < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#32 - def on_block(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#65 - def check_after_closing_pipe(arguments); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#125 - def check_arg(arg); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#103 - def check_closing_pipe_space(arguments, closing_pipe); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#121 - def check_each_arg(args); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#56 - def check_inside_pipes(arguments); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#150 - def check_no_space(space_begin_pos, space_end_pos, msg); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#73 - def check_no_space_style_inside_pipes(arguments); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#92 - def check_opening_pipe_space(arguments, opening_pipe); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#136 - def check_space(space_begin_pos, space_end_pos, range, msg, node = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#85 - def check_space_style_inside_pipes(arguments); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#113 - def last_end_pos_inside_pipes(arguments, range); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#44 - def pipes(arguments); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#48 - def pipes?(arguments); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#52 - def style_parameter_name; end -end - -# Checks that the equals signs in parameter default assignments -# have or don't have surrounding space depending on configuration. -# -# @example EnforcedStyle: space (default) -# # bad -# def some_method(arg1=:default, arg2=nil, arg3=[]) -# # do something... -# end -# -# # good -# def some_method(arg1 = :default, arg2 = nil, arg3 = []) -# # do something... -# end -# @example EnforcedStyle: no_space -# # bad -# def some_method(arg1 = :default, arg2 = nil, arg3 = []) -# # do something... -# end -# -# # good -# def some_method(arg1=:default, arg2=nil, arg3=[]) -# # do something... -# end -# -# source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#30 -class RuboCop::Cop::Layout::SpaceAroundEqualsInParameterDefault < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#38 - def on_optarg(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#67 - def autocorrect(corrector, range); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#46 - def check_optarg(arg, equals, value); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#58 - def incorrect_style_detected(arg, value); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#83 - def message(_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#79 - def no_surrounding_space?(arg, equals); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#75 - def space_on_both_sides?(arg, equals); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#36 -RuboCop::Cop::Layout::SpaceAroundEqualsInParameterDefault::MSG = T.let(T.unsafe(nil), String) - -# Checks the spacing around the keywords. -# -# @example -# -# # bad -# something 'test'do|x| -# end -# -# while(something) -# end -# -# something = 123if test -# -# # good -# something 'test' do |x| -# end -# -# while (something) -# end -# -# something = 123 if test -# -# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#27 -class RuboCop::Cop::Layout::SpaceAroundKeyword < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#41 - def on_and(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#45 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#49 - def on_break(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#53 - def on_case(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#57 - def on_case_match(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#157 - def on_defined?(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#61 - def on_ensure(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#65 - def on_for(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#69 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#73 - def on_if_guard(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#77 - def on_in_pattern(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#81 - def on_kwbegin(node); end - - # Handle one-line pattern matching syntax (`in`) with `Parser::Ruby27`. - # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#86 - def on_match_pattern(node); end - - # Handle one-line pattern matching syntax (`in`) with `Parser::Ruby30`. - # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#93 - def on_match_pattern_p(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#97 - def on_next(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#101 - def on_or(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#105 - def on_postexe(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#109 - def on_preexe(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#113 - def on_resbody(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#117 - def on_rescue(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#121 - def on_return(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#125 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#129 - def on_super(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#137 - def on_unless_guard(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#141 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#145 - def on_when(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#149 - def on_while(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#153 - def on_yield(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#133 - def on_zsuper(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#236 - def accept_left_parenthesis?(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#240 - def accept_left_square_bracket?(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#244 - def accept_namespace_operator?(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#229 - def accepted_opening_delimiter?(range, char); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#163 - def check(node, locations, begin_keyword = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#178 - def check_begin(node, range, begin_keyword); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#184 - def check_end(node, range, begin_keyword); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#197 - def check_keyword(node, range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#193 - def do?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#252 - def namespace_operator?(range, pos); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#256 - def preceded_by_operator?(node, _range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#248 - def safe_navigation_call?(range, pos); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#218 - def space_after_missing?(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#211 - def space_before_missing?(range); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#36 -RuboCop::Cop::Layout::SpaceAroundKeyword::ACCEPT_LEFT_PAREN = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#37 -RuboCop::Cop::Layout::SpaceAroundKeyword::ACCEPT_LEFT_SQUARE_BRACKET = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#38 -RuboCop::Cop::Layout::SpaceAroundKeyword::ACCEPT_NAMESPACE_OPERATOR = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#33 -RuboCop::Cop::Layout::SpaceAroundKeyword::DO = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#31 -RuboCop::Cop::Layout::SpaceAroundKeyword::MSG_AFTER = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#30 -RuboCop::Cop::Layout::SpaceAroundKeyword::MSG_BEFORE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#35 -RuboCop::Cop::Layout::SpaceAroundKeyword::NAMESPACE_OPERATOR = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#39 -RuboCop::Cop::Layout::SpaceAroundKeyword::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#34 -RuboCop::Cop::Layout::SpaceAroundKeyword::SAFE_NAVIGATION = T.let(T.unsafe(nil), String) - -# Checks method call operators to not have spaces around them. -# -# @example -# # bad -# foo. bar -# foo .bar -# foo . bar -# foo. bar .buzz -# foo -# . bar -# . buzz -# foo&. bar -# foo &.bar -# foo &. bar -# foo &. bar&. buzz -# RuboCop:: Cop -# RuboCop:: Cop:: Base -# :: RuboCop::Cop -# -# # good -# foo.bar -# foo.bar.buzz -# foo -# .bar -# .buzz -# foo&.bar -# foo&.bar&.buzz -# RuboCop::Cop -# RuboCop::Cop::Base -# ::RuboCop::Cop -# -# source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#37 -class RuboCop::Cop::Layout::SpaceAroundMethodCallOperator < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#53 - def on_const(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#45 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#45 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#87 - def check_space(begin_pos, end_pos); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#67 - def check_space_after_dot(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#81 - def check_space_after_double_colon(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#61 - def check_space_before_dot(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#43 -RuboCop::Cop::Layout::SpaceAroundMethodCallOperator::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#41 -RuboCop::Cop::Layout::SpaceAroundMethodCallOperator::SPACES_REGEXP = T.let(T.unsafe(nil), Regexp) - -# Checks that operators have space around them, except for ** which -# should or shouldn't have surrounding space depending on configuration. -# It allows vertical alignment consisting of one or more whitespace -# around operators. -# -# This cop has `AllowForAlignment` option. When `true`, allows most -# uses of extra spacing if the intent is to align with an operator on -# the previous or next line, not counting empty lines or comment lines. -# -# @example -# # bad -# total = 3*4 -# "apple"+"juice" -# my_number = 38/4 -# -# # good -# total = 3 * 4 -# "apple" + "juice" -# my_number = 38 / 4 -# @example AllowForAlignment: true (default) -# # good -# { -# 1 => 2, -# 11 => 3 -# } -# @example AllowForAlignment: false -# # bad -# { -# 1 => 2, -# 11 => 3 -# } -# @example EnforcedStyleForExponentOperator: no_space (default) -# # bad -# a ** b -# -# # good -# a**b -# @example EnforcedStyleForExponentOperator: space -# # bad -# a**b -# -# # good -# a ** b -# @example EnforcedStyleForRationalLiterals: no_space (default) -# # bad -# 1 / 48r -# -# # 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#132 - def on_and(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#115 - def on_and_asgn(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#115 - def on_assignment(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#132 - def on_binary(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#115 - def on_casgn(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#124 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#115 - def on_cvasgn(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#115 - def on_gvasgn(node); end - - # 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#115 - def on_ivasgn(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#115 - def on_lvasgn(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#115 - def on_masgn(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#148 - def on_match_pattern(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#115 - def on_op_asgn(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#132 - def on_or(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#115 - def on_or_asgn(node); end - - # 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#99 - def on_resbody(node); end - - # 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#105 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#140 - def on_setter_method(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#258 - def align_hash_cop_config; end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#197 - def autocorrect(corrector, range, right_operand); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#178 - def check_operator(type, operator, right_operand); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#211 - def enclose_operator_with_space(corrector, range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#238 - def excess_leading_space?(type, operator, with_space); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#253 - def excess_trailing_space?(right_operand, with_space); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#276 - def force_equal_sign_alignment?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#262 - def hash_table_style?; end - - # @yield [msg] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#192 - def offense(type, operator, with_space, right_operand); end - - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#224 - def offense_message(type, operator, with_space, right_operand); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#174 - def operator_with_regular_syntax?(send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#168 - def regular_operator?(send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#280 - def should_not_have_surrounding_space?(operator, right_operand); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#266 - def space_around_exponent_operator?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#270 - def space_around_slash_operator?(right_operand); end - - class << self - # 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#74 -RuboCop::Cop::Layout::SpaceAroundOperators::EXCESSIVE_SPACE = T.let(T.unsafe(nil), String) - -# 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 -# brace depending on configuration. -# -# @example EnforcedStyle: space (default) -# # bad -# foo.map{ |a| -# a.bar.to_s -# } -# -# # good -# foo.map { |a| -# a.bar.to_s -# } -# @example EnforcedStyle: no_space -# # bad -# foo.map { |a| -# a.bar.to_s -# } -# -# # good -# foo.map{ |a| -# a.bar.to_s -# } -# @example EnforcedStyleForEmptyBraces: space (default) -# # bad -# 7.times{} -# -# # good -# 7.times {} -# @example EnforcedStyleForEmptyBraces: no_space -# # bad -# 7.times {} -# -# # good -# 7.times{} -# -# source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#44 -class RuboCop::Cop::Layout::SpaceBeforeBlockBraces < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#56 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#56 - def on_numblock(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#133 - def autocorrect(corrector, range); end - - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#153 - def block_delimiters_style; end - - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#83 - def check_empty(left_brace, space_plus_brace, used_style); end - - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#109 - def check_non_empty(left_brace, space_plus_brace, used_style); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#149 - def conflict_with_block_delimiters?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#157 - def empty_braces?(loc); end - - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#101 - def handle_different_styles_for_empty_braces(used_style); end - - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#124 - def space_detected(left_brace, space_plus_brace); end - - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#117 - def space_missing(left_brace); end - - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#140 - def style_for_empty_braces; end - - class << self - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#52 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#50 -RuboCop::Cop::Layout::SpaceBeforeBlockBraces::DETECTED_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#49 -RuboCop::Cop::Layout::SpaceBeforeBlockBraces::MISSING_MSG = T.let(T.unsafe(nil), String) - -# Checks for space between the name of a receiver and a left -# brackets. -# -# @example -# -# # bad -# collection [index_or_key] -# -# # good -# collection[index_or_key] -# -# source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#17 -class RuboCop::Cop::Layout::SpaceBeforeBrackets < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#24 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#48 - def dot_before_brackets?(node, receiver_end_pos, selector_begin_pos); end - - # source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#35 - def offense_range(node, begin_pos); end - - # source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#54 - def offense_range_for_assignment(node, begin_pos); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#67 - def reference_variable_with_brackets?(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#63 - def register_offense(range); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#21 -RuboCop::Cop::Layout::SpaceBeforeBrackets::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#22 -RuboCop::Cop::Layout::SpaceBeforeBrackets::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for comma (`,`) preceded by space. -# -# @example -# # bad -# [1 , 2 , 3] -# a(1 , 2) -# each { |a , b| } -# -# # good -# [1, 2, 3] -# a(1, 2) -# each { |a, b| } -# -# source://rubocop//lib/rubocop/cop/layout/space_before_comma.rb#19 -class RuboCop::Cop::Layout::SpaceBeforeComma < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SpaceBeforePunctuation - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_before_comma.rb#23 - def kind(token); end -end - -# Checks for missing space between a token and a comment on the -# same line. -# -# @example -# # bad -# 1 + 1# this operation does ... -# -# # good -# 1 + 1 # this operation does ... -# -# source://rubocop//lib/rubocop/cop/layout/space_before_comment.rb#15 -class RuboCop::Cop::Layout::SpaceBeforeComment < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_before_comment.rb#20 - def on_new_investigation; end -end - -# source://rubocop//lib/rubocop/cop/layout/space_before_comment.rb#18 -RuboCop::Cop::Layout::SpaceBeforeComment::MSG = T.let(T.unsafe(nil), String) - -# Checks that exactly one space is used between a method name and the -# first argument for method calls without parentheses. -# -# Alternatively, extra spaces can be added to align the argument with -# something on a preceding or following line, if the AllowForAlignment -# config parameter is true. -# -# @example -# # bad -# something x -# something y, z -# something'hello' -# -# # good -# something x -# something y, z -# something 'hello' -# -# source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#24 -class RuboCop::Cop::Layout::SpaceBeforeFirstArg < ::RuboCop::Cop::Base - include ::RuboCop::Cop::PrecedingFollowingAlignment - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#35 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#35 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#55 - def expect_params_after_method_name?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#64 - def no_space_between_method_name_and_first_argument?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#51 - def regular_method_call_with_arguments?(node); end - - class << self - # source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#31 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#29 -RuboCop::Cop::Layout::SpaceBeforeFirstArg::MSG = T.let(T.unsafe(nil), String) - -# Checks for semicolon (`;`) preceded by space. -# -# @example -# # bad -# x = 1 ; y = 2 -# -# # good -# x = 1; y = 2 -# -# source://rubocop//lib/rubocop/cop/layout/space_before_semicolon.rb#14 -class RuboCop::Cop::Layout::SpaceBeforeSemicolon < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SpaceBeforePunctuation - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_before_semicolon.rb#18 - def kind(token); end -end - -# Checks for spaces between `->` and opening parameter -# parenthesis (`(`) in lambda literals. -# -# @example EnforcedStyle: require_no_space (default) -# # bad -# a = -> (x, y) { x + y } -# -# # good -# a = ->(x, y) { x + y } -# @example EnforcedStyle: require_space -# # bad -# a = ->(x, y) { x + y } -# -# # good -# a = -> (x, y) { x + y } -# -# source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#22 -class RuboCop::Cop::Layout::SpaceInLambdaLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#30 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#50 - def arrow_lambda_with_args?(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#72 - def lambda_arguments(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#65 - def range_of_offense(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#58 - def space_after_arrow(lambda_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#54 - def space_after_arrow?(lambda_node); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#28 -RuboCop::Cop::Layout::SpaceInLambdaLiteral::MSG_REQUIRE_NO_SPACE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#27 -RuboCop::Cop::Layout::SpaceInLambdaLiteral::MSG_REQUIRE_SPACE = T.let(T.unsafe(nil), String) - -# Checks that brackets used for array literals have or don't have -# surrounding space depending on configuration. -# -# @example EnforcedStyle: no_space (default) -# # The `no_space` style enforces that array literals have -# # no surrounding space. -# -# # bad -# array = [ a, b, c, d ] -# array = [ a, [ b, c ]] -# -# # good -# array = [a, b, c, d] -# array = [a, [b, c]] -# @example EnforcedStyle: space -# # The `space` style enforces that array literals have -# # surrounding space. -# -# # bad -# array = [a, b, c, d] -# array = [ a, [ b, c ]] -# -# # good -# array = [ a, b, c, d ] -# array = [ a, [ b, c ] ] -# @example EnforcedStyle: compact -# # The `compact` style normally requires a space inside -# # array brackets, with the exception that successive left -# # or right brackets are collapsed together in nested arrays. -# -# # bad -# array = [a, b, c, d] -# array = [ a, [ b, c ] ] -# array = [ -# [ a ], -# [ b, c ] -# ] -# -# # good -# array = [ a, b, c, d ] -# array = [ a, [ b, c ]] -# array = [[ a ], -# [ b, c ]] -# @example EnforcedStyleForEmptyBrackets: no_space (default) -# # The `no_space` EnforcedStyleForEmptyBrackets style enforces that -# # empty array brackets do not contain spaces. -# -# # bad -# foo = [ ] -# bar = [ ] -# -# # good -# foo = [] -# bar = [] -# @example EnforcedStyleForEmptyBrackets: space -# # The `space` EnforcedStyleForEmptyBrackets style enforces that -# # empty array brackets contain exactly one space. -# -# # bad -# foo = [] -# bar = [ ] -# -# # good -# foo = [ ] -# bar = [ ] -# -# source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#76 -class RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#84 - def on_array(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#115 - def array_brackets(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#101 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#223 - def compact(corrector, bracket, side); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#209 - def compact_corrections(corrector, node, left, right); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#201 - def compact_offense(node, token, side: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#163 - def compact_offenses(node, left, right, start_ok, end_ok); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#124 - def empty_config; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#132 - def end_has_own_line?(token); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#139 - def index_for(node, token); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#147 - def issue_offenses(node, left, right, start_ok, end_ok); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#143 - def line_and_column_for(token); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#184 - def multi_dimensional_array?(node, token, side: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#195 - def next_to_bracket?(token, side: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#159 - def next_to_comment?(node, token); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#128 - def next_to_newline?(node, token); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#176 - def qualifies_for_compact?(node, token, side: T.unsafe(nil)); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#82 -RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets::EMPTY_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#81 -RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets::MSG = T.let(T.unsafe(nil), String) - -# Checks for unnecessary additional spaces inside array percent literals -# (i.e. %i/%w). -# -# Note that blank percent literals (e.g. `%i( )`) are checked by -# `Layout/SpaceInsidePercentLiteralDelimiters`. -# -# @example -# -# # bad -# %w(foo bar baz) -# # good -# %i(foo bar baz) -# -# source://rubocop//lib/rubocop/cop/layout/space_inside_array_percent_literal.rb#18 -class RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::MatchRange - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_percent_literal.rb#26 - def on_array(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_percent_literal.rb#30 - def on_percent_literal(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/space_inside_array_percent_literal.rb#40 - def each_unnecessary_space_match(node, &blk); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_inside_array_percent_literal.rb#23 -RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_inside_array_percent_literal.rb#24 -RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral::MULTIPLE_SPACES_BETWEEN_ITEMS_REGEX = T.let(T.unsafe(nil), Regexp) - -# Checks that block braces have or don't have surrounding space inside -# them on configuration. For blocks taking parameters, it checks that the -# left brace has or doesn't have trailing space depending on -# configuration. -# -# @example EnforcedStyle: space (default) -# # The `space` style enforces that block braces have -# # surrounding space. -# -# # bad -# some_array.each {puts e} -# -# # good -# some_array.each { puts e } -# @example EnforcedStyle: no_space -# # The `no_space` style enforces that block braces don't -# # have surrounding space. -# -# # bad -# some_array.each { puts e } -# -# # good -# some_array.each {puts e} -# @example EnforcedStyleForEmptyBraces: no_space (default) -# # The `no_space` EnforcedStyleForEmptyBraces style enforces that -# # block braces don't have a space in between when empty. -# -# # bad -# some_array.each { } -# some_array.each { } -# some_array.each { } -# -# # good -# some_array.each {} -# @example EnforcedStyleForEmptyBraces: space -# # The `space` EnforcedStyleForEmptyBraces style enforces that -# # block braces have at least a space in between when empty. -# -# # bad -# some_array.each {} -# -# # good -# some_array.each { } -# some_array.each { } -# some_array.each { } -# @example SpaceBeforeBlockParameters: true (default) -# # The SpaceBeforeBlockParameters style set to `true` enforces that -# # there is a space between `{` and `|`. Overrides `EnforcedStyle` -# # if there is a conflict. -# -# # bad -# [1, 2, 3].each {|n| n * 2 } -# -# # good -# [1, 2, 3].each { |n| n * 2 } -# @example SpaceBeforeBlockParameters: false -# # The SpaceBeforeBlockParameters style set to `false` enforces that -# # there is no space between `{` and `|`. Overrides `EnforcedStyle` -# # if there is a conflict. -# -# # bad -# [1, 2, 3].each { |n| n * 2 } -# -# # good -# [1, 2, 3].each {|n| n * 2 } -# -# source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#79 -class RuboCop::Cop::Layout::SpaceInsideBlockBraces < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#89 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#89 - def on_numblock(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#126 - def adjacent_braces(left_brace, right_brace); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#165 - def aligned_braces?(inner, right_brace, column); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#134 - def braces_with_contents_inside(node, inner); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#109 - def check_inside(node, left_brace, right_brace); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#141 - def check_left_brace(inner, left_brace, args_delimiter); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#149 - def check_right_brace(node, inner, left_brace, right_brace, single_line); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#169 - def inner_last_space_count(inner); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#161 - def multiline_block?(left_brace, right_brace); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#226 - def no_space(begin_pos, end_pos, msg); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#173 - def no_space_inside_left_brace(left_brace, args_delimiter); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#242 - def offense(begin_pos, end_pos, msg, style_param = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#205 - def pipe?(args_delimiter); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#234 - def space(begin_pos, end_pos, msg); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#190 - def space_inside_left_brace(left_brace, args_delimiter); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#209 - def space_inside_right_brace(inner, right_brace, column); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#257 - def style_for_empty_braces; end - - class << self - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#85 - def autocorrect_incompatible_with; end - end -end - -# Checks that braces used for hash literals have or don't have -# surrounding space depending on configuration. -# -# @example EnforcedStyle: space (default) -# # The `space` style enforces that hash literals have -# # surrounding space. -# -# # bad -# h = {a: 1, b: 2} -# foo = {{ a: 1 } => { b: { c: 2 }}} -# -# # good -# h = { a: 1, b: 2 } -# foo = { { a: 1 } => { b: { c: 2 } } } -# @example EnforcedStyle: no_space -# # The `no_space` style enforces that hash literals have -# # no surrounding space. -# -# # bad -# h = { a: 1, b: 2 } -# foo = {{ a: 1 } => { b: { c: 2 }}} -# -# # good -# h = {a: 1, b: 2} -# foo = {{a: 1} => {b: {c: 2}}} -# @example EnforcedStyle: compact -# # The `compact` style normally requires a space inside -# # hash braces, with the exception that successive left -# # braces or right braces are collapsed together in nested hashes. -# -# # bad -# h = { a: { b: 2 } } -# foo = { { a: 1 } => { b: { c: 2 } } } -# -# # good -# h = { a: { b: 2 }} -# foo = {{ a: 1 } => { b: { c: 2 }}} -# @example EnforcedStyleForEmptyBraces: no_space (default) -# # The `no_space` EnforcedStyleForEmptyBraces style enforces that -# # empty hash braces do not contain spaces. -# -# # bad -# foo = { } -# bar = { } -# baz = { -# } -# -# # good -# foo = {} -# bar = {} -# baz = {} -# @example EnforcedStyleForEmptyBraces: space -# # The `space` EnforcedStyleForEmptyBraces style enforces that -# # empty hash braces contain space. -# -# # bad -# foo = {} -# -# # good -# foo = { } -# foo = { } -# foo = { -# } -# -# source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#74 -class RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#82 - def on_hash(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#141 - def ambiguous_or_unexpected_style_detected(style, is_match); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#133 - def autocorrect(corrector, range); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#93 - def check(token1, token2); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#188 - def check_whitespace_only_hash(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#206 - def enforce_no_space_style_for_empty_braces?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#108 - def expect_space?(token1, token2); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#121 - def incorrect_style_detected(token1, token2, expect_space, is_empty_braces); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#154 - def message(brace, is_empty_braces, expect_space); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#149 - def offense?(token1, expect_space); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#200 - def range_inside_hash(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#180 - def range_of_space_to_the_left(range); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#172 - def range_of_space_to_the_right(range); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#164 - def space_range(token_range); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#80 -RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces::MSG = T.let(T.unsafe(nil), String) - -# Checks for spaces inside ordinary round parentheses. -# -# @example EnforcedStyle: no_space (default) -# # The `no_space` style enforces that parentheses do not have spaces. -# -# # bad -# f( 3) -# g = (a + 3 ) -# f( ) -# -# # good -# f(3) -# g = (a + 3) -# f() -# @example EnforcedStyle: space -# # The `space` style enforces that parentheses have a space at the -# # beginning and end. -# # Note: Empty parentheses should not have spaces. -# -# # bad -# f(3) -# g = (a + 3) -# y( ) -# -# # good -# f( 3 ) -# g = ( a + 3 ) -# y() -# @example EnforcedStyle: compact -# # The `compact` style enforces that parentheses have a space at the -# # beginning with the exception that successive parentheses are allowed. -# # Note: Empty parentheses should not have spaces. -# -# # bad -# f(3) -# g = (a + 3) -# y( ) -# g( f( x ) ) -# g( f( x( 3 ) ), 5 ) -# g( ( ( 3 + 5 ) * f) ** x, 5 ) -# -# # good -# f( 3 ) -# g = ( a + 3 ) -# y() -# g( f( x )) -# g( f( x( 3 )), 5 ) -# g((( 3 + 5 ) * f ) ** x, 5 ) -# -# source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#57 -class RuboCop::Cop::Layout::SpaceInsideParens < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#66 - def on_new_investigation; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#161 - def can_be_ignored?(token1, token2); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#99 - def correct_extraneous_space(tokens); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#115 - def correct_extraneous_space_between_consecutive_parens(token1, token2); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#124 - def correct_extraneous_space_in_empty_parens(token1, token2); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#135 - def correct_missing_space(token1, token2); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#153 - def left_parens?(token1, token2); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#149 - def parens?(token1, token2); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#88 - def process_with_compact_style(tokens); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#81 - def process_with_space_style(tokens); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#157 - def right_parens?(token1, token2); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#63 -RuboCop::Cop::Layout::SpaceInsideParens::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#64 -RuboCop::Cop::Layout::SpaceInsideParens::MSG_SPACE = T.let(T.unsafe(nil), String) - -# Checks for unnecessary additional spaces inside the delimiters of -# %i/%w/%x literals. -# -# @example -# -# # bad -# %i( foo bar baz ) -# -# # good -# %i(foo bar baz) -# -# # bad -# %w( foo bar baz ) -# -# # good -# %w(foo bar baz) -# -# # bad -# %x( ls -l ) -# -# # good -# %x(ls -l) -# -# # bad -# %w( ) -# %w( -# ) -# -# # good -# %w() -# -# source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#36 -class RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::MatchRange - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#45 - def on_array(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#53 - def on_percent_literal(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#49 - def on_xstr(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#60 - def add_offenses_for_blank_spaces(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#69 - def add_offenses_for_unnecessary_spaces(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#85 - def body_range(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#79 - def regex_matches(node, &blk); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#42 -RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters::BEGIN_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#43 -RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters::END_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#41 -RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters::MSG = T.let(T.unsafe(nil), String) - -# Checks for spaces inside range literals. -# -# @example -# # bad -# 1 .. 3 -# -# # good -# 1..3 -# -# # bad -# 'a' .. 'z' -# -# # good -# 'a'..'z' -# -# source://rubocop//lib/rubocop/cop/layout/space_inside_range_literal.rb#20 -class RuboCop::Cop::Layout::SpaceInsideRangeLiteral < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_inside_range_literal.rb#29 - def on_erange(node); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_range_literal.rb#25 - def on_irange(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/space_inside_range_literal.rb#35 - def check(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_inside_range_literal.rb#23 -RuboCop::Cop::Layout::SpaceInsideRangeLiteral::MSG = T.let(T.unsafe(nil), String) - -# Checks that reference brackets have or don't have -# surrounding space depending on configuration. -# -# @example EnforcedStyle: no_space (default) -# # The `no_space` style enforces that reference brackets have -# # no surrounding space. -# -# # bad -# hash[ :key ] -# array[ index ] -# -# # good -# hash[:key] -# array[index] -# @example EnforcedStyle: space -# # The `space` style enforces that reference brackets have -# # surrounding space. -# -# # bad -# hash[:key] -# array[index] -# -# # good -# hash[ :key ] -# array[ index ] -# @example EnforcedStyleForEmptyBrackets: no_space (default) -# # The `no_space` EnforcedStyleForEmptyBrackets style enforces that -# # empty reference brackets do not contain spaces. -# -# # bad -# foo[ ] -# foo[ ] -# foo[ -# ] -# -# # good -# foo[] -# @example EnforcedStyleForEmptyBrackets: space -# # The `space` EnforcedStyleForEmptyBrackets style enforces that -# # empty reference brackets contain exactly one space. -# -# # bad -# foo[] -# foo[ ] -# foo[ -# ] -# -# # good -# foo[ ] -# -# source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#60 -class RuboCop::Cop::Layout::SpaceInsideReferenceBrackets < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#70 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#92 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#121 - def closing_bracket(tokens, opening_bracket); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#137 - def empty_config; end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#110 - def left_ref_bracket(node, tokens); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#132 - def previous_token(current_token); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#104 - def reference_brackets(node); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#66 -RuboCop::Cop::Layout::SpaceInsideReferenceBrackets::EMPTY_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#65 -RuboCop::Cop::Layout::SpaceInsideReferenceBrackets::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#68 -RuboCop::Cop::Layout::SpaceInsideReferenceBrackets::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for whitespace within string interpolations. -# -# @example EnforcedStyle: no_space (default) -# # bad -# var = "This is the #{ space } example" -# -# # good -# var = "This is the #{no_space} example" -# @example EnforcedStyle: space -# # bad -# var = "This is the #{no_space} example" -# -# # good -# var = "This is the #{ space } example" -# -# source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#21 -class RuboCop::Cop::Layout::SpaceInsideStringInterpolation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Interpolation - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#29 - def on_interpolation(begin_node); end - - private - - # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#45 - def autocorrect(corrector, begin_node); end - - # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#55 - def delimiters(begin_node); end -end - -# source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#27 -RuboCop::Cop::Layout::SpaceInsideStringInterpolation::MSG = T.let(T.unsafe(nil), String) - -# Looks for trailing blank lines and a final newline in the -# source code. -# -# @example EnforcedStyle: final_newline (default) -# # `final_newline` looks for one newline at the end of files. -# -# # bad -# class Foo; end -# -# # EOF -# -# # bad -# class Foo; end # EOF -# -# # good -# class Foo; end -# # EOF -# @example EnforcedStyle: final_blank_line -# # `final_blank_line` looks for one blank line followed by a new line -# # at the end of files. -# -# # bad -# class Foo; end -# # EOF -# -# # bad -# class Foo; end # EOF -# -# # good -# class Foo; end -# -# # EOF -# -# source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#40 -class RuboCop::Cop::Layout::TrailingEmptyLines < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#45 - def on_new_investigation; end - - private - - # @return [Boolean] - # - # 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#94 - def message(wanted_blank_lines, blank_lines); end - - # 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 - -# Looks for trailing whitespace in the source code. -# -# @example -# # The line in this example contains spaces after the 0. -# # bad -# x = 0 -# -# # The line in this example ends directly after the 0. -# # good -# x = 0 -# @example AllowInHeredoc: false (default) -# # The line in this example contains spaces after the 0. -# # bad -# code = <<~RUBY -# x = 0 -# RUBY -# -# # ok -# code = <<~RUBY -# x = 0 #{} -# RUBY -# -# # good -# trailing_whitespace = ' ' -# code = <<~RUBY -# x = 0#{trailing_whitespace} -# RUBY -# @example AllowInHeredoc: true -# # The line in this example contains spaces after the 0. -# # good -# code = <<~RUBY -# x = 0 -# RUBY -# -# source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#42 -class RuboCop::Cop::Layout::TrailingWhitespace < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Heredoc - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#57 - def on_heredoc(_node); end - - # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#49 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#112 - def extract_heredocs(ast); end - - # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#103 - def find_heredoc(line_number); end - - # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#108 - def heredocs; end - - # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#125 - def offense_range(lineno, line); end - - # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#61 - def process_line(line, lineno); end - - # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#75 - def process_line_in_heredoc(corrector, range, heredoc); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#99 - def skip_heredoc?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#95 - def static?(heredoc); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#86 - def whitespace_is_indentation?(range, level); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#90 - def whitespace_only?(range); end -end - -# source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#47 -RuboCop::Cop::Layout::TrailingWhitespace::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#5 -module RuboCop::Cop::Legacy; end - -# Legacy support for Corrector#corrections -# See https://docs.rubocop.org/rubocop/v1_upgrade_notes.html -# -# source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#8 -class RuboCop::Cop::Legacy::CorrectionsProxy - # @return [CorrectionsProxy] a new instance of CorrectionsProxy - # - # source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#9 - def initialize(corrector); end - - # source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#13 - def <<(callable); end - - # source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#21 - def concat(corrections); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#17 - def empty?; end - - protected - - # Returns the value of attribute corrector. - # - # source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#31 - def corrector; end - - private - - # source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#35 - def suppress_clobbering; end -end - -# This class handles autocorrection for code that needs to be moved -# to new lines. -# -# source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#7 -class RuboCop::Cop::LineBreakCorrector - extend ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::TrailingBody - extend ::RuboCop::PathUtil - extend ::RuboCop::Cop::Util - - class << self - # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#27 - def break_line_before(range:, node:, corrector:, configured_width:, indent_steps: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#15 - def correct_trailing_body(configured_width:, corrector:, node:, processed_source:); end - - # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#35 - def move_comment(eol_comment:, node:, corrector:); end - - # Returns the value of attribute processed_source. - # - # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#13 - def processed_source; end - - private - - # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#45 - def remove_semicolon(node, corrector); end - - # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#51 - def semicolon(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#60 - def trailing_class_definition?(token, body); end - end -end - -# Help methods for determining if a line is too long. -# -# source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#6 -module RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::Alignment - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#24 - def allow_uri?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#28 - def allowed_uri_position?(line, uri_range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#15 - def directive_on_source_line?(line_index); end - - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#73 - def extend_uri_end_position(line, end_position); end - - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#36 - def find_excessive_uri_range(line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#11 - def ignore_cop_directives?; end - - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#60 - def indentation_difference(line); end - - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#32 - def line_length(line); end - - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#111 - def line_length_without_directive(line); end - - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#52 - def match_uris(string); end - - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#89 - def tab_indentation_width; end - - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#94 - def uri_regexp; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#104 - def valid_uri?(uri_ish_string); end -end - -# source://rubocop//lib/rubocop/cop/mixin/unused_argument.rb#5 -module RuboCop::Cop::Lint; end - -# Checks for mistyped shorthand assignments. -# -# @example -# # bad -# x =- y -# x =+ y -# x =* y -# x =! y -# -# # good -# x -= y # or x = -y -# x += y # or x = +y -# x *= y # or x = *y -# x != y # or x = !y -# -# source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#21 -class RuboCop::Cop::Lint::AmbiguousAssignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#30 - def on_asgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#30 - def on_casgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#30 - def on_cvasgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#30 - def on_gvasgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#30 - def on_ivasgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#30 - def on_lvasgn(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#44 - def rhs(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#28 -RuboCop::Cop::Lint::AmbiguousAssignment::MISTAKES = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#24 -RuboCop::Cop::Lint::AmbiguousAssignment::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#26 -RuboCop::Cop::Lint::AmbiguousAssignment::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) - -# Checks for ambiguous block association with method -# when param passed without parentheses. -# -# This cop can customize allowed methods with `AllowedMethods`. -# By default, there are no methods to allowed. -# -# @example -# -# # bad -# some_method a { |val| puts val } -# -# # good -# # With parentheses, there's no ambiguity. -# some_method(a { |val| puts val }) -# # or (different meaning) -# some_method(a) { |val| puts val } -# -# # good -# # Operator methods require no disambiguation -# foo == bar { |b| b.baz } -# -# # good -# # Lambda arguments require no disambiguation -# foo = ->(bar) { bar.baz } -# @example AllowedMethods: [] (default) -# -# # bad -# expect { do_something }.to change { object.attribute } -# @example AllowedMethods: [change] -# -# # good -# expect { do_something }.to change { object.attribute } -# @example AllowedPatterns: [] (default) -# -# # bad -# expect { do_something }.to change { object.attribute } -# @example AllowedPatterns: ['change'] -# -# # good -# expect { do_something }.to change { object.attribute } -# expect { do_something }.to not_change { object.attribute } -# -# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#52 -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 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#62 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#83 - def allowed_method_pattern?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#79 - def ambiguous_block_association?(send_node); end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#89 - def message(send_node); end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#95 - def wrap_in_parentheses(corrector, node); end -end - -# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#58 -RuboCop::Cop::Lint::AmbiguousBlockAssociation::MSG = T.let(T.unsafe(nil), String) - -# Checks for ambiguous operators in the first argument of a -# method invocation without parentheses. -# -# @example -# -# # bad -# -# # The `*` is interpreted as a splat operator but it could possibly be -# # a `*` method invocation (i.e. `do_something.*(some_array)`). -# do_something *some_array -# -# # good -# -# # With parentheses, there's no ambiguity. -# do_something(*some_array) -# -# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#21 -class RuboCop::Cop::Lint::AmbiguousOperator < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#43 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#62 - def find_offense_node_by(diagnostic); end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#80 - def message(diagnostic); end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#90 - def offense_node(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#86 - def offense_position?(node, diagnostic); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#99 - def unary_operator?(node, diagnostic); end - - class << self - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#39 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#24 -RuboCop::Cop::Lint::AmbiguousOperator::AMBIGUITIES = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#34 -RuboCop::Cop::Lint::AmbiguousOperator::MSG_FORMAT = T.let(T.unsafe(nil), String) - -# Looks for expressions containing multiple binary operators -# where precedence is ambiguous due to lack of parentheses. For example, -# in `1 + 2 * 3`, the multiplication will happen before the addition, but -# lexically it appears that the addition will happen first. -# -# The cop does not consider unary operators (ie. `!a` or `-b`) or comparison -# operators (ie. `a =~ b`) because those are not ambiguous. -# -# NOTE: Ranges are handled by `Lint/AmbiguousRange`. -# -# @example -# # bad -# a + b * c -# a || b && c -# a ** b + c -# -# # good (different precedence) -# a + (b * c) -# a || (b && c) -# (a ** b) + c -# -# # good (same precedence) -# a + b + c -# a * b / c % d -# -# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#30 -class RuboCop::Cop::Lint::AmbiguousOperatorPrecedence < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#54 - def on_and(node); end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#47 - def on_new_investigation; end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#65 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#105 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#89 - def greater_precedence?(node1, node2); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#85 - def operator?(node); end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#97 - def operator_name(node); end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#79 - def precedence(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#45 -RuboCop::Cop::Lint::AmbiguousOperatorPrecedence::MSG = T.let(T.unsafe(nil), String) - -# See https://ruby-doc.org/core-3.0.2/doc/syntax/precedence_rdoc.html -# -# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#34 -RuboCop::Cop::Lint::AmbiguousOperatorPrecedence::PRECEDENCE = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#44 -RuboCop::Cop::Lint::AmbiguousOperatorPrecedence::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for ambiguous ranges. -# -# Ranges have quite low precedence, which leads to unexpected behavior when -# using a range with other operators. This cop avoids that by making ranges -# explicit by requiring parenthesis around complex range boundaries (anything -# that is not a literal: numerics, strings, symbols, etc.). -# -# This cop can be configured with `RequireParenthesesForMethodChains` in order to -# specify whether method chains (including `self.foo`) should be wrapped in parens -# by this cop. -# -# NOTE: Regardless of this configuration, if a method receiver is a basic literal -# value, it will be wrapped in order to prevent the ambiguity of `1..2.to_a`. -# -# @example -# # bad -# x || 1..2 -# (x || 1..2) -# 1..2.to_a -# -# # good, unambiguous -# 1..2 -# 'a'..'z' -# :bar..:baz -# MyClass::MIN..MyClass::MAX -# @min..@max -# a..b -# -a..b -# -# # good, ambiguity removed -# x || (1..2) -# (x || 1)..2 -# (x || 1)..(y || 2) -# (1..2).to_a -# @example RequireParenthesesForMethodChains: false (default) -# # good -# a.foo..b.bar -# (a.foo)..(b.bar) -# @example RequireParenthesesForMethodChains: true -# # bad -# a.foo..b.bar -# -# # good -# (a.foo)..(b.bar) -# -# source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#59 -class RuboCop::Cop::Lint::AmbiguousRange < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RationalLiteral - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#65 - def on_erange(node); end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#65 - def on_irange(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#84 - def acceptable?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#92 - def acceptable_call?(node); end - - # @yield [range.begin] - # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#78 - def each_boundary(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#102 - def require_parentheses_for_method_chain?; end -end - -# source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#63 -RuboCop::Cop::Lint::AmbiguousRange::MSG = T.let(T.unsafe(nil), String) - -# Checks for ambiguous regexp literals in the first argument of -# a method invocation without parentheses. -# -# @example -# -# # bad -# -# # This is interpreted as a method invocation with a regexp literal, -# # but it could possibly be `/` method invocations. -# # (i.e. `do_something./(pattern)./(i)`) -# do_something /pattern/i -# -# # good -# -# # With parentheses, there's no ambiguity. -# do_something(/pattern/i) -# -# source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#22 -class RuboCop::Cop::Lint::AmbiguousRegexpLiteral < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#29 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#54 - def find_offense_node(node, regexp_receiver); end - - # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#47 - def find_offense_node_by(diagnostic); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#65 - def first_argument_is_regexp?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#69 - def method_chain_to_regexp_receiver?(node, regexp_receiver); end -end - -# source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#25 -RuboCop::Cop::Lint::AmbiguousRegexpLiteral::MSG = T.let(T.unsafe(nil), String) - -# Checks for an array literal interpolated inside a regexp. -# -# When interpolating an array literal, it is converted to a string. This means -# that when inside a regexp, it acts as a character class but with additional -# quotes, spaces and commas that are likely not intended. For example, -# `/#{%w[a b c]}/` parses as `/["a", "b", "c"]/` (or `/["a, bc]/` without -# repeated characters). -# -# The cop can autocorrect to a character class (if all items in the array are a -# single character) or alternation (if the array contains longer items). -# -# NOTE: This only considers interpolated arrays that contain only strings, symbols, -# integers, and floats. Any other type is not easily convertible to a character class -# or regexp alternation. -# -# @example -# # bad -# /#{%w[a b c]}/ -# -# # good -# /[abc]/ -# -# # bad -# /#{%w[foo bar baz]}/ -# -# # good -# /(?:foo|bar|baz)/ -# -# # bad - construct a regexp rather than interpolate an array of identifiers -# /#{[foo, bar]}/ -# -# source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#41 -class RuboCop::Cop::Lint::ArrayLiteralInRegexp < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Interpolation - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#53 - def on_interpolation(begin_node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#107 - def alternation_for(values); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#68 - def array_of_literal_values?(node); end - - # source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#93 - def array_values(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#99 - def character_class?(values); end - - # source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#103 - def character_class_for(values); end - - # source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#111 - def escape_values(values); end - - # source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#72 - def register_array_of_literal_values(begin_node, node); end - - # source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#88 - def register_array_of_nonliteral_values(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#45 -RuboCop::Cop::Lint::ArrayLiteralInRegexp::LITERAL_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#49 -RuboCop::Cop::Lint::ArrayLiteralInRegexp::MSG_ALTERNATION = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#48 -RuboCop::Cop::Lint::ArrayLiteralInRegexp::MSG_CHARACTER_CLASS = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#50 -RuboCop::Cop::Lint::ArrayLiteralInRegexp::MSG_UNKNOWN = T.let(T.unsafe(nil), String) - -# Checks for assignments in the conditions of -# if/while/until. -# -# `AllowSafeAssignment` option for safe assignment. -# By safe assignment we mean putting parentheses around -# an assignment to indicate "I know I'm using an assignment -# as a condition. It's not a mistake." -# -# @example -# # bad -# if some_var = value -# do_something -# end -# -# # good -# if some_var == value -# do_something -# end -# @example AllowSafeAssignment: true (default) -# # good -# if (some_var = value) -# do_something -# end -# @example AllowSafeAssignment: false -# # bad -# if (some_var = value) -# do_something -# end -# -# source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#41 -class RuboCop::Cop::Lint::AssignmentInCondition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::SafeAssignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#55 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#55 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#55 - def on_while(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#80 - def allowed_construct?(asgn_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#84 - def conditional_assignment?(asgn_node); end - - # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#72 - def message(_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#88 - def skip_children?(asgn_node); end - - # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#94 - def traverse_node(node, &block); end -end - -# source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#53 -RuboCop::Cop::Lint::AssignmentInCondition::ASGN_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#50 -RuboCop::Cop::Lint::AssignmentInCondition::MSG_WITHOUT_SAFE_ASSIGNMENT_ALLOWED = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#46 -RuboCop::Cop::Lint::AssignmentInCondition::MSG_WITH_SAFE_ASSIGNMENT_ALLOWED = T.let(T.unsafe(nil), String) - -# `BigDecimal.new()` is deprecated since BigDecimal 1.3.3. -# This cop identifies places where `BigDecimal.new()` -# can be replaced by `BigDecimal()`. -# -# @example -# # bad -# BigDecimal.new(123.456, 3) -# -# # good -# BigDecimal(123.456, 3) -# -# source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#17 -class RuboCop::Cop::Lint::BigDecimalNew < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#24 - def big_decimal_new(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#29 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#20 -RuboCop::Cop::Lint::BigDecimalNew::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#21 -RuboCop::Cop::Lint::BigDecimalNew::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for places where binary operator has identical operands. -# -# It covers comparison operators: `==`, `===`, `=~`, `>`, `>=`, `<`, ``<=``; -# bitwise operators: `|`, `^`, `&`; -# boolean operators: `&&`, `||` -# 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 -# do so. Operations such as `-` or `/` where the result will always be the same -# (`x - x` will always be 0; `x / x` will always be 1) are offenses, but these -# are covered by `Lint/NumericOperationWithConstantResult` instead. -# -# @example -# # bad -# x.top >= x.top -# -# if a.x != 0 && a.x != 0 -# do_something -# end -# -# def child? -# left_child || left_child -# end -# -# # good -# x + x -# 1 << 1 -# -# source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#46 -class RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#57 - def on_and(node); end - - # source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#57 - def on_or(node); end - - # source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#50 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#47 -RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#48 -RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for `:true` and `:false` symbols. -# In most cases it would be a typo. -# -# @example -# -# # bad -# :true -# -# # good -# true -# -# # bad -# :false -# -# # good -# false -# -# source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#27 -class RuboCop::Cop::Lint::BooleanSymbol < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#33 - def boolean_symbol?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#35 - def on_sym(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#48 - def autocorrect(corrector, node); end -end - -# source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#30 -RuboCop::Cop::Lint::BooleanSymbol::MSG = T.let(T.unsafe(nil), String) - -# Checks for circular argument references in optional keyword -# arguments and optional ordinal arguments. -# -# This cop mirrors a warning produced by MRI since 2.2. -# -# NOTE: This syntax is no longer valid on Ruby 2.7 or higher. -# -# @example -# -# # bad -# def bake(pie: pie) -# pie.heat_up -# end -# -# # good -# def bake(pie:) -# pie.refrigerate -# end -# -# # good -# def bake(pie: self.pie) -# pie.feed_to(user) -# end -# -# # bad -# def cook(dry_ingredients = dry_ingredients) -# dry_ingredients.reduce(&:+) -# end -# -# # good -# def cook(dry_ingredients = self.dry_ingredients) -# dry_ingredients.combine -# end -# -# source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#39 -class RuboCop::Cop::Lint::CircularArgumentReference < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#46 - def on_kwoptarg(node); end - - # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#50 - def on_optarg(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#56 - def check_for_circular_argument_references(arg_name, arg_value); end -end - -# source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#42 -RuboCop::Cop::Lint::CircularArgumentReference::MSG = T.let(T.unsafe(nil), String) - -# Do not define constants within a block, since the block's scope does not -# isolate or namespace the constant in any way. -# -# If you are trying to define that constant once, define it outside of -# the block instead, or use a variable or method if defining the constant -# in the outer scope would be problematic. -# -# For meta-programming, use `const_set`. -# -# @example -# # bad -# task :lint do -# FILES_TO_LINT = Dir['lib/*.rb'] -# end -# -# # bad -# describe 'making a request' do -# class TestRequest; end -# end -# -# # bad -# module M -# extend ActiveSupport::Concern -# included do -# LIST = [] -# end -# end -# -# # good -# task :lint do -# files_to_lint = Dir['lib/*.rb'] -# end -# -# # good -# describe 'making a request' do -# let(:test_request) { Class.new } -# # see also `stub_const` for RSpec -# end -# -# # good -# module M -# extend ActiveSupport::Concern -# included do -# const_set(:LIST, []) -# end -# end -# @example AllowedMethods: ['enums'] (default) -# # good -# -# # `enums` for Typed Enums via `T::Enum` in Sorbet. -# # https://sorbet.org/docs/tenum -# class TestEnum < T::Enum -# enums do -# Foo = new("foo") -# end -# end -# -# source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#64 -class RuboCop::Cop::Lint::ConstantDefinitionInBlock < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - - # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#70 - def constant_assigned_in_block?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#75 - def module_defined_in_block?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#79 - def on_casgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#85 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#85 - def on_module(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#94 - def method_name(node); end -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 =>``. -# -# You intended to write as `rescue StandardError`. -# However, you have written `rescue => StandardError`. -# In that case, the result of `rescue` will overwrite `StandardError`. -# -# @example -# -# # bad -# begin -# something -# rescue => StandardError -# end -# -# # good -# begin -# something -# rescue StandardError -# end -# -# source://rubocop//lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb#26 -class RuboCop::Cop::Lint::ConstantOverwrittenInRescue < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb#41 - def on_resbody(node); end - - # source://rubocop//lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb#33 - def overwritten_constant(param0 = T.unsafe(nil)); end - - class << self - # source://rubocop//lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb#37 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb#30 -RuboCop::Cop::Lint::ConstantOverwrittenInRescue::MSG = T.let(T.unsafe(nil), String) - -# Checks for constant reassignments. -# -# Emulates Ruby's runtime warning "already initialized constant X" -# when a constant is reassigned in the same file and namespace using the -# `NAME = value` syntax. -# -# The cop cannot catch all offenses, like, for example, when a constant -# is reassigned in another file, or when using metaprogramming (`Module#const_set`). -# -# The cop only takes into account constants assigned in a "simple" way: directly -# inside class/module definition, or within another constant. Other type of assignments -# (e.g., inside a conditional) are disregarded. -# -# The cop also tracks constant removal using `Module#remove_const` with symbol -# or string argument. -# -# @example -# # bad -# X = :foo -# X = :bar -# -# # bad -# class A -# X = :foo -# X = :bar -# end -# -# # bad -# module A -# X = :foo -# X = :bar -# end -# -# # good - keep only one assignment -# X = :bar -# -# class A -# X = :bar -# end -# -# module A -# X = :bar -# end -# -# # good - use OR assignment -# X = :foo -# X ||= :bar -# -# # good - use conditional assignment -# X = :foo -# X = :bar unless defined?(X) -# -# # good - remove the assigned constant first -# class A -# X = :foo -# remove_const :X -# X = :bar -# end -# -# source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#65 -class RuboCop::Cop::Lint::ConstantReassignment < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#76 - def on_casgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#84 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#71 - def remove_constant(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#135 - def ancestor_namespaces(node); end - - # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#142 - def constant_names; end - - # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#131 - def constant_namespaces(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#98 - def fixed_constant_path?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#111 - def freeze_method?(node); end - - # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#115 - def fully_qualified_constant_name(node); end - - # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#127 - def fully_qualified_name_for(namespaces, constant); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#102 - def simple_assignment?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#66 -RuboCop::Cop::Lint::ConstantReassignment::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#68 -RuboCop::Cop::Lint::ConstantReassignment::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Check that certain constants are fully qualified. -# -# This is not enabled by default because it would mark a lot of offenses -# unnecessarily. -# -# Generally, gems should fully qualify all constants to avoid conflicts with -# the code that uses the gem. Enable this cop without using `Only`/`Ignore` -# -# Large projects will over time end up with one or two constant names that -# are problematic because of a conflict with a library or just internally -# using the same name a namespace and a class. To avoid too many unnecessary -# offenses, Enable this cop with `Only: [The, Constant, Names, Causing, Issues]` -# -# NOTE: `Style/RedundantConstantBase` cop is disabled if this cop is enabled to prevent -# conflicting rules. Because it respects user configurations that want to enable -# this cop which is disabled by default. -# -# @example -# # By default checks every constant -# -# # bad -# User -# -# # bad -# User::Login -# -# # good -# ::User -# -# # good -# ::User::Login -# @example Only: ['Login'] -# # Restrict this cop to only being concerned about certain constants -# -# # bad -# Login -# -# # good -# ::Login -# -# # good -# User::Login -# @example Ignore: ['Login'] -# # Restrict this cop not being concerned about certain constants -# -# # bad -# User -# -# # good -# ::User::Login -# -# # good -# Login -# -# source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#62 -class RuboCop::Cop::Lint::ConstantResolution < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#70 - def on_const(node); end - - # source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#66 - def unqualified_const?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#83 - def allowed_names; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#78 - def const_name?(name); end - - # source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#87 - def ignored_names; end -end - -# source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#63 -RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String) - -# are strictly formatted. -# -# A comment can be added to the directive by prefixing it with `--`. -# -# @example -# # bad -# # rubocop:disable Layout/LineLength Style/Encoding -# # ^ missing comma -# -# # bad -# # rubocop:disable -# -# # bad -# # rubocop:disable Layout/LineLength # rubocop:disable Style/Encoding -# -# # bad -# # rubocop:wrongmode Layout/LineLength -# -# # good -# # rubocop:disable Layout/LineLength -# -# # good -# # rubocop:disable Layout/LineLength, Style/Encoding -# -# # good -# # rubocop:disable all -# -# # good -# # rubocop:disable Layout/LineLength -- This is a good comment. -# -# source://rubocop//lib/rubocop/cop/lint/cop_directive_syntax.rb#39 -class RuboCop::Cop::Lint::CopDirectiveSyntax < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/cop_directive_syntax.rb#48 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/lint/cop_directive_syntax.rb#62 - def offense_message(directive_comment); end -end - -# source://rubocop//lib/rubocop/cop/lint/cop_directive_syntax.rb#40 -RuboCop::Cop::Lint::CopDirectiveSyntax::COMMON_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/cop_directive_syntax.rb#43 -RuboCop::Cop::Lint::CopDirectiveSyntax::INVALID_MODE_NAME_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/cop_directive_syntax.rb#45 -RuboCop::Cop::Lint::CopDirectiveSyntax::MALFORMED_COP_NAMES_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/cop_directive_syntax.rb#44 -RuboCop::Cop::Lint::CopDirectiveSyntax::MISSING_COP_NAME_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/cop_directive_syntax.rb#42 -RuboCop::Cop::Lint::CopDirectiveSyntax::MISSING_MODE_NAME_MSG = T.let(T.unsafe(nil), String) - -# Checks for debug calls (such as `debugger` or `binding.pry`) that should -# not be kept for production code. -# -# The cop can be configured using `DebuggerMethods`. By default, a number of gems -# debug entrypoints are configured (`Kernel`, `Byebug`, `Capybara`, `debug.rb`, -# `Pry`, `Rails`, `RubyJard`, and `WebConsole`). Additional methods can be added. -# -# Specific default groups can be disabled if necessary: -# -# [source,yaml] -# ---- -# Lint/Debugger: -# DebuggerMethods: -# WebConsole: ~ -# ---- -# -# You can also add your own methods by adding a new category: -# -# [source,yaml] -# ---- -# Lint/Debugger: -# DebuggerMethods: -# MyDebugger: -# MyDebugger.debug_this -# ---- -# -# Some gems also ship files that will start a debugging session when required, -# for example `require 'debug/start'` from `ruby/debug`. These requires can -# be configured through `DebuggerRequires`. It has the same structure as -# `DebuggerMethods`, which you can read about above. -# -# @example -# -# # bad (ok during development) -# -# # using pry -# def some_method -# binding.pry -# do_something -# end -# -# # bad (ok during development) -# -# # using byebug -# def some_method -# byebug -# do_something -# end -# -# # good -# -# def some_method -# do_something -# end -# @example DebuggerMethods: [my_debugger] -# -# # bad (ok during development) -# -# def some_method -# my_debugger -# end -# @example DebuggerRequires: [my_debugger/start] -# -# # bad (ok during development) -# -# require 'my_debugger/start' -# -# source://rubocop//lib/rubocop/cop/lint/debugger.rb#74 -class RuboCop::Cop::Lint::Debugger < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#78 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#138 - def assumed_argument?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#117 - def assumed_usage_context?(node); end - - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#127 - def chained_method_name(send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#104 - def debugger_method?(send_node); end - - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#90 - def debugger_methods; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#110 - def debugger_require?(send_node); end - - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#97 - def debugger_requires; end - - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#86 - def message(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/debugger.rb#76 -RuboCop::Cop::Lint::Debugger::BLOCK_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/debugger.rb#75 -RuboCop::Cop::Lint::Debugger::MSG = T.let(T.unsafe(nil), String) - -# Checks for uses of the deprecated class method usages. -# -# @example -# -# # bad -# File.exists?(some_path) -# Dir.exists?(some_path) -# iterator? -# attr :name, true -# attr :name, false -# ENV.freeze # Calling `Env.freeze` raises `TypeError` since Ruby 2.7. -# ENV.clone -# ENV.dup # Calling `Env.dup` raises `TypeError` since Ruby 3.1. -# Socket.gethostbyname(host) -# Socket.gethostbyaddr(host) -# -# # good -# File.exist?(some_path) -# Dir.exist?(some_path) -# block_given? -# attr_accessor :name -# attr_reader :name -# ENV # `ENV.freeze` cannot prohibit changes to environment variables. -# ENV.to_h -# ENV.to_h # `ENV.dup` cannot dup `ENV`, use `ENV.to_h` to get a copy of `ENV` as a hash. -# Addrinfo.getaddrinfo(nodename, service) -# Addrinfo.tcp(host, port).getnameinfo -# -# source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#33 -class RuboCop::Cop::Lint::DeprecatedClassMethods < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#53 - def deprecated_class_method?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#63 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#112 - def dir_env_file_const?(node); end - - # source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#83 - def offense_range(node); end - - # source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#93 - def preferred_method(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#108 - def socket_const?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#50 -RuboCop::Cop::Lint::DeprecatedClassMethods::DIR_ENV_FILE_CONSTANTS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#36 -RuboCop::Cop::Lint::DeprecatedClassMethods::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#41 -RuboCop::Cop::Lint::DeprecatedClassMethods::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#37 -RuboCop::Cop::Lint::DeprecatedClassMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for deprecated constants. -# -# It has `DeprecatedConstants` config. If there is an alternative method, you can set -# alternative value as `Alternative`. And you can set the deprecated version as -# `DeprecatedVersion`. These options can be omitted if they are not needed. -# -# DeprecatedConstants: -# 'DEPRECATED_CONSTANT': -# Alternative: 'alternative_value' -# DeprecatedVersion: 'deprecated_version' -# -# By default, `NIL`, `TRUE`, `FALSE`, `Net::HTTPServerException, `Random::DEFAULT`, -# `Struct::Group`, and `Struct::Passwd` are configured. -# -# @example -# -# # bad -# NIL -# TRUE -# FALSE -# Net::HTTPServerException -# Random::DEFAULT # Return value of Ruby 2 is `Random` instance, Ruby 3.0 is `Random` class. -# Struct::Group -# Struct::Passwd -# -# # good -# nil -# true -# false -# Net::HTTPClientException -# Random.new # `::DEFAULT` has been deprecated in Ruby 3, `.new` is compatible with Ruby 2. -# Etc::Group -# Etc::Passwd -# -# source://rubocop//lib/rubocop/cop/lint/deprecated_constants.rb#40 -class RuboCop::Cop::Lint::DeprecatedConstants < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/deprecated_constants.rb#46 - def on_const(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/deprecated_constants.rb#66 - def constant_name(node, nested_constant_name); end - - # source://rubocop//lib/rubocop/cop/lint/deprecated_constants.rb#82 - def deprecated_constants; end - - # source://rubocop//lib/rubocop/cop/lint/deprecated_constants.rb#72 - def message(good, bad, deprecated_version); end -end - -# source://rubocop//lib/rubocop/cop/lint/deprecated_constants.rb#44 -RuboCop::Cop::Lint::DeprecatedConstants::DO_NOT_USE_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/deprecated_constants.rb#43 -RuboCop::Cop::Lint::DeprecatedConstants::SUGGEST_GOOD_MSG = T.let(T.unsafe(nil), String) - -# Algorithmic constants for `OpenSSL::Cipher` and `OpenSSL::Digest` -# deprecated since OpenSSL version 2.2.0. Prefer passing a string -# instead. -# -# @example -# -# # bad -# OpenSSL::Cipher::AES.new(128, :GCM) -# -# # good -# OpenSSL::Cipher.new('aes-128-gcm') -# -# # bad -# OpenSSL::Digest::SHA256.new -# -# # good -# OpenSSL::Digest.new('SHA256') -# -# # bad -# OpenSSL::Digest::SHA256.digest('foo') -# -# # good -# OpenSSL::Digest.digest('SHA256', 'foo') -# -# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#30 -class RuboCop::Cop::Lint::DeprecatedOpenSSLConstant < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#40 - def algorithm_const(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#50 - def digest_const?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#54 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#101 - def algorithm_name(node); end - - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#66 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#130 - def build_cipher_arguments(node, algorithm_name, no_arguments); end - - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#93 - def correction_range(node); end - - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#78 - def message(node); end - - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#97 - def openssl_class(node); end - - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#119 - def replacement_args(node); end - - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#111 - def sanitize_arguments(arguments); end -end - -# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#34 -RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#37 -RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::NO_ARG_ALGORITHM = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#36 -RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks constructors for disjunctive assignments (`||=`) that should -# be plain assignments. -# -# So far, this cop is only concerned with disjunctive assignment of -# instance variables. -# -# In ruby, an instance variable is nil until a value is assigned, so the -# disjunction is unnecessary. A plain assignment has the same effect. -# -# @example -# # bad -# def initialize -# @x ||= 1 -# end -# -# # good -# def initialize -# @x = 1 -# end -# -# source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#48 -class RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#53 - def on_def(node); end - - private - - # @param node [DefNode] a constructor definition - # - # source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#60 - def check(node); end - - # source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#66 - def check_body(body); end - - # @param lines [Array] the logical lines of the constructor - # - # source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#78 - def check_body_lines(lines); end - - # Add an offense if the LHS of the given disjunctive assignment is - # an instance variable. - # - # For now, we only care about assignments to instance variables. - # - # @param node [Node] a disjunctive assignment - # - # source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#99 - def check_disjunctive_assignment(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#51 -RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor::MSG = T.let(T.unsafe(nil), String) - -# Checks that there are no repeated bodies -# within `if/unless`, `case-when`, `case-in` and `rescue` constructs. -# -# With `IgnoreLiteralBranches: true`, branches are not registered -# as offenses if they return a basic literal value (string, symbol, -# integer, float, rational, complex, `true`, `false`, or `nil`), or -# return an array, hash, regexp or range that only contains one of -# the above basic literal values. -# -# With `IgnoreConstantBranches: true`, branches are not registered -# as offenses if they return a constant value. -# -# With `IgnoreDuplicateElseBranch: true`, in conditionals with multiple branches, -# duplicate 'else' branches are not registered as offenses. -# -# @example -# # bad -# if foo -# do_foo -# do_something_else -# elsif bar -# do_foo -# do_something_else -# end -# -# # good -# if foo || bar -# do_foo -# do_something_else -# end -# -# # bad -# case x -# when foo -# do_foo -# when bar -# do_foo -# else -# do_something_else -# end -# -# # good -# case x -# when foo, bar -# do_foo -# else -# do_something_else -# end -# -# # bad -# begin -# do_something -# rescue FooError -# handle_error -# rescue BarError -# handle_error -# end -# -# # good -# begin -# do_something -# rescue FooError, BarError -# handle_error -# end -# @example IgnoreLiteralBranches: true -# # good -# case size -# when "small" then 100 -# when "medium" then 250 -# when "large" then 1000 -# else 250 -# end -# @example IgnoreConstantBranches: true -# # good -# case size -# when "small" then SMALL_SIZE -# when "medium" then MEDIUM_SIZE -# when "large" then LARGE_SIZE -# else MEDIUM_SIZE -# end -# @example IgnoreDuplicateElseBranch: true -# # good -# if foo -# do_foo -# elsif bar -# do_bar -# else -# do_foo -# end -# -# source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#99 -class RuboCop::Cop::Lint::DuplicateBranch < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#102 - def on_branching_statement(node); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#102 - def on_case(node); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#102 - def on_case_match(node); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#114 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#102 - def on_rescue(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#136 - def branches(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#140 - def consider_branch?(branches, branch); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#174 - def const_branch?(branch); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#178 - def duplicate_else_branch?(branches, branch); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#155 - def ignore_constant_branches?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#159 - def ignore_duplicate_else_branches?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#151 - def ignore_literal_branches?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#163 - def literal_branch?(branch); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#122 - def offense_range(duplicate_branch); end -end - -# source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#100 -RuboCop::Cop::Lint::DuplicateBranch::MSG = T.let(T.unsafe(nil), String) - -# Checks that there are no repeated conditions -# used in case 'when' expressions. -# -# @example -# -# # bad -# case x -# when 'first' -# do_something -# when 'first' -# do_something_else -# end -# -# # good -# case x -# when 'first' -# do_something -# when 'second' -# do_something_else -# end -# -# source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#26 -class RuboCop::Cop::Lint::DuplicateCaseCondition < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#29 - def on_case(case_node); end -end - -# source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#27 -RuboCop::Cop::Lint::DuplicateCaseCondition::MSG = T.let(T.unsafe(nil), String) - -# Checks that there are no repeated conditions used in if 'elsif'. -# -# @example -# # bad -# if x == 1 -# do_something -# elsif x == 1 -# do_something_else -# end -# -# # good -# if x == 1 -# do_something -# elsif x == 2 -# do_something_else -# end -# -# source://rubocop//lib/rubocop/cop/lint/duplicate_elsif_condition.rb#23 -class RuboCop::Cop::Lint::DuplicateElsifCondition < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/duplicate_elsif_condition.rb#26 - def on_if(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/duplicate_elsif_condition.rb#24 -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. -# -# @example -# -# # bad -# hash = { food: 'apple', food: 'orange' } -# -# # good -# hash = { food: 'apple', other_food: 'orange' } -# -# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#18 -class RuboCop::Cop::Lint::DuplicateHashKey < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Duplication - - # source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#23 - def on_hash(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#21 -RuboCop::Cop::Lint::DuplicateHashKey::MSG = T.let(T.unsafe(nil), String) - -# Checks for duplicated magic comments. -# -# @example -# -# # bad -# -# # encoding: ascii -# # encoding: ascii -# -# # good -# -# # encoding: ascii -# -# # bad -# -# # frozen_string_literal: true -# # frozen_string_literal: true -# -# # good -# -# # frozen_string_literal: true -# -# source://rubocop//lib/rubocop/cop/lint/duplicate_magic_comment.rb#28 -class RuboCop::Cop::Lint::DuplicateMagicComment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::FrozenStringLiteral - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/duplicate_magic_comment.rb#35 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/lint/duplicate_magic_comment.rb#51 - def magic_comment_lines; end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_magic_comment.rb#65 - def register_offense(range); end -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. -# -# @example -# -# # bad -# def foo -# 1 -# end -# -# def foo -# 2 -# end -# -# # bad -# def foo -# 1 -# end -# -# alias foo bar -# -# # good -# def foo -# 1 -# end -# -# def bar -# 2 -# end -# -# # good -# def foo -# 1 -# end -# -# alias bar foo -# -# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#42 -class RuboCop::Cop::Lint::DuplicateMethods < ::RuboCop::Cop::Base - # @return [DuplicateMethods] a new instance of DuplicateMethods - # - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#47 - def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#85 - def alias_method?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#73 - def method_alias?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#77 - def on_alias(node); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#53 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#61 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#91 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#90 - def sym_name(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#103 - def check_const_receiver(node, name, const_name); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#110 - def check_self_receiver(node, name); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#194 - def found_attr(node, args, readable: T.unsafe(nil), writable: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#122 - def found_instance_method(node, name); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#145 - def found_method(node, method_name); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#135 - def found_sclass_method(node, name); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#172 - def location(node); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#204 - def lookup_constant(node, const_name); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#117 - def message_for_dup(node, method_name, key); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#164 - def method_key(node, method_name); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#180 - def on_attr(node, attr_name, args); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#222 - def qualified_name(enclosing, namespace, mod_name); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#236 - def source_location(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#45 -RuboCop::Cop::Lint::DuplicateMethods::DEF_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#43 -RuboCop::Cop::Lint::DuplicateMethods::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#44 -RuboCop::Cop::Lint::DuplicateMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for duplicate elements in `Regexp` character classes. -# -# @example -# -# # bad -# r = /[xyx]/ -# -# # bad -# r = /[0-9x0-9]/ -# -# # good -# r = /[xy]/ -# -# # good -# r = /[0-9x]/ -# -# source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#21 -class RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # 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#29 - def on_regexp(node); end - - private - - # @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#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#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 - # that are within an interpolation. - # - # @return [Boolean] - # - # 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 -# # bad -# require 'foo' -# require 'bar' -# require 'foo' -# -# # good -# require 'foo' -# require 'bar' -# -# # good -# require 'foo' -# require_relative 'foo' -# -# source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#26 -class RuboCop::Cop::Lint::DuplicateRequire < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#39 - def on_new_investigation; end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#45 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#35 - def require_call?(param0 = T.unsafe(nil)); end -end - -# source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#30 -RuboCop::Cop::Lint::DuplicateRequire::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#31 -RuboCop::Cop::Lint::DuplicateRequire::REQUIRE_METHODS = T.let(T.unsafe(nil), Set) - -# source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#32 -RuboCop::Cop::Lint::DuplicateRequire::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) - -# Checks that there are no repeated exceptions -# used in 'rescue' expressions. -# -# @example -# # bad -# begin -# something -# rescue FirstException -# handle_exception -# rescue FirstException -# handle_other_exception -# end -# -# # good -# begin -# something -# rescue FirstException -# handle_exception -# rescue SecondException -# handle_other_exception -# end -# -# source://rubocop//lib/rubocop/cop/lint/duplicate_rescue_exception.rb#28 -class RuboCop::Cop::Lint::DuplicateRescueException < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RescueNode - - # source://rubocop//lib/rubocop/cop/lint/duplicate_rescue_exception.rb#33 - def on_rescue(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/duplicate_rescue_exception.rb#31 -RuboCop::Cop::Lint::DuplicateRescueException::MSG = T.let(T.unsafe(nil), String) - -# Checks for duplicate literal, constant, or variable elements in `Set` and `SortedSet`. -# -# @example -# -# # bad -# Set[:foo, :bar, :foo] -# -# # good -# Set[:foo, :bar] -# -# # bad -# Set.new([:foo, :bar, :foo]) -# -# # good -# Set.new([:foo, :bar]) -# -# # bad -# [:foo, :bar, :foo].to_set -# -# # good -# [:foo, :bar].to_set -# -# # bad -# SortedSet[:foo, :bar, :foo] -# -# # good -# SortedSet[:foo, :bar] -# -# # bad -# SortedSet.new([:foo, :bar, :foo]) -# -# # good -# SortedSet.new([:foo, :bar]) -# -# source://rubocop//lib/rubocop/cop/lint/duplicate_set_element.rb#39 -class RuboCop::Cop::Lint::DuplicateSetElement < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/duplicate_set_element.rb#54 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_set_element.rb#54 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/duplicate_set_element.rb#46 - def set_init_elements(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/lint/duplicate_set_element.rb#75 - def register_offense(current_element, prev_element, node); end -end - -# source://rubocop//lib/rubocop/cop/lint/duplicate_set_element.rb#42 -RuboCop::Cop::Lint::DuplicateSetElement::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/duplicate_set_element.rb#43 -RuboCop::Cop::Lint::DuplicateSetElement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks if each_with_object is called with an immutable -# argument. Since the argument is the object that the given block shall -# make calls on to build something based on the enumerable that -# each_with_object iterates over, an immutable argument makes no sense. -# It's definitely a bug. -# -# @example -# -# # bad -# sum = numbers.each_with_object(0) { |e, a| a += e } -# -# # good -# num = 0 -# sum = numbers.each_with_object(num) { |e, a| a += e } -# -# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#20 -class RuboCop::Cop::Lint::EachWithObjectArgument < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#25 - def each_with_object?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#29 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#29 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#21 -RuboCop::Cop::Lint::EachWithObjectArgument::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#22 -RuboCop::Cop::Lint::EachWithObjectArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for odd `else` block layout - like -# having an expression on the same line as the `else` keyword, -# which is usually a mistake. -# -# Its autocorrection tweaks layout to keep the syntax. So, this autocorrection -# is compatible correction for bad case syntax, but if your code makes a mistake -# with `elsif` and `else`, you will have to correct it manually. -# -# @example -# -# # bad -# -# if something -# # ... -# else do_this -# do_that -# end -# -# # good -# -# # This code is compatible with the bad case. It will be autocorrected like this. -# if something -# # ... -# else -# do_this -# do_that -# end -# -# # This code is incompatible with the bad case. -# # If `do_this` is a condition, `elsif` should be used instead of `else`. -# if something -# # ... -# elsif do_this -# do_that -# end -# -# source://rubocop//lib/rubocop/cop/lint/else_layout.rb#41 -class RuboCop::Cop::Lint::ElseLayout < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#48 - def on_if(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#79 - def autocorrect(corrector, node, first_else); end - - # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#59 - def check(node); end - - # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#69 - def check_else(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/else_layout.rb#46 -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 -# to clarify what we're aiming for. -# -# Empty lambdas and procs are ignored by default. -# -# NOTE: For backwards compatibility, the configuration that allows/disallows -# empty lambdas and procs is called `AllowEmptyLambdas`, even though it also -# applies to procs. -# -# @example -# # bad -# items.each { |item| } -# -# # good -# items.each { |item| puts item } -# @example AllowComments: true (default) -# # good -# items.each do |item| -# # TODO: implement later (inner comment) -# end -# -# items.each { |item| } # TODO: implement later (inline comment) -# @example AllowComments: false -# # bad -# items.each do |item| -# # TODO: implement later (inner comment) -# end -# -# items.each { |item| } # TODO: implement later (inline comment) -# @example AllowEmptyLambdas: true (default) -# # good -# allow(subject).to receive(:callable).and_return(-> {}) -# -# placeholder = lambda do -# end -# (callable || placeholder).call -# -# proc { } -# -# Proc.new { } -# @example AllowEmptyLambdas: false -# # bad -# allow(subject).to receive(:callable).and_return(-> {}) -# -# placeholder = lambda do -# end -# (callable || placeholder).call -# -# proc { } -# -# Proc.new { } -# -# source://rubocop//lib/rubocop/cop/lint/empty_block.rb#63 -class RuboCop::Cop::Lint::EmptyBlock < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/empty_block.rb#66 - def on_block(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/empty_block.rb#76 - def allow_comment?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/empty_block.rb#83 - def allow_empty_lambdas?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/empty_block.rb#87 - def comment_disables_cop?(comment); end -end - -# source://rubocop//lib/rubocop/cop/lint/empty_block.rb#64 -RuboCop::Cop::Lint::EmptyBlock::MSG = T.let(T.unsafe(nil), String) - -# Checks for classes and metaclasses without a body. -# Such empty classes and metaclasses are typically an oversight or we should provide a comment -# to be clearer what we're aiming for. -# -# @example -# # bad -# class Foo -# end -# -# class Bar -# class << self -# end -# end -# -# class << obj -# end -# -# # good -# class Foo -# def do_something -# # ... code -# end -# end -# -# class Bar -# class << self -# attr_reader :bar -# end -# end -# -# class << obj -# attr_reader :bar -# end -# @example AllowComments: false (default) -# # bad -# class Foo -# # TODO: implement later -# end -# -# class Bar -# class << self -# # TODO: implement later -# end -# end -# -# class << obj -# # TODO: implement later -# end -# @example AllowComments: true -# # good -# class Foo -# # TODO: implement later -# end -# -# class Bar -# class << self -# # TODO: implement later -# end -# end -# -# class << obj -# # TODO: implement later -# end -# -# source://rubocop//lib/rubocop/cop/lint/empty_class.rb#72 -class RuboCop::Cop::Lint::EmptyClass < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/empty_class.rb#76 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/lint/empty_class.rb#81 - def on_sclass(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/empty_class.rb#87 - def body_or_allowed_comment_lines?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/empty_class.rb#73 -RuboCop::Cop::Lint::EmptyClass::CLASS_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/empty_class.rb#74 -RuboCop::Cop::Lint::EmptyClass::METACLASS_MSG = T.let(T.unsafe(nil), String) - -# Checks for the presence of `if`, `elsif` and `unless` branches without a body. -# -# NOTE: empty `else` branches are handled by `Style/EmptyElse`. -# -# @example -# # bad -# if condition -# end -# -# # bad -# unless condition -# end -# -# # bad -# if condition -# do_something -# elsif other_condition -# end -# -# # good -# if condition -# do_something -# end -# -# # good -# unless condition -# do_something -# end -# -# # good -# if condition -# do_something -# elsif other_condition -# nil -# end -# -# # good -# if condition -# do_something -# elsif other_condition -# do_something_else -# end -# @example AllowComments: true (default) -# # good -# if condition -# do_something -# elsif other_condition -# # noop -# end -# @example AllowComments: false -# # bad -# if condition -# do_something -# elsif other_condition -# # noop -# end -# -# source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#65 -class RuboCop::Cop::Lint::EmptyConditionalBody < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CommentsHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#71 - def on_if(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#125 - def branch_range(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#94 - def can_simplify_conditional?(node); end - - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#133 - def deletion_range(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#121 - def else_branch?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#113 - def empty_if_branch?(node); end - - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#108 - def flip_orphaned_else(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#86 - def offense_range(node); end - - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#98 - def remove_empty_branch(corrector, node); end -end - -# source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#69 -RuboCop::Cop::Lint::EmptyConditionalBody::MSG = T.let(T.unsafe(nil), String) - -# Checks for empty `ensure` blocks. -# -# @example -# -# # bad -# def some_method -# do_something -# ensure -# end -# -# # bad -# begin -# do_something -# ensure -# end -# -# # good -# def some_method -# do_something -# ensure -# do_something_else -# end -# -# # good -# begin -# do_something -# ensure -# do_something_else -# end -# -# source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#35 -class RuboCop::Cop::Lint::EmptyEnsure < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#40 - def on_ensure(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#38 -RuboCop::Cop::Lint::EmptyEnsure::MSG = T.let(T.unsafe(nil), String) - -# Checks for the presence of empty expressions. -# -# @example -# -# # bad -# -# foo = () -# if () -# bar -# end -# -# # good -# -# foo = (some_expression) -# if (some_expression) -# bar -# end -# -# source://rubocop//lib/rubocop/cop/lint/empty_expression.rb#23 -class RuboCop::Cop::Lint::EmptyExpression < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/empty_expression.rb#26 - def on_begin(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/empty_expression.rb#34 - def empty_expression?(begin_node); end -end - -# source://rubocop//lib/rubocop/cop/lint/empty_expression.rb#24 -RuboCop::Cop::Lint::EmptyExpression::MSG = T.let(T.unsafe(nil), String) - -# Enforces that Ruby source files are not empty. -# -# @example -# # bad -# # Empty file -# -# # good -# # File containing non commented source lines -# @example AllowComments: true (default) -# # good -# # File consisting only of comments -# @example AllowComments: false -# # bad -# # File consisting only of comments -# -# source://rubocop//lib/rubocop/cop/lint/empty_file.rb#23 -class RuboCop::Cop::Lint::EmptyFile < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/empty_file.rb#26 - def on_new_investigation; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/empty_file.rb#40 - def contains_only_comments?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/empty_file.rb#36 - def empty_file?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/empty_file.rb#32 - def offending?; end -end - -# source://rubocop//lib/rubocop/cop/lint/empty_file.rb#24 -RuboCop::Cop::Lint::EmptyFile::MSG = T.let(T.unsafe(nil), String) - -# Checks for the presence of `in` pattern branches without a body. -# -# @example -# -# # bad -# case condition -# in [a] -# do_something -# in [a, b] -# end -# -# # good -# case condition -# in [a] -# do_something -# in [a, b] -# nil -# end -# @example AllowComments: true (default) -# -# # good -# case condition -# in [a] -# do_something -# in [a, b] -# # noop -# end -# @example AllowComments: false -# -# # bad -# case condition -# in [a] -# do_something -# in [a, b] -# # noop -# end -# -# source://rubocop//lib/rubocop/cop/lint/empty_in_pattern.rb#45 -class RuboCop::Cop::Lint::EmptyInPattern < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CommentsHelp - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/lint/empty_in_pattern.rb#53 - def on_case_match(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/empty_in_pattern.rb#49 -RuboCop::Cop::Lint::EmptyInPattern::MSG = T.let(T.unsafe(nil), String) - -# Checks for empty interpolation. -# -# @example -# -# # bad -# "result is #{}" -# -# # good -# "result is #{some_result}" -# -# source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#15 -class RuboCop::Cop::Lint::EmptyInterpolation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Interpolation - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#21 - def on_interpolation(begin_node); end -end - -# source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#19 -RuboCop::Cop::Lint::EmptyInterpolation::MSG = T.let(T.unsafe(nil), String) - -# Checks for the presence of `when` branches without a body. -# -# @example -# -# # bad -# case foo -# when bar -# do_something -# when baz -# end -# -# # good -# case condition -# when foo -# do_something -# when bar -# nil -# end -# @example AllowComments: true (default) -# -# # good -# case condition -# when foo -# do_something -# when bar -# # noop -# end -# @example AllowComments: false -# -# # bad -# case condition -# when foo -# do_something -# when bar -# # do nothing -# end -# -# source://rubocop//lib/rubocop/cop/lint/empty_when.rb#45 -class RuboCop::Cop::Lint::EmptyWhen < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CommentsHelp - - # source://rubocop//lib/rubocop/cop/lint/empty_when.rb#50 - def on_case(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/empty_when.rb#48 -RuboCop::Cop::Lint::EmptyWhen::MSG = T.let(T.unsafe(nil), String) - -# Checks for `return` from an `ensure` block. -# `return` from an ensure block is a dangerous code smell as it -# will take precedence over any exception being raised, -# and the exception will be silently thrown away as if it were rescued. -# -# If you want to rescue some (or all) exceptions, best to do it explicitly -# -# @example -# -# # bad -# def foo -# do_something -# ensure -# cleanup -# return self -# end -# -# # good -# def foo -# do_something -# self -# ensure -# cleanup -# end -# -# # good -# def foo -# begin -# do_something -# rescue SomeException -# # Let's ignore this exception -# end -# self -# ensure -# cleanup -# end -# -# source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#42 -class RuboCop::Cop::Lint::EnsureReturn < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#45 - def on_ensure(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#43 -RuboCop::Cop::Lint::EnsureReturn::MSG = T.let(T.unsafe(nil), String) - -# Emulates the following Ruby warnings in Ruby 2.6. -# -# [source,console] -# ---- -# $ cat example.rb -# ERB.new('hi', nil, '-', '@output_buffer') -# $ 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 -# deprecated. Use keyword argument like ERB.new(str, trim_mode:...) instead. -# example.rb:1: warning: Passing eoutvar with the 4th argument of ERB.new is -# deprecated. Use keyword argument like ERB.new(str, eoutvar: ...) instead. -# ---- -# -# Now non-keyword arguments other than first one are softly deprecated -# and will be removed when Ruby 2.5 becomes EOL. -# `ERB.new` with non-keyword arguments is deprecated since ERB 2.2.0. -# Use `:trim_mode` and `:eoutvar` keyword arguments to `ERB.new`. -# This cop identifies places where `ERB.new(str, trim_mode, eoutvar)` can -# be replaced by `ERB.new(str, :trim_mode: trim_mode, eoutvar: eoutvar)`. -# -# @example -# # Target codes supports Ruby 2.6 and higher only -# # bad -# ERB.new(str, nil, '-', '@output_buffer') -# -# # good -# ERB.new(str, trim_mode: '-', eoutvar: '@output_buffer') -# -# # Target codes supports Ruby 2.5 and lower only -# # good -# ERB.new(str, nil, '-', '@output_buffer') -# -# # Target codes supports Ruby 2.6, 2.5 and lower -# # bad -# ERB.new(str, nil, '-', '@output_buffer') -# -# # good -# # Ruby standard library style -# # https://github.com/ruby/ruby/commit/3406c5d -# if ERB.instance_method(:initialize).parameters.assoc(:key) # Ruby 2.6+ -# ERB.new(str, trim_mode: '-', eoutvar: '@output_buffer') -# else -# ERB.new(str, nil, '-', '@output_buffer') -# end -# -# # good -# # Use `RUBY_VERSION` style -# if RUBY_VERSION >= '2.6' -# ERB.new(str, trim_mode: '-', eoutvar: '@output_buffer') -# else -# ERB.new(str, nil, '-', '@output_buffer') -# end -# -# 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#81 - def erb_new_with_non_keyword_arguments(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#86 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#115 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#130 - def build_kwargs(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#126 - def correct_arguments?(arguments); end - - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#104 - def message(positional_argument_index, arg_value); end - - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#147 - def override_by_legacy_args(kwargs, node); end -end - -# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#74 -RuboCop::Cop::Lint::ErbNewArguments::MESSAGE_EOUTVAR = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#68 -RuboCop::Cop::Lint::ErbNewArguments::MESSAGE_SAFE_LEVEL = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#71 -RuboCop::Cop::Lint::ErbNewArguments::MESSAGE_TRIM_MODE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#78 -RuboCop::Cop::Lint::ErbNewArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Looks for uses of flip-flop operator -# based on the Ruby Style Guide. -# -# Here is the history of flip-flops in Ruby. -# flip-flop operator is deprecated in Ruby 2.6.0 and -# the deprecation has been reverted by Ruby 2.7.0 and -# backported to Ruby 2.6. -# See: https://bugs.ruby-lang.org/issues/5400 -# -# @example -# # bad -# (1..20).each do |x| -# puts x if (x == 5) .. (x == 10) -# end -# -# # good -# (1..20).each do |x| -# puts x if (x >= 5) && (x <= 10) -# end -# -# source://rubocop//lib/rubocop/cop/lint/flip_flop.rb#25 -class RuboCop::Cop::Lint::FlipFlop < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/flip_flop.rb#32 - def on_eflipflop(node); end - - # source://rubocop//lib/rubocop/cop/lint/flip_flop.rb#28 - def on_iflipflop(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/flip_flop.rb#26 -RuboCop::Cop::Lint::FlipFlop::MSG = T.let(T.unsafe(nil), String) - -# Checks for the presence of precise comparison of floating point numbers. -# -# Floating point values are inherently inaccurate, and comparing them for exact equality -# is almost never the desired semantics. Comparison via the `==/!=` operators checks -# 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 -# -# # good -# tolerance = 0.0001 -# (x - 0.1).abs < tolerance -# -# # good - comparing against nil -# Float(x, exception: false) == nil -# -# # 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#38 -class RuboCop::Cop::Lint::FloatComparison < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#48 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#48 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#95 - def check_numeric_returning_method(node); end - - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#84 - def check_send(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#63 - def float?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#78 - def literal_safe?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#42 -RuboCop::Cop::Lint::FloatComparison::EQUALITY_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#44 -RuboCop::Cop::Lint::FloatComparison::FLOAT_INSTANCE_METHODS = T.let(T.unsafe(nil), Set) - -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#43 -RuboCop::Cop::Lint::FloatComparison::FLOAT_RETURNING_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#39 -RuboCop::Cop::Lint::FloatComparison::MSG_EQUALITY = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#40 -RuboCop::Cop::Lint::FloatComparison::MSG_INEQUALITY = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#46 -RuboCop::Cop::Lint::FloatComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Identifies `Float` literals which are, like, really really really -# really really really really really big. Too big. No-one needs Floats -# that big. If you need a float that big, something is wrong with you. -# -# @example -# -# # bad -# float = 3.0e400 -# -# # good -# float = 42.9 -# -# source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#17 -class RuboCop::Cop::Lint::FloatOutOfRange < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#20 - def on_float(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#18 -RuboCop::Cop::Lint::FloatOutOfRange::MSG = T.let(T.unsafe(nil), String) - -# This lint sees if there is a mismatch between the number of -# expected fields for format/sprintf/#% and what is actually -# passed as arguments. -# -# In addition, it checks whether different formats are used in the same -# format string. Do not mix numbered, unnumbered, and named formats in -# the same format string. -# -# @example -# -# # bad -# format('A value: %s and another: %i', a_value) -# -# # good -# format('A value: %s and another: %i', a_value, another) -# -# # bad -# format('Unnumbered format: %s and numbered: %2$s', a_value, another) -# -# # good -# format('Numbered format: %1$s and numbered %2$s', a_value, another) -# -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#27 -class RuboCop::Cop::Lint::FormatParameterMismatch < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#90 - def called_on_string?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#39 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#127 - def count_format_matches(node); end - - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#109 - def count_matches(node); end - - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#131 - def count_percent_matches(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#119 - def countable_format?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#123 - def countable_percent?(node); end - - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#143 - def expected_fields_count(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#158 - def format?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#136 - def format_method?(name, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#54 - def format_string?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#105 - def heredoc?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#58 - def invalid_format_string?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#81 - def matched_arguments_count?(expected, passed); end - - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#176 - def message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#95 - def method_with_format_args?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#67 - def offending_node?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#166 - def percent?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#99 - def splat_args?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#162 - def sprintf?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#185 - def string_type?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#34 -RuboCop::Cop::Lint::FormatParameterMismatch::KERNEL = T.let(T.unsafe(nil), String) - -# http://rubular.com/r/CvpbxkcTzy -# -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#29 -RuboCop::Cop::Lint::FormatParameterMismatch::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#31 -RuboCop::Cop::Lint::FormatParameterMismatch::MSG_INVALID = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#37 -RuboCop::Cop::Lint::FormatParameterMismatch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#35 -RuboCop::Cop::Lint::FormatParameterMismatch::SHOVEL = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#36 -RuboCop::Cop::Lint::FormatParameterMismatch::STRING_TYPES = T.let(T.unsafe(nil), Array) - -# Prefer using `Hash#compare_by_identity` rather than using `object_id` -# for hash keys. -# -# This cop looks for hashes being keyed by objects' `object_id`, using -# one of these methods: `key?`, `has_key?`, `fetch`, `[]` and `[]=`. -# -# @example -# # bad -# hash = {} -# hash[foo.object_id] = :bar -# hash.key?(baz.object_id) -# -# # good -# hash = {}.compare_by_identity -# hash[foo] = :bar -# hash.key?(baz) -# -# source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#31 -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 - -# source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#34 -RuboCop::Cop::Lint::HashCompareByIdentity::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#32 -RuboCop::Cop::Lint::HashCompareByIdentity::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for the deprecated use of keyword arguments as a default in `Hash.new`. -# -# This usage raises a warning in Ruby 3.3 and results in an error in Ruby 3.4. -# In Ruby 3.4, keyword arguments will instead be used to change the behavior of a hash. -# For example, the capacity option can be passed to create a hash with a certain size -# if you know it in advance, for better performance. -# -# NOTE: The following corner case may result in a false negative when upgrading from Ruby 3.3 -# or earlier, but it is intentionally not detected to respect the expected usage in Ruby 3.4. -# -# [source,ruby] -# ---- -# Hash.new(capacity: 42) -# ---- -# -# @example -# -# # bad -# Hash.new(key: :value) -# -# # good -# Hash.new({key: :value}) -# -# source://rubocop//lib/rubocop/cop/lint/hash_new_with_keyword_arguments_as_default.rb#29 -class RuboCop::Cop::Lint::HashNewWithKeywordArgumentsAsDefault < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/hash_new_with_keyword_arguments_as_default.rb#36 - def hash_new(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/hash_new_with_keyword_arguments_as_default.rb#40 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/hash_new_with_keyword_arguments_as_default.rb#32 -RuboCop::Cop::Lint::HashNewWithKeywordArgumentsAsDefault::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/hash_new_with_keyword_arguments_as_default.rb#33 -RuboCop::Cop::Lint::HashNewWithKeywordArgumentsAsDefault::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for the ordering of a method call where -# the receiver of the call is a HEREDOC. -# -# @example -# # bad -# <<-SQL -# bar -# SQL -# .strip_indent -# -# <<-SQL -# bar -# SQL -# .strip_indent -# .trim -# -# # good -# <<~SQL -# bar -# SQL -# -# <<~SQL.trim -# bar -# SQL -# -# source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#31 -class RuboCop::Cop::Lint::HeredocMethodCallPosition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#37 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#37 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#97 - def all_on_same_line?(nodes); end - - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#50 - def autocorrect(corrector, node, heredoc); end - - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#77 - def call_after_heredoc_range(heredoc); end - - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#107 - def call_end_pos(node); end - - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#116 - def call_line_range(node); end - - # Returns nil if no range can be safely repositioned. - # - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#122 - def call_range_to_safely_reposition(node, heredoc); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#86 - def calls_on_multiple_lines?(node, _heredoc); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#82 - def correctly_positioned?(node, heredoc); end - - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#111 - def heredoc_begin_line_range(heredoc); end - - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#103 - def heredoc_end_pos(heredoc); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#73 - def heredoc_node?(node); end - - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#59 - def heredoc_node_descendent_receiver(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#67 - def send_node?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#146 - def trailing_comma?(call_source, call_line_source); end -end - -# source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#35 -RuboCop::Cop::Lint::HeredocMethodCallPosition::MSG = T.let(T.unsafe(nil), String) - -# Prefer `equal?` over `==` when comparing `object_id`. -# -# `Object#equal?` is provided to compare objects for identity, and in contrast -# `Object#==` is provided for the purpose of doing value comparison. -# -# @example -# # bad -# foo.object_id == bar.object_id -# -# # good -# foo.equal?(bar) -# -# 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#24 - def on_send(node); end - - private - - # @return [Boolean] - # - # 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#44 - def object_id_method?(node); end -end - -# 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#22 -RuboCop::Cop::Lint::IdentityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for implicit string concatenation of string literals -# which are on the same line. -# -# @example -# -# # bad -# array = ['Item 1' 'Item 2'] -# -# # good -# array = ['Item 1Item 2'] -# array = ['Item 1' + 'Item 2'] -# array = [ -# 'Item 1' \ -# 'Item 2' -# ] -# -# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#21 -class RuboCop::Cop::Lint::ImplicitStringConcatenation < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#32 - def on_dstr(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#92 - def display_str(node); end - - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#59 - def each_bad_cons(node); end - - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#74 - def ending_delimiter(str); end - - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#100 - def str_content(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#84 - def string_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#88 - def string_literals?(node1, node2); end -end - -# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#26 -RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_ARRAY = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#28 -RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_METHOD = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#24 -RuboCop::Cop::Lint::ImplicitStringConcatenation::MSG = T.let(T.unsafe(nil), String) - -# 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`. -# They are not autocorrected when assigning a return value because these types are different. -# It's up to user how to handle the return value. -# -# @example -# -# # bad -# IO.select([io], [], [], timeout) -# -# # good -# io.wait_readable(timeout) -# -# # bad -# IO.select([], [io], [], timeout) -# -# # good -# io.wait_writable(timeout) -# -# 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#41 - def io_select(param0 = T.unsafe(nil)); end - - # 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#69 - def preferred_method(read, write, timeout); end - - # @return [Boolean] - # - # 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#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#38 -RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for `private` or `protected` access modifiers which are -# applied to a singleton method. These access modifiers do not make -# singleton methods private/protected. `private_class_method` can be -# used for that. -# -# @example -# -# # bad -# class C -# private -# -# def self.method -# puts 'hi' -# end -# end -# -# # good -# class C -# def self.method -# puts 'hi' -# end -# -# private_class_method :method -# end -# -# # good -# class C -# class << self -# private -# -# def method -# puts 'hi' -# end -# end -# end -# -# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#41 -class RuboCop::Cop::Lint::IneffectiveAccessModifier < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#52 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#52 - def on_module(node); end - - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#48 - def private_class_methods(param0); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#102 - def access_modifier?(node); end - - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#59 - def check_node(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#106 - def correct_visibility?(node, modifier, ignored_methods); end - - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#71 - def format_message(modifier); end - - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#84 - def ineffective_modifier(node, ignored_methods = T.unsafe(nil), modifier = T.unsafe(nil), &block); end - - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#67 - def private_class_method_names(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#44 -RuboCop::Cop::Lint::IneffectiveAccessModifier::ALTERNATIVE_PRIVATE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#45 -RuboCop::Cop::Lint::IneffectiveAccessModifier::ALTERNATIVE_PROTECTED = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#42 -RuboCop::Cop::Lint::IneffectiveAccessModifier::MSG = T.let(T.unsafe(nil), String) - -# Looks for error classes inheriting from `Exception`. -# It is configurable to suggest using either `StandardError` (default) or -# `RuntimeError` instead. -# -# @example EnforcedStyle: standard_error (default) -# # bad -# -# class C < Exception; end -# -# C = Class.new(Exception) -# -# # good -# -# class C < StandardError; end -# -# C = Class.new(StandardError) -# @example EnforcedStyle: runtime_error -# # bad -# -# class C < Exception; end -# -# C = Class.new(Exception) -# -# # good -# -# class C < RuntimeError; end -# -# C = Class.new(RuntimeError) -# -# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#40 -class RuboCop::Cop::Lint::InheritException < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#53 - def class_new_call?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#59 - def on_class(node); end - - # 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#87 - def exception_class?(class_node); end - - # @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#99 - def preferred_base_class; end -end - -# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#44 -RuboCop::Cop::Lint::InheritException::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#45 -RuboCop::Cop::Lint::InheritException::PREFERRED_BASE_CLASS = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#50 -RuboCop::Cop::Lint::InheritException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for interpolation in a single quoted string. -# -# @example -# -# # bad -# foo = 'something with #{interpolation} inside' -# -# # good -# foo = "something with #{interpolation} inside" -# -# source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#21 -class RuboCop::Cop::Lint::InterpolationCheck < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#28 - def on_str(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#41 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#52 - def heredoc?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#56 - def valid_syntax?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#24 -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 - extend ::RuboCop::Cop::TargetRubyVersion - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#44 - def deprecated_it_method?(node); end - - # source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#37 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#33 -RuboCop::Cop::Lint::ItWithoutArgumentsInBlock::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#35 -RuboCop::Cop::Lint::ItWithoutArgumentsInBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks uses of lambda without a literal block. -# It emulates the following warning in Ruby 3.0: -# -# $ 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 -# -# This way, proc object is never converted to lambda. -# Autocorrection replaces with compatible proc argument. -# -# @example -# -# # bad -# lambda(&proc { do_something }) -# lambda(&Proc.new { do_something }) -# -# # good -# proc { do_something } -# Proc.new { do_something } -# lambda { do_something } # If you use lambda. -# -# source://rubocop//lib/rubocop/cop/lint/lambda_without_literal_block.rb#28 -class RuboCop::Cop::Lint::LambdaWithoutLiteralBlock < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/lambda_without_literal_block.rb#35 - def lambda_with_symbol_proc?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/lambda_without_literal_block.rb#39 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/lambda_without_literal_block.rb#31 -RuboCop::Cop::Lint::LambdaWithoutLiteralBlock::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/lambda_without_literal_block.rb#32 -RuboCop::Cop::Lint::LambdaWithoutLiteralBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for literals used as the conditions or as -# operands in and/or expressions serving as the conditions of -# if/while/until/case-when/case-in. -# -# NOTE: Literals in `case-in` condition where the match variable is used in -# `in` are accepted as a pattern matching. -# -# @example -# -# # bad -# if 20 -# do_something -# end -# -# # bad -# # We're only interested in the left hand side being a truthy literal, -# # because it affects the evaluation of the &&, whereas the right hand -# # side will be conditionally executed/called and can be a literal. -# if true && some_var -# do_something -# end -# -# # good -# if some_var -# do_something -# end -# -# # good -# # When using a boolean value for an infinite loop. -# while true -# break if condition -# end -# -# source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#38 -class RuboCop::Cop::Lint::LiteralAsCondition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#164 - def message(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#45 - def on_and(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#129 - def on_case(case_node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#144 - def on_case_match(case_match_node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#57 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#158 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#99 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#114 - def on_until_post(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#69 - def on_while(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#84 - def on_while_post(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#179 - def basic_literal?(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#211 - def check_case(case_node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#170 - def check_for_literal(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#191 - def check_node(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#220 - def condition(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#236 - def correct_if_node(node, cond, result); end - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#201 - def handle_node(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#187 - def primitive_array?(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#228 - def when_conditions_range(when_node); end -end - -# source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#42 -RuboCop::Cop::Lint::LiteralAsCondition::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#43 -RuboCop::Cop::Lint::LiteralAsCondition::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# 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. -# -# NOTE: Array literals interpolated in regexps are not handled by this cop, but -# by `Lint/ArrayLiteralInRegexp` instead. -# -# @example -# -# # bad -# "result is #{10}" -# -# # good -# "result is 10" -# -# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#18 -class RuboCop::Cop::Lint::LiteralInInterpolation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Interpolation - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#28 - def on_interpolation(begin_node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#72 - def array_in_regexp?(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#78 - def autocorrected_value(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#145 - def autocorrected_value_for_array(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#151 - def autocorrected_value_for_hash(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#121 - def autocorrected_value_for_string(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#129 - def autocorrected_value_for_symbol(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#162 - def autocorrected_value_in_hash(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#136 - def autocorrected_value_in_hash_for_symbol(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#192 - def ends_heredoc_line?(node); end - - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#100 - def handle_special_regexp_chars(begin_node, value); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#200 - def in_array_percent_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#57 - def offending?(node); end - - # Does node print its own source when converted to a string? - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#183 - def prints_as_self?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#188 - def space_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#67 - def special_keyword?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#25 -RuboCop::Cop::Lint::LiteralInInterpolation::COMPOSITE = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#24 -RuboCop::Cop::Lint::LiteralInInterpolation::MSG = T.let(T.unsafe(nil), String) - -# Checks for uses of `begin...end while/until something`. -# -# @example -# -# # bad -# -# # using while -# begin -# do_something -# end while some_condition -# -# # good -# -# # while replacement -# loop do -# do_something -# break unless some_condition -# end -# -# # bad -# -# # using until -# begin -# do_something -# end until some_condition -# -# # good -# -# # until replacement -# loop do -# do_something -# break if some_condition -# end -# -# source://rubocop//lib/rubocop/cop/lint/loop.rb#44 -class RuboCop::Cop::Lint::Loop < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/loop.rb#53 - def on_until_post(node); end - - # source://rubocop//lib/rubocop/cop/lint/loop.rb#49 - def on_while_post(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/loop.rb#73 - def build_break_line(node); end - - # source://rubocop//lib/rubocop/cop/lint/loop.rb#69 - def keyword_and_condition_range(node); end - - # source://rubocop//lib/rubocop/cop/lint/loop.rb#59 - def register_offense(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/loop.rb#47 -RuboCop::Cop::Lint::Loop::MSG = T.let(T.unsafe(nil), String) - -# cop disables on wide ranges of code, that latter contributors to -# a file wouldn't be aware of. -# -# @example -# # Lint/MissingCopEnableDirective: -# # MaximumRangeSize: .inf -# -# # good -# # rubocop:disable Layout/SpaceAroundOperators -# x= 0 -# # rubocop:enable Layout/SpaceAroundOperators -# # y = 1 -# # EOF -# -# # bad -# # rubocop:disable Layout/SpaceAroundOperators -# x= 0 -# # EOF -# @example -# # Lint/MissingCopEnableDirective: -# # MaximumRangeSize: 2 -# -# # good -# # rubocop:disable Layout/SpaceAroundOperators -# x= 0 -# # With the previous, there are 2 lines on which cop is disabled. -# # rubocop:enable Layout/SpaceAroundOperators -# -# # bad -# # rubocop:disable Layout/SpaceAroundOperators -# x= 0 -# x += 1 -# # Including this, that's 3 lines on which the cop is disabled. -# # rubocop:enable Layout/SpaceAroundOperators -# -# source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#45 -class RuboCop::Cop::Lint::MissingCopEnableDirective < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#51 - def on_new_investigation; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#70 - def acceptable_range?(cop, line_range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#104 - def department_enabled?(cop, comment); end - - # source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#64 - def each_missing_enable; end - - # source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#87 - def max_range; end - - # source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#91 - def message(cop, comment, type = T.unsafe(nil)); end -end - -# source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#48 -RuboCop::Cop::Lint::MissingCopEnableDirective::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#49 -RuboCop::Cop::Lint::MissingCopEnableDirective::MSG_BOUND = T.let(T.unsafe(nil), String) - -# Checks for the presence of constructors and lifecycle callbacks -# without calls to `super`. -# -# This cop does not consider `method_missing` (and `respond_to_missing?`) -# because in some cases it makes sense to overtake what is considered a -# 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 -# def initialize(name, salary) -# @salary = salary -# end -# end -# -# # good -# class Employee < Person -# def initialize(name, salary) -# super(name) -# @salary = salary -# end -# end -# -# # bad -# Employee = Class.new(Person) do -# def initialize(name, salary) -# @salary = salary -# end -# end -# -# # good -# Employee = Class.new(Person) do -# def initialize(name, salary) -# super(name) -# @salary = salary -# end -# end -# -# # bad -# class Parent -# def self.inherited(base) -# do_something -# end -# end -# -# # good -# class Parent -# def self.inherited(base) -# super -# do_something -# end -# end -# -# # 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#99 - def class_new_block(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#105 - def on_def(node); end - - # 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#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#133 - def contains_super?(node); end - - # @return [Boolean] - # - # 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#123 - def offender?(node); end -end - -# 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#87 -RuboCop::Cop::Lint::MissingSuper::CALLBACK_MSG = T.let(T.unsafe(nil), String) - -# 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#86 -RuboCop::Cop::Lint::MissingSuper::CONSTRUCTOR_MSG = T.let(T.unsafe(nil), String) - -# 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#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#55 - 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#45 - def on_regexp(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#71 - def build_source_range(range_start, range_end); end - - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#75 - def range_for(char); end - - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#81 - def range_pairs(expr); end - - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#101 - def regexp_range(source); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#91 - def skip_expression?(expr); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#95 - def skip_range?(range_start, range_end); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#85 - 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 -# named captures. -# -# @example -# # bad -# /(?FOO)(BAR)/ -# -# # good -# /(?FOO)(?BAR)/ -# -# # good -# /(?FOO)(?:BAR)/ -# -# # good -# /(FOO)(BAR)/ -# -# source://rubocop//lib/rubocop/cop/lint/mixed_regexp_capture_types.rb#24 -class RuboCop::Cop::Lint::MixedRegexpCaptureTypes < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/mixed_regexp_capture_types.rb#27 - def on_regexp(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/mixed_regexp_capture_types.rb#25 -RuboCop::Cop::Lint::MixedRegexpCaptureTypes::MSG = T.let(T.unsafe(nil), String) - -# In math and Python, we can use `x < y < z` style comparison to compare -# multiple value. However, we can't use the comparison in Ruby. However, -# the comparison is not syntax error. This cop checks the bad usage of -# comparison operators. -# -# @example -# -# # bad -# x < y < z -# 10 <= x <= 20 -# -# # good -# x < y && y < z -# 10 <= x && x <= 20 -# -# source://rubocop//lib/rubocop/cop/lint/multiple_comparison.rb#20 -class RuboCop::Cop::Lint::MultipleComparison < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/multiple_comparison.rb#29 - def multiple_compare?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/multiple_comparison.rb#33 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/multiple_comparison.rb#24 -RuboCop::Cop::Lint::MultipleComparison::COMPARISON_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/multiple_comparison.rb#23 -RuboCop::Cop::Lint::MultipleComparison::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/multiple_comparison.rb#26 -RuboCop::Cop::Lint::MultipleComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/multiple_comparison.rb#25 -RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe(nil), Array) - -# Checks for nested method definitions. -# -# @example -# -# # bad -# -# # `bar` definition actually produces methods in the same scope -# # as the outer `foo` method. Furthermore, the `bar` method -# # will be redefined every time `foo` is invoked. -# def foo -# def bar -# end -# end -# -# # good -# -# def foo -# bar = -> { puts 'hello' } -# bar.call -# end -# -# # good -# -# # `class_eval`, `instance_eval`, `module_eval`, `class_exec`, `instance_exec`, and -# # `module_exec` blocks are allowed by default. -# -# def foo -# self.class.class_eval do -# def bar -# end -# end -# end -# -# def foo -# self.class.module_exec do -# def bar -# end -# end -# end -# -# # good -# -# def foo -# class << self -# def bar -# end -# end -# end -# @example AllowedMethods: [] (default) -# # bad -# def do_something -# has_many :articles do -# def find_or_create_by_name(name) -# end -# end -# end -# @example AllowedMethods: ['has_many'] -# # bad -# def do_something -# has_many :articles do -# def find_or_create_by_name(name) -# end -# end -# end -# @example AllowedPatterns: [] (default) -# # bad -# def foo(obj) -# obj.do_baz do -# def bar -# end -# end -# end -# @example AllowedPatterns: ['baz'] -# # good -# def foo(obj) -# obj.do_baz do -# def bar -# end -# end -# end -# -# source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#91 -class RuboCop::Cop::Lint::NestedMethodDefinition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - - # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#131 - def eval_call?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#136 - def exec_call?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#97 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#97 - def on_defs(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#124 - def allowed_method_name?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#120 - def allowed_subject_type?(subject); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#115 - def scoping_method_call?(child); end -end - -# source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#95 -RuboCop::Cop::Lint::NestedMethodDefinition::MSG = T.let(T.unsafe(nil), String) - -# Checks for nested percent literals. -# -# @example -# -# # bad -# -# # The percent literal for nested_attributes is parsed as four tokens, -# # yielding the array [:name, :content, :"%i[incorrectly", :"nested]"]. -# attributes = { -# valid_attributes: %i[name content], -# nested_attributes: %i[name content %i[incorrectly nested]] -# } -# -# # good -# -# # Neither is incompatible with the bad case, but probably the intended code. -# attributes = { -# valid_attributes: %i[name content], -# nested_attributes: [:name, :content, %i[incorrectly nested]] -# } -# -# attributes = { -# valid_attributes: %i[name content], -# nested_attributes: [:name, :content, [:incorrectly, :nested]] -# } -# -# source://rubocop//lib/rubocop/cop/lint/nested_percent_literal.rb#32 -class RuboCop::Cop::Lint::NestedPercentLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - - # source://rubocop//lib/rubocop/cop/lint/nested_percent_literal.rb#44 - def on_array(node); end - - # source://rubocop//lib/rubocop/cop/lint/nested_percent_literal.rb#48 - def on_percent_literal(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/nested_percent_literal.rb#54 - def contains_percent_literals?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/nested_percent_literal.rb#35 -RuboCop::Cop::Lint::NestedPercentLiteral::MSG = T.let(T.unsafe(nil), String) - -# The array of regular expressions representing percent literals that, -# if found within a percent literal expression, will cause a -# NestedPercentLiteral violation to be emitted. -# -# source://rubocop//lib/rubocop/cop/lint/nested_percent_literal.rb#41 -RuboCop::Cop::Lint::NestedPercentLiteral::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/nested_percent_literal.rb#42 -RuboCop::Cop::Lint::NestedPercentLiteral::REGEXES = T.let(T.unsafe(nil), Array) - -# Don't omit the accumulator when calling `next` in a `reduce` block. -# -# @example -# -# # bad -# result = (1..4).reduce(0) do |acc, i| -# next if i.odd? -# acc + i -# end -# -# # good -# result = (1..4).reduce(0) do |acc, i| -# next acc if i.odd? -# acc + i -# end -# -# source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#21 -class RuboCop::Cop::Lint::NextWithoutAccumulator < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#24 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#38 - def on_block_body_of_reduce(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#24 - def on_numblock(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#45 - def parent_block_node(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#22 -RuboCop::Cop::Lint::NextWithoutAccumulator::MSG = T.let(T.unsafe(nil), String) - -# Checks for the presence of a `return` inside a `begin..end` block -# in assignment contexts. -# In this situation, the `return` will result in an exit from the current -# method, possibly leading to unexpected behavior. -# -# @example -# -# # bad -# @some_variable ||= begin -# return some_value if some_condition_is_met -# -# do_something -# end -# -# # good -# @some_variable ||= begin -# if some_condition_is_met -# some_value -# else -# do_something -# end -# end -# -# # good -# some_variable = if some_condition_is_met -# return if another_condition_is_met -# -# some_value -# else -# do_something -# end -# -# source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#38 -class RuboCop::Cop::Lint::NoReturnInBeginEndBlocks < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#41 - def on_lvasgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#41 - def on_op_asgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#41 - def on_or_asgn(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#39 -RuboCop::Cop::Lint::NoReturnInBeginEndBlocks::MSG = T.let(T.unsafe(nil), String) - -# Checks for non-atomic file operation. -# And then replace it with a nearly equivalent and atomic method. -# -# These can cause problems that are difficult to reproduce, -# especially in cases of frequent file operations in parallel, -# such as test runs with parallel_rspec. -# -# For examples: creating a directory if there is none, has the following problems -# -# An exception occurs when the directory didn't exist at the time of `exist?`, -# but someone else created it before `mkdir` was executed. -# -# Subsequent processes are executed without the directory that should be there -# when the directory existed at the time of `exist?`, -# but someone else deleted it shortly afterwards. -# -# @example -# # bad - race condition with another process may result in an error in `mkdir` -# unless Dir.exist?(path) -# FileUtils.mkdir(path) -# end -# -# # good - atomic and idempotent creation -# FileUtils.mkdir_p(path) -# -# # bad - race condition with another process may result in an error in `remove` -# if File.exist?(path) -# FileUtils.remove(path) -# end -# -# # good - atomic and idempotent removal -# FileUtils.rm_f(path) -# -# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#44 -class RuboCop::Cop::Lint::NonAtomicFileOperation < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # 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#71 - def force?(param0); end - - # 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#66 - def receiver_and_method_name(param0 = T.unsafe(nil)); end - - # 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#98 - def allowable_use_with_if?(if_node); end - - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#123 - def autocorrect(corrector, node, range); end - - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#134 - def autocorrect_replace_method(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#154 - def force_method?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#168 - def force_method_name?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#164 - def force_option?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#92 - def if_node_child?(node); end - - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#113 - def message_change_force_method(node); end - - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#117 - def message_remove_file_exist_check(node); end - - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#102 - def register_offense(node, exist_node); end - - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#142 - def replacement_method(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#158 - def require_mode_keyword?(node); end -end - -# 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#51 -RuboCop::Cop::Lint::NonAtomicFileOperation::MAKE_METHODS = T.let(T.unsafe(nil), Array) - -# 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#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#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#53 -RuboCop::Cop::Lint::NonAtomicFileOperation::REMOVE_METHODS = T.let(T.unsafe(nil), Array) - -# 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 -# the order in which files are returned. The final order is -# determined by the operating system and file system. -# This means that using them in cases where the order matters, -# such as requiring files, can lead to intermittent failures -# that are hard to debug. To ensure this doesn't happen, -# always sort the list. -# -# `Dir.glob` and `Dir[]` sort globbed results by default in Ruby 3.0. -# So all bad cases are acceptable when Ruby 3.0 or higher are used. -# -# NOTE: This cop will be deprecated and removed when supporting only Ruby 3.0 and higher. -# -# @example -# -# # bad -# Dir["./lib/**/*.rb"].each do |file| -# require file -# end -# -# # good -# Dir["./lib/**/*.rb"].sort.each do |file| -# require file -# end -# -# # bad -# Dir.glob(Rails.root.join(__dir__, 'test', '*.rb')) do |file| -# require file -# end -# -# # good -# Dir.glob(Rails.root.join(__dir__, 'test', '*.rb')).sort.each do |file| -# require file -# end -# -# # bad -# Dir['./lib/**/*.rb'].each(&method(:require)) -# -# # good -# Dir['./lib/**/*.rb'].sort.each(&method(:require)) -# -# # bad -# Dir.glob(Rails.root.join('test', '*.rb'), &method(:require)) -# -# # good -# Dir.glob(Rails.root.join('test', '*.rb')).sort.each(&method(:require)) -# -# # good - Respect intent if `sort` keyword option is specified in Ruby 3.0 or higher. -# Dir.glob(Rails.root.join(__dir__, 'test', '*.rb'), sort: false).each(&method(:require)) -# -# source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#60 -class RuboCop::Cop::Lint::NonDeterministicRequireOrder < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # 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#155 - def method_require?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#68 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#90 - def on_block_pass(node); end - - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#79 - def on_numblock(node); end - - # 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#150 - def unsorted_dir_each?(param0 = T.unsafe(nil)); end - - # 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#160 - def unsorted_dir_glob_pass?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#177 - def var_is_required?(param0, param1); end - - private - - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#107 - def correct_block(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#117 - def correct_block_pass(corrector, node); end - - # Returns range of last argument including comma and whitespace. - # - # @return [Parser::Source::Range] - # - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#132 - def last_arg_range(node); end - - # @return [Boolean] - # - # 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#140 - def unsorted_dir_pass?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#64 -RuboCop::Cop::Lint::NonDeterministicRequireOrder::MSG = T.let(T.unsafe(nil), String) - -# Checks for non-local exits from iterators without a return -# value. It registers an offense under these conditions: -# -# * No value is returned, -# * the block is preceded by a method chain, -# * the block has arguments, -# * the method which receives the block is not `define_method` -# or `define_singleton_method`, -# * the return is not contained in an inner scope, e.g. a lambda or a -# method definition. -# -# @example -# -# class ItemApi -# rescue_from ValidationError do |e| # non-iteration block with arg -# return { message: 'validation error' } unless e.errors # allowed -# error_array = e.errors.map do |error| # block with method chain -# return if error.suppress? # warned -# return "#{error.param}: invalid" unless error.message # allowed -# "#{error.param}: #{error.message}" -# end -# { message: 'validation error', errors: error_array } -# end -# -# def update_items -# transaction do # block without arguments -# return unless update_necessary? # allowed -# find_each do |item| # block without method chain -# return if item.stock == 0 # false-negative... -# item.update!(foobar: true) -# end -# end -# end -# end -# -# source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#41 -class RuboCop::Cop::Lint::NonLocalExitFromIterator < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#77 - def chained_send?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#80 - def define_method?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#46 - def on_return(return_node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#72 - def return_value?(return_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#68 - def scoped_node?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#42 -RuboCop::Cop::Lint::NonLocalExitFromIterator::MSG = T.let(T.unsafe(nil), String) - -# Warns the usage of unsafe number conversions. Unsafe -# number conversion can cause unexpected error if auto type conversion -# fails. Cop prefer parsing with number class instead. -# -# 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``). -# As such, this cop is disabled by default because it's not necessarily -# always correct to raise if a value is not numeric. -# -# NOTE: Some values cannot be converted properly using one of the `Kernel` -# method (for instance, `Time` and `DateTime` values are allowed by this -# cop by default). Similarly, Rails' duration methods do not work well -# with `Integer()` and can be allowed with `AllowedMethods`. By default, -# there are no methods to allowed. -# -# @example -# -# # bad -# -# '10'.to_i -# '10.2'.to_f -# '10'.to_c -# '1/3'.to_r -# ['1', '2', '3'].map(&:to_i) -# foo.try(:to_f) -# bar.send(:to_c) -# -# # good -# -# Integer('10', 10) -# Float('10.2') -# Complex('10') -# Rational('1/3') -# ['1', '2', '3'].map { |i| Integer(i, 10) } -# foo.try { |i| Float(i) } -# bar.send { |i| Complex(i) } -# @example AllowedMethods: [] (default) -# -# # bad -# 10.minutes.to_i -# @example AllowedMethods: [minutes] -# -# # good -# 10.minutes.to_i -# @example AllowedPatterns: [] (default) -# -# # bad -# 10.minutes.to_i -# @example AllowedPatterns: ['min*'] -# -# # good -# 10.minutes.to_i -# @example IgnoredClasses: [Time, DateTime] (default) -# -# # good -# Time.now.to_datetime.to_i -# -# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#73 -class RuboCop::Cop::Lint::NumberConversion < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#106 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#106 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#92 - def to_method(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#97 - def to_method_symbol(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#164 - def allow_receiver?(receiver); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#176 - def allowed_method_name?(name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#186 - def conversion_method?(method_name); end - - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#150 - def correct_method(node, receiver); end - - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#154 - def correct_sym_method(to_method); end - - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#133 - def handle_as_symbol(node); end - - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#114 - def handle_conversion_method(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#194 - def ignored_class?(name); end - - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#190 - def ignored_classes; end - - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#159 - def remove_parentheses(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#180 - def top_receiver(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#88 -RuboCop::Cop::Lint::NumberConversion::CONVERSION_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#78 -RuboCop::Cop::Lint::NumberConversion::CONVERSION_METHOD_CLASS_MAPPING = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#89 -RuboCop::Cop::Lint::NumberConversion::METHODS = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#84 -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 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 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin19] -# -e:1: _1 is reserved for numbered parameter -# -# NOTE: The parametered parameters are from `_1` to `_9`. This cop checks `_0`, and over `_10` -# as well to prevent confusion. -# -# @example -# -# # bad -# _1 = :value -# -# # good -# non_numbered_parameter_name = :value -# -# source://rubocop//lib/rubocop/cop/lint/numbered_parameter_assignment.rb#30 -class RuboCop::Cop::Lint::NumberedParameterAssignment < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/numbered_parameter_assignment.rb#35 - def on_lvasgn(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/numbered_parameter_assignment.rb#32 -RuboCop::Cop::Lint::NumberedParameterAssignment::LVAR_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/numbered_parameter_assignment.rb#33 -RuboCop::Cop::Lint::NumberedParameterAssignment::NUMBERED_PARAMETER_RANGE = T.let(T.unsafe(nil), Range) - -# source://rubocop//lib/rubocop/cop/lint/numbered_parameter_assignment.rb#31 -RuboCop::Cop::Lint::NumberedParameterAssignment::NUM_PARAM_MSG = T.let(T.unsafe(nil), String) - -# Certain numeric operations have a constant result, usually 0 or 1. -# Multiplying a number by 0 will always return 0. -# Dividing a number by itself or raising it to the power of 0 will always return 1. -# As such, they can be replaced with that result. -# These are probably leftover from debugging, or are mistakes. -# Other numeric operations that are similarly leftover from debugging or mistakes -# are handled by `Lint/UselessNumericOperation`. -# -# NOTE: This cop doesn't detect offenses for the `-` and `%` operator because it -# can't determine the type of `x`. If `x` is an `Array` or `String`, it doesn't perform -# a numeric operation. -# -# @example -# -# # bad -# x * 0 -# -# # good -# 0 -# -# # bad -# x *= 0 -# -# # good -# x = 0 -# -# # bad -# x / x -# x ** 0 -# -# # good -# 1 -# -# # bad -# x /= x -# x **= 0 -# -# # good -# x = 1 -# -# source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#46 -class RuboCop::Cop::Lint::NumericOperationWithConstantResult < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#56 - def abbreviated_assignment_with_constant_result?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#59 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#69 - def on_op_asgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#59 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#52 - def operation_with_constant_result?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#80 - def constant_result?(lhs, operation, rhs); end -end - -# source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#48 -RuboCop::Cop::Lint::NumericOperationWithConstantResult::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#49 -RuboCop::Cop::Lint::NumericOperationWithConstantResult::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for unintended or-assignment to a constant. -# -# Constants should always be assigned in the same location. And its value -# should always be the same. If constants are assigned in multiple -# locations, the result may vary depending on the order of `require`. -# -# @example -# -# # bad -# CONST ||= 1 -# -# # good -# CONST = 1 -# -# source://rubocop//lib/rubocop/cop/lint/or_assignment_to_constant.rb#24 -class RuboCop::Cop::Lint::OrAssignmentToConstant < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/or_assignment_to_constant.rb#29 - def on_or_asgn(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/or_assignment_to_constant.rb#27 -RuboCop::Cop::Lint::OrAssignmentToConstant::MSG = T.let(T.unsafe(nil), String) - -# Checks the proper ordering of magic comments and whether -# a magic comment is not placed before a shebang. -# -# @example -# # bad -# -# # frozen_string_literal: true -# # encoding: ascii -# p [''.frozen?, ''.encoding] #=> [true, #] -# -# # good -# -# # encoding: ascii -# # frozen_string_literal: true -# p [''.frozen?, ''.encoding] #=> [true, #] -# -# # good -# -# #!/usr/bin/env ruby -# # encoding: ascii -# # frozen_string_literal: true -# p [''.frozen?, ''.encoding] #=> [true, #] -# -# 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#38 - def on_new_investigation; end - - private - - # 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#63 - def magic_comment_lines; end -end - -# 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 -# and thus always returns nil. -# -# @example -# -# /(foo)bar/ =~ 'foobar' -# -# # bad - always returns nil -# -# puts $2 # => nil -# -# # good -# -# puts $1 # => foo -# -# source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#38 -class RuboCop::Cop::Lint::OutOfRangeRegexpRef < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#55 - def after_csend(node); end - - # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#55 - def after_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#72 - def on_in_pattern(node); end - - # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#51 - def on_match_with_lvasgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#47 - def on_new_investigation; end - - # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#78 - def on_nth_ref(node); end - - # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#66 - def on_when(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#103 - def check_regexp(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#123 - def nth_ref_receiver?(send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#114 - def regexp_first_argument?(send_node); end - - # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#94 - def regexp_patterns(in_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#119 - def regexp_receiver?(send_node); end -end - -# source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#39 -RuboCop::Cop::Lint::OutOfRangeRegexpRef::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#42 -RuboCop::Cop::Lint::OutOfRangeRegexpRef::REGEXP_ARGUMENT_METHODS = T.let(T.unsafe(nil), Set) - -# source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#44 -RuboCop::Cop::Lint::OutOfRangeRegexpRef::REGEXP_CAPTURE_METHODS = T.let(T.unsafe(nil), Set) - -# source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#41 -RuboCop::Cop::Lint::OutOfRangeRegexpRef::REGEXP_RECEIVER_METHODS = T.let(T.unsafe(nil), Set) - -# source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#45 -RuboCop::Cop::Lint::OutOfRangeRegexpRef::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) - -# Checks for space between the name of a called method and a left -# parenthesis. -# -# @example -# -# # bad -# do_something (foo) -# -# # good -# do_something(foo) -# do_something (2 + 3) * 4 -# do_something (foo * bar).baz -# -# source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#18 -class RuboCop::Cop::Lint::ParenthesesAsGroupedExpression < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#24 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#24 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#56 - def chained_calls?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#52 - def compound_range?(first_arg); end - - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#81 - def space_range(expr, space_length); end - - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#65 - def spaces_before_left_parenthesis(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#61 - def ternary_expression?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#39 - def valid_context?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#47 - def valid_first_argument?(first_arg); end -end - -# source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#22 -RuboCop::Cop::Lint::ParenthesesAsGroupedExpression::MSG = T.let(T.unsafe(nil), String) - -# Checks for quotes and commas in %w, e.g. `%w('foo', "bar")` -# -# It is more likely that the additional characters are unintended (for -# example, mistranslating an array of literals to percent string notation) -# rather than meant to be part of the resulting strings. -# -# @example -# -# # bad -# %w('foo', "bar") -# -# # good -# %w(foo bar) -# -# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#29 -class RuboCop::Cop::Lint::PercentStringArray < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#40 - def on_array(node); end - - # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#44 - def on_percent_literal(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#61 - def contains_quotes_or_commas?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#34 -RuboCop::Cop::Lint::PercentStringArray::LEADING_QUOTE = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#37 -RuboCop::Cop::Lint::PercentStringArray::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#33 -RuboCop::Cop::Lint::PercentStringArray::QUOTES_AND_COMMAS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#35 -RuboCop::Cop::Lint::PercentStringArray::TRAILING_QUOTE = T.let(T.unsafe(nil), Regexp) - -# Checks for colons and commas in %i, e.g. `%i(:foo, :bar)` -# -# It is more likely that the additional characters are unintended (for -# example, mistranslating an array of literals to percent string notation) -# rather than meant to be part of the resulting symbols. -# -# @example -# -# # bad -# %i(:foo, :bar) -# -# # good -# %i(foo bar) -# -# source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#19 -class RuboCop::Cop::Lint::PercentSymbolArray < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#26 - def on_array(node); end - - # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#30 - def on_percent_literal(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#38 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#48 - def contains_colons_or_commas?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#58 - def non_alphanumeric_literal?(literal); end -end - -# source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#23 -RuboCop::Cop::Lint::PercentSymbolArray::MSG = T.let(T.unsafe(nil), String) - -# Checks for `raise` or `fail` statements which are -# raising `Exception` class. -# -# You can specify a module name that will be an implicit namespace -# using `AllowedImplicitNamespaces` option. The cop cause a false positive -# for namespaced `Exception` when a namespace is omitted. This option can -# prevent the false positive by specifying a namespace to be omitted for -# `Exception`. Alternatively, make `Exception` a fully qualified class -# name with an explicit namespace. -# -# @example -# # bad -# raise Exception, 'Error message here' -# -# # good -# raise StandardError, 'Error message here' -# @example AllowedImplicitNamespaces: ['Gem'] -# # good -# module Gem -# def self.foo -# raise Exception # This exception means `Gem::Exception`. -# end -# end -# -# source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#34 -class RuboCop::Cop::Lint::RaiseException < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#41 - def exception?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#46 - def exception_new_with_message?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#51 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#85 - def allow_implicit_namespaces; end - - # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#57 - def check(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#73 - def implicit_namespace?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#37 -RuboCop::Cop::Lint::RaiseException::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#38 -RuboCop::Cop::Lint::RaiseException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for `rand(1)` calls. -# Such calls always return `0`. -# -# @example -# -# # bad -# rand 1 -# Kernel.rand(-1) -# rand 1.0 -# rand(-1.0) -# -# # good -# 0 # just use 0 instead -# -# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#19 -class RuboCop::Cop::Lint::RandOne < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#28 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#24 - def rand_one?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#36 - def message(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#20 -RuboCop::Cop::Lint::RandOne::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#21 -RuboCop::Cop::Lint::RandOne::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# removed without causing any offenses to be reported. It's implemented -# as a cop in that it inherits from the Cop base class and calls -# add_offense. The unusual part of its implementation is that it doesn't -# have any on_* methods or an investigate method. This means that it -# doesn't take part in the investigation phase when the other cops do -# their work. Instead, it waits until it's called in a later stage of the -# execution. The reason it can't be implemented as a normal cop is that -# it depends on the results of all other cops to do its work. -# -# @example -# # bad -# # rubocop:disable Layout/LineLength -# x += 1 -# # rubocop:enable Layout/LineLength -# -# # good -# x += 1 -# -# source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#28 -class RuboCop::Cop::Lint::RedundantCopDisableDirective < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # @return [RedundantCopDisableDirective] a new instance of RedundantCopDisableDirective - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#37 - def initialize(config = T.unsafe(nil), options = T.unsafe(nil), offenses = T.unsafe(nil)); end - - # Returns the value of attribute offenses_to_check. - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#35 - def offenses_to_check; end - - # Sets the attribute offenses_to_check - # - # @param value the value to set the attribute offenses_to_check to. - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#35 - def offenses_to_check=(_arg0); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#42 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#323 - def add_department_marker(department); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#229 - def add_offense_for_entire_comment(comment, cops); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#244 - def add_offense_for_some_cops(comment, cops); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#219 - def add_offenses(redundant_cops); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#306 - def all_cop_names; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#190 - def all_disabled?(comment); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#69 - def comment_range_with_surrounding_space(directive_comment_range, line_comment_range); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#57 - def cop_disabled_line_ranges; end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#264 - def cop_range(comment, cop); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#210 - def department_disabled?(cop, comment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#315 - def department_marker?(department); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#293 - def describe(cop); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#215 - def directive_count(comment); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#92 - def directive_range_in_list(range, ranges); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#61 - def disabled_ranges; end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#132 - def each_already_disabled(cop, line_ranges); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#113 - def each_line_range(cop, line_ranges); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#106 - def each_redundant_disable(&block); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#310 - def ends_its_line?(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#202 - def expected_final_disable?(cop, line_range); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#166 - def find_redundant_all(range, next_range); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#161 - def find_redundant_cop(cop, range); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#176 - def find_redundant_department(cop, range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#182 - def followed_ranges?(range, next_range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#194 - def ignore_offense?(line_range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#258 - def leave_free_comment?(comment, range); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#271 - def matching_range(haystack, needle); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#302 - def message(cop_names); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#65 - def previous_line_blank?(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#186 - def range_with_offense?(range, offenses = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#319 - def remove_department_marker(department); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#279 - def trailing_range?(ranges, range); end -end - -# source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#32 -RuboCop::Cop::Lint::RedundantCopDisableDirective::COP_NAME = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#33 -RuboCop::Cop::Lint::RedundantCopDisableDirective::DEPARTMENT_MARKER = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#287 -RuboCop::Cop::Lint::RedundantCopDisableDirective::SIMILAR_COP_NAMES_CACHE = T.let(T.unsafe(nil), Hash) - -# removed. -# -# that cop checks whether any cop was actually enabled. -# -# @example -# -# # bad -# foo = 1 -# # rubocop:enable Layout/LineLength -# -# # good -# foo = 1 -# -# # bad -# # rubocop:disable Style/StringLiterals -# foo = "1" -# # rubocop:enable Style/StringLiterals -# baz -# # rubocop:enable all -# -# # good -# # rubocop:disable Style/StringLiterals -# foo = "1" -# # rubocop:enable all -# baz -# -# source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#39 -class RuboCop::Cop::Lint::RedundantCopEnableDirective < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#46 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#122 - def all_or_name(name); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#78 - def comment_start(comment); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#82 - def cop_name_indention(comment, name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#126 - def department?(directive, name); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#73 - def range_of_offense(comment, name); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#97 - def range_to_remove(begin_pos, end_pos, comment); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#86 - def range_with_comma(comment, name); end - - # If the list of cops is comma-separated, but without an empty space after the comma, - # we should **not** remove the prepending empty space, thus begin_pos += 1 - # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#116 - def range_with_comma_after(comment, start, begin_pos, end_pos); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#110 - def range_with_comma_before(start, begin_pos, end_pos); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#55 - def register_offense(comment, cop_names); end -end - -# source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#44 -RuboCop::Cop::Lint::RedundantCopEnableDirective::MSG = T.let(T.unsafe(nil), String) - -# Sort globbed results by default in Ruby 3.0. -# This cop checks for redundant `sort` method to `Dir.glob` and `Dir[]`. -# -# @example -# -# # bad -# Dir.glob('./lib/**/*.rb').sort.each do |file| -# end -# -# Dir['./lib/**/*.rb'].sort.each do |file| -# end -# -# # good -# Dir.glob('./lib/**/*.rb').each do |file| -# end -# -# Dir['./lib/**/*.rb'].each do |file| -# end -# -# source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#30 -class RuboCop::Cop::Lint::RedundantDirGlobSort < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#40 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#56 - def multiple_argument?(glob_method); end -end - -# source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#38 -RuboCop::Cop::Lint::RedundantDirGlobSort::GLOB_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#36 -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 -# they are already loaded. e.g. Ruby 2.2: -# -# ruby -ve 'p $LOADED_FEATURES.reject { |feature| %r|/| =~ feature }' -# ruby 2.2.8p477 (2017-09-14 revision 59906) [x86_64-darwin13] -# ["enumerator.so", "rational.so", "complex.so", "thread.rb"] -# -# Below are the features that each `TargetRubyVersion` targets. -# -# * 2.0+ ... `enumerator` -# * 2.1+ ... `thread` -# * 2.2+ ... Add `rational` and `complex` above -# * 2.7+ ... Add `ruby2_keywords` above -# * 3.1+ ... Add `fiber` above -# * 3.2+ ... `set` -# -# This cop target those features. -# -# @example -# # bad -# require 'unloaded_feature' -# require 'thread' -# -# # good -# require 'unloaded_feature' -# -# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#33 -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#47 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#42 - def redundant_require_statement?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#66 - def redundant_feature?(feature_name); end -end - -# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#37 -RuboCop::Cop::Lint::RedundantRequireStatement::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#38 -RuboCop::Cop::Lint::RedundantRequireStatement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#39 -RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T.unsafe(nil), Array) - -# Checks for redundant safe navigation calls. -# 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 constant. The detection also applies -# to `self`, and to literal receivers, except for `nil`. -# -# 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. -# Note that the `AllowedMethod` option is not an option that specifies methods -# for which to suppress (allow) this cop's check. -# -# In the example below, the safe navigation operator (`&.`) is unnecessary -# because `NilClass` has methods like `respond_to?` and `is_a?`. -# -# @example -# # bad -# CamelCaseConst&.do_something -# -# # good -# CamelCaseConst.do_something -# -# # bad -# do_something if attrs&.respond_to?(:[]) -# -# # good -# do_something if attrs.respond_to?(:[]) -# -# # bad -# while node&.is_a?(BeginNode) -# node = node.parent -# end -# -# # 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 -# -# # bad -# self&.foo -# -# # good -# self.foo -# @example AllowedMethods: [nil_safe_method] -# # bad -# do_something if attrs&.nil_safe_method(:[]) -# -# # good -# 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#84 -class RuboCop::Cop::Lint::RedundantSafeNavigation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#101 - def conversion_with_default?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#113 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#123 - def on_or(node); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#96 - def respond_to_nil_specific_method?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#139 - def assume_receiver_instance_exists?(receiver); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#145 - def check?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#154 - def condition?(parent, node); end -end - -# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#88 -RuboCop::Cop::Lint::RedundantSafeNavigation::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#89 -RuboCop::Cop::Lint::RedundantSafeNavigation::MSG_LITERAL = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#91 -RuboCop::Cop::Lint::RedundantSafeNavigation::NIL_SPECIFIC_METHODS = T.let(T.unsafe(nil), Set) - -# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#93 -RuboCop::Cop::Lint::RedundantSafeNavigation::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) - -# Checks for unneeded usages of splat expansion. -# -# @example -# -# # bad -# a = *[1, 2, 3] -# a = *'a' -# a = *1 -# ['a', 'b', *%w(c d e), 'f', 'g'] -# -# # good -# c = [1, 2, 3] -# a = *c -# a, b = *c -# a, *b = *c -# a = *1..10 -# a = ['a'] -# ['a', 'b', 'c', 'd', 'e', 'f', 'g'] -# -# # bad -# do_something(*['foo', 'bar', 'baz']) -# -# # good -# do_something('foo', 'bar', 'baz') -# -# # bad -# begin -# foo -# rescue *[StandardError, ApplicationError] -# bar -# end -# -# # good -# begin -# foo -# rescue StandardError, ApplicationError -# bar -# end -# -# # bad -# case foo -# when *[1, 2, 3] -# bar -# else -# baz -# end -# -# # good -# case foo -# when 1, 2, 3 -# bar -# else -# baz -# end -# @example AllowPercentLiteralArrayArgument: true (default) -# -# # good -# do_something(*%w[foo bar baz]) -# @example AllowPercentLiteralArrayArgument: false -# -# # bad -# do_something(*%w[foo bar baz]) -# -# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#71 -class RuboCop::Cop::Lint::RedundantSplatExpansion < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#83 - def array_new?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#91 - def literal_expansion(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#95 - def on_splat(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#204 - def allow_percent_literal_array_argument?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#131 - def array_new_inside_array_literal?(array_new_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#156 - def array_splat?(node); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#112 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#160 - def method_argument?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#164 - def part_of_an_array?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#171 - def redundant_brackets?(node); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#118 - def redundant_splat_expansion(node); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#179 - def remove_brackets(array); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#139 - def replacement_range_and_content(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#197 - def use_percent_literal_array_argument?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#75 -RuboCop::Cop::Lint::RedundantSplatExpansion::ARRAY_PARAM_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#80 -RuboCop::Cop::Lint::RedundantSplatExpansion::ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#74 -RuboCop::Cop::Lint::RedundantSplatExpansion::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#79 -RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_CAPITAL_I = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#77 -RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_CAPITAL_W = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#78 -RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_I = T.let(T.unsafe(nil), String) - -# 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, `print`, `puts`, and `warn` arguments, -# which is redundant. -# -# @example -# -# # bad -# "result is #{something.to_s}" -# print something.to_s -# puts something.to_s -# warn something.to_s -# -# # good -# "result is #{something}" -# print something -# puts something -# warn something -# -# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#23 -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#34 - def on_interpolation(begin_node); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#42 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#32 - def to_s_without_args?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#54 - def register_offense(node, context); end -end - -# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#27 -RuboCop::Cop::Lint::RedundantStringCoercion::MSG_DEFAULT = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#28 -RuboCop::Cop::Lint::RedundantStringCoercion::MSG_SELF = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#29 -RuboCop::Cop::Lint::RedundantStringCoercion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for redundant uses of `to_s`, `to_sym`, `to_i`, `to_f`, `to_d`, `to_r`, `to_c`, -# `to_a`, `to_h`, and `to_set`. -# -# When one of these methods is called on an object of the same type, that object -# is returned, making the call unnecessary. The cop detects conversion methods called -# on object literals, class constructors, class `[]` methods, and the `Kernel` methods -# `String()`, `Integer()`, `Float()`, BigDecimal(), `Rational()`, `Complex()`, and `Array()`. -# -# Specifically, these cases are detected for each conversion method: -# -# * `to_s` when called on a string literal, interpolated string, heredoc, -# or with `String.new` or `String()`. -# * `to_sym` when called on a symbol literal or interpolated symbol. -# * `to_i` when called on an integer literal or with `Integer()`. -# * `to_f` when called on a float literal of with `Float()`. -# * `to_r` when called on a rational literal or with `Rational()`. -# * `to_c` when called on a complex literal of with `Complex()`. -# * `to_a` when called on an array literal, or with `Array.new`, `Array()` or `Array[]`. -# * `to_h` when called on a hash literal, or with `Hash.new`, `Hash()` or `Hash[]`. -# * `to_set` when called on `Set.new` or `Set[]`. -# -# In all cases, chaining one same `to_*` conversion methods listed above is redundant. -# -# The cop can also register an offense for chaining conversion methods on methods that are -# expected to return a specific type regardless of receiver (eg. `foo.inspect.to_s`). -# -# @example -# # bad -# "text".to_s -# :sym.to_sym -# 42.to_i -# 8.5.to_f -# 12r.to_r -# 1i.to_c -# [].to_a -# {}.to_h -# Set.new.to_set -# -# # good -# "text" -# :sym -# 42 -# 8.5 -# 12r -# 1i -# [] -# {} -# Set.new -# -# # bad -# Integer(var).to_i -# -# # good -# Integer(var) -# -# # good - chaining to a type constructor with exceptions suppressed -# # in this case, `Integer()` could return `nil` -# Integer(var, exception: false).to_i -# -# # bad - chaining the same conversion -# foo.to_s.to_s -# -# # good -# foo.to_s -# -# # bad - chaining a conversion to a method that is expected to return the same type -# inspect.to_s -# -# # good -# inspect -# -# source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#77 -class RuboCop::Cop::Lint::RedundantTypeConversion < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#157 - def array_constructor?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#142 - def bigdecimal_constructor?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#152 - def complex_constructor?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#181 - def exception_false_keyword_argument?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#137 - def float_constructor?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#165 - def hash_constructor?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#132 - def integer_constructor?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#186 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#186 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#147 - def rational_constructor?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#174 - def set_constructor?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#124 - def string_constructor?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#119 - def type_constructor?(param0 = T.unsafe(nil), param1); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#244 - def chained_conversion?(node, receiver); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#250 - def chained_to_typed_method?(node, receiver); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#231 - def constructor?(node, receiver); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#238 - def constructor_suppresses_exceptions?(receiver); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#212 - def find_receiver(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#206 - def hash_or_set_with_block?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#225 - def literal_receiver?(node, receiver); end -end - -# Maps each conversion method to the pattern matcher for that type's constructors -# Not every type has a constructor, for instance Symbol. -# -# source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#97 -RuboCop::Cop::Lint::RedundantTypeConversion::CONSTRUCTOR_MAPPING = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#113 -RuboCop::Cop::Lint::RedundantTypeConversion::CONVERSION_METHODS = T.let(T.unsafe(nil), Set) - -# Maps conversion methods to the node types for the literals of that type -# -# source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#83 -RuboCop::Cop::Lint::RedundantTypeConversion::LITERAL_NODE_TYPES = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#80 -RuboCop::Cop::Lint::RedundantTypeConversion::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#114 -RuboCop::Cop::Lint::RedundantTypeConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) - -# Methods that already are expected to return a given type, which makes a further -# conversion redundant. -# -# source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#111 -RuboCop::Cop::Lint::RedundantTypeConversion::TYPED_METHODS = T.let(T.unsafe(nil), Hash) - -# Checks for redundant `with_index`. -# -# @example -# # bad -# ary.each_with_index do |v| -# v -# end -# -# # good -# ary.each do |v| -# v -# end -# -# # bad -# ary.each.with_index do |v| -# v -# end -# -# # good -# ary.each do |v| -# v -# end -# -# source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#29 -class RuboCop::Cop::Lint::RedundantWithIndex < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#37 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#37 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#60 - def redundant_with_index?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#70 - def message(node); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#78 - def with_index_range(send); end -end - -# source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#33 -RuboCop::Cop::Lint::RedundantWithIndex::MSG_EACH_WITH_INDEX = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#34 -RuboCop::Cop::Lint::RedundantWithIndex::MSG_WITH_INDEX = T.let(T.unsafe(nil), String) - -# Checks for redundant `with_object`. -# -# @example -# # bad -# ary.each_with_object([]) do |v| -# v -# end -# -# # good -# ary.each do |v| -# v -# end -# -# # bad -# ary.each.with_object([]) do |v| -# v -# end -# -# # good -# ary.each do |v| -# v -# end -# -# source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#29 -class RuboCop::Cop::Lint::RedundantWithObject < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#36 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#36 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#56 - def redundant_with_object?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#65 - def message(node); end - - # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#73 - def with_object_range(send); end -end - -# source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#33 -RuboCop::Cop::Lint::RedundantWithObject::MSG_EACH_WITH_OBJECT = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#34 -RuboCop::Cop::Lint::RedundantWithObject::MSG_WITH_OBJECT = T.let(T.unsafe(nil), String) - -# Checks if `include` or `prepend` is called in `refine` block. -# These methods are deprecated and should be replaced with `Refinement#import_methods`. -# -# It emulates deprecation warnings in Ruby 3.1. Functionality has been removed in Ruby 3.2. -# -# @example -# -# # bad -# refine Foo do -# include Bar -# end -# -# # bad -# refine Foo do -# prepend Bar -# end -# -# # good -# refine Foo do -# import_methods Bar -# end -# -# source://rubocop//lib/rubocop/cop/lint/refinement_import_methods.rb#34 -class RuboCop::Cop::Lint::RefinementImportMethods < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/lint/refinement_import_methods.rb#42 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/refinement_import_methods.rb#37 -RuboCop::Cop::Lint::RefinementImportMethods::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/refinement_import_methods.rb#38 -RuboCop::Cop::Lint::RefinementImportMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for regexp literals used as `match-current-line`. -# If a regexp literal is in condition, the regexp matches `$_` implicitly. -# -# @example -# # bad -# if /foo/ -# do_something -# end -# -# # good -# if /foo/ =~ $_ -# do_something -# end -# -# source://rubocop//lib/rubocop/cop/lint/regexp_as_condition.rb#19 -class RuboCop::Cop::Lint::RegexpAsCondition < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/regexp_as_condition.rb#25 - def on_match_current_line(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/regexp_as_condition.rb#22 -RuboCop::Cop::Lint::RegexpAsCondition::MSG = T.let(T.unsafe(nil), String) - -# Checks for expressions where there is a call to a predicate -# method with at least one argument, where no parentheses are used around -# the parameter list, and a boolean operator, && or ||, is used in the -# last argument. -# -# The idea behind warning for these constructs is that the user might -# be under the impression that the return value from the method call is -# an operand of &&/||. -# -# @example -# -# # bad -# if day.is? :tuesday && month == :jan -# # ... -# end -# -# # good -# if day.is?(:tuesday) && month == :jan -# # ... -# end -# -# source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#26 -class RuboCop::Cop::Lint::RequireParentheses < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#31 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#31 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#54 - def check_predicate(predicate, node); end - - # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#44 - def check_ternary(ternary, node); end -end - -# source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#29 -RuboCop::Cop::Lint::RequireParentheses::MSG = T.let(T.unsafe(nil), String) - -# Checks that a range literal is enclosed in parentheses when the end of the range is -# at a line break. -# -# NOTE: The following is maybe intended for `(42..)`. But, compatible is `42..do_something`. -# So, this cop does not provide autocorrection because it is left to user. -# -# [source,ruby] -# ---- -# case condition -# when 42.. -# do_something -# end -# ---- -# -# @example -# -# # bad - Represents `(1..42)`, not endless range. -# 1.. -# 42 -# -# # good - It's incompatible, but your intentions when using endless range may be: -# (1..) -# 42 -# -# # good -# 1..42 -# -# # good -# (1..42) -# -# # good -# (1.. -# 42) -# -# source://rubocop//lib/rubocop/cop/lint/require_range_parentheses.rb#40 -class RuboCop::Cop::Lint::RequireRangeParentheses < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/require_range_parentheses.rb#43 - def on_erange(node); end - - # source://rubocop//lib/rubocop/cop/lint/require_range_parentheses.rb#43 - def on_irange(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/require_range_parentheses.rb#41 -RuboCop::Cop::Lint::RequireRangeParentheses::MSG = T.let(T.unsafe(nil), String) - -# Checks for uses a file requiring itself with `require_relative`. -# -# @example -# -# # bad -# -# # foo.rb -# require_relative 'foo' -# require_relative 'bar' -# -# # good -# -# # foo.rb -# require_relative 'bar' -# -# source://rubocop//lib/rubocop/cop/lint/require_relative_self_path.rb#21 -class RuboCop::Cop::Lint::RequireRelativeSelfPath < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/require_relative_self_path.rb#28 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/require_relative_self_path.rb#44 - def remove_ext(file_path); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/require_relative_self_path.rb#40 - def same_file?(file_path, required_feature); end -end - -# source://rubocop//lib/rubocop/cop/lint/require_relative_self_path.rb#25 -RuboCop::Cop::Lint::RequireRelativeSelfPath::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/require_relative_self_path.rb#26 -RuboCop::Cop::Lint::RequireRelativeSelfPath::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for `rescue` blocks targeting the `Exception` class. -# -# @example -# -# # bad -# begin -# do_something -# rescue Exception -# handle_exception -# end -# -# # good -# begin -# do_something -# rescue ArgumentError -# handle_exception -# end -# -# source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#23 -class RuboCop::Cop::Lint::RescueException < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#26 - def on_resbody(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#35 - def targets_exception?(rescue_arg_node); end -end - -# source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#24 -RuboCop::Cop::Lint::RescueException::MSG = T.let(T.unsafe(nil), String) - -# Check for arguments to `rescue` that will result in a `TypeError` -# if an exception is raised. -# -# @example -# # bad -# begin -# bar -# rescue nil -# baz -# end -# -# # bad -# def foo -# bar -# rescue 1, 'a', "#{b}", 0.0, [], {} -# baz -# end -# -# # good -# begin -# bar -# rescue -# baz -# end -# -# # good -# def foo -# bar -# rescue NameError -# baz -# end -# -# source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#37 -class RuboCop::Cop::Lint::RescueType < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#56 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#44 - def on_resbody(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#65 - def correction(*exceptions); end - - # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#76 - def invalid_exceptions(exceptions); end - - # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#72 - def valid_exceptions(exceptions); end -end - -# source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#42 -RuboCop::Cop::Lint::RescueType::INVALID_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#40 -RuboCop::Cop::Lint::RescueType::MSG = T.let(T.unsafe(nil), String) - -# Checks for the use of a return with a value in a context -# where the value will be ignored. (initialize and setter methods) -# -# @example -# -# # bad -# def initialize -# foo -# return :qux if bar? -# baz -# end -# -# def foo=(bar) -# return 42 -# end -# -# # good -# def initialize -# foo -# return if bar? -# baz -# end -# -# def foo=(bar) -# return -# end -# -# source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#32 -class RuboCop::Cop::Lint::ReturnInVoidContext < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#35 - def on_return(return_node); end -end - -# source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#33 -RuboCop::Cop::Lint::ReturnInVoidContext::MSG = T.let(T.unsafe(nil), String) - -# The safe navigation operator returns nil if the receiver is -# nil. If you chain an ordinary method call after a safe -# navigation operator, it raises NoMethodError. We should use a -# safe navigation operator after a safe navigation operator. -# This cop checks for the problem outlined above. -# -# @example -# -# # bad -# x&.foo.bar -# x&.foo + bar -# x&.foo[bar] -# -# # good -# x&.foo&.bar -# x&.foo || bar -# -# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#22 -class RuboCop::Cop::Lint::SafeNavigationChain < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::NilMethods - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#33 - def bad_method?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#40 - def on_send(node); end - - private - - # @param offense_range [Parser::Source::Range] - # @param send_node [RuboCop::AST::SendNode] - # @return [String] - # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#67 - 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#86 - def autocorrect(corrector, offense_range:, send_node:); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#95 - def brackets?(send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#108 - def operator_inside_hash?(send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#99 - def require_parentheses?(send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#57 - def require_safe_navigation?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#29 -RuboCop::Cop::Lint::SafeNavigationChain::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#30 -RuboCop::Cop::Lint::SafeNavigationChain::PLUS_MINUS_METHODS = T.let(T.unsafe(nil), Array) - -# Check to make sure that if safe navigation is used in an `&&` or `||` condition, -# consistent and appropriate safe navigation, without excess or deficiency, -# is used for all method calls on the same object. -# -# @example -# # bad -# foo&.bar && foo&.baz -# -# # good -# foo&.bar && foo.baz -# -# # bad -# foo.bar && foo&.baz -# -# # good -# foo.bar && foo.baz -# -# # bad -# foo&.bar || foo.baz -# -# # good -# foo&.bar || foo&.baz -# -# # bad -# foo.bar || foo&.baz -# -# # good -# foo.bar || foo.baz -# -# # bad -# foo&.bar && (foobar.baz || foo&.baz) -# -# # good -# foo&.bar && (foobar.baz || foo.baz) -# -# source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#41 -class RuboCop::Cop::Lint::SafeNavigationConsistency < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::NilMethods - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#48 - def on_and(node); end - - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#48 - def on_or(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#98 - def already_appropriate_call?(operand, dot_op); end - - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#67 - def collect_operands(node, operand_nodes); end - - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#83 - def find_consistent_parts(grouped_operands); end - - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#124 - def most_left_indices(grouped_operands); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#154 - def nilable?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#138 - def operand_in_and?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#146 - def operand_in_or?(node); end - - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#115 - def operand_nodes(operand, operand_nodes); end - - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#74 - def receiver_name_as_key(method, fully_receivers); end - - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#104 - def register_offense(operand, dot_operator); end -end - -# source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#45 -RuboCop::Cop::Lint::SafeNavigationConsistency::USE_DOT_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#46 -RuboCop::Cop::Lint::SafeNavigationConsistency::USE_SAFE_NAVIGATION_MSG = T.let(T.unsafe(nil), String) - -# Checks to make sure safe navigation isn't used with `empty?` in -# a conditional. -# -# While the safe navigation operator is generally a good idea, when -# checking `foo&.empty?` in a conditional, `foo` being `nil` will actually -# do the opposite of what the author intends. -# -# @example -# # bad -# return if foo&.empty? -# return unless foo&.empty? -# -# # good -# return if foo && foo.empty? -# return unless foo && foo.empty? -# -# source://rubocop//lib/rubocop/cop/lint/safe_navigation_with_empty.rb#22 -class RuboCop::Cop::Lint::SafeNavigationWithEmpty < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_with_empty.rb#32 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_with_empty.rb#28 - def safe_navigation_empty_in_conditional?(param0 = T.unsafe(nil)); end -end - -# source://rubocop//lib/rubocop/cop/lint/safe_navigation_with_empty.rb#25 -RuboCop::Cop::Lint::SafeNavigationWithEmpty::MSG = T.let(T.unsafe(nil), String) - -# Checks if a file which has a shebang line as -# its first line is granted execute permission. -# -# @example -# # bad -# -# # A file which has a shebang line as its first line is not -# # granted execute permission. -# -# #!/usr/bin/env ruby -# puts 'hello, world' -# -# # good -# -# # A file which has a shebang line as its first line is -# # granted execute permission. -# -# #!/usr/bin/env ruby -# puts 'hello, world' -# -# # good -# -# # A file which has not a shebang line as its first line is not -# # granted execute permission. -# -# puts 'hello, world' -# -# source://rubocop//lib/rubocop/cop/lint/script_permission.rb#33 -class RuboCop::Cop::Lint::ScriptPermission < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/script_permission.rb#39 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/lint/script_permission.rb#55 - def autocorrect; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/script_permission.rb#59 - def executable?(processed_source); end - - # source://rubocop//lib/rubocop/cop/lint/script_permission.rb#66 - def format_message_from(processed_source); end -end - -# source://rubocop//lib/rubocop/cop/lint/script_permission.rb#36 -RuboCop::Cop::Lint::ScriptPermission::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/script_permission.rb#37 -RuboCop::Cop::Lint::ScriptPermission::SHEBANG = T.let(T.unsafe(nil), String) - -# Checks for self-assignments. -# -# @example -# # bad -# 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#26 -class RuboCop::Cop::Lint::SelfAssignment < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#67 - def on_and_asgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#56 - def on_casgn(node); end - - # 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#45 - def on_gvasgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#45 - def on_ivasgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#45 - def on_lvasgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#63 - def on_masgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#67 - 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#101 - def handle_attribute_assignment(node); end - - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#90 - def handle_key_assignment(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#74 - def multiple_self_assignment?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#85 - def rhs_matches_lhs?(rhs, lhs); end -end - -# 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#27 -RuboCop::Cop::Lint::SelfAssignment::MSG = T.let(T.unsafe(nil), String) - -# Checks for `send`, `public_send`, and `__send__` methods -# when using mix-in. -# -# `include` and `prepend` methods were private methods until Ruby 2.0, -# they were mixed-in via `send` method. This cop uses Ruby 2.1 or -# higher style that can be called by public methods. -# And `extend` method that was originally a public method is also targeted -# for style unification. -# -# @example -# # bad -# Foo.send(:include, Bar) -# Foo.send(:prepend, Bar) -# Foo.send(:extend, Bar) -# -# # bad -# Foo.public_send(:include, Bar) -# Foo.public_send(:prepend, Bar) -# Foo.public_send(:extend, Bar) -# -# # bad -# Foo.__send__(:include, Bar) -# Foo.__send__(:prepend, Bar) -# Foo.__send__(:extend, Bar) -# -# # good -# Foo.include Bar -# Foo.prepend Bar -# Foo.extend Bar -# -# 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#53 - def on_send(node); end - - # 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#67 - def bad_location(node); end - - # 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#77 - def mixin_method?(node); end -end - -# 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#40 -RuboCop::Cop::Lint::SendWithMixinArgument::MSG = T.let(T.unsafe(nil), String) - -# 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#42 -RuboCop::Cop::Lint::SendWithMixinArgument::SEND_METHODS = T.let(T.unsafe(nil), Array) - -# Checks for shadowed arguments. -# -# This cop has `IgnoreImplicitReferences` configuration option. -# It means argument shadowing is used in order to pass parameters -# to zero arity `super` when `IgnoreImplicitReferences` is `true`. -# -# @example -# -# # bad -# do_something do |foo| -# foo = 42 -# puts foo -# end -# -# def do_something(foo) -# foo = 42 -# puts foo -# end -# -# # good -# do_something do |foo| -# foo = foo + 42 -# puts foo -# end -# -# def do_something(foo) -# foo = foo + 42 -# puts foo -# end -# -# def do_something(foo) -# puts foo -# end -# @example IgnoreImplicitReferences: false (default) -# -# # bad -# def do_something(foo) -# foo = 42 -# super -# end -# -# def do_something(foo) -# foo = super -# bar -# end -# @example IgnoreImplicitReferences: true -# -# # good -# def do_something(foo) -# foo = 42 -# super -# end -# -# def do_something(foo) -# foo = super -# bar -# end -# -# source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#66 -class RuboCop::Cop::Lint::ShadowedArgument < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#76 - def after_leaving_scope(scope, _variable_table); end - - # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#70 - def uses_var?(param0, param1); end - - private - - # Get argument references without assignments' references - # - # 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 - # argument at the rhs. If the assignment occurs inside a branch or - # block, it is impossible to tell whether it's executed, so precise - # shadowing location is not known. - # - # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#120 - def assignment_without_argument_usage(argument); end - - # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#82 - def check_argument(argument); end - - # @return [Boolean] - # - # 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#152 - def node_within_block_or_conditional?(node, stop_search_node); end - - # 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 - def shadowing_assignment(argument); end - - class << self - # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#72 - def joining_forces; end - end -end - -# source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#67 -RuboCop::Cop::Lint::ShadowedArgument::MSG = T.let(T.unsafe(nil), String) - -# Checks for a rescued exception that get shadowed by a -# less specific exception being rescued before a more specific -# exception is rescued. -# -# An exception is considered shadowed if it is rescued after its -# ancestor is, or if it and its ancestor are both rescued in the -# same `rescue` statement. In both cases, the more specific rescue is -# unnecessary because it is covered by rescuing the less specific -# exception. (ie. `rescue Exception, StandardError` has the same behavior -# whether `StandardError` is included or not, because all ``StandardError``s -# are rescued by `rescue Exception`). -# -# @example -# -# # bad -# -# begin -# something -# rescue Exception -# handle_exception -# rescue StandardError -# handle_standard_error -# end -# -# # bad -# begin -# something -# rescue Exception, StandardError -# handle_error -# end -# -# # good -# -# begin -# something -# rescue StandardError -# handle_standard_error -# rescue Exception -# handle_exception -# end -# -# # good, however depending on runtime environment. -# # -# # This is a special case for system call errors. -# # System dependent error code depends on runtime environment. -# # For example, whether `Errno::EAGAIN` and `Errno::EWOULDBLOCK` are -# # the same error code or different error code depends on environment. -# # This good case is for `Errno::EAGAIN` and `Errno::EWOULDBLOCK` with -# # the same error code. -# begin -# something -# rescue Errno::EAGAIN, Errno::EWOULDBLOCK -# handle_standard_error -# end -# -# source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#61 -class RuboCop::Cop::Lint::ShadowedException < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RescueNode - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#67 - def on_rescue(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#101 - def compare_exceptions(exception, other_exception); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#94 - def contains_multiple_levels_of_exceptions?(group); end - - # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#119 - def evaluate_exceptions(group); end - - # 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 - def offense_range(rescues); end - - # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#90 - def rescued_groups_for(rescues); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#137 - def sorted?(rescued_groups); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#115 - def system_call_err?(error); end -end - -# source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#65 -RuboCop::Cop::Lint::ShadowedException::MSG = T.let(T.unsafe(nil), String) - -# Checks for the use of local variable names from an outer scope -# in block arguments or block-local variables. This mirrors the warning -# given by `ruby -cw` prior to Ruby 2.6: -# "shadowing outer local variable - foo". -# -# NOTE: Shadowing of variables in block passed to `Ractor.new` is allowed -# because `Ractor` should not access outer variables. -# eg. following style is encouraged: -# -# [source,ruby] -# ---- -# worker_id, pipe = env -# Ractor.new(worker_id, pipe) do |worker_id, pipe| -# end -# ---- -# -# @example -# -# # bad -# def some_method -# foo = 1 -# -# 2.times do |foo| # shadowing outer `foo` -# do_something(foo) -# end -# end -# -# # good -# def some_method -# foo = 1 -# -# 2.times do |bar| -# do_something(bar) -# end -# end -# -# source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#41 -class RuboCop::Cop::Lint::ShadowingOuterLocalVariable < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#53 - def before_declaring_variable(variable, variable_table); end - - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#89 - def find_conditional_node_from_ascendant(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#96 - def node_or_its_ascendant_conditional?(node); end - - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#45 - def ractor_block?(param0 = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#65 - def same_conditions_node_different_branch?(variable, outer_local_variable); end - - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#79 - def variable_node(variable); end - - class << self - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#49 - def joining_forces; end - end -end - -# source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#42 -RuboCop::Cop::Lint::ShadowingOuterLocalVariable::MSG = T.let(T.unsafe(nil), String) - -# Checks for `Hash` creation with a mutable default value. -# Creating a `Hash` in such a way will share the default value -# across all keys, causing unexpected behavior when modifying it. -# -# For example, when the `Hash` was created with an `Array` as the argument, -# calling `hash[:foo] << 'bar'` will also change the value of all -# other keys that have not been explicitly assigned to. -# -# @example -# # bad -# Hash.new([]) -# Hash.new({}) -# Hash.new(Array.new) -# Hash.new(Hash.new) -# -# # okay -- In rare cases that intentionally have this behavior, -# # without disabling the cop, you can set the default explicitly. -# h = Hash.new -# h.default = [] -# h[:a] << 1 -# h[:b] << 2 -# h # => {:a => [1, 2], :b => [1, 2]} -# -# # okay -- beware this will discard mutations and only remember assignments -# Hash.new { Array.new } -# Hash.new { Hash.new } -# Hash.new { {} } -# Hash.new { [] } -# -# # good - frozen solution will raise an error when mutation attempted -# Hash.new([].freeze) -# Hash.new({}.freeze) -# -# # good - using a proc will create a new object for each key -# h = Hash.new -# h.default_proc = ->(h, k) { [] } -# h.default_proc = ->(h, k) { {} } -# -# # good - using a block will create a new object for each key -# Hash.new { |h, k| h[k] = [] } -# Hash.new { |h, k| h[k] = {} } -# -# source://rubocop//lib/rubocop/cop/lint/shared_mutable_default.rb#47 -class RuboCop::Cop::Lint::SharedMutableDefault < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/shared_mutable_default.rb#64 - def capacity_keyword_argument?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/shared_mutable_default.rb#53 - def hash_initialized_with_mutable_shared_object?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/shared_mutable_default.rb#68 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/shared_mutable_default.rb#48 -RuboCop::Cop::Lint::SharedMutableDefault::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/shared_mutable_default.rb#50 -RuboCop::Cop::Lint::SharedMutableDefault::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks unexpected overrides of the `Struct` built-in methods -# via `Struct.new`. -# -# @example -# # bad -# Bad = Struct.new(:members, :clone, :count) -# b = Bad.new([], true, 1) -# b.members #=> [] (overriding `Struct#members`) -# b.clone #=> true (overriding `Object#clone`) -# b.count #=> 1 (overriding `Enumerable#count`) -# -# # good -# Good = Struct.new(:id, :name) -# g = Good.new(1, "foo") -# g.members #=> [:id, :name] -# g.clone #=> # -# g.count #=> 2 -# -# source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#24 -class RuboCop::Cop::Lint::StructNewOverride < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#38 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#33 - def struct_new(param0 = T.unsafe(nil)); end -end - -# source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#25 -RuboCop::Cop::Lint::StructNewOverride::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#27 -RuboCop::Cop::Lint::StructNewOverride::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#30 -RuboCop::Cop::Lint::StructNewOverride::STRUCT_MEMBER_NAME_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#29 -RuboCop::Cop::Lint::StructNewOverride::STRUCT_METHOD_NAMES = T.let(T.unsafe(nil), Array) - -# Checks for `rescue` blocks with no body. -# -# @example -# -# # bad -# def some_method -# do_something -# rescue -# end -# -# # bad -# begin -# do_something -# rescue -# end -# -# # good -# def some_method -# do_something -# rescue -# handle_exception -# end -# -# # good -# begin -# do_something -# rescue -# handle_exception -# end -# @example AllowComments: true (default) -# -# # good -# def some_method -# do_something -# rescue -# # do nothing -# end -# -# # good -# begin -# do_something -# rescue -# # do nothing -# end -# @example AllowComments: false -# -# # bad -# def some_method -# do_something -# rescue -# # do nothing -# end -# -# # bad -# begin -# do_something -# rescue -# # do nothing -# end -# @example AllowNil: true (default) -# -# # good -# def some_method -# do_something -# rescue -# nil -# end -# -# # good -# begin -# do_something -# rescue -# # do nothing -# end -# -# # good -# do_something rescue nil -# @example AllowNil: false -# -# # bad -# def some_method -# do_something -# rescue -# nil -# end -# -# # bad -# begin -# do_something -# rescue -# nil -# end -# -# # bad -# do_something rescue nil -# -# source://rubocop//lib/rubocop/cop/lint/suppressed_exception.rb#105 -class RuboCop::Cop::Lint::SuppressedException < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/suppressed_exception.rb#108 - def on_resbody(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/suppressed_exception.rb#118 - def comment_between_rescue_and_end?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/suppressed_exception.rb#126 - def nil_body?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/suppressed_exception.rb#106 -RuboCop::Cop::Lint::SuppressedException::MSG = T.let(T.unsafe(nil), String) - -# Checks for cases where exceptions unrelated to the numeric constructors `Integer()`, -# `Float()`, `BigDecimal()`, `Complex()`, and `Rational()` may be unintentionally swallowed. -# -# @example -# -# # bad -# Integer(arg) rescue nil -# -# # bad -# begin -# Integer(arg) -# rescue -# nil -# end -# -# # bad -# begin -# Integer(arg) -# rescue -# end -# -# # good -# Integer(arg, exception: false) -# -# source://rubocop//lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb#41 -class RuboCop::Cop::Lint::SuppressedExceptionInNumberConversion < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb#56 - def begin_numeric_constructor_rescue_nil(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb#75 - def constructor_receiver?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb#49 - def numeric_constructor_rescue_nil(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb#65 - def numeric_method?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb#82 - def on_rescue(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb#103 - def expected_exception_classes_only?(exception_classes); end -end - -# source://rubocop//lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb#46 -RuboCop::Cop::Lint::SuppressedExceptionInNumberConversion::EXPECTED_EXCEPTION_CLASSES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb#45 -RuboCop::Cop::Lint::SuppressedExceptionInNumberConversion::MSG = T.let(T.unsafe(nil), String) - -# Checks for uses of literal strings converted to -# a symbol where a literal symbol could be used instead. -# -# There are two possible styles for this cop. -# `strict` (default) will register an offense for any incorrect usage. -# `consistent` additionally requires hashes to use the same style for -# every symbol key (ie. if any symbol key needs to be quoted it requires -# all keys to be quoted). -# -# @example -# # bad -# 'string'.to_sym -# :symbol.to_sym -# 'underscored_string'.to_sym -# :'underscored_symbol' -# 'hyphenated-string'.to_sym -# "string_#{interpolation}".to_sym -# -# # good -# :string -# :symbol -# :underscored_string -# :underscored_symbol -# :'hyphenated-string' -# :"string_#{interpolation}" -# @example EnforcedStyle: strict (default) -# -# # bad -# { -# 'a': 1, -# "b": 2, -# 'c-d': 3 -# } -# -# # good (don't quote keys that don't require quoting) -# { -# a: 1, -# b: 2, -# 'c-d': 3 -# } -# @example EnforcedStyle: consistent -# -# # bad -# { -# a: 1, -# 'b-c': 2 -# } -# -# # good (quote all keys if any need quoting) -# { -# 'a': 1, -# 'b-c': 2 -# } -# -# # good (no quoting required) -# { -# a: 1, -# b: 2 -# } -# -# 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#105 - def on_hash(node); end - - # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#78 - def on_send(node); end - - # 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#147 - def correct_hash_key(node); end - - # 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#139 - def in_alias?(node); end - - # @return [Boolean] - # - # 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#126 - def properly_quoted?(source, value); end - - # 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#135 - def requires_quotes?(sym_node); end -end - -# 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#74 -RuboCop::Cop::Lint::SymbolConversion::MSG_CONSISTENCY = T.let(T.unsafe(nil), String) - -# 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 -# into RuboCop's offenses. -# -# source://rubocop//lib/rubocop/cop/lint/syntax.rb#8 -class RuboCop::Cop::Lint::Syntax < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/syntax.rb#11 - def on_other_file; end - - private - - # source://rubocop//lib/rubocop/cop/lint/syntax.rb#22 - def add_offense_from_diagnostic(diagnostic, ruby_version); end - - # source://rubocop//lib/rubocop/cop/lint/syntax.rb#32 - def add_offense_from_error(error); end - - # source://rubocop//lib/rubocop/cop/lint/syntax.rb#37 - def beautify_message(message); end - - # source://rubocop//lib/rubocop/cop/lint/syntax.rb#43 - def find_severity(_range, _severity); end -end - -# source://rubocop//lib/rubocop/cop/lint/syntax.rb#9 -RuboCop::Cop::Lint::Syntax::LEVELS = T.let(T.unsafe(nil), Array) - -# Ensures that `to_enum`/`enum_for`, called for the current method, -# has correct arguments. -# -# @example -# # bad -# def foo(x, y = 1) -# return to_enum(__callee__, x) # `y` is missing -# end -# -# # good -# def foo(x, y = 1) -# # Alternatives to `__callee__` are `__method__` and `:foo`. -# return to_enum(__callee__, x, y) -# end -# -# # good -# def foo(x, y = 1) -# # It is also allowed if it is wrapped in some method like Sorbet. -# return to_enum(T.must(__callee__), x, y) -# end -# -# source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#27 -class RuboCop::Cop::Lint::ToEnumArguments < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#33 - def enum_conversion_call?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#38 - def method_name?(param0 = T.unsafe(nil), param1); end - - # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#47 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#43 - def passing_keyword_arg?(param0 = T.unsafe(nil), param1); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#76 - def argument_match?(send_arg, def_arg); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#61 - def arguments_match?(arguments, def_node); end -end - -# source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#28 -RuboCop::Cop::Lint::ToEnumArguments::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#30 -RuboCop::Cop::Lint::ToEnumArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks to make sure `#to_json` includes an optional argument. -# When overriding `#to_json`, callers may invoke JSON -# generation via `JSON.generate(your_obj)`. Since `JSON#generate` allows -# for an optional argument, your method should too. -# -# @example -# class Point -# attr_reader :x, :y -# -# # bad, incorrect arity -# def to_json -# JSON.generate([x, y]) -# end -# -# # good, preserving args -# def to_json(*args) -# JSON.generate([x, y], *args) -# end -# -# # good, discarding args -# def to_json(*_args) -# JSON.generate([x, y]) -# end -# end -# -# source://rubocop//lib/rubocop/cop/lint/to_json.rb#31 -class RuboCop::Cop::Lint::ToJSON < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/to_json.rb#36 - def on_def(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/to_json.rb#34 -RuboCop::Cop::Lint::ToJSON::MSG = T.let(T.unsafe(nil), String) - -# Checks for top level return with arguments. If there is a -# top-level return statement with an argument, then the argument is -# always ignored. This is detected automatically since Ruby 2.7. -# -# @example -# # bad -# return 1 -# -# # good -# return -# -# 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#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 - -# source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#19 -RuboCop::Cop::Lint::TopLevelReturnWithArgument::MSG = T.let(T.unsafe(nil), String) - -# Checks for trailing commas in attribute declarations, such as -# `#attr_reader`. Leaving a trailing comma will nullify the next method -# definition by overriding it with a getter method. -# -# @example -# -# # bad -# class Foo -# attr_reader :foo, -# -# def bar -# puts "Unreachable." -# end -# end -# -# # good -# class Foo -# attr_reader :foo -# -# def bar -# puts "No problem!" -# end -# end -# -# source://rubocop//lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb#30 -class RuboCop::Cop::Lint::TrailingCommaInAttributeDeclaration < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb#36 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb#46 - def trailing_comma_range(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb#34 -RuboCop::Cop::Lint::TrailingCommaInAttributeDeclaration::MSG = T.let(T.unsafe(nil), String) - -# Checks for "triple quotes" (strings delimited by any odd number -# of quotes greater than 1). -# -# Ruby allows multiple strings to be implicitly concatenated by just -# being adjacent in a statement (ie. `"foo""bar" == "foobar"`). This sometimes -# gives the impression that there is something special about triple quotes, but -# in fact it is just extra unnecessary quotes and produces the same string. Each -# pair of quotes produces an additional concatenated empty string, so the result -# is still only the "actual" string within the delimiters. -# -# NOTE: Although this cop is called triple quotes, the same behavior is present -# for strings delimited by 5, 7, etc. quotation marks. -# -# @example -# # bad -# """ -# A string -# """ -# -# # bad -# ''' -# A string -# ''' -# -# # good -# " -# A string -# " -# -# # good -# < b } -# values.sort { |*x| x[0] <=> x[1] } -# -# source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#41 -class RuboCop::Cop::Lint::UnexpectedBlockArity < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#44 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#44 - def on_numblock(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#63 - def acceptable?(node); end - - # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#75 - def arg_count(node); end - - # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#71 - def expected_arity(method); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#67 - def included_method?(name); end - - # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#59 - def methods; end -end - -# source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#42 -RuboCop::Cop::Lint::UnexpectedBlockArity::MSG = T.let(T.unsafe(nil), String) - -# Checks for using Fixnum or Bignum constant. -# -# @example -# -# # bad -# 1.is_a?(Fixnum) -# 1.is_a?(Bignum) -# -# # good -# 1.is_a?(Integer) -# -# source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#16 -class RuboCop::Cop::Lint::UnifiedInteger < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#22 - def fixnum_or_bignum_const(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#26 - def on_const(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#19 -RuboCop::Cop::Lint::UnifiedInteger::MSG = T.let(T.unsafe(nil), String) - -# Looks for `reduce` or `inject` blocks where the value returned (implicitly or -# explicitly) does not include the accumulator. A block is considered valid as -# long as at least one return value includes the accumulator. -# -# If the accumulator is not included in the return value, then the entire -# block will just return a transformation of the last element value, and -# could be rewritten as such without a loop. -# -# Also catches instances where an index of the accumulator is returned, as -# this may change the type of object being retained. -# -# NOTE: For the purpose of reducing false positives, this cop only flags -# returns in `reduce` blocks where the element is the only variable in -# the expression (since we will not be able to tell what other variables -# relate to via static analysis). -# -# @example -# -# # bad -# (1..4).reduce(0) do |acc, el| -# el * 2 -# end -# -# # bad, may raise a NoMethodError after the first iteration -# %w(a b c).reduce({}) do |acc, letter| -# acc[letter] = true -# end -# -# # good -# (1..4).reduce(0) do |acc, el| -# acc + el * 2 -# end -# -# # good, element is returned but modified using the accumulator -# values.reduce do |acc, el| -# el << acc -# el -# end -# -# # good, returns the accumulator instead of the index -# %w(a b c).reduce({}) do |acc, letter| -# acc[letter] = true -# acc -# end -# -# # good, at least one branch returns the accumulator -# values.reduce(nil) do |result, value| -# break result if something? -# value -# end -# -# # good, recursive -# keys.reduce(self) { |result, key| result[key] } -# -# # ignored as the return value cannot be determined -# enum.reduce do |acc, el| -# x = foo(acc, el) -# bar(x) -# end -# -# source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#65 -class RuboCop::Cop::Lint::UnmodifiedReduceAccumulator < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#78 - def accumulator_index?(param0 = T.unsafe(nil), param1); end - - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#83 - def element_modified?(param0, param1); end - - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#104 - def expression_values(param0); end - - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#93 - def lvar_used?(param0 = T.unsafe(nil), param1); end - - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#115 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#115 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#70 - def reduce_with_block?(param0 = T.unsafe(nil)); end - - private - - # Determine if a return value is acceptable for the purposes of this cop - # If it is an expression containing the accumulator, it is acceptable - # Otherwise, it is only unacceptable if it contains the iterated element, since we - # otherwise do not have enough information to prevent false positives. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#191 - def acceptable_return?(return_val, element_name); end - - # Exclude `begin` nodes inside a `dstr` from being collected by `return_values` - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#199 - def allowed_type?(parent_node); end - - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#159 - def block_arg_name(node, index); end - - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#142 - def check_return_values(block_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#176 - def potential_offense?(return_values, block_body, element_name, accumulator_name); end - - # Return values in a block are either the value given to next, - # the last line of a multiline block, or the only line of the block - # - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#128 - def return_values(block_body_node); end - - # Look for an index of the accumulator being returned, except where the index - # is the element. - # This is always an offense, in order to try to catch potential exceptions - # due to type mismatches - # - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#167 - def returned_accumulator_index(return_values, accumulator_name, element_name); end - - # If the accumulator is used in any return value, the node is acceptable since - # the accumulator has a chance to change each iteration - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#183 - def returns_accumulator_anywhere?(return_values, accumulator_name); end -end - -# source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#66 -RuboCop::Cop::Lint::UnmodifiedReduceAccumulator::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#67 -RuboCop::Cop::Lint::UnmodifiedReduceAccumulator::MSG_INDEX = T.let(T.unsafe(nil), String) - -# Checks for unreachable code. -# The check are based on the presence of flow of control -# statement in non-final position in `begin` (implicit) blocks. -# -# @example -# -# # bad -# def some_method -# return -# do_something -# end -# -# # bad -# def some_method -# if cond -# return -# else -# return -# end -# do_something -# end -# -# # good -# def some_method -# do_something -# end -# -# source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#32 -class RuboCop::Cop::Lint::UnreachableCode < ::RuboCop::Cop::Base - # @return [UnreachableCode] a new instance of UnreachableCode - # - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#35 - def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#47 - def after_block(node); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#70 - def flow_command?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#51 - def on_begin(node); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#41 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#51 - def on_kwbegin(node); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#41 - def on_numblock(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#104 - def check_case(node); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#98 - def check_if(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#80 - def flow_expression?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#119 - def instance_eval_block?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#65 - def redefinable_flow_method?(method); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#114 - def register_redefinition(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#123 - def report_on_flow_command?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#33 -RuboCop::Cop::Lint::UnreachableCode::MSG = T.let(T.unsafe(nil), String) - -# Checks for loops that will have at most one iteration. -# -# A loop that can never reach the second iteration is a possible error in the code. -# In rare cases where only one iteration (or at most one iteration) is intended behavior, -# the code should be refactored to use `if` conditionals. -# -# NOTE: Block methods that are used with ``Enumerable``s are considered to be loops. -# -# `AllowedPatterns` can be used to match against the block receiver in order to allow -# code that would otherwise be registered as an offense (eg. `times` used not in an -# `Enumerable` context). -# -# @example -# # bad -# while node -# do_something(node) -# node = node.parent -# break -# end -# -# # good -# while node -# do_something(node) -# node = node.parent -# end -# -# # bad -# def verify_list(head) -# item = head -# begin -# if verify(item) -# return true -# else -# return false -# end -# end while(item) -# end -# -# # good -# def verify_list(head) -# item = head -# begin -# if verify(item) -# item = item.next -# else -# return false -# end -# end while(item) -# -# true -# end -# -# # bad -# def find_something(items) -# items.each do |item| -# if something?(item) -# return item -# else -# raise NotFoundError -# end -# end -# end -# -# # good -# def find_something(items) -# items.each do |item| -# if something?(item) -# return item -# end -# end -# raise NotFoundError -# end -# -# # bad -# 2.times { raise ArgumentError } -# @example AllowedPatterns: ['(exactly|at_least|at_most)\(\d+\)\.times'] (default) -# -# # good -# exactly(2).times { raise StandardError } -# -# source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#86 -class RuboCop::Cop::Lint::UnreachableLoop < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedPattern - - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#143 - def break_command?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#100 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#92 - def on_for(node); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#104 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#92 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#92 - def on_until_post(node); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#92 - def on_while(node); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#92 - def on_while_post(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#153 - def break_statement?(node); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#119 - def check(node); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#176 - def check_case(node); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#170 - def check_if(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#200 - def conditional_continue_keyword?(break_statement); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#110 - def loop_method?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#190 - def preceded_by_continue_statement?(break_statement); end - - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#130 - def statements(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#90 -RuboCop::Cop::Lint::UnreachableLoop::CONTINUE_KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#89 -RuboCop::Cop::Lint::UnreachableLoop::MSG = T.let(T.unsafe(nil), String) - -# Common functionality for cops handling unused arguments. -# -# source://rubocop//lib/rubocop/cop/mixin/unused_argument.rb#7 -module RuboCop::Cop::Lint::UnusedArgument - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop//lib/rubocop/cop/mixin/unused_argument.rb#10 - def after_leaving_scope(scope, _variable_table); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/unused_argument.rb#16 - def check_argument(variable); end -end - -# Checks for unused block arguments. -# -# @example -# # bad -# do_something do |used, unused| -# puts used -# end -# -# do_something do |bar| -# puts :foo -# end -# -# define_method(:foo) do |bar| -# puts :baz -# end -# -# # good -# do_something do |used, _unused| -# puts used -# end -# -# do_something do -# puts :foo -# end -# -# define_method(:foo) do |_bar| -# puts :baz -# end -# @example IgnoreEmptyBlocks: true (default) -# # good -# do_something { |unused| } -# @example IgnoreEmptyBlocks: false -# # bad -# do_something { |unused| } -# @example AllowUnusedKeywordArguments: false (default) -# # bad -# do_something do |unused: 42| -# foo -# end -# @example AllowUnusedKeywordArguments: true -# # good -# do_something do |unused: 42| -# foo -# end -# -# source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#55 -class RuboCop::Cop::Lint::UnusedBlockArgument < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Lint::UnusedArgument - extend ::RuboCop::Cop::AutoCorrector - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#162 - def allow_unused_keyword_arguments?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#81 - def allowed_block?(variable); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#85 - def allowed_keyword_argument?(variable); end - - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#99 - def augment_message(message, variable); end - - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#65 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#69 - def check_argument(variable); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#149 - def define_method_call?(variable); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#156 - def empty_block?(variable); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#166 - def ignore_empty_blocks?; end - - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#89 - def message(variable); end - - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#132 - def message_for_lambda(variable, all_arguments); end - - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#120 - def message_for_normal_block(variable, all_arguments); end - - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#144 - def message_for_underscore_prefix(variable); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#77 - def used_block_local?(variable); end - - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#112 - def variable_type(variable); end - - class << self - # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#59 - def joining_forces; end - end -end - -# Checks for unused method arguments. -# -# @example IgnoreNotImplementedMethods: false -# # bad -# def do_something(unused) -# raise NotImplementedError -# end -# -# def do_something_else(unused) -# fail "TODO" -# end -# @example AllowUnusedKeywordArguments: false (default) -# # bad -# def do_something(used, unused: 42) -# used -# end -# @example AllowUnusedKeywordArguments: true -# # good -# def do_something(used, unused: 42) -# used -# end -# @example IgnoreEmptyMethods: true (default) -# # good -# def do_something(unused) -# end -# @example IgnoreEmptyMethods: false -# # bad -# def do_something(unused) -# end -# @example IgnoreNotImplementedMethods: true (default) -# # with default value of `NotImplementedExceptions: ['NotImplementedError']` -# -# # good -# def do_something(unused) -# raise NotImplementedError -# end -# -# def do_something_else(unused) -# fail "TODO" -# end -# @example IgnoreNotImplementedMethods: true -# # with `NotImplementedExceptions: ['AbstractMethodError']` -# -# # good -# def do_something(unused) -# raise AbstractMethodError -# end -# @example -# # bad -# def some_method(used, unused, _unused_but_allowed) -# puts used -# end -# -# # good -# def some_method(used, _unused, _unused_but_allowed) -# puts used -# end -# -# source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#70 -class RuboCop::Cop::Lint::UnusedMethodArgument < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Lint::UnusedArgument - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#75 - def not_implemented?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#128 - def allowed_exception_class?(node); end - - # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#90 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#94 - def check_argument(variable); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#102 - def ignored_method?(body); end - - # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#107 - def message(variable); end - - class << self - # source://rubocop-performance/1.24.0/lib/rubocop-performance.rb#12 - def autocorrect_incompatible_with; end - - # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#84 - def joining_forces; end - end -end - -# Identifies places where `URI.escape` can be replaced by -# `CGI.escape`, `URI.encode_www_form`, or `URI.encode_www_form_component` -# depending on your specific use case. -# Also this cop identifies places where `URI.unescape` can be replaced by -# `CGI.unescape`, `URI.decode_www_form`, -# or `URI.decode_www_form_component` depending on your specific use case. -# -# @example -# # bad -# URI.escape('http://example.com') -# URI.encode('http://example.com') -# -# # good -# CGI.escape('http://example.com') -# URI.encode_www_form([['example', 'param'], ['lang', 'en']]) -# URI.encode_www_form(page: 10, locale: 'en') -# URI.encode_www_form_component('http://example.com') -# -# # bad -# URI.unescape(enc_uri) -# URI.decode(enc_uri) -# -# # good -# CGI.unescape(enc_uri) -# URI.decode_www_form(enc_uri) -# URI.decode_www_form_component(enc_uri) -# -# source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#32 -class RuboCop::Cop::Lint::UriEscapeUnescape < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#57 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#51 - def uri_escape_unescape?(param0 = T.unsafe(nil)); end -end - -# source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#33 -RuboCop::Cop::Lint::UriEscapeUnescape::ALTERNATE_METHODS_OF_URI_ESCAPE = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#38 -RuboCop::Cop::Lint::UriEscapeUnescape::ALTERNATE_METHODS_OF_URI_UNESCAPE = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#47 -RuboCop::Cop::Lint::UriEscapeUnescape::METHOD_NAMES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#44 -RuboCop::Cop::Lint::UriEscapeUnescape::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#48 -RuboCop::Cop::Lint::UriEscapeUnescape::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Identifies places where `URI.regexp` is obsolete and should not be used. -# -# For Ruby 3.3 or lower, use `URI::DEFAULT_PARSER.make_regexp`. -# For Ruby 3.4 or higher, use `URI::RFC2396_PARSER.make_regexp`. -# -# NOTE: If you need to support both Ruby 3.3 and lower as well as Ruby 3.4 and higher, -# consider manually changing the code as follows: -# -# [source,ruby] -# ---- -# defined?(URI::RFC2396_PARSER) ? URI::RFC2396_PARSER : URI::DEFAULT_PARSER -# ---- -# -# @example -# # bad -# URI.regexp('http://example.com') -# -# # good - Ruby 3.3 or lower -# URI::DEFAULT_PARSER.make_regexp('http://example.com') -# -# # good - Ruby 3.4 or higher -# URI::RFC2396_PARSER.make_regexp('http://example.com') -# -# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#29 -class RuboCop::Cop::Lint::UriRegexp < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#40 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#36 - def uri_constant?(param0 = T.unsafe(nil)); end -end - -# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#32 -RuboCop::Cop::Lint::UriRegexp::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#33 -RuboCop::Cop::Lint::UriRegexp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for redundant access modifiers, including those with no -# code, those which are repeated, and leading `public` modifiers in a -# class or module body. Conditionally-defined methods are considered as -# always being defined, and thus access modifiers guarding such methods -# are not redundant. -# -# This cop has `ContextCreatingMethods` option. The default setting value -# is an empty array that means no method is specified. -# This setting is an array of methods which, when called, are known to -# create its own context in the module's current access context. -# -# It also has `MethodCreatingMethods` option. The default setting value -# is an empty array that means no method is specified. -# This setting is an array of methods which, when called, are known to -# create other methods in the module's current access context. -# -# @example -# # bad -# class Foo -# public # this is redundant (default access is public) -# -# def method -# end -# end -# -# # bad -# class Foo -# # The following is redundant (methods defined on the class' -# # singleton class are not affected by the private modifier) -# private -# -# def self.method3 -# end -# end -# -# # bad -# class Foo -# protected -# -# define_method(:method2) do -# end -# -# protected # this is redundant (repeated from previous modifier) -# -# [1,2,3].each do |i| -# define_method("foo#{i}") do -# end -# end -# end -# -# # bad -# class Foo -# private # this is redundant (no following methods are defined) -# end -# -# # good -# class Foo -# private # this is not redundant (a method is defined) -# -# def method2 -# end -# end -# -# # good -# class Foo -# # The following is not redundant (conditionally defined methods are -# # considered as always defining a method) -# private -# -# if condition? -# def method -# end -# end -# end -# -# # good -# class Foo -# protected # this is not redundant (a method is defined) -# -# define_method(:method2) do -# end -# end -# @example ContextCreatingMethods: concerning -# # Lint/UselessAccessModifier: -# # ContextCreatingMethods: -# # - concerning -# -# # good -# require 'active_support/concern' -# class Foo -# concerning :Bar do -# def some_public_method -# end -# -# private -# -# def some_private_method -# end -# end -# -# # this is not redundant because `concerning` created its own context -# private -# -# def some_other_private_method -# end -# end -# @example MethodCreatingMethods: delegate -# # Lint/UselessAccessModifier: -# # MethodCreatingMethods: -# # - delegate -# -# # good -# require 'active_support/core_ext/module/delegation' -# class Foo -# # this is not redundant because `delegate` creates methods -# private -# -# delegate :method_a, to: :method_b -# end -# -# source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#127 -class RuboCop::Cop::Lint::UselessAccessModifier < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#166 - def class_or_instance_eval?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#161 - def dynamic_method_definition?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#139 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#133 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#133 - def on_module(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#139 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#133 - def on_sclass(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#156 - def static_method_definition?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#182 - def access_modifier?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#280 - def any_context_creating_methods?(child); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#257 - def any_method_definition?(child); end - - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#149 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#196 - def check_child_nodes(node, unused, cur_vis); end - - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#226 - def check_new_visibility(node, unused, new_vis, cur_vis); end - - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#170 - def check_node(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#186 - def check_scope(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#215 - def check_send_node(node, cur_vis, unused); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#274 - def eval_call?(child); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#247 - def included_block?(block_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#251 - def method_definition?(child); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#270 - def start_of_new_scope?(child); end -end - -# source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#131 -RuboCop::Cop::Lint::UselessAccessModifier::MSG = T.let(T.unsafe(nil), String) - -# Checks for every useless assignment to local variable in every -# scope. -# The basic idea for this cop was from the warning of `ruby -cw`: -# -# [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. -# -# This cop's autocorrection avoids cases like `a ||= 1` because removing assignment from -# operator assignment can cause `NameError` if this assignment has been used to declare -# a local variable. For example, replacing `a ||= 1` with `a || 1` may cause -# "undefined local variable or method `a' for main:Object (NameError)". -# -# 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 -# def some_method -# some_var = 1 -# do_something -# end -# -# # good -# def some_method -# some_var = 1 -# do_something(some_var) -# end -# -# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#40 -class RuboCop::Cop::Lint::UselessAssignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#51 - def after_leaving_scope(scope, _variable_table); end - - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#165 - def autocorrect(corrector, assignment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#106 - def chained_assignment?(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#56 - def check_for_unused_assignments(variable); end - - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#149 - def collect_variable_like_names(scope); end - - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#82 - def message_for_useless_assignment(assignment); end - - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#110 - def message_specification(assignment, variable); end - - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#120 - def multiple_assignment_message(variable_name); end - - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#88 - def offense_range(assignment); end - - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#125 - def operator_assignment_message(scope, assignment); end - - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#182 - def remove_exception_assignment_part(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#206 - def remove_local_variable_assignment_part(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#195 - def remove_trailing_character_from_operator(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#191 - def rename_variable_with_underscore(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#199 - 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#139 - def return_value_node_of_scope(scope); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#96 - def sequential_assignment?(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#132 - def similar_name_message(variable); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#158 - def variable_like_method_invocation?(node); end - - class << self - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#47 - def joining_forces; end - end -end - -# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#45 -RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String) - -# Checks for useless constant scoping. Private constants must be defined using -# `private_constant`. Even if `private` access modifier is used, it is public scope despite -# its appearance. -# -# It does not support autocorrection due to behavior change and multiple ways to fix it. -# Or a public constant may be intended. -# -# @example -# -# # bad -# class Foo -# private -# PRIVATE_CONST = 42 -# end -# -# # good -# class Foo -# PRIVATE_CONST = 42 -# private_constant :PRIVATE_CONST -# end -# -# # good -# class Foo -# PUBLIC_CONST = 42 # If private scope is not intended. -# end -# -# source://rubocop//lib/rubocop/cop/lint/useless_constant_scoping.rb#32 -class RuboCop::Cop::Lint::UselessConstantScoping < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/useless_constant_scoping.rb#40 - def on_casgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_constant_scoping.rb#36 - def private_constants(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_constant_scoping.rb#49 - def after_private_modifier?(left_siblings); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_constant_scoping.rb#59 - def private_constantize?(right_siblings, const_value); end -end - -# source://rubocop//lib/rubocop/cop/lint/useless_constant_scoping.rb#33 -RuboCop::Cop::Lint::UselessConstantScoping::MSG = T.let(T.unsafe(nil), String) - -# Checks for calls to `defined?` with strings or symbols as the argument. -# Such calls will always return `'expression'`, you probably meant to -# check for the existence of a constant, method, or variable instead. -# -# `defined?` is part of the Ruby syntax and doesn't behave like normal methods. -# You can safely pass in what you are checking for directly, without encountering -# a `NameError`. -# -# When interpolation is used, oftentimes it is not possible to write the -# code with `defined?`. In these cases, switch to one of the more specific methods: -# -# * `class_variable_defined?` -# * `const_defined?` -# * `method_defined?` -# * `instance_variable_defined?` -# * `binding.local_variable_defined?` -# -# @example -# -# # bad -# defined?('FooBar') -# defined?(:FooBar) -# defined?(:foo_bar) -# defined?('foo_bar') -# -# # good -# defined?(FooBar) -# defined?(foo_bar) -# -# # bad - interpolation -# bar = 'Bar' -# defined?("Foo::#{bar}::Baz") -# -# # good -# bar = 'Bar' -# defined?(Foo) && Foo.const_defined?(bar) && Foo.const_get(bar).const_defined?(:Baz) -# -# source://rubocop//lib/rubocop/cop/lint/useless_defined.rb#42 -class RuboCop::Cop::Lint::UselessDefined < ::RuboCop::Cop::Base - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_defined.rb#46 - def on_defined?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/useless_defined.rb#43 -RuboCop::Cop::Lint::UselessDefined::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/useless_defined.rb#44 -RuboCop::Cop::Lint::UselessDefined::TYPES = T.let(T.unsafe(nil), Hash) - -# Checks for useless `else` in `begin..end` without `rescue`. -# -# NOTE: This syntax is no longer valid on Ruby 2.6 or higher. -# -# @example -# -# # bad -# begin -# do_something -# else -# do_something_else # This will never be run. -# end -# -# # good -# begin -# do_something -# rescue -# handle_errors -# else -# do_something_else -# end -# -# source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#27 -class RuboCop::Cop::Lint::UselessElseWithoutRescue < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#34 - def on_new_investigation; end -end - -# source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#30 -RuboCop::Cop::Lint::UselessElseWithoutRescue::MSG = T.let(T.unsafe(nil), String) - -# Checks for useless method definitions, specifically: empty constructors -# and methods just delegating to `super`. -# -# @example -# # bad -# def initialize -# super -# end -# -# def method -# super -# end -# -# # good - with default arguments -# def initialize(x = Object.new) -# super -# end -# -# # good -# def initialize -# super -# initialize_internals -# end -# -# def method(*args) -# super(:extra_arg, *args) -# end -# -# source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#38 -class RuboCop::Cop::Lint::UselessMethodDefinition < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#43 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#43 - def on_defs(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#65 - def delegating?(node, def_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#57 - def method_definition_with_modifier?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#61 - def use_rest_or_optional_args?(node); end -end - -# source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#41 -RuboCop::Cop::Lint::UselessMethodDefinition::MSG = T.let(T.unsafe(nil), String) - -# Certain numeric operations have no impact, being: -# Adding or subtracting 0, multiplying or dividing by 1 or raising to the power of 1. -# These are probably leftover from debugging, or are mistakes. -# -# @example -# -# # bad -# x + 0 -# x - 0 -# x * 1 -# x / 1 -# x ** 1 -# -# # good -# x -# -# # bad -# x += 0 -# x -= 0 -# x *= 1 -# x /= 1 -# x **= 1 -# -# # good -# x = x -# -# source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#32 -class RuboCop::Cop::Lint::UselessNumericOperation < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#43 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#55 - def on_op_asgn(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#43 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#41 - def useless_abbreviated_assignment?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#38 - def useless_operation?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#68 - def useless?(operation, number); end -end - -# source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#34 -RuboCop::Cop::Lint::UselessNumericOperation::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#35 -RuboCop::Cop::Lint::UselessNumericOperation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for useless `rescue`s, which only reraise rescued exceptions. -# -# @example -# # bad -# def foo -# do_something -# rescue -# raise -# end -# -# # bad -# def foo -# do_something -# rescue => e -# raise # or 'raise e', or 'raise $!', or 'raise $ERROR_INFO' -# end -# -# # good -# def foo -# do_something -# rescue -# do_cleanup -# raise -# end -# -# # bad (latest rescue) -# def foo -# do_something -# rescue ArgumentError -# # noop -# rescue -# raise -# end -# -# # good (not the latest rescue) -# def foo -# do_something -# rescue ArgumentError -# raise -# rescue -# # noop -# end -# -# source://rubocop//lib/rubocop/cop/lint/useless_rescue.rb#49 -class RuboCop::Cop::Lint::UselessRescue < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/useless_rescue.rb#52 - def on_rescue(node); end - - private - - # source://rubocop//lib/rubocop/cop/lint/useless_rescue.rb#83 - def exception_objects(resbody_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_rescue.rb#60 - def only_reraising?(resbody_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_rescue.rb#75 - def use_exception_variable_in_ensure?(resbody_node); end -end - -# source://rubocop//lib/rubocop/cop/lint/useless_rescue.rb#50 -RuboCop::Cop::Lint::UselessRescue::MSG = T.let(T.unsafe(nil), String) - -# Looks for `ruby2_keywords` calls for methods that do not need it. -# -# `ruby2_keywords` should only be called on methods that accept an argument splat -# (`\*args`) but do not explicit keyword arguments (`k:` or `k: true`) or -# a keyword splat (`**kwargs`). -# -# @example -# # good (splat argument without keyword arguments) -# ruby2_keywords def foo(*args); end -# -# # bad (no arguments) -# ruby2_keywords def foo; end -# -# # good -# def foo; end -# -# # bad (positional argument) -# ruby2_keywords def foo(arg); end -# -# # good -# def foo(arg); end -# -# # bad (double splatted argument) -# ruby2_keywords def foo(**args); end -# -# # good -# def foo(**args); end -# -# # bad (keyword arguments) -# ruby2_keywords def foo(i:, j:); end -# -# # good -# def foo(i:, j:); end -# -# # bad (splat argument with keyword arguments) -# ruby2_keywords def foo(*args, i:, j:); end -# -# # good -# def foo(*args, i:, j:); end -# -# # bad (splat argument with double splat) -# ruby2_keywords def foo(*args, **kwargs); end -# -# # good -# def foo(*args, **kwargs); end -# -# # bad (ruby2_keywords given a symbol) -# def foo; end -# ruby2_keywords :foo -# -# # good -# def foo; end -# -# # bad (ruby2_keywords with dynamic method) -# define_method(:foo) { |arg| } -# ruby2_keywords :foo -# -# # good -# define_method(:foo) { |arg| } -# -# source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#66 -class RuboCop::Cop::Lint::UselessRuby2Keywords < ::RuboCop::Cop::Base - # Looks for statically or dynamically defined methods with a given name - # - # source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#72 - def method_definition(param0 = T.unsafe(nil), param1); end - - # source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#79 - def on_send(node); end - - private - - # `ruby2_keywords` is only allowed if there's a `restarg` and no keyword arguments - # - # source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#118 - def allowed_arguments(arguments); end - - # source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#109 - def find_method_definition(node, method_name); end - - # source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#91 - def inspect_def(node, def_node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#97 - def inspect_sym(node, sym_node); end -end - -# source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#67 -RuboCop::Cop::Lint::UselessRuby2Keywords::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#68 -RuboCop::Cop::Lint::UselessRuby2Keywords::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for setter call to local variable as the final -# expression of a function definition. -# -# @example -# -# # bad -# def something -# x = Something.new -# x.attr = 5 -# end -# -# # good -# def something -# x = Something.new -# x.attr = 5 -# x -# end -# -# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#31 -class RuboCop::Cop::Lint::UselessSetterCall < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#37 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#37 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#59 - def setter_call_to_local_variable?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#63 - def last_expression(body); end -end - -# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#35 -RuboCop::Cop::Lint::UselessSetterCall::ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#34 -RuboCop::Cop::Lint::UselessSetterCall::MSG = T.let(T.unsafe(nil), String) - -# This class tracks variable assignments in a method body -# and if a variable contains object passed as argument at the end of -# the method. -# -# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#72 -class RuboCop::Cop::Lint::UselessSetterCall::MethodVariableTracker - # @return [MethodVariableTracker] a new instance of MethodVariableTracker - # - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#73 - def initialize(body_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#148 - def constructor?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#78 - def contain_local_object?(variable_name); end - - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#140 - def process_assignment(asgn_node, rhs_node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#96 - def process_assignment_node(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#131 - def process_binary_operator_assignment(op_asgn_node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#123 - def process_logical_operator_assignment(asgn_node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#109 - def process_multiple_assignment(masgn_node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#88 - def scan(node, &block); end -end - -# Checks for uses of `Integer#times` that will never yield -# (when the integer ``<= 0``) or that will only ever yield once -# (`1.times`). -# -# @example -# # bad -# -5.times { do_something } -# 0.times { do_something } -# 1.times { do_something } -# 1.times { |i| do_something(i) } -# -# # good -# do_something -# do_something(1) -# -# source://rubocop//lib/rubocop/cop/lint/useless_times.rb#24 -class RuboCop::Cop::Lint::UselessTimes < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#37 - def block_arg(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#42 - def block_reassigns_arg?(param0, param1); end - - # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#46 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#32 - def times_call?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#62 - def autocorrect(corrector, count, node, proc_name); end - - # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#84 - def autocorrect_block(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#80 - def autocorrect_block_pass(corrector, node, proc_name); end - - # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#94 - def fix_indentation(source, range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#72 - def never_process?(count, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#106 - def own_line?(node); end - - # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#76 - def remove_node(corrector, node); end -end - -# source://rubocop//lib/rubocop/cop/lint/useless_times.rb#28 -RuboCop::Cop::Lint::UselessTimes::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/useless_times.rb#29 -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 -# some_num * 10 -# do_something -# end -# -# def some_method(some_var) -# some_var -# do_something -# end -# @example CheckForMethodsWithNoSideEffects: true -# # bad -# def some_method(some_array) -# some_array.sort -# do_something(some_array) -# end -# -# # good -# def some_method -# do_something -# some_num * 10 -# end -# -# def some_method(some_var) -# do_something -# some_var -# end -# -# def some_method(some_array) -# some_array.sort! -# do_something(some_array) -# end -# -# source://rubocop//lib/rubocop/cop/lint/void.rb#53 -class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/void.rb#90 - def on_begin(node); end - - # source://rubocop//lib/rubocop/cop/lint/void.rb#81 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/lint/void.rb#95 - def on_ensure(node); end - - # source://rubocop//lib/rubocop/cop/lint/void.rb#90 - def on_kwbegin(node); end - - # source://rubocop//lib/rubocop/cop/lint/void.rb#81 - def on_numblock(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/void.rb#261 - def all_keys_entirely_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/void.rb#265 - def all_values_entirely_literal?(node); end - - # source://rubocop//lib/rubocop/cop/lint/void.rb#239 - def autocorrect_nonmutating_send(corrector, node, suggestion); end - - # source://rubocop//lib/rubocop/cop/lint/void.rb#233 - def autocorrect_void_expression(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/void.rb#220 - def autocorrect_void_op(corrector, node); end - - # source://rubocop//lib/rubocop/cop/lint/void.rb#101 - def check_begin(node); end - - # source://rubocop//lib/rubocop/cop/lint/void.rb#205 - def check_ensure(node); end - - # source://rubocop//lib/rubocop/cop/lint/void.rb#115 - def check_expression(expr); end - - # source://rubocop//lib/rubocop/cop/lint/void.rb#163 - def check_literal(node); end - - # source://rubocop//lib/rubocop/cop/lint/void.rb#187 - def check_nonmutating(node); end - - # source://rubocop//lib/rubocop/cop/lint/void.rb#171 - def check_self(node); end - - # source://rubocop//lib/rubocop/cop/lint/void.rb#145 - def check_var(node); end - - # source://rubocop//lib/rubocop/cop/lint/void.rb#179 - def check_void_expression(node); end - - # source://rubocop//lib/rubocop/cop/lint/void.rb#129 - def check_void_op(node, &block); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/void.rb#248 - def entirely_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/void.rb#213 - def in_void_context?(node); end -end - -# 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#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#61 -RuboCop::Cop::Lint::Void::LIT_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/lint/void.rb#76 -RuboCop::Cop::Lint::Void::METHODS_REPLACEABLE_BY_EACH = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/void.rb#78 -RuboCop::Cop::Lint::Void::NONMUTATING_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/lint/void.rb#69 -RuboCop::Cop::Lint::Void::NONMUTATING_METHODS_WITH_BANG_VERSION = T.let(T.unsafe(nil), Array) - -# 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#68 -RuboCop::Cop::Lint::Void::OPERATORS = T.let(T.unsafe(nil), Array) - -# 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#62 -RuboCop::Cop::Lint::Void::SELF_MSG = T.let(T.unsafe(nil), String) - -# 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#59 -RuboCop::Cop::Lint::Void::VAR_MSG = T.let(T.unsafe(nil), String) - -# Common functionality for obtaining source ranges from regexp matches -# -# source://rubocop//lib/rubocop/cop/mixin/match_range.rb#6 -module RuboCop::Cop::MatchRange - include ::RuboCop::Cop::RangeHelp - - private - - # Return a new `Range` covering the first matching group number for each - # match of `regex` inside `range` - # - # source://rubocop//lib/rubocop/cop/mixin/match_range.rb#13 - def each_match_range(range, regex); end - - # For a `match` inside `range`, return a new `Range` covering the match - # - # source://rubocop//lib/rubocop/cop/mixin/match_range.rb#18 - def match_range(range, match); end -end - -# Message Annotator class annotates a basic offense message -# based on params passed into initializer. -# -# #=> 'Cop/CopName: message (http://example.org/styleguide)' -# -# @example -# RuboCop::Cop::MessageAnnotator.new( -# config, cop_name, cop_config, @options -# ).annotate('message') -# @see #initialize -# -# source://rubocop//lib/rubocop/cop/message_annotator.rb#15 -class RuboCop::Cop::MessageAnnotator - # @option cop_config - # @option cop_config - # @option cop_config - # @option options - # @option options - # @option options - # @option options - # @param config [RuboCop::Config] Check configs for all cops - # @note Message Annotator specifically checks the - # following config options for_all_cops - # :StyleGuideBaseURL [String] URL for styleguide - # :DisplayStyleGuide [Boolean] Include styleguide and reference URLs - # :ExtraDetails [Boolean] Include cop details - # :DisplayCopNames [Boolean] Include cop name - # @param cop_name [String] for specific cop name - # @param cop_config [Hash] configs for specific cop, from config#for_cop - # @param options [Hash, nil] optional - # @return [MessageAnnotator] a new instance of MessageAnnotator - # - # source://rubocop//lib/rubocop/cop/message_annotator.rb#47 - def initialize(config, cop_name, cop_config, options); end - - # Returns the annotated message, - # based on params passed into initializer - # - # @return [String] annotated message - # - # source://rubocop//lib/rubocop/cop/message_annotator.rb#58 - def annotate(message); end - - # Returns the value of attribute config. - # - # source://rubocop//lib/rubocop/cop/message_annotator.rb#16 - def config; end - - # Returns the value of attribute cop_config. - # - # source://rubocop//lib/rubocop/cop/message_annotator.rb#16 - def cop_config; end - - # Returns the value of attribute cop_name. - # - # source://rubocop//lib/rubocop/cop/message_annotator.rb#16 - def cop_name; end - - # Returns the value of attribute options. - # - # source://rubocop//lib/rubocop/cop/message_annotator.rb#16 - def options; end - - # source://rubocop//lib/rubocop/cop/message_annotator.rb#68 - def urls; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/message_annotator.rb#111 - def debug?; end - - # source://rubocop//lib/rubocop/cop/message_annotator.rb#124 - def details; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/message_annotator.rb#115 - def display_cop_names?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/message_annotator.rb#98 - def display_style_guide?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/message_annotator.rb#107 - def extra_details?; end - - # source://rubocop//lib/rubocop/cop/message_annotator.rb#102 - def reference_urls; end - - # Returns the base style guide URL from AllCops or the specific department - # - # @return [String] style guide URL - # - # source://rubocop//lib/rubocop/cop/message_annotator.rb#91 - def style_guide_base_url; end - - # source://rubocop//lib/rubocop/cop/message_annotator.rb#74 - def style_guide_url; end - - class << self - # Returns the value of attribute style_guide_urls. - # - # source://rubocop//lib/rubocop/cop/message_annotator.rb#21 - def style_guide_urls; end - end -end - -# This module handles measurement and reporting of complexity in methods. -# -# @api private -# -# source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#8 -module RuboCop::Cop::MethodComplexity - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount - extend ::RuboCop::AST::NodePattern::Macros - extend ::RuboCop::ExcludeLimit - - # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#37 - def define_method?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 - def max=(value); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#24 - def on_block(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#17 - def on_def(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#17 - def on_defs(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#24 - def on_numblock(node); end - - private - - # @api private - # - # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#42 - def check_complexity(node, method_name); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#61 - def complexity(body); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#73 - def location(node); end -end - -# Common code for cops that deal with preferred methods. -# -# source://rubocop//lib/rubocop/cop/mixin/method_preference.rb#6 -module RuboCop::Cop::MethodPreference - private - - # source://rubocop//lib/rubocop/cop/mixin/method_preference.rb#25 - def default_cop_config; end - - # source://rubocop//lib/rubocop/cop/mixin/method_preference.rb#9 - def preferred_method(method); end - - # source://rubocop//lib/rubocop/cop/mixin/method_preference.rb#13 - def preferred_methods; end -end - -# source://rubocop//lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb#5 -module RuboCop::Cop::Metrics; end - -# Checks that the ABC size of methods is not higher than the -# configured maximum. The ABC size is based on assignments, branches -# (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric -# and https://en.wikipedia.org/wiki/ABC_Software_Metric. -# -# Interpreting ABC size: -# -# * ``<= 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 -# is meant to distinguish actual `attr_reader` from other methods. -# -# This cop also takes into account `AllowedMethods` (defaults to `[]`) -# And `AllowedPatterns` (defaults to `[]`) -# -# @example CountRepeatedAttributes: false (default is true) -# -# # `model` and `current_user`, referenced 3 times each, -# # are each counted as only 1 branch each if -# # `CountRepeatedAttributes` is set to 'false' -# -# def search -# @posts = model.active.visible_by(current_user) -# .search(params[:q]) -# @posts = model.some_process(@posts, current_user) -# @posts = model.another_process(@posts, current_user) -# -# render 'pages/search/page' -# end -# -# source://rubocop//lib/rubocop/cop/metrics/abc_size.rb#39 -class RuboCop::Cop::Metrics::AbcSize < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount - include ::RuboCop::Cop::MethodComplexity - - private - - # source://rubocop//lib/rubocop/cop/metrics/abc_size.rb#47 - def complexity(node); end -end - -# source://rubocop//lib/rubocop/cop/metrics/abc_size.rb#42 -RuboCop::Cop::Metrics::AbcSize::MSG = T.let(T.unsafe(nil), String) - -# Checks if the length of a block exceeds some maximum value. -# Comment lines can optionally be ignored. -# The maximum allowed length is configurable. -# The cop can be configured to ignore blocks passed to certain methods. -# -# You can set constructs you want to fold with `CountAsOne`. -# -# 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. -# -# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] -# -# something do -# array = [ # +1 -# 1, -# 2 -# ] -# -# hash = { # +1 -# key: 'value' -# } -# -# msg = <<~HEREDOC # +1 -# Heredoc -# content. -# HEREDOC -# -# foo( # +1 -# 1, -# 2 -# ) -# end # 4 points -# -# source://rubocop//lib/rubocop/cop/metrics/block_length.rb#45 -class RuboCop::Cop::Metrics::BlockLength < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CodeLength - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - - # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#52 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#52 - def on_numblock(node); end - - private - - # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#81 - def cop_label; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#63 - def method_receiver_excluded?(node); end -end - -# source://rubocop//lib/rubocop/cop/metrics/block_length.rb#50 -RuboCop::Cop::Metrics::BlockLength::LABEL = T.let(T.unsafe(nil), String) - -# Checks for excessive nesting of conditional and looping constructs. -# -# You can configure if blocks are considered using the `CountBlocks` and `CountModifierForms` -# options. When both are set to `false` (the default) blocks and modifier forms are not -# counted towards the nesting level. Set them to `true` to include these in the nesting level -# calculation as well. -# -# The maximum level of nesting allowed is configurable. -# -# source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#14 -class RuboCop::Cop::Metrics::BlockNesting < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 - def max=(value); end - - # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#19 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#28 - def check_nesting_level(node, max, current_level); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#52 - def consider_node?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#62 - def count_blocks?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#44 - def count_if_block?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#66 - def count_modifier_forms?; end - - # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#58 - def message(max); end -end - -# source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#15 -RuboCop::Cop::Metrics::BlockNesting::NESTING_BLOCKS = T.let(T.unsafe(nil), Array) - -# Checks if the length of a class exceeds some maximum value. -# Comment lines can optionally be ignored. -# The maximum allowed length is configurable. -# -# You can set constructs you want to fold with `CountAsOne`. -# -# Available are: 'array', 'hash', 'heredoc', and 'method_call'. -# Each construct will be counted as one line regardless of its actual size. -# -# NOTE: This cop also applies for `Struct` definitions. -# -# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] -# -# class Foo -# ARRAY = [ # +1 -# 1, -# 2 -# ] -# -# HASH = { # +1 -# key: 'value' -# } -# -# MSG = <<~HEREDOC # +1 -# Heredoc -# content. -# HEREDOC -# -# foo( # +1 -# 1, -# 2 -# ) -# end # 4 points -# -# source://rubocop//lib/rubocop/cop/metrics/class_length.rb#40 -class RuboCop::Cop::Metrics::ClassLength < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CodeLength - - # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#53 - def on_casgn(node); end - - # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#43 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#47 - def on_sclass(node); end - - private - - # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#67 - def find_expression_within_parent(parent); end - - # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#63 - def message(length, max_length); end -end - -# Checks for literals with extremely many entries. This is indicative of -# configuration or data that may be better extracted somewhere else, like -# a database, fetched from an API, or read from a non-code file (CSV, -# JSON, YAML, etc.). -# -# @example -# # bad -# # Huge Array literal -# [1, 2, '...', 999_999_999] -# -# # bad -# # Huge Hash literal -# { 1 => 1, 2 => 2, '...' => '...', 999_999_999 => 999_999_999} -# -# # bad -# # Huge Set "literal" -# Set[1, 2, '...', 999_999_999] -# -# # good -# # Reasonably sized Array literal -# [1, 2, '...', 10] -# -# # good -# # Reading huge Array from external data source -# # File.readlines('numbers.txt', chomp: true).map!(&:to_i) -# -# # good -# # Reasonably sized Hash literal -# { 1 => 1, 2 => 2, '...' => '...', 10 => 10} -# -# # good -# # Reading huge Hash from external data source -# CSV.foreach('numbers.csv', headers: true).each_with_object({}) do |row, hash| -# hash[row["key"].to_i] = row["value"].to_i -# end -# -# # good -# # Reasonably sized Set "literal" -# Set[1, 2, '...', 10] -# -# # good -# # Reading huge Set from external data source -# SomeFramework.config_for(:something)[:numbers].to_set -# -# source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#50 -class RuboCop::Cop::Metrics::CollectionLiteralLength < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#60 - def on_array(node); end - - # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#60 - def on_hash(node); end - - # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#65 - def on_index(node); end - - # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#71 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#56 - def set_const?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#77 - def collection_threshold; end -end - -# source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#51 -RuboCop::Cop::Metrics::CollectionLiteralLength::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#53 -RuboCop::Cop::Metrics::CollectionLiteralLength::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks that the cyclomatic complexity of methods is not higher -# than the configured maximum. The cyclomatic complexity is the number of -# linearly independent paths through a method. The algorithm counts -# decision points and adds one. -# -# An if statement (or unless or ?:) increases the complexity by one. An -# else branch does not, since it doesn't add a decision point. The && -# operator (or keyword and) can be converted to a nested if statement, -# and ||/or is shorthand for a sequence of ifs, so they also add one. -# Loops can be said to have an exit condition, so they add one. -# Blocks that are calls to builtin iteration methods -# (e.g. `ary.map{...}`) also add one, others are ignored. -# -# @example -# -# def each_child_node(*types) # count begins: 1 -# unless block_given? # unless: +1 -# return to_enum(__method__, *types) -# end -# -# children.each do |child| # each{}: +1 -# next unless child.is_a?(Node) # unless: +1 -# -# yield child if types.empty? || # if: +1, ||: +1 -# types.include?(child.type) -# end -# -# self -# end # total: 6 -# -# source://rubocop//lib/rubocop/cop/metrics/cyclomatic_complexity.rb#35 -class RuboCop::Cop::Metrics::CyclomaticComplexity < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount - include ::RuboCop::Cop::MethodComplexity - include ::RuboCop::Cop::Metrics::Utils::IteratingBlock - - private - - # source://rubocop//lib/rubocop/cop/metrics/cyclomatic_complexity.rb#45 - def complexity_score_for(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/cyclomatic_complexity.rb#52 - def count_block?(block); end -end - -# source://rubocop//lib/rubocop/cop/metrics/cyclomatic_complexity.rb#40 -RuboCop::Cop::Metrics::CyclomaticComplexity::COUNTED_NODES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/metrics/cyclomatic_complexity.rb#39 -RuboCop::Cop::Metrics::CyclomaticComplexity::MSG = T.let(T.unsafe(nil), String) - -# Checks if the length of a method exceeds some maximum value. -# Comment lines can optionally be allowed. -# The maximum allowed length is configurable. -# -# You can set constructs you want to fold with `CountAsOne`. -# -# Available are: 'array', 'hash', 'heredoc', and 'method_call'. -# Each construct will be counted as one line regardless of its actual size. -# -# NOTE: The `ExcludedMethods` and `IgnoredMethods` configuration is -# deprecated and only kept for backwards compatibility. -# Please use `AllowedMethods` and `AllowedPatterns` instead. -# By default, there are no methods to allowed. -# -# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] -# -# def m -# array = [ # +1 -# 1, -# 2 -# ] -# -# hash = { # +1 -# key: 'value' -# } -# -# <<~HEREDOC # +1 -# Heredoc -# content. -# HEREDOC -# -# foo( # +1 -# 1, -# 2 -# ) -# end # 4 points -# -# source://rubocop//lib/rubocop/cop/metrics/method_length.rb#43 -class RuboCop::Cop::Metrics::MethodLength < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CodeLength - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#57 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#50 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#50 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#57 - def on_numblock(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#73 - def allowed?(method_name); end - - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#69 - def cop_label; end -end - -# source://rubocop//lib/rubocop/cop/metrics/method_length.rb#48 -RuboCop::Cop::Metrics::MethodLength::LABEL = T.let(T.unsafe(nil), String) - -# Checks if the length of a module exceeds some maximum value. -# Comment lines can optionally be ignored. -# The maximum allowed length is configurable. -# -# You can set constructs you want to fold with `CountAsOne`. -# -# Available are: 'array', 'hash', 'heredoc', and 'method_call'. -# Each construct will be counted as one line regardless of its actual size. -# -# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] -# -# module M -# ARRAY = [ # +1 -# 1, -# 2 -# ] -# -# HASH = { # +1 -# key: 'value' -# } -# -# MSG = <<~HEREDOC # +1 -# Heredoc -# content. -# HEREDOC -# -# foo( # +1 -# 1, -# 2 -# ) -# end # 4 points -# -# source://rubocop//lib/rubocop/cop/metrics/module_length.rb#38 -class RuboCop::Cop::Metrics::ModuleLength < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CodeLength - - # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#52 - def module_definition?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#45 - def on_casgn(node); end - - # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#41 - def on_module(node); end - - private - - # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#56 - def message(length, max_length); end -end - -# Checks for methods with too many parameters. -# -# The maximum number of parameters is configurable. -# Keyword arguments can optionally be excluded from the total count, -# as they add less complexity than positional or optional parameters. -# -# Any number of arguments for `initialize` method inside a block of -# `Struct.new` and `Data.define` like this is always allowed: -# -# [source,ruby] -# ---- -# Struct.new(:one, :two, :three, :four, :five, keyword_init: true) do -# def initialize(one:, two:, three:, four:, five:) -# end -# end -# ---- -# -# This is because checking the number of arguments of the `initialize` method -# does not make sense. -# -# NOTE: Explicit block argument `&block` is not counted to prevent -# erroneous change that is avoided by making block argument implicit. -# -# This cop also checks for the maximum number of optional parameters. -# This can be configured using the `MaxOptionalParameters` config option. -# -# @example Max: 3 -# # good -# def foo(a, b, c = 1) -# end -# @example Max: 2 -# # bad -# def foo(a, b, c = 1) -# end -# @example CountKeywordArgs: true (default) -# # counts keyword args towards the maximum -# -# # bad (assuming Max is 3) -# def foo(a, b, c, d: 1) -# end -# -# # good (assuming Max is 3) -# def foo(a, b, c: 1) -# end -# @example CountKeywordArgs: false -# # don't count keyword args towards the maximum -# -# # good (assuming Max is 3) -# def foo(a, b, c, d: 1) -# end -# @example MaxOptionalParameters: 3 (default) -# # good -# def foo(a = 1, b = 2, c = 3) -# end -# @example MaxOptionalParameters: 2 -# # bad -# def foo(a = 1, b = 2, c = 3) -# end -# -# source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#70 -class RuboCop::Cop::Metrics::ParameterLists < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#121 - def argument_to_lambda_or_proc?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 - def max=(value); end - - # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 - def max_optional_parameters=(value); end - - # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#104 - def on_args(node); end - - # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#90 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#90 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#81 - def struct_new_or_data_define_block?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#125 - def args_count(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#141 - def count_keyword_args?; end - - # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#137 - def max_optional_parameters; end - - # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#133 - def max_params; end -end - -# source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#74 -RuboCop::Cop::Metrics::ParameterLists::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#77 -RuboCop::Cop::Metrics::ParameterLists::NAMED_KEYWORD_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#75 -RuboCop::Cop::Metrics::ParameterLists::OPTIONAL_PARAMETERS_MSG = T.let(T.unsafe(nil), String) - -# Tries to produce a complexity score that's a measure of the -# complexity the reader experiences when looking at a method. For that -# reason it considers `when` nodes as something that doesn't add as much -# complexity as an `if` or a `&&`. Except if it's one of those special -# `case`/`when` constructs where there's no expression after `case`. Then -# the cop treats it as an `if`/`elsif`/`elsif`... and lets all the `when` -# nodes count. In contrast to the CyclomaticComplexity cop, this cop -# considers `else` nodes as adding complexity. -# -# @example -# -# def my_method # 1 -# if cond # 1 -# case var # 2 (0.8 + 4 * 0.2, rounded) -# when 1 then func_one -# when 2 then func_two -# when 3 then func_three -# when 4..10 then func_other -# end -# else # 1 -# do_something until a && b # 2 -# end # === -# end # 7 complexity points -# -# source://rubocop//lib/rubocop/cop/metrics/perceived_complexity.rb#29 -class RuboCop::Cop::Metrics::PerceivedComplexity < ::RuboCop::Cop::Metrics::CyclomaticComplexity - private - - # source://rubocop//lib/rubocop/cop/metrics/perceived_complexity.rb#36 - def complexity_score_for(node); end -end - -# source://rubocop//lib/rubocop/cop/metrics/perceived_complexity.rb#32 -RuboCop::Cop::Metrics::PerceivedComplexity::COUNTED_NODES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/metrics/perceived_complexity.rb#30 -RuboCop::Cop::Metrics::PerceivedComplexity::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb#6 -module RuboCop::Cop::Metrics::Utils; end - -# > ABC is .. a software size metric .. computed by counting the number -# > of assignments, branches and conditions for a section of code. -# > http://c2.com/cgi/wiki?AbcMetric -# -# We separate the *calculator* from the *cop* so that the calculation, -# the formula itself, is easier to test. -# -# source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#13 -class RuboCop::Cop::Metrics::Utils::AbcSizeCalculator - include ::RuboCop::AST::Sexp - include ::RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount - include ::RuboCop::Cop::Metrics::Utils::IteratingBlock - include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount - - # @return [AbcSizeCalculator] a new instance of AbcSizeCalculator - # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#37 - def initialize(node, discount_repeated_attributes: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#42 - def calculate; end - - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#60 - def calculate_node(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#65 - def else_branch?(node); end - - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#54 - def evaluate_branch_nodes(node); end - - # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#60 - def evaluate_condition_node(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#127 - def argument?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#86 - def assignment?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#123 - def branch?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#119 - def capturing_variable?(name); end - - # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#95 - def compound_assignment(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#131 - def condition?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#108 - def simple_assignment?(node); end - - # @yield [node] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#71 - def visit_depth_last(node, &block); end - - class << self - # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#30 - def calculate(node, discount_repeated_attributes: T.unsafe(nil)); end - end -end - -# > Branch -- an explicit forward program branch out of scope -- a -# > function call, class method call .. -# > http://c2.com/cgi/wiki?AbcMetric -# -# source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#21 -RuboCop::Cop::Metrics::Utils::AbcSizeCalculator::BRANCH_NODES = T.let(T.unsafe(nil), Array) - -# > Condition -- a logical/Boolean test, == != <= >= < > else case -# > default try catch ? and unary conditionals. -# > http://c2.com/cgi/wiki?AbcMetric -# -# source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#26 -RuboCop::Cop::Metrics::Utils::AbcSizeCalculator::CONDITION_NODES = T.let(T.unsafe(nil), Array) - -# Helps to calculate code length for the provided node. -# -# source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#8 -class RuboCop::Cop::Metrics::Utils::CodeLengthCalculator - include ::RuboCop::PathUtil - include ::RuboCop::Cop::Util - extend ::RuboCop::AST::NodePattern::Macros - - # @return [CodeLengthCalculator] a new instance of CodeLengthCalculator - # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#16 - def initialize(node, processed_source, count_comments: T.unsafe(nil), foldable_types: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#24 - def calculate; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#181 - 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#90 - def classlike_code_length(node); end - - # @return [Boolean] - # - # 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 - def code_length(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#162 - def count_comments?; end - - # 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#146 - def extract_body(node); end - - # @return [Boolean] - # - # 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#121 - def heredoc_length(node); end - - # @return [Boolean] - # - # 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#158 - def irrelevant_line?(source_line); end - - # 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#106 - def namespace_module?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#185 - 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#166 - def omit_length(descendant); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#177 - def parenthesized?(node); end - - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#189 - def source_from_node_with_heredoc(node); end -end - -# source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#13 -RuboCop::Cop::Metrics::Utils::CodeLengthCalculator::CLASSLIKE_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#12 -RuboCop::Cop::Metrics::Utils::CodeLengthCalculator::FOLDABLE_TYPES = T.let(T.unsafe(nil), Array) - -# Used to identify iterating blocks like `.map{}` and `.map(&:...)` -# -# source://rubocop//lib/rubocop/cop/metrics/utils/iterating_block.rb#8 -module RuboCop::Cop::Metrics::Utils::IteratingBlock - # Returns the name of the method called with a block - # if node is a block node, or a block-pass node. - # - # source://rubocop//lib/rubocop/cop/metrics/utils/iterating_block.rb#37 - def block_method_name(node); end - - # Returns nil if node is neither a block node or a block-pass node. - # Otherwise returns true/false if method call is a known iterating call - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/iterating_block.rb#53 - def iterating_block?(node); end - - # Returns true iff name is a known iterating type (e.g. :each, :transform_values) - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/iterating_block.rb#47 - def iterating_method?(name); end -end - -# source://rubocop//lib/rubocop/cop/metrics/utils/iterating_block.rb#33 -RuboCop::Cop::Metrics::Utils::IteratingBlock::KNOWN_ITERATING_METHODS = T.let(T.unsafe(nil), Set) - -# Identifies repetitions `{c}send` calls with no arguments: -# -# foo.bar -# foo.bar # => repeated -# foo.bar.baz.qux # => inner send repeated -# foo.bar.baz.other # => both inner send repeated -# foo.bar(2) # => not repeated -# -# It also invalidates sequences if a receiver is reassigned: -# -# xx.foo.bar -# xx.foo.baz # => inner send repeated -# self.xx = any # => invalidates everything so far -# xx.foo.baz # => no repetition -# self.xx.foo.baz # => all repeated -# -# @api private -# -# source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#25 -module RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount - include ::RuboCop::AST::Sexp - extend ::RuboCop::AST::NodePattern::Macros - - # Plug into the calculator - # - # @api private - # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#37 - def initialize(node, discount_repeated_attributes: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#68 - def attribute_call?(param0 = T.unsafe(nil)); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#60 - def calculate_node(node); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#50 - def discount_repeated_attributes?; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#54 - def evaluate_branch_nodes(node); end - - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#99 - def root_node?(param0 = T.unsafe(nil)); end - - private - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#73 - def discount_repeated_attribute?(send_node); end - - # Returns the "known_attributes" for the `node` by walking the receiver tree - # If at any step the subdirectory does not exist, it is yielded with the - # associated key (method_name) - # If the node is not a series of `(c)send` calls with no arguments, - # then `nil` is yielded - # - # @api private - # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#110 - def find_attributes(node, &block); end - - # or `nil` if it is not a setter. - # - # @api private - # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#126 - def setter_to_getter(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#87 - def update_repeated_attribute(node); end -end - -# @api private -# -# source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#29 -RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount::VAR_SETTER_TO_GETTER = T.let(T.unsafe(nil), Hash) - -# Identifies repetitions `&.` on the same variable: -# -# my_var&.foo -# my_var&.bar # => repeated -# my_var = baz # => reset -# my_var&.qux # => not repeated -# -# @api private -# -# source://rubocop//lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb#15 -module RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb#20 - def discount_for_repeated_csend?(csend_node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb#34 - def reset_on_lvasgn(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb#16 - def reset_repeated_csend; end -end - -# source://rubocop//lib/rubocop/cop/migration/department_name.rb#5 -module RuboCop::Cop::Migration; end - -# department name. -# -# source://rubocop//lib/rubocop/cop/migration/department_name.rb#8 -class RuboCop::Cop::Migration::DepartmentName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/migration/department_name.rb#21 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/migration/department_name.rb#47 - def check_cop_name(name, comment, offset); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/migration/department_name.rb#69 - def contain_unexpected_character_for_department_name?(name); end - - # source://rubocop//lib/rubocop/cop/migration/department_name.rb#43 - def disable_comment_offset; end - - # source://rubocop//lib/rubocop/cop/migration/department_name.rb#73 - def qualified_legacy_cop_name(cop_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/migration/department_name.rb#63 - def valid_content_token?(content_token); end -end - -# source://rubocop//lib/rubocop/cop/migration/department_name.rb#14 -RuboCop::Cop::Migration::DepartmentName::DISABLE_COMMENT_FORMAT = T.let(T.unsafe(nil), Regexp) - -# The token that makes up a disable comment. -# `DepartmentName/CopName` or` all`. -# -# source://rubocop//lib/rubocop/cop/migration/department_name.rb#19 -RuboCop::Cop::Migration::DepartmentName::DISABLING_COPS_CONTENT_TOKEN = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/migration/department_name.rb#12 -RuboCop::Cop::Migration::DepartmentName::MSG = T.let(T.unsafe(nil), String) - -# Common functionality for checking minimum body length. -# -# source://rubocop//lib/rubocop/cop/mixin/min_body_length.rb#6 -module RuboCop::Cop::MinBodyLength - private - - # source://rubocop//lib/rubocop/cop/mixin/min_body_length.rb#13 - def min_body_length; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/min_body_length.rb#9 - def min_body_length?(node); end -end - -# Common functionality for checking minimum branches count. -# -# source://rubocop//lib/rubocop/cop/mixin/min_branches_count.rb#6 -module RuboCop::Cop::MinBranchesCount - private - - # source://rubocop//lib/rubocop/cop/mixin/min_branches_count.rb#29 - def if_conditional_branches(node, branches = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/min_branches_count.rb#22 - def min_branches_count; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/min_branches_count.rb#9 - def min_branches_count?(node); end -end - -# Common code for indenting the first elements in multiline -# array literals, hash literals, and method definitions. -# -# source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#7 -module RuboCop::Cop::MultilineElementIndentation - private - - # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#42 - def check_expected_style(styles); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#26 - def check_first(first, left_brace, left_parenthesis, offset); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#80 - def detected_styles(actual_column, offset, left_parenthesis, left_brace); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#85 - def detected_styles_for_column(column, left_parenthesis, left_brace); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#10 - def each_argument_node(node, type); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#66 - def hash_pair_where_value_beginning_with(left_brace, first); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#98 - def incorrect_style_detected(styles, first, base_column_type); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#50 - def indent_base(left_brace, first, left_parenthesis); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#72 - def key_and_value_begin_on_same_line?(pair); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#76 - def right_sibling_begins_on_subsequent_line?(pair); end -end - -# Common functionality for checking for a line break before each -# element in a multi-line collection. -# -# source://rubocop//lib/rubocop/cop/mixin/multiline_element_line_breaks.rb#7 -module RuboCop::Cop::MultilineElementLineBreaks - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_element_line_breaks.rb#23 - def all_on_same_line?(nodes, ignore_last: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_element_line_breaks.rb#10 - def check_line_breaks(_node, children, ignore_last: T.unsafe(nil)); end -end - -# Common functionality for checking multiline method calls and binary -# operations. -# -# 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#130 - def argument_in_method_call(node, kind); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#186 - def assignment_rhs(node); end - - # 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 - # one exception: prefix keywords. - # - # ``` - # while foo && # Here, `while` is called a "prefix keyword" - # bar # This is called "special indentation" - # baz - # end - # ``` - # - # Note that *postfix conditionals* do *not* get "special indentation". - # - # ``` - # next if foo && - # bar # normal indentation, not special - # ``` - # - # 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#158 - def disqualified_rhs?(candidate, ancestor); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#200 - def grouped_expression?(node); end - - # 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#85 - def indentation(node); end - - # 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#204 - def inside_arg_list_parentheses?(node, ancestor); end - - # 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#107 - def kw_node_with_special_indentation(node); end - - # 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#32 - def left_hand_side(lhs); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#194 - def not_for_this_cop?(node); end - - # 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#144 - def part_of_assignment_rhs(node, candidate); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#182 - def part_of_block_body?(candidate, block_node); end - - # Returns true if `node` is a conditional whose `body` and `condition` - # begin on the same line. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#213 - 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#174 - def valid_method_rhs_candidate?(candidate, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#163 - def valid_rhs?(candidate, ancestor); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#178 - def valid_rhs_candidate?(candidate, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#217 - def within_node?(inner, outer); end -end - -# source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#11 -RuboCop::Cop::MultilineExpressionIndentation::ASSIGNMENT_MESSAGE_TAIL = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#10 -RuboCop::Cop::MultilineExpressionIndentation::DEFAULT_MESSAGE_TAIL = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#8 -RuboCop::Cop::MultilineExpressionIndentation::KEYWORD_ANCESTOR_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#12 -RuboCop::Cop::MultilineExpressionIndentation::KEYWORD_MESSAGE_TAIL = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#9 -RuboCop::Cop::MultilineExpressionIndentation::UNALIGNED_RHS_TYPES = T.let(T.unsafe(nil), Array) - -# Autocorrection logic for the closing brace of a literal either -# on the same line as the last contained elements, or a new line. -# -# source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#7 -class RuboCop::Cop::MultilineLiteralBraceCorrector - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MultilineLiteralBraceLayout - include ::RuboCop::Cop::RangeHelp - - # @return [MultilineLiteralBraceCorrector] a new instance of MultilineLiteralBraceCorrector - # - # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#15 - def initialize(corrector, node, processed_source); end - - # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#21 - def call; end - - private - - # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#61 - def content_if_comment_present(corrector, node); end - - # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#51 - def correct_heredoc_argument_method_chain(corrector, end_range); end - - # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#46 - def correct_next_line_brace(corrector, end_range); end - - # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#42 - def correct_same_line_brace(corrector); end - - # Returns the value of attribute corrector. - # - # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#40 - def corrector; end - - # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#94 - def last_element_range_with_trailing_comma(node); end - - # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#103 - def last_element_trailing_comma_range(node); end - - # Returns the value of attribute node. - # - # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#40 - def node; end - - # Returns the value of attribute processed_source. - # - # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#40 - def processed_source; end - - # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#90 - def remove_trailing_content_of_comment(corrector, range); end - - # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#80 - def select_content_to_be_inserted_after_last_element(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#73 - def use_heredoc_argument_method_chain?(parent); end - - class << self - # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#11 - def correct(corrector, node, processed_source); end - end -end - -# Common functionality for checking the closing brace of a literal is -# either on the same line as the last contained elements or a new line. -# -# source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#7 -module RuboCop::Cop::MultilineLiteralBraceLayout - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - private - - # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#34 - def check(node); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#12 - def check_brace_layout(node); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#42 - def check_new_line(node); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#50 - def check_same_line(node); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#58 - def check_symmetrical(node); end - - # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#86 - def children(node); end - - # This method depends on the fact that we have guarded - # against implicit and empty literals. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#98 - def closing_brace_on_same_line?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#74 - def empty_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#82 - def ignored_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#78 - def implicit_literal?(node); end - - # Starting with the parent node and recursively for the parent node's - # children, check if the node is a HEREDOC and if the HEREDOC ends below - # or on the last line of the parent node. - # - # Example: - # - # # node is `b: ...` parameter - # # last_line_heredoc?(node) => false - # foo(a, - # b: { - # a: 1, - # c: <<-EOM - # baz - # EOM - # } - # ) - # - # # node is `b: ...` parameter - # # last_line_heredoc?(node) => true - # foo(a, - # b: <<-EOM - # baz - # EOM - # ) - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#126 - def last_line_heredoc?(node, parent = T.unsafe(nil)); end - - # Returns true for the case - # [a, - # b # comment - # ].some_method - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#26 - def new_line_needed_before_closing_brace?(node); end - - # This method depends on the fact that we have guarded - # against implicit and empty literals. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#92 - def opening_brace_on_same_line?(node); end -end - -# source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#5 -module RuboCop::Cop::Naming; end - -# Avoid prefixing accessor method names with `get_` or `set_`. -# Applies to both instance and class methods. -# -# NOTE: Method names starting with `get_` or `set_` only register an offense -# when the methods match the expected arity for getters and setters respectively. -# Getters (`get_attribute`) must have no arguments to be registered, -# and setters (`set_attribute(value)`) must have exactly one. -# -# @example -# # bad -# def set_attribute(value) -# end -# -# # good -# def attribute=(value) -# end -# -# # bad -# def get_attribute -# end -# -# # good -# def attribute -# end -# -# # accepted, incorrect arity for getter -# def get_value(attr) -# end -# -# # accepted, incorrect arity for setter -# def set_value -# end -# -# source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#38 -class RuboCop::Cop::Naming::AccessorMethodName < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#42 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#42 - def on_defs(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#66 - def bad_reader_name?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#70 - def bad_writer_name?(node); end - - # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#54 - def message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#62 - def proper_attribute_name?(node); end -end - -# source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#39 -RuboCop::Cop::Naming::AccessorMethodName::MSG_READER = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#40 -RuboCop::Cop::Naming::AccessorMethodName::MSG_WRITER = T.let(T.unsafe(nil), String) - -# Checks for non-ascii characters in identifier and constant names. -# Identifiers are always checked and whether constants are checked -# can be controlled using AsciiConstants config. -# -# @example -# # bad -# def καλημερα # Greek alphabet (non-ascii) -# end -# -# # bad -# def こんにちはと言う # Japanese character (non-ascii) -# end -# -# # bad -# def hello_🍣 # Emoji (non-ascii) -# end -# -# # good -# def say_hello -# end -# -# # bad -# 신장 = 10 # Hangul character (non-ascii) -# -# # good -# height = 10 -# -# # bad -# params[:عرض_gteq] # Arabic character (non-ascii) -# -# # good -# params[:width_gteq] -# @example AsciiConstants: true (default) -# # bad -# class Foö -# end -# -# FOÖ = "foo" -# @example AsciiConstants: false -# # good -# class Foö -# end -# -# FOÖ = "foo" -# -# source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#53 -class RuboCop::Cop::Naming::AsciiIdentifiers < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#59 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#84 - def first_non_ascii_chars(string); end - - # source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#74 - def first_offense_range(identifier); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#70 - def should_check?(token); end -end - -# source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#57 -RuboCop::Cop::Naming::AsciiIdentifiers::CONSTANT_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#56 -RuboCop::Cop::Naming::AsciiIdentifiers::IDENTIFIER_MSG = T.let(T.unsafe(nil), String) - -# Makes sure that certain binary operator methods have their -# sole parameter named `other`. -# -# @example -# -# # bad -# def +(amount); end -# -# # good -# def +(other); end -# -# source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#16 -class RuboCop::Cop::Naming::BinaryOperatorParameterName < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#29 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#25 - def op_method_candidate?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#45 - def op_method?(name); end -end - -# source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#22 -RuboCop::Cop::Naming::BinaryOperatorParameterName::EXCLUDED = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#19 -RuboCop::Cop::Naming::BinaryOperatorParameterName::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#21 -RuboCop::Cop::Naming::BinaryOperatorParameterName::OP_LIKE_METHODS = T.let(T.unsafe(nil), Array) - -# In Ruby 3.1, anonymous block forwarding has been added. -# -# This cop identifies places where `do_something(&block)` can be replaced -# by `do_something(&)`. -# -# It also supports the opposite style by alternative `explicit` option. -# You can specify the block variable name for autocorrection with `BlockForwardingName`. -# The default variable name is `block`. If the name is already in use, it will not be -# autocorrected. -# -# [NOTE] -# ==== -# Because of a bug in Ruby 3.3.0, when a block is referenced inside of another block, -# no offense will be registered until Ruby 3.4: -# -# [source,ruby] -# ---- -# def foo(&block) -# # Using an anonymous block would be a syntax error on Ruby 3.3.0 -# block_method { bar(&block) } -# end -# ---- -# ==== -# -# @example EnforcedStyle: anonymous (default) -# -# # bad -# def foo(&block) -# bar(&block) -# end -# -# # good -# def foo(&) -# bar(&) -# end -# @example EnforcedStyle: explicit -# -# # bad -# def foo(&) -# bar(&) -# end -# -# # good -# def foo(&block) -# bar(&block) -# end -# -# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#54 -class RuboCop::Cop::Naming::BlockForwarding < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#68 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#68 - def on_defs(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#118 - def anonymous_block_argument?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#101 - def block_argument_name_matched?(block_pass_node, last_argument); end - - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#150 - def block_forwarding_name; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#91 - def expected_block_forwarding_style?(node, last_argument); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#122 - def explicit_block_argument?(node); end - - # Ruby 3.3.0 had a bug where accessing an anonymous block argument inside of a block - # was a syntax error in unambiguous cases: https://bugs.ruby-lang.org/issues/20090 - # We disallow this also for earlier Ruby versions so that code is forwards compatible. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#110 - def invalidates_syntax?(block_pass_node); end - - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#126 - def register_offense(block_argument, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#142 - def use_block_argument_as_local_variable?(node, last_argument); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#114 - def use_kwarg_in_method_definition?(node); end - - class << self - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#64 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#62 -RuboCop::Cop::Naming::BlockForwarding::MSG = T.let(T.unsafe(nil), String) - -# Checks block parameter names for how descriptive they -# are. It is highly configurable. -# -# The `MinNameLength` config option takes an integer. It represents -# the minimum amount of characters the name must be. Its default is 1. -# The `AllowNamesEndingInNumbers` config option takes a boolean. When -# set to false, this cop will register offenses for names ending with -# numbers. Its default is false. The `AllowedNames` config option -# takes an array of permitted names that will never register an -# offense. The `ForbiddenNames` config option takes an array of -# restricted names that will always register an offense. -# -# @example -# # bad -# bar do |varOne, varTwo| -# varOne + varTwo -# end -# -# # With `AllowNamesEndingInNumbers` set to false -# foo { |num1, num2| num1 * num2 } -# -# # With `MinNameLength` set to number greater than 1 -# baz { |a, b, c| do_stuff(a, b, c) } -# -# # good -# bar do |thud, fred| -# thud + fred -# end -# -# foo { |speed, distance| speed * distance } -# -# baz { |age, height, gender| do_stuff(age, height, gender) } -# -# source://rubocop//lib/rubocop/cop/naming/block_parameter_name.rb#38 -class RuboCop::Cop::Naming::BlockParameterName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::UncommunicativeName - - # source://rubocop//lib/rubocop/cop/naming/block_parameter_name.rb#41 - def on_block(node); end -end - -# Checks for class and module names with -# an underscore in them. -# -# `AllowedNames` config takes an array of permitted names. -# Its default value is `['module_parent']`. -# These names can be full class/module names or part of the name. -# eg. Adding `my_class` to the `AllowedNames` config will allow names like -# `my_class`, `my_class::User`, `App::my_class`, `App::my_class::User`, etc. -# -# @example -# # bad -# class My_Class -# end -# module My_Module -# end -# -# # good -# class MyClass -# end -# module MyModule -# end -# class module_parent::MyModule -# end -# -# source://rubocop//lib/rubocop/cop/naming/class_and_module_camel_case.rb#29 -class RuboCop::Cop::Naming::ClassAndModuleCamelCase < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/naming/class_and_module_camel_case.rb#32 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/naming/class_and_module_camel_case.rb#32 - def on_module(node); end -end - -# source://rubocop//lib/rubocop/cop/naming/class_and_module_camel_case.rb#30 -RuboCop::Cop::Naming::ClassAndModuleCamelCase::MSG = T.let(T.unsafe(nil), String) - -# Checks whether constant names are written using -# SCREAMING_SNAKE_CASE. -# -# To avoid false positives, it ignores cases in which we cannot know -# for certain the type of value that would be assigned to a constant. -# -# @example -# # bad -# InchInCm = 2.54 -# INCHinCM = 2.54 -# Inch_In_Cm = 2.54 -# -# # good -# INCH_IN_CM = 2.54 -# -# source://rubocop//lib/rubocop/cop/naming/constant_name.rb#20 -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#67 - def literal_receiver?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#33 - def on_casgn(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#55 - def allowed_assignment?(value); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#72 - def allowed_conditional_expression_on_rhs?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#62 - def allowed_method_call_on_rhs?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#76 - def contains_constant?(node); end -end - -# source://rubocop//lib/rubocop/cop/naming/constant_name.rb#21 -RuboCop::Cop::Naming::ConstantName::MSG = T.let(T.unsafe(nil), String) - -# Use POSIX character classes, so we allow accented characters rather -# than just standard ASCII characters -# -# source://rubocop//lib/rubocop/cop/naming/constant_name.rb#24 -RuboCop::Cop::Naming::ConstantName::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) - -# Makes sure that Ruby source files have snake_case -# names. Ruby scripts (i.e. source files with a shebang in the -# first line) are ignored. -# -# The cop also ignores `.gemspec` files, because Bundler -# recommends using dashes to separate namespaces in nested gems -# (i.e. `bundler-console` becomes `Bundler::Console`). As such, the -# gemspec is supposed to be named `bundler-console.gemspec`. -# -# When `ExpectMatchingDefinition` (default: `false`) is `true`, the cop requires -# each file to have a class, module or `Struct` defined in it that matches -# the filename. This can be further configured using -# `CheckDefinitionPathHierarchy` (default: `true`) to determine whether the -# path should match the namespace of the above definition. -# -# When `IgnoreExecutableScripts` (default: `true`) is `true`, files that start -# with a shebang line are not considered by the cop. -# -# When `Regex` is set, the cop will flag any filename that does not match -# the regular expression. -# -# @example -# # bad -# lib/layoutManager.rb -# -# anything/usingCamelCase -# -# # good -# lib/layout_manager.rb -# -# anything/using_snake_case.rake -# -# source://rubocop//lib/rubocop/cop/naming/file_name.rb#39 -class RuboCop::Cop::Naming::FileName < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#54 - def on_new_investigation; end - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#47 - def struct_definition(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#132 - def allowed_acronyms; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#94 - def bad_filename_allowed?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#120 - def check_definition_path_hierarchy?; end - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#167 - def defined_struct(node); end - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#124 - def definition_path_hierarchy_roots; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#116 - def expect_matching_definition?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#136 - def filename_good?(basename); end - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#145 - def find_class_or_module(node, namespace); end - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#163 - def find_definition(node); end - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#63 - def for_bad_filename(file_path); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#112 - def ignore_executable_scripts?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#200 - def match?(expected); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#204 - def match_acronym?(expected, name); end - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#172 - def match_namespace(node, namespace, expected); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#90 - def matching_class?(file_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#86 - def matching_definition?(file_path); end - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#98 - def no_definition_message(basename, file_path); end - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#104 - def other_message(basename); end - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#186 - def partial_matcher!(expected); end - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#75 - def perform_class_and_module_naming_checks(file_path, basename); end - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#128 - def regex; end - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#238 - def to_module_name(basename); end - - # source://rubocop//lib/rubocop/cop/naming/file_name.rb#211 - def to_namespace(path); end -end - -# source://rubocop//lib/rubocop/cop/naming/file_name.rb#41 -RuboCop::Cop::Naming::FileName::MSG_NO_DEFINITION = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/naming/file_name.rb#42 -RuboCop::Cop::Naming::FileName::MSG_REGEX = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/naming/file_name.rb#40 -RuboCop::Cop::Naming::FileName::MSG_SNAKE_CASE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/naming/file_name.rb#44 -RuboCop::Cop::Naming::FileName::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) - -# Checks that your heredocs are using the configured case. -# By default it is configured to enforce uppercase heredocs. -# -# @example EnforcedStyle: uppercase (default) -# # bad -# <<-sql -# SELECT * FROM foo -# sql -# -# # good -# <<-SQL -# SELECT * FROM foo -# SQL -# @example EnforcedStyle: lowercase -# # bad -# <<-SQL -# SELECT * FROM foo -# SQL -# -# # good -# <<-sql -# SELECT * FROM foo -# sql -# -# source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_case.rb#30 -class RuboCop::Cop::Naming::HeredocDelimiterCase < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Heredoc - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_case.rb#37 - def on_heredoc(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_case.rb#54 - def correct_case_delimiters?(node); end - - # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_case.rb#58 - def correct_delimiters(source); end - - # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_case.rb#50 - def message(_node); end -end - -# source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_case.rb#35 -RuboCop::Cop::Naming::HeredocDelimiterCase::MSG = T.let(T.unsafe(nil), String) - -# Checks that your heredocs are using meaningful delimiters. -# By default it disallows `END` and `EO*`, and can be configured through -# forbidden listing additional delimiters. -# -# @example -# -# # good -# <<-SQL -# SELECT * FROM foo -# SQL -# -# # bad -# <<-END -# SELECT * FROM foo -# END -# -# # bad -# <<-EOS -# SELECT * FROM foo -# EOS -# -# source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#26 -class RuboCop::Cop::Naming::HeredocDelimiterNaming < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Heredoc - - # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#31 - def on_heredoc(node); end - - private - - # 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#41 - def meaningful_delimiters?(node); end -end - -# source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#29 -RuboCop::Cop::Naming::HeredocDelimiterNaming::MSG = T.let(T.unsafe(nil), String) - -# Recommends the use of inclusive language instead of problematic terms. -# The cop can check the following locations for offenses: -# -# - identifiers -# - constants -# - variables -# - strings -# - symbols -# - comments -# - file paths -# -# Each of these locations can be individually enabled/disabled via configuration, -# for example CheckIdentifiers = true/false. -# -# Flagged terms are configurable for the cop. For each flagged term an optional -# Regex can be specified to identify offenses. Suggestions for replacing a flagged term can -# be configured and will be displayed as part of the offense message. -# An AllowedRegex can be specified for a flagged term to exempt allowed uses of the term. -# `WholeWord: true` can be set on a flagged term to indicate the cop should only match when -# a term matches the whole word (partial matches will not be offenses). -# -# The cop supports autocorrection when there is only one suggestion. When there are multiple -# suggestions, the best suggestion cannot be identified and will not be autocorrected. -# -# @example FlaggedTerms: { whitelist: { Suggestions: ['allowlist'] } } -# # Suggest replacing identifier whitelist with allowlist -# -# # bad -# whitelist_users = %w(user1 user1) -# -# # good -# allowlist_users = %w(user1 user2) -# @example FlaggedTerms: { master: { Suggestions: ['main', 'primary', 'leader'] } } -# # Suggest replacing master in an instance variable name with main, primary, or leader -# -# # bad -# @master_node = 'node1.example.com' -# -# # good -# @primary_node = 'node1.example.com' -# @example FlaggedTerms: { whitelist: { Regex: !ruby/regexp '/white[-_\s]?list' } } -# # Identify problematic terms using a Regexp -# -# # bad -# white_list = %w(user1 user2) -# -# # good -# allow_list = %w(user1 user2) -# @example FlaggedTerms: { master: { AllowedRegex: 'master\'?s degree' } } -# # Specify allowed uses of the flagged term as a string or regexp. -# -# # bad -# # They had a masters -# -# # good -# # They had a master's degree -# @example FlaggedTerms: { slave: { WholeWord: true } } -# # Specify that only terms that are full matches will be flagged. -# -# # bad -# Slave -# -# # good (won't be flagged despite containing `slave`) -# TeslaVehicle -# -# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#74 -class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # @return [InclusiveLanguage] a new instance of InclusiveLanguage - # - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#84 - def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#93 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#111 - def add_offenses_for_token(token, word_locations); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#176 - def add_to_flagged_term_hash(regex_string, term, term_definition); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#202 - def array_to_ignorecase_regex(strings); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#126 - def check_token?(type); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#252 - def create_message(word, message = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#226 - def create_multiple_word_message_for_file(words); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#222 - def create_single_word_message_for_file(word); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#198 - def ensure_regex_string(regex); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#169 - def extract_regexp(term, term_definition); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#260 - def find_flagged_term(word); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#274 - def format_suggestions(suggestions); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#206 - def investigate_filepath; end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#100 - def investigate_tokens; end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#240 - def mask_input(str); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#289 - def offense_range(token, word); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#160 - def preferred_sole_term(suggestions); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#130 - def preprocess_check_config; end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#144 - def preprocess_flagged_terms; end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#267 - def preprocess_suggestions(suggestions); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#188 - def process_allowed_regex(allowed); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#230 - def scan_for_words(input); end - - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#183 - def set_regexes(flagged_term_strings, allowed_strings); end -end - -# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#78 -RuboCop::Cop::Naming::InclusiveLanguage::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#79 -RuboCop::Cop::Naming::InclusiveLanguage::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#80 -RuboCop::Cop::Naming::InclusiveLanguage::MSG_FOR_FILE_PATH = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#82 -class RuboCop::Cop::Naming::InclusiveLanguage::WordLocation < ::Struct - # Returns the value of attribute position - # - # @return [Object] the current value of position - def position; end - - # Sets the attribute position - # - # @param value [Object] the value to set the attribute position to. - # @return [Object] the newly set value - def position=(_); end - - # Returns the value of attribute word - # - # @return [Object] the current value of word - def word; end - - # Sets the attribute word - # - # @param value [Object] the value to set the attribute word to. - # @return [Object] the newly set value - def word=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# Checks for memoized methods whose instance variable name -# does not match the method name. Applies to both regular methods -# (defined with `def`) and dynamic methods (defined with -# `define_method` or `define_singleton_method`). -# -# This cop can be configured with the EnforcedStyleForLeadingUnderscores -# directive. It can be configured to allow for memoized instance variables -# prefixed with an underscore. Prefixing ivars with an underscore is a -# convention that is used to implicitly indicate that an ivar should not -# be set or referenced outside of the memoization method. -# -# @example EnforcedStyleForLeadingUnderscores: disallowed (default) -# # bad -# # Method foo is memoized using an instance variable that is -# # not `@foo`. This can cause confusion and bugs. -# def foo -# @something ||= calculate_expensive_thing -# end -# -# def foo -# return @something if defined?(@something) -# @something = calculate_expensive_thing -# end -# -# # good -# def _foo -# @foo ||= calculate_expensive_thing -# end -# -# # good -# def foo -# @foo ||= calculate_expensive_thing -# end -# -# # good -# def foo -# @foo ||= begin -# calculate_expensive_thing -# end -# end -# -# # good -# def foo -# helper_variable = something_we_need_to_calculate_foo -# @foo ||= calculate_expensive_thing(helper_variable) -# end -# -# # good -# define_method(:foo) do -# @foo ||= calculate_expensive_thing -# end -# -# # good -# define_method(:foo) do -# return @foo if defined?(@foo) -# @foo = calculate_expensive_thing -# end -# @example EnforcedStyleForLeadingUnderscores: required -# # bad -# def foo -# @something ||= calculate_expensive_thing -# end -# -# # bad -# def foo -# @foo ||= calculate_expensive_thing -# end -# -# def foo -# return @foo if defined?(@foo) -# @foo = calculate_expensive_thing -# end -# -# # good -# def foo -# @_foo ||= calculate_expensive_thing -# end -# -# # good -# def _foo -# @_foo ||= calculate_expensive_thing -# end -# -# def foo -# return @_foo if defined?(@_foo) -# @_foo = calculate_expensive_thing -# end -# -# # good -# define_method(:foo) do -# @_foo ||= calculate_expensive_thing -# end -# -# # good -# define_method(:foo) do -# return @_foo if defined?(@_foo) -# @_foo = calculate_expensive_thing -# end -# @example EnforcedStyleForLeadingUnderscores :optional -# # bad -# def foo -# @something ||= calculate_expensive_thing -# end -# -# # good -# def foo -# @foo ||= calculate_expensive_thing -# end -# -# # good -# def foo -# @_foo ||= calculate_expensive_thing -# end -# -# # good -# def _foo -# @_foo ||= calculate_expensive_thing -# end -# -# # good -# def foo -# return @_foo if defined?(@_foo) -# @_foo = calculate_expensive_thing -# end -# -# # good -# define_method(:foo) do -# @foo ||= calculate_expensive_thing -# end -# -# # good -# define_method(:foo) do -# @_foo ||= calculate_expensive_thing -# end -# -# 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#198 - def defined_memoized?(param0 = T.unsafe(nil), param1); end - - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#161 - def method_definition?(param0 = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#206 - def on_defined?(node); end - - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#171 - def on_or_asgn(node); end - - private - - # 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#253 - def matches?(method_name, ivar_assign); end - - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#262 - def message(variable); end - - # 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#270 - def suggested_var(method_name); end - - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#276 - def variable_name_candidates(method_name); end -end - -# 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#158 -RuboCop::Cop::Naming::MemoizedInstanceVariableName::INITIALIZE_METHODS = T.let(T.unsafe(nil), Array) - -# 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#155 -RuboCop::Cop::Naming::MemoizedInstanceVariableName::UNDERSCORE_REQUIRED = T.let(T.unsafe(nil), String) - -# Makes sure that all methods use the configured style, -# snake_case or camelCase, for their names. -# -# This cop has `AllowedPatterns` configuration option. -# -# Naming/MethodName: -# AllowedPatterns: -# - '\AonSelectionBulkChange\z' -# - '\AonSelectionCleared\z' -# -# Method names matching patterns are always allowed. -# -# @example EnforcedStyle: snake_case (default) -# # bad -# def fooBar; end -# -# # good -# def foo_bar; end -# @example EnforcedStyle: camelCase -# # bad -# def foo_bar; end -# -# # good -# def fooBar; end -# -# source://rubocop//lib/rubocop/cop/naming/method_name.rb#31 -class RuboCop::Cop::Naming::MethodName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::ConfigurableFormatting - include ::RuboCop::Cop::ConfigurableNaming - include ::RuboCop::Cop::AllowedPattern - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/naming/method_name.rb#55 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/naming/method_name.rb#55 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/naming/method_name.rb#44 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/naming/method_name.rb#42 - def str_name(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/naming/method_name.rb#39 - def sym_name(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/naming/method_name.rb#64 - def attr_name(name_item); end - - # source://rubocop//lib/rubocop/cop/naming/method_name.rb#75 - def message(style); end - - # source://rubocop//lib/rubocop/cop/naming/method_name.rb#68 - def range_position(node); end -end - -# source://rubocop//lib/rubocop/cop/naming/method_name.rb#36 -RuboCop::Cop::Naming::MethodName::MSG = T.let(T.unsafe(nil), String) - -# Checks method parameter names for how descriptive they -# are. It is highly configurable. -# -# The `MinNameLength` config option takes an integer. It represents -# the minimum amount of characters the name must be. Its default is 3. -# The `AllowNamesEndingInNumbers` config option takes a boolean. When -# set to false, this cop will register offenses for names ending with -# numbers. Its default is false. The `AllowedNames` config option -# takes an array of permitted names that will never register an -# offense. The `ForbiddenNames` config option takes an array of -# restricted names that will always register an offense. -# -# @example -# # bad -# def bar(varOne, varTwo) -# varOne + varTwo -# end -# -# # With `AllowNamesEndingInNumbers` set to false -# def foo(num1, num2) -# num1 * num2 -# end -# -# # With `MinNameLength` set to number greater than 1 -# def baz(a, b, c) -# do_stuff(a, b, c) -# end -# -# # good -# def bar(thud, fred) -# thud + fred -# end -# -# def foo(speed, distance) -# speed * distance -# end -# -# def baz(age_a, height_b, gender_c) -# do_stuff(age_a, height_b, gender_c) -# end -# -# source://rubocop//lib/rubocop/cop/naming/method_parameter_name.rb#46 -class RuboCop::Cop::Naming::MethodParameterName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::UncommunicativeName - - # source://rubocop//lib/rubocop/cop/naming/method_parameter_name.rb#49 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/naming/method_parameter_name.rb#49 - def on_defs(node); end -end - -# Checks that predicate method names end with a question mark and -# do not start with a forbidden prefix. -# -# A method is determined to be a predicate method if its name starts with -# one of the prefixes listed in the `NamePrefix` configuration. The list -# defaults to `is_`, `has_`, and `have_` but may be overridden. -# -# Predicate methods must end with a question mark. -# -# When `ForbiddenPrefixes` is also set (as it is by default), predicate -# methods which begin with a forbidden prefix are not allowed, even if -# they end with a `?`. These methods should be changed to remove the -# prefix. -# -# When `UseSorbetSigs` set to true (optional), the cop will only report -# offenses if the method has a Sorbet `sig` with a return type of -# `T::Boolean`. Dynamic methods are not supported with this configuration. -# -# @example MethodDefinitionMacros: ['def_node_matcher'] -# # bad -# def_node_matcher(:is_even) { |value| } -# -# # good -# def_node_matcher(:even?) { |value| } -# @example NamePrefix: ['seems_to_be_'] -# # bad -# def seems_to_be_even(value) -# end -# -# # When ForbiddenPrefixes: ['seems_to_be_'] -# # good -# def even?(value) -# end -# -# # When ForbiddenPrefixes: [] -# # good -# def seems_to_be_even?(value) -# end -# @example AllowedMethods: ['is_a?'] (default) -# # Despite starting with the `is_` prefix, this method is allowed -# # good -# def is_a?(value) -# end -# @example AllowedMethods: ['is_even?'] -# # good -# def is_even?(value) -# end -# @example UseSorbetSigs: false (default) -# # bad -# sig { returns(String) } -# def is_this_thing_on -# "yes" -# end -# -# # good - Sorbet signature is not evaluated -# sig { returns(String) } -# def is_this_thing_on? -# "yes" -# end -# @example UseSorbetSigs: true -# # bad -# sig { returns(T::Boolean) } -# def odd(value) -# end -# -# # good -# sig { returns(T::Boolean) } -# def odd?(value) -# end -# @example MethodDefinitionMacros: ['define_method', 'define_singleton_method'] (default) -# # bad -# define_method(:is_even) { |value| } -# -# # good -# define_method(:even?) { |value| } -# @example NamePrefix: ['is_', 'has_', 'have_'] (default) -# # bad -# def is_even(value) -# end -# -# # When ForbiddenPrefixes: ['is_', 'has_', 'have_'] (default) -# # good -# def even?(value) -# end -# -# # When ForbiddenPrefixes: [] -# # good -# def is_even?(value) -# end -# -# source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#103 -class RuboCop::Cop::Naming::PredicateName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#107 - def dynamic_method_define(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#126 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#126 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#113 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#154 - def sorbet_return_type(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#141 - def validate_config; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#164 - def allowed_method_name?(method_name, prefix); end - - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#172 - def expected_name(method_name, prefix); end - - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#186 - def forbidden_prefixes; end - - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#182 - def message(method_name, new_name); end - - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#198 - def method_definition_macros(macro_name); end - - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#190 - def predicate_prefixes; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#158 - def sorbet_sig?(node, return_type: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#194 - def use_sorbet_sigs?; end -end - -# Makes sure that rescued exceptions variables are named as -# expected. -# -# The `PreferredName` config option takes a `String`. It represents -# the required name of the variable. Its default is `e`. -# -# NOTE: This cop does not consider nested rescues because it cannot -# guarantee that the variable from the outer rescue is not used within -# the inner rescue (in which case, changing the inner variable would -# shadow the outer variable). -# -# @example PreferredName: e (default) -# # bad -# begin -# # do something -# rescue MyException => exception -# # do something -# end -# -# # good -# begin -# # do something -# rescue MyException => e -# # do something -# end -# -# # good -# begin -# # do something -# rescue MyException => _e -# # do something -# end -# @example PreferredName: exception -# # bad -# begin -# # do something -# rescue MyException => e -# # do something -# end -# -# # good -# begin -# # do something -# rescue MyException => exception -# # do something -# end -# -# # good -# begin -# # do something -# rescue MyException => _exception -# # do something -# end -# -# source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#61 -class RuboCop::Cop::Naming::RescuedExceptionsVariableName < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#66 - def on_resbody(node); end - - private - - # 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#117 - 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#143 - def correct_reassignment(corrector, node, offending_name, preferred_name); end - - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#160 - def message(node); end - - # 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#147 - def preferred_name(variable_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#166 - def shadowed_variable_name?(node); end - - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#156 - def variable_name(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#106 - def variable_name_matches?(node, name); end -end - -# source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#64 -RuboCop::Cop::Naming::RescuedExceptionsVariableName::MSG = T.let(T.unsafe(nil), String) - -# Checks that the configured style (snake_case or camelCase) is used for all variable names. -# This includes local variables, instance variables, class variables, method arguments -# (positional, keyword, rest or block), and block arguments. -# -# The cop can also be configured to forbid using specific names for variables, using -# `ForbiddenIdentifiers` or `ForbiddenPatterns`. In addition to the above, this applies -# to global variables as well. -# -# Method definitions and method calls are not affected by this cop. -# -# @example EnforcedStyle: snake_case (default) -# # bad -# fooBar = 1 -# -# # good -# foo_bar = 1 -# @example EnforcedStyle: camelCase -# # bad -# foo_bar = 1 -# -# # good -# fooBar = 1 -# @example AllowedIdentifiers: ['fooBar'] -# # good (with EnforcedStyle: snake_case) -# fooBar = 1 -# @example AllowedPatterns: ['_v\d+\z'] -# # good (with EnforcedStyle: camelCase) -# release_v1 = true -# @example ForbiddenIdentifiers: ['fooBar'] -# # bad (in all cases) -# fooBar = 1 -# @fooBar = 1 -# @@fooBar = 1 -# $fooBar = 1 -# @example ForbiddenPatterns: ['_v\d+\z'] -# # bad (in all cases) -# release_v1 = true -# @release_v1 = true -# @@release_v1 = true -# $release_v1 = true -# -# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#52 -class RuboCop::Cop::Naming::VariableName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedIdentifiers - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::ConfigurableFormatting - include ::RuboCop::Cop::ConfigurableNaming - include ::RuboCop::Cop::AllowedPattern - - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#64 - def on_arg(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#64 - def on_blockarg(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#64 - def on_cvasgn(node); end - - # Only forbidden names are checked for global variable assignment - # - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#86 - def on_gvasgn(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#64 - def on_ivasgn(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#64 - def on_kwarg(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#64 - def on_kwoptarg(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#64 - def on_kwrestarg(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#64 - def on_lvar(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#64 - def on_lvasgn(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#64 - def on_optarg(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#64 - def on_restarg(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#60 - def valid_name?(node, name, given_style = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#99 - def forbidden_identifiers; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#111 - def forbidden_name?(name); end - - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#103 - def forbidden_patterns; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#107 - def matches_forbidden_pattern?(name); end - - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#95 - def message(style); end - - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#118 - def register_forbidden_name(node); end -end - -# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#57 -RuboCop::Cop::Naming::VariableName::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#58 -RuboCop::Cop::Naming::VariableName::MSG_FORBIDDEN = T.let(T.unsafe(nil), String) - -# Makes sure that all numbered variables use the -# configured style, snake_case, normalcase, or non_integer, -# for their numbering. -# -# Additionally, `CheckMethodNames` and `CheckSymbols` configuration options -# can be used to specify whether method names and symbols should be checked. -# Both are enabled by default. -# -# @example AllowedPatterns: ['_v\d+\z'] -# # good -# :some_sym_v1 -# @example EnforcedStyle: snake_case -# # bad -# :some_sym1 -# variable1 = 1 -# -# def some_method1; end -# -# def some_method_1(arg1); end -# -# # good -# :some_sym_1 -# variable_1 = 1 -# -# def some_method_1; end -# -# def some_method_1(arg_1); end -# @example EnforcedStyle: non_integer -# # bad -# :some_sym1 -# :some_sym_1 -# -# variable1 = 1 -# variable_1 = 1 -# -# def some_method1; end -# -# def some_method_1; end -# -# def some_methodone(arg1); end -# def some_methodone(arg_1); end -# -# # good -# :some_symone -# :some_sym_one -# -# variableone = 1 -# variable_one = 1 -# -# def some_methodone; end -# -# def some_method_one; end -# -# def some_methodone(argone); end -# def some_methodone(arg_one); end -# -# # In the following examples, we assume `EnforcedStyle: normalcase` (default). -# @example CheckMethodNames: true (default) -# # bad -# def some_method_1; end -# @example CheckMethodNames: false -# # good -# def some_method_1; end -# @example CheckSymbols: true (default) -# # bad -# :some_sym_1 -# @example CheckSymbols: false -# # good -# :some_sym_1 -# @example AllowedIdentifiers: [capture3] -# # good -# expect(Open3).to receive(:capture3) -# @example EnforcedStyle: normalcase (default) -# # bad -# :some_sym_1 -# variable_1 = 1 -# -# def some_method_1; end -# -# def some_method1(arg_1); end -# -# # good -# :some_sym1 -# variable1 = 1 -# -# def some_method1; end -# -# def some_method1(arg1); end -# -# source://rubocop//lib/rubocop/cop/naming/variable_number.rb#103 -class RuboCop::Cop::Naming::VariableNumber < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedIdentifiers - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::ConfigurableFormatting - include ::RuboCop::Cop::ConfigurableNumbering - include ::RuboCop::Cop::AllowedPattern - - # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#114 - def on_arg(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#114 - def on_cvasgn(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#125 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#125 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#114 - def on_gvasgn(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#114 - def on_ivasgn(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#114 - def on_lvasgn(node); end - - # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#133 - def on_sym(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#110 - def valid_name?(node, name, given_style = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#142 - def message(style); end -end - -# source://rubocop//lib/rubocop/cop/naming/variable_number.rb#108 -RuboCop::Cop::Naming::VariableNumber::MSG = T.let(T.unsafe(nil), String) - -# Some common code shared between `NegatedIf` and -# `NegatedWhile` cops. -# -# source://rubocop//lib/rubocop/cop/mixin/negative_conditional.rb#7 -module RuboCop::Cop::NegativeConditional - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop//lib/rubocop/cop/mixin/negative_conditional.rb#18 - def empty_condition?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/negative_conditional.rb#15 - def single_negative?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/negative_conditional.rb#20 - def check_negative_conditional(node, message:, &block); end -end - -# source://rubocop//lib/rubocop/cop/mixin/negative_conditional.rb#10 -RuboCop::Cop::NegativeConditional::MSG = T.let(T.unsafe(nil), String) - -# This module provides a list of methods that are: -# 1. In the NilClass by default -# 2. Added to NilClass by explicitly requiring any standard libraries -# 3. Cop's configuration parameter AllowedMethods. -# -# source://rubocop//lib/rubocop/cop/mixin/nil_methods.rb#9 -module RuboCop::Cop::NilMethods - include ::RuboCop::Cop::AllowedMethods - - private - - # source://rubocop//lib/rubocop/cop/mixin/nil_methods.rb#14 - def nil_methods; end - - # source://rubocop//lib/rubocop/cop/mixin/nil_methods.rb#18 - def other_stdlib_methods; end -end - -# An offense represents a style violation detected by RuboCop. -# -# source://rubocop//lib/rubocop/cop/offense.rb#6 -class RuboCop::Cop::Offense - include ::Comparable - - # @api private - # @return [Offense] a new instance of Offense - # - # source://rubocop//lib/rubocop/cop/offense.rb#83 - def initialize(severity, location, message, cop_name, status = T.unsafe(nil), corrector = T.unsafe(nil)); end - - # Returns `-1`, `0`, or `+1` - # if this offense is less than, equal to, or greater than `other`. - # - # @api public - # @return [Integer] comparison result - # - # source://rubocop//lib/rubocop/cop/offense.rb#229 - def <=>(other); end - - # @api public - # @return [Boolean] returns `true` if two offenses contain same attributes - # - # source://rubocop//lib/rubocop/cop/offense.rb#210 - def ==(other); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/offense.rb#159 - def column; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/offense.rb#169 - def column_length; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/offense.rb#193 - def column_range; end - - # @api public - # @example - # 'Layout/LineLength' - # @return [String] the cop name as a String for which this offense is for. - # - # source://rubocop//lib/rubocop/cop/offense.rb#50 - def cop_name; end - - # @api public - # @return [Boolean] whether this offense can be automatically corrected via autocorrect. - # This includes todo comments, for example when requested with `--disable-uncorrectable`. - # - # source://rubocop//lib/rubocop/cop/offense.rb#101 - def correctable?; end - - # @api public - # @return [Boolean] whether this offense is automatically corrected via - # autocorrect or a todo. - # - # source://rubocop//lib/rubocop/cop/offense.rb#112 - def corrected?; end - - # @api public - # @return [Boolean] whether this offense is automatically disabled via a todo. - # - # source://rubocop//lib/rubocop/cop/offense.rb#122 - def corrected_with_todo?; end - - # @api public - # @return [Corrector | nil] the autocorrection for this offense, or `nil` when not available - # - # source://rubocop//lib/rubocop/cop/offense.rb#61 - def corrector; end - - # @api public - # @return [Boolean] whether this offense was locally disabled with a - # disable or todo where it occurred. - # - # source://rubocop//lib/rubocop/cop/offense.rb#133 - def disabled?; end - - # @api public - # @return [Boolean] returns `true` if two offenses contain same attributes - # - # source://rubocop//lib/rubocop/cop/offense.rb#210 - def eql?(other); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/offense.rb#178 - def first_line; end - - # source://rubocop//lib/rubocop/cop/offense.rb#218 - def hash; end - - # @api public - # @return [Parser::Source::Range] the range of the code that is highlighted - # - # source://rubocop//lib/rubocop/cop/offense.rb#141 - def highlighted_area; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/offense.rb#188 - def last_column; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/offense.rb#183 - def last_line; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/offense.rb#154 - def line; end - - # @api public - # @return [Parser::Source::Range] the location where the violation is detected. - # @see https://www.rubydoc.info/gems/parser/Parser/Source/Range Parser::Source::Range - # - # source://rubocop//lib/rubocop/cop/offense.rb#28 - def location; end - - # @api public - # @example - # 'Line is too long. [90/80]' - # @return [String] human-readable message - # - # source://rubocop//lib/rubocop/cop/offense.rb#39 - def message; end - - # Internally we use column number that start at 0, but when - # outputting column numbers, we want them to start at 1. One - # reason is that editors, such as Emacs, expect this. - # - # @api private - # - # source://rubocop//lib/rubocop/cop/offense.rb#202 - def real_column; end - - # @api public - # @return [RuboCop::Cop::Severity] - # - # source://rubocop//lib/rubocop/cop/offense.rb#17 - def severity; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/offense.rb#164 - def source_line; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/offense.rb#53 - def status; end - - # This is just for debugging purpose. - # - # @api private - # - # source://rubocop//lib/rubocop/cop/offense.rb#147 - def to_s; end -end - -# @api private -# -# source://rubocop//lib/rubocop/cop/offense.rb#10 -RuboCop::Cop::Offense::COMPARISON_ATTRIBUTES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/offense.rb#80 -RuboCop::Cop::Offense::NO_LOCATION = T.let(T.unsafe(nil), RuboCop::Cop::Offense::PseudoSourceRange) - -# source://rubocop//lib/rubocop/cop/offense.rb#63 -class RuboCop::Cop::Offense::PseudoSourceRange < ::Struct - # Returns the value of attribute begin_pos - # - # @return [Object] the current value of begin_pos - def begin_pos; end - - # Sets the attribute begin_pos - # - # @param value [Object] the value to set the attribute begin_pos to. - # @return [Object] the newly set value - def begin_pos=(_); end - - # Returns the value of attribute column - # - # @return [Object] the current value of column - def column; end - - # Sets the attribute column - # - # @param value [Object] the value to set the attribute column to. - # @return [Object] the newly set value - def column=(_); end - - # source://rubocop//lib/rubocop/cop/offense.rb#69 - def column_range; end - - # Returns the value of attribute end_pos - # - # @return [Object] the current value of end_pos - def end_pos; end - - # Sets the attribute end_pos - # - # @param value [Object] the value to set the attribute end_pos to. - # @return [Object] the newly set value - def end_pos=(_); end - - # Returns the value of attribute line - # - # @return [Object] the current value of line - def first_line; end - - # Returns the value of attribute column - # - # @return [Object] the current value of column - def last_column; end - - # Returns the value of attribute line - # - # @return [Object] the current value of line - def last_line; end - - # source://rubocop//lib/rubocop/cop/offense.rb#73 - def length; end - - # Returns the value of attribute line - # - # @return [Object] the current value of line - def line; end - - # Sets the attribute line - # - # @param value [Object] the value to set the attribute line to. - # @return [Object] the newly set value - def line=(_); end - - # source://rubocop//lib/rubocop/cop/offense.rb#73 - def size; end - - # Returns the value of attribute source_line - # - # @return [Object] the current value of source_line - def source_line; end - - # Sets the attribute source_line - # - # @param value [Object] the value to set the attribute source_line to. - # @return [Object] the newly set value - def source_line=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# Common functionality for cops checking if and unless expressions. -# -# source://rubocop//lib/rubocop/cop/mixin/on_normal_if_unless.rb#6 -module RuboCop::Cop::OnNormalIfUnless - # source://rubocop//lib/rubocop/cop/mixin/on_normal_if_unless.rb#7 - def on_if(node); end -end - -# This autocorrects gem dependency order -# -# source://rubocop//lib/rubocop/cop/correctors/ordered_gem_corrector.rb#6 -class RuboCop::Cop::OrderedGemCorrector - extend ::RuboCop::Cop::OrderedGemNode - extend ::RuboCop::Cop::RangeHelp - - class << self - # Returns the value of attribute comments_as_separators. - # - # source://rubocop//lib/rubocop/cop/correctors/ordered_gem_corrector.rb#11 - def comments_as_separators; end - - # source://rubocop//lib/rubocop/cop/correctors/ordered_gem_corrector.rb#13 - def correct(processed_source, node, previous_declaration, comments_as_separators); end - - # Returns the value of attribute processed_source. - # - # source://rubocop//lib/rubocop/cop/correctors/ordered_gem_corrector.rb#11 - def processed_source; end - - private - - # source://rubocop//lib/rubocop/cop/correctors/ordered_gem_corrector.rb#26 - def declaration_with_comment(node); end - end -end - -# Common functionality for Bundler/OrderedGems and -# Gemspec/OrderedDependencies. -# -# source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#7 -module RuboCop::Cop::OrderedGemNode - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#23 - def case_insensitive_out_of_order?(string_a, string_b); end - - # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#27 - def consecutive_lines(previous, current); end - - # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#55 - def find_gem_name(gem_node); end - - # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#18 - def gem_canonical_name(name); end - - # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#49 - def gem_name(declaration_node); end - - # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#10 - def get_source_range(node, comments_as_separators); end - - # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#32 - def register_offense(previous, current); end - - # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#61 - def treat_comments_as_separators; end -end - -# Common functionality for handling parentheses. -# -# source://rubocop//lib/rubocop/cop/mixin/parentheses.rb#6 -module RuboCop::Cop::Parentheses - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/parentheses.rb#9 - def parens_required?(node); end -end - -# This autocorrects parentheses -# -# source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#6 -class RuboCop::Cop::ParenthesesCorrector - extend ::RuboCop::Cop::RangeHelp - - class << self - # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#12 - def correct(corrector, node); end - - private - - # Add a comma back after the heredoc identifier - # - # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#74 - def add_heredoc_comma(corrector, node); end - - # If the node contains a heredoc, remove the comma too - # It'll be added back in the right place later - # - # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#64 - def extend_range_for_heredoc(node, range); end - - # If removing parentheses leaves a comma on its own line, remove all the whitespace - # preceding it to prevent a syntax error. - # - # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#41 - def handle_orphaned_comma(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#80 - def heredoc?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#28 - def next_char_is_question_mark?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#32 - def only_closing_paren_before_comma?(node); end - - # Get a range for the closing parenthesis and all whitespace to the left of it - # - # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#51 - def parens_range(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#24 - def ternary_condition?(node); end - end -end - -# Common functionality for handling percent arrays. -# -# source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#6 -module RuboCop::Cop::PercentArray - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#26 - def allowed_bracket_array?(node); end - - # @param node [RuboCop::AST::ArrayNode] - # @param elements [Array] - # @return [String] - # - # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#83 - def build_bracketed_array_with_appropriate_whitespace(elements:, node:); end - - # @param preferred_array_code [String] - # @return [String] - # - # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#56 - def build_message_for_bracketed_array(preferred_array_code); end - - # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#67 - def check_bracketed_array(node, literal_prefix); end - - # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#36 - def check_percent_array(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#31 - def comments_in_array?(node); end - - # Override to determine values that are invalid in a percent array - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#22 - def invalid_percent_array_contents?(_node); end - - # Ruby does not allow percent arrays in an ambiguous block context. - # - # @example - # - # foo %i[bar baz] { qux } - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#14 - def invalid_percent_array_context?(node); end - - # Provides whitespace between elements for building a bracketed array. - # %w[ a b c ] - # ^^^ - # - # @param node [RuboCop::AST::ArrayNode] - # @return [String] - # - # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#98 - def whitespace_between(node); end - - # Provides leading whitespace for building a bracketed array. - # %w[ a b c ] - # ^^ - # - # @param node [RuboCop::AST::ArrayNode] - # @return [String] - # - # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#111 - def whitespace_leading(node); end - - # Provides trailing whitespace for building a bracketed array. - # %w[ a b c ] - # ^^^^ - # - # @param node [RuboCop::AST::ArrayNode] - # @return [String] - # - # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#120 - def whitespace_trailing(node); end -end - -# Common functionality for handling percent literals. -# -# source://rubocop//lib/rubocop/cop/mixin/percent_literal.rb#6 -module RuboCop::Cop::PercentLiteral - include ::RuboCop::Cop::RangeHelp - - private - - # source://rubocop//lib/rubocop/cop/mixin/percent_literal.rb#23 - def begin_source(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/percent_literal.rb#11 - def percent_literal?(node); end - - # source://rubocop//lib/rubocop/cop/mixin/percent_literal.rb#17 - def process(node, *types); end - - # source://rubocop//lib/rubocop/cop/mixin/percent_literal.rb#27 - def type(node); end -end - -# This autocorrects percent literals -# -# source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#6 -class RuboCop::Cop::PercentLiteralCorrector - include ::RuboCop::PathUtil - include ::RuboCop::Cop::Util - - # @return [PercentLiteralCorrector] a new instance of PercentLiteralCorrector - # - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#11 - def initialize(config, preferred_delimiters); end - - # Returns the value of attribute config. - # - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#9 - def config; end - - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#16 - def correct(corrector, node, char); end - - # Returns the value of attribute preferred_delimiters. - # - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#9 - def preferred_delimiters; end - - private - - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#46 - def autocorrect_multiline_words(node, escape, delimiters); end - - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#52 - def autocorrect_words(node, escape, delimiters); end - - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#34 - def delimiters_for(type); end - - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#110 - def end_content(source); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#30 - def escape_words?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#78 - def first_line?(node, previous_line_num); end - - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#89 - def fix_escaped_content(word_node, escape, delimiters); end - - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#69 - def line_breaks(node, source, previous_line_num, base_line_num, node_index); end - - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#38 - def new_contents(node, escape, delimiters); end - - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#82 - def process_lines(node, previous_line_num, base_line_num, source_in_lines); end - - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#58 - def process_multiline_words(node, escape, delimiters); end - - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#96 - def substitute_escaped_delimiters(content, delimiters); end - - # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#26 - def wrap_contents(corrector, node, contents, char, delimiters); end -end - -# Common functionality for checking whether an AST node/token is aligned -# with something on a preceding or following line -# -# source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#8 -module RuboCop::Cop::PrecedingFollowingAlignment - private - - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#79 - def aligned_comment_lines; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#102 - def aligned_equals_operator?(range, lineno); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#133 - def aligned_identical?(range, line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#90 - def aligned_operator?(range, line, lineno); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#86 - def aligned_token?(range, line, lineno); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#43 - def aligned_with_adjacent_line?(range, predicate); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#61 - def aligned_with_any_line?(line_ranges, range, indent = T.unsafe(nil), &predicate); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#51 - def aligned_with_any_line_range?(line_ranges, range, &predicate); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#125 - def aligned_with_append_operator?(range, token); end - - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#137 - def aligned_with_equals_sign(token, line_range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#65 - def aligned_with_line?(line_nos, range, indent = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#23 - def aligned_with_operator?(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#119 - def aligned_with_preceding_equals?(range, token); end - - # Allows alignment with a preceding operator that ends with an `=`, - # including assignment and comparison operators. - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#29 - def aligned_with_preceding_equals_operator(token); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#19 - def aligned_with_something?(range); end - - # Allows alignment with a subsequent operator that ends with an `=`, - # including assignment and comparison operators. - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#37 - def aligned_with_subsequent_equals_operator(token); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#94 - def aligned_words?(range, line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#15 - def allow_for_alignment?; end - - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#152 - def assignment_lines; end - - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#156 - def assignment_tokens; end - - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#176 - def relevant_assignment_lines(line_range); end - - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#203 - def remove_equals_in_def(asgn_tokens, processed_source); end -end - -# Tokens that end with an `=`, as well as `<<`, that can be aligned together: -# `=`, `==`, `===`, `!=`, `<=`, `>=`, `<<` and operator assignment (`+=`, etc). -# -# source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#11 -RuboCop::Cop::PrecedingFollowingAlignment::ASSIGNMENT_OR_COMPARISON_TOKENS = T.let(T.unsafe(nil), Array) - -# Common functionality for handling percent literal delimiters. -# -# source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#6 -class RuboCop::Cop::PreferredDelimiters - # @return [PreferredDelimiters] a new instance of PreferredDelimiters - # - # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#11 - def initialize(type, config, preferred_delimiters); end - - # Returns the value of attribute config. - # - # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#7 - def config; end - - # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#17 - def delimiters; end - - # Returns the value of attribute type. - # - # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#7 - def type; end - - private - - # @raise [ArgumentError] - # - # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#23 - def ensure_valid_preferred_delimiters; end - - # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#30 - def preferred_delimiters; end - - # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#45 - def preferred_delimiters_config; end -end - -# source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#9 -RuboCop::Cop::PreferredDelimiters::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Array) - -# This autocorrects punctuation -# -# source://rubocop//lib/rubocop/cop/correctors/punctuation_corrector.rb#6 -class RuboCop::Cop::PunctuationCorrector - class << self - # source://rubocop//lib/rubocop/cop/correctors/punctuation_corrector.rb#12 - def add_space(corrector, token); end - - # source://rubocop//lib/rubocop/cop/correctors/punctuation_corrector.rb#8 - def remove_space(corrector, space_before); end - - # source://rubocop//lib/rubocop/cop/correctors/punctuation_corrector.rb#16 - def swap_comma(corrector, range); end - end -end - -# Methods that calculate and return Parser::Source::Ranges -# -# source://rubocop//lib/rubocop/cop/mixin/range_help.rb#6 -module RuboCop::Cop::RangeHelp - private - - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#152 - def add_range(range1, range2); end - - # A range containing the first to the last argument - # of a method call or method definition. - # def foo(a, b:) - # ^^^^^ - # bar(1, 2, 3, &blk) - # ^^^^^^^^^^^^^ - # baz { |x, y:, z:| } - # ^^^^^^^^^ - # - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#45 - def arguments_range(node); end - - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#93 - def column_offset_between(base_range, range); end - - # A range containing only the contents of a literal with delimiters (e.g. in - # `%i{1 2 3}` this will be the range covering `1 2 3` only). - # - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#33 - def contents_range(node); end - - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#111 - def directions(side); end - - # Returns the column attribute of the range, except if the range is on - # the first line and there's a byte order mark at the beginning of that - # line, in which case 1 is subtracted from the column value. This gives - # the column as it appears when viewing the file in an editor. - # - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#103 - def effective_column(range); end - - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#120 - def final_pos(src, pos, increment, continuations, newlines, whitespace); end - - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#128 - def move_pos(src, pos, step, condition, regexp); end - - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#134 - def move_pos_str(src, pos, step, condition, needle); end - - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#49 - def range_between(start_pos, end_pos); end - - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#84 - def range_by_whole_lines(range, include_final_newline: T.unsafe(nil), buffer: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#145 - def range_with_comments(node); end - - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#141 - def range_with_comments_and_lines(node); end - - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#53 - def range_with_surrounding_comma(range, side = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#67 - def range_with_surrounding_space(range_positional = T.unsafe(nil), range: T.unsafe(nil), side: T.unsafe(nil), newlines: T.unsafe(nil), whitespace: T.unsafe(nil), continuations: T.unsafe(nil), buffer: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#12 - def source_range(source_buffer, line_number, column, length = T.unsafe(nil)); end -end - -# The Unicode codepoint -# -# source://rubocop//lib/rubocop/cop/mixin/range_help.rb#7 -RuboCop::Cop::RangeHelp::BYTE_ORDER_MARK = T.let(T.unsafe(nil), Integer) - -# source://rubocop//lib/rubocop/cop/mixin/range_help.rb#8 -module RuboCop::Cop::RangeHelp::NOT_GIVEN; end - -# Common functionality for handling Rational literals. -# -# source://rubocop//lib/rubocop/cop/mixin/rational_literal.rb#6 -module RuboCop::Cop::RationalLiteral - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop//lib/rubocop/cop/mixin/rational_literal.rb#12 - def rational_literal?(param0 = T.unsafe(nil)); end -end - -# Registry that tracks all cops by their badge and department. -# -# source://rubocop//lib/rubocop/cop/registry.rb#19 -class RuboCop::Cop::Registry - include ::Enumerable - - # @return [Registry] a new instance of Registry - # - # source://rubocop//lib/rubocop/cop/registry.rb#51 - def initialize(cops = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/registry.rb#232 - def ==(other); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/registry.rb#97 - def contains_cop_matching?(names); end - - # source://rubocop//lib/rubocop/cop/registry.rb#179 - def cops; end - - # source://rubocop//lib/rubocop/cop/registry.rb#224 - def cops_for_department(department); end - - # @return [Boolean] Checks if given name is department - # - # source://rubocop//lib/rubocop/cop/registry.rb#93 - def department?(name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/registry.rb#147 - def department_missing?(badge, name); end - - # @return [Array] list of departments for current cops. - # - # source://rubocop//lib/rubocop/cop/registry.rb#72 - def departments; end - - # source://rubocop//lib/rubocop/cop/registry.rb#193 - def disabled(config); end - - # source://rubocop//lib/rubocop/cop/registry.rb#67 - def dismiss(cop); end - - # source://rubocop//lib/rubocop/cop/registry.rb#247 - def each(&block); end - - # source://rubocop//lib/rubocop/cop/registry.rb#189 - def enabled(config); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/registry.rb#197 - def enabled?(cop, config); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/registry.rb#213 - def enabled_pending_cop?(cop_cfg, config); end - - # source://rubocop//lib/rubocop/cop/registry.rb#63 - def enlist(cop); end - - # @param cop_name [String] - # @return [Class, nil] - # - # source://rubocop//lib/rubocop/cop/registry.rb#253 - def find_by_cop_name(cop_name); end - - # When a cop name is given returns a single-element array with the cop class. - # When a department name is given returns an array with all the cop classes - # for that department. - # - # source://rubocop//lib/rubocop/cop/registry.rb#260 - def find_cops_by_directive(directive); end - - # source://rubocop//lib/rubocop/cop/registry.rb#265 - def freeze; end - - # source://rubocop//lib/rubocop/cop/registry.rb#184 - def length; end - - # source://rubocop//lib/rubocop/cop/registry.rb#220 - def names; end - - # source://rubocop//lib/rubocop/cop/registry.rb#228 - def names_for_department(department); end - - # Returns the value of attribute options. - # - # source://rubocop//lib/rubocop/cop/registry.rb#49 - def options; end - - # source://rubocop//lib/rubocop/cop/registry.rb#151 - def print_warning(name, path); end - - # Convert a user provided cop name into a properly namespaced name - # - # @example gives back a correctly qualified cop name - # - # registry = RuboCop::Cop::Registry - # registry.qualified_cop_name('Layout/EndOfLine', '') # => 'Layout/EndOfLine' - # @example fixes incorrect namespaces - # - # registry = RuboCop::Cop::Registry - # registry.qualified_cop_name('Lint/EndOfLine', '') # => 'Layout/EndOfLine' - # @example namespaces bare cop identifiers - # - # registry = RuboCop::Cop::Registry - # registry.qualified_cop_name('EndOfLine', '') # => 'Layout/EndOfLine' - # @example passes back unrecognized cop names - # - # registry = RuboCop::Cop::Registry - # registry.qualified_cop_name('NotACop', '') # => 'NotACop' - # @note Emits a warning if the provided name has an incorrect namespace - # @param name [String] Cop name extracted from config - # @param path [String, nil] Path of file that `name` was extracted from - # @param warn [Boolean] Print a warning if no department given for `name` - # @raise [AmbiguousCopName] if a bare identifier with two possible namespaces is provided - # @return [String] Qualified cop name - # - # source://rubocop//lib/rubocop/cop/registry.rb#133 - def qualified_cop_name(name, path, warn: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/registry.rb#166 - def qualify_badge(badge); end - - # source://rubocop//lib/rubocop/cop/registry.rb#243 - def select(&block); end - - # source://rubocop//lib/rubocop/cop/registry.rb#236 - def sort!; end - - # @return [Hash{String => Array}] - # - # source://rubocop//lib/rubocop/cop/registry.rb#174 - def to_h; end - - # source://rubocop//lib/rubocop/cop/registry.rb#159 - def unqualified_cop_names; end - - # @return [Registry] Cops for that specific department. - # - # source://rubocop//lib/rubocop/cop/registry.rb#78 - def with_department(department); end - - # @return [Registry] Cops not for a specific department. - # - # source://rubocop//lib/rubocop/cop/registry.rb#84 - def without_department(department); end - - private - - # source://rubocop//lib/rubocop/cop/registry.rb#283 - def clear_enrollment_queue; end - - # source://rubocop//lib/rubocop/cop/registry.rb#279 - def initialize_copy(reg); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/registry.rb#309 - def registered?(badge); end - - # source://rubocop//lib/rubocop/cop/registry.rb#299 - def resolve_badge(given_badge, real_badge, source_path); end - - # source://rubocop//lib/rubocop/cop/registry.rb#295 - def with(cops); end - - class << self - # source://rubocop//lib/rubocop/cop/registry.rb#22 - def all; end - - # Returns the value of attribute global. - # - # source://rubocop//lib/rubocop/cop/registry.rb#274 - def global; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/registry.rb#44 - def qualified_cop?(name); end - - # source://rubocop//lib/rubocop/cop/registry.rb#26 - def qualified_cop_name(name, origin); end - - # source://rubocop//lib/rubocop/cop/registry.rb#40 - def reset!; end - - # Changes momentarily the global registry - # Intended for testing purposes - # - # source://rubocop//lib/rubocop/cop/registry.rb#32 - def with_temporary_global(temp_global = T.unsafe(nil)); end - end -end - -# Ensure a require statement is present for a standard library determined -# by variable library_name -# -# source://rubocop//lib/rubocop/cop/mixin/require_library.rb#7 -module RuboCop::Cop::RequireLibrary - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop//lib/rubocop/cop/mixin/require_library.rb#12 - def ensure_required(corrector, node, library_name); end - - # source://rubocop//lib/rubocop/cop/mixin/require_library.rb#33 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/mixin/require_library.rb#24 - def remove_subsequent_requires(corrector, node, library_name); end - - # source://rubocop//lib/rubocop/cop/mixin/require_library.rb#51 - def require_any_library?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/require_library.rb#56 - def require_library_name?(param0 = T.unsafe(nil), param1); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/require_library.rb#44 - def on_new_investigation; end -end - -# source://rubocop//lib/rubocop/cop/mixin/require_library.rb#10 -RuboCop::Cop::RequireLibrary::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# This class ensures a require statement is present for a standard library -# determined by the variable library_name -# -# source://rubocop//lib/rubocop/cop/correctors/require_library_corrector.rb#7 -class RuboCop::Cop::RequireLibraryCorrector - extend ::RuboCop::Cop::RangeHelp - - class << self - # source://rubocop//lib/rubocop/cop/correctors/require_library_corrector.rb#11 - def correct(corrector, node, library_name); end - - # source://rubocop//lib/rubocop/cop/correctors/require_library_corrector.rb#17 - def require_statement(library_name); end - end -end - -# Common functionality for checking `rescue` nodes. -# -# source://rubocop//lib/rubocop/cop/mixin/rescue_node.rb#6 -module RuboCop::Cop::RescueNode - # source://rubocop//lib/rubocop/cop/mixin/rescue_node.rb#7 - def modifier_locations; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/rescue_node.rb#13 - def rescue_modifier?(node); end - - # @deprecated Use ResbodyNode#exceptions instead - # - # source://rubocop//lib/rubocop/cop/mixin/rescue_node.rb#20 - def rescued_exceptions(resbody); end -end - -# Common functionality for safe assignment. By safe assignment we mean -# putting parentheses around an assignment to indicate "I know I'm using an -# assignment as a condition. It's not a mistake." -# -# source://rubocop//lib/rubocop/cop/mixin/safe_assignment.rb#8 -module RuboCop::Cop::SafeAssignment - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop//lib/rubocop/cop/mixin/safe_assignment.rb#14 - def empty_condition?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/safe_assignment.rb#20 - def safe_assignment?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/safe_assignment.rb#17 - def setter_method?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/safe_assignment.rb#22 - def safe_assignment_allowed?; end -end - -# source://rubocop//lib/rubocop/cop/security/compound_hash.rb#5 -module RuboCop::Cop::Security; end - -# Checks for implementations of the `hash` method which combine -# values using custom logic instead of delegating to `Array#hash`. -# -# Manually combining hashes is error prone and hard to follow, especially -# when there are many values. Poor implementations may also introduce -# performance or security concerns if they are prone to collisions. -# Delegating to `Array#hash` is clearer and safer, although it might be slower -# depending on the use case. -# -# @example -# -# # bad -# def hash -# @foo ^ @bar -# end -# -# # good -# def hash -# [@foo, @bar].hash -# end -# -# source://rubocop//lib/rubocop/cop/security/compound_hash.rb#30 -class RuboCop::Cop::Security::CompoundHash < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#59 - def bad_hash_combinator?(param0 = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#76 - def contained_in_hash_method?(node, &block); end - - # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#43 - def dynamic_hash_method_definition?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#38 - def hash_method_definition?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#64 - def monuple_hash?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#88 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#88 - def on_op_asgn(node); end - - # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#88 - def on_send(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#82 - def outer_bad_hash_combinator?(node); end - - # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#69 - def redundant_hash?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#52 - def static_hash_method_definition?(param0 = T.unsafe(nil)); end -end - -# source://rubocop//lib/rubocop/cop/security/compound_hash.rb#31 -RuboCop::Cop::Security::CompoundHash::COMBINATOR_IN_HASH_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/security/compound_hash.rb#32 -RuboCop::Cop::Security::CompoundHash::MONUPLE_HASH_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/security/compound_hash.rb#34 -RuboCop::Cop::Security::CompoundHash::REDUNDANT_HASH_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/security/compound_hash.rb#35 -RuboCop::Cop::Security::CompoundHash::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for the use of `Kernel#eval` and `Binding#eval`. -# -# @example -# -# # bad -# -# eval(something) -# binding.eval(something) -# -# source://rubocop//lib/rubocop/cop/security/eval.rb#14 -class RuboCop::Cop::Security::Eval < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/security/eval.rb#19 - def eval?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/security/eval.rb#23 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/security/eval.rb#15 -RuboCop::Cop::Security::Eval::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/security/eval.rb#16 -RuboCop::Cop::Security::Eval::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for the first argument to `IO.read`, `IO.binread`, `IO.write`, `IO.binwrite`, -# `IO.foreach`, and `IO.readlines`. -# -# If argument starts with a pipe character (`'|'`) and the receiver is the `IO` class, -# a subprocess is created in the same way as `Kernel#open`, and its output is returned. -# `Kernel#open` may allow unintentional command injection, which is the reason these -# `IO` methods are a security risk. -# Consider to use `File.read` to disable the behavior of subprocess invocation. -# -# @example -# -# # bad -# IO.read(path) -# IO.read('path') -# -# # good -# File.read(path) -# File.read('path') -# IO.read('| command') # Allow intentional command invocation. -# -# source://rubocop//lib/rubocop/cop/security/io_methods.rb#30 -class RuboCop::Cop::Security::IoMethods < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/security/io_methods.rb#36 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/security/io_methods.rb#33 -RuboCop::Cop::Security::IoMethods::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/security/io_methods.rb#34 -RuboCop::Cop::Security::IoMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for the use of JSON class methods which have potential -# security issues. -# -# @example -# # bad -# JSON.load("{}") -# JSON.restore("{}") -# -# # good -# JSON.parse("{}") -# -# source://rubocop//lib/rubocop/cop/security/json_load.rb#26 -class RuboCop::Cop::Security::JSONLoad < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/security/json_load.rb#33 - def json_load(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/security/json_load.rb#37 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/security/json_load.rb#29 -RuboCop::Cop::Security::JSONLoad::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/security/json_load.rb#30 -RuboCop::Cop::Security::JSONLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for the use of Marshal class methods which have -# potential security issues leading to remote code execution when -# loading from an untrusted source. -# -# @example -# # bad -# Marshal.load("{}") -# Marshal.restore("{}") -# -# # good -# Marshal.dump("{}") -# -# # okish - deep copy hack -# Marshal.load(Marshal.dump({})) -# -# source://rubocop//lib/rubocop/cop/security/marshal_load.rb#21 -class RuboCop::Cop::Security::MarshalLoad < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/security/marshal_load.rb#26 - def marshal_load(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/security/marshal_load.rb#31 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/security/marshal_load.rb#22 -RuboCop::Cop::Security::MarshalLoad::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/security/marshal_load.rb#23 -RuboCop::Cop::Security::MarshalLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for the use of `Kernel#open` and `URI.open` with dynamic -# data. -# -# `Kernel#open` and `URI.open` enable not only file access but also process -# invocation by prefixing a pipe symbol (e.g., `open("| ls")`). -# So, it may lead to a serious security risk by using variable input to -# the argument of `Kernel#open` and `URI.open`. It would be better to use -# `File.open`, `IO.popen` or `URI.parse#open` explicitly. -# -# NOTE: `open` and `URI.open` with literal strings are not flagged by this -# cop. -# -# @example -# # bad -# open(something) -# open("| #{something}") -# open("| foo") -# URI.open(something) -# -# # good -# File.open(something) -# IO.popen(something) -# URI.parse(something).open -# -# # good (literal strings) -# open("foo.text") -# URI.open("http://example.com") -# -# source://rubocop//lib/rubocop/cop/security/open.rb#37 -class RuboCop::Cop::Security::Open < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/security/open.rb#46 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/security/open.rb#42 - def open?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/security/open.rb#75 - def composite_string?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/security/open.rb#83 - def concatenated_string?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/security/open.rb#79 - def interpolated_string?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/security/open.rb#57 - def safe?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/security/open.rb#67 - def safe_argument?(argument); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/security/open.rb#71 - def simple_string?(node); end -end - -# source://rubocop//lib/rubocop/cop/security/open.rb#38 -RuboCop::Cop::Security::Open::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/security/open.rb#39 -RuboCop::Cop::Security::Open::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for the use of YAML class methods which have -# potential security issues leading to remote code execution when -# loading from an untrusted source. -# -# NOTE: Ruby 3.1+ (Psych 4) uses `Psych.load` as `Psych.safe_load` by default. -# -# @example -# # bad -# YAML.load("--- !ruby/object:Foo {}") # Psych 3 is unsafe by default -# -# # good -# YAML.safe_load("--- !ruby/object:Foo {}", [Foo]) # Ruby 2.5 (Psych 3) -# YAML.safe_load("--- !ruby/object:Foo {}", permitted_classes: [Foo]) # Ruby 3.0- (Psych 3) -# YAML.load("--- !ruby/object:Foo {}", permitted_classes: [Foo]) # Ruby 3.1+ (Psych 4) -# YAML.dump(foo) -# -# source://rubocop//lib/rubocop/cop/security/yaml_load.rb#26 -class RuboCop::Cop::Security::YAMLLoad < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/security/yaml_load.rb#40 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/security/yaml_load.rb#36 - def yaml_load(param0 = T.unsafe(nil)); end -end - -# source://rubocop//lib/rubocop/cop/security/yaml_load.rb#30 -RuboCop::Cop::Security::YAMLLoad::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/security/yaml_load.rb#31 -RuboCop::Cop::Security::YAMLLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Severity class is simple value object about severity -# -# source://rubocop//lib/rubocop/cop/severity.rb#6 -class RuboCop::Cop::Severity - include ::Comparable - - # @api private - # @raise [ArgumentError] - # @return [Severity] a new instance of Severity - # - # source://rubocop//lib/rubocop/cop/severity.rb#30 - def initialize(name_or_code); end - - # source://rubocop//lib/rubocop/cop/severity.rb#62 - def <=>(other); end - - # source://rubocop//lib/rubocop/cop/severity.rb#50 - def ==(other); end - - # source://rubocop//lib/rubocop/cop/severity.rb#42 - def code; end - - # source://rubocop//lib/rubocop/cop/severity.rb#58 - def hash; end - - # source://rubocop//lib/rubocop/cop/severity.rb#46 - def level; end - - # @api public - # @return [Symbol] severity. - # any of `:info`, `:refactor`, `:convention`, `:warning`, `:error` or `:fatal`. - # - # source://rubocop//lib/rubocop/cop/severity.rb#22 - def name; end - - # source://rubocop//lib/rubocop/cop/severity.rb#38 - def to_s; end - - class << self - # source://rubocop//lib/rubocop/cop/severity.rb#24 - def name_from_code(code); end - end -end - -# @api private -# -# source://rubocop//lib/rubocop/cop/severity.rb#12 -RuboCop::Cop::Severity::CODE_TABLE = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/severity.rb#9 -RuboCop::Cop::Severity::NAMES = T.let(T.unsafe(nil), Array) - -# Common functionality for cops checking for missing space after -# punctuation. -# -# source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#7 -module RuboCop::Cop::SpaceAfterPunctuation - # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#10 - def on_new_investigation; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#38 - def allowed_type?(token); end - - # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#20 - def each_missing_space(tokens); end - - # The normal offset, i.e., the distance from the punctuation - # token where a space should be, is 1. - # - # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#49 - def offset; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#42 - def space_forbidden_before_rcurly?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#30 - def space_missing?(token1, token2); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#34 - def space_required_before?(token); end -end - -# source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#8 -RuboCop::Cop::SpaceAfterPunctuation::MSG = T.let(T.unsafe(nil), String) - -# Common functionality for cops checking for space before -# punctuation. -# -# source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#7 -module RuboCop::Cop::SpaceBeforePunctuation - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#12 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#22 - def each_missing_space(tokens); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#34 - def space_missing?(token1, token2); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#38 - def space_required_after?(token); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#42 - def space_required_after_lcurly?; end -end - -# source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#10 -RuboCop::Cop::SpaceBeforePunctuation::MSG = T.let(T.unsafe(nil), String) - -# This autocorrects whitespace -# -# source://rubocop//lib/rubocop/cop/correctors/space_corrector.rb#6 -class RuboCop::Cop::SpaceCorrector - extend ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::SurroundingSpace - - class << self - # source://rubocop//lib/rubocop/cop/correctors/space_corrector.rb#36 - def add_space(processed_source, corrector, left_token, right_token); end - - # source://rubocop//lib/rubocop/cop/correctors/space_corrector.rb#12 - def empty_corrections(processed_source, corrector, empty_config, left_token, right_token); end - - # Returns the value of attribute processed_source. - # - # source://rubocop//lib/rubocop/cop/correctors/space_corrector.rb#10 - def processed_source; end - - # source://rubocop//lib/rubocop/cop/correctors/space_corrector.rb#24 - def remove_space(processed_source, corrector, left_token, right_token); end - end -end - -# Common functionality for modifier cops. -# -# source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#6 -module RuboCop::Cop::StatementModifier - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::LineLengthHelp - - private - - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#85 - def code_after(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#109 - def comment_disables_cop?(comment); end - - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#77 - def first_line_comment(node); end - - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#57 - def if_body_source(if_body); end - - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#43 - def length_in_modifier_form(node); end - - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#103 - def max_line_length; end - - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#71 - def method_source(if_body); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#37 - def modifier_fits_on_single_line?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#26 - def non_eligible_body?(body); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#33 - def non_eligible_condition?(condition); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#19 - def non_eligible_node?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#65 - def omitted_value_in_last_hash_arg?(if_body); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#91 - def parenthesize?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#11 - def single_line_as_modifier?(node); end - - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#50 - def to_modifier_form(node); end -end - -# Classes that include this module just implement functions to determine -# what is an offense and how to do autocorrection. They get help with -# adding offenses for the faulty string nodes, and with filtering out -# nodes. -# -# source://rubocop//lib/rubocop/cop/mixin/string_help.rb#9 -module RuboCop::Cop::StringHelp - # source://rubocop//lib/rubocop/cop/mixin/string_help.rb#26 - def on_regexp(node); end - - # source://rubocop//lib/rubocop/cop/mixin/string_help.rb#10 - def on_str(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/string_help.rb#32 - def inside_interpolation?(node); end -end - -# This autocorrects string literals -# -# source://rubocop//lib/rubocop/cop/correctors/string_literal_corrector.rb#6 -class RuboCop::Cop::StringLiteralCorrector - extend ::RuboCop::PathUtil - extend ::RuboCop::Cop::Util - - class << self - # source://rubocop//lib/rubocop/cop/correctors/string_literal_corrector.rb#10 - def correct(corrector, node, style); end - end -end - -# Common functionality for cops checking single/double quotes. -# -# source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#6 -module RuboCop::Cop::StringLiteralsHelp - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#24 - def enforce_double_quotes?; end - - # source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#20 - def preferred_string_literal; end - - # source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#28 - def string_literals_config; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#9 - def wrong_quotes?(src_or_node); end -end - -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#5 -module RuboCop::Cop::Style; end - -# Access modifiers should be declared to apply to a group of methods -# or inline before each method, depending on configuration. -# EnforcedStyle config covers only method definitions. -# Applications of visibility methods to symbols can be controlled -# using AllowModifiersOnSymbols config. -# Also, the visibility of `attr*` methods can be controlled using -# AllowModifiersOnAttrs config. -# -# In Ruby 3.0, `attr*` methods now return an array of defined method names -# as symbols. So we can write the modifier and `attr*` in inline style. -# AllowModifiersOnAttrs config allows `attr*` methods to be written in -# inline style without modifying applications that have been maintained -# for a long time in group style. Furthermore, developers who are not very -# familiar with Ruby may know that the modifier applies to `def`, but they -# may not know that it also applies to `attr*` methods. It would be easier -# to understand if we could write `attr*` methods in inline style. -# -# @example AllowModifiersOnAliasMethod: false -# # bad -# class Foo -# -# public alias_method :bar, :foo -# protected alias_method :baz, :foo -# private alias_method :qux, :foo -# -# end -# @example EnforcedStyle: inline -# # bad -# class Foo -# -# private -# -# def bar; end -# def baz; end -# -# end -# -# # good -# class Foo -# -# private def bar; end -# private def baz; end -# -# end -# @example AllowModifiersOnSymbols: true (default) -# # good -# class Foo -# -# private :bar, :baz -# private *%i[qux quux] -# private *METHOD_NAMES -# private *private_methods -# -# end -# @example AllowModifiersOnSymbols: false -# # bad -# class Foo -# -# private :bar, :baz -# private *%i[qux quux] -# private *METHOD_NAMES -# private *private_methods -# -# end -# @example AllowModifiersOnAttrs: true (default) -# # good -# class Foo -# -# public attr_reader :bar -# protected attr_writer :baz -# private attr_accessor :qux -# private attr :quux -# -# def public_method; end -# -# private -# -# def private_method; end -# -# end -# @example AllowModifiersOnAttrs: false -# # bad -# class Foo -# -# public attr_reader :bar -# protected attr_writer :baz -# private attr_accessor :qux -# private attr :quux -# -# end -# @example AllowModifiersOnAliasMethod: true (default) -# # good -# class Foo -# -# public alias_method :bar, :foo -# protected alias_method :baz, :foo -# private alias_method :qux, :foo -# -# end -# @example EnforcedStyle: group (default) -# # bad -# class Foo -# -# private def bar; end -# private def baz; end -# -# end -# -# # good -# class Foo -# -# private -# -# def bar; end -# def baz; end -# -# end -# -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#135 -class RuboCop::Cop::Style::AccessModifierDeclarations < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#167 - def access_modifier_with_alias_method?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#161 - def access_modifier_with_attr?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#154 - def access_modifier_with_symbol?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#172 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#247 - def access_modifier_is_inlined?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#251 - def access_modifier_is_not_inlined?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#222 - def allow_modifiers_on_alias_method?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#218 - def allow_modifiers_on_attrs?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#214 - def allow_modifiers_on_symbols?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#187 - def allowed?(node); end - - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#195 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#232 - def correctable_group_offense?(node); end - - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#334 - def def_source(node, def_nodes); end - - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#294 - def find_argument_less_modifier_node(node); end - - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#275 - def find_corresponding_def_nodes(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#239 - def group_style?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#243 - def inline_style?; end - - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#324 - def insert_inline_modifier(corrector, node, modifier_name); end - - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#265 - def message(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#226 - def offense?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#210 - def percent_symbol_array?(node); end - - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#328 - def remove_nodes(corrector, *nodes); end - - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#308 - def replace_defs(corrector, node, def_nodes); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#255 - def right_siblings_same_inline_method?(node); end - - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#302 - def select_grouped_def_nodes(node); end -end - -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#141 -RuboCop::Cop::Style::AccessModifierDeclarations::GROUP_STYLE_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#146 -RuboCop::Cop::Style::AccessModifierDeclarations::INLINE_STYLE_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#151 -RuboCop::Cop::Style::AccessModifierDeclarations::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for grouping of accessors in `class` and `module` bodies. -# By default it enforces accessors to be placed in grouped declarations, -# but it can be configured to enforce separating them in multiple declarations. -# -# NOTE: If there is a method call before the accessor method it is always allowed -# as it might be intended like Sorbet. -# -# NOTE: If there is a RBS::Inline annotation comment just after the accessor method -# it is always allowed. -# -# @example EnforcedStyle: grouped (default) -# # bad -# class Foo -# attr_reader :bar -# attr_reader :bax -# attr_reader :baz -# end -# -# # good -# class Foo -# attr_reader :bar, :bax, :baz -# end -# -# # good -# class Foo -# # may be intended comment for bar. -# attr_reader :bar -# -# sig { returns(String) } -# attr_reader :bax -# -# may_be_intended_annotation :baz -# attr_reader :baz -# end -# @example EnforcedStyle: separated -# # bad -# class Foo -# attr_reader :bar, :baz -# end -# -# # good -# class Foo -# attr_reader :bar -# attr_reader :baz -# end -# -# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#53 -class RuboCop::Cop::Style::AccessorGrouping < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::VisibilityHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#62 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#62 - def on_module(node); end - - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#62 - def on_sclass(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#85 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#74 - def check(send_node); end - - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#122 - def class_send_elements(class_node); end - - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#179 - def group_accessors(node, accessors); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#99 - def groupable_accessor?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#142 - def groupable_sibling_accessor?(node, sibling); end - - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#149 - def groupable_sibling_accessors(send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#134 - def grouped_style?; end - - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#155 - def message(send_node); end - - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#160 - def preferred_accessors(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#94 - def previous_line_comment?(node); end - - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#185 - def separate_accessors(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#138 - def separated_style?; end - - # Group after constants - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#174 - def skip_for_grouping?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#59 -RuboCop::Cop::Style::AccessorGrouping::GROUPED_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#60 -RuboCop::Cop::Style::AccessorGrouping::SEPARATED_MSG = T.let(T.unsafe(nil), String) - -# Enforces the use of either `#alias` or `#alias_method` -# depending on configuration. -# It also flags uses of `alias :symbol` rather than `alias bareword`. -# -# However, it will always enforce `method_alias` when used `alias` -# in an instance method definition and in a singleton method definition. -# If used in a block, always enforce `alias_method` -# unless it is an `instance_eval` block. -# -# @example EnforcedStyle: prefer_alias (default) -# # bad -# alias_method :bar, :foo -# alias :bar :foo -# -# # good -# alias bar foo -# @example EnforcedStyle: prefer_alias_method -# # bad -# alias :bar :foo -# alias bar foo -# -# # good -# alias_method :bar, :foo -# -# source://rubocop//lib/rubocop/cop/style/alias.rb#31 -class RuboCop::Cop::Style::Alias < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/alias.rb#52 - def on_alias(node); end - - # source://rubocop//lib/rubocop/cop/style/alias.rb#41 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/alias.rb#86 - def add_offense_for_args(node, &block); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/alias.rb#76 - def alias_keyword_possible?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/alias.rb#80 - def alias_method_possible?(node); end - - # source://rubocop//lib/rubocop/cop/style/alias.rb#66 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/alias.rb#125 - def bareword?(sym_node); end - - # source://rubocop//lib/rubocop/cop/style/alias.rb#129 - def correct_alias_method_to_alias(corrector, send_node); end - - # source://rubocop//lib/rubocop/cop/style/alias.rb#136 - def correct_alias_to_alias_method(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/alias.rb#143 - def correct_alias_with_symbol_args(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/alias.rb#148 - def identifier(node); end - - # source://rubocop//lib/rubocop/cop/style/alias.rb#114 - def lexical_scope_type(node); end - - # In this expression, will `self` be the same as the innermost enclosing - # class or module block (:lexical)? Or will it be something else - # (:dynamic)? If we're in an instance_eval block, return that. - # - # source://rubocop//lib/rubocop/cop/style/alias.rb#97 - def scope_type(node); end -end - -# source://rubocop//lib/rubocop/cop/style/alias.rb#35 -RuboCop::Cop::Style::Alias::MSG_ALIAS = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/alias.rb#36 -RuboCop::Cop::Style::Alias::MSG_ALIAS_METHOD = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/alias.rb#37 -RuboCop::Cop::Style::Alias::MSG_SYMBOL_ARGS = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/alias.rb#39 -RuboCop::Cop::Style::Alias::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Looks for endless methods inside operations of lower precedence (`and`, `or`, and -# modifier forms of `if`, `unless`, `while`, `until`) that are ambiguous due to -# lack of parentheses. This may lead to unexpected behavior as the code may appear -# to use these keywords as part of the method but in fact they modify -# the method definition itself. -# -# In these cases, using a normal method definition is more clear. -# -# @example -# -# # bad -# def foo = true if bar -# -# # good - using a non-endless method is more explicit -# def foo -# true -# end if bar -# -# # ok - method body is explicit -# def foo = (true if bar) -# -# # ok - method definition is explicit -# (def foo = true) if bar -# -# source://rubocop//lib/rubocop/cop/style/ambiguous_endless_method_definition.rb#29 -class RuboCop::Cop::Style::AmbiguousEndlessMethodDefinition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::EndlessMethodRewriter - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::TargetRubyVersion - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/ambiguous_endless_method_definition.rb#40 - def ambiguous_endless_method_body(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/ambiguous_endless_method_definition.rb#48 - def on_def(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/ambiguous_endless_method_definition.rb#69 - def keyword(operation); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ambiguous_endless_method_definition.rb#63 - def modifier_form?(operation); end -end - -# source://rubocop//lib/rubocop/cop/style/ambiguous_endless_method_definition.rb#37 -RuboCop::Cop::Style::AmbiguousEndlessMethodDefinition::MSG = T.let(T.unsafe(nil), String) - -# Checks for uses of `and` and `or`, and suggests using `&&` and -# `||` instead. It can be configured to check only in conditions or in -# all contexts. -# -# @example EnforcedStyle: conditionals (default) -# # bad -# if foo and bar -# end -# -# # good -# foo.save && return -# -# # good -# foo.save and return -# -# # good -# if foo && bar -# end -# @example EnforcedStyle: always -# # bad -# foo.save and return -# -# # bad -# if foo and bar -# end -# -# # good -# foo.save && return -# -# # good -# if foo && bar -# end -# -# source://rubocop//lib/rubocop/cop/style/and_or.rb#44 -class RuboCop::Cop::Style::AndOr < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/and_or.rb#51 - def on_and(node); end - - # source://rubocop//lib/rubocop/cop/style/and_or.rb#56 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/style/and_or.rb#51 - def on_or(node); end - - # source://rubocop//lib/rubocop/cop/style/and_or.rb#56 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/style/and_or.rb#56 - def on_until_post(node); end - - # source://rubocop//lib/rubocop/cop/style/and_or.rb#56 - def on_while(node); end - - # source://rubocop//lib/rubocop/cop/style/and_or.rb#56 - def on_while_post(node); end - - private - - # ! is a special case: - # 'x and !obj.method arg' can be autocorrected if we - # recurse down a level and add parens to 'obj.method arg' - # however, 'not x' also parses as (send x :!) - # - # source://rubocop//lib/rubocop/cop/style/and_or.rb#117 - def correct_not(node, receiver, corrector); end - - # source://rubocop//lib/rubocop/cop/style/and_or.rb#129 - def correct_other(node, corrector); end - - # source://rubocop//lib/rubocop/cop/style/and_or.rb#95 - def correct_send(node, corrector); end - - # source://rubocop//lib/rubocop/cop/style/and_or.rb#108 - def correct_setter(node, corrector); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/and_or.rb#143 - def correctable_send?(node); end - - # source://rubocop//lib/rubocop/cop/style/and_or.rb#135 - def keep_operator_precedence(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/and_or.rb#91 - def message(node); end - - # source://rubocop//lib/rubocop/cop/style/and_or.rb#85 - def on_conditionals(node); end - - # source://rubocop//lib/rubocop/cop/style/and_or.rb#66 - def process_logical_operator(node); end - - # source://rubocop//lib/rubocop/cop/style/and_or.rb#147 - def whitespace_before_arg(node); end -end - -# source://rubocop//lib/rubocop/cop/style/and_or.rb#49 -RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) - -# In Ruby 2.7, arguments forwarding has been added. -# -# This cop identifies places where `do_something(*args, &block)` -# can be replaced by `do_something(...)`. -# -# In Ruby 3.1, anonymous block forwarding has been added. -# -# This cop identifies places where `do_something(&block)` can be replaced -# by `do_something(&)`; if desired, this functionality can be disabled -# by setting `UseAnonymousForwarding: false`. -# -# 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. -# -# This cop handles not only method forwarding but also forwarding to `super`. -# -# [NOTE] -# ==== -# Because of a bug in Ruby 3.3.0, when a block is referenced inside of another block, -# no offense will be registered until Ruby 3.4: -# -# [source,ruby] -# ---- -# def foo(&block) -# # Using an anonymous block would be a syntax error on Ruby 3.3.0 -# block_method { bar(&block) } -# end -# ---- -# ==== -# -# @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) -# args_only(*args) -# kwargs_only(**kwargs) -# block_only(&block) -# end -# -# # good -# def foo(*, **, &) -# args_only(*) -# kwargs_only(**) -# block_only(&) -# end -# @example UseAnonymousForwarding: false (only relevant for Ruby >= 3.2) -# # good -# def foo(*args, **kwargs, &block) -# args_only(*args) -# kwargs_only(**kwargs) -# block_only(&block) -# end -# @example AllowOnlyRestArgument: true (default, only relevant for Ruby < 3.2) -# # good -# def foo(*args) -# bar(*args) -# end -# -# def foo(**kwargs) -# bar(**kwargs) -# end -# @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. -# def foo(*args) -# bar(*args) -# end -# -# 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 -# -# # 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#141 -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#160 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#160 - def on_defs(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#202 - def add_forward_all_offenses(node, send_classifications, forwardable_args); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#385 - def add_parens_if_missing(node, corrector); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#227 - def add_post_ruby_32_offenses(def_node, send_classifications, forwardable_args); end - - # Checks if forwarding is uses both in blocks and outside of blocks. - # On Ruby 3.3.0, anonymous block forwarding in blocks can be is a syntax - # error, so we only want to register an offense if we can change all occurrences. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#309 - def all_forwarding_offenses_correctable?(send_classifications); end - - # Ruby 3.3.0 had a bug where accessing an anonymous block argument inside of a block - # was a syntax error in unambiguous cases: https://bugs.ruby-lang.org/issues/20090 - # We disallow this also for earlier Ruby versions so that code is forwards compatible. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#320 - def allow_anonymous_forwarding_in_block?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#377 - def allow_only_rest_arguments?; end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#365 - def arguments_range(node, first_node); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#277 - def classification_and_forwards(def_node, send_node, referenced_lvars, forwardable_args); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#262 - def classify_send_nodes(def_node, send_nodes, referenced_lvars, forwardable_args); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#561 - def explicit_block_name?; end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#184 - def extract_forwardable_args(args); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#252 - def non_splat_or_block_pass_lvar_references(body); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#196 - def only_forwards_all?(send_classifications); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#188 - def redundant_forwardable_named_args(restarg, kwrestarg, blockarg); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#296 - def redundant_named_arg(arg, config_name, keyword); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#354 - def register_forward_all_offense(def_or_send, send_or_arguments, rest_or_splat); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#327 - def register_forward_args_offense(def_arguments_or_send, rest_arg_or_splat); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#343 - def register_forward_block_arg_offense(add_parens, def_arguments_or_send, block_arg); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#335 - 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#381 - def use_anonymous_forwarding?; end - - class << self - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#156 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#149 -RuboCop::Cop::Style::ArgumentsForwarding::ADDITIONAL_ARG_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#152 -RuboCop::Cop::Style::ArgumentsForwarding::ARGS_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#154 -RuboCop::Cop::Style::ArgumentsForwarding::BLOCK_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#148 -RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_LVAR_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#151 -RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#153 -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#393 -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#422 - def initialize(def_node, send_node, referenced_lvars, forwardable_args, **config); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#450 - def classification; end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#406 - def def_all_anonymous_args?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#400 - def extract_forwarded_kwrest_arg(param0 = T.unsafe(nil), param1); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#444 - def forwarded_block_arg; end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#403 - def forwarded_block_arg?(param0 = T.unsafe(nil), param1); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#438 - def forwarded_kwrest_arg; end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#432 - def forwarded_rest_arg; end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#397 - def forwarded_rest_arg?(param0 = T.unsafe(nil), param1); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#415 - def send_all_anonymous_args?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#532 - def additional_kwargs?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#528 - def additional_kwargs_or_forwarded_kwargs?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#542 - def allow_offense_for_no_block?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#513 - def any_arg_referenced?; end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#497 - def arguments; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#465 - def can_forward_all?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#536 - def forward_additional_kwargs?; end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#493 - def forwarded_rest_and_kwrest_args; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#555 - def missing_rest_arg_or_kwrest_arg?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#546 - def no_additional_args?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#521 - def no_post_splat_args?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#489 - def offensive_block_forwarding?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#509 - def referenced_block_arg?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#505 - def referenced_kwrest_arg?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#501 - def referenced_rest_arg?; end - - # def foo(a = 41, ...) is a syntax error in 3.0. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#477 - def ruby_30_or_lower_optarg?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#481 - def ruby_32_only_anonymous_forwarding?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#485 - def ruby_32_or_higher_missing_rest_or_kwest?; end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#517 - def target_ruby_version; end -end - -# Enforces the use of `Array()` instead of explicit `Array` check or `[*var]`. -# -# The cop is disabled by default due to safety concerns. -# -# @example -# # bad -# paths = [paths] unless paths.is_a?(Array) -# paths.each { |path| do_something(path) } -# -# # bad (always creates a new Array instance) -# [*paths].each { |path| do_something(path) } -# -# # good (and a bit more readable) -# Array(paths).each { |path| do_something(path) } -# -# source://rubocop//lib/rubocop/cop/style/array_coercion.rb#41 -class RuboCop::Cop::Style::ArrayCoercion < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/array_coercion.rb#48 - def array_splat?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/array_coercion.rb#63 - def on_array(node); end - - # source://rubocop//lib/rubocop/cop/style/array_coercion.rb#74 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/style/array_coercion.rb#53 - def unless_array?(param0 = T.unsafe(nil)); end -end - -# source://rubocop//lib/rubocop/cop/style/array_coercion.rb#45 -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_csend(node); end - - # 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#74 - def brace_method?(node); end - - # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#61 - def find_offense_range(node); end - - # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#69 - def innermost_braces_node(node); end - - # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#56 - def preferred_value(node, value); 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?` -# can be replaced by `array1.intersect?(array2)`. -# -# 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? -# (array1 & array2).empty? -# (array1 & array2).none? -# -# # good -# array1.intersect?(array2) -# !array1.intersect?(array2) -# @example AllCops:ActiveSupportExtensionsEnabled: false (default) -# # good -# (array1 & array2).present? -# (array1 & array2).blank? -# @example AllCops:ActiveSupportExtensionsEnabled: true -# # bad -# (array1 & array2).present? -# (array1 & array2).blank? -# -# # good -# array1.intersect?(array2) -# !array1.intersect?(array2) -# -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#50 -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#66 - def active_support_bad_intersection_check?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#80 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#57 - def regular_bad_intersection_check?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#95 - def bad_intersection_check?(node); end - - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#107 - def message(receiver, argument, method_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#103 - def straight?(method_name); end -end - -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#74 -RuboCop::Cop::Style::ArrayIntersect::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#77 -RuboCop::Cop::Style::ArrayIntersect::NEGATED_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#78 -RuboCop::Cop::Style::ArrayIntersect::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#76 -RuboCop::Cop::Style::ArrayIntersect::STRAIGHT_METHODS = T.let(T.unsafe(nil), Array) - -# Checks for uses of "*" as a substitute for _join_. -# -# Not all cases can reliably checked, due to Ruby's dynamic -# types, so we consider only cases when the first argument is an -# array literal or the second is a string literal. -# -# @example -# -# # bad -# %w(foo bar baz) * "," -# -# # good -# %w(foo bar baz).join(",") -# -# source://rubocop//lib/rubocop/cop/style/array_join.rb#20 -class RuboCop::Cop::Style::ArrayJoin < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/array_join.rb#27 - def join_candidate?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/array_join.rb#29 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/style/array_join.rb#23 -RuboCop::Cop::Style::ArrayJoin::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/array_join.rb#24 -RuboCop::Cop::Style::ArrayJoin::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#16 -class RuboCop::Cop::Style::AsciiComments < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#21 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#51 - def allowed_non_ascii_chars; end - - # source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#42 - def first_non_ascii_chars(string); end - - # source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#32 - def first_offense_range(comment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#46 - def only_allowed_non_ascii_chars?(string); end -end - -# source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#19 -RuboCop::Cop::Style::AsciiComments::MSG = T.let(T.unsafe(nil), String) - -# Checks for uses of Module#attr. -# -# @example -# # bad - creates a single attribute accessor (deprecated in Ruby 1.9) -# attr :something, true -# attr :one, :two, :three # behaves as attr_reader -# -# # good -# attr_accessor :something -# attr_reader :one, :two, :three -# -# source://rubocop//lib/rubocop/cop/style/attr.rb#17 -class RuboCop::Cop::Style::Attr < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # 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 - def on_send(node); end - - 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 - - # @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#63 - def replacement_method(node); end -end - -# source://rubocop//lib/rubocop/cop/style/attr.rb#21 -RuboCop::Cop::Style::Attr::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/attr.rb#22 -RuboCop::Cop::Style::Attr::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for cases when you could use a block -# accepting version of a method that does automatic -# resource cleanup. -# -# @example -# -# # bad -# f = File.open('file') -# -# # good -# File.open('file') do |f| -# # ... -# end -# -# # 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#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#46 - def cleanup?(node); end -end - -# 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#29 -RuboCop::Cop::Style::AutoResourceCleanup::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks if usage of %() or %Q() matches configuration. -# -# @example EnforcedStyle: bare_percent (default) -# # bad -# %Q(He said: "#{greeting}") -# %q{She said: 'Hi'} -# -# # good -# %(He said: "#{greeting}") -# %{She said: 'Hi'} -# @example EnforcedStyle: percent_q -# # bad -# %|He said: "#{greeting}"| -# %/She said: 'Hi'/ -# -# # good -# %Q|He said: "#{greeting}"| -# %q/She said: 'Hi'/ -# -# source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#26 -class RuboCop::Cop::Style::BarePercentLiterals < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#32 - def on_dstr(node); end - - # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#36 - def on_str(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#63 - def add_offense_for_wrong_style(node, good, bad); end - - # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#42 - def check(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#59 - def requires_bare_percent?(source); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#55 - def requires_percent_q?(source); end -end - -# source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#30 -RuboCop::Cop::Style::BarePercentLiterals::MSG = T.let(T.unsafe(nil), String) - -# Checks for BEGIN blocks. -# -# @example -# # bad -# BEGIN { test } -# -# 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#15 - def on_preexe(node); end -end - -# 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` -# for the same method can be combined into single `attr_accessor`. -# -# @example -# # bad -# class Foo -# attr_reader :bar -# attr_writer :bar -# end -# -# # good -# class Foo -# attr_accessor :bar -# end -# -# source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#21 -class RuboCop::Cop::Style::BisectedAttrAccessor < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # Each offending macro is captured and registered in `on_class` but correction - # happens in `after_class` because a macro might have multiple attributes - # rewritten from it - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#55 - def after_class(class_node); end - - # Each offending macro is captured and registered in `on_class` but correction - # happens in `after_class` because a macro might have multiple attributes - # rewritten from it - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#55 - def after_module(class_node); end - - # Each offending macro is captured and registered in `on_class` but correction - # happens in `after_class` because a macro might have multiple attributes - # rewritten from it - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#55 - def after_sclass(class_node); end - - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#33 - def on_class(class_node); end - - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#33 - def on_module(class_node); end - - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#29 - def on_new_investigation; end - - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#33 - def on_sclass(class_node); end - - private - - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#102 - def correct_reader(corrector, macro, node, range); end - - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#114 - def correct_writer(corrector, macro, node, range); end - - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#91 - def find_bisection(macros); end - - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#74 - def find_macros(class_def); end - - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#98 - def register_offense(attr); end -end - -# source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#27 -RuboCop::Cop::Style::BisectedAttrAccessor::MSG = T.let(T.unsafe(nil), String) - -# Representation of an `attr_reader`, `attr_writer` or `attr` macro -# for use by `Style/BisectedAttrAccessor`. -# -# @api private -# -# source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#10 -class RuboCop::Cop::Style::BisectedAttrAccessor::Macro - include ::RuboCop::Cop::VisibilityHelp - - # @api private - # @return [Macro] a new instance of Macro - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#19 - def initialize(node); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#49 - def all_bisected?; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#29 - def attr_names; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#13 - def attrs; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#25 - def bisect(*names); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#33 - def bisected_names; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#13 - def bisection; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#13 - def node; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#41 - def reader?; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#53 - def rest; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#37 - def visibility; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#45 - def writer?; end - - class << self - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#15 - def macro?(node); end - end -end - -# Prefer bitwise predicate methods over direct comparison operations. -# -# @example -# -# # bad - checks any set bits -# (variable & flags).positive? -# -# # good -# variable.anybits?(flags) -# -# # bad - checks all set bits -# (variable & flags) == flags -# -# # good -# variable.allbits?(flags) -# -# # bad - checks no set bits -# (variable & flags).zero? -# -# # good -# variable.nobits?(flags) -# -# source://rubocop//lib/rubocop/cop/style/bitwise_predicate.rb#32 -class RuboCop::Cop::Style::BitwisePredicate < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/bitwise_predicate.rb#52 - def allbits?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/bitwise_predicate.rb#42 - def anybits?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/bitwise_predicate.rb#68 - def bit_operation?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/bitwise_predicate.rb#60 - def nobits?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/bitwise_predicate.rb#73 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/bitwise_predicate.rb#88 - def preferred_method(node); end -end - -# source://rubocop//lib/rubocop/cop/style/bitwise_predicate.rb#36 -RuboCop::Cop::Style::BitwisePredicate::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/bitwise_predicate.rb#37 -RuboCop::Cop::Style::BitwisePredicate::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Looks for uses of block comments (=begin...=end). -# -# @example -# # bad -# =begin -# Multiple lines -# of comments... -# =end -# -# # good -# # Multiple lines -# # of comments... -# -# source://rubocop//lib/rubocop/cop/style/block_comments.rb#19 -class RuboCop::Cop::Style::BlockComments < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/block_comments.rb#27 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/style/block_comments.rb#56 - def eq_end_part(comment, expr); end - - # source://rubocop//lib/rubocop/cop/style/block_comments.rb#48 - def parts(comment); end -end - -# source://rubocop//lib/rubocop/cop/style/block_comments.rb#24 -RuboCop::Cop::Style::BlockComments::BEGIN_LENGTH = T.let(T.unsafe(nil), Integer) - -# source://rubocop//lib/rubocop/cop/style/block_comments.rb#25 -RuboCop::Cop::Style::BlockComments::END_LENGTH = T.let(T.unsafe(nil), Integer) - -# source://rubocop//lib/rubocop/cop/style/block_comments.rb#23 -RuboCop::Cop::Style::BlockComments::MSG = T.let(T.unsafe(nil), String) - -# Check for uses of braces or do/end around single line or -# multi-line blocks. -# -# Methods that can be either procedural or functional and cannot be -# categorised from their usage alone is ignored. -# `lambda`, `proc`, and `it` are their defaults. -# Additional methods can be added to the `AllowedMethods`. -# -# @example AllowedPatterns: ['map'] -# -# # good -# things.map { |thing| -# something = thing.some_method -# process(something) -# } -# @example EnforcedStyle: semantic -# # Prefer `do...end` over `{...}` for procedural blocks. -# -# # return value is used/assigned -# # bad -# foo = map do |x| -# x -# end -# puts (map do |x| -# x -# end) -# -# # return value is not used out of scope -# # good -# map do |x| -# x -# end -# -# # Prefer `{...}` over `do...end` for functional blocks. -# -# # return value is not used out of scope -# # bad -# each { |x| -# x -# } -# -# # return value is used/assigned -# # good -# foo = map { |x| -# x -# } -# map { |x| -# x -# }.inspect -# -# # The AllowBracesOnProceduralOneLiners option is allowed unless the -# # EnforcedStyle is set to `semantic`. If so: -# -# # If the AllowBracesOnProceduralOneLiners option is unspecified, or -# # set to `false` or any other falsey value, then semantic purity is -# # maintained, so one-line procedural blocks must use do-end, not -# # braces. -# -# # bad -# collection.each { |element| puts element } -# -# # good -# collection.each do |element| puts element end -# -# # If the AllowBracesOnProceduralOneLiners option is set to `true`, or -# # any other truthy value, then one-line procedural blocks may use -# # either style. (There is no setting for requiring braces on them.) -# -# # good -# collection.each { |element| puts element } -# -# # also good -# collection.each do |element| puts element end -# @example EnforcedStyle: braces_for_chaining -# # bad -# words.each do |word| -# word.flip.flop -# end.join("-") -# -# # good -# words.each { |word| -# word.flip.flop -# }.join("-") -# @example EnforcedStyle: always_braces -# # bad -# words.each do |word| -# word.flip.flop -# end -# -# # good -# words.each { |word| -# word.flip.flop -# } -# @example BracesRequiredMethods: ['sig'] -# -# # Methods listed in the BracesRequiredMethods list, such as 'sig' -# # in this example, will require `{...}` braces. This option takes -# # precedence over all other configurations except AllowedMethods. -# -# # bad -# sig do -# params( -# foo: string, -# ).void -# end -# def bar(foo) -# puts foo -# end -# -# # good -# sig { -# params( -# foo: string, -# ).void -# } -# def bar(foo) -# puts foo -# end -# @example AllowedMethods: ['lambda', 'proc', 'it' ] (default) -# -# # good -# foo = lambda do |x| -# puts "Hello, #{x}" -# end -# -# foo = lambda do |x| -# x * 100 -# end -# @example AllowedPatterns: [] (default) -# -# # bad -# things.map { |thing| -# something = thing.some_method -# process(something) -# } -# @example EnforcedStyle: line_count_based (default) -# # bad - single line block -# items.each do |item| item / 5 end -# -# # good - single line block -# items.each { |item| item / 5 } -# -# # bad - multi-line block -# things.map { |thing| -# something = thing.some_method -# process(something) -# } -# -# # good - multi-line block -# things.map do |thing| -# something = thing.some_method -# process(something) -# end -# -# source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#168 -class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#200 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#183 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#200 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#183 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#483 - def array_or_range?(node); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#214 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#487 - def begin_required?(block_node); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#242 - def braces_for_chaining_message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#428 - def braces_for_chaining_style?(node); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#254 - def braces_required_message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#405 - def braces_required_method?(method_name); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#409 - def braces_required_methods; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#438 - def braces_style?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#442 - def correction_would_break_code?(node); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#330 - def end_of_chain(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#452 - def functional_block?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#448 - def functional_method?(method_name); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#348 - def get_blocks(node, &block); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#413 - def line_count_based_block_style?(node); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#224 - def line_count_based_message(node); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#258 - def message(node); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#306 - def move_comment_before_block(corrector, comment, block_node, closing_brace); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#460 - def procedural_method?(method_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#456 - def procedural_oneliners_may_have_braces?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#373 - def proper_block_style?(node); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#337 - def remove_trailing_whitespace(corrector, range, comment); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#269 - def replace_braces_with_do_end(corrector, loc); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#285 - def replace_do_end_with_braces(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#385 - def require_do_end?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#476 - def return_value_of_scope?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#464 - def return_value_used?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#417 - def semantic_block_style?(node); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#232 - def semantic_message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#493 - def single_argument_operator_method?(node); end - - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#320 - def source_range_before_comment(range, comment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#392 - def special_method?(method_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#398 - def special_method_proper_block_style?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#302 - def whitespace_after?(range, length = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#298 - def whitespace_before?(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#343 - def with_block?(node); end - - class << self - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#179 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#175 -RuboCop::Cop::Style::BlockDelimiters::ALWAYS_BRACES_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#177 -RuboCop::Cop::Style::BlockDelimiters::BRACES_REQUIRED_MESSAGE = T.let(T.unsafe(nil), String) - -# Corrector to correct conditional assignment in `case` statements. -# -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#604 -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#609 - def correct(corrector, cop, node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#619 - def move_assignment_inside_condition(corrector, node); end - - private - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#639 - def extract_branches(case_node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#633 - def extract_tail_branches(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#649 - def move_branch_inside_condition(corrector, branch, condition, assignment, column); end - end -end - -# If `AllowOnSelfClass` option is enabled, the cop will ignore violations when the receiver of -# the case equality operator is `self.class`. Note intermediate variables are not accepted. -# -# @example -# # bad -# (1..100) === 7 -# /something/ === some_string -# -# # good -# something.is_a?(Array) -# (1..100).include?(7) -# /something/.match?(some_string) -# @example AllowOnConstant: false (default) -# # bad -# Array === something -# @example AllowOnConstant: true -# # good -# Array === something -# @example AllowOnSelfClass: false (default) -# # bad -# self.class === something -# @example AllowOnSelfClass: true -# # good -# self.class === something -# -# source://rubocop//lib/rubocop/cop/style/case_equality.rb#40 -class RuboCop::Cop::Style::CaseEquality < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/case_equality.rb#47 - def case_equality?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/case_equality.rb#52 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/case_equality.rb#50 - def self_class?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/case_equality.rb#90 - def begin_replacement(lhs, rhs); end - - # source://rubocop//lib/rubocop/cop/style/case_equality.rb#96 - def const_replacement(lhs, rhs); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/case_equality.rb#65 - def offending_receiver?(node); end - - # source://rubocop//lib/rubocop/cop/style/case_equality.rb#72 - def replacement(lhs, rhs); end - - # source://rubocop//lib/rubocop/cop/style/case_equality.rb#100 - def send_replacement(lhs, rhs); end -end - -# source://rubocop//lib/rubocop/cop/style/case_equality.rb#43 -RuboCop::Cop::Style::CaseEquality::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/case_equality.rb#44 -RuboCop::Cop::Style::CaseEquality::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Identifies places where `if-elsif` constructions -# can be replaced with `case-when`. -# -# @example MinBranchesCount: 3 (default) -# # bad -# if status == :active -# perform_action -# elsif status == :inactive || status == :hibernating -# check_timeout -# elsif status == :invalid -# report_invalid -# else -# final_action -# end -# -# # good -# case status -# when :active -# perform_action -# when :inactive, :hibernating -# check_timeout -# when :invalid -# report_invalid -# else -# final_action -# end -# @example MinBranchesCount: 4 -# # good -# if status == :active -# perform_action -# elsif status == :inactive || status == :hibernating -# check_timeout -# elsif status == :invalid -# report_invalid -# else -# final_action -# end -# -# source://rubocop//lib/rubocop/cop/style/case_like_if.rb#50 -class RuboCop::Cop::Style::CaseLikeIf < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::MinBranchesCount - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#57 - def on_if(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#81 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#228 - def branch_conditions(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#246 - def class_reference?(node); end - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#166 - def collect_conditions(node, target, conditions); end - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#217 - def condition_from_binary_op(lhs, rhs, target); end - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#201 - def condition_from_equality_node(node, target); end - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#210 - def condition_from_include_or_cover_node(node, target); end - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#206 - def condition_from_match_node(node, target); end - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#185 - def condition_from_send_node(node, target); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#237 - def const_reference?(node); end - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#255 - def correction_range(node); end - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#250 - def deparenthesize(node); end - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#102 - def find_target(node); end - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#136 - def find_target_in_equality_node(node); end - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#148 - def find_target_in_include_or_cover_node(node); end - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#154 - def find_target_in_match_node(node); end - - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#121 - def find_target_in_send_node(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#271 - def regexp_with_named_captures?(node); end - - # Named captures work with `=~` (if regexp is on lhs) and with `match` (both sides) - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#260 - def regexp_with_working_captures?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#96 - def should_check?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/case_like_if.rb#55 -RuboCop::Cop::Style::CaseLikeIf::MSG = T.let(T.unsafe(nil), String) - -# Checks for uses of the character literal ?x. -# Starting with Ruby 1.9 character literals are -# essentially one-character strings, so this syntax -# is mostly redundant at this point. -# -# ? character literal can be used to express meta and control character. -# That's a good use case of ? literal so it doesn't count it as an offense. -# -# @example -# # bad -# ?x -# -# # good -# 'x' -# -# # good - control & meta escapes -# ?\C-\M-d -# "\C-\M-d" # same as above -# -# source://rubocop//lib/rubocop/cop/style/character_literal.rb#24 -class RuboCop::Cop::Style::CharacterLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::StringHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/character_literal.rb#35 - def autocorrect(corrector, node); end - - # Dummy implementation of method in ConfigurableEnforcedStyle that is - # called from StringHelp. - # - # source://rubocop//lib/rubocop/cop/style/character_literal.rb#53 - def correct_style_detected; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/character_literal.rb#30 - def offense?(node); end - - # Dummy implementation of method in ConfigurableEnforcedStyle that is - # called from StringHelp. - # - # source://rubocop//lib/rubocop/cop/style/character_literal.rb#49 - def opposite_style_detected; end -end - -# source://rubocop//lib/rubocop/cop/style/character_literal.rb#28 -RuboCop::Cop::Style::CharacterLiteral::MSG = T.let(T.unsafe(nil), String) - -# Checks that namespaced classes and modules are defined with a consistent style. -# -# With `nested` style, classes and modules should be defined separately (one constant -# on each line, without `::`). With `compact` style, classes and modules should be -# defined with fully qualified names (using `::` for namespaces). -# -# NOTE: The style chosen will affect `Module.nesting` for the class or module. Using -# `nested` style will result in each level being added, whereas `compact` style will -# only include the fully qualified class or module name. -# -# By default, `EnforcedStyle` applies to both classes and modules. If desired, separate -# styles can be defined for classes and modules by using `EnforcedStyleForClasses` and -# `EnforcedStyleForModules` respectively. If not set, or set to nil, the `EnforcedStyle` -# value will be used. -# -# The compact style is only forced for classes/modules with one child. -# -# @example EnforcedStyle: nested (default) -# # good -# # have each child on its own line -# class Foo -# class Bar -# end -# end -# @example EnforcedStyle: compact -# # good -# # combine definitions as much as possible -# class Foo::Bar -# end -# -# source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#45 -class RuboCop::Cop::Style::ClassAndModuleChildren < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#54 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#60 - def on_module(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#103 - def add_trailing_end(corrector, node, padding); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#187 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#176 - def check_compact_style(node, body); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#168 - def check_nested_style(node); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#158 - def check_style(node, body, style); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#108 - def compact_definition(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#129 - def compact_identifier_name(node); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#114 - def compact_node(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#197 - def compact_node_name?(node); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#119 - def compact_replacement(node); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#154 - def leading_spaces(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#193 - def needs_compacting?(body); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#76 - def nest_definition(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#66 - def nest_or_compact(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#134 - def remove_end(corrector, body); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#85 - def replace_namespace_keyword(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#94 - def split_on_double_colon(corrector, node, padding); end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#201 - def style_for_classes; end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#205 - def style_for_modules; end - - # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#142 - def unindent(corrector, node); end -end - -# source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#52 -RuboCop::Cop::Style::ClassAndModuleChildren::COMPACT_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#51 -RuboCop::Cop::Style::ClassAndModuleChildren::NESTED_MSG = T.let(T.unsafe(nil), String) - -# Enforces consistent use of `Object#is_a?` or `Object#kind_of?`. -# -# @example EnforcedStyle: is_a? (default) -# # bad -# var.kind_of?(Date) -# var.kind_of?(Integer) -# -# # good -# var.is_a?(Date) -# var.is_a?(Integer) -# @example EnforcedStyle: kind_of? -# # bad -# var.is_a?(Time) -# var.is_a?(String) -# -# # good -# var.kind_of?(Time) -# var.kind_of?(String) -# -# source://rubocop//lib/rubocop/cop/style/class_check.rb#26 -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#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 - -# source://rubocop//lib/rubocop/cop/style/class_check.rb#30 -RuboCop::Cop::Style::ClassCheck::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/class_check.rb#31 -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?` custom method definitions are allowed by default. -# These are customizable with `AllowedMethods` option. -# -# @example -# # bad -# var.class == Date -# var.class.equal?(Date) -# var.class.eql?(Date) -# var.class.name == 'Date' -# -# # good -# var.instance_of?(Date) -# @example AllowedMethods: ['==', 'equal?', 'eql?'] (default) -# # good -# def ==(other) -# self.class == other.class && name == other.name -# end -# -# def equal?(other) -# self.class.equal?(other.class) && name.equal?(other.name) -# end -# -# def eql?(other) -# self.class.eql?(other.class) && name.eql?(other.name) -# end -# @example AllowedPatterns: [] (default) -# # bad -# def eq(other) -# self.class.eq(other.class) && name.eq(other.name) -# end -# @example AllowedPatterns: ['eq'] -# # good -# def eq(other) -# self.class.eq(other.class) && name.eq(other.name) -# end -# -# 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#64 - def class_comparison_candidate?(param0 = T.unsafe(nil)); end - - # 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#92 - def class_name(class_node, node); end - - # @return [Boolean] - # - # 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#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#61 -RuboCop::Cop::Style::ClassEqualityComparison::CLASS_NAME_METHODS = T.let(T.unsafe(nil), Array) - -# 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#60 -RuboCop::Cop::Style::ClassEqualityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for uses of the class/module name instead of -# self, when defining class/module methods. -# -# @example -# # bad -# class SomeClass -# def SomeClass.class_method -# # ... -# end -# end -# -# # good -# class SomeClass -# def self.class_method -# # ... -# end -# end -# -# source://rubocop//lib/rubocop/cop/style/class_methods.rb#23 -class RuboCop::Cop::Style::ClassMethods < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/class_methods.rb#28 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/style/class_methods.rb#28 - def on_module(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/class_methods.rb#41 - def check_defs(name, node); end -end - -# source://rubocop//lib/rubocop/cop/style/class_methods.rb#26 -RuboCop::Cop::Style::ClassMethods::MSG = T.let(T.unsafe(nil), String) - -# Enforces using `def self.method_name` or `class << self` to define class methods. -# -# @example EnforcedStyle: def_self (default) -# # bad -# class SomeClass -# class << self -# attr_accessor :class_accessor -# -# def class_method -# # ... -# end -# end -# end -# -# # good -# class SomeClass -# def self.class_method -# # ... -# end -# -# class << self -# attr_accessor :class_accessor -# end -# end -# -# # good - contains private method -# class SomeClass -# class << self -# attr_accessor :class_accessor -# -# private -# -# def private_class_method -# # ... -# end -# end -# end -# @example EnforcedStyle: self_class -# # bad -# class SomeClass -# def self.class_method -# # ... -# end -# end -# -# # good -# class SomeClass -# class << self -# def class_method -# # ... -# end -# end -# end -# -# source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#61 -class RuboCop::Cop::Style::ClassMethodsDefinitions < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::CommentsHelp - include ::RuboCop::Cop::VisibilityHelp - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#81 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#71 - def on_sclass(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#95 - def all_methods_public?(sclass_node); end - - # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#115 - def autocorrect_sclass(node, corrector); end - - # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#102 - def def_nodes(sclass_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#91 - def def_self_style?; end - - # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#141 - def extract_def_from_sclass(def_node, sclass_node); end - - # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#152 - def indentation_diff(node1, node2); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#137 - def sclass_only_has_methods?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#68 -RuboCop::Cop::Style::ClassMethodsDefinitions::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#69 -RuboCop::Cop::Style::ClassMethodsDefinitions::MSG_SCLASS = T.let(T.unsafe(nil), String) - -# Checks for uses of class variables. Offenses -# are signaled only on assignment to class variables to -# reduce the number of offenses that would be reported. -# -# You have to be careful when setting a value for a class -# variable; if a class has been inherited, changing the -# value of a class variable also affects the inheriting -# classes. This means that it's almost always better to -# use a class instance variable instead. -# -# @example -# # bad -# class A -# @@test = 10 -# end -# -# class A -# def self.test(name, value) -# class_variable_set("@@#{name}", value) -# end -# end -# -# class A; end -# A.class_variable_set(:@@test, 10) -# -# # good -# class A -# @test = 10 -# end -# -# class A -# def test -# @@test # you can access class variable without offense -# end -# end -# -# class A -# def self.test(name) -# class_variable_get("@@#{name}") # you can access without offense -# end -# end -# -# source://rubocop//lib/rubocop/cop/style/class_vars.rb#48 -class RuboCop::Cop::Style::ClassVars < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/class_vars.rb#52 - def on_cvasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/class_vars.rb#56 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/style/class_vars.rb#49 -RuboCop::Cop::Style::ClassVars::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/class_vars.rb#50 -RuboCop::Cop::Style::ClassVars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for places where custom logic on rejection nils from arrays -# and hashes can be replaced with `{Array,Hash}#{compact,compact!}`. -# -# @example -# # bad -# array.reject(&:nil?) -# array.reject { |e| e.nil? } -# array.select { |e| !e.nil? } -# array.filter { |e| !e.nil? } -# array.grep_v(nil) -# array.grep_v(NilClass) -# -# # good -# array.compact -# -# # bad -# hash.reject!(&:nil?) -# hash.reject! { |k, v| v.nil? } -# hash.select! { |k, v| !v.nil? } -# hash.filter! { |k, v| !v.nil? } -# -# # good -# hash.compact! -# @example AllowedReceivers: ['params'] -# # good -# params.reject(&:nil?) -# -# 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#86 - def grep_v_with_nil?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#90 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#90 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#65 - def reject_method?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#58 - def reject_method_with_block_pass?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#75 - def select_method?(param0 = T.unsafe(nil)); end - - private - - # 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#106 - def offense_range(node); end - - # 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#123 - def to_enum_method?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#53 -RuboCop::Cop::Style::CollectionCompact::FILTER_METHODS = T.let(T.unsafe(nil), Array) - -# 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#51 -RuboCop::Cop::Style::CollectionCompact::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# 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 -# from the Enumerable module. -# -# You can customize the mapping from undesired method to desired method. -# -# e.g. to use `detect` over `find`: -# -# Style/CollectionMethods: -# PreferredMethods: -# find: detect -# -# @example -# # These examples are based on the default mapping for `PreferredMethods`. -# -# # bad -# items.collect -# items.collect! -# items.collect_concat -# items.inject -# items.detect -# items.find_all -# items.member? -# -# # 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#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#49 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#54 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#49 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#54 - def on_send(node); end - - private - - # 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#72 - def implicit_block?(node); end - - # 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#86 - def methods_accepting_symbol; end -end - -# 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`). -# -# @example -# # bad -# Timeout::timeout(500) { do_something } -# FileUtils::rmdir(dir) -# Marshal::dump(obj) -# -# # good -# Timeout.timeout(500) { do_something } -# FileUtils.rmdir(dir) -# Marshal.dump(obj) -# -# source://rubocop//lib/rubocop/cop/style/colon_method_call.rb#20 -class RuboCop::Cop::Style::ColonMethodCall < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/colon_method_call.rb#26 - def java_type_node?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/colon_method_call.rb#35 - def on_send(node); end - - class << self - # source://rubocop//lib/rubocop/cop/style/colon_method_call.rb#31 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/colon_method_call.rb#23 -RuboCop::Cop::Style::ColonMethodCall::MSG = T.let(T.unsafe(nil), String) - -# Checks for class methods that are defined using the `::` -# operator instead of the `.` operator. -# -# @example -# # bad -# class Foo -# def self::bar -# end -# end -# -# # good -# class Foo -# def self.bar -# end -# end -# -# source://rubocop//lib/rubocop/cop/style/colon_method_definition.rb#22 -class RuboCop::Cop::Style::ColonMethodDefinition < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/colon_method_definition.rb#27 - def on_defs(node); end -end - -# source://rubocop//lib/rubocop/cop/style/colon_method_definition.rb#25 -RuboCop::Cop::Style::ColonMethodDefinition::MSG = T.let(T.unsafe(nil), String) - -# Checks for multiple `defined?` calls joined by `&&` that can be combined -# into a single `defined?`. -# -# When checking that a nested constant or chained method is defined, it is -# not necessary to check each ancestor or component of the chain. -# -# @example -# # bad -# defined?(Foo) && defined?(Foo::Bar) && defined?(Foo::Bar::Baz) -# -# # good -# defined?(Foo::Bar::Baz) -# -# # bad -# defined?(foo) && defined?(foo.bar) && defined?(foo.bar.baz) -# -# # good -# defined?(foo.bar.baz) -# -# source://rubocop//lib/rubocop/cop/style/combinable_defined.rb#24 -class RuboCop::Cop::Style::CombinableDefined < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/combinable_defined.rb#31 - def on_and(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/combinable_defined.rb#55 - def defined_calls(nodes); end - - # If the redundant `defined?` node is the LHS of an `and` node, - # the term as well as the subsequent `&&`/`and` operator will be removed. - # - # source://rubocop//lib/rubocop/cop/style/combinable_defined.rb#85 - def lhs_range_to_remove(term); end - - # source://rubocop//lib/rubocop/cop/style/combinable_defined.rb#62 - def namespaces(nodes); end - - # source://rubocop//lib/rubocop/cop/style/combinable_defined.rb#72 - def remove_term(corrector, term); end - - # If the redundant `defined?` node is the RHS of an `and` node, - # the term as well as the preceding `&&`/`and` operator will be removed. - # - # source://rubocop//lib/rubocop/cop/style/combinable_defined.rb#100 - def rhs_range_to_remove(term); end - - # source://rubocop//lib/rubocop/cop/style/combinable_defined.rb#49 - def terms(node); end -end - -# source://rubocop//lib/rubocop/cop/style/combinable_defined.rb#28 -RuboCop::Cop::Style::CombinableDefined::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/combinable_defined.rb#29 -RuboCop::Cop::Style::CombinableDefined::OPERATORS = T.let(T.unsafe(nil), Array) - -# Checks for places where multiple consecutive loops over the same data -# can be combined into a single loop. It is very likely that combining them -# will make the code more efficient and more concise. -# -# NOTE: Autocorrection is not applied when the block variable names differ in separate loops, -# as it is impossible to determine which variable name should be prioritized. -# -# @example -# # bad -# def method -# items.each do |item| -# do_something(item) -# end -# -# items.each do |item| -# do_something_else(item) -# end -# end -# -# # good -# def method -# items.each do |item| -# do_something(item) -# do_something_else(item) -# end -# end -# -# # bad -# def method -# for item in items do -# do_something(item) -# end -# -# for item in items do -# do_something_else(item) -# end -# end -# -# # good -# def method -# for item in items do -# do_something(item) -# do_something_else(item) -# end -# end -# -# # good -# def method -# each_slice(2) { |slice| do_something(slice) } -# each_slice(3) { |slice| do_something(slice) } -# end -# -# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#62 -class RuboCop::Cop::Style::CombinableLoops < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#68 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#84 - def on_for(node); end - - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#68 - def on_numblock(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#95 - def collection_looping_method?(node); end - - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#112 - def combine_with_left_sibling(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#119 - def correct_end_of_block(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#100 - def same_collection_looping_block?(node, sibling); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#108 - def same_collection_looping_for?(node, sibling); end -end - -# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#65 -RuboCop::Cop::Style::CombinableLoops::MSG = T.let(T.unsafe(nil), String) - -# Enforces using `` or %x around command literals. -# -# @example EnforcedStyle: backticks (default) -# # bad -# folders = %x(find . -type d).split -# -# # bad -# %x( -# ln -s foo.example.yml foo.example -# ln -s bar.example.yml bar.example -# ) -# -# # good -# folders = `find . -type d`.split -# -# # good -# ` -# ln -s foo.example.yml foo.example -# ln -s bar.example.yml bar.example -# ` -# @example EnforcedStyle: mixed -# # bad -# folders = %x(find . -type d).split -# -# # bad -# ` -# ln -s foo.example.yml foo.example -# ln -s bar.example.yml bar.example -# ` -# -# # good -# folders = `find . -type d`.split -# -# # good -# %x( -# ln -s foo.example.yml foo.example -# ln -s bar.example.yml bar.example -# ) -# @example EnforcedStyle: percent_x -# # bad -# folders = `find . -type d`.split -# -# # bad -# ` -# ln -s foo.example.yml foo.example -# ln -s bar.example.yml bar.example -# ` -# -# # good -# folders = %x(find . -type d).split -# -# # good -# %x( -# ln -s foo.example.yml foo.example -# ln -s bar.example.yml bar.example -# ) -# @example AllowInnerBackticks: false (default) -# # If `false`, the cop will always recommend using `%x` if one or more -# # backticks are found in the command string. -# -# # bad -# `echo \`ls\`` -# -# # good -# %x(echo `ls`) -# @example AllowInnerBackticks: true -# # good -# `echo \`ls\`` -# -# source://rubocop//lib/rubocop/cop/style/command_literal.rb#78 -class RuboCop::Cop::Style::CommandLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/command_literal.rb#85 - def on_xstr(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/command_literal.rb#146 - def allow_inner_backticks?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/command_literal.rb#122 - def allowed_backtick_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/command_literal.rb#131 - def allowed_percent_x_literal?(node); end - - # source://rubocop//lib/rubocop/cop/style/command_literal.rb#109 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/command_literal.rb#159 - def backtick_literal?(node); end - - # source://rubocop//lib/rubocop/cop/style/command_literal.rb#97 - def check_backtick_literal(node, message); end - - # source://rubocop//lib/rubocop/cop/style/command_literal.rb#103 - def check_percent_x_literal(node, message); end - - # source://rubocop//lib/rubocop/cop/style/command_literal.rb#167 - def command_delimiter; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/command_literal.rb#150 - def contains_backtick?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/command_literal.rb#142 - def contains_disallowed_backtick?(node); end - - # source://rubocop//lib/rubocop/cop/style/command_literal.rb#171 - def default_delimiter; end - - # source://rubocop//lib/rubocop/cop/style/command_literal.rb#154 - def node_body(node); end - - # source://rubocop//lib/rubocop/cop/style/command_literal.rb#163 - def preferred_delimiter; end - - # source://rubocop//lib/rubocop/cop/style/command_literal.rb#175 - def preferred_delimiters_config; end -end - -# source://rubocop//lib/rubocop/cop/style/command_literal.rb#82 -RuboCop::Cop::Style::CommandLiteral::MSG_USE_BACKTICKS = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/command_literal.rb#83 -RuboCop::Cop::Style::CommandLiteral::MSG_USE_PERCENT_X = T.let(T.unsafe(nil), String) - -# Checks that comment annotation keywords are written according -# to guidelines. -# -# Annotation keywords can be specified by overriding the cop's `Keywords` -# configuration. Keywords are allowed to be single words or phrases. -# -# NOTE: With a multiline comment block (where each line is only a -# comment), only the first line will be able to register an offense, even -# if an annotation keyword starts another line. This is done to prevent -# incorrect registering of keywords (eg. `review`) inside a paragraph as an -# annotation. -# -# @example RequireColon: true (default) -# # bad -# # TODO make better -# -# # good -# # TODO: make better -# -# # bad -# # TODO:make better -# -# # good -# # TODO: make better -# -# # bad -# # fixme: does not work -# -# # good -# # FIXME: does not work -# -# # bad -# # Optimize does not work -# -# # good -# # OPTIMIZE: does not work -# @example RequireColon: false -# # bad -# # TODO: make better -# -# # good -# # TODO make better -# -# # bad -# # fixme does not work -# -# # good -# # FIXME does not work -# -# # bad -# # Optimize does not work -# -# # good -# # OPTIMIZE does not work -# -# source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#61 -class RuboCop::Cop::Style::CommentAnnotation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#73 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#110 - def annotation_range(annotation); end - - # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#114 - def correct_offense(corrector, range, keyword); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#102 - def first_comment_line?(comments, index); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#106 - def inline_comment?(comment); end - - # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#124 - def keywords; end - - # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#87 - def register_offense(annotation); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#120 - def requires_colon?; end -end - -# source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#71 -RuboCop::Cop::Style::CommentAnnotation::MISSING_NOTE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#65 -RuboCop::Cop::Style::CommentAnnotation::MSG_COLON_STYLE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#68 -RuboCop::Cop::Style::CommentAnnotation::MSG_SPACE_STYLE = T.let(T.unsafe(nil), String) - -# Checks for comments put on the same line as some keywords. -# These keywords are: `class`, `module`, `def`, `begin`, `end`. -# -# Note that some comments -# RBS::Inline annotation, and Steep annotation (`steep:ignore`) are allowed. -# -# Autocorrection removes comments from `end` keyword and keeps comments -# for `class`, `module`, `def` and `begin` above the keyword. -# -# @example -# # bad -# if condition -# statement -# end # end if -# -# # bad -# class X # comment -# statement -# end -# -# # bad -# def x; end # comment -# -# # good -# if condition -# statement -# end -# -# # good -# class X # :nodoc: -# y -# end -# -# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#45 -class RuboCop::Cop::Style::CommentedKeyword < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#65 - def on_new_investigation; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#88 - def offensive?(comment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#101 - def rbs_inline_annotation?(line, comment); end - - # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#75 - def register_offense(comment, matched_keyword); end - - # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#97 - def source_line(comment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#112 - def steep_annotation?(comment); end -end - -# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#54 -RuboCop::Cop::Style::CommentedKeyword::ALLOWED_COMMENTS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#55 -RuboCop::Cop::Style::CommentedKeyword::ALLOWED_COMMENT_REGEXES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#51 -RuboCop::Cop::Style::CommentedKeyword::KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#52 -RuboCop::Cop::Style::CommentedKeyword::KEYWORD_REGEXES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#61 -RuboCop::Cop::Style::CommentedKeyword::METHOD_DEFINITION = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#49 -RuboCop::Cop::Style::CommentedKeyword::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#58 -RuboCop::Cop::Style::CommentedKeyword::REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#63 -RuboCop::Cop::Style::CommentedKeyword::STEEP_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#60 -RuboCop::Cop::Style::CommentedKeyword::SUBCLASS_DEFINITION = T.let(T.unsafe(nil), Regexp) - -# Checks for logical comparison which can be replaced with `Comparable#between?`. -# -# NOTE: `Comparable#between?` is on average slightly slower than logical comparison, -# although the difference generally isn't observable. If you require maximum -# performance, consider using logical comparison. -# -# @example -# -# # bad -# x >= min && x <= max -# -# # bad -# x <= max && x >= min -# -# # good -# x.between?(min, max) -# -# source://rubocop//lib/rubocop/cop/style/comparable_between.rb#23 -class RuboCop::Cop::Style::ComparableBetween < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/comparable_between.rb#38 - def logical_comparison_between_by_max_first?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/comparable_between.rb#29 - def logical_comparison_between_by_min_first?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/comparable_between.rb#46 - def on_and(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/comparable_between.rb#62 - def register_offense(node, min_and_value, max_and_value); end -end - -# source://rubocop//lib/rubocop/cop/style/comparable_between.rb#26 -RuboCop::Cop::Style::ComparableBetween::MSG = T.let(T.unsafe(nil), String) - -# Enforces the use of `Comparable#clamp` instead of comparison by minimum and maximum. -# -# This cop supports autocorrection for `if/elsif/else` bad style only. -# Because `ArgumentError` occurs if the minimum and maximum of `clamp` arguments are reversed. -# When these are variables, it is not possible to determine which is the minimum and maximum: -# -# [source,ruby] -# ---- -# [1, [2, 3].max].min # => 1 -# 1.clamp(3, 1) # => min argument must be smaller than max argument (ArgumentError) -# ---- -# -# @example -# -# # bad -# [[x, low].max, high].min -# -# # bad -# if x < low -# low -# elsif high < x -# high -# else -# x -# end -# -# # good -# x.clamp(low, high) -# -# source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#35 -class RuboCop::Cop::Style::ComparableClamp < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#61 - def array_min_max?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#47 - def if_elsif_else_condition?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#78 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#100 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#108 - def autocorrect(corrector, node, prefer); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#117 - def min_condition?(if_condition, else_body); end -end - -# source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#42 -RuboCop::Cop::Style::ComparableClamp::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#43 -RuboCop::Cop::Style::ComparableClamp::MSG_MIN_MAX = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#44 -RuboCop::Cop::Style::ComparableClamp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Enforces the use of `Array#push(item)` instead of `Array#concat([item])` -# to avoid redundant array literals. -# -# @example -# -# # bad -# list.concat([foo]) -# list.concat([bar, baz]) -# list.concat([qux, quux], [corge]) -# -# # good -# list.push(foo) -# list.push(bar, baz) -# list.push(qux, quux, corge) -# -# source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#25 -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#70 - def offense_range(node); end - - # @return [Boolean] - # - # 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#74 - def preferred_method(node); end -end - -# source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#28 -RuboCop::Cop::Style::ConcatArrayLiterals::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#29 -RuboCop::Cop::Style::ConcatArrayLiterals::MSG_FOR_PERCENT_LITERALS = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#31 -RuboCop::Cop::Style::ConcatArrayLiterals::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Check for `if` and `case` statements where each branch is used for -# both the assignment and comparison of the same variable -# when using the return of the condition can be used instead. -# -# @example EnforcedStyle: assign_to_condition (default) -# # bad -# if foo -# bar = 1 -# else -# bar = 2 -# end -# -# case foo -# when 'a' -# bar += 1 -# else -# bar += 2 -# end -# -# if foo -# some_method -# bar = 1 -# else -# some_other_method -# bar = 2 -# end -# -# # good -# bar = if foo -# 1 -# else -# 2 -# end -# -# bar += case foo -# when 'a' -# 1 -# else -# 2 -# end -# -# bar << if foo -# some_method -# 1 -# else -# some_other_method -# 2 -# end -# @example EnforcedStyle: assign_inside_condition -# # bad -# bar = if foo -# 1 -# else -# 2 -# end -# -# bar += case foo -# when 'a' -# 1 -# else -# 2 -# end -# -# bar << if foo -# some_method -# 1 -# else -# some_other_method -# 2 -# end -# -# # good -# if foo -# bar = 1 -# else -# bar = 2 -# end -# -# case foo -# when 'a' -# bar += 1 -# else -# bar += 2 -# end -# -# if foo -# some_method -# bar = 1 -# else -# some_other_method -# bar = 2 -# end -# -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#207 -class RuboCop::Cop::Style::ConditionalAssignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Style::ConditionalAssignmentHelper - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # The shovel operator `<<` does not have its own type. It is a `send` - # type. - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#224 - def assignment_type?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#305 - def candidate_condition?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#232 - def on_and_asgn(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#260 - def on_case(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#270 - def on_case_match(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#232 - def on_casgn(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#232 - def on_cvasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#232 - def on_gvasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#246 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#232 - def on_ivasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#232 - def on_lvasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#232 - def on_masgn(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#232 - def on_op_asgn(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#232 - def on_or_asgn(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#240 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#311 - def allowed_single_line?(branches); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#384 - def allowed_statements?(branches); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#307 - def allowed_ternary?(assignment); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#315 - def assignment_node(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#361 - def assignment_types_match?(*nodes); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#376 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#300 - def candidate_node?(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#282 - def check_assignment_to_condition(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#367 - def check_node(node, branches); end - - # If `Layout/LineLength` is enabled, we do not want to introduce an - # offense by autocorrecting this cop. Find the max configured line - # length. Find the longest line of condition. Remove the assignment - # from lines that contain the offending assignment because after - # correcting, this will not be on the line anymore. Check if the length - # of the longest line + the length of the corrected assignment is - # greater than the max configured line length - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#400 - def correction_exceeds_line_limit?(node, branches); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#431 - def include_ternary?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#354 - def lhs_all_match?(branches); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#419 - def line_length_cop_enabled?; end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#412 - def longest_line(node, assignment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#408 - def longest_line_exceeds_line_limit?(node, assignment); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#423 - def max_line_length; end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#338 - def move_assignment_inside_condition(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#328 - def move_assignment_outside_condition(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#427 - def single_line_conditions_only?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#350 - def ternary_condition?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#215 -RuboCop::Cop::Style::ConditionalAssignment::ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#213 -RuboCop::Cop::Style::ConditionalAssignment::ASSIGN_TO_CONDITION_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#217 -RuboCop::Cop::Style::ConditionalAssignment::ENABLED = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#216 -RuboCop::Cop::Style::ConditionalAssignment::LINE_LENGTH = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#218 -RuboCop::Cop::Style::ConditionalAssignment::MAX = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#212 -RuboCop::Cop::Style::ConditionalAssignment::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#219 -RuboCop::Cop::Style::ConditionalAssignment::SINGLE_LINE_CONDITIONS_ONLY = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#214 -RuboCop::Cop::Style::ConditionalAssignment::VARIABLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) - -# Helper module to provide common methods to classes needed for the -# ConditionalAssignment Cop. -# -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#8 -module RuboCop::Cop::Style::ConditionalAssignmentHelper - extend ::RuboCop::AST::NodePattern::Macros - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#60 - def end_with_eq?(sym); end - - # `elsif` branches show up in the `node` as an `else`. We need - # to recursively iterate over all `else` branches and consider all - # but the last `node` an `elsif` branch and consider the last `node` - # the actual `else` branch. - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#20 - def expand_elses(branch); end - - # `when` nodes contain the entire branch including the condition. - # We only need the contents of the branch, not the condition. - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#28 - def expand_when_branches(when_branches); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#51 - def indent(cop, source); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#36 - def lhs(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#32 - def tail(branch); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#106 - def assignment_rhs_exist?(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#66 - def expand_elsif(node, elsif_branches = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#92 - def lhs_for_casgn(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#79 - def lhs_for_send(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#102 - def setter_method?(method_name); end -end - -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#13 -RuboCop::Cop::Style::ConditionalAssignmentHelper::ALIGN_WITH = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#12 -RuboCop::Cop::Style::ConditionalAssignmentHelper::END_ALIGNMENT = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#11 -RuboCop::Cop::Style::ConditionalAssignmentHelper::EQUAL = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#14 -RuboCop::Cop::Style::ConditionalAssignmentHelper::KEYWORD = T.let(T.unsafe(nil), String) - -# Helper module to provide common methods to ConditionalAssignment -# correctors -# -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#438 -module RuboCop::Cop::Style::ConditionalCorrectorHelper - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#461 - def assignment(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#490 - def correct_branches(corrector, branches); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#467 - def correct_if_branches(corrector, cop, node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#439 - def remove_whitespace_in_branches(corrector, branch, condition, column); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#477 - def replace_branch_assignment(corrector, branch); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#454 - def white_space_range(node, column); end -end - -# Checks that constants defined in classes and modules have -# an explicit visibility declaration. By default, Ruby makes all class- -# and module constants public, which litters the public API of the -# class or module. Explicitly declaring a visibility makes intent more -# clear, and prevents outside actors from touching private state. -# -# @example -# -# # bad -# class Foo -# BAR = 42 -# BAZ = 43 -# end -# -# # good -# class Foo -# BAR = 42 -# private_constant :BAR -# -# BAZ = 43 -# public_constant :BAZ -# end -# @example IgnoreModules: false (default) -# # bad -# class Foo -# MyClass = Struct.new() -# end -# -# # good -# class Foo -# MyClass = Struct.new() -# public_constant :MyClass -# end -# @example IgnoreModules: true -# # good -# class Foo -# MyClass = Struct.new() -# end -# -# source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#47 -class RuboCop::Cop::Style::ConstantVisibility < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#51 - def on_casgn(node); end - - # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#87 - def visibility_declaration_for?(param0 = T.unsafe(nil), param1); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#69 - def class_or_module_scope?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#61 - def ignore_modules?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#91 - def match_name?(name, constant_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#65 - def module?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#80 - def visibility_declaration?(node); end -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#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#28 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/style/copyright.rb#45 - def autocorrect(corrector); end - - # source://rubocop//lib/rubocop/cop/style/copyright.rb#56 - def autocorrect_notice; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/copyright.rb#86 - def encoding_token?(processed_source, token_index); end - - # source://rubocop//lib/rubocop/cop/style/copyright.rb#72 - def insert_notice_before(processed_source); end - - # source://rubocop//lib/rubocop/cop/style/copyright.rb#52 - def notice; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/copyright.rb#93 - def notice_found?(processed_source); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/copyright.rb#79 - def shebang_token?(processed_source, token_index); end - - # @raise [Warning] - # - # source://rubocop//lib/rubocop/cop/style/copyright.rb#60 - def verify_autocorrect_notice!; end -end - -# 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#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. -# -# @example -# # bad -# class Person < Data.define(:first_name, :last_name) -# def age -# 42 -# end -# end -# -# # good -# Person = Data.define(:first_name, :last_name) do -# def age -# 42 -# end -# end -# -# source://rubocop//lib/rubocop/cop/style/data_inheritance.rb#26 -class RuboCop::Cop::Style::DataInheritance < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/data_inheritance.rb#48 - def data_define?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/data_inheritance.rb#36 - def on_class(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/data_inheritance.rb#55 - def correct_parent(parent, corrector); end - - # source://rubocop//lib/rubocop/cop/style/data_inheritance.rb#65 - def range_for_empty_class_body(class_node, data_define); end -end - -# source://rubocop//lib/rubocop/cop/style/data_inheritance.rb#31 -RuboCop::Cop::Style::DataInheritance::MSG = T.let(T.unsafe(nil), String) - -# Checks for consistent usage of the `DateTime` class over the -# `Time` class. This cop is disabled by default since these classes, -# although highly overlapping, have particularities that make them not -# replaceable in certain situations when dealing with multiple timezones -# and/or DST. -# -# @example -# -# # bad - uses `DateTime` for current time -# DateTime.now -# -# # good - uses `Time` for current time -# Time.now -# -# # bad - uses `DateTime` for modern date -# DateTime.iso8601('2016-06-29') -# -# # good - uses `Time` for modern date -# Time.iso8601('2016-06-29') -# -# # good - uses `DateTime` with start argument for historical date -# DateTime.iso8601('1751-04-23', Date::ENGLAND) -# @example AllowCoercion: false (default) -# -# # bad - coerces to `DateTime` -# something.to_datetime -# -# # good - coerces to `Time` -# something.to_time -# @example AllowCoercion: true -# -# # good -# something.to_datetime -# -# # good -# something.to_time -# -# source://rubocop//lib/rubocop/cop/style/date_time.rb#49 -class RuboCop::Cop::Style::DateTime < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/date_time.rb#56 - def date_time?(param0 = T.unsafe(nil)); end - - # 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 - - # source://rubocop//lib/rubocop/cop/style/date_time.rb#66 - def to_datetime?(param0 = T.unsafe(nil)); end - - private - - # 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#82 - def disallow_coercion?; end -end - -# source://rubocop//lib/rubocop/cop/style/date_time.rb#52 -RuboCop::Cop::Style::DateTime::CLASS_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/date_time.rb#53 -RuboCop::Cop::Style::DateTime::COERCION_MSG = T.let(T.unsafe(nil), String) - -# Checks for parentheses in the definition of a method, -# that does not take any arguments. Both instance and -# class/singleton methods are checked. -# -# @example -# -# # bad -# def foo() -# do_something -# end -# -# # good -# def foo -# do_something -# end -# -# # bad -# def foo() = do_something -# -# # good -# def foo = do_something -# -# # good (without parentheses it's a syntax error) -# def foo() do_something end -# -# # bad -# def Baz.foo() -# do_something -# end -# -# # good -# def Baz.foo -# do_something -# end -# -# source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#40 -class RuboCop::Cop::Style::DefWithParentheses < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#45 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#45 - def on_defs(node); end -end - -# source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#43 -RuboCop::Cop::Style::DefWithParentheses::MSG = T.let(T.unsafe(nil), String) - -# Check for chained `dig` calls that can be collapsed into a single `dig`. -# -# @example -# # bad -# x.dig(:foo).dig(:bar).dig(:baz) -# x.dig(:foo, :bar).dig(:baz) -# x.dig(:foo, :bar)&.dig(:baz) -# -# # good -# x.dig(:foo, :bar, :baz) -# -# # good - `dig`s cannot be combined -# x.dig(:foo).bar.dig(:baz) -# -# source://rubocop//lib/rubocop/cop/style/dig_chain.rb#25 -class RuboCop::Cop::Style::DigChain < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CommentsHelp - include ::RuboCop::Cop::DigHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/dig_chain.rb#33 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/dig_chain.rb#33 - def on_send(node); end - - private - - # Walk up the method chain while the receiver is `dig` with arguments. - # - # source://rubocop//lib/rubocop/cop/style/dig_chain.rb#49 - def inspect_chain(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/dig_chain.rb#64 - def invalid_arguments?(arguments); end - - # source://rubocop//lib/rubocop/cop/style/dig_chain.rb#74 - def register_offense(node, range, arguments); end -end - -# source://rubocop//lib/rubocop/cop/style/dig_chain.rb#30 -RuboCop::Cop::Style::DigChain::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/dig_chain.rb#31 -RuboCop::Cop::Style::DigChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for places where the `#\_\_dir\_\_` method can replace more -# complex constructs to retrieve a canonicalized absolute path to the -# current file. -# -# @example -# # bad -# path = File.expand_path(File.dirname(__FILE__)) -# -# # bad -# path = File.dirname(File.realpath(__FILE__)) -# -# # good -# path = __dir__ -# -# source://rubocop//lib/rubocop/cop/style/dir.rb#19 -class RuboCop::Cop::Style::Dir < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/dir.rb#29 - def dir_replacement?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/dir.rb#34 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/dir.rb#44 - def file_keyword?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/dir.rb#25 -RuboCop::Cop::Style::Dir::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/dir.rb#26 -RuboCop::Cop::Style::Dir::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Prefer to use `Dir.empty?('path/to/dir')` when checking if a directory is empty. -# -# @example -# # bad -# Dir.entries('path/to/dir').size == 2 -# Dir.children('path/to/dir').empty? -# Dir.children('path/to/dir').size == 0 -# Dir.each_child('path/to/dir').none? -# -# # good -# Dir.empty?('path/to/dir') -# -# source://rubocop//lib/rubocop/cop/style/dir_empty.rb#18 -class RuboCop::Cop::Style::DirEmpty < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # 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#37 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/dir_empty.rb#48 - def bang(node); end -end - -# source://rubocop//lib/rubocop/cop/style/dir_empty.rb#22 -RuboCop::Cop::Style::DirEmpty::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/dir_empty.rb#23 -RuboCop::Cop::Style::DirEmpty::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Detects comments to enable/disable RuboCop. -# This is useful if want to make sure that every RuboCop error gets fixed -# and not quickly disabled with a comment. -# -# Specific cops can be allowed with the `AllowedCops` configuration. Note that -# -# @example -# # bad -# # rubocop:disable Metrics/AbcSize -# def foo -# end -# # rubocop:enable Metrics/AbcSize -# -# # good -# def foo -# end -# @example AllowedCops: [Metrics/AbcSize] -# # good -# # rubocop:disable Metrics/AbcSize -# def foo -# end -# # rubocop:enable Metrics/AbcSize -# -# source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#33 -class RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#40 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#77 - def allowed_cops; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#81 - def any_cops_allowed?; end - - # source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#72 - def directive_cops(comment); end - - # source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#53 - def register_offense(comment, directive_cops, disallowed_cops); end -end - -# source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#37 -RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#38 -RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective::MSG_FOR_COPS = T.let(T.unsafe(nil), String) - -# When using `class_eval` (or other `eval`) with string interpolation, -# add a comment block showing its appearance if interpolated (a practice used in Rails code). -# -# @example -# # from activesupport/lib/active_support/core_ext/string/output_safety.rb -# -# # bad -# UNSAFE_STRING_METHODS.each do |unsafe_method| -# if 'String'.respond_to?(unsafe_method) -# class_eval <<-EOT, __FILE__, __LINE__ + 1 -# def #{unsafe_method}(*params, &block) -# to_str.#{unsafe_method}(*params, &block) -# end -# -# def #{unsafe_method}!(*params) -# @dirty = true -# super -# end -# EOT -# end -# end -# -# # good, inline comments in heredoc -# UNSAFE_STRING_METHODS.each do |unsafe_method| -# if 'String'.respond_to?(unsafe_method) -# class_eval <<-EOT, __FILE__, __LINE__ + 1 -# def #{unsafe_method}(*params, &block) # def capitalize(*params, &block) -# to_str.#{unsafe_method}(*params, &block) # to_str.capitalize(*params, &block) -# end # end -# -# def #{unsafe_method}!(*params) # def capitalize!(*params) -# @dirty = true # @dirty = true -# super # super -# end # end -# EOT -# end -# end -# -# # good, block comments in heredoc -# class_eval <<-EOT, __FILE__, __LINE__ + 1 -# # def capitalize!(*params) -# # @dirty = true -# # super -# # end -# -# def #{unsafe_method}!(*params) -# @dirty = true -# super -# end -# EOT -# -# # good, block comments before heredoc -# class_eval( -# # def capitalize!(*params) -# # @dirty = true -# # super -# # end -# -# <<-EOT, __FILE__, __LINE__ + 1 -# def #{unsafe_method}!(*params) -# @dirty = true -# super -# end -# EOT -# ) -# -# # bad - interpolated string without comment -# class_eval("def #{unsafe_method}!(*params); end") -# -# # good - with inline comment or replace it with block comment using heredoc -# class_eval("def #{unsafe_method}!(*params); end # def capitalize!(*params); end") -# -# source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#77 -class RuboCop::Cop::Style::DocumentDynamicEvalDefinition < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#84 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#107 - def comment_block_docs?(arg_node); end - - # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#147 - def comment_regexp(arg_node); end - - # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#126 - def heredoc_comment_blocks(heredoc_body); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#100 - def inline_comment_docs?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#96 - def interpolated?(arg_node); end - - # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#136 - def merge_adjacent_comments(line, index, hash); end - - # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#117 - def preceding_comment_blocks(node); end - - # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#156 - def source_to_regexp(source); end -end - -# source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#78 -RuboCop::Cop::Style::DocumentDynamicEvalDefinition::BLOCK_COMMENT_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#79 -RuboCop::Cop::Style::DocumentDynamicEvalDefinition::COMMENT_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#80 -RuboCop::Cop::Style::DocumentDynamicEvalDefinition::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#82 -RuboCop::Cop::Style::DocumentDynamicEvalDefinition::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for missing top-level documentation of classes and -# modules. Classes with no body are exempt from the check and so are -# namespace modules - modules that have nothing in their bodies except -# classes, other modules, constant definitions or constant visibility -# declarations. -# -# The documentation requirement is annulled if the class or module has -# same for all its children. -# -# @example -# # bad -# class Person -# # ... -# end -# -# module Math -# end -# -# # good -# # Description/Explanation of Person class -# class Person -# # ... -# end -# -# # allowed -# # Class without body -# class Person -# end -# -# # Namespace - A namespace can be a class or a module -# # Containing a class -# module Namespace -# # Description/Explanation of Person class -# class Person -# # ... -# end -# end -# -# # Containing constant visibility declaration -# module Namespace -# class Private -# end -# -# private_constant :Private -# end -# -# # Containing constant definition -# module Namespace -# Public = Class.new -# end -# -# # Macro calls -# module Namespace -# extend Foo -# end -# @example AllowedConstants: ['ClassMethods'] -# -# # good -# module A -# module ClassMethods -# # ... -# end -# end -# -# source://rubocop//lib/rubocop/cop/style/documentation.rb#72 -class RuboCop::Cop::Style::Documentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::DocumentationComment - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/style/documentation.rb#79 - def constant_definition?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/documentation.rb#85 - def constant_visibility_declaration?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/documentation.rb#90 - def include_statement?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/documentation.rb#94 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/style/documentation.rb#100 - def on_module(node); end - - # source://rubocop//lib/rubocop/cop/style/documentation.rb#82 - def outer_module(param0); end - - private - - # source://rubocop//lib/rubocop/cop/style/documentation.rb#174 - def allowed_constants; end - - # source://rubocop//lib/rubocop/cop/style/documentation.rb#106 - def check(node, body); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/documentation.rb#147 - def compact_namespace?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/documentation.rb#143 - def constant_allowed?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/documentation.rb#139 - def constant_declaration?(node); end - - # source://rubocop//lib/rubocop/cop/style/documentation.rb#178 - def identifier(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/documentation.rb#123 - def include_statement_only?(body); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/documentation.rb#129 - def namespace?(node); end - - # source://rubocop//lib/rubocop/cop/style/documentation.rb#170 - def nodoc(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/documentation.rb#166 - def nodoc?(comment, require_all: T.unsafe(nil)); end - - # Note: How end-of-line comments are associated with code changed in - # parser-2.2.0.4. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/documentation.rb#156 - def nodoc_comment?(node, require_all: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/documentation.rb#118 - def nodoc_self_or_outer_module?(node); end - - # source://rubocop//lib/rubocop/cop/style/documentation.rb#186 - def qualify_const(node); end -end - -# source://rubocop//lib/rubocop/cop/style/documentation.rb#76 -RuboCop::Cop::Style::Documentation::MSG = T.let(T.unsafe(nil), String) - -# Checks for missing documentation comment for public methods. -# It can optionally be configured to also require documentation for -# non-public methods. -# -# NOTE: This cop allows `initialize` method because `initialize` is -# a special method called from `new`. In some programming languages -# they are called constructor to distinguish it from method. -# -# @example -# -# # bad -# -# class Foo -# def bar -# puts baz -# end -# end -# -# module Foo -# def bar -# puts baz -# end -# end -# -# def foo.bar -# puts baz -# end -# -# # good -# -# class Foo -# # Documentation -# def bar -# puts baz -# end -# end -# -# module Foo -# # Documentation -# def bar -# puts baz -# end -# end -# -# # Documentation -# def foo.bar -# puts baz -# end -# @example RequireForNonPublicMethods: false (default) -# # good -# class Foo -# protected -# def do_something -# end -# end -# -# class Foo -# private -# def do_something -# end -# end -# @example RequireForNonPublicMethods: true -# # bad -# class Foo -# protected -# def do_something -# end -# end -# -# class Foo -# private -# def do_something -# end -# end -# -# # good -# class Foo -# protected -# # Documentation -# def do_something -# end -# end -# -# class Foo -# private -# # Documentation -# def do_something -# end -# end -# @example AllowedMethods: ['method_missing', 'respond_to_missing?'] -# -# # good -# class Foo -# def method_missing(name, *args) -# end -# -# def respond_to_missing?(symbol, include_private) -# end -# end -# -# source://rubocop//lib/rubocop/cop/style/documentation_method.rb#109 -class RuboCop::Cop::Style::DocumentationMethod < ::RuboCop::Cop::Base - include ::RuboCop::Cop::DocumentationComment - include ::RuboCop::Cop::VisibilityHelp - include ::RuboCop::Cop::DefNode - - # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#116 - def modifier_node?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#120 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#120 - def on_defs(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#146 - def allowed_methods; end - - # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#130 - def check(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#142 - def method_allowed?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#138 - def require_for_non_public_methods?; end -end - -# source://rubocop//lib/rubocop/cop/style/documentation_method.rb#113 -RuboCop::Cop::Style::DocumentationMethod::MSG = T.let(T.unsafe(nil), String) - -# Detects double disable comments on one line. This is mostly to catch -# automatically generated comments that need to be regenerated. -# -# @example -# # bad -# def f # rubocop:disable Style/For # rubocop:disable Metrics/AbcSize -# end -# -# # good -# # rubocop:disable Metrics/AbcSize -# def f # rubocop:disable Style/For -# end -# # rubocop:enable Metrics/AbcSize -# -# # if both fit on one line -# def f # rubocop:disable Style/For, Metrics/AbcSize -# end -# -# source://rubocop//lib/rubocop/cop/style/double_cop_disable_directive.rb#27 -class RuboCop::Cop::Style::DoubleCopDisableDirective < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/double_cop_disable_directive.rb#34 - def on_new_investigation; end -end - -# source://rubocop//lib/rubocop/cop/style/double_cop_disable_directive.rb#32 -RuboCop::Cop::Style::DoubleCopDisableDirective::MSG = T.let(T.unsafe(nil), String) - -# Checks for uses of double negation (`!!`) to convert something to a boolean value. -# -# When using `EnforcedStyle: allowed_in_returns`, allow double negation in contexts -# that use boolean as a return value. When using `EnforcedStyle: forbidden`, double negation -# should be forbidden always. -# -# NOTE: when `something` is a boolean value -# `!!something` and `!something.nil?` are not the same thing. -# As you're unlikely to write code that can accept values of any type -# this is rarely a problem in practice. -# -# @example -# # bad -# !!something -# -# # good -# !something.nil? -# @example EnforcedStyle: allowed_in_returns (default) -# # good -# def foo? -# !!return_value -# end -# -# define_method :foo? do -# !!return_value -# end -# -# define_singleton_method :foo? do -# !!return_value -# end -# @example EnforcedStyle: forbidden -# # bad -# def foo? -# !!return_value -# end -# -# define_method :foo? do -# !!return_value -# end -# -# define_singleton_method :foo? do -# !!return_value -# end -# -# source://rubocop//lib/rubocop/cop/style/double_negation.rb#61 -class RuboCop::Cop::Style::DoubleNegation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/double_negation.rb#69 - def double_negative?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/double_negation.rb#71 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/double_negation.rb#84 - def allowed_in_returns?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/double_negation.rb#111 - def define_method?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/double_negation.rb#138 - def double_negative_condition_return_value?(node, last_child, conditional_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/double_negation.rb#88 - def end_of_method_definition?(node); end - - # source://rubocop//lib/rubocop/cop/style/double_negation.rb#120 - def find_conditional_node_from_ascendant(node); end - - # source://rubocop//lib/rubocop/cop/style/double_negation.rb#103 - def find_def_node_from_ascendant(node); end - - # source://rubocop//lib/rubocop/cop/style/double_negation.rb#127 - def find_last_child(node); end - - # source://rubocop//lib/rubocop/cop/style/double_negation.rb#147 - def find_parent_not_enumerable(node); end -end - -# source://rubocop//lib/rubocop/cop/style/double_negation.rb#65 -RuboCop::Cop::Style::DoubleNegation::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/double_negation.rb#66 -RuboCop::Cop::Style::DoubleNegation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for loops which iterate a constant number of times, -# using a `Range` literal and `#each`. This can be done more readably using -# `Integer#times`. -# -# This check only applies if the block takes no parameters. -# -# @example -# # bad -# (1..5).each { } -# -# # good -# 5.times { } -# -# # bad -# (0...10).each {} -# -# # good -# 10.times {} -# -# source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#24 -class RuboCop::Cop::Style::EachForSimpleLoop < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#52 - def each_range(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#63 - def each_range_with_zero_origin?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#74 - def each_range_without_block_argument?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#29 - def on_block(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#45 - def offending?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#27 -RuboCop::Cop::Style::EachForSimpleLoop::MSG = T.let(T.unsafe(nil), String) - -# Looks for inject / reduce calls where the passed in object is -# returned at the end and so could be replaced by each_with_object without -# the need to return the object at the end. -# -# However, we can't replace with each_with_object if the accumulator -# parameter is assigned to within the block. -# -# @example -# # bad -# [1, 2].inject({}) { |a, e| a[e] = e; a } -# -# # good -# [1, 2].each_with_object({}) { |e, a| a[e] = e } -# -# source://rubocop//lib/rubocop/cop/style/each_with_object.rb#19 -class RuboCop::Cop::Style::EachWithObject < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#60 - def each_with_object_block_candidate?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#65 - def each_with_object_numblock_candidate?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#26 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#43 - def on_numblock(node); end - - private - - # if the accumulator parameter is assigned to in the block, - # then we can't convert to each_with_object - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#101 - def accumulator_param_assigned_to?(body, args); end - - # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#69 - def autocorrect_block(corrector, node, return_value); end - - # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#83 - def autocorrect_numblock(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#120 - def first_argument_returned?(args, return_value); end - - # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#113 - def return_value(body); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#128 - def return_value_occupies_whole_line?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#95 - def simple_method_arg?(method_arg); end - - # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#132 - def whole_line_expression(node); end -end - -# source://rubocop//lib/rubocop/cop/style/each_with_object.rb#24 -RuboCop::Cop::Style::EachWithObject::METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/each_with_object.rb#23 -RuboCop::Cop::Style::EachWithObject::MSG = T.let(T.unsafe(nil), String) - -# Checks for pipes for empty block parameters. Pipes for empty -# block parameters do not cause syntax errors, but they are redundant. -# -# @example -# # bad -# a do || -# do_something -# end -# -# # bad -# a { || do_something } -# -# # good -# a do -# end -# -# # good -# a { do_something } -# -# source://rubocop//lib/rubocop/cop/style/empty_block_parameter.rb#24 -class RuboCop::Cop::Style::EmptyBlockParameter < ::RuboCop::Cop::Base - include ::RuboCop::Cop::EmptyParameter - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/empty_block_parameter.rb#31 - def on_block(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/empty_block_parameter.rb#38 - def autocorrect(corrector, node); end -end - -# source://rubocop//lib/rubocop/cop/style/empty_block_parameter.rb#29 -RuboCop::Cop::Style::EmptyBlockParameter::MSG = T.let(T.unsafe(nil), String) - -# Checks for case statements with an empty condition. -# -# @example -# -# # bad: -# case -# when x == 0 -# puts 'x is 0' -# when y == 0 -# puts 'y is 0' -# else -# puts 'neither is 0' -# end -# -# # good: -# if x == 0 -# puts 'x is 0' -# elsif y == 0 -# puts 'y is 0' -# else -# puts 'neither is 0' -# end -# -# # good: (the case condition node is not empty) -# case n -# when 0 -# puts 'zero' -# when 1 -# puts 'one' -# else -# puts 'more' -# end -# -# source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#38 -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#46 - def on_case(case_node); end - - private - - # 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#70 - def correct_case_when(corrector, case_node, when_nodes); end - - # 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#97 - def keep_first_when_comment(case_range, corrector); end - - # 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. -# -# @example EnforcedStyle: both (default) -# # warn on empty else and else with nil in it -# -# # bad -# if condition -# statement -# else -# nil -# end -# -# # bad -# if condition -# statement -# else -# end -# -# # good -# if condition -# statement -# else -# statement -# end -# -# # good -# if condition -# statement -# end -# @example EnforcedStyle: empty -# # warn only on empty else -# -# # bad -# if condition -# statement -# else -# end -# -# # good -# if condition -# statement -# else -# nil -# end -# -# # good -# if condition -# statement -# else -# statement -# end -# -# # good -# if condition -# statement -# end -# @example EnforcedStyle: nil -# # warn on else with nil in it -# -# # bad -# if condition -# statement -# else -# nil -# end -# -# # good -# if condition -# statement -# else -# end -# -# # good -# if condition -# statement -# else -# statement -# end -# -# # good -# if condition -# statement -# end -# @example AllowComments: false (default) -# -# # bad -# if condition -# statement -# else -# # something comment -# nil -# end -# -# # bad -# if condition -# statement -# else -# # something comment -# end -# @example AllowComments: true -# -# # good -# if condition -# statement -# else -# # something comment -# nil -# end -# -# # good -# if condition -# statement -# else -# # something comment -# end -# -# source://rubocop//lib/rubocop/cop/style/empty_else.rb#127 -class RuboCop::Cop::Style::EmptyElse < ::RuboCop::Cop::Base - include ::RuboCop::Cop::OnNormalIfUnless - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#141 - def on_case(node); end - - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#137 - def on_normal_if_unless(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#174 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#196 - def autocorrect_forbidden?(type); end - - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#189 - def base_node(node); end - - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#147 - def check(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#182 - def comment_in_else?(node); end - - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#162 - def empty_check(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#158 - def empty_style?; end - - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#200 - def missing_else_style; end - - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#168 - def nil_check(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#154 - def nil_style?; end -end - -# source://rubocop//lib/rubocop/cop/style/empty_else.rb#135 -RuboCop::Cop::Style::EmptyElse::EMPTY_STYLES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/empty_else.rb#133 -RuboCop::Cop::Style::EmptyElse::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/empty_else.rb#134 -RuboCop::Cop::Style::EmptyElse::NIL_STYLES = T.let(T.unsafe(nil), Array) - -# Checks for using empty heredoc to reduce redundancy. -# -# @example -# -# # bad -# <<~EOS -# EOS -# -# <<-EOS -# EOS -# -# < () { do_something } -# -# # good -# -> { do_something } -# -# # good -# -> (arg) { do_something(arg) } -# -# source://rubocop//lib/rubocop/cop/style/empty_lambda_parameter.rb#19 -class RuboCop::Cop::Style::EmptyLambdaParameter < ::RuboCop::Cop::Base - include ::RuboCop::Cop::EmptyParameter - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/empty_lambda_parameter.rb#26 - def on_block(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/empty_lambda_parameter.rb#35 - def autocorrect(corrector, node); end -end - -# source://rubocop//lib/rubocop/cop/style/empty_lambda_parameter.rb#24 -RuboCop::Cop::Style::EmptyLambdaParameter::MSG = T.let(T.unsafe(nil), String) - -# Checks for the use of a method, the result of which -# would be a literal, like an empty array, hash, or string. -# -# @example -# # bad -# a = Array.new -# a = Array[] -# h = Hash.new -# h = Hash[] -# s = String.new -# -# # good -# a = [] -# h = {} -# s = '' -# -# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#21 -class RuboCop::Cop::Style::EmptyLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::FrozenStringLiteral - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::StringLiteralsHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#34 - def array_node(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#43 - def array_with_block(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#54 - def array_with_index(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#37 - def hash_node(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#46 - def hash_with_block(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#62 - def hash_with_index(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#69 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#40 - def str_node(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#118 - def correction(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#89 - def first_argument_unparenthesized?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#136 - def frozen_strings?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#109 - def offense_array_node?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#113 - def offense_hash_node?(node); end - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#79 - def offense_message(node); end - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#96 - def replacement_range(node); end -end - -# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#27 -RuboCop::Cop::Style::EmptyLiteral::ARR_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#28 -RuboCop::Cop::Style::EmptyLiteral::HASH_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#31 -RuboCop::Cop::Style::EmptyLiteral::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#29 -RuboCop::Cop::Style::EmptyLiteral::STR_MSG = T.let(T.unsafe(nil), String) - -# Checks for the formatting of empty method definitions. -# By default it enforces empty method definitions to go on a single -# line (compact style), but it can be configured to enforce the `end` -# to go on its own line (expanded style). -# -# NOTE: A method definition is not considered empty if it contains -# comments. -# -# NOTE: Autocorrection will not be applied for the `compact` style -# if the resulting code is longer than the `Max` configuration for -# `Layout/LineLength`, but an offense will still be registered. -# -# @example EnforcedStyle: compact (default) -# # bad -# def foo(bar) -# end -# -# def self.foo(bar) -# end -# -# # good -# def foo(bar); end -# -# def foo(bar) -# # baz -# end -# -# def self.foo(bar); end -# @example EnforcedStyle: expanded -# # bad -# def foo(bar); end -# -# def self.foo(bar); end -# -# # good -# def foo(bar) -# end -# -# def self.foo(bar) -# end -# -# source://rubocop//lib/rubocop/cop/style/empty_method.rb#47 -class RuboCop::Cop::Style::EmptyMethod < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/empty_method.rb#54 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/empty_method.rb#54 - def on_defs(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_method.rb#95 - def compact?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_method.rb#103 - def compact_style?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_method.rb#73 - def correct_style?(node); end - - # source://rubocop//lib/rubocop/cop/style/empty_method.rb#77 - def corrected(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_method.rb#99 - def expanded?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_method.rb#107 - def expanded_style?; end - - # source://rubocop//lib/rubocop/cop/style/empty_method.rb#89 - def joint(node); end - - # source://rubocop//lib/rubocop/cop/style/empty_method.rb#111 - def max_line_length; end - - # source://rubocop//lib/rubocop/cop/style/empty_method.rb#69 - def message(_range); end -end - -# source://rubocop//lib/rubocop/cop/style/empty_method.rb#51 -RuboCop::Cop::Style::EmptyMethod::MSG_COMPACT = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/empty_method.rb#52 -RuboCop::Cop::Style::EmptyMethod::MSG_EXPANDED = T.let(T.unsafe(nil), String) - -# Checks ensures source files have no utf-8 encoding comments. -# -# @example -# # bad -# # encoding: UTF-8 -# # coding: UTF-8 -# # -*- coding: UTF-8 -*- -# -# source://rubocop//lib/rubocop/cop/style/encoding.rb#12 -class RuboCop::Cop::Style::Encoding < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/encoding.rb#20 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/style/encoding.rb#32 - def comments; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/encoding.rb#43 - def offense?(comment); end - - # source://rubocop//lib/rubocop/cop/style/encoding.rb#47 - def register_offense(line_number, comment); end -end - -# source://rubocop//lib/rubocop/cop/style/encoding.rb#17 -RuboCop::Cop::Style::Encoding::ENCODING_PATTERN = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/encoding.rb#16 -RuboCop::Cop::Style::Encoding::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/encoding.rb#18 -RuboCop::Cop::Style::Encoding::SHEBANG = T.let(T.unsafe(nil), String) - -# Checks for END blocks. -# -# @example -# # bad -# END { puts 'Goodbye!' } -# -# # good -# at_exit { puts 'Goodbye!' } -# -# source://rubocop//lib/rubocop/cop/style/end_block.rb#15 -class RuboCop::Cop::Style::EndBlock < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/end_block.rb#20 - def on_postexe(node); end -end - -# source://rubocop//lib/rubocop/cop/style/end_block.rb#18 -RuboCop::Cop::Style::EndBlock::MSG = T.let(T.unsafe(nil), String) - -# Checks for endless methods. -# -# It can enforce endless method definitions whenever possible or with single line methods. -# It can also disallow multiline endless method definitions or all endless definitions. -# -# `require_single_line` style enforces endless method definitions for single line methods. -# `require_always` style enforces endless method definitions for single statement methods. -# -# Other method definition types are not considered by this cop. -# -# The supported styles are: -# -# * allow_single_line (default) - only single line endless method definitions are allowed. -# * allow_always - all endless method definitions are allowed. -# * disallow - all endless method definitions are disallowed. -# * require_single_line - endless method definitions are required for single line methods. -# * require_always - all endless method definitions are required. -# -# NOTE: Incorrect endless method definitions will always be -# corrected to a multi-line definition. -# -# @example EnforcedStyle: allow_single_line (default) -# # bad, multi-line endless method -# def my_method = x.foo -# .bar -# .baz -# -# # good -# def my_method -# x -# end -# -# # good -# def my_method = x -# -# # good -# def my_method -# x.foo -# .bar -# .baz -# end -# @example EnforcedStyle: allow_always -# # good -# def my_method -# x -# end -# -# # good -# def my_method = x -# -# # good -# def my_method = x.foo -# .bar -# .baz -# -# # good -# def my_method -# x.foo -# .bar -# .baz -# end -# @example EnforcedStyle: disallow -# # bad -# def my_method = x -# -# # bad -# def my_method = x.foo -# .bar -# .baz -# -# # good -# def my_method -# x -# end -# -# # good -# def my_method -# x.foo -# .bar -# .baz -# end -# @example EnforcedStyle: require_single_line -# # bad -# def my_method -# x -# end -# -# # bad -# def my_method = x.foo -# .bar -# .baz -# -# # good -# def my_method = x -# -# # good -# def my_method -# x.foo -# .bar -# .baz -# end -# @example EnforcedStyle: require_always -# # bad -# def my_method -# x -# end -# -# # bad -# def my_method -# x.foo -# .bar -# .baz -# end -# -# # good -# def my_method = x -# -# # good -# def my_method = x.foo -# .bar -# .baz -# -# source://rubocop//lib/rubocop/cop/style/endless_method.rb#132 -class RuboCop::Cop::Style::EndlessMethod < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::EndlessMethodRewriter - extend ::RuboCop::Cop::TargetRubyVersion - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/endless_method.rb#146 - def on_def(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/endless_method.rb#217 - def arguments(node, missing = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/endless_method.rb#221 - def can_be_made_endless?(node); end - - # source://rubocop//lib/rubocop/cop/style/endless_method.rb#201 - def correct_to_multiline(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/endless_method.rb#211 - def endless_replacement(node); end - - # source://rubocop//lib/rubocop/cop/style/endless_method.rb#163 - def handle_allow_style(node); end - - # source://rubocop//lib/rubocop/cop/style/endless_method.rb#195 - def handle_disallow_style(node); end - - # source://rubocop//lib/rubocop/cop/style/endless_method.rb#186 - def handle_require_always_style(node); end - - # source://rubocop//lib/rubocop/cop/style/endless_method.rb#172 - def handle_require_single_line_style(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/endless_method.rb#225 - def too_long_when_made_endless?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/endless_method.rb#140 -RuboCop::Cop::Style::EndlessMethod::CORRECTION_STYLES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/endless_method.rb#141 -RuboCop::Cop::Style::EndlessMethod::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/endless_method.rb#142 -RuboCop::Cop::Style::EndlessMethod::MSG_MULTI_LINE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/endless_method.rb#144 -RuboCop::Cop::Style::EndlessMethod::MSG_REQUIRE_ALWAYS = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/endless_method.rb#143 -RuboCop::Cop::Style::EndlessMethod::MSG_REQUIRE_SINGLE = T.let(T.unsafe(nil), String) - -# Checks for consistent usage of `ENV['HOME']`. If `nil` is used as -# the second argument of `ENV.fetch`, it is treated as a bad case like `ENV[]`. -# -# @example -# -# # bad -# ENV['HOME'] -# ENV.fetch('HOME', nil) -# -# # good -# Dir.home -# -# # good -# ENV.fetch('HOME', default) -# -# source://rubocop//lib/rubocop/cop/style/env_home.rb#31 -class RuboCop::Cop::Style::EnvHome < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/env_home.rb#38 - def env_home?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/env_home.rb#45 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/style/env_home.rb#34 -RuboCop::Cop::Style::EnvHome::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/env_home.rb#35 -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 -# 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 -# correct. -# -# This cop will autocorrect incorrect or missing filename and line number -# values. However, if `eval` is called without a binding argument, the cop -# will not attempt to automatically add a binding, or add filename and -# line values. -# -# NOTE: This cop works only when a string literal is given as a code string. -# No offense is reported if a string variable is given as below: -# -# [source,ruby] -# ---- -# code = <<-RUBY -# def do_something -# end -# RUBY -# eval code # not checked. -# ---- -# -# @example -# # bad -# eval <<-RUBY -# def do_something -# end -# RUBY -# -# # bad -# C.class_eval <<-RUBY -# def do_something -# end -# RUBY -# -# # good -# eval <<-RUBY, binding, __FILE__, __LINE__ + 1 -# def do_something -# end -# RUBY -# -# # good -# C.class_eval <<-RUBY, __FILE__, __LINE__ + 1 -# def do_something -# end -# RUBY -# -# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#57 -class RuboCop::Cop::Style::EvalWithLocation < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#75 - def line_with_offset?(param0 = T.unsafe(nil), param1, param2); end - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#82 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#70 - def valid_eval_receiver?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#187 - def add_offense_for_different_line(node, line_node, line_diff); end - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#132 - def add_offense_for_incorrect_line(method_name, line_node, sign, line_diff); end - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#202 - def add_offense_for_missing_line(node, code); end - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#209 - def add_offense_for_missing_location(node, code); end - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#181 - def add_offense_for_same_line(node, line_node); end - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#144 - def check_file(node, file_node); end - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#157 - def check_line(node, code); end - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#96 - def check_location(node, code); end - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#194 - def expected_line(sign, line_diff); end - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#123 - def file_and_line(node); end - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#169 - def line_difference(line_node, code); end - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#221 - def missing_line(node, code); end - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#110 - def register_offense(node, &block); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#115 - def special_file_keyword?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#119 - def special_line_keyword?(node); end - - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#173 - def string_first_line(str_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#128 - def with_binding?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#60 -RuboCop::Cop::Style::EvalWithLocation::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#61 -RuboCop::Cop::Style::EvalWithLocation::MSG_EVAL = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#62 -RuboCop::Cop::Style::EvalWithLocation::MSG_INCORRECT_FILE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#64 -RuboCop::Cop::Style::EvalWithLocation::MSG_INCORRECT_LINE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#67 -RuboCop::Cop::Style::EvalWithLocation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for places where `Integer#even?` or `Integer#odd?` -# can be used. -# -# @example -# -# # bad -# if x % 2 == 0 -# end -# -# # good -# if x.even? -# end -# -# source://rubocop//lib/rubocop/cop/style/even_odd.rb#18 -class RuboCop::Cop::Style::EvenOdd < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/even_odd.rb#25 - def even_odd_candidate?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/even_odd.rb#33 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/even_odd.rb#45 - def replacement_method(arg, method); end -end - -# source://rubocop//lib/rubocop/cop/style/even_odd.rb#21 -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. -# -# Contrastive bad case and good case are alternately shown in -# the following examples. -# -# @example -# # bad -# File.expand_path('..', __FILE__) -# -# # good -# File.expand_path(__dir__) -# -# # bad -# File.expand_path('../..', __FILE__) -# -# # good -# File.expand_path('..', __dir__) -# -# # bad -# File.expand_path('.', __FILE__) -# -# # good -# File.expand_path(__FILE__) -# -# # bad -# Pathname(__FILE__).parent.expand_path -# -# # good -# Pathname(__dir__).expand_path -# -# # bad -# Pathname.new(__FILE__).parent.expand_path -# -# # good -# Pathname.new(__dir__).expand_path -# -# source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#43 -class RuboCop::Cop::Style::ExpandPathArguments < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#58 - def file_expand_path(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#82 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#74 - def pathname_new_parent_expand_path(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#66 - def pathname_parent_expand_path(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#100 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#135 - def autocorrect_expand_path(corrector, current_path, default_dir); end - - # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#162 - def depth(current_path); end - - # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#113 - def inspect_offense_for_expand_path(node, current_path, default_dir); end - - # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#168 - def parent_path(current_path); end - - # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#182 - def remove_parent_method(corrector, default_dir); end - - # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#155 - def strip_surrounded_quotes!(path_string); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#109 - def unrecommended_argument?(default_dir); end -end - -# source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#47 -RuboCop::Cop::Style::ExpandPathArguments::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#49 -RuboCop::Cop::Style::ExpandPathArguments::PATHNAME_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#51 -RuboCop::Cop::Style::ExpandPathArguments::PATHNAME_NEW_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#55 -RuboCop::Cop::Style::ExpandPathArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Enforces the use of explicit block argument to avoid writing -# block literal that just passes its arguments to another block. -# -# NOTE: This cop only registers an offense if the block args match the -# yield args exactly. -# -# @example -# # bad -# def with_tmp_dir -# Dir.mktmpdir do |tmp_dir| -# Dir.chdir(tmp_dir) { |dir| yield dir } # block just passes arguments -# end -# end -# -# # bad -# def nine_times -# 9.times { yield } -# end -# -# # good -# def with_tmp_dir(&block) -# Dir.mktmpdir do |tmp_dir| -# Dir.chdir(tmp_dir, &block) -# end -# end -# -# with_tmp_dir do |dir| -# puts "dir is accessible as a parameter and pwd is set: #{dir}" -# end -# -# # good -# def nine_times(&block) -# 9.times(&block) -# end -# -# source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#41 -class RuboCop::Cop::Style::ExplicitBlockArgument < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # @return [ExplicitBlockArgument] a new instance of ExplicitBlockArgument - # - # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#57 - def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#62 - def on_yield(node); end - - # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#49 - def yielding_block?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#108 - def add_block_argument(node, corrector, block_name); end - - # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#160 - def block_body_range(block_node, send_node); end - - # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#153 - def build_new_arguments_for_zsuper(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#125 - def call_like?(node); end - - # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#137 - def correct_call_node(node, corrector, block_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#120 - def empty_arguments?(node); end - - # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#87 - def extract_block_name(def_node); end - - # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#129 - def insert_argument(node, corrector, block_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#95 - def yielding_arguments?(block_args, yield_args); end - - class << self - # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#53 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#45 -RuboCop::Cop::Style::ExplicitBlockArgument::MSG = T.let(T.unsafe(nil), String) - -# Enforces consistency when using exponential notation -# for numbers in the code (eg 1.2e4). Different styles are supported: -# -# * `scientific` which enforces a mantissa between 1 (inclusive) and 10 (exclusive). -# * `engineering` which enforces the exponent to be a multiple of 3 and the mantissa -# to be between 0.1 (inclusive) and 1000 (exclusive). -# * `integral` which enforces the mantissa to always be a whole number without -# trailing zeroes. -# -# @example EnforcedStyle: scientific (default) -# # Enforces a mantissa between 1 (inclusive) and 10 (exclusive). -# -# # bad -# 10e6 -# 0.3e4 -# 11.7e5 -# 3.14e0 -# -# # good -# 1e7 -# 3e3 -# 1.17e6 -# 3.14 -# @example EnforcedStyle: engineering -# # Enforces using multiple of 3 exponents, -# # mantissa should be between 0.1 (inclusive) and 1000 (exclusive) -# -# # bad -# 3.2e7 -# 0.1e5 -# 12e5 -# 1232e6 -# -# # good -# 32e6 -# 10e3 -# 1.2e6 -# 1.232e9 -# @example EnforcedStyle: integral -# # Enforces the mantissa to have no decimal part and no -# # trailing zeroes. -# -# # bad -# 3.2e7 -# 0.1e5 -# 120e4 -# -# # good -# 32e6 -# 1e4 -# 12e5 -# -# source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#60 -class RuboCop::Cop::Style::ExponentialNotation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - # source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#68 - def on_float(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#79 - def engineering?(node); end - - # source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#90 - def integral(node); end - - # source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#110 - def message(_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#95 - def offense?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#74 - def scientific?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#62 -RuboCop::Cop::Style::ExponentialNotation::MESSAGES = T.let(T.unsafe(nil), Hash) - -# Suggests `ENV.fetch` for the replacement of `ENV[]`. -# `ENV[]` silently fails and returns `nil` when the environment variable is unset, -# which may cause unexpected behaviors when the developer forgets to set it. -# On the other hand, `ENV.fetch` raises `KeyError` or returns the explicitly -# specified default value. -# -# @example -# # bad -# ENV['X'] -# x = ENV['X'] -# -# # good -# ENV.fetch('X') -# x = ENV.fetch('X') -# -# # also good -# !ENV['X'] -# ENV['X'].some_method # (e.g. `.nil?`) -# -# source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#25 -class RuboCop::Cop::Style::FetchEnvVar < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#32 - def env_with_bracket?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#36 - def on_send(node); end - - private - - # The following are allowed cases: - # - # - Used as a flag (e.g., `if ENV['X']` or `!ENV['X']`) because - # it simply checks whether the variable is set. - # - Receiving a message with dot syntax, e.g. `ENV['X'].nil?`. - # - `ENV['key']` assigned by logical AND/OR assignment. - # - `ENV['key']` is the LHS of a `||`. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#106 - def allowable_use?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#49 - def allowed_var?(node); end - - # The following are allowed cases: - # - # - `ENV['key']` is a receiver of `||=`, e.g. `ENV['X'] ||= y`. - # - `ENV['key']` is a receiver of `&&=`, e.g. `ENV['X'] &&= y`. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#114 - def assigned?(node); end - - # Check if the node is a receiver and receives a message with dot syntax. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#90 - def message_chained_with_dot?(node); end - - # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#127 - def new_code(name_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#85 - def offensive?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#121 - def or_lhs?(node); end - - # Avoid offending in the following cases: - # `ENV['key'] if ENV['key'] = x` - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#81 - def partial_matched?(node, condition); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#54 - def used_as_flag?(node); end - - # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#61 - def used_if_condition_in_body(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#70 - def used_in_condition?(node, condition); end -end - -# source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#28 -RuboCop::Cop::Style::FetchEnvVar::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#29 -RuboCop::Cop::Style::FetchEnvVar::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Prefer to use `File.empty?('path/to/file')` when checking if a file is empty. -# -# @example -# # bad -# File.zero?('path/to/file') -# File.size('path/to/file') == 0 -# File.size('path/to/file') >= 0 -# File.size('path/to/file').zero? -# File.read('path/to/file').empty? -# File.binread('path/to/file') == '' -# FileTest.zero?('path/to/file') -# -# # good -# File.empty?('path/to/file') -# FileTest.empty?('path/to/file') -# -# source://rubocop//lib/rubocop/cop/style/file_empty.rb#27 -class RuboCop::Cop::Style::FileEmpty < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/file_empty.rb#37 - def offensive?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/file_empty.rb#49 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/file_empty.rb#62 - def bang(node); end -end - -# source://rubocop//lib/rubocop/cop/style/file_empty.rb#31 -RuboCop::Cop::Style::FileEmpty::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/file_empty.rb#32 -RuboCop::Cop::Style::FileEmpty::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Use `File::NULL` instead of hardcoding the null device (`/dev/null` on Unix-like -# OSes, `NUL` or `NUL:` on Windows), so that code is platform independent. -# Only looks for full string matches, substrings within a longer string are not -# considered. -# -# However, only files that use the string `'/dev/null'` are targeted for detection. -# This is because the string `'NUL'` is not limited to the null device. -# This behavior results in false negatives when the `'/dev/null'` string is not used, -# but it is a trade-off to avoid false positives. `NULL:` -# Unlike `'NUL'`, `'NUL:'` is regarded as something like `C:` and is always detected. -# -# NOTE: Uses inside arrays and hashes are ignored. -# -# @example -# # bad -# '/dev/null' -# 'NUL' -# 'NUL:' -# -# # good -# File::NULL -# -# # ok - inside an array -# null_devices = %w[/dev/null nul] -# -# # ok - inside a hash -# { unix: "/dev/null", windows: "nul" } -# -# source://rubocop//lib/rubocop/cop/style/file_null.rb#45 -class RuboCop::Cop::Style::FileNull < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/file_null.rb#51 - def on_new_investigation; end - - # source://rubocop//lib/rubocop/cop/style/file_null.rb#61 - def on_str(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/file_null.rb#79 - def acceptable?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/file_null.rb#75 - def valid_string?(value); end -end - -# source://rubocop//lib/rubocop/cop/style/file_null.rb#49 -RuboCop::Cop::Style::FileNull::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/file_null.rb#48 -RuboCop::Cop::Style::FileNull::REGEXP = T.let(T.unsafe(nil), Regexp) - -# Favor `File.(bin)read` convenience methods. -# -# @example -# # bad - text mode -# File.open(filename).read -# File.open(filename, &:read) -# File.open(filename) { |f| f.read } -# File.open(filename) do |f| -# f.read -# end -# File.open(filename, 'r').read -# File.open(filename, 'r', &:read) -# File.open(filename, 'r') do |f| -# f.read -# end -# -# # good -# File.read(filename) -# -# # bad - binary mode -# File.open(filename, 'rb').read -# File.open(filename, 'rb', &:read) -# File.open(filename, 'rb') do |f| -# f.read -# end -# -# # good -# File.binread(filename) -# -# source://rubocop//lib/rubocop/cop/style/file_read.rb#35 -class RuboCop::Cop::Style::FileRead < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/file_read.rb#62 - def block_read?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/file_read.rb#46 - def file_open?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/file_read.rb#66 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/file_read.rb#57 - def send_read?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/file_read.rb#81 - def evidence(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/file_read.rb#97 - def file_open_read?(node); end - - # source://rubocop//lib/rubocop/cop/style/file_read.rb#103 - def read_method(mode); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/file_read.rb#89 - def read_node?(node, block_pass); end -end - -# source://rubocop//lib/rubocop/cop/style/file_read.rb#39 -RuboCop::Cop::Style::FileRead::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/file_read.rb#43 -RuboCop::Cop::Style::FileRead::READ_FILE_START_TO_FINISH_MODES = T.let(T.unsafe(nil), Set) - -# source://rubocop//lib/rubocop/cop/style/file_read.rb#41 -RuboCop::Cop::Style::FileRead::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for usage of `File.open` in append mode with empty block. -# -# Such a usage only creates a new file, but it doesn't update -# timestamps for an existing file, which might have been the intention. -# -# For example, for an existing file `foo.txt`: -# -# ruby -e "puts File.mtime('foo.txt')" -# # 2024-11-26 12:17:23 +0100 -# -# ruby -e "File.open('foo.txt', 'a') {}" -# -# ruby -e "puts File.mtime('foo.txt')" -# # 2024-11-26 12:17:23 +0100 -> unchanged -# -# If the intention was to update timestamps, `FileUtils.touch('foo.txt')` -# should be used instead. -# -# @example -# # bad -# File.open(filename, 'a') {} -# File.open(filename, 'a+') {} -# -# # good -# FileUtils.touch(filename) -# -# source://rubocop//lib/rubocop/cop/style/file_touch.rb#36 -class RuboCop::Cop::Style::FileTouch < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/file_touch.rb#47 - def file_open?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/file_touch.rb#54 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/file_touch.rb#69 - def empty_block?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/file_touch.rb#44 -RuboCop::Cop::Style::FileTouch::APPEND_FILE_MODES = T.let(T.unsafe(nil), Set) - -# source://rubocop//lib/rubocop/cop/style/file_touch.rb#39 -RuboCop::Cop::Style::FileTouch::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/file_touch.rb#42 -RuboCop::Cop::Style::FileTouch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Favor `File.(bin)write` convenience methods. -# -# NOTE: There are different method signatures between `File.write` (class method) -# and `File#write` (instance method). The following case will be allowed because -# static analysis does not know the contents of the splat argument: -# -# [source,ruby] -# ---- -# File.open(filename, 'w') do |f| -# f.write(*objects) -# end -# ---- -# -# @example -# # bad - text mode -# File.open(filename, 'w').write(content) -# File.open(filename, 'w') do |f| -# f.write(content) -# end -# -# # good -# File.write(filename, content) -# -# # bad - binary mode -# File.open(filename, 'wb').write(content) -# File.open(filename, 'wb') do |f| -# f.write(content) -# end -# -# # good -# File.binwrite(filename, content) -# -# source://rubocop//lib/rubocop/cop/style/file_write.rb#38 -class RuboCop::Cop::Style::FileWrite < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/file_write.rb#65 - def block_write?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/file_write.rb#82 - def evidence(node); end - - # source://rubocop//lib/rubocop/cop/style/file_write.rb#49 - def file_open?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/file_write.rb#69 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/file_write.rb#60 - def send_write?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # @yield [content] - # - # source://rubocop//lib/rubocop/cop/style/file_write.rb#92 - def file_open_write?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/file_write.rb#120 - def heredoc?(write_node); end - - # source://rubocop//lib/rubocop/cop/style/file_write.rb#125 - def heredoc_range(first_argument); end - - # source://rubocop//lib/rubocop/cop/style/file_write.rb#105 - def replacement(mode, filename, content, write_node); end - - # source://rubocop//lib/rubocop/cop/style/file_write.rb#101 - def write_method(mode); end -end - -# source://rubocop//lib/rubocop/cop/style/file_write.rb#42 -RuboCop::Cop::Style::FileWrite::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/file_write.rb#44 -RuboCop::Cop::Style::FileWrite::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) - -# source://rubocop//lib/rubocop/cop/style/file_write.rb#46 -RuboCop::Cop::Style::FileWrite::TRUNCATING_WRITE_MODES = T.let(T.unsafe(nil), Set) - -# Checks for division with integers coerced to floats. -# It is recommended to either always use `fdiv` or coerce one side only. -# This cop also provides other options for code consistency. -# -# @example EnforcedStyle: single_coerce (default) -# # bad -# a.to_f / b.to_f -# -# # good -# a.to_f / b -# a / b.to_f -# @example EnforcedStyle: left_coerce -# # bad -# a / b.to_f -# a.to_f / b.to_f -# -# # good -# a.to_f / b -# @example EnforcedStyle: right_coerce -# # bad -# a.to_f / b -# a.to_f / b.to_f -# -# # good -# a / b.to_f -# @example EnforcedStyle: fdiv -# # bad -# a / b.to_f -# a.to_f / b -# a.to_f / b.to_f -# -# # good -# a.fdiv(b) -# -# source://rubocop//lib/rubocop/cop/style/float_division.rb#53 -class RuboCop::Cop::Style::FloatDivision < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/float_division.rb#79 - def any_coerce?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/float_division.rb#75 - def both_coerce?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/float_division.rb#71 - def left_coerce?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/float_division.rb#87 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/float_division.rb#67 - def right_coerce?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/float_division.rb#83 - def to_f_method?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/float_division.rb#125 - def add_to_f_method(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/float_division.rb#134 - def correct_from_slash_to_fdiv(corrector, node, receiver, argument); end - - # source://rubocop//lib/rubocop/cop/style/float_division.rb#145 - def extract_receiver_source(node); end - - # source://rubocop//lib/rubocop/cop/style/float_division.rb#121 - def message(_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/float_division.rb#106 - def offense_condition?(node); end - - # source://rubocop//lib/rubocop/cop/style/float_division.rb#129 - def remove_to_f_method(corrector, send_node); end -end - -# source://rubocop//lib/rubocop/cop/style/float_division.rb#57 -RuboCop::Cop::Style::FloatDivision::MESSAGES = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/style/float_division.rb#64 -RuboCop::Cop::Style::FloatDivision::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Looks for uses of the `for` keyword or `each` method. The -# preferred alternative is set in the EnforcedStyle configuration -# parameter. An `each` call with a block on a single line is always -# allowed. -# -# @example EnforcedStyle: each (default) -# # bad -# def foo -# for n in [1, 2, 3] do -# puts n -# end -# end -# -# # good -# def foo -# [1, 2, 3].each do |n| -# puts n -# end -# end -# @example EnforcedStyle: for -# # bad -# def foo -# [1, 2, 3].each do |n| -# puts n -# end -# end -# -# # good -# def foo -# for n in [1, 2, 3] do -# puts n -# end -# end -# -# source://rubocop//lib/rubocop/cop/style/for.rb#45 -class RuboCop::Cop::Style::For < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/for.rb#64 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/for.rb#53 - def on_for(node); end - - # source://rubocop//lib/rubocop/cop/style/for.rb#64 - def on_numblock(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/for.rb#83 - def suspect_enumerable?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/for.rb#49 -RuboCop::Cop::Style::For::EACH_LENGTH = T.let(T.unsafe(nil), Integer) - -# source://rubocop//lib/rubocop/cop/style/for.rb#50 -RuboCop::Cop::Style::For::PREFER_EACH = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/for.rb#51 -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#%`. -# -# 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', 'foo') -# puts '%10s' % 'foo' -# -# # good -# puts format('%10s', 'foo') -# @example EnforcedStyle: sprintf -# # bad -# puts format('%10s', 'foo') -# puts '%10s' % 'foo' -# -# # good -# puts sprintf('%10s', 'foo') -# @example EnforcedStyle: percent -# # bad -# puts format('%10s', 'foo') -# puts sprintf('%10s', 'foo') -# -# # good -# puts '%10s' % 'foo' -# -# 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#61 - def formatter(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/format_string.rb#74 - def on_send(node); end - - # 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#102 - def autocorrect(corrector, node); end - - # 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#132 - def autocorrect_to_percent(corrector, node); end - - # @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#94 - def message(detected_style); end - - # source://rubocop//lib/rubocop/cop/style/format_string.rb#98 - def method_name(style_name); end -end - -# 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#55 -RuboCop::Cop::Style::FormatString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Use a consistent style for tokens within a format string. -# -# By default, all strings are evaluated. In some cases, this may be undesirable, -# as they could be used as arguments to a method that does not consider -# them to be tokens, but rather other identifiers or just part of the string. -# -# `AllowedMethods` or `AllowedPatterns` can be configured with in order to mark specific -# methods as always allowed, thereby avoiding an offense from the cop. By default, there -# are no allowed methods. -# -# Additionally, the cop can be made conservative by configuring it with -# `Mode: conservative` (default `aggressive`). In this mode, tokens (regardless -# of `EnforcedStyle`) are only considered if used in the format string argument to the -# methods `printf`, `sprintf`, `format` and `%`. -# -# NOTE: Tokens in the `unannotated` style (eg. `%s`) are always treated as if -# configured with `Conservative: true`. This is done in order to prevent false positives, -# because this format is very similar to encoded URLs or Date/Time formatting strings. -# -# It is allowed to contain unannotated token -# if the number of them is less than or equals to -# `MaxUnannotatedPlaceholdersAllowed`. -# -# @example Mode: conservative, EnforcedStyle: annotated -# # In `conservative` mode, offenses are only registered for strings -# # given to a known formatting method. -# -# # good -# "%{greeting}" -# foo("%{greeting}") -# -# # bad -# format("%{greeting}", greeting: 'Hello') -# printf("%{greeting}", greeting: 'Hello') -# sprintf("%{greeting}", greeting: 'Hello') -# "%{greeting}" % { greeting: 'Hello' } -# @example EnforcedStyle: template -# -# # bad -# format('%s', greeting: 'Hello') -# format('%s', 'Hello') -# -# # good -# format('%{greeting}', greeting: 'Hello') -# @example EnforcedStyle: unannotated -# -# # bad -# format('%s', greeting: 'Hello') -# format('%{greeting}', greeting: 'Hello') -# -# # good -# format('%s', 'Hello') -# @example MaxUnannotatedPlaceholdersAllowed: 0 -# -# # bad -# format('%06d', 10) -# format('%s %s.', 'Hello', 'world') -# -# # good -# format('%06d', number: 10) -# @example MaxUnannotatedPlaceholdersAllowed: 1 (default) -# -# # bad -# format('%s %s.', 'Hello', 'world') -# -# # good -# format('%06d', 10) -# @example AllowedMethods: [] (default) -# -# # bad -# redirect('foo/%{bar_id}') -# @example AllowedMethods: [redirect] -# -# # good -# redirect('foo/%{bar_id}') -# @example AllowedPatterns: [] (default) -# -# # bad -# redirect('foo/%{bar_id}') -# @example AllowedPatterns: ['redirect'] -# -# # good -# redirect('foo/%{bar_id}') -# @example EnforcedStyle: annotated (default) -# -# # bad -# format('%{greeting}', greeting: 'Hello') -# format('%s', 'Hello') -# -# # good -# format('%s', greeting: 'Hello') -# -# source://rubocop//lib/rubocop/cop/style/format_string_token.rb#107 -class RuboCop::Cop::Style::FormatStringToken < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#128 - def format_string_in_typical_context?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#113 - def on_str(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#178 - def allowed_string?(node, detected_style); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#236 - def allowed_unannotated?(detections); end - - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#161 - def autocorrect_sequence(corrector, detected_sequence, token_range); end - - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#146 - def check_sequence(detected_sequence, token_range); end - - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#226 - def collect_detections(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#249 - def conservative?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#157 - def correctable_sequence?(detected_type); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#135 - def format_string_token?(node); end - - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#245 - def max_unannotated_placeholders_allowed; end - - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#183 - def message(detected_style); end - - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#188 - def message_text(style); end - - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#203 - def str_contents(source_map); end - - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#213 - def token_ranges(contents); end - - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#197 - def tokens(str_node, &block); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#139 - def use_allowed_method?(node); end -end - -# Helps you transition from mutable string literals -# to frozen string literals. -# of files to enable frozen string literals. Frozen string literals may be -# default in future Ruby. The comment will be added below a shebang and -# encoding comment. The frozen string literal comment is only valid in Ruby 2.3+. -# -# Note that the cop will accept files where the comment exists but is set -# to `false` instead of `true`. -# -# To require a blank line after this comment, please see -# `Layout/EmptyLineAfterMagicComment` cop. -# -# @example EnforcedStyle: always (default) -# # The `always` style will always add the frozen string literal comment -# # to a file, regardless of the Ruby version or if `freeze` or `<<` are -# # called on a string literal. -# # bad -# module Bar -# # ... -# end -# -# # good -# # frozen_string_literal: true -# -# module Bar -# # ... -# end -# -# # good -# # frozen_string_literal: false -# -# module Bar -# # ... -# end -# @example EnforcedStyle: never -# # The `never` will enforce that the frozen string literal comment does -# # not exist in a file. -# # bad -# # frozen_string_literal: true -# -# module Baz -# # ... -# end -# -# # good -# module Baz -# # ... -# end -# @example EnforcedStyle: always_true -# # The `always_true` style enforces that the frozen string literal -# # comment is set to `true`. This is a stricter option than `always` -# # and forces projects to use frozen string literals. -# # bad -# # frozen_string_literal: false -# -# module Baz -# # ... -# end -# -# # bad -# module Baz -# # ... -# end -# -# # good -# # frozen_string_literal: true -# -# module Bar -# # ... -# end -# -# source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#84 -class RuboCop::Cop::Style::FrozenStringLiteralComment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::FrozenStringLiteral - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#99 - def on_new_investigation; end - - private - - # 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#190 - def enable_comment(corrector); end - - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#120 - def ensure_comment(processed_source); end - - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#126 - def ensure_enabled_comment(processed_source); end - - # 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#214 - def following_comment; end - - # 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#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#206 - def line_range(line); end - - # 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#164 - def missing_true_offense(processed_source); end - - # 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#186 - def remove_comment(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#170 - def unnecessary_comment_offense(processed_source); end -end - -# source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#96 -RuboCop::Cop::Style::FrozenStringLiteralComment::MSG_DISABLED = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#94 -RuboCop::Cop::Style::FrozenStringLiteralComment::MSG_MISSING = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#93 -RuboCop::Cop::Style::FrozenStringLiteralComment::MSG_MISSING_TRUE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#95 -RuboCop::Cop::Style::FrozenStringLiteralComment::MSG_UNNECESSARY = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#97 -RuboCop::Cop::Style::FrozenStringLiteralComment::SHEBANG = T.let(T.unsafe(nil), String) - -# Enforces the use of `$stdout/$stderr/$stdin` instead of `STDOUT/STDERR/STDIN`. -# `STDOUT/STDERR/STDIN` are constants, and while you can actually -# reassign (possibly to redirect some stream) constants in Ruby, you'll get -# an interpreter warning if you do so. -# -# @example -# # bad -# STDOUT.puts('hello') -# -# hash = { out: STDOUT, key: value } -# -# def m(out = STDOUT) -# out.puts('hello') -# end -# -# # good -# $stdout.puts('hello') -# -# hash = { out: $stdout, key: value } -# -# def m(out = $stdout) -# out.puts('hello') -# end -# -# source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#34 -class RuboCop::Cop::Style::GlobalStdStream < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#42 - def const_to_gvar_assignment?(param0 = T.unsafe(nil), param1); end - - # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#46 - def on_const(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#70 - def gvar_name(const_name); end - - # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#62 - def message(const_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#66 - def namespaced?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#37 -RuboCop::Cop::Style::GlobalStdStream::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#39 -RuboCop::Cop::Style::GlobalStdStream::STD_STREAMS = T.let(T.unsafe(nil), Set) - -# Looks for uses of global variables. -# It does not report offenses for built-in global variables. -# Built-in global variables are allowed by default. Additionally -# users can allow additional variables via the AllowedVariables option. -# -# Note that backreferences like $1, $2, etc are not global variables. -# -# @example -# # bad -# $foo = 2 -# bar = $foo + 5 -# -# # good -# FOO = 2 -# foo = 2 -# $stdin.read -# -# source://rubocop//lib/rubocop/cop/style/global_vars.rb#22 -class RuboCop::Cop::Style::GlobalVars < ::RuboCop::Cop::Base - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/global_vars.rb#60 - def allowed_var?(global_var); end - - # source://rubocop//lib/rubocop/cop/style/global_vars.rb#72 - def check(node); end - - # source://rubocop//lib/rubocop/cop/style/global_vars.rb#64 - def on_gvar(node); end - - # source://rubocop//lib/rubocop/cop/style/global_vars.rb#68 - def on_gvasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/global_vars.rb#56 - def user_vars; end -end - -# built-in global variables and their English aliases -# https://www.zenspider.com/ruby/quickref.html -# -# source://rubocop//lib/rubocop/cop/style/global_vars.rb#27 -RuboCop::Cop::Style::GlobalVars::BUILT_IN_VARS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/global_vars.rb#23 -RuboCop::Cop::Style::GlobalVars::MSG = T.let(T.unsafe(nil), String) - -# Use a guard clause instead of wrapping the code inside a conditional -# expression -# -# A condition with an `elsif` or `else` branch is allowed unless -# one of `return`, `break`, `next`, `raise`, or `fail` is used -# in the body of the conditional expression. -# -# NOTE: Autocorrect works in most cases except with if-else statements -# that contain logical operators such as `foo || raise('exception')` -# -# @example -# # bad -# def test -# if something -# work -# end -# end -# -# # good -# def test -# return unless something -# -# work -# end -# -# # also good -# def test -# work if something -# end -# -# # bad -# if something -# raise 'exception' -# else -# ok -# end -# -# # good -# raise 'exception' if something -# ok -# -# # bad -# if something -# foo || raise('exception') -# else -# ok -# end -# -# # 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 -# if foo? -# work -# end -# -# if bar? # <- reports an offense -# work -# end -# end -# @example AllowConsecutiveConditionals: true -# # good -# def test -# if foo? -# work -# end -# -# if bar? -# work -# end -# end -# -# # bad -# def test -# if foo? -# work -# end -# -# do_something -# -# if bar? # <- reports an offense -# work -# end -# end -# -# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#114 -class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::MinBodyLength - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::StatementModifier - extend ::RuboCop::Cop::AutoCorrector - - # 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#123 - def on_defs(node); end - - # 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#275 - def accepted_form?(node, ending: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#285 - def accepted_if?(node, ending); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#312 - def allowed_consecutive_conditionals?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#265 - def and_or_guard_clause?(guard_clause); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#296 - def assigned_lvar_used_in_if_branch?(node); end - - # 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#236 - def autocorrect_heredoc_argument(corrector, node, heredoc_branch, leave_branch, guard); end - - # 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#170 - def check_ending_if(node); end - - # @return [Boolean] - # - # 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#257 - def guard_clause_source(guard_clause); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#232 - def heredoc?(argument); end - - # 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#188 - def register_offense(node, scope_exiting_keyword, conditional_keyword, guard = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#308 - def remove_whole_lines(corrector, range); end - - # @return [Boolean] - # - # 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#279 - def trivial?(node); end -end - -# 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 -# array item depending on configuration. -# -# NOTE: This cop will ignore arrays where all items are hashes, regardless of -# EnforcedStyle. -# -# @example EnforcedStyle: braces (default) -# # bad -# [1, 2, one: 1, two: 2] -# -# # good -# [1, 2, { one: 1, two: 2 }] -# -# # good -# [{ one: 1 }, { two: 2 }] -# @example EnforcedStyle: no_braces -# # bad -# [1, 2, { one: 1, two: 2 }] -# -# # good -# [1, 2, one: 1, two: 2] -# -# # good -# [{ one: 1 }, { two: 2 }] -# -# source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#31 -class RuboCop::Cop::Style::HashAsLastArrayItem < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#36 - def on_hash(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#85 - def braces_style?; end - - # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#66 - def check_braces(node); end - - # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#74 - def check_no_braces(node); end - - # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#50 - def containing_array(hash_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#61 - def explicit_array?(array); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#55 - def last_array_item?(array, node); end - - # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#89 - def remove_last_element_trailing_comma(corrector, node); end -end - -# Checks the usage of pre-2.1 `Hash[args]` method of converting enumerables and -# sequences of values to hashes. -# -# Correction code from splat argument (`Hash[*ary]`) is not simply determined. For example, -# `Hash[*ary]` can be replaced with `ary.each_slice(2).to_h` but it will be complicated. -# So, `AllowSplatArgument` option is true by default to allow splat argument for simple code. -# -# @example -# # bad -# Hash[ary] -# -# # good -# ary.to_h -# -# # bad -# Hash[key1, value1, key2, value2] -# -# # good -# {key1 => value1, key2 => value2} -# @example AllowSplatArgument: true (default) -# # good -# Hash[*ary] -# @example AllowSplatArgument: false -# # bad -# Hash[*ary] -# -# 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#54 - def hash_from_array?(param0 = T.unsafe(nil)); end - - # 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#137 - def allowed_splat_argument?; end - - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#130 - def args_to_hash(args); end - - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#117 - def multi_argument(node); end - - # 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#103 - def register_offense_for_zip_method(node, zip_method); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#113 - def requires_parens?(node); end - - # 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#88 - def use_zip_method_without_argument?(first_argument); end -end - -# 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#48 -RuboCop::Cop::Style::HashConversion::MSG_LITERAL_MULTI_ARG = T.let(T.unsafe(nil), String) - -# 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#47 -RuboCop::Cop::Style::HashConversion::MSG_TO_H = T.let(T.unsafe(nil), String) - -# 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. -# -# NOTE: If you have an array of two-element arrays, you can put -# parentheses around the block arguments to indicate that you're not -# working with a hash, and suppress RuboCop offenses. -# -# @example -# # bad -# hash.keys.each { |k| p k } -# 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#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#79 - 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#61 - def hash_mutated?(param0 = T.unsafe(nil), param1); 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#56 - def kv_each_with_block_pass(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#65 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#100 - def on_block_pass(node); end - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#65 - def on_numblock(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#183 - def check_argument(variable); end - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#207 - def correct_args(node, corrector); end - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#193 - def correct_implicit(node, corrector, method_name); end - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#198 - def correct_key_value_each(node, corrector); end - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#179 - def format_message(method_name, current); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#108 - def handleable?(node); end - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#214 - def kv_range(outer_node); end - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#139 - def message(prefer, method_name, unused_code); end - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#145 - def register_each_args_offense(node, message, prefer, unused_range); end - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#116 - def register_kv_offense(target, method); end - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#152 - def register_kv_with_block_pass_offense(node, target, method); end - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#170 - def root_receiver(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#127 - def unused_block_arg_exist?(node, block_arg); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#163 - def use_array_converter_method_as_preceding?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#189 - def used?(arg); end -end - -# 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. -# -# This cop should only be enabled on Ruby version 3.0 or higher. -# (`Hash#except` was added in Ruby 3.0.) -# -# For safe detection, it is limited to commonly used string and symbol comparisons -# when using `==` or `!=`. -# -# This cop doesn't check for `Hash#delete_if` and `Hash#keep_if` because they -# modify the receiver. -# -# @example -# -# # bad -# {foo: 1, bar: 2, baz: 3}.reject {|k, v| k == :bar } -# {foo: 1, bar: 2, baz: 3}.select {|k, v| k != :bar } -# {foo: 1, bar: 2, baz: 3}.filter {|k, v| k != :bar } -# {foo: 1, bar: 2, baz: 3}.reject {|k, v| k.eql?(:bar) } -# -# # bad -# {foo: 1, bar: 2, baz: 3}.reject {|k, v| %i[bar].include?(k) } -# {foo: 1, bar: 2, baz: 3}.select {|k, v| !%i[bar].include?(k) } -# {foo: 1, bar: 2, baz: 3}.filter {|k, v| !%i[bar].include?(k) } -# -# # good -# {foo: 1, bar: 2, baz: 3}.except(:bar) -# @example AllCops:ActiveSupportExtensionsEnabled: false (default) -# -# # good -# {foo: 1, bar: 2, baz: 3}.reject {|k, v| !%i[bar].exclude?(k) } -# {foo: 1, bar: 2, baz: 3}.select {|k, v| %i[bar].exclude?(k) } -# -# # good -# {foo: 1, bar: 2, baz: 3}.reject {|k, v| k.in?(%i[bar]) } -# {foo: 1, bar: 2, baz: 3}.select {|k, v| !k.in?(%i[bar]) } -# @example AllCops:ActiveSupportExtensionsEnabled: true -# -# # bad -# {foo: 1, bar: 2, baz: 3}.reject {|k, v| !%i[bar].exclude?(k) } -# {foo: 1, bar: 2, baz: 3}.select {|k, v| %i[bar].exclude?(k) } -# -# # bad -# {foo: 1, bar: 2, baz: 3}.reject {|k, v| k.in?(%i[bar]) } -# {foo: 1, bar: 2, baz: 3}.select {|k, v| !k.in?(%i[bar]) } -# -# # good -# {foo: 1, bar: 2, baz: 3}.except(:bar) -# -# source://rubocop//lib/rubocop/cop/style/hash_except.rb#61 -class RuboCop::Cop::Style::HashExcept < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::HashSubset - extend ::RuboCop::Cop::TargetRubyVersion - extend ::RuboCop::Cop::AutoCorrector - - private - - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#74 - def preferred_method_name; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#70 - def semantically_subset_method?(node); end -end - -# Checks for places where `case-when` represents a simple 1:1 -# mapping and can be replaced with a hash lookup. -# -# @example MinBranchesCount: 3 (default) -# # bad -# case country -# when 'europe' -# 'http://eu.example.com' -# when 'america' -# 'http://us.example.com' -# when 'australia' -# 'http://au.example.com' -# end -# -# # good -# SITES = { -# 'europe' => 'http://eu.example.com', -# 'america' => 'http://us.example.com', -# 'australia' => 'http://au.example.com' -# } -# SITES[country] -# @example MinBranchesCount: 4 -# # good -# case country -# when 'europe' -# 'http://eu.example.com' -# when 'america' -# 'http://us.example.com' -# when 'australia' -# 'http://au.example.com' -# end -# -# source://rubocop//lib/rubocop/cop/style/hash_like_case.rb#39 -class RuboCop::Cop::Style::HashLikeCase < ::RuboCop::Cop::Base - include ::RuboCop::Cop::MinBranchesCount - - # source://rubocop//lib/rubocop/cop/style/hash_like_case.rb#45 - def hash_like_case?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/hash_like_case.rb#53 - def on_case(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_like_case.rb#65 - def nodes_of_same_type?(nodes); end -end - -# source://rubocop//lib/rubocop/cop/style/hash_like_case.rb#42 -RuboCop::Cop::Style::HashLikeCase::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#slice` method. -# -# This cop should only be enabled on Ruby version 2.5 or higher. -# (`Hash#slice` was added in Ruby 2.5.) -# -# For safe detection, it is limited to commonly used string and symbol comparisons -# when using `==` or `!=`. -# -# This cop doesn't check for `Hash#delete_if` and `Hash#keep_if` because they -# modify the receiver. -# -# @example -# -# # bad -# {foo: 1, bar: 2, baz: 3}.select {|k, v| k == :bar } -# {foo: 1, bar: 2, baz: 3}.reject {|k, v| k != :bar } -# {foo: 1, bar: 2, baz: 3}.filter {|k, v| k == :bar } -# {foo: 1, bar: 2, baz: 3}.select {|k, v| k.eql?(:bar) } -# -# # bad -# {foo: 1, bar: 2, baz: 3}.select {|k, v| %i[bar].include?(k) } -# {foo: 1, bar: 2, baz: 3}.reject {|k, v| !%i[bar].include?(k) } -# {foo: 1, bar: 2, baz: 3}.filter {|k, v| %i[bar].include?(k) } -# -# # good -# {foo: 1, bar: 2, baz: 3}.slice(:bar) -# @example AllCops:ActiveSupportExtensionsEnabled: false (default) -# -# # good -# {foo: 1, bar: 2, baz: 3}.select {|k, v| !%i[bar].exclude?(k) } -# {foo: 1, bar: 2, baz: 3}.reject {|k, v| %i[bar].exclude?(k) } -# -# # good -# {foo: 1, bar: 2, baz: 3}.select {|k, v| k.in?(%i[bar]) } -# {foo: 1, bar: 2, baz: 3}.reject {|k, v| !k.in?(%i[bar]) } -# @example AllCops:ActiveSupportExtensionsEnabled: true -# -# # bad -# {foo: 1, bar: 2, baz: 3}.select {|k, v| !%i[bar].exclude?(k) } -# {foo: 1, bar: 2, baz: 3}.reject {|k, v| %i[bar].exclude?(k) } -# -# # bad -# {foo: 1, bar: 2, baz: 3}.select {|k, v| k.in?(%i[bar]) } -# {foo: 1, bar: 2, baz: 3}.reject {|k, v| !k.in?(%i[bar]) } -# -# # good -# {foo: 1, bar: 2, baz: 3}.slice(:bar) -# -# source://rubocop//lib/rubocop/cop/style/hash_slice.rb#61 -class RuboCop::Cop::Style::HashSlice < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::HashSubset - extend ::RuboCop::Cop::TargetRubyVersion - extend ::RuboCop::Cop::AutoCorrector - - private - - # source://rubocop//lib/rubocop/cop/style/hash_slice.rb#74 - def preferred_method_name; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_slice.rb#70 - def semantically_subset_method?(node); end -end - -# Checks hash literal syntax. -# -# It can enforce either the use of the class hash rocket syntax or -# the use of the newer Ruby 1.9 syntax (when applicable). -# -# A separate offense is registered for each problematic pair. -# -# The supported styles are: -# -# * ruby19 - forces use of the 1.9 syntax (e.g. `{a: 1}`) when hashes have -# all symbols for keys -# * hash_rockets - forces use of hash rockets for all hashes -# * no_mixed_keys - simply checks for hashes with mixed syntaxes -# * ruby19_no_mixed_keys - forces use of ruby 1.9 syntax and forbids mixed -# syntax hashes -# -# This cop has `EnforcedShorthandSyntax` option. -# It can enforce either the use of the explicit hash value syntax or -# the use of Ruby 3.1's hash value shorthand syntax. -# -# The supported styles are: -# -# * always - forces use of the 3.1 syntax (e.g. {foo:}) -# * never - forces use of explicit hash literal value -# * either - accepts both shorthand and explicit use of hash literal value -# * consistent - forces use of the 3.1 syntax only if all values can be omitted in the hash -# * either_consistent - accepts both shorthand and explicit use of hash literal value, -# but they must be consistent -# -# @example EnforcedShorthandSyntax: either_consistent -# -# # good - `foo` and `bar` values can be omitted, but they are consistent, so it's accepted -# {foo: foo, bar: bar} -# -# # bad - `bar` value can be omitted -# {foo:, bar: bar} -# -# # bad - mixed syntaxes -# {foo:, bar: baz} -# -# # good -# {foo:, bar:} -# -# # good - can't omit `baz` -# {foo: foo, bar: baz} -# @example EnforcedStyle: hash_rockets -# # bad -# {a: 1, b: 2} -# {c: 1, 'd' => 5} -# -# # good -# {:a => 1, :b => 2} -# @example EnforcedStyle: no_mixed_keys -# # bad -# {:a => 1, b: 2} -# {c: 1, 'd' => 2} -# -# # good -# {:a => 1, :b => 2} -# {c: 1, d: 2} -# @example EnforcedStyle: ruby19_no_mixed_keys -# # bad -# {:a => 1, :b => 2} -# {c: 2, 'd' => 3} # should just use hash rockets -# -# # good -# {a: 1, b: 2} -# {:c => 3, 'd' => 4} -# @example EnforcedShorthandSyntax: always -# -# # bad -# {foo: foo, bar: bar} -# -# # good -# {foo:, bar:} -# @example EnforcedShorthandSyntax: never -# -# # bad -# {foo:, bar:} -# -# # good -# {foo: foo, bar: bar} -# @example EnforcedShorthandSyntax: either (default) -# -# # good -# {foo: foo, bar: bar} -# -# # good -# {foo: foo, bar:} -# -# # good -# {foo:, bar:} -# @example EnforcedShorthandSyntax: consistent -# -# # bad - `foo` and `bar` values can be omitted -# {foo: foo, bar: bar} -# -# # bad - `bar` value can be omitted -# {foo:, bar: bar} -# -# # bad - mixed syntaxes -# {foo:, bar: baz} -# -# # good -# {foo:, bar:} -# -# # good - can't omit `baz` -# {foo: foo, bar: baz} -# @example EnforcedStyle: ruby19 (default) -# # bad -# {:a => 2} -# {b: 1, :c => 2} -# -# # good -# {a: 2, b: 1} -# {:c => 2, 'd' => 2} # acceptable since 'd' isn't a symbol -# {d: 1, 'e' => 2} # technically not forbidden -# -# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#131 -class RuboCop::Cop::Style::HashSyntax < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::HashShorthandSyntax - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#186 - def alternative_style; end - - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#164 - def hash_rockets_check(pairs); end - - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#178 - def no_mixed_keys_check(pairs); end - - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#142 - def on_hash(node); end - - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#160 - def ruby19_check(pairs); end - - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#168 - def ruby19_no_mixed_keys_check(pairs); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#218 - def acceptable_19_syntax_symbol?(sym_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#275 - def argument_without_space?(node); end - - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#197 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#281 - def autocorrect_hash_rockets(corrector, pair_node); end - - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#290 - def autocorrect_no_mixed_keys(corrector, pair_node); end - - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#254 - def autocorrect_ruby19(corrector, pair_node); end - - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#239 - def check(pairs, delim, msg); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#298 - def force_hash_rockets?(pairs); end - - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#267 - def range_for_autocorrect_ruby19(pair_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#207 - def sym_indices?(pairs); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#211 - def word_symbol_pair?(pair); end -end - -# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#137 -RuboCop::Cop::Style::HashSyntax::MSG_19 = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#139 -RuboCop::Cop::Style::HashSyntax::MSG_HASH_ROCKETS = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#138 -RuboCop::Cop::Style::HashSyntax::MSG_NO_MIXED_KEYS = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#140 -RuboCop::Cop::Style::HashSyntax::NO_MIXED_KEYS_STYLES = T.let(T.unsafe(nil), Array) - -# 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. -# (`transform_keys` was added in Ruby 2.5.) -# -# @example -# # bad -# {a: 1, b: 2}.each_with_object({}) { |(k, v), h| h[foo(k)] = v } -# Hash[{a: 1, b: 2}.collect { |k, v| [foo(k), v] }] -# {a: 1, b: 2}.map { |k, v| [k.to_s, v] }.to_h -# {a: 1, b: 2}.to_h { |k, v| [k.to_s, v] } -# -# # good -# {a: 1, b: 2}.transform_keys { |k| foo(k) } -# {a: 1, b: 2}.transform_keys { |k| k.to_s } -# -# source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#28 -class RuboCop::Cop::Style::HashTransformKeys < ::RuboCop::Cop::Base - include ::RuboCop::Cop::HashTransformMethod - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#36 - def on_bad_each_with_object(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#48 - def on_bad_hash_brackets_map(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#61 - def on_bad_map_to_h(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#73 - def on_bad_to_h(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#84 - def extract_captures(match); end - - # source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#89 - def new_method_name; end -end - -# 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. -# -# @example -# # bad -# {a: 1, b: 2}.each_with_object({}) { |(k, v), h| h[k] = foo(v) } -# Hash[{a: 1, b: 2}.collect { |k, v| [k, foo(v)] }] -# {a: 1, b: 2}.map { |k, v| [k, v * v] }.to_h -# {a: 1, b: 2}.to_h { |k, v| [k, v * v] } -# -# # good -# {a: 1, b: 2}.transform_values { |v| foo(v) } -# {a: 1, b: 2}.transform_values { |v| v * v } -# -# source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#26 -class RuboCop::Cop::Style::HashTransformValues < ::RuboCop::Cop::Base - include ::RuboCop::Cop::HashTransformMethod - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#34 - def on_bad_each_with_object(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#46 - def on_bad_hash_brackets_map(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#59 - def on_bad_map_to_h(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#71 - def on_bad_to_h(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#82 - def extract_captures(match); end - - # source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#87 - def new_method_name; end -end - -# Checks for identical expressions at the beginning or end of -# each branch of a conditional expression. Such expressions should normally -# be placed outside the conditional expression - before or after it. -# -# NOTE: The cop is poorly named and some people might think that it actually -# checks for duplicated conditional branches. The name will probably be changed -# in a future major RuboCop release. -# -# @example -# # bad -# if condition -# do_x -# do_z -# else -# do_y -# do_z -# end -# -# # good -# if condition -# do_x -# else -# do_y -# end -# do_z -# -# # bad -# if condition -# do_z -# do_x -# else -# do_z -# do_y -# end -# -# # good -# do_z -# if condition -# do_x -# else -# do_y -# end -# -# # bad -# case foo -# when 1 -# do_x -# when 2 -# do_x -# else -# do_x -# end -# -# # good -# case foo -# when 1 -# do_x -# do_y -# when 2 -# # nothing -# else -# do_x -# do_z -# end -# -# # bad -# case foo -# in 1 -# do_x -# in 2 -# do_x -# else -# do_x -# end -# -# # good -# case foo -# in 1 -# do_x -# do_y -# in 2 -# # nothing -# else -# do_x -# do_z -# end -# -# source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#110 -class RuboCop::Cop::Style::IdenticalConditionalBranches < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#123 - def on_case(node); end - - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#130 - def on_case_match(node); end - - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#116 - def on_if(node); end - - 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#193 - def check_expressions(node, expressions, insert_position); end - - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#218 - def correct_assignment(corrector, node, expression, insert_position); end - - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#228 - def correct_no_assignment(corrector, node, expression, insert_position); end - - # @return [Boolean] - # - # 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#252 - def expand_elses(branch); end - - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#267 - def head(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#236 - def last_child_of_parent?(node); end - - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#246 - def message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#242 - def single_child_branch?(branch_node); end - - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#263 - def tail(node); end -end - -# source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#114 -RuboCop::Cop::Style::IdenticalConditionalBranches::MSG = T.let(T.unsafe(nil), String) - -# Corrector to correct conditional assignment in `if` statements. -# -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#559 -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#564 - def correct(corrector, cop, node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#568 - def move_assignment_inside_condition(corrector, node); end - - private - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#582 - def extract_tail_branches(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#589 - def move_branch_inside_condition(corrector, branch, condition, assignment, column); end - end -end - -# If the `else` branch of a conditional consists solely of an `if` node, -# it can be combined with the `else` to become an `elsif`. -# This helps to keep the nesting level from getting too deep. -# -# @example -# # bad -# if condition_a -# action_a -# else -# if condition_b -# action_b -# else -# action_c -# end -# end -# -# # good -# if condition_a -# action_a -# elsif condition_b -# action_b -# else -# action_c -# end -# @example AllowIfModifier: false (default) -# # bad -# if condition_a -# action_a -# else -# action_b if condition_b -# end -# -# # good -# if condition_a -# action_a -# elsif condition_b -# action_b -# end -# @example AllowIfModifier: true -# # good -# if condition_a -# action_a -# else -# action_b if condition_b -# end -# -# # good -# if condition_a -# action_a -# elsif condition_b -# action_b -# end -# -# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#61 -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#68 - def on_if(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#149 - def allow_if_modifier?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#145 - def allow_if_modifier_in_else_branch?(else_branch); end - - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#87 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#116 - def correct_to_elsif_from_if_inside_else_form(corrector, node, condition); end - - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#108 - def correct_to_elsif_from_modifier_form(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#134 - def find_end_range(node); end - - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#141 - def if_condition_range(node, condition); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#130 - def then?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#65 -RuboCop::Cop::Style::IfInsideElse::MSG = T.let(T.unsafe(nil), String) - -# Checks for `if` and `unless` statements that would fit on one line if -# written as modifier `if`/`unless`. The cop also checks for modifier -# `if`/`unless` lines that exceed the maximum line length. -# -# The maximum line length is configured in the `Layout/LineLength` -# cop. The tab size is configured in the `IndentationWidth` of the -# `Layout/IndentationStyle` cop. -# -# One-line pattern matching is always allowed. To ensure that there are few cases -# where the match variable is not used, and to prevent oversights. The variable `x` -# becomes undefined and raises `NameError` when the following example is changed to -# the modifier form: -# -# [source,ruby] -# ---- -# if [42] in [x] -# x # `x` is undefined when using modifier form. -# end -# ---- -# -# NOTE: It is allowed when `defined?` argument has an undefined value, -# because using the modifier form causes the following incompatibility: -# -# [source,ruby] -# ---- -# unless defined?(undefined_foo) -# undefined_foo = 'default_value' -# end -# undefined_foo # => 'default_value' -# -# undefined_bar = 'default_value' unless defined?(undefined_bar) -# undefined_bar # => nil -# ---- -# -# @example -# # bad -# if condition -# do_stuff(bar) -# end -# -# unless qux.empty? -# Foo.do_something -# end -# -# do_something_with_a_long_name(arg) if long_condition_that_prevents_code_fit_on_single_line -# -# # good -# do_stuff(bar) if condition -# Foo.do_something unless qux.empty? -# -# if long_condition_that_prevents_code_fit_on_single_line -# do_something_with_a_long_name(arg) -# end -# -# if short_condition # a long comment that makes it too long if it were just a single line -# do_something -# end -# -# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#63 -class RuboCop::Cop::Style::IfUnlessModifier < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::StatementModifier - include ::RuboCop::Cop::AllowedPattern - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::CommentsHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#80 - def on_if(node); end - - private - - # 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#231 - def another_statement_on_same_line?(node); end - - # 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#285 - def comment_on_node_line(node); end - - # @return [Boolean] - # - # 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#96 - def defined_nodes(condition); end - - # 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#215 - def line_length_enabled_at_line?(line); end - - # 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#219 - def named_capture_in_condition?(node); end - - # @return [Boolean] - # - # 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#227 - def non_simple_if_unless?(node); end - - # 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#289 - def remove_comment(corrector, _node, comment); end - - # 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#141 - def replacement_for_modifier_form(corrector, node); end - - # 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#245 - def to_normal_form(node, indentation); end - - # 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#165 - def too_long_due_to_comment_after_modifier?(node, comment); end - - # @return [Boolean] - # - # 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#206 - def too_long_line_based_on_allow_uri?(line); end - - # @return [Boolean] - # - # 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#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#176 - def too_long_single_line?(node); end - - class << self - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#76 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#71 -RuboCop::Cop::Style::IfUnlessModifier::MSG_USE_MODIFIER = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#74 -RuboCop::Cop::Style::IfUnlessModifier::MSG_USE_NORMAL = T.let(T.unsafe(nil), String) - -# Checks for if and unless statements used as modifiers of other if or -# unless statements. -# -# @example -# -# # bad -# tired? ? 'stop' : 'go faster' if running? -# -# # bad -# if tired? -# "please stop" -# else -# "keep going" -# end if running? -# -# # good -# if running? -# tired? ? 'stop' : 'go faster' -# end -# -# source://rubocop//lib/rubocop/cop/style/if_unless_modifier_of_if_unless.rb#25 -class RuboCop::Cop::Style::IfUnlessModifierOfIfUnless < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::StatementModifier - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier_of_if_unless.rb#31 - def on_if(node); end -end - -# source://rubocop//lib/rubocop/cop/style/if_unless_modifier_of_if_unless.rb#29 -RuboCop::Cop::Style::IfUnlessModifierOfIfUnless::MSG = T.let(T.unsafe(nil), String) - -# Checks for redundant `if` with boolean literal branches. -# It checks only conditions to return boolean value (`true` or `false`) for safe detection. -# The conditions to be checked are comparison methods, predicate methods, and -# double negation (!!). -# `nonzero?` method is allowed by default. -# These are customizable with `AllowedMethods` option. -# -# This cop targets only `if`s with a single `elsif` or `else` branch. The following -# code will be allowed, because it has two `elsif` branches: -# -# [source,ruby] -# ---- -# if foo -# true -# elsif bar > baz -# true -# elsif qux > quux # Single `elsif` is warned, but two or more `elsif`s are not. -# true -# else -# false -# end -# ---- -# -# @example -# # bad -# if foo == bar -# true -# else -# false -# end -# -# # bad -# foo == bar ? true : false -# -# # good -# foo == bar -# -# # bad -# if foo.do_something? -# true -# else -# false -# end -# -# # good (but potentially an unsafe correction) -# foo.do_something? -# @example AllowedMethods: ['nonzero?'] (default) -# # good -# num.nonzero? ? true : false -# -# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#61 -class RuboCop::Cop::Style::IfWithBooleanLiteralBranches < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#73 - def double_negative?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#69 - def if_with_boolean_literal_branches?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#75 - def on_if(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#135 - def assume_boolean_value?(condition); end - - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#113 - def message(node, keyword); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#95 - def multiple_elsif?(node); end - - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#101 - def offense_range_with_keyword(node, condition); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#152 - def opposite_condition?(node); end - - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#142 - def replacement_condition(node, condition); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#157 - def require_parentheses?(condition); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#121 - def return_boolean_value?(condition); end -end - -# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#65 -RuboCop::Cop::Style::IfWithBooleanLiteralBranches::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#66 -RuboCop::Cop::Style::IfWithBooleanLiteralBranches::MSG_FOR_ELSIF = T.let(T.unsafe(nil), String) - -# Checks for uses of semicolon in if statements. -# -# @example -# -# # bad -# result = if some_condition; something else another_thing end -# -# # good -# result = some_condition ? something : another_thing -# -# source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#16 -class RuboCop::Cop::Style::IfWithSemicolon < ::RuboCop::Cop::Base - include ::RuboCop::Cop::OnNormalIfUnless - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#24 - def on_normal_if_unless(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#55 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#104 - def build_else_branch(second_condition); end - - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#95 - def build_expression(expr); end - - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#86 - def correct_elsif(node); end - - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#42 - def message(node); end - - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#77 - def replacement(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#124 - def require_argument_parentheses?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#63 - def require_newline?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#67 - def use_masgn_or_block_in_branches?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#73 - def use_return_with_argument?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#20 -RuboCop::Cop::Style::IfWithSemicolon::MSG_IF_ELSE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#21 -RuboCop::Cop::Style::IfWithSemicolon::MSG_NEWLINE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#22 -RuboCop::Cop::Style::IfWithSemicolon::MSG_TERNARY = T.let(T.unsafe(nil), String) - -# Checks for `raise` or `fail` statements which do not specify an -# explicit exception class. (This raises a `RuntimeError`. Some projects -# might prefer to use exception classes which more precisely identify the -# nature of the error.) -# -# @example -# # bad -# raise 'Error message here' -# -# # good -# raise ArgumentError, 'Error message here' -# -# source://rubocop//lib/rubocop/cop/style/implicit_runtime_error.rb#17 -class RuboCop::Cop::Style::ImplicitRuntimeError < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/implicit_runtime_error.rb#23 - def implicit_runtime_error_raise_or_fail(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/implicit_runtime_error.rb#26 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/style/implicit_runtime_error.rb#18 -RuboCop::Cop::Style::ImplicitRuntimeError::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/implicit_runtime_error.rb#20 -RuboCop::Cop::Style::ImplicitRuntimeError::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for `in;` uses in `case` expressions. -# -# @example -# # bad -# case expression -# in pattern_a; foo -# in pattern_b; bar -# end -# -# # good -# case expression -# in pattern_a then foo -# in pattern_b then bar -# end -# -# source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#21 -class RuboCop::Cop::Style::InPatternThen < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#29 - def on_in_pattern(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#46 - def alternative_pattern_source(pattern); end - - # source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#50 - def collect_alternative_patterns(pattern); end -end - -# source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#27 -RuboCop::Cop::Style::InPatternThen::MSG = T.let(T.unsafe(nil), String) - -# Use `Kernel#loop` for infinite loops. -# -# @example -# # bad -# while true -# work -# end -# -# # good -# loop do -# work -# end -# -# source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#23 -class RuboCop::Cop::Style::InfiniteLoop < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#35 - def after_leaving_scope(scope, _variable_table); end - - # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#44 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#44 - def on_until_post(node); end - - # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#40 - def on_while(node); end - - # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#40 - def on_while_post(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#84 - def assigned_before_loop?(var, range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#80 - def assigned_inside_loop?(var, range); end - - # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#70 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#103 - def modifier_replacement(node); end - - # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#114 - def non_modifier_range(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#89 - def referenced_after_loop?(var, range); end - - # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#94 - def replace_begin_end_with_modifier(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#99 - def replace_source(corrector, range, replacement); end - - # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#53 - def while_or_until(node); end - - class << self - # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#31 - def joining_forces; end - end -end - -# source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#27 -RuboCop::Cop::Style::InfiniteLoop::LEADING_SPACE = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#29 -RuboCop::Cop::Style::InfiniteLoop::MSG = T.let(T.unsafe(nil), String) - -# Checks for trailing inline comments. -# -# @example -# -# # good -# foo.each do |f| -# # Standalone comment -# f.bar -# end -# -# # bad -# foo.each do |f| -# f.bar # Trailing inline comment -# end -# -# source://rubocop//lib/rubocop/cop/style/inline_comment.rb#20 -class RuboCop::Cop::Style::InlineComment < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/inline_comment.rb#23 - def on_new_investigation; end -end - -# source://rubocop//lib/rubocop/cop/style/inline_comment.rb#21 -RuboCop::Cop::Style::InlineComment::MSG = T.let(T.unsafe(nil), String) - -# Check for usages of not (`not` or `!`) called on a method -# when an inverse of that method can be used instead. -# -# Methods that can be inverted by a not (`not` or `!`) should be defined -# in `InverseMethods`. -# -# Methods that are inverted by inverting the return -# of the block that is passed to the method should be defined in -# `InverseBlocks`. -# -# @example -# # bad -# !foo.none? -# !foo.any? { |f| f.even? } -# !foo.blank? -# !(foo == bar) -# foo.select { |f| !f.even? } -# foo.reject { |f| f != 7 } -# -# # good -# foo.none? -# foo.blank? -# foo.any? { |f| f.even? } -# foo != bar -# foo == bar -# !!('foo' =~ /^\w+$/) -# !(foo.class < Numeric) # Checking class hierarchy is allowed -# # Blocks with guard clauses are ignored: -# foo.select do |f| -# next if f.zero? -# f != 1 -# end -# -# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#43 -class RuboCop::Cop::Style::InverseMethods < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#70 - def inverse_block?(param0 = T.unsafe(nil)); end - - # 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#92 - def on_block(node); end - - # 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 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#179 - def camel_case_constant?(node); end - - # 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#112 - def correct_inverse_method(corrector, node); end - - # 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#183 - def dot_range(loc); end - - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#162 - def end_parentheses(node, method_call); end - - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#150 - def inverse_blocks; end - - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#145 - def inverse_methods; end - - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#193 - def message(method, inverse); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#154 - def negated?(node); end - - # 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 - # `Integer > Numeric`. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#174 - def possible_class_hierarchy_check?(lhs, rhs, method); end - - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#187 - def remove_end_parenthesis(corrector, node, method, method_call); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#166 - def safe_navigation_incompatible?(node); end - - class << self - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#56 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#52 -RuboCop::Cop::Style::InverseMethods::CAMEL_CASE = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#48 -RuboCop::Cop::Style::InverseMethods::CLASS_COMPARISON_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#50 -RuboCop::Cop::Style::InverseMethods::EQUALITY_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#47 -RuboCop::Cop::Style::InverseMethods::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#51 -RuboCop::Cop::Style::InverseMethods::NEGATED_EQUALITY_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#54 -RuboCop::Cop::Style::InverseMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#49 -RuboCop::Cop::Style::InverseMethods::SAFE_NAVIGATION_INCOMPATIBLE_METHODS = T.let(T.unsafe(nil), Array) - -# Checks for usages of `unless` which can be replaced by `if` with inverted condition. -# Code without `unless` is easier to read, but that is subjective, so this cop -# is disabled by default. -# -# 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, -# -# [source,yaml] -# ---- -# InverseMethods: -# :!=: :== -# :even?: :odd? -# :odd?: :even? -# ---- -# -# will suggest both `even?` and `odd?` to be inverted, but only `!=` (and not `==`). -# -# @example -# # bad (simple condition) -# foo unless !bar -# foo unless x != y -# foo unless x >= 10 -# foo unless x.even? -# foo unless odd? -# -# # good -# foo if bar -# foo if x == y -# foo if x < 10 -# foo if x.odd? -# foo if even? -# -# # bad (complex condition) -# foo unless x != y || x.even? -# -# # good -# foo if x == y && x.odd? -# -# # good (if) -# foo if !condition -# -# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#53 -class RuboCop::Cop::Style::InvertibleUnlessCondition < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#58 - def on_if(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#133 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#146 - def autocorrect_send_node(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#90 - def inheritance_check?(node); end - - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#154 - def inverse_methods; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#75 - def invertible?(node); end - - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#96 - def preferred_condition(node); end - - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#126 - def preferred_logical_condition(node); end - - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#104 - def preferred_send_condition(node); end -end - -# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#56 -RuboCop::Cop::Style::InvertibleUnlessCondition::MSG = T.let(T.unsafe(nil), String) - -# Checks for hardcoded IP addresses, which can make code -# brittle. IP addresses are likely to need to be changed when code -# is deployed to a different server or environment, which may break -# a deployment if forgotten. Prefer setting IP addresses in ENV or -# other configuration. -# -# @example -# -# # bad -# ip_address = '127.59.241.29' -# -# # good -# ip_address = ENV['DEPLOYMENT_IP_ADDRESS'] -# -# source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#21 -class RuboCop::Cop::Style::IpAddresses < ::RuboCop::Cop::Base - include ::RuboCop::Cop::StringHelp - - # Dummy implementation of method in ConfigurableEnforcedStyle that is - # called from StringHelp. - # - # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#46 - def correct_style_detected; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#27 - def offense?(node); end - - # Dummy implementation of method in ConfigurableEnforcedStyle that is - # called from StringHelp. - # - # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#42 - def opposite_style_detected; end - - private - - # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#50 - def allowed_addresses; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#55 - def could_be_ip?(str); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#68 - def starts_with_hex_or_colon?(str); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#64 - def too_long?(str); end -end - -# IPv4-mapped IPv6 is the longest -# -# source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#24 -RuboCop::Cop::Style::IpAddresses::IPV6_MAX_SIZE = T.let(T.unsafe(nil), Integer) - -# source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#25 -RuboCop::Cop::Style::IpAddresses::MSG = T.let(T.unsafe(nil), String) - -# Checks for assignments to a local `it` variable inside a block -# where `it` can refer to the first anonymous parameter as of Ruby 3.4. -# -# Although Ruby allows reassigning `it` in these cases, it could -# cause confusion if `it` is used as a block parameter elsewhere. -# For consistency, this also applies to numblocks and blocks with -# parameters, even though `it` cannot be used in those cases. -# -# @example -# # bad -# foo { it = 5 } -# foo { |bar| it = bar } -# foo { it = _2 } -# -# # good - use a different variable name -# foo { var = 5 } -# foo { |bar| var = bar } -# foo { bar = _2 } -# -# source://rubocop//lib/rubocop/cop/style/it_assignment.rb#24 -class RuboCop::Cop::Style::ItAssignment < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/it_assignment.rb#27 - def on_lvasgn(node); end -end - -# source://rubocop//lib/rubocop/cop/style/it_assignment.rb#25 -RuboCop::Cop::Style::ItAssignment::MSG = T.let(T.unsafe(nil), String) - -# When passing an existing hash as keyword arguments, provide additional arguments -# directly rather than using `merge`. -# -# Providing arguments directly is more performant than using `merge`, and -# also leads to shorter and simpler code. -# -# @example -# # bad -# some_method(**opts.merge(foo: true)) -# some_method(**opts.merge(other_opts)) -# -# # good -# some_method(**opts, foo: true) -# some_method(**opts, **other_opts) -# -# source://rubocop//lib/rubocop/cop/style/keyword_arguments_merging.rb#21 -class RuboCop::Cop::Style::KeywordArgumentsMerging < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/keyword_arguments_merging.rb#27 - def merge_kwargs?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/keyword_arguments_merging.rb#36 - def on_kwsplat(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/keyword_arguments_merging.rb#48 - def autocorrect(corrector, kwsplat_node, hash_node, other_hash_node); end -end - -# source://rubocop//lib/rubocop/cop/style/keyword_arguments_merging.rb#24 -RuboCop::Cop::Style::KeywordArgumentsMerging::MSG = T.let(T.unsafe(nil), String) - -# Enforces that optional keyword parameters are placed at the -# end of the parameters list. -# -# This improves readability, because when looking through the source, -# it is expected to find required parameters at the beginning of parameters list -# and optional parameters at the end. -# -# @example -# # bad -# def some_method(first: false, second:, third: 10) -# # body omitted -# end -# -# # good -# def some_method(second:, first: false, third: 10) -# # body omitted -# end -# -# # bad -# do_something do |first: false, second:, third: 10| -# # body omitted -# end -# -# # good -# do_something do |second:, first: false, third: 10| -# # body omitted -# end -# -# source://rubocop//lib/rubocop/cop/style/keyword_parameters_order.rb#34 -class RuboCop::Cop::Style::KeywordParametersOrder < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/keyword_parameters_order.rb#40 - def on_kwoptarg(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/keyword_parameters_order.rb#64 - def append_newline_to_last_kwoptarg(arguments, corrector); end - - # source://rubocop//lib/rubocop/cop/style/keyword_parameters_order.rb#55 - def autocorrect(corrector, node, defining_node, kwarg_nodes); end - - # source://rubocop//lib/rubocop/cop/style/keyword_parameters_order.rb#72 - def remove_kwargs(kwarg_nodes, corrector); end -end - -# source://rubocop//lib/rubocop/cop/style/keyword_parameters_order.rb#38 -RuboCop::Cop::Style::KeywordParametersOrder::MSG = T.let(T.unsafe(nil), String) - -# (by default) checks for uses of the lambda literal syntax for -# single line lambdas, and the method call syntax for multiline lambdas. -# It is configurable to enforce one of the styles for both single line -# and multiline lambdas as well. -# -# @example EnforcedStyle: line_count_dependent (default) -# # bad -# f = lambda { |x| x } -# f = ->(x) do -# x -# end -# -# # good -# f = ->(x) { x } -# f = lambda do |x| -# x -# end -# @example EnforcedStyle: lambda -# # bad -# f = ->(x) { x } -# f = ->(x) do -# x -# end -# -# # good -# f = lambda { |x| x } -# f = lambda do |x| -# x -# end -# @example EnforcedStyle: literal -# # bad -# f = lambda { |x| x } -# f = lambda do |x| -# x -# end -# -# # good -# f = ->(x) { x } -# f = ->(x) do -# x -# end -# -# source://rubocop//lib/rubocop/cop/style/lambda.rb#49 -class RuboCop::Cop::Style::Lambda < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/lambda.rb#64 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/lambda.rb#64 - def on_numblock(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/lambda.rb#115 - def arguments_with_whitespace(node); end - - # source://rubocop//lib/rubocop/cop/style/lambda.rb#104 - def autocorrect_method_to_literal(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/lambda.rb#119 - def lambda_arg_string(args); end - - # source://rubocop//lib/rubocop/cop/style/lambda.rb#89 - def message(node, selector); end - - # source://rubocop//lib/rubocop/cop/style/lambda.rb#95 - def message_line_modifier(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/lambda.rb#83 - def offending_selector?(node, selector); end -end - -# source://rubocop//lib/rubocop/cop/style/lambda.rb#53 -RuboCop::Cop::Style::Lambda::LITERAL_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/lambda.rb#54 -RuboCop::Cop::Style::Lambda::METHOD_MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/lambda.rb#56 -RuboCop::Cop::Style::Lambda::OFFENDING_SELECTORS = T.let(T.unsafe(nil), Hash) - -# Checks for use of the lambda.(args) syntax. -# -# @example EnforcedStyle: call (default) -# # bad -# lambda.(x, y) -# -# # good -# lambda.call(x, y) -# @example EnforcedStyle: braces -# # bad -# lambda.call(x, y) -# -# # good -# lambda.(x, y) -# -# source://rubocop//lib/rubocop/cop/style/lambda_call.rb#21 -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 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#28 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#68 - def explicit_style?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#64 - def implicit_style?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#51 - def offense?(node); end - - # 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 -RuboCop::Cop::Style::LambdaCall::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/lambda_call.rb#26 -RuboCop::Cop::Style::LambdaCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for string literal concatenation at -# the end of a line. -# -# @example -# -# # bad -# some_str = 'ala' + -# 'bala' -# -# some_str = 'ala' << -# 'bala' -# -# # good -# some_str = 'ala' \ -# 'bala' -# -# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#35 -class RuboCop::Cop::Style::LineEndConcatenation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#51 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#80 - def autocorrect(corrector, operator_range); end - - # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#57 - def check_token_set(index); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#107 - def eligible_next_successor?(next_successor); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#103 - def eligible_operator?(operator); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#111 - def eligible_predecessor?(predecessor); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#99 - def eligible_successor?(successor); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#93 - def eligible_token_set?(predecessor, operator, successor); end - - # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#72 - def register_offense(operator); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#130 - def standard_string_literal?(token); end - - # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#115 - def token_after_last_string(successor, base_index); end - - class << self - # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#47 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#42 -RuboCop::Cop::Style::LineEndConcatenation::COMPLEX_STRING_BEGIN_TOKEN = T.let(T.unsafe(nil), Symbol) - -# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#43 -RuboCop::Cop::Style::LineEndConcatenation::COMPLEX_STRING_END_TOKEN = T.let(T.unsafe(nil), Symbol) - -# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#40 -RuboCop::Cop::Style::LineEndConcatenation::CONCAT_TOKEN_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#44 -RuboCop::Cop::Style::LineEndConcatenation::HIGH_PRECEDENCE_OP_TOKEN_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#39 -RuboCop::Cop::Style::LineEndConcatenation::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#45 -RuboCop::Cop::Style::LineEndConcatenation::QUOTE_DELIMITERS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#41 -RuboCop::Cop::Style::LineEndConcatenation::SIMPLE_STRING_TOKEN_TYPE = T.let(T.unsafe(nil), Symbol) - -# Ensures magic comments are written consistently throughout your code base. -# Looks for discrepancies in separators (`-` vs `_`) and capitalization for -# both magic comment directives and values. -# -# Required capitalization can be set with the `DirectiveCapitalization` and -# `ValueCapitalization` configuration keys. -# -# NOTE: If one of these configuration is set to nil, any capitalization is allowed. -# -# @example ValueCapitalization: uppercase -# # bad -# # frozen-string-literal: true -# -# # good -# # frozen-string-literal: TRUE -# @example EnforcedStyle: kebab_case -# # The `kebab_case` style will enforce that the frozen string literal -# # comment is written in kebab case. (Words separated by hyphens) -# # bad -# # frozen_string_literal: true -# -# module Baz -# # ... -# end -# -# # good -# # frozen-string-literal: true -# -# module Baz -# # ... -# end -# @example DirectiveCapitalization: lowercase (default) -# # bad -# # FROZEN-STRING-LITERAL: true -# -# # good -# # frozen-string-literal: true -# @example DirectiveCapitalization: uppercase -# # bad -# # frozen-string-literal: true -# -# # good -# # FROZEN-STRING-LITERAL: true -# @example DirectiveCapitalization: nil -# # any capitalization is accepted -# -# # good -# # frozen-string-literal: true -# -# # good -# # FROZEN-STRING-LITERAL: true -# @example ValueCapitalization: nil (default) -# # any capitalization is accepted -# -# # good -# # frozen-string-literal: true -# -# # good -# # frozen-string-literal: TRUE -# @example ValueCapitalization: lowercase -# # when a value is not given, any capitalization is accepted -# -# # bad -# # frozen-string-literal: TRUE -# -# # good -# # frozen-string-literal: TRUE -# @example EnforcedStyle: snake_case (default) -# # The `snake_case` style will enforce that the frozen string literal -# # comment is written in snake case. (Words separated by underscores) -# # bad -# # frozen-string-literal: true -# -# module Bar -# # ... -# end -# -# # good -# # frozen_string_literal: false -# -# module Bar -# # ... -# end -# -# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#97 -class RuboCop::Cop::Style::MagicCommentFormat < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#156 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#241 - def correct_separator; end - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#279 - def directive_capitalization; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#197 - def directive_offends?(directive); end - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#233 - def expected_style; end - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#183 - def find_issues(comment); end - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#207 - def fix_directives(issues); end - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#221 - def fix_values(issues); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#245 - def incorrect_separator?(text); end - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#173 - def leading_comment_lines; end - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#275 - def line_range(line); end - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#167 - def magic_comments; end - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#202 - def register_offenses(issues); end - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#264 - def replace_capitalization(text, style); end - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#260 - def replace_separator(text); end - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#301 - def supported_capitalizations; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#295 - def valid_capitalization?(style); end - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#287 - def value_capitalization; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#249 - def wrong_capitalization?(text, expected_case); end - - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#237 - def wrong_separator; end -end - -# Value object to extract source ranges for the different parts of a magic comment -# -# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#107 -class RuboCop::Cop::Style::MagicCommentFormat::CommentRange - extend ::RuboCop::SimpleForwardable - - # @return [CommentRange] a new instance of CommentRange - # - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#119 - def initialize(comment); end - - # Returns the value of attribute comment. - # - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#117 - def comment; end - - # A magic comment can contain one directive (normal style) or - # multiple directives (emacs style) - # - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#125 - def directives; end - - # source://rubocop-ast/1.41.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def loc(*_arg0, **_arg1, &_arg2); end - - # source://rubocop-ast/1.41.0/lib/rubocop/ast/utilities/simple_forwardable.rb#19 - def text(*_arg0, **_arg1, &_arg2); end - - # A magic comment can contain one value (normal style) or - # multiple directives (emacs style) - # - # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#141 - def values; end -end - -# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#110 -RuboCop::Cop::Style::MagicCommentFormat::CommentRange::DIRECTIVE_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#114 -RuboCop::Cop::Style::MagicCommentFormat::CommentRange::VALUE_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#102 -RuboCop::Cop::Style::MagicCommentFormat::KEBAB_SEPARATOR = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#103 -RuboCop::Cop::Style::MagicCommentFormat::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#104 -RuboCop::Cop::Style::MagicCommentFormat::MSG_VALUE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#101 -RuboCop::Cop::Style::MagicCommentFormat::SNAKE_SEPARATOR = T.let(T.unsafe(nil), String) - -# Prefer `select` or `reject` over `map { ... }.compact`. -# This cop also handles `filter_map { ... }`, similar to `map { ... }.compact`. -# -# @example -# -# # bad -# array.map { |e| some_condition? ? e : next }.compact -# -# # bad -# array.filter_map { |e| some_condition? ? e : next } -# -# # bad -# array.map do |e| -# if some_condition? -# e -# else -# next -# end -# end.compact -# -# # bad -# array.map do |e| -# next if some_condition? -# -# e -# end.compact -# -# # bad -# array.map do |e| -# e if some_condition? -# end.compact -# -# # good -# array.select { |e| some_condition? } -# -# # good -# array.reject { |e| some_condition? } -# -# source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#44 -class RuboCop::Cop::Style::MapCompactWithConditionalBlock < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#51 - def conditional_block(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#76 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#76 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#148 - def current(node); end - - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#162 - def filter_map_range(node); end - - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#96 - def inspect(node, block_argument_node, condition_node, return_value_node, range); end - - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#158 - def map_with_compact_range(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#114 - 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#118 - def truthy_branch?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#138 - def truthy_branch_for_guard?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#128 - def truthy_branch_for_if?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#47 -RuboCop::Cop::Style::MapCompactWithConditionalBlock::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#48 -RuboCop::Cop::Style::MapCompactWithConditionalBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for usages of `each` with `<<`, `push`, or `append` which -# can be replaced by `map`. -# -# If `PreferredMethods` is configured for `map` in `Style/CollectionMethods`, -# this cop uses the specified method for replacement. -# -# NOTE: The return value of `Enumerable#each` is `self`, whereas the -# return value of `Enumerable#map` is an `Array`. They are not autocorrected -# when a return value could be used because these types differ. -# -# NOTE: It only detects when the mapping destination is either: -# * a local variable initialized as an empty array and referred to only by the -# pushing operation; -# * or, if it is the single block argument to a `[].tap` block. -# This is because, if not, it's challenging to statically guarantee that the -# mapping destination variable remains an empty array: -# -# [source,ruby] -# ---- -# ret = [] -# src.each { |e| ret << e * 2 } # `<<` method may mutate `ret` -# -# dest = [] -# src.each { |e| dest << transform(e, dest) } # `transform` method may mutate `dest` -# ---- -# -# @example -# # bad -# dest = [] -# src.each { |e| dest << e * 2 } -# dest -# -# # good -# dest = src.map { |e| e * 2 } -# -# # bad -# [].tap do |dest| -# src.each { |e| dest << e * 2 } -# end -# -# # good -# dest = src.map { |e| e * 2 } -# -# # good - contains another operation -# dest = [] -# src.each { |e| dest << e * 2; puts e } -# dest -# -# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#60 -class RuboCop::Cop::Style::MapIntoArray < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#109 - def after_leaving_scope(scope, _variable_table); end - - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#72 - def each_block_with_push?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#81 - def empty_array_asgn?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#93 - def empty_array_tap(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#103 - def lvar_ref?(param0 = T.unsafe(nil), param1); end - - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#113 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#113 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#67 - def suitable_argument_node?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#213 - def correct_push_node(corrector, push_node); end - - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#221 - def correct_return_value_handling(corrector, block, dest_var); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#156 - def dest_used_only_for_mapping?(block, dest_var, asgn); end - - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#150 - def find_closest_assignment(block, dest_var); end - - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#133 - def find_dest_var(block); end - - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#181 - def new_method_name; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#141 - def offending_empty_array_tap?(node, dest_var); end - - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#164 - def register_offense(block, dest_var, asgn); end - - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#200 - def remove_assignment(corrector, asgn); end - - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#207 - def remove_tap(corrector, node, block_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#187 - def return_value_used?(node); end - - class << self - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#105 - def joining_forces; end - end -end - -# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#64 -RuboCop::Cop::Style::MapIntoArray::MSG = T.let(T.unsafe(nil), String) - -# Looks for uses of `map.to_h` or `collect.to_h` that could be -# written with just `to_h` in Ruby >= 2.6. -# -# NOTE: `Style/HashTransformKeys` and `Style/HashTransformValues` will -# also change this pattern if only hash keys or hash values are being -# transformed. -# -# @example -# # bad -# something.map { |v| [v, v * 2] }.to_h -# -# # good -# something.to_h { |v| [v, v * 2] } -# -# # bad -# {foo: bar}.collect { |k, v| [k.to_s, v.do_something] }.to_h -# -# # good -# {foo: bar}.to_h { |k, v| [k.to_s, v.do_something] } -# -# source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#30 -class RuboCop::Cop::Style::MapToHash < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#41 - 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#52 - def on_send(node); end - - private - - # 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 -RuboCop::Cop::Style::MapToHash::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#38 -RuboCop::Cop::Style::MapToHash::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Looks for uses of `map.to_set` or `collect.to_set` that could be -# written with just `to_set`. -# -# @example -# # bad -# something.map { |i| i * 2 }.to_set -# -# # good -# something.to_set { |i| i * 2 } -# -# # bad -# [1, 2, 3].collect { |i| i.to_s }.to_set -# -# # good -# [1, 2, 3].to_set { |i| i.to_s } -# -# source://rubocop//lib/rubocop/cop/style/map_to_set.rb#26 -class RuboCop::Cop::Style::MapToSet < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/map_to_set.rb#34 - def map_to_set?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/map_to_set.rb#41 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/map_to_set.rb#41 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/map_to_set.rb#56 - def autocorrect(corrector, to_set, map); end -end - -# source://rubocop//lib/rubocop/cop/style/map_to_set.rb#30 -RuboCop::Cop::Style::MapToSet::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/map_to_set.rb#31 -RuboCop::Cop::Style::MapToSet::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Enforces the presence (default) or absence of parentheses in -# method calls containing arguments. -# -# In the default style (require_parentheses), macro methods are allowed. -# Additional methods can be added to the `AllowedMethods` or -# `AllowedPatterns` list. These options are valid only in the default -# style. Macros can be included by either setting `IgnoreMacros` to false -# or adding specific macros to the `IncludedMacros` list. -# -# Precedence of options is as follows: -# -# 1. `AllowedMethods` -# 2. `AllowedPatterns` -# 3. `IncludedMacros` -# -# If a method is listed in both `IncludedMacros` and `AllowedMethods`, -# then the latter takes precedence (that is, the method is allowed). -# -# In the alternative style (omit_parentheses), there are three additional -# options. -# -# 1. `AllowParenthesesInChaining` is `false` by default. Setting it to -# `true` allows the presence of parentheses in the last call during -# method chaining. -# -# 2. `AllowParenthesesInMultilineCall` is `false` by default. Setting it -# to `true` allows the presence of parentheses in multi-line method -# calls. -# -# 3. `AllowParenthesesInCamelCaseMethod` is `false` by default. This -# allows the presence of parentheses when calling a method whose name -# begins with a capital letter and which has no arguments. Setting it -# to `true` allows the presence of parentheses in such a method call -# even with arguments. -# -# NOTE: The style of `omit_parentheses` allows parentheses in cases where -# omitting them results in ambiguous or syntactically incorrect code. -# -# Non-exhaustive list of examples: -# -# - Parentheses are required allowed in method calls with arguments inside -# literals, logical operators, setting default values in position and -# keyword arguments, chaining and more. -# - Parentheses are allowed in method calls with arguments inside -# operators to avoid ambiguity. -# triple-dot syntax introduced in Ruby 2.7 as omitting them starts an -# endless range. -# - Parentheses are allowed when forwarding arguments with the -# triple-dot syntax introduced in Ruby 2.7 as omitting them starts an -# endless range. -# - Parentheses are required in calls with arguments when inside an -# endless method definition introduced in Ruby 3.0. -# - Ruby 3.1's hash omission syntax allows parentheses if the method call -# is in conditionals and requires parentheses if the call -# is not the value-returning expression. See -# https://bugs.ruby-lang.org/issues/18396. -# - Parentheses are required in anonymous arguments, keyword arguments -# and block passing in Ruby 3.2. -# - Parentheses are required when the first argument is a beginless range or -# the last argument is an endless range. -# -# @example AllowParenthesesInStringInterpolation: true -# -# # good -# "#{t('this.is.good')}" -# -# # good -# "#{t 'this.is.also.good'}" -# @example EnforcedStyle: omit_parentheses -# -# # bad -# array.delete(e) -# -# # good -# array.delete e -# -# # bad -# action.enforce(strict: true) -# -# # good -# action.enforce strict: true -# -# # good -# # Parentheses are allowed for code that can be ambiguous without -# # them. -# action.enforce(condition) || other_condition -# -# # good -# # Parentheses are allowed for calls that won't produce valid Ruby -# # without them. -# yield path, File.basename(path) -# -# # good -# # Omitting the parentheses in Ruby 3.1 hash omission syntax can lead -# # to ambiguous code. We allow them in conditionals and non-last -# # expressions. See https://bugs.ruby-lang.org/issues/18396 -# if meets(criteria:, action:) -# safe_action(action) || dangerous_action(action) -# end -# @example IgnoreMacros: true (default) -# -# # good -# class Foo -# bar :baz -# end -# @example IgnoreMacros: false -# -# # bad -# class Foo -# bar :baz -# end -# @example AllowParenthesesInMultilineCall: false (default) -# -# # bad -# foo.enforce( -# strict: true -# ) -# -# # good -# foo.enforce \ -# strict: true -# @example AllowParenthesesInMultilineCall: true -# -# # good -# foo.enforce( -# strict: true -# ) -# -# # good -# foo.enforce \ -# strict: true -# @example AllowParenthesesInChaining: false (default) -# -# # bad -# foo().bar(1) -# -# # good -# foo().bar 1 -# @example AllowParenthesesInChaining: true -# -# # good -# foo().bar(1) -# -# # good -# foo().bar 1 -# @example AllowParenthesesInCamelCaseMethod: false (default) -# -# # bad -# Array(1) -# -# # good -# Array 1 -# @example AllowParenthesesInCamelCaseMethod: true -# -# # good -# Array(1) -# -# # good -# Array 1 -# @example AllowParenthesesInStringInterpolation: false (default) -# -# # bad -# "#{t('this.is.bad')}" -# -# # good -# "#{t 'this.is.better'}" -# @example EnforcedStyle: require_parentheses (default) -# -# # bad -# array.delete e -# -# # good -# array.delete(e) -# -# # good -# # Operators don't need parens -# foo == bar -# -# # good -# # Setter methods don't need parens -# foo.bar = baz -# -# # okay with `puts` listed in `AllowedMethods` -# puts 'test' -# -# # okay with `^assert` listed in `AllowedPatterns` -# assert_equal 'test', x -# -# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#204 -class RuboCop::Cop::Style::MethodCallWithArgsParentheses < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - include ::RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#219 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#219 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#219 - def on_yield(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#227 - def args_begin(node); end - - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#235 - def args_end(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#239 - def args_parenthesized?(node); end - - class << self - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#215 - def autocorrect_incompatible_with; end - end -end - -# Style omit_parentheses -# -# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#9 -module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses - include ::RuboCop::Cop::RangeHelp - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#80 - def allowed_camel_case_method_call?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#191 - def allowed_chained_call_with_parentheses?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#187 - def allowed_multiline_call_with_parentheses?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#85 - def allowed_string_interpolation_method_call?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#200 - def ambiguous_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#180 - def ambiguous_range_argument?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#229 - def assigned_before?(node, target); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#237 - def assignment_in_condition?(node); end - - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#34 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#162 - def call_as_argument_or_chain?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#155 - def call_in_argument_with_block?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#110 - def call_in_literals?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#119 - def call_in_logical_operators?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#167 - def call_in_match_pattern?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#128 - def call_in_optional_arguments?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#132 - def call_in_single_line_inheritance?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#137 - def call_with_ambiguous_arguments?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#151 - def call_with_braced_block?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#247 - def forwards_anonymous_rest_arguments?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#216 - def hash_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#173 - def hash_literal_in_arguments?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#50 - def inside_endless_method_def?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#233 - def inside_string_interpolation?(node); end - - # Require hash value omission be enclosed in parentheses to prevent the following issue: - # https://bugs.ruby-lang.org/issues/18396. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#64 - def last_expression?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#97 - def legitimate_call_with_parentheses?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#212 - def logical_operator?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#72 - def method_call_before_constant_resolution?(node); end - - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#46 - def offense_range(node); end - - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#18 - def omit_parentheses(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#90 - def parentheses_at_the_end_of_multiline_call?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#220 - def regexp_slash_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#55 - def require_parentheses_for_hash_value_omission?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#204 - def splat?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#76 - def super_call_without_arguments?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#68 - def syntax_like_method_call?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#208 - def ternary_if?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#224 - def unary_literal?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#13 -RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses::OMIT_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#12 -RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses::TRAILING_WHITESPACE_REGEX = T.let(T.unsafe(nil), Regexp) - -# Style require_parentheses -# -# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#8 -module RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#27 - def allowed_method_name?(name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#31 - def eligible_for_parentheses_omission?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#39 - def ignored_macro?(node); end - - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#35 - def included_macros_list; end - - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#14 - def require_parentheses(node); end -end - -# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#9 -RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses::REQUIRE_MSG = T.let(T.unsafe(nil), String) - -# Checks for unwanted parentheses in parameterless method calls. -# -# This cop's allowed methods can be customized with `AllowedMethods`. -# By default, there are no allowed methods. -# -# 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() -# -# # good -# object.some_method -# @example AllowedMethods: [] (default) -# # bad -# object.foo() -# @example AllowedMethods: [foo] -# # good -# object.foo() -# -# 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#37 - def on_csend(node); end - - # 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#67 - def allowed_method_name?(name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#97 - def any_assignment?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#63 - def default_argument?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#59 - def ineligible_node?(node); end - - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#114 - def offense_range(node); end - - # 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#89 - def parenthesized_it_method_in_block?(node); end - - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#52 - def register_offense(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#71 - def same_name_assignment?(node); end - - # @return [Boolean] - # - # 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#34 -RuboCop::Cop::Style::MethodCallWithoutArgsParentheses::MSG = T.let(T.unsafe(nil), String) - -# Checks for methods called on a do...end block. The point of -# this check is that it's easy to miss the call tacked on to the block -# when reading code. -# -# @example -# # bad -# a do -# b -# end.c -# -# # good -# a { b }.c -# -# # good -# foo = a do -# b -# end -# foo.c -# -# source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#24 -class RuboCop::Cop::Style::MethodCalledOnDoEndBlock < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#29 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#40 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#29 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#40 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#27 -RuboCop::Cop::Style::MethodCalledOnDoEndBlock::MSG = T.let(T.unsafe(nil), String) - -# Checks for parentheses around the arguments in method -# definitions. Both instance and class/singleton methods are checked. -# -# Regardless of style, parentheses are necessary for: -# -# 1. Endless methods -# 2. Argument lists containing a `forward-arg` (`...`) -# 3. Argument lists containing an anonymous rest arguments forwarding (`*`) -# 4. Argument lists containing an anonymous keyword rest arguments forwarding (`**`) -# 5. Argument lists containing an anonymous block forwarding (`&`) -# -# Removing the parens would be a syntax error here. -# -# @example EnforcedStyle: require_parentheses (default) -# # The `require_parentheses` style requires method definitions -# # to always use parentheses -# -# # bad -# def bar num1, num2 -# num1 + num2 -# end -# -# def foo descriptive_var_name, -# another_descriptive_var_name, -# last_descriptive_var_name -# do_something -# end -# -# # good -# def bar(num1, num2) -# num1 + num2 -# end -# -# def foo(descriptive_var_name, -# another_descriptive_var_name, -# last_descriptive_var_name) -# do_something -# end -# @example EnforcedStyle: require_no_parentheses -# # The `require_no_parentheses` style requires method definitions -# # to never use parentheses -# -# # bad -# def bar(num1, num2) -# num1 + num2 -# end -# -# def foo(descriptive_var_name, -# another_descriptive_var_name, -# last_descriptive_var_name) -# do_something -# end -# -# # good -# def bar num1, num2 -# num1 + num2 -# end -# -# def foo descriptive_var_name, -# another_descriptive_var_name, -# last_descriptive_var_name -# do_something -# end -# @example EnforcedStyle: require_no_parentheses_except_multiline -# # The `require_no_parentheses_except_multiline` style prefers no -# # parentheses when method definition arguments fit on single line, -# # but prefers parentheses when arguments span multiple lines. -# -# # bad -# def bar(num1, num2) -# num1 + num2 -# end -# -# def foo descriptive_var_name, -# another_descriptive_var_name, -# last_descriptive_var_name -# do_something -# end -# -# # good -# def bar num1, num2 -# num1 + num2 -# end -# -# def foo(descriptive_var_name, -# another_descriptive_var_name, -# last_descriptive_var_name) -# do_something -# end -# -# source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#97 -class RuboCop::Cop::Style::MethodDefParentheses < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#105 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#105 - def on_defs(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#169 - def anonymous_arguments?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#147 - def arguments_without_parentheses?(node); end - - # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#126 - def correct_arguments(arg_node, corrector); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#131 - def forced_parentheses?(node); end - - # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#151 - def missing_parentheses(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#142 - def require_parentheses?(args); end - - # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#161 - def unwanted_parentheses(args); end -end - -# source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#103 -RuboCop::Cop::Style::MethodDefParentheses::MSG_MISSING = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#102 -RuboCop::Cop::Style::MethodDefParentheses::MSG_PRESENT = T.let(T.unsafe(nil), String) - -# Checks for potential uses of `Enumerable#minmax`. -# -# @example -# -# # bad -# bar = [foo.min, foo.max] -# return foo.min, foo.max -# -# # good -# bar = foo.minmax -# return foo.minmax -# -# source://rubocop//lib/rubocop/cop/style/min_max.rb#17 -class RuboCop::Cop::Style::MinMax < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/min_max.rb#38 - def min_max_candidate(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/min_max.rb#22 - def on_array(node); end - - # source://rubocop//lib/rubocop/cop/style/min_max.rb#22 - def on_return(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/min_max.rb#55 - def argument_range(node); end - - # source://rubocop//lib/rubocop/cop/style/min_max.rb#42 - def message(offender, receiver); end - - # source://rubocop//lib/rubocop/cop/style/min_max.rb#46 - def offending_range(node); end -end - -# source://rubocop//lib/rubocop/cop/style/min_max.rb#20 -RuboCop::Cop::Style::MinMax::MSG = T.let(T.unsafe(nil), String) - -# Enforces the use of `max` or `min` instead of comparison for greater or less. -# -# NOTE: It can be used if you want to present limit or threshold in Ruby 2.7+. -# That it is slow though. So autocorrection will apply generic `max` or `min`: -# -# [source,ruby] -# ---- -# a.clamp(b..) # Same as `[a, b].max` -# a.clamp(..b) # Same as `[a, b].min` -# ---- -# -# @example -# -# # bad -# a > b ? a : b -# a >= b ? a : b -# -# # good -# [a, b].max -# -# # bad -# a < b ? a : b -# a <= b ? a : b -# -# # good -# [a, b].min -# -# source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#37 -class RuboCop::Cop::Style::MinMaxComparison < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#46 - def on_if(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#72 - def autocorrect(corrector, node, replacement); end - - # source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#64 - def preferred_method(operator, lhs, rhs, if_branch, else_branch); end -end - -# source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#44 -RuboCop::Cop::Style::MinMaxComparison::COMPARISON_OPERATORS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#42 -RuboCop::Cop::Style::MinMaxComparison::GRATER_OPERATORS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#43 -RuboCop::Cop::Style::MinMaxComparison::LESS_OPERATORS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#41 -RuboCop::Cop::Style::MinMaxComparison::MSG = T.let(T.unsafe(nil), String) - -# Checks for `if` expressions that do not have an `else` branch. -# -# NOTE: Pattern matching is allowed to have no `else` branch because unlike `if` and `case`, -# it raises `NoMatchingPatternError` if the pattern doesn't match and without having `else`. -# -# Supported styles are: if, case, both. -# -# @example EnforcedStyle: both (default) -# # warn when an `if` or `case` expression is missing an `else` branch. -# -# # bad -# if condition -# statement -# end -# -# # bad -# case var -# when condition -# statement -# end -# -# # good -# if condition -# statement -# else -# # the content of `else` branch will be determined by Style/EmptyElse -# end -# -# # good -# case var -# when condition -# statement -# else -# # the content of `else` branch will be determined by Style/EmptyElse -# end -# @example EnforcedStyle: if -# # warn when an `if` expression is missing an `else` branch. -# -# # bad -# if condition -# statement -# end -# -# # good -# if condition -# statement -# else -# # the content of `else` branch will be determined by Style/EmptyElse -# end -# -# # good -# case var -# when condition -# statement -# end -# -# # good -# case var -# when condition -# statement -# else -# # the content of `else` branch will be determined by Style/EmptyElse -# end -# @example EnforcedStyle: case -# # warn when a `case` expression is missing an `else` branch. -# -# # bad -# case var -# when condition -# statement -# end -# -# # good -# case var -# when condition -# statement -# else -# # the content of `else` branch will be determined by Style/EmptyElse -# end -# -# # good -# if condition -# statement -# end -# -# # good -# if condition -# statement -# else -# # the content of `else` branch will be determined by Style/EmptyElse -# end -# -# source://rubocop//lib/rubocop/cop/style/missing_else.rb#99 -class RuboCop::Cop::Style::MissingElse < ::RuboCop::Cop::Base - include ::RuboCop::Cop::OnNormalIfUnless - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/missing_else.rb#115 - def on_case(node); end - - # source://rubocop//lib/rubocop/cop/style/missing_else.rb#121 - def on_case_match(node); end - - # source://rubocop//lib/rubocop/cop/style/missing_else.rb#108 - def on_normal_if_unless(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/missing_else.rb#146 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/missing_else.rb#161 - def case_style?; end - - # source://rubocop//lib/rubocop/cop/style/missing_else.rb#127 - def check(node); end - - # source://rubocop//lib/rubocop/cop/style/missing_else.rb#179 - def empty_else_config; end - - # source://rubocop//lib/rubocop/cop/style/missing_else.rb#173 - def empty_else_style; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/missing_else.rb#157 - def if_style?; end - - # source://rubocop//lib/rubocop/cop/style/missing_else.rb#135 - def message_template; end - - # source://rubocop//lib/rubocop/cop/style/missing_else.rb#169 - def unless_else_config; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/missing_else.rb#165 - def unless_else_cop_enabled?; end -end - -# source://rubocop//lib/rubocop/cop/style/missing_else.rb#104 -RuboCop::Cop::Style::MissingElse::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/missing_else.rb#106 -RuboCop::Cop::Style::MissingElse::MSG_EMPTY = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/missing_else.rb#105 -RuboCop::Cop::Style::MissingElse::MSG_NIL = T.let(T.unsafe(nil), String) - -# Checks for the presence of `method_missing` without also -# defining `respond_to_missing?`. -# -# Not defining `respond_to_missing?` will cause metaprogramming -# methods like `respond_to?` to behave unexpectedly: -# -# [source,ruby] -# ---- -# class StringDelegator -# def initialize(string) -# @string = string -# end -# -# def method_missing(name, *args) -# @string.send(name, *args) -# end -# end -# -# delegator = StringDelegator.new("foo") -# # Claims to not respond to `upcase`. -# delegator.respond_to?(:upcase) # => false -# # But you can call it. -# delegator.upcase # => FOO -# ---- -# -# @example -# # bad -# def method_missing(name, *args) -# if @delegate.respond_to?(name) -# @delegate.send(name, *args) -# else -# super -# end -# end -# -# # good -# def respond_to_missing?(name, include_private) -# @delegate.respond_to?(name) || super -# end -# -# def method_missing(name, *args) -# if @delegate.respond_to?(name) -# @delegate.send(name, *args) -# else -# super -# end -# end -# -# source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#54 -class RuboCop::Cop::Style::MissingRespondToMissing < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#57 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#57 - def on_defs(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#67 - def implements_respond_to_missing?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#55 -RuboCop::Cop::Style::MissingRespondToMissing::MSG = T.let(T.unsafe(nil), String) - -# Checks for grouping of mixins in `class` and `module` bodies. -# By default it enforces mixins to be placed in separate declarations, -# but it can be configured to enforce grouping them in one declaration. -# -# @example EnforcedStyle: separated (default) -# # bad -# class Foo -# include Bar, Qox -# end -# -# # good -# class Foo -# include Qox -# include Bar -# end -# @example EnforcedStyle: grouped -# # bad -# class Foo -# extend Bar -# extend Qox -# end -# -# # good -# class Foo -# extend Qox, Bar -# end -# -# source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#33 -class RuboCop::Cop::Style::MixinGrouping < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#40 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#40 - def on_module(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#64 - def check(send_node); end - - # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#72 - def check_grouped_style(send_node); end - - # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#91 - def check_separated_style(send_node); end - - # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#127 - def group_mixins(node, mixins); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#110 - def grouped_style?; end - - # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#53 - def range_to_remove_for_subsequent_mixin(mixins, node); end - - # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#118 - def separate_mixins(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#114 - def separated_style?; end - - # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#104 - def sibling_mixins(send_node); end -end - -# source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#37 -RuboCop::Cop::Style::MixinGrouping::MIXIN_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#38 -RuboCop::Cop::Style::MixinGrouping::MSG = T.let(T.unsafe(nil), String) - -# Checks that `include`, `extend` and `prepend` statements appear -# inside classes and modules, not at the top level, so as to not affect -# the behavior of `Object`. -# -# @example -# # bad -# include M -# -# class C -# end -# -# # bad -# extend M -# -# class C -# end -# -# # bad -# prepend M -# -# class C -# end -# -# # good -# class C -# include M -# end -# -# # good -# class C -# extend M -# end -# -# # good -# class C -# prepend M -# end -# -# source://rubocop//lib/rubocop/cop/style/mixin_usage.rb#43 -class RuboCop::Cop::Style::MixinUsage < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/mixin_usage.rb#54 - def in_top_level_scope?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/mixin_usage.rb#48 - def include_statement(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/mixin_usage.rb#62 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/style/mixin_usage.rb#44 -RuboCop::Cop::Style::MixinUsage::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/mixin_usage.rb#45 -RuboCop::Cop::Style::MixinUsage::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for use of `extend self` or `module_function` in a module. -# -# Supported styles are: `module_function` (default), `extend_self` and `forbidden`. -# -# A couple of things to keep in mind: -# -# - `forbidden` style prohibits the usage of both styles -# - in default mode (`module_function`), the cop won't be activated when the module -# contains any private methods -# -# @example EnforcedStyle: module_function (default) -# # bad -# module Test -# extend self -# # ... -# end -# -# # good -# module Test -# module_function -# # ... -# end -# -# # good -# module Test -# extend self -# # ... -# private -# # ... -# end -# -# # good -# module Test -# class << self -# # ... -# end -# end -# @example EnforcedStyle: extend_self -# # bad -# module Test -# module_function -# # ... -# end -# -# # good -# module Test -# extend self -# # ... -# end -# -# # good -# module Test -# class << self -# # ... -# end -# end -# @example EnforcedStyle: forbidden -# # bad -# module Test -# module_function -# # ... -# end -# -# # bad -# module Test -# extend self -# # ... -# end -# -# # bad -# module Test -# extend self -# # ... -# private -# # ... -# end -# -# # good -# module Test -# class << self -# # ... -# end -# end -# -# source://rubocop//lib/rubocop/cop/style/module_function.rb#95 -class RuboCop::Cop::Style::ModuleFunction < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/module_function.rb#107 - def extend_self_node?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/module_function.rb#104 - def module_function_node?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/module_function.rb#112 - def on_module(node); end - - # source://rubocop//lib/rubocop/cop/style/module_function.rb#110 - def private_directive?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/module_function.rb#149 - def check_extend_self(nodes); end - - # source://rubocop//lib/rubocop/cop/style/module_function.rb#155 - def check_forbidden(nodes); end - - # source://rubocop//lib/rubocop/cop/style/module_function.rb#141 - def check_module_function(nodes); end - - # source://rubocop//lib/rubocop/cop/style/module_function.rb#130 - def each_wrong_style(nodes, &block); end - - # source://rubocop//lib/rubocop/cop/style/module_function.rb#162 - def message(_range); end -end - -# source://rubocop//lib/rubocop/cop/style/module_function.rb#100 -RuboCop::Cop::Style::ModuleFunction::EXTEND_SELF_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/module_function.rb#101 -RuboCop::Cop::Style::ModuleFunction::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/module_function.rb#99 -RuboCop::Cop::Style::ModuleFunction::MODULE_FUNCTION_MSG = T.let(T.unsafe(nil), String) - -# Checks for chaining of a block after another block that spans -# multiple lines. -# -# @example -# -# # bad -# Thread.list.select do |t| -# t.alive? -# end.map do |t| -# t.object_id -# end -# -# # good -# alive_threads = Thread.list.select do |t| -# t.alive? -# end -# alive_threads.map do |t| -# t.object_id -# end -# -# source://rubocop//lib/rubocop/cop/style/multiline_block_chain.rb#25 -class RuboCop::Cop::Style::MultilineBlockChain < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - # source://rubocop//lib/rubocop/cop/style/multiline_block_chain.rb#30 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/multiline_block_chain.rb#30 - def on_numblock(node); end -end - -# source://rubocop//lib/rubocop/cop/style/multiline_block_chain.rb#28 -RuboCop::Cop::Style::MultilineBlockChain::MSG = T.let(T.unsafe(nil), String) - -# Checks for uses of if/unless modifiers with multiple-lines bodies. -# -# @example -# -# # bad -# { -# result: 'this should not happen' -# } unless cond -# -# # good -# { result: 'ok' } if cond -# -# source://rubocop//lib/rubocop/cop/style/multiline_if_modifier.rb#17 -class RuboCop::Cop::Style::MultilineIfModifier < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::StatementModifier - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/multiline_if_modifier.rb#25 - def on_if(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/multiline_if_modifier.rb#43 - def indented_body(body, node); end - - # source://rubocop//lib/rubocop/cop/style/multiline_if_modifier.rb#35 - def to_normal_if(node); end -end - -# source://rubocop//lib/rubocop/cop/style/multiline_if_modifier.rb#22 -RuboCop::Cop::Style::MultilineIfModifier::MSG = T.let(T.unsafe(nil), String) - -# Checks for uses of the `then` keyword in multi-line if statements. -# -# @example -# # bad -# # This is considered bad practice. -# if cond then -# end -# -# # good -# # If statements can contain `then` on the same line. -# if cond then a -# elsif cond then b -# end -# -# source://rubocop//lib/rubocop/cop/style/multiline_if_then.rb#19 -class RuboCop::Cop::Style::MultilineIfThen < ::RuboCop::Cop::Base - include ::RuboCop::Cop::OnNormalIfUnless - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/multiline_if_then.rb#28 - def on_normal_if_unless(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiline_if_then.rb#38 - def non_modifier_then?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/multiline_if_then.rb#26 -RuboCop::Cop::Style::MultilineIfThen::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/multiline_if_then.rb#24 -RuboCop::Cop::Style::MultilineIfThen::NON_MODIFIER_THEN = T.let(T.unsafe(nil), Regexp) - -# Checks uses of the `then` keyword in multi-line `in` statement. -# -# @example -# # bad -# case expression -# in pattern then -# end -# -# # good -# case expression -# in pattern -# end -# -# # good -# case expression -# in pattern then do_something -# end -# -# # good -# case expression -# in pattern then do_something(arg1, -# arg2) -# end -# -# source://rubocop//lib/rubocop/cop/style/multiline_in_pattern_then.rb#30 -class RuboCop::Cop::Style::MultilineInPatternThen < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/multiline_in_pattern_then.rb#39 - def on_in_pattern(node); end - - private - - # Requires `then` for write `in` and its body on the same line. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiline_in_pattern_then.rb#51 - def require_then?(in_pattern_node); end -end - -# source://rubocop//lib/rubocop/cop/style/multiline_in_pattern_then.rb#37 -RuboCop::Cop::Style::MultilineInPatternThen::MSG = T.let(T.unsafe(nil), String) - -# Checks expressions wrapping styles for multiline memoization. -# -# @example EnforcedStyle: keyword (default) -# # bad -# foo ||= ( -# bar -# baz -# ) -# -# # good -# foo ||= begin -# bar -# baz -# end -# @example EnforcedStyle: braces -# # bad -# foo ||= begin -# bar -# baz -# end -# -# # good -# foo ||= ( -# bar -# baz -# ) -# -# source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#33 -class RuboCop::Cop::Style::MultilineMemoization < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#56 - def message(_node); end - - # source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#41 - def on_or_asgn(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#62 - def bad_rhs?(rhs); end - - # source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#72 - def keyword_autocorrect(node, corrector); end - - # source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#78 - def keyword_begin_str(node, node_buf); end - - # source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#86 - def keyword_end_str(node, node_buf); end -end - -# source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#39 -RuboCop::Cop::Style::MultilineMemoization::BRACES_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#38 -RuboCop::Cop::Style::MultilineMemoization::KEYWORD_MSG = T.let(T.unsafe(nil), String) - -# Checks for method signatures that span multiple lines. -# -# @example -# -# # good -# -# def foo(bar, baz) -# end -# -# # bad -# -# def foo(bar, -# baz) -# end -# -# source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#21 -class RuboCop::Cop::Style::MultilineMethodSignature < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#27 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#27 - def on_defs(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#42 - def autocorrect(corrector, node, begin_of_arguments); end - - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#73 - def closing_line(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#77 - def correction_exceeds_max_line_length?(node); end - - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#85 - def definition_width(node); end - - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#81 - def indentation_width(node); end - - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#65 - def last_line_source_of_arguments(arguments); end - - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#89 - def max_line_length; end - - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#69 - def opening_line(node); end -end - -# source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#25 -RuboCop::Cop::Style::MultilineMethodSignature::MSG = T.let(T.unsafe(nil), String) - -# Checks for multi-line ternary op expressions. -# -# NOTE: `return if ... else ... end` is syntax error. If `return` is used before -# multiline ternary operator expression, it will be autocorrected to single-line -# ternary operator. The same is true for `break`, `next`, and method call. -# -# @example -# # bad -# a = cond ? -# b : c -# a = cond ? b : -# c -# a = cond ? -# b : -# c -# -# return cond ? -# b : -# c -# -# # good -# a = cond ? b : c -# a = if cond -# b -# else -# c -# end -# -# return cond ? b : c -# -# source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#36 -class RuboCop::Cop::Style::MultilineTernaryOperator < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CommentsHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#44 - def on_if(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#64 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#86 - def comments_in_condition(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#92 - def enforce_single_line_ternary_operator?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#60 - def offense?(node); end - - # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#72 - def replacement(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#96 - def use_assignment_method?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#40 -RuboCop::Cop::Style::MultilineTernaryOperator::MSG_IF = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#41 -RuboCop::Cop::Style::MultilineTernaryOperator::MSG_SINGLE_LINE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#42 -RuboCop::Cop::Style::MultilineTernaryOperator::SINGLE_LINE_TYPES = T.let(T.unsafe(nil), Array) - -# Checks uses of the `then` keyword -# in multi-line when statements. -# -# @example -# # bad -# case foo -# when bar then -# end -# -# # good -# case foo -# when bar -# end -# -# # good -# case foo -# when bar then do_something -# end -# -# # good -# case foo -# when bar then do_something(arg1, -# arg2) -# end -# -# source://rubocop//lib/rubocop/cop/style/multiline_when_then.rb#31 -class RuboCop::Cop::Style::MultilineWhenThen < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/multiline_when_then.rb#37 - def on_when(node); end - - private - - # Requires `then` for write `when` and its body on the same line. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiline_when_then.rb#49 - def require_then?(when_node); end -end - -# source://rubocop//lib/rubocop/cop/style/multiline_when_then.rb#35 -RuboCop::Cop::Style::MultilineWhenThen::MSG = T.let(T.unsafe(nil), String) - -# Checks against comparing a variable with multiple items, where -# `Array#include?`, `Set#include?` or a `case` could be used instead -# to avoid code repetition. -# It accepts comparisons of multiple method calls to avoid unnecessary method calls -# by default. It can be configured by `AllowMethodComparison` option. -# -# @example -# # bad -# a = 'a' -# foo if a == 'a' || a == 'b' || a == 'c' -# -# # good -# a = 'a' -# foo if ['a', 'b', 'c'].include?(a) -# -# VALUES = Set['a', 'b', 'c'].freeze -# # elsewhere... -# foo if VALUES.include?(a) -# -# case foo -# when 'a', 'b', 'c' then foo -# # ... -# end -# -# # accepted (but consider `case` as above) -# foo if a == b.lightweight || a == b.heavyweight -# @example AllowMethodComparison: true (default) -# # good -# foo if a == b.lightweight || a == b.heavyweight -# @example AllowMethodComparison: false -# # bad -# foo if a == b.lightweight || a == b.heavyweight -# -# # 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#52 -class RuboCop::Cop::Style::MultipleComparison < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#74 - def on_or(node); end - - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#64 - def simple_comparison_lhs(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#69 - def simple_comparison_rhs(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#59 - def simple_double_comparison?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#154 - def allow_method_comparison?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#132 - def comparison?(node); end - - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#158 - def comparisons_threshold; end - - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#97 - def find_offending_var(node, variables = T.unsafe(nil), values = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#124 - def nested_comparison?(node); end - - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#116 - def offense_range(values); end - - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#144 - def root_of_or_node(or_node); end - - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#136 - def simple_comparison(node); end - - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#120 - def variable_name(node); end -end - -# 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 -# mutable literal (e.g. array or hash). -# -# Strict mode can be used to freeze all constants, rather than -# just literals. -# Strict mode is considered an experimental feature. It has not been -# updated with an exhaustive list of all methods that will produce -# frozen objects so there is a decent chance of getting some false -# positives. Luckily, there is no harm in freezing an already -# frozen object. -# -# From Ruby 3.0, this cop honours the magic comment -# 'shareable_constant_value'. When this magic comment is set to any -# acceptable value other than none, it will suppress the offenses -# raised by this cop. It enforces frozen state. -# -# NOTE: `Regexp` and `Range` literals are frozen objects since Ruby 3.0. -# -# NOTE: From Ruby 3.0, interpolated strings are not frozen when -# `# frozen-string-literal: true` is used, so this cop enforces explicit -# freezing for such strings. -# -# NOTE: From Ruby 3.0, this cop allows explicit freezing of constants when -# the `shareable_constant_value` directive is used. -# -# @example EnforcedStyle: literals (default) -# # bad -# CONST = [1, 2, 3] -# -# # good -# CONST = [1, 2, 3].freeze -# -# # good -# CONST = <<~TESTING.freeze -# This is a heredoc -# TESTING -# -# # good -# CONST = Something.new -# @example EnforcedStyle: strict -# # bad -# CONST = Something.new -# -# # bad -# CONST = Struct.new do -# def foo -# puts 1 -# end -# end -# -# # good -# CONST = Something.new.freeze -# -# # good -# CONST = Struct.new do -# def foo -# puts 1 -# end -# end.freeze -# @example -# # Magic comment - shareable_constant_value: literal -# -# # bad -# CONST = [1, 2, 3] -# -# # good -# # shareable_constant_value: literal -# CONST = [1, 2, 3] -# -# source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#83 -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.9.0/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 - def on_casgn(node); end - - # Some of these patterns may not actually return an immutable object, - # but we want to consider them immutable for this cop. - # - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#223 - def operation_produces_immutable_object?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#240 - def range_enclosed_in_parentheses?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#216 - def splat_value(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet/0.9.0/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#12 - def t_let(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#168 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#157 - def check(value); end - - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#207 - def correct_splat_expansion(corrector, expr, splat_value); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#199 - def frozen_regexp_or_range_literals?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#189 - def immutable_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#183 - def mutable_literal?(value); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#203 - def requires_parentheses?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#193 - def shareable_constant_value?(node); end - - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#148 - def strict_check(value); end -end - -# source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#125 -RuboCop::Cop::Style::MutableConstant::MSG = T.let(T.unsafe(nil), String) - -# Handles magic comment shareable_constant_value with O(n ^ 2) complexity -# n - number of lines in the source -# Iterates over all lines before a CONSTANT -# until it reaches shareable_constant_value -# -# source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#88 -module RuboCop::Cop::Style::MutableConstant::ShareableConstantValue - private - - # Identifies the most recent magic comment with valid shareable constant values - # that's in scope for this node - # - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#102 - def magic_comment_in_scope(node); end - - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#110 - def processed_source_till_node(node); end - - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#91 - def recent_shareable_value?(node); end - - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#114 - def shareable_constant_value_enabled?(value); end - - class << self - # Identifies the most recent magic comment with valid shareable constant values - # that's in scope for this node - # - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#102 - def magic_comment_in_scope(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#91 - def recent_shareable_value?(node); end - end -end - -# Checks for uses of if with a negated condition. Only ifs -# without else are considered. There are three different styles: -# -# * both -# * prefix -# * postfix -# -# @example EnforcedStyle: both (default) -# # enforces `unless` for `prefix` and `postfix` conditionals -# -# # bad -# -# if !foo -# bar -# end -# -# # good -# -# unless foo -# bar -# end -# -# # bad -# -# bar if !foo -# -# # good -# -# bar unless foo -# @example EnforcedStyle: prefix -# # enforces `unless` for just `prefix` conditionals -# -# # bad -# -# if !foo -# bar -# end -# -# # good -# -# unless foo -# bar -# end -# -# # good -# -# bar if !foo -# @example EnforcedStyle: postfix -# # enforces `unless` for just `postfix` conditionals -# -# # bad -# -# bar if !foo -# -# # good -# -# bar unless foo -# -# # good -# -# if !foo -# bar -# end -# -# source://rubocop//lib/rubocop/cop/style/negated_if.rb#71 -class RuboCop::Cop::Style::NegatedIf < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::NegativeConditional - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/negated_if.rb#76 - def on_if(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/negated_if.rb#92 - def correct_style?(node); end - - # source://rubocop//lib/rubocop/cop/style/negated_if.rb#88 - def message(node); end -end - -# Checks for uses of `if-else` and ternary operators with a negated condition -# which can be simplified by inverting condition and swapping branches. -# -# @example -# # bad -# if !x -# do_something -# else -# do_something_else -# end -# -# # good -# if x -# do_something_else -# else -# do_something -# end -# -# # bad -# !x ? do_something : do_something_else -# -# # good -# x ? do_something_else : do_something -# -# source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#30 -class RuboCop::Cop::Style::NegatedIfElseCondition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#39 - def double_negation?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#50 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#45 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#97 - def correct_negated_condition(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#93 - def corrected_ancestor?(node); end - - # Collect the entire else branch, including whitespace and comments - # - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#127 - def else_range(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#71 - def if_else?(node); end - - # Collect the entire if branch, including whitespace and comments - # - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#118 - def if_range(node); end - - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#87 - def message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#82 - def negated_condition?(node); end - - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#109 - def swap_branches(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#76 - def unwrap_begin_nodes(node); end - - class << self - # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#41 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#34 -RuboCop::Cop::Style::NegatedIfElseCondition::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#36 -RuboCop::Cop::Style::NegatedIfElseCondition::NEGATED_EQUALITY_METHODS = T.let(T.unsafe(nil), Array) - -# Checks for uses of unless with a negated condition. Only unless -# without else are considered. There are three different styles: -# -# * both -# * prefix -# * postfix -# -# @example EnforcedStyle: both (default) -# # enforces `if` for `prefix` and `postfix` conditionals -# -# # bad -# unless !foo -# bar -# end -# -# # good -# if foo -# bar -# end -# -# # bad -# bar unless !foo -# -# # good -# bar if foo -# @example EnforcedStyle: prefix -# # enforces `if` for just `prefix` conditionals -# -# # bad -# unless !foo -# bar -# end -# -# # good -# if foo -# bar -# end -# -# # good -# bar unless !foo -# @example EnforcedStyle: postfix -# # enforces `if` for just `postfix` conditionals -# -# # bad -# bar unless !foo -# -# # good -# bar if foo -# -# # good -# unless !foo -# bar -# end -# -# source://rubocop//lib/rubocop/cop/style/negated_unless.rb#61 -class RuboCop::Cop::Style::NegatedUnless < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::NegativeConditional - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/negated_unless.rb#66 - def on_if(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/negated_unless.rb#82 - def correct_style?(node); end - - # source://rubocop//lib/rubocop/cop/style/negated_unless.rb#78 - def message(node); end -end - -# Checks for uses of while with a negated condition. -# -# @example -# # bad -# while !foo -# bar -# end -# -# # good -# until foo -# bar -# end -# -# # bad -# bar until !foo -# -# # good -# bar while foo -# bar while !foo && baz -# -# source://rubocop//lib/rubocop/cop/style/negated_while.rb#25 -class RuboCop::Cop::Style::NegatedWhile < ::RuboCop::Cop::Base - include ::RuboCop::Cop::NegativeConditional - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/negated_while.rb#29 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/style/negated_while.rb#29 - def on_while(node); end -end - -# Checks for nested `File.dirname`. -# It replaces nested `File.dirname` with the level argument introduced in Ruby 3.1. -# -# @example -# -# # bad -# File.dirname(File.dirname(path)) -# -# # good -# File.dirname(path, 2) -# -# source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#17 -class RuboCop::Cop::Style::NestedFileDirname < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#28 - def file_dirname?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#33 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#60 - def offense_range(node); end - - # source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#49 - def path_with_dir_level(node, level); end -end - -# source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#22 -RuboCop::Cop::Style::NestedFileDirname::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#23 -RuboCop::Cop::Style::NestedFileDirname::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for nested use of if, unless, while and until in their -# modifier form. -# -# @example -# -# # bad -# something if a if b -# -# # good -# something if b && a -# -# source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#16 -class RuboCop::Cop::Style::NestedModifier < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#22 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#22 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#22 - def on_while(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#85 - def add_parentheses_to_method_arguments(send_node); end - - # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#42 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#30 - def check(node); end - - # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#65 - def left_hand_operand(node, operator); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#38 - def modifier?(node); end - - # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#51 - def new_expression(inner_node); end - - # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#61 - def replacement_operator(keyword); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#94 - def requires_parens?(node); end - - # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#71 - def right_hand_operand(node, left_hand_keyword); end -end - -# source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#20 -RuboCop::Cop::Style::NestedModifier::MSG = T.let(T.unsafe(nil), String) - -# Checks for unparenthesized method calls in the argument list -# of a parenthesized method call. -# `be`, `be_a`, `be_an`, `be_between`, `be_falsey`, `be_kind_of`, `be_instance_of`, -# `be_truthy`, `be_within`, `eq`, `eql`, `end_with`, `include`, `match`, `raise_error`, -# `respond_to`, and `start_with` methods are allowed by default. -# These are customizable with `AllowedMethods` option. -# -# @example -# # good -# method1(method2(arg)) -# -# # bad -# method1(method2 arg) -# @example AllowedMethods: [foo] -# # good -# method1(foo arg) -# -# source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#24 -class RuboCop::Cop::Style::NestedParenthesizedCalls < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::AllowedMethods - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#35 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#35 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#71 - def allowed?(send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#65 - def allowed_omission?(send_node); end - - # source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#51 - def autocorrect(corrector, nested); end - - class << self - # source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#31 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#29 -RuboCop::Cop::Style::NestedParenthesizedCalls::MSG = T.let(T.unsafe(nil), String) - -# Checks for nested ternary op expressions. -# -# @example -# # bad -# a ? (b ? b1 : b2) : a2 -# -# # good -# if a -# b ? b1 : b2 -# else -# a2 -# end -# -# source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#18 -class RuboCop::Cop::Style::NestedTernaryOperator < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#24 - def on_if(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#39 - def autocorrect(corrector, if_node); end - - # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#46 - def remove_parentheses(source); end - - # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#54 - def replace_loc_and_whitespace(corrector, range, replacement); end -end - -# source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#22 -RuboCop::Cop::Style::NestedTernaryOperator::MSG = T.let(T.unsafe(nil), String) - -# Use `next` to skip iteration instead of a condition at the end. -# -# @example EnforcedStyle: skip_modifier_ifs (default) -# # bad -# [1, 2].each do |a| -# if a == 1 -# puts a -# end -# end -# -# # good -# [1, 2].each do |a| -# next unless a == 1 -# puts a -# end -# -# # good -# [1, 2].each do |a| -# puts a if a == 1 -# end -# @example EnforcedStyle: always -# # With `always` all conditions at the end of an iteration needs to be -# # replaced by next - with `skip_modifier_ifs` the modifier if like -# # this one are ignored: `[1, 2].each { |a| puts a if a == 1 }` -# -# # bad -# [1, 2].each do |a| -# puts a if a == 1 -# end -# -# # bad -# [1, 2].each do |a| -# if a == 1 -# puts a -# end -# end -# -# # good -# [1, 2].each do |a| -# next unless a == 1 -# puts a -# end -# -# source://rubocop//lib/rubocop/cop/style/next.rb#49 -class RuboCop::Cop::Style::Next < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MinBodyLength - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/next.rb#68 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/next.rb#76 - def on_for(node); end - - # source://rubocop//lib/rubocop/cop/style/next.rb#62 - def on_new_investigation; end - - # source://rubocop//lib/rubocop/cop/style/next.rb#68 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/style/next.rb#76 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/style/next.rb#76 - def on_while(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/next.rb#213 - def actual_indent(lines, buffer); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/next.rb#112 - def allowed_modifier_if?(node); end - - # source://rubocop//lib/rubocop/cop/style/next.rb#155 - def autocorrect_block(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/next.rb#145 - def autocorrect_modifier(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/next.rb#84 - def check(node); end - - # source://rubocop//lib/rubocop/cop/style/next.rb#170 - def cond_range(node, cond); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/next.rb#189 - def end_followed_by_whitespace_only?(source_buffer, end_pos); end - - # source://rubocop//lib/rubocop/cop/style/next.rb#180 - def end_range(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/next.rb#98 - def ends_with_condition?(body); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/next.rb#128 - def exit_body_type?(node); end - - # source://rubocop//lib/rubocop/cop/style/next.rb#217 - def heredoc_lines(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/next.rb#120 - def if_else_children?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/next.rb#124 - def if_without_else?(node); end - - # source://rubocop//lib/rubocop/cop/style/next.rb#140 - def offense_location(offense_node); end - - # source://rubocop//lib/rubocop/cop/style/next.rb#134 - def offense_node(body); end - - # Adjust indentation of `lines` to match `node` - # - # source://rubocop//lib/rubocop/cop/style/next.rb#204 - def reindent(lines, node, corrector); end - - # source://rubocop//lib/rubocop/cop/style/next.rb#224 - def reindent_line(corrector, lineno, delta, buffer); end - - # source://rubocop//lib/rubocop/cop/style/next.rb#193 - def reindentable_lines(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/next.rb#104 - def simple_if_without_break?(node); end - - class << self - # source://rubocop//lib/rubocop/cop/style/next.rb#58 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/next.rb#56 -RuboCop::Cop::Style::Next::EXIT_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/next.rb#55 -RuboCop::Cop::Style::Next::MSG = T.let(T.unsafe(nil), String) - -# Checks for comparison of something with nil using `==` and -# `nil?`. -# -# Supported styles are: predicate, comparison. -# -# @example EnforcedStyle: predicate (default) -# -# # bad -# if x == nil -# end -# -# # good -# if x.nil? -# end -# @example EnforcedStyle: comparison -# -# # bad -# if x.nil? -# end -# -# # good -# if x == nil -# end -# -# source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#31 -class RuboCop::Cop::Style::NilComparison < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#44 - def nil_check?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#41 - def nil_comparison?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#46 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#67 - def message(_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#79 - def prefer_comparison?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#71 - def style_check?(node, &block); end -end - -# source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#36 -RuboCop::Cop::Style::NilComparison::EXPLICIT_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#35 -RuboCop::Cop::Style::NilComparison::PREDICATE_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#38 -RuboCop::Cop::Style::NilComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for lambdas and procs that always return nil, -# which can be replaced with an empty lambda or proc instead. -# -# @example -# # bad -# -> { nil } -# -# lambda do -# next nil -# end -# -# proc { nil } -# -# Proc.new do -# break nil -# end -# -# # good -# -> {} -# -# lambda do -# end -# -# -> (x) { nil if x } -# -# proc {} -# -# Proc.new { nil if x } -# -# source://rubocop//lib/rubocop/cop/style/nil_lambda.rb#35 -class RuboCop::Cop::Style::NilLambda < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/nil_lambda.rb#42 - def nil_return?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/nil_lambda.rb#46 - def on_block(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/nil_lambda.rb#58 - def autocorrect(corrector, node); end -end - -# source://rubocop//lib/rubocop/cop/style/nil_lambda.rb#39 -RuboCop::Cop::Style::NilLambda::MSG = T.let(T.unsafe(nil), String) - -# Checks for non-nil checks, which are usually redundant. -# -# With `IncludeSemanticChanges` set to `false` by default, this cop -# does not report offenses for `!x.nil?` and does no changes that might -# change behavior. -# Also `IncludeSemanticChanges` set to `false` with `EnforcedStyle: comparison` of -# `Style/NilComparison` cop, this cop does not report offenses for `x != nil` and -# does no changes to `!x.nil?` style. -# -# With `IncludeSemanticChanges` set to `true`, this cop reports offenses -# for `!x.nil?` and autocorrects that and `x != nil` to solely `x`, which -# is *usually* OK, but might change behavior. -# -# @example -# # bad -# if x != nil -# end -# -# # good -# if x -# end -# -# # Non-nil checks are allowed if they are the final nodes of predicate. -# # good -# def signed_in? -# !current_user.nil? -# end -# @example IncludeSemanticChanges: false (default) -# # good -# if !x.nil? -# end -# @example IncludeSemanticChanges: true -# # bad -# if !x.nil? -# end -# -# source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#44 -class RuboCop::Cop::Style::NonNilCheck < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#59 - def nil_check?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#62 - def not_and_nil_check?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#53 - def not_equal_to_nil?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#73 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#73 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#64 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#56 - def unless_check?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#93 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#123 - def autocorrect_comparison(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#137 - def autocorrect_non_nil(corrector, node, inner_node); end - - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#145 - def autocorrect_unless_nil(corrector, node, receiver); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#119 - def include_semantic_changes?; end - - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#110 - def message(node); end - - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#150 - def nil_comparison_style; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#88 - def register_offense?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#104 - def unless_and_nil_check?(send_node); end -end - -# source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#48 -RuboCop::Cop::Style::NonNilCheck::MSG_FOR_REDUNDANCY = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#47 -RuboCop::Cop::Style::NonNilCheck::MSG_FOR_REPLACEMENT = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#50 -RuboCop::Cop::Style::NonNilCheck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for uses of the keyword `not` instead of `!`. -# -# @example -# -# # bad - parentheses are required because of op precedence -# x = (not something) -# -# # good -# x = !something -# -# source://rubocop//lib/rubocop/cop/style/not.rb#16 -class RuboCop::Cop::Style::Not < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/not.rb#32 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/not.rb#60 - def correct_opposite_method(corrector, range, child); end - - # source://rubocop//lib/rubocop/cop/style/not.rb#65 - def correct_with_parens(corrector, range, node); end - - # source://rubocop//lib/rubocop/cop/style/not.rb#70 - def correct_without_parens(corrector, range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/not.rb#50 - def opposite_method?(child); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/not.rb#54 - def requires_parens?(child); end -end - -# source://rubocop//lib/rubocop/cop/style/not.rb#20 -RuboCop::Cop::Style::Not::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/not.rb#23 -RuboCop::Cop::Style::Not::OPPOSITE_METHODS = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/style/not.rb#21 -RuboCop::Cop::Style::Not::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for numbered parameters. -# -# It can either restrict the use of numbered parameters to -# single-lined blocks, or disallow completely numbered parameters. -# -# @example EnforcedStyle: allow_single_line (default) -# # bad -# collection.each do -# puts _1 -# end -# -# # good -# collection.each { puts _1 } -# @example EnforcedStyle: disallow -# # bad -# collection.each { puts _1 } -# -# # good -# collection.each { |item| puts item } -# -# source://rubocop//lib/rubocop/cop/style/numbered_parameters.rb#27 -class RuboCop::Cop::Style::NumberedParameters < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/numbered_parameters.rb#36 - def on_numblock(node); end -end - -# source://rubocop//lib/rubocop/cop/style/numbered_parameters.rb#31 -RuboCop::Cop::Style::NumberedParameters::MSG_DISALLOW = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/numbered_parameters.rb#32 -RuboCop::Cop::Style::NumberedParameters::MSG_MULTI_LINE = T.let(T.unsafe(nil), String) - -# Detects use of an excessive amount of numbered parameters in a -# single block. Having too many numbered parameters can make code too -# cryptic and hard to read. -# -# The cop defaults to registering an offense if there is more than 1 numbered -# parameter but this maximum can be configured by setting `Max`. -# -# @example Max: 1 (default) -# # bad -# use_multiple_numbered_parameters { _1.call(_2, _3, _4) } -# -# # good -# array.each { use_array_element_as_numbered_parameter(_1) } -# hash.each { use_only_hash_value_as_numbered_parameter(_2) } -# -# source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#20 -class RuboCop::Cop::Style::NumberedParametersLimit < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 - def max=(value); end - - # source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#32 - def on_numblock(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#49 - def max_count; end - - # source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#43 - def numbered_parameter_nodes(node); end -end - -# source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#24 -RuboCop::Cop::Style::NumberedParametersLimit::DEFAULT_MAX_VALUE = T.let(T.unsafe(nil), Integer) - -# source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#29 -RuboCop::Cop::Style::NumberedParametersLimit::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#30 -RuboCop::Cop::Style::NumberedParametersLimit::NUMBERED_PARAMETER_PATTERN = T.let(T.unsafe(nil), Regexp) - -# Checks for octal, hex, binary, and decimal literals using -# uppercase prefixes and corrects them to lowercase prefix -# or no prefix (in case of decimals). -# -# @example EnforcedOctalStyle: zero_with_o (default) -# # bad - missing octal prefix -# num = 01234 -# -# # bad - uppercase prefix -# num = 0O1234 -# num = 0X12AB -# num = 0B10101 -# -# # bad - redundant decimal prefix -# num = 0D1234 -# num = 0d1234 -# -# # good -# num = 0o1234 -# num = 0x12AB -# num = 0b10101 -# num = 1234 -# @example EnforcedOctalStyle: zero_only -# # bad -# num = 0o1234 -# num = 0O1234 -# -# # good -# num = 01234 -# -# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#36 -class RuboCop::Cop::Style::NumericLiteralPrefix < ::RuboCop::Cop::Base - include ::RuboCop::Cop::IntegerNode - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#52 - def on_int(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#109 - def format_binary(source); end - - # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#113 - def format_decimal(source); end - - # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#105 - def format_hex(source); end - - # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#97 - def format_octal(source); end - - # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#101 - def format_octal_zero_only(source); end - - # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#82 - def hex_bin_dec_literal_type(literal); end - - # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#68 - def literal_type(node); end - - # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#64 - def message(node); end - - # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#74 - def octal_literal_type(literal); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#93 - def octal_zero_only?; end -end - -# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#49 -RuboCop::Cop::Style::NumericLiteralPrefix::BINARY_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#43 -RuboCop::Cop::Style::NumericLiteralPrefix::BINARY_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#50 -RuboCop::Cop::Style::NumericLiteralPrefix::DECIMAL_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#44 -RuboCop::Cop::Style::NumericLiteralPrefix::DECIMAL_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#48 -RuboCop::Cop::Style::NumericLiteralPrefix::HEX_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#42 -RuboCop::Cop::Style::NumericLiteralPrefix::HEX_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#47 -RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#41 -RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#46 -RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_ZERO_ONLY_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#40 -RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_ZERO_ONLY_REGEX = T.let(T.unsafe(nil), Regexp) - -# Checks for big numeric literals without `_` between groups -# of digits in them. -# -# Additional allowed patterns can be added by adding regexps to -# the `AllowedPatterns` configuration. All regexps are treated -# as anchored even if the patterns do not contain anchors (so -# `\d{4}_\d{4}` will allow `1234_5678` but not `1234_5678_9012`). -# -# NOTE: Even if `AllowedPatterns` are given, autocorrection will -# only correct to the standard pattern of an `_` every 3 digits. -# -# @example -# -# # bad -# 1000000 -# 1_00_000 -# 1_0000 -# -# # good -# 1_000_000 -# 1000 -# @example Strict: false (default) -# -# # good -# 10_000_00 # typical representation of $10,000 in cents -# @example Strict: true -# -# # bad -# 10_000_00 # typical representation of $10,000 in cents -# @example AllowedNumbers: [3000] -# -# # good -# 3000 # You can specify allowed numbers. (e.g. port number) -# -# source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#43 -class RuboCop::Cop::Style::NumericLiterals < ::RuboCop::Cop::Base - include ::RuboCop::Cop::IntegerNode - include ::RuboCop::Cop::AllowedPattern - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 - def min_digits=(value); end - - # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#60 - def on_float(node); end - - # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#56 - def on_int(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#118 - def allowed_numbers; end - - # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#122 - def allowed_patterns; end - - # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#66 - def check(node); end - - # @param int_part [String] - # - # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#107 - def format_int_part(int_part); end - - # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#93 - def format_number(node); end - - # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#114 - def min_digits; end - - # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#82 - def register_offense(node, &_block); end - - # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#89 - def short_group_regex; end -end - -# source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#49 -RuboCop::Cop::Style::NumericLiterals::DELIMITER_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#48 -RuboCop::Cop::Style::NumericLiterals::MSG = T.let(T.unsafe(nil), String) - -# Checks for usage of comparison operators (`==`, -# `>`, `<`) to test numbers as zero, positive, or negative. -# These can be replaced by their respective predicate methods. -# This cop can also be configured to do the reverse. -# -# This cop's allowed methods can be customized with `AllowedMethods`. -# By default, there are no allowed methods. -# -# This cop disregards `#nonzero?` as its value is truthy or falsey, -# but not `true` and `false`, and thus not always interchangeable with -# `!= 0`. -# -# This cop allows comparisons to global variables, since they are often -# populated with objects which can be compared with integers, but are -# not themselves `Integer` polymorphic. -# -# @example EnforcedStyle: predicate (default) -# # bad -# foo == 0 -# 0 > foo -# bar.baz > 0 -# -# # good -# foo.zero? -# foo.negative? -# bar.baz.positive? -# @example EnforcedStyle: comparison -# # bad -# foo.zero? -# foo.negative? -# bar.baz.positive? -# -# # good -# foo == 0 -# 0 > foo -# bar.baz > 0 -# @example AllowedMethods: [] (default) with EnforcedStyle: predicate -# # bad -# foo == 0 -# 0 > foo -# bar.baz > 0 -# @example AllowedMethods: [==] with EnforcedStyle: predicate -# # good -# foo == 0 -# -# # bad -# 0 > foo -# bar.baz > 0 -# @example AllowedPatterns: [] (default) with EnforcedStyle: comparison -# # bad -# foo.zero? -# foo.negative? -# bar.baz.positive? -# @example AllowedPatterns: ['zero'] with EnforcedStyle: predicate -# # good -# # bad -# foo.zero? -# -# # bad -# foo.negative? -# bar.baz.positive? -# -# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#78 -class RuboCop::Cop::Style::NumericPredicate < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#174 - def comparison(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#179 - def inverted_comparison(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#90 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#169 - def predicate(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#107 - def allowed_method_name?(name); end - - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#111 - def check(node); end - - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#154 - def invert; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#162 - def negated?(node); end - - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#134 - def parenthesized_source(node); end - - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#124 - def replacement(node, numeric, operation); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#146 - def replacement_supported?(operator); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#142 - def require_parentheses?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#84 -RuboCop::Cop::Style::NumericPredicate::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#86 -RuboCop::Cop::Style::NumericPredicate::REPLACEMENTS = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#88 -RuboCop::Cop::Style::NumericPredicate::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Enforces the use of consistent method names -# `Object#yield_self` or `Object#then`. -# -# @example EnforcedStyle: then (default) -# -# # bad -# obj.yield_self { |x| x.do_something } -# -# # good -# obj.then { |x| x.do_something } -# @example EnforcedStyle: yield_self -# -# # bad -# obj.then { |x| x.do_something } -# -# # good -# obj.yield_self { |x| x.do_something } -# -# source://rubocop//lib/rubocop/cop/style/object_then.rb#25 -class RuboCop::Cop::Style::ObjectThen < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/object_then.rb#35 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/object_then.rb#42 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/object_then.rb#35 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/style/object_then.rb#42 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/object_then.rb#51 - def check_method_node(node); end - - # source://rubocop//lib/rubocop/cop/style/object_then.rb#69 - def message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/object_then.rb#65 - def preferred_method?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/object_then.rb#32 -RuboCop::Cop::Style::ObjectThen::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/object_then.rb#33 -RuboCop::Cop::Style::ObjectThen::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for uses of if/then/else/end constructs on a single line. -# `AlwaysCorrectToMultiline` config option can be set to true to autocorrect all offenses to -# multi-line constructs. When `AlwaysCorrectToMultiline` is false (default case) the -# autocorrect will first try converting them to ternary operators. -# -# @example -# # bad -# if foo then bar else baz end -# -# # bad -# unless foo then baz else bar end -# -# # good -# foo ? bar : baz -# -# # good -# bar if foo -# -# # good -# if foo then bar end -# -# # good -# if foo -# bar -# else -# baz -# end -# @example AlwaysCorrectToMultiline: false (default) -# # bad -# if cond then run else dont end -# -# # good -# cond ? run : dont -# @example AlwaysCorrectToMultiline: true -# # bad -# if cond then run else dont end -# -# # good -# if cond -# run -# else -# dont -# end -# -# source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#52 -class RuboCop::Cop::Style::OneLineConditional < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::OnNormalIfUnless - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#61 - def on_normal_if_unless(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#100 - def always_multiline?; end - - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#82 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#104 - def cannot_replace_to_ternary?(node); end - - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#118 - def expr_replacement(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#139 - def keyword_with_changed_precedence?(node); end - - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#78 - def message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#132 - def method_call_with_changed_precedence?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#124 - def requires_parentheses?(node); end - - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#90 - def ternary_correction(node); end - - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#110 - def ternary_replacement(node); end -end - -# source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#58 -RuboCop::Cop::Style::OneLineConditional::MSG = T.let(T.unsafe(nil), String) - -# Flags uses of `OpenStruct`, as it is now officially discouraged -# to be used for performance, version compatibility, and potential security issues. -# -# @example -# -# # bad -# point = OpenStruct.new(x: 0, y: 1) -# -# # good -# Point = Struct.new(:x, :y) -# point = Point.new(0, 1) -# -# # also good -# point = { x: 0, y: 1 } -# -# # bad -# test_double = OpenStruct.new(a: 'b') -# -# # good (assumes test using rspec-mocks) -# test_double = double -# allow(test_double).to receive(:a).and_return('b') -# -# source://rubocop//lib/rubocop/cop/style/open_struct_use.rb#44 -class RuboCop::Cop::Style::OpenStructUse < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/open_struct_use.rb#52 - def on_const(node); end - - # source://rubocop//lib/rubocop/cop/style/open_struct_use.rb#48 - def uses_open_struct?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/open_struct_use.rb#61 - def custom_class_or_module_definition?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/open_struct_use.rb#45 -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 `!~`. -# -# @example -# -# # bad -# foo.+ bar -# foo.& bar -# -# # good -# foo + bar -# foo & bar -# -# source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#20 -class RuboCop::Cop::Style::OperatorMethodCall < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#30 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#74 - def insert_space_after?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#57 - def invalid_syntax_argument?(argument); end - - # Checks for an acceptable case of `foo.+(bar).baz`. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#51 - def method_call_with_parenthesized_arg?(argument); end - - # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#63 - def wrap_in_parentheses_if_chained(corrector, node); end -end - -# source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#25 -RuboCop::Cop::Style::OperatorMethodCall::INVALID_SYNTAX_ARG_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#23 -RuboCop::Cop::Style::OperatorMethodCall::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#24 -RuboCop::Cop::Style::OperatorMethodCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for options hashes and discourages them if the -# current Ruby version supports keyword arguments. -# -# @example -# -# # bad -# def fry(options = {}) -# temperature = options.fetch(:temperature, 300) -# # ... -# end -# -# # good -# def fry(temperature: 300) -# # ... -# end -# -# source://rubocop//lib/rubocop/cop/style/option_hash.rb#22 -class RuboCop::Cop::Style::OptionHash < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/option_hash.rb#30 - def on_args(node); end - - # source://rubocop//lib/rubocop/cop/style/option_hash.rb#26 - def option_hash(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/option_hash.rb#39 - def allowlist; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/option_hash.rb#48 - def super_used?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/option_hash.rb#43 - def suspicious_name?(arg_name); end -end - -# source://rubocop//lib/rubocop/cop/style/option_hash.rb#23 -RuboCop::Cop::Style::OptionHash::MSG = T.let(T.unsafe(nil), String) - -# Checks for optional arguments to methods -# that do not come at the end of the argument list. -# -# @example -# # bad -# def foo(a = 1, b, c) -# end -# -# # good -# def baz(a, b, c = 1) -# end -# -# def foobar(a = 1, b = 2, c = 3) -# end -# -# source://rubocop//lib/rubocop/cop/style/optional_arguments.rb#24 -class RuboCop::Cop::Style::OptionalArguments < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/optional_arguments.rb#27 - def on_def(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/optional_arguments.rb#45 - def argument_positions(arguments); end - - # source://rubocop//lib/rubocop/cop/style/optional_arguments.rb#33 - def each_misplaced_optional_arg(arguments); end -end - -# source://rubocop//lib/rubocop/cop/style/optional_arguments.rb#25 -RuboCop::Cop::Style::OptionalArguments::MSG = T.let(T.unsafe(nil), String) - -# Checks for places where keyword arguments can be used instead of -# boolean arguments when defining methods. `respond_to_missing?` method is allowed by default. -# These are customizable with `AllowedMethods` option. -# -# @example -# # bad -# def some_method(bar = false) -# puts bar -# end -# -# # bad - common hack before keyword args were introduced -# def some_method(options = {}) -# bar = options.fetch(:bar, false) -# puts bar -# end -# -# # good -# def some_method(bar: false) -# puts bar -# end -# @example AllowedMethods: ['some_method'] -# # good -# def some_method(bar = false) -# puts bar -# end -# -# source://rubocop//lib/rubocop/cop/style/optional_boolean_parameter.rb#37 -class RuboCop::Cop::Style::OptionalBooleanParameter < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - - # source://rubocop//lib/rubocop/cop/style/optional_boolean_parameter.rb#43 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/optional_boolean_parameter.rb#43 - def on_defs(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/optional_boolean_parameter.rb#56 - def format_message(argument); end -end - -# source://rubocop//lib/rubocop/cop/style/optional_boolean_parameter.rb#40 -RuboCop::Cop::Style::OptionalBooleanParameter::MSG = T.let(T.unsafe(nil), String) - -# Checks for potential usage of the `||=` operator. -# -# @example -# # bad -# name = name ? name : 'Bozhidar' -# -# # bad -# name = if name -# name -# else -# 'Bozhidar' -# end -# -# # bad -# unless name -# name = 'Bozhidar' -# end -# -# # bad -# name = 'Bozhidar' unless name -# -# # good - set name to 'Bozhidar', only if it's nil or false -# name ||= 'Bozhidar' -# -# source://rubocop//lib/rubocop/cop/style/or_assignment.rb#29 -class RuboCop::Cop::Style::OrAssignment < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#57 - def on_cvasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#57 - def on_gvasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#51 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#57 - def on_ivasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#57 - def on_lvasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#35 - def ternary_assignment?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#44 - def unless_assignment?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#70 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#80 - def take_variable_and_default_from_ternary(node); end - - # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#84 - def take_variable_and_default_from_unless(node); end -end - -# source://rubocop//lib/rubocop/cop/style/or_assignment.rb#32 -RuboCop::Cop::Style::OrAssignment::MSG = T.let(T.unsafe(nil), String) - -# Checks for simple usages of parallel assignment. -# This will only complain when the number of variables -# being assigned matched the number of assigning variables. -# -# @example -# # bad -# a, b, c = 1, 2, 3 -# a, b, c = [1, 2, 3] -# -# # good -# one, two = *foo -# a, b = foo() -# a, b = b, a -# -# a = 1 -# b = 2 -# c = 3 -# -# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#25 -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 - def implicit_self_getter?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#31 - def on_masgn(node); end - - private - - # Converts (send nil :something) nodes to (send (:self) :something). - # 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 - def add_self_to_getters(right_elements); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#61 - def allowed_lhs?(elements); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#55 - def allowed_masign?(lhs_elements, rhs_elements); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#67 - def allowed_rhs?(node); end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#75 - def assignment_corrector(node, rhs, order); end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#48 - def autocorrect(corrector, node, rhs); end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#91 - def find_valid_order(left_elements, right_elements); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#174 - def modifier_statement?(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 -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 - def initialize(assignments); end - - # `lhs` is an assignment method call like `obj.attr=` or `ary[idx]=`. - # Does `rhs` access the same value which is assigned by `lhs`? - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#161 - def accesses?(rhs, lhs); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#154 - def dependency?(lhs, rhs); end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#130 - def matching_calls(param0, param1, param2); end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#140 - def tsort_each_child(assignment); end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#136 - def tsort_each_node(*_arg0, **_arg1, &_arg2); end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#127 - def uses_var?(param0, param1); end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#124 - 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 -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, rhs, modifier, config, new_elements); end - - # Returns the value of attribute config. - # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#184 - def config; end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#194 - def correction; end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#198 - def correction_range; end - - # Returns the value of attribute node. - # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#184 - def node; end - - # Returns the value of attribute rescue_result. - # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#184 - def rescue_result; end - - # Returns the value of attribute rhs. - # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#184 - def rhs; end - - protected - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#204 - def assignment; end - - private - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#225 - def cop_config; end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#221 - def extract_sources(node); end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#210 - def source(node, loc); end -end - -# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#29 -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 -class RuboCop::Cop::Style::ParallelAssignment::ModifierCorrector < ::RuboCop::Cop::Style::ParallelAssignment::GenericCorrector - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#268 - def correction; end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#277 - def correction_range; end - - private - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#283 - 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#232 -class RuboCop::Cop::Style::ParallelAssignment::RescueCorrector < ::RuboCop::Cop::Style::ParallelAssignment::GenericCorrector - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#233 - def correction; end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#244 - def correction_range; end - - private - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#255 - def begin_correction(rescue_result); end - - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#250 - def def_correction(rescue_result); end -end - -# Checks for the presence of superfluous parentheses around the -# condition of if/unless/while/until. -# -# `AllowSafeAssignment` option for safe assignment. -# By safe assignment we mean putting parentheses around -# an assignment to indicate "I know I'm using an assignment -# as a condition. It's not a mistake." -# -# @example -# # bad -# x += 1 while (x < 10) -# foo unless (bar || baz) -# -# if (x > 10) -# elsif (x < 3) -# end -# -# # good -# x += 1 while x < 10 -# foo unless bar || baz -# -# if x > 10 -# elsif x < 3 -# end -# @example AllowSafeAssignment: true (default) -# # good -# foo unless (bar = baz) -# @example AllowSafeAssignment: false -# # bad -# foo unless (bar = baz) -# @example AllowInMultilineConditions: false (default) -# # bad -# if (x > 10 && -# y > 10) -# end -# -# # good -# if x > 10 && -# y > 10 -# end -# @example AllowInMultilineConditions: true -# # good -# if (x > 10 && -# y > 10) -# end -# -# source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#56 -class RuboCop::Cop::Style::ParenthesesAroundCondition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::SafeAssignment - include ::RuboCop::Cop::Parentheses - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#76 - def control_op_condition(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#62 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#68 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#68 - def on_while(node); end - - private - - # @return [Boolean] - # - # 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#118 - def message(node); end - - # @return [Boolean] - # - # 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#124 - def parens_allowed?(node); end - - # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#80 - def process_control_op(node); end - - # @return [Boolean] - # - # 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 - -# Enforces the consistent usage of `%`-literal delimiters. -# -# Specify the 'default' key to set all preferred delimiters at once. You -# can continue to specify individual preferred delimiters to override the -# default. -# -# @example -# # Style/PercentLiteralDelimiters: -# # PreferredDelimiters: -# # default: '[]' -# # '%i': '()' -# -# # good -# %w[alpha beta] + %i(gamma delta) -# -# # bad -# %W(alpha #{beta}) -# -# # bad -# %I(alpha beta) -# -# source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#26 -class RuboCop::Cop::Style::PercentLiteralDelimiters < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#30 - def on_array(node); end - - # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#38 - def on_dstr(node); end - - # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#34 - def on_regexp(node); end - - # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#38 - def on_str(node); end - - # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#43 - def on_sym(node); end - - # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#47 - def on_xstr(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#93 - def contains_delimiter?(node, delimiters); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#82 - def contains_preferred_delimiter?(node, type); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#86 - def include_same_character_as_used_for_delimiter?(node, type); end - - # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#107 - def matchpairs(begin_delimiter); end - - # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#67 - def message(type); end - - # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#53 - def on_percent_literal(node); end - - # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#74 - def preferred_delimiters_for(type); end - - # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#99 - def string_source(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#78 - def uses_preferred_delimiter?(node, type); end -end - -# Checks for usage of the %Q() syntax when %q() would do. -# -# @example EnforcedStyle: lower_case_q (default) -# # The `lower_case_q` style prefers `%q` unless -# # interpolation is needed. -# # bad -# %Q[Mix the foo into the baz.] -# %Q(They all said: 'Hooray!') -# -# # good -# %q[Mix the foo into the baz] -# %q(They all said: 'Hooray!') -# @example EnforcedStyle: upper_case_q -# # The `upper_case_q` style requires the sole use of `%Q`. -# # bad -# %q/Mix the foo into the baz./ -# %q{They all said: 'Hooray!'} -# -# # good -# %Q/Mix the foo into the baz./ -# %Q{They all said: 'Hooray!'} -# -# source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#28 -class RuboCop::Cop::Style::PercentQLiterals < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#36 - def on_str(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#55 - def correct_literal_style?(node); end - - # source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#64 - def corrected(src); end - - # source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#60 - def message(_range); end - - # source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#42 - def on_percent_literal(node); end -end - -# source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#33 -RuboCop::Cop::Style::PercentQLiterals::LOWER_CASE_Q_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#34 -RuboCop::Cop::Style::PercentQLiterals::UPPER_CASE_Q_MSG = T.let(T.unsafe(nil), String) - -# Looks for uses of Perl-style regexp match -# backreferences and their English versions like -# $1, $2, $&, &+, $MATCH, $PREMATCH, etc. -# -# @example -# # bad -# puts $1 -# -# # good -# puts Regexp.last_match(1) -# -# source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#16 -class RuboCop::Cop::Style::PerlBackrefs < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#21 - def on_back_ref(node); end - - # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#25 - def on_gvar(node); end - - # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#29 - def on_nth_ref(node); end - - private - - # @param node [RuboCop::AST::Node] - # @private - # @return [String] - # - # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#99 - def constant_prefix(node); end - - # @param node [RuboCop::AST::Node] - # @private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#38 - def derived_from_braceless_interpolation?(node); end - - # @param node [RuboCop::AST::Node] - # @param preferred_expression [String] - # @private - # @return [String] - # - # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#46 - def format_message(node:, preferred_expression:); end - - # @param node [RuboCop::AST::Node] - # @private - # - # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#109 - def on_back_ref_or_gvar_or_nth_ref(node); end - - # @param node [RuboCop::AST::Node] - # @private - # @return [String] - # - # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#58 - def original_expression_of(node); end - - # @param node [RuboCop::AST::Node] - # @private - # @return [String, nil] - # - # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#70 - def preferred_expression_to(node); end - - # @param node [RuboCop::AST::Node] - # @private - # @return [String, nil] - # - # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#89 - def preferred_expression_to_node_with_constant_prefix(node); end -end - -# source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#19 -RuboCop::Cop::Style::PerlBackrefs::MESSAGE_FORMAT = T.let(T.unsafe(nil), String) - -# Checks for uses of methods `Hash#has_key?` and -# `Hash#has_value?`, and suggests using `Hash#key?` and `Hash#value?` instead. -# -# It is configurable to enforce the verbose method names, by using the -# `EnforcedStyle: verbose` configuration. -# -# @example EnforcedStyle: short (default) -# # bad -# Hash#has_key? -# Hash#has_value? -# -# # good -# Hash#key? -# Hash#value? -# @example EnforcedStyle: verbose -# # bad -# Hash#key? -# Hash#value? -# -# # good -# Hash#has_key? -# Hash#has_value? -# -# source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#33 -class RuboCop::Cop::Style::PreferredHashMethods < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#43 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#43 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#56 - def message(method_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#68 - def offending_selector?(method_name); end - - # source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#60 - def proper_method_name(method_name); end -end - -# source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#37 -RuboCop::Cop::Style::PreferredHashMethods::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#39 -RuboCop::Cop::Style::PreferredHashMethods::OFFENDING_SELECTORS = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#41 -RuboCop::Cop::Style::PreferredHashMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for uses of Proc.new where Kernel#proc -# would be more appropriate. -# -# @example -# # bad -# p = Proc.new { |n| puts n } -# -# # good -# p = proc { |n| puts n } -# -# source://rubocop//lib/rubocop/cop/style/proc.rb#16 -class RuboCop::Cop::Style::Proc < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/proc.rb#24 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/proc.rb#24 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/style/proc.rb#22 - def proc_new?(param0 = T.unsafe(nil)); end -end - -# source://rubocop//lib/rubocop/cop/style/proc.rb#19 -RuboCop::Cop::Style::Proc::MSG = T.let(T.unsafe(nil), String) - -# Checks if the quotes used for quoted symbols match the configured defaults. -# By default uses the same configuration as `Style/StringLiterals`; if that -# cop is not enabled, the default `EnforcedStyle` is `single_quotes`. -# -# String interpolation is always kept in double quotes. -# -# NOTE: `Lint/SymbolConversion` can be used in parallel to ensure that symbols -# are not quoted that don't need to be. This cop is for configuring the quoting -# style to use for symbols that require quotes. -# -# @example EnforcedStyle: same_as_string_literals (default) / single_quotes -# # bad -# :"abc-def" -# -# # good -# :'abc-def' -# :"#{str}" -# :"a\'b" -# @example EnforcedStyle: double_quotes -# # bad -# :'abc-def' -# -# # good -# :"abc-def" -# :"#{str}" -# :"a\'b" -# -# source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#33 -class RuboCop::Cop::Style::QuotedSymbols < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::SymbolHelp - include ::RuboCop::Cop::StringLiteralsHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#44 - def on_sym(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#106 - def alternative_style; end - - # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#71 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#88 - def correct_quotes(str); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#83 - def hash_colon_key?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#61 - def invalid_double_quotes?(source); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#110 - def quoted?(sym_node); end - - # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#99 - def style; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#114 - def wrong_quotes?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#41 -RuboCop::Cop::Style::QuotedSymbols::MSG_DOUBLE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#39 -RuboCop::Cop::Style::QuotedSymbols::MSG_SINGLE = T.let(T.unsafe(nil), String) - -# Checks the args passed to `fail` and `raise`. For exploded -# style (default), it recommends passing the exception class and message -# to `raise`, rather than construct an instance of the error. It will -# still allow passing just a message, or the construction of an error -# with more than one argument. -# -# The exploded style works identically, but with the addition that it -# will also suggest constructing error objects when the exception is -# passed multiple arguments. -# -# The exploded style has an `AllowedCompactTypes` configuration -# option that takes an `Array` of exception name Strings. -# -# @example EnforcedStyle: exploded (default) -# # bad -# raise StandardError.new('message') -# -# # good -# raise StandardError, 'message' -# fail 'message' -# raise MyCustomError -# raise MyCustomError.new(arg1, arg2, arg3) -# raise MyKwArgError.new(key1: val1, key2: val2) -# -# # With `AllowedCompactTypes` set to ['MyWrappedError'] -# raise MyWrappedError.new(obj) -# raise MyWrappedError.new(obj), 'message' -# @example EnforcedStyle: compact -# # bad -# raise StandardError, 'message' -# raise RuntimeError, arg1, arg2, arg3 -# -# # good -# raise StandardError.new('message') -# raise MyCustomError -# raise MyCustomError.new(arg1, arg2, arg3) -# fail 'message' -# -# source://rubocop//lib/rubocop/cop/style/raise_args.rb#47 -class RuboCop::Cop::Style::RaiseArgs < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#59 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#135 - def acceptable_exploded_args?(args); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#148 - def allowed_non_exploded_type?(arg); end - - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#98 - def check_compact(node); end - - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#114 - def check_exploded(node); end - - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#72 - def correction_compact_to_exploded(node); end - - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#84 - def correction_exploded_to_compact(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#154 - def requires_parens?(parent); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#131 - def use_new_method?(first_arg); end -end - -# source://rubocop//lib/rubocop/cop/style/raise_args.rb#53 -RuboCop::Cop::Style::RaiseArgs::ACCEPTABLE_ARG_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/raise_args.rb#52 -RuboCop::Cop::Style::RaiseArgs::COMPACT_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/raise_args.rb#51 -RuboCop::Cop::Style::RaiseArgs::EXPLODED_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/raise_args.rb#57 -RuboCop::Cop::Style::RaiseArgs::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for the use of randomly generated numbers, -# added/subtracted with integer literals, as well as those with -# Integer#succ and Integer#pred methods. Prefer using ranges instead, -# as it clearly states the intentions. -# -# @example -# # bad -# rand(6) + 1 -# 1 + rand(6) -# rand(6) - 1 -# 1 - rand(6) -# rand(6).succ -# rand(6).pred -# Random.rand(6) + 1 -# Kernel.rand(6) + 1 -# rand(0..5) + 1 -# -# # good -# rand(1..6) -# rand(1...7) -# -# source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#26 -class RuboCop::Cop::Style::RandomWithOffset < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#33 - def integer_op_rand?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#63 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#54 - def rand_modified?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#43 - def rand_op_integer?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#73 - def random_call(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#147 - def to_int(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#78 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#135 - def boundaries_from_random_node(random_node); end - - # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#88 - def corrected_integer_op_rand(node); end - - # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#118 - def corrected_rand_modified(node); end - - # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#103 - def corrected_rand_op_integer(node); end - - # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#131 - def prefix_from_prefix_node(node); end -end - -# source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#29 -RuboCop::Cop::Style::RandomWithOffset::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#30 -RuboCop::Cop::Style::RandomWithOffset::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for a redundant argument passed to certain methods. -# -# NOTE: This cop is limited to methods with single parameter. -# -# Method names and their redundant arguments can be configured like this: -# -# [source,yaml] -# ---- -# Methods: -# join: '' -# sum: 0 -# split: ' ' -# chomp: "\n" -# chomp!: "\n" -# foo: 2 -# ---- -# -# @example -# # bad -# array.join('') -# [1, 2, 3].join("") -# array.sum(0) -# exit(true) -# exit!(false) -# string.split(" ") -# "first\nsecond".split(" ") -# string.chomp("\n") -# string.chomp!("\n") -# A.foo(2) -# -# # good -# 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#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#64 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#64 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#108 - def argument_matched?(target_argument, redundant_argument); end - - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#100 - def argument_range(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#120 - def exclude_cntrl_character?(target_argument, redundant_argument); end - - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#93 - def redundant_arg_for_method(method_name); end - - # @return [Boolean] - # - # 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#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 -# # bad -# def test -# x = foo -# x -# end -# -# # bad -# def test -# if x -# z = foo -# z -# elsif y -# z = bar -# z -# end -# end -# -# # good -# def test -# foo -# end -# -# # good -# def test -# if x -# foo -# elsif y -# bar -# end -# end -# -# source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#40 -class RuboCop::Cop::Style::RedundantAssignment < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#50 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#50 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#46 - def redundant_assignment?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#99 - def check_begin_node(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#58 - def check_branch(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#79 - def check_case_match_node(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#74 - def check_case_node(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#95 - def check_ensure_node(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#84 - def check_if_node(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#91 - def check_rescue_node(node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#43 -RuboCop::Cop::Style::RedundantAssignment::MSG = T.let(T.unsafe(nil), String) - -# Checks for redundant `begin` blocks. -# -# Currently it checks for code like this: -# -# @example -# -# # bad -# def redundant -# begin -# ala -# bala -# rescue StandardError => e -# something -# end -# end -# -# # good -# def preferred -# ala -# bala -# rescue StandardError => e -# something -# end -# -# # bad -# begin -# do_something -# end -# -# # good -# do_something -# -# # bad -# # When using Ruby 2.5 or later. -# do_something do -# begin -# something -# rescue => ex -# anything -# end -# end -# -# # good -# # In Ruby 2.5 or later, you can omit `begin` in `do-end` block. -# do_something do -# something -# rescue => ex -# anything -# end -# -# # good -# # Stabby lambdas don't support implicit `begin` in `do-end` blocks. -# -> do -# begin -# foo -# rescue Bar -# baz -# end -# end -# -# source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#65 -class RuboCop::Cop::Style::RedundantBegin < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#76 - def offensive_kwbegins(param0); end - - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#88 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#80 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#80 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#99 - def on_kwbegin(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#88 - def on_numblock(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#107 - def allowable_kwbegin?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#181 - def begin_block_has_multiline_statements?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#173 - def condition_range(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#185 - def contain_rescue_or_ensure?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#166 - def correct_modifier_form_after_multiline_begin_block(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#177 - def empty_begin?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#114 - def register_offense(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#143 - def remove_begin(corrector, offense_range, node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#131 - 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#153 - def restore_removed_comments(corrector, offense_range, node, first_child); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#160 - def use_modifier_form_after_multiline_begin_block?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#198 - def valid_begin_assignment?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#191 - def valid_context_using_only_begin?(node); end - - class << self - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#71 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#69 -RuboCop::Cop::Style::RedundantBegin::MSG = T.let(T.unsafe(nil), String) - -# Checks for usage of the %W() syntax when %w() would do. -# -# @example -# # bad -# %W(cat dog pig) -# %W[door wall floor] -# -# # good -# %w/swim run bike/ -# %w[shirt pants shoes] -# %W(apple #{fruit} grape) -# -# source://rubocop//lib/rubocop/cop/style/redundant_capital_w.rb#17 -class RuboCop::Cop::Style::RedundantCapitalW < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_capital_w.rb#23 - def on_array(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/redundant_capital_w.rb#29 - def on_percent_literal(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_capital_w.rb#38 - def requires_interpolation?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_capital_w.rb#21 -RuboCop::Cop::Style::RedundantCapitalW::MSG = T.let(T.unsafe(nil), String) - -# Checks for unnecessary conditional expressions. -# -# NOTE: Since the intention of the comment cannot be automatically determined, -# autocorrection is not applied when a comment is used, as shown below: -# -# [source,ruby] -# ----- -# if b -# # Important note. -# b -# else -# c -# end -# ----- -# -# @example -# # bad -# a = b ? b : c -# -# # good -# a = b || c -# -# # bad -# if b -# b -# else -# c -# end -# -# # good -# b || c -# -# # good -# if b -# b -# elsif cond -# c -# end -# -# # bad -# a.nil? ? true : a -# -# # good -# a.nil? || a -# -# # bad -# if a.nil? -# true -# else -# a -# end -# -# # good -# a.nil? || a -# @example AllowedMethods: ['nonzero?'] (default) -# # good -# num.nonzero? ? true : false -# -# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#65 -class RuboCop::Cop::Style::RedundantCondition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::CommentsHelp - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#77 - def on_if(node); end - - private - - # If the argument is using an operator, it is an invalid syntax. - # e.g. `foo || *bar`, `foo || **bar`, and `foo || &bar`. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#225 - def argument_with_operator?(argument); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#202 - def asgn_type?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#97 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#192 - def branches_have_assignment?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#206 - def branches_have_method?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#300 - def correct_ternary(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#247 - def else_source(else_branch, arithmetic_operation); end - - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#273 - def else_source_if_has_assignment(else_branch); end - - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#263 - def else_source_if_has_method(else_branch); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#181 - def if_branch_is_true_type_and_else_is_not?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#233 - def if_source(if_branch, arithmetic_operation); end - - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#283 - def make_ternary_form(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#89 - def message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#118 - def offense?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#111 - def range_of_offense(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#126 - def redundant_condition?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#315 - def require_braces?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#308 - def require_parentheses?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#219 - def same_method?(if_branch, else_branch); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#213 - def single_argument_method?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#142 - def synonymous_condition_and_branch?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#319 - def use_arithmetic_operation?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#138 - def use_hash_key_access?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#134 - def use_hash_key_assignment?(else_branch); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#130 - def use_if_branch?(else_branch); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#323 - def without_argument_parentheses_method?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#73 -RuboCop::Cop::Style::RedundantCondition::ARGUMENT_WITH_OPERATOR_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#71 -RuboCop::Cop::Style::RedundantCondition::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#72 -RuboCop::Cop::Style::RedundantCondition::REDUNDANT_CONDITION = T.let(T.unsafe(nil), String) - -# Checks for redundant returning of true/false in conditionals. -# -# @example -# # bad -# x == y ? true : false -# -# # bad -# if x == y -# true -# else -# false -# end -# -# # good -# x == y -# -# # bad -# x == y ? false : true -# -# # good -# x != y -# -# source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#27 -class RuboCop::Cop::Style::RedundantConditional < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#36 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#56 - def redundant_condition?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#61 - def redundant_condition_inverted?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#78 - def indented_else_node(expression, node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#48 - def message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#65 - def offense?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#71 - def replacement_condition(node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#32 -RuboCop::Cop::Style::RedundantConditional::COMPARISON_OPERATOR_MATCHER = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#34 -RuboCop::Cop::Style::RedundantConditional::MSG = T.let(T.unsafe(nil), String) - -# Avoid redundant `::` prefix on constant. -# -# How Ruby searches constant is a bit complicated, and it can often be difficult to -# understand from the code whether the `::` is intended or not. Where `Module.nesting` -# is empty, there is no need to prepend `::`, so it would be nice to consistently -# avoid such meaningless `::` prefix to avoid confusion. -# -# NOTE: This cop is disabled if `Lint/ConstantResolution` cop is enabled to prevent -# conflicting rules. Because it respects user configurations that want to enable -# `Lint/ConstantResolution` cop which is disabled by default. -# -# @example -# # bad -# ::Const -# -# # good -# Const -# -# # bad -# class << self -# ::Const -# end -# -# # good -# class << self -# Const -# end -# -# # good -# class A -# ::Const -# end -# -# # good -# module A -# ::Const -# end -# -# source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#43 -class RuboCop::Cop::Style::RedundantConstantBase < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#48 - def on_cbase(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#67 - def bad?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#63 - def lint_constant_resolution_config; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#59 - def lint_constant_resolution_cop_enabled?; end - - # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#71 - def module_nesting_ancestors_of(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#77 - def used_in_super_class_part?(node, class_node:); end -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 paths given to `require_relative` that start with -# the current directory (`./`), which can be omitted. -# -# @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#17 -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#26 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#42 - def redundant_path_length(path); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#23 -RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::CURRENT_DIRECTORY_PREFIX = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#21 -RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#24 -RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::REDUNDANT_CURRENT_DIRECTORY_PREFIX = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#22 -RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for redundant uses of double splat hash braces. -# -# @example -# -# # bad -# do_something(**{foo: bar, baz: qux}) -# -# # good -# do_something(foo: bar, baz: qux) -# -# # 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#29 - def on_hash(node); end - - private - - # @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#107 - def convert_to_new_arguments(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#119 - 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#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`. -# -# @example -# -# # bad -# array.each.each { |v| do_something(v) } -# -# # good -# array.each { |v| do_something(v) } -# -# # bad -# array.each.each_with_index { |v, i| do_something(v, i) } -# -# # good -# array.each.with_index { |v, i| do_something(v, i) } -# array.each_with_index { |v, i| do_something(v, i) } -# -# # bad -# array.each.each_with_object { |v, o| do_something(v, o) } -# -# # good -# array.each.with_object { |v, o| do_something(v, o) } -# array.each_with_object { |v, o| do_something(v, o) } -# -# source://rubocop//lib/rubocop/cop/style/redundant_each.rb#34 -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#96 - def message(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#86 - def range(node); end - - # 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#107 - def remove_redundant_each(corrector, range, redundant_node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_each.rb#37 -RuboCop::Cop::Style::RedundantEach::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_each.rb#38 -RuboCop::Cop::Style::RedundantEach::MSG_WITH_INDEX = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_each.rb#39 -RuboCop::Cop::Style::RedundantEach::MSG_WITH_OBJECT = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_each.rb#41 -RuboCop::Cop::Style::RedundantEach::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for `RuntimeError` as the argument of `raise`/`fail`. -# -# @example -# # bad -# raise RuntimeError, 'message' -# raise RuntimeError.new('message') -# -# # good -# raise 'message' -# -# # 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#79 - def compact?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#74 - def exploded?(param0 = T.unsafe(nil)); 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#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#39 - def fix_exploded(node); end - - # 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#53 - def string_message?(message); end -end - -# 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#27 -RuboCop::Cop::Style::RedundantException::MSG_2 = T.let(T.unsafe(nil), String) - -# 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)`. -# -# 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 -# hash.fetch(:key) { 5 } -# hash.fetch(:key) { true } -# hash.fetch(:key) { nil } -# array.fetch(5) { :value } -# ENV.fetch(:key) { 'value' } -# -# # good -# hash.fetch(:key, 5) -# hash.fetch(:key, true) -# hash.fetch(:key, nil) -# array.fetch(5, :value) -# ENV.fetch(:key, 'value') -# @example SafeForConstants: true -# # bad -# ENV.fetch(:key) { VALUE } -# -# # good -# ENV.fetch(:key, VALUE) -# -# 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#55 - def on_block(node); end - - # 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#48 - def redundant_fetch_block_candidate?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # 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#104 - def build_bad_method(send, body); end - - # 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#111 - def check_for_constant?; end - - # @return [Boolean] - # - # 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#78 - def const_type?(node); end - - # 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#82 - def should_not_check?(send, body); end -end - -# 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 -# the filename provided to `require` and `require_relative`. -# -# NOTE: If the extension is omitted, Ruby tries adding '.rb', '.so', -# and so on to the name until found. If the file named cannot be found, -# a `LoadError` will be raised. -# There is an edge case where `foo.so` file is loaded instead of a `LoadError` -# if `foo.so` file exists when `require 'foo.rb'` will be changed to `require 'foo'`, -# but that seems harmless. -# -# @example -# # bad -# require 'foo.rb' -# require_relative '../foo.rb' -# -# # good -# require 'foo' -# require 'foo.so' -# require_relative '../foo' -# require_relative '../foo.so' -# -# source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#27 -class RuboCop::Cop::Style::RedundantFileExtensionInRequire < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#39 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#35 - def require_call?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#53 - def extension_range(name_node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#31 -RuboCop::Cop::Style::RedundantFileExtensionInRequire::MSG = T.let(T.unsafe(nil), String) - -# 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) - -# Checks for calls to `Kernel#format` or `Kernel#sprintf` that are redundant. -# -# Calling `format` with only a single string argument is redundant, as it can be -# replaced by the string itself. -# -# Also looks for `format` calls where the arguments are literals that can be -# inlined into a string easily. This applies to the `%s`, `%d`, `%i`, `%u`, and -# `%f` format specifiers. -# -# @example -# -# # bad -# format('the quick brown fox jumps over the lazy dog.') -# sprintf('the quick brown fox jumps over the lazy dog.') -# -# # good -# 'the quick brown fox jumps over the lazy dog.' -# -# # bad -# format('%s %s', 'foo', 'bar') -# sprintf('%s %s', 'foo', 'bar') -# -# # good -# 'foo bar' -# -# source://rubocop//lib/rubocop/cop/style/redundant_format.rb#47 -class RuboCop::Cop::Style::RedundantFormat < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#66 - def complex_number?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#71 - def find_hash_value_node(param0, param1); end - - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#56 - def format_without_additional_args?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#83 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#61 - def rational_number?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#76 - def splatted_arguments?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#125 - def all_fields_literal?(string, arguments); end - - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#212 - def argument_value(argument); end - - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#208 - def argument_values(arguments); end - - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#244 - def complex_value(complex_node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#102 - def detect_unnecessary_fields(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#230 - def dsym_value(dsym_node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#143 - def find_argument(sequence, arguments, hash); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#184 - def float?(argument); end - - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#234 - def hash_value(hash_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#180 - def integer?(argument); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#156 - def matching_argument?(sequence, argument); end - - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#98 - def message(node, prefer); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#174 - def numeric?(argument); end - - # Add correct quotes to the formatted string, preferring retaining the existing - # quotes if possible. - # - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#190 - def quote(string, node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#240 - def rational_value(rational_node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#114 - def register_all_fields_literal(node, string, arguments); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_format.rb#53 -RuboCop::Cop::Style::RedundantFormat::ACCEPTABLE_LITERAL_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/redundant_format.rb#50 -RuboCop::Cop::Style::RedundantFormat::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_format.rb#52 -RuboCop::Cop::Style::RedundantFormat::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) - -# Check for uses of `Object#freeze` on immutable objects. -# -# NOTE: `Regexp` and `Range` literals are frozen objects since Ruby 3.0. -# -# NOTE: From Ruby 3.0, this cop allows explicit freezing of interpolated -# string literals when `# frozen-string-literal: true` is used. -# -# @example -# # bad -# CONST = 1.freeze -# -# # good -# CONST = 1 -# -# source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#19 -class RuboCop::Cop::Style::RedundantFreeze < ::RuboCop::Cop::Base - include ::RuboCop::Cop::FrozenStringLiteral - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#26 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#57 - def operation_produces_immutable_object?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#39 - def immutable_literal?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#48 - def strip_parenthesis(node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#23 -RuboCop::Cop::Style::RedundantFreeze::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#24 -RuboCop::Cop::Style::RedundantFreeze::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for redundant heredoc delimiter quotes. -# -# @example -# -# # bad -# do_something(<<~'EOS') -# no string interpolation style text -# EOS -# -# # good -# do_something(<<~EOS) -# no string interpolation style text -# EOS -# -# do_something(<<~'EOS') -# #{string_interpolation_style_text_not_evaluated} -# EOS -# -# do_something(<<~'EOS') -# Preserve \ -# newlines -# EOS -# -# source://rubocop//lib/rubocop/cop/style/redundant_heredoc_delimiter_quotes.rb#29 -class RuboCop::Cop::Style::RedundantHeredocDelimiterQuotes < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Heredoc - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_heredoc_delimiter_quotes.rb#36 - def on_heredoc(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_heredoc_delimiter_quotes.rb#48 - def need_heredoc_delimiter_quotes?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_heredoc_delimiter_quotes.rb#33 -RuboCop::Cop::Style::RedundantHeredocDelimiterQuotes::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_heredoc_delimiter_quotes.rb#34 -RuboCop::Cop::Style::RedundantHeredocDelimiterQuotes::STRING_INTERPOLATION_OR_ESCAPED_CHARACTER_PATTERN = T.let(T.unsafe(nil), Regexp) - -# Checks for `initialize` methods that are redundant. -# -# An initializer is redundant if it does not do anything, or if it only -# calls `super` with the same arguments given to it. If the initializer takes -# an argument that accepts multiple values (`restarg`, `kwrestarg`, etc.) it -# will not register an offense, because it allows the initializer to take a different -# number of arguments as its superclass potentially does. -# -# NOTE: If an initializer takes any arguments and has an empty body, RuboCop -# assumes it to *not* be redundant. This is to prevent potential `ArgumentError`. -# -# NOTE: If an initializer argument has a default value, RuboCop assumes it -# to *not* be redundant. -# -# NOTE: Empty initializers are registered as offenses, but it is possible -# to purposely create an empty `initialize` method to override a superclass's -# initializer. -# -# @example -# # bad -# def initialize -# end -# -# # bad -# def initialize -# super -# end -# -# # bad -# def initialize(a, b) -# super -# end -# -# # bad -# def initialize(a, b) -# super(a, b) -# end -# -# # good -# def initialize -# do_something -# end -# -# # good -# def initialize -# do_something -# super -# end -# -# # good (different number of parameters) -# def initialize(a, b) -# super(a) -# end -# -# # good (default value) -# def initialize(a, b = 5) -# super -# end -# -# # good (default value) -# def initialize(a, b: 5) -# super -# end -# -# # good (changes the parameter requirements) -# def initialize(_) -# end -# -# # good (changes the parameter requirements) -# def initialize(*) -# end -# -# # good (changes the parameter requirements) -# def initialize(**) -# end -# -# # good (changes the parameter requirements) -# def initialize(...) -# end -# @example AllowComments: true (default) -# -# # good -# def initialize -# # Overriding to negate superclass `initialize` method. -# end -# @example AllowComments: false -# -# # bad -# def initialize -# # Overriding to negate superclass `initialize` method. -# end -# -# source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#106 -class RuboCop::Cop::Style::RedundantInitialize < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CommentsHelp - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#115 - def initialize_forwards?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#119 - def on_def(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#143 - def acceptable?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#151 - def allow_comments?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#147 - def forwards?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#137 - def register_offense(node, message); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#157 - def same_args?(super_node, args); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#111 -RuboCop::Cop::Style::RedundantInitialize::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#112 -RuboCop::Cop::Style::RedundantInitialize::MSG_EMPTY = T.let(T.unsafe(nil), String) - -# Checks for strings that are just an interpolated expression. -# -# @example -# -# # bad -# "#{@var}" -# -# # good -# @var.to_s -# -# # good if @var is already a String -# @var -# -# source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#39 -class RuboCop::Cop::Style::RedundantInterpolation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#49 - def on_dstr(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#122 - def autocorrect_other(corrector, embedded_node, node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#105 - def autocorrect_single_variable_interpolation(corrector, embedded_node, node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#99 - def autocorrect_variable_interpolation(corrector, embedded_node, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#95 - def embedded_in_percent_array?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#91 - def implicit_concatenation?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#83 - def interpolation?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#132 - def require_parentheses?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#67 - def single_interpolation?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#74 - def single_variable_interpolation?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#87 - def variable_interpolation?(node); end - - class << self - # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#45 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#43 -RuboCop::Cop::Style::RedundantInterpolation::MSG = T.let(T.unsafe(nil), String) - -# Before Ruby 3.0, interpolated strings followed the frozen string literal -# magic comment which sometimes made it necessary to explicitly unfreeze them. -# Ruby 3.0 changed interpolated strings to always be unfrozen which makes -# unfreezing them redundant. -# -# @example -# # bad -# +"#{foo} bar" -# -# # bad -# "#{foo} bar".dup -# -# # good -# "#{foo} bar" -# -# source://rubocop//lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb#21 -class RuboCop::Cop::Style::RedundantInterpolationUnfreeze < ::RuboCop::Cop::Base - include ::RuboCop::Cop::FrozenStringLiteral - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb#32 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb#26 -RuboCop::Cop::Style::RedundantInterpolationUnfreeze::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb#28 -RuboCop::Cop::Style::RedundantInterpolationUnfreeze::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Check for redundant line continuation. -# -# This cop marks a line continuation as redundant if removing the backslash -# does not result in a syntax error. -# However, a backslash at the end of a comment or -# for string concatenation is not redundant and is not considered an offense. -# -# @example -# # bad -# foo. \ -# bar -# foo \ -# &.bar \ -# .baz -# -# # good -# foo. -# bar -# foo -# &.bar -# .baz -# -# # bad -# [foo, \ -# bar] -# {foo: \ -# bar} -# -# # good -# [foo, -# bar] -# {foo: -# bar} -# -# # bad -# foo(bar, \ -# baz) -# -# # good -# foo(bar, -# baz) -# -# # also good - backslash in string concatenation is not redundant -# foo('bar' \ -# 'baz') -# -# # also good - backslash at the end of a comment is not redundant -# foo(bar, # \ -# baz) -# -# # also good - backslash at the line following the newline begins with a + or -, -# # it is not redundant -# 1 \ -# + 2 \ -# - 3 -# -# # also good - backslash with newline between the method name and its arguments, -# # it is not redundant. -# some_method \ -# (argument) -# -# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#67 -class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::MatchRange - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#86 - def on_new_investigation; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#221 - def argument_is_method?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#185 - def argument_newline?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#163 - def code_ends_with_continuation?(last_line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#111 - def ends_with_uncommented_backslash?(range); end - - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#201 - def find_node_for_line(last_line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#169 - def inside_string_literal?(range, token); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#124 - def inside_string_literal_or_method_with_argument?(range); end - - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#151 - def inspect_end_of_ruby_code_line_continuation; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#135 - def leading_dot_method_chain_with_blank_line?(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#228 - 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#177 - def method_with_argument?(line_range, current_token, next_token); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#141 - def redundant_line_continuation?(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#103 - def require_line_continuation?(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#207 - def same_line?(node, line); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#232 - def start_with_arithmetic_operator?(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#120 - def string_concatenation?(source_line); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#74 -RuboCop::Cop::Style::RedundantLineContinuation::ALLOWED_STRING_TOKENS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#81 -RuboCop::Cop::Style::RedundantLineContinuation::ARGUMENT_TAKING_FLOW_TOKEN_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#75 -RuboCop::Cop::Style::RedundantLineContinuation::ARGUMENT_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#84 -RuboCop::Cop::Style::RedundantLineContinuation::ARITHMETIC_OPERATOR_TOKENS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#72 -RuboCop::Cop::Style::RedundantLineContinuation::LINE_CONTINUATION = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#73 -RuboCop::Cop::Style::RedundantLineContinuation::LINE_CONTINUATION_PATTERN = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#71 -RuboCop::Cop::Style::RedundantLineContinuation::MSG = T.let(T.unsafe(nil), String) - -# Checks for redundant parentheses. -# -# @example -# -# # bad -# (x) if ((y.z).nil?) -# -# # good -# x if y.z.nil? -# -# source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#16 -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#34 - def allowed_pin_operator?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#275 - def first_send_argument?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#280 - def first_super_argument?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#285 - def first_yield_argument?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#177 - def interpolation?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#28 - def method_node_and_args(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#36 - def on_begin(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#31 - def rescue?(param0 = T.unsafe(nil)); end - - # 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#179 - def allow_in_multiline_conditions?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#70 - def allowed_ancestor?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#63 - def allowed_expression?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#75 - def allowed_multiple_expression?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#84 - def allowed_ternary?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#289 - def call_chain_starts_with_int?(begin_node, send_node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#133 - def check(begin_node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#183 - def check_send(begin_node, node); end - - # 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#217 - def disallowed_literal?(begin_node, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#295 - def do_end_block_in_method_chain?(begin_node, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#111 - def empty_parentheses?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#146 - def find_offense_message(begin_node, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#116 - def first_arg_begins_with_hash_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#264 - def first_argument?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#56 - def ignore_syntax?(node); end - - # @return [Boolean] - # - # 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#238 - def keyword_with_redundant_parentheses?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#97 - def like_method_argument_parentheses?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#251 - def method_call_with_redundant_parentheses?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#125 - def method_chain_begins_with_hash_literal(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#104 - def multiline_control_flow_statements?(node); end - - # 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#260 - def only_begin_arg?(args); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#48 - def parens_allowed?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#227 - def raised_to_power_negative_numeric?(begin_node, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#209 - def suspect_unary?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#90 - def ternary_parentheses_required?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#44 - def variable?(node); 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 -# -# # bad -# name = %q(Bruce Wayne) -# time = %q(8 o'clock) -# question = %q("What did you say?") -# -# # good -# name = 'Bruce Wayne' -# time = "8 o'clock" -# question = '"What did you say?"' -# -# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#20 -class RuboCop::Cop::Style::RedundantPercentQ < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#34 - def on_dstr(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#40 - def on_str(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#99 - def acceptable_capital_q?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#91 - def acceptable_q?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#67 - def allowed_percent_q?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#51 - def check(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#63 - def interpolated_quotes?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#72 - def message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#87 - def start_with_percent_q_variant?(string); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#82 - def string_literal?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#25 -RuboCop::Cop::Style::RedundantPercentQ::DYNAMIC_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#28 -RuboCop::Cop::Style::RedundantPercentQ::EMPTY = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#32 -RuboCop::Cop::Style::RedundantPercentQ::ESCAPED_NON_BACKSLASH = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#23 -RuboCop::Cop::Style::RedundantPercentQ::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#30 -RuboCop::Cop::Style::RedundantPercentQ::PERCENT_CAPITAL_Q = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#29 -RuboCop::Cop::Style::RedundantPercentQ::PERCENT_Q = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#27 -RuboCop::Cop::Style::RedundantPercentQ::QUOTE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#26 -RuboCop::Cop::Style::RedundantPercentQ::SINGLE_QUOTE = T.let(T.unsafe(nil), String) - -# 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 - include ::RuboCop::Cop::StringLiteralsHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#48 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#48 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#65 - def determinist_regexp?(regexp_node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#69 - def preferred_argument(regexp_node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#88 - def replacement(regexp_node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#43 -RuboCop::Cop::Style::RedundantRegexpArgument::DETERMINISTIC_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#39 -RuboCop::Cop::Style::RedundantRegexpArgument::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#40 -RuboCop::Cop::Style::RedundantRegexpArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#44 -RuboCop::Cop::Style::RedundantRegexpArgument::STR_SPECIAL_CHARS = T.let(T.unsafe(nil), Array) - -# Checks for unnecessary single-element `Regexp` character classes. -# -# @example -# -# # bad -# r = /[x]/ -# -# # good -# r = /x/ -# -# # bad -# r = /[\s]/ -# -# # good -# r = /\s/ -# -# # bad -# r = %r{/[b]} -# -# # good -# r = %r{/b} -# -# # good -# r = /[ab]/ -# -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#30 -class RuboCop::Cop::Style::RedundantRegexpCharacterClass < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#37 - def on_regexp(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#101 - def backslash_b?(elem); end - - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#53 - def each_redundant_character_class(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#61 - def each_single_element_character_class(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#83 - def multiple_codepoints?(expression); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#107 - def octal_requiring_char_class?(elem); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#72 - def redundant_single_element_character_class?(node, char_class); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#113 - def requires_escape_outside_char_class?(elem); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#95 - def whitespace_in_free_space_mode?(node, elem); end - - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#87 - def without_character_class(loc); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#34 -RuboCop::Cop::Style::RedundantRegexpCharacterClass::MSG_REDUNDANT_CHARACTER_CLASS = T.let(T.unsafe(nil), String) - -# 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 -# # bad -# %r{foo\/bar} -# -# # good -# %r{foo/bar} -# -# # good -# /foo\/bar/ -# -# # good -# %r/foo\/bar/ -# -# # good -# %r!foo\!bar! -# -# # bad -# /a\-b/ -# -# # good -# /a-b/ -# -# # bad -# /[\+\-]\d/ -# -# # good -# /[+\-]\d/ -# -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#35 -class RuboCop::Cop::Style::RedundantRegexpEscape < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#45 - def on_regexp(node); end - - private - - # @return [Boolean] - # - # 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#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#92 - def delimiter?(node, char); end - - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#98 - def each_escape(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#110 - def escape_range_at_index(node, index); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#41 -RuboCop::Cop::Style::RedundantRegexpEscape::ALLOWED_ALWAYS_ESCAPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#43 -RuboCop::Cop::Style::RedundantRegexpEscape::ALLOWED_OUTSIDE_CHAR_CLASS_METACHAR_ESCAPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#42 -RuboCop::Cop::Style::RedundantRegexpEscape::ALLOWED_WITHIN_CHAR_CLASS_METACHAR_ESCAPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#39 -RuboCop::Cop::Style::RedundantRegexpEscape::MSG_REDUNDANT_ESCAPE = T.let(T.unsafe(nil), String) - -# Checks for redundant `return` expressions. -# -# @example -# # These bad cases should be extended to handle methods whose body is -# # if/else or a case expression with a default branch. -# -# # bad -# def test -# return something -# end -# -# # bad -# def test -# one -# two -# three -# return something -# end -# -# # 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 -# end -# end -# @example AllowMultipleReturnValues: false (default) -# # bad -# def test -# return x, y -# end -# @example AllowMultipleReturnValues: true -# # good -# def test -# return x, y -# end -# -# 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#69 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#69 - def on_defs(node); end - - # 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#104 - def add_braces(corrector, node); end - - # 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#175 - def allow_multiple_return_values?; end - - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#170 - def check_begin_node(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#110 - def check_branch(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#144 - def check_case_match_node(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#139 - def check_case_node(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#165 - def check_ensure_node(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#149 - def check_if_node(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#161 - def check_resbody_node(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#156 - def check_rescue_node(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#127 - def check_return_node(node); end - - # 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#76 - def correct_without_arguments(return_node, corrector); end - - # @return [Boolean] - # - # 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#179 - def message(node); end -end - -# 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#60 -RuboCop::Cop::Style::RedundantReturn::MULTI_RETURN_MSG = T.let(T.unsafe(nil), String) - -# 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`. -# -# The usage of `self` is only needed when: -# -# * Sending a message to same object with zero arguments in -# presence of a method name clash with an argument or a local -# variable. -# -# * Calling an attribute writer to prevent a local variable assignment. -# -# Note, with using explicit self you can only send messages with public or -# protected scope, you cannot send private messages this way. -# -# Note we allow uses of `self` with operators because it would be awkward -# otherwise. Also allows the use of `self.it` without arguments in blocks, -# as in `0.times { self.it }`, following `Lint/ItWithoutArgumentsInBlock` cop. -# -# @example -# -# # bad -# def foo(bar) -# self.baz -# end -# -# # good -# def foo(bar) -# self.bar # Resolves name clash with the argument. -# end -# -# def foo -# bar = 1 -# self.bar # Resolves name clash with the local variable. -# end -# -# def foo -# %w[x y z].select do |bar| -# self.bar == bar # Resolves name clash with argument of the block. -# end -# end -# -# 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#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#68 - def on_and_asgn(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#84 - def on_args(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#116 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#88 - def on_blockarg(node); end - - # Using self.x to distinguish from local variable x - # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#79 - def on_def(node); end - - # Using self.x to distinguish from local variable x - # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#79 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#122 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#100 - def on_in_pattern(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#96 - def on_lvasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#92 - def on_masgn(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#116 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#73 - def on_op_asgn(node); end - - # Assignment of self.x - # - # 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#104 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#122 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#122 - def on_while(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#189 - def add_lhs_to_local_variables_scopes(rhs, lhs); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#197 - def add_masgn_lhs_variables(rhs, lhs); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#203 - def add_match_var_scopes(in_pattern_node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#138 - def add_scope(node, local_variables = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#183 - def allow_self(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#144 - def allowed_send_node?(node); end - - # 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#159 - def it_method_in_block?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#175 - def on_argument(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#167 - def regular_method_call?(node); end - - class << self - # 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#49 -RuboCop::Cop::Style::RedundantSelf::KERNEL_METHODS = T.let(T.unsafe(nil), Array) - -# 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#48 -RuboCop::Cop::Style::RedundantSelf::MSG = T.let(T.unsafe(nil), String) - -# Checks for places where redundant assignments are made for in place -# modification methods. -# -# @example -# # bad -# args = args.concat(ary) -# hash = hash.merge!(other) -# -# # good -# args.concat(foo) -# args += foo -# hash.merge!(other) -# -# # good -# foo.concat(ary) -# -# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#27 -class RuboCop::Cop::Style::RedundantSelfAssignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#77 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#59 - def on_cvasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#59 - def on_gvasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#59 - def on_ivasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#59 - def on_lvasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#77 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#49 - def redundant_self_assignment?(param0 = T.unsafe(nil), param1, param2); end - - private - - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#100 - def correction_range(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#90 - def method_returning_self?(method_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#94 - def redundant_assignment?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#41 -RuboCop::Cop::Style::RedundantSelfAssignment::ASSIGNMENT_TYPE_TO_RECEIVER_TYPE = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#34 -RuboCop::Cop::Style::RedundantSelfAssignment::METHODS_RETURNING_SELF = T.let(T.unsafe(nil), Set) - -# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#31 -RuboCop::Cop::Style::RedundantSelfAssignment::MSG = T.let(T.unsafe(nil), String) - -# Checks for places where conditional branch makes redundant self-assignment. -# -# It only detects local variable because it may replace state of instance variable, -# class variable, and global variable that have state across methods with `nil`. -# -# @example -# -# # bad -# foo = condition ? bar : foo -# -# # good -# foo = bar if condition -# -# # bad -# foo = condition ? foo : bar -# -# # good -# foo = bar unless condition -# -# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#25 -class RuboCop::Cop::Style::RedundantSelfAssignmentBranch < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#31 - def bad_method?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#35 - def on_lvasgn(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#59 - def inconvertible_to_modifier?(if_branch, else_branch); end - - # @return [Boolean] - # - # 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#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#70 - def self_assign?(variable, branch); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#53 - def use_if_and_else_branch?(expression); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#28 -RuboCop::Cop::Style::RedundantSelfAssignmentBranch::MSG = T.let(T.unsafe(nil), String) - -# Identifies instances of sorting and then -# taking only the first or last element. The same behavior can -# be accomplished without a relatively expensive sort by using -# `Enumerable#min` instead of sorting and taking the first -# element and `Enumerable#max` instead of sorting and taking the -# last element. Similarly, `Enumerable#min_by` and -# `Enumerable#max_by` can replace `Enumerable#sort_by` calls -# after which only the first or last element is used. -# -# @example -# # bad -# [2, 1, 3].sort.first -# [2, 1, 3].sort[0] -# [2, 1, 3].sort.at(0) -# [2, 1, 3].sort.slice(0) -# -# # good -# [2, 1, 3].min -# -# # bad -# [2, 1, 3].sort.last -# [2, 1, 3].sort[-1] -# [2, 1, 3].sort.at(-1) -# [2, 1, 3].sort.slice(-1) -# -# # good -# [2, 1, 3].max -# -# # bad -# arr.sort_by(&:foo).first -# arr.sort_by(&:foo)[0] -# arr.sort_by(&:foo).at(0) -# arr.sort_by(&:foo).slice(0) -# -# # good -# arr.min_by(&:foo) -# -# # bad -# arr.sort_by(&:foo).last -# arr.sort_by(&:foo)[-1] -# arr.sort_by(&:foo).at(-1) -# arr.sort_by(&:foo).slice(-1) -# -# # good -# arr.max_by(&:foo) -# -# source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#79 -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 - - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#88 - def redundant_sort?(param0 = T.unsafe(nil)); end - - private - - # 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#193 - def accessor_start(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#183 - def arg_node(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#187 - def arg_value(node); end - - # 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#166 - def base(accessor, arg); end - - # 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#136 - def message(node, sorter, accessor); end - - # 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#125 - def register_offense(node, sort_node, sorter, accessor); end - - # 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#174 - def suffix(sorter); end - - # 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#201 - def with_logical_operator?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#83 -RuboCop::Cop::Style::RedundantSort::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#85 -RuboCop::Cop::Style::RedundantSort::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Identifies places where `sort_by { ... }` can be replaced by -# `sort`. -# -# @example -# # bad -# array.sort_by { |x| x } -# array.sort_by do |var| -# var -# end -# -# # good -# array.sort -# -# source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#18 -class RuboCop::Cop::Style::RedundantSortBy < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#25 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#35 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#48 - def redundant_sort_by_block(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#53 - def redundant_sort_by_numblock(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#57 - def sort_by_range(send, node); end -end - -# source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#22 -RuboCop::Cop::Style::RedundantSortBy::MSG_BLOCK = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#23 -RuboCop::Cop::Style::RedundantSortBy::MSG_NUMBLOCK = T.let(T.unsafe(nil), String) - -# Checks for redundant escapes in string literals. -# -# @example -# # bad - no need to escape # without following {/$/@ -# "\#foo" -# -# # bad - no need to escape single quotes inside double quoted string -# "\'foo\'" -# -# # bad - heredocs are also checked for unnecessary escapes -# <<~STR -# \#foo \"foo\" -# STR -# -# # good -# "#foo" -# -# # good -# "\#{no_interpolation}" -# -# # good -# "'foo'" -# -# # good -# "foo\ -# bar" -# -# # good -# <<~STR -# #foo "foo" -# STR -# -# source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#37 -class RuboCop::Cop::Style::RedundantStringEscape < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::MatchRange - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#43 - def on_str(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#79 - def allowed_escape?(node, range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#119 - def array_literal?(node, prefix); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#73 - def begin_loc_present?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#153 - def delimiter?(node, char); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#171 - def disabling_interpolation?(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#149 - def heredoc?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#139 - def heredoc_with_disabled_interpolation?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#100 - def interpolation_not_enabled?(node); end - - # @return [Boolean] - # - # 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 - def message(range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#135 - def percent_array_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#111 - def percent_q_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#127 - def percent_w_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#131 - def percent_w_upper_literal?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#107 - def single_quoted?(node); end - - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#63 - def str_contents_range(node); end -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. -# -# 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 -# snake_case = %r{^[\dA-Z_]+$} -# -# # bad -# regex = %r{ -# foo -# (bar) -# (baz) -# }x -# -# # good -# snake_case = /^[\dA-Z_]+$/ -# -# # good -# regex = / -# foo -# (bar) -# (baz) -# /x -# @example EnforcedStyle: percent_r -# # bad -# snake_case = /^[\dA-Z_]+$/ -# -# # bad -# regex = / -# foo -# (bar) -# (baz) -# /x -# -# # good -# snake_case = %r{^[\dA-Z_]+$} -# -# # good -# regex = %r{ -# foo -# (bar) -# (baz) -# }x -# @example EnforcedStyle: mixed -# # bad -# snake_case = %r{^[\dA-Z_]+$} -# -# # bad -# regex = / -# foo -# (bar) -# (baz) -# /x -# -# # good -# snake_case = /^[\dA-Z_]+$/ -# -# # good -# regex = %r{ -# foo -# (bar) -# (baz) -# }x -# @example AllowInnerSlashes: false (default) -# # If `false`, the cop will always recommend using `%r` if one or more -# # slashes are found in the regexp string. -# -# # bad -# x =~ /home\// -# -# # good -# x =~ %r{home/} -# @example AllowInnerSlashes: true -# # good -# x =~ /home\// -# -# 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#101 - def on_regexp(node); end - - private - - # @return [Boolean] - # - # 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#132 - def allowed_mixed_percent_r?(node); end - - # @return [Boolean] - # - # 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#161 - def allowed_omit_parentheses_with_percent_r_literal?(node); end - - # @return [Boolean] - # - # 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#118 - def allowed_slash_literal?(node); end - - # 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#136 - def contains_disallowed_slash?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#140 - def contains_slash?(node); end - - # 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#176 - def correct_inner_slashes(node, corrector); end - - # 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#205 - def inner_slash_before_correction(node); end - - # 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#192 - def inner_slash_indices(node); end - - # 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#157 - def preferred_delimiters; end - - # @return [Boolean] - # - # 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#99 -RuboCop::Cop::Style::RegexpLiteral::MSG_USE_PERCENT_R = T.let(T.unsafe(nil), String) - -# 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. -# -# @example -# # bad -# require 'b' -# require 'a' -# -# # good -# require 'a' -# require 'b' -# -# # bad -# require_relative 'b' -# require_relative 'a' -# -# # good -# require_relative 'a' -# require_relative 'b' -# -# # good (sorted within each section separated by a blank line) -# require 'a' -# require 'd' -# -# require 'b' -# require 'c' -# -# # good -# require 'b' -# require_relative 'c' -# require 'a' -# -# # bad -# require 'a' -# require 'c' if foo -# require 'b' -# -# # good -# require 'a' -# require 'b' -# require 'c' if foo -# -# # bad -# require 'c' -# if foo -# require 'd' -# require 'b' -# end -# require 'a' -# -# # good -# require 'c' -# if foo -# require 'b' -# require 'd' -# end -# require 'a' -# -# source://rubocop//lib/rubocop/cop/style/require_order.rb#66 -class RuboCop::Cop::Style::RequireOrder < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/require_order.rb#76 - def if_inside_only_require(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/require_order.rb#83 - def on_send(node); end - - private - - # 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#133 - def in_same_section?(node1, node2); end - - # @return [Boolean] - # - # 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#123 - def search_node(node); end - - # source://rubocop//lib/rubocop/cop/style/require_order.rb#127 - def sibling_node(node); end -end - -# source://rubocop//lib/rubocop/cop/style/require_order.rb#73 -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 is added for following -# reasons: -# -# * The syntax of modifier form `rescue` can be misleading because it -# might lead us to believe that `rescue` handles the given exception -# but it actually rescue all exceptions to return the given rescue -# block. In this case, value returned by handle_error or -# SomeException. -# -# * Modifier form `rescue` would rescue all the exceptions. It would -# silently skip all exception or errors and handle the error. -# Example: If `NoMethodError` is raised, modifier form rescue would -# handle the exception. -# -# @example -# # bad -# some_method rescue handle_error -# -# # bad -# some_method rescue SomeException -# -# # good -# begin -# some_method -# rescue -# handle_error -# end -# -# # good -# begin -# some_method -# rescue SomeException -# handle_error -# end -# -# 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#52 - def on_resbody(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#71 - def correct_rescue_block(corrector, node, parenthesized); end - - # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#98 - def heredoc_end(node); end - - # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#88 - def indentation_and_offset(node, parenthesized); end - - # @return [Boolean] - # - # 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#48 - def autocorrect_incompatible_with; end - end -end - -# 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 -# styles `implicit` and `explicit`. This cop will not register an offense -# if any error other than `StandardError` is specified. -# -# @example EnforcedStyle: explicit (default) -# # `explicit` will enforce using `rescue StandardError` -# # instead of `rescue`. -# -# # bad -# begin -# foo -# rescue -# bar -# end -# -# # good -# begin -# foo -# rescue StandardError -# bar -# end -# -# # good -# begin -# foo -# rescue OtherError -# bar -# end -# -# # good -# begin -# foo -# rescue StandardError, SecurityError -# bar -# end -# @example EnforcedStyle: implicit -# # `implicit` will enforce using `rescue` instead of -# # `rescue StandardError`. -# -# # bad -# begin -# foo -# rescue StandardError -# bar -# end -# -# # good -# begin -# foo -# rescue -# bar -# end -# -# # good -# begin -# foo -# rescue OtherError -# bar -# end -# -# # good -# begin -# foo -# rescue StandardError, SecurityError -# bar -# end -# -# source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#73 -class RuboCop::Cop::Style::RescueStandardError < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RescueNode - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#92 - def on_resbody(node); end - - # source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#88 - def rescue_standard_error?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#83 - def rescue_without_error_class?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#118 - def offense_for_explicit_enforced_style(node); end - - # source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#107 - def offense_for_implicit_enforced_style(node, error); end -end - -# source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#80 -RuboCop::Cop::Style::RescueStandardError::MSG_EXPLICIT = T.let(T.unsafe(nil), String) - -# 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`. -# -# 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 -# def foo(arg) -# return nil if arg -# end -# -# # good -# def foo(arg) -# return if arg -# end -# @example EnforcedStyle: return_nil -# # bad -# def foo(arg) -# return if arg -# end -# -# # good -# def foo(arg) -# return nil if arg -# end -# -# 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#90 - def chained_send?(param0 = T.unsafe(nil)); end - - # 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#48 - def on_return(node); end - - # 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#43 - def return_node?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/return_nil.rb#80 - def correct_style?(node); end - - # 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#85 - def scoped_node?(node); end -end - -# 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#40 -RuboCop::Cop::Style::ReturnNil::RETURN_NIL_MSG = T.let(T.unsafe(nil), String) - -# Checks for predicate method definitions that return `nil`. -# A predicate method should only return a boolean value. -# -# @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 -# -# # bad -# def foo? -# if condition -# nil -# else -# true -# end -# end -# -# # good -# def foo? -# if condition -# false -# else -# true -# end -# 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#69 -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#81 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#81 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#77 - def return_nil?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#128 - def handle_if(if_node); end - - # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#113 - def handle_implicit_return_values(node); end - - # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#122 - def handle_nil(nil_node); end - - # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#118 - def handle_return(return_node); end - - # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#94 - def last_node_of_type(node, type); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#103 - def node_type?(node, type); end - - # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#107 - def register_offense(offense_node, replacement); end -end - -# source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#74 -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 -# in the chain need to be checked for safety, and all of the methods will -# need to be changed to use safe navigation. -# -# The default for `ConvertCodeThatCanStartToReturnNil` is `false`. -# When configured to `true`, this will -# check for code in the format `!foo.nil? && foo.bar`. As it is written, -# the return of this code is limited to `false` and whatever the return -# of the method is. If this is converted to safe navigation, -# `foo&.bar` can start returning `nil` as well as what the method -# returns. -# -# The default for `MaxChainLength` is `2`. -# We have limited the cop to not register an offense for method chains -# that exceed this option's value. -# -# NOTE: This cop will recognize offenses but not autocorrect code when the -# right hand side (RHS) of the `&&` statement is an `||` statement -# (eg. `foo && (foo.bar? || foo.baz?)`). It can be corrected -# manually by removing the `foo &&` and adding `&.` to each `foo` on the RHS. -# -# @example -# # bad -# foo.bar if foo -# foo.bar.baz if foo -# foo.bar(param1, param2) if foo -# foo.bar { |e| e.something } if foo -# foo.bar(param) { |e| e.something } if foo -# -# foo.bar if !foo.nil? -# foo.bar unless !foo -# foo.bar unless foo.nil? -# -# foo && foo.bar -# foo && foo.bar.baz -# foo && foo.bar(param1, param2) -# foo && foo.bar { |e| e.something } -# foo && foo.bar(param) { |e| e.something } -# -# foo ? foo.bar : nil -# foo.nil? ? nil : foo.bar -# !foo.nil? ? foo.bar : nil -# !foo ? nil : foo.bar -# -# # good -# foo&.bar -# foo&.bar&.baz -# foo&.bar(param1, param2) -# foo&.bar { |e| e.something } -# foo&.bar(param) { |e| e.something } -# foo && foo.bar.baz.qux # method chain with more than 2 methods -# foo && foo.nil? # method that `nil` responds to -# -# # Method calls that do not use `.` -# foo && foo < bar -# foo < bar if foo -# -# # When checking `foo&.empty?` in a conditional, `foo` being `nil` will actually -# # do the opposite of what the author intends. -# foo && foo.empty? -# -# # This could start returning `nil` as well as the return of the method -# foo.nil? || foo.bar -# !foo || foo.bar -# -# # Methods that are used on assignment, arithmetic operation or -# # comparison should not be converted to use safe navigation -# foo.baz = bar if foo -# foo.baz + bar if foo -# foo.bar > 2 if foo -# -# source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#89 -class RuboCop::Cop::Style::SafeNavigation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::NilMethods - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#136 - def and_inside_begin?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#130 - def and_with_rhs_or?(param0 = T.unsafe(nil)); end - - # if format: (if checked_variable body nil) - # unless format: (if checked_variable nil body) - # - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#104 - def modifier_if_safe_navigation_candidate(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#133 - def not_nil_check?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#157 - def on_and(node); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#141 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#181 - def report_offense(node, rhs, rhs_receiver, *removal_ranges, offense_range: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#139 - def strip_begin(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#119 - def ternary_safe_navigation_candidate(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#360 - def add_safe_nav_to_all_methods_in_chain(corrector, start_method, method_chain); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#277 - def allowed_if_condition?(node); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#222 - def and_parts(node); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#352 - def begin_range(node, method_call); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#314 - def chain_length(method_chain, method); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#204 - def collect_and_clauses(node); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#258 - def comments(node); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#216 - def concat_nodes(nodes, and_node); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#356 - def end_range(node, method_call); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#296 - def extract_common_parts(method_chain, checked_variable); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#243 - def extract_if_body(node); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#281 - def extract_parts_from_if(node); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#304 - def find_matching_receiver_invocation(method_chain, checked_variable); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#198 - def find_method_chain(node); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#251 - def handle_comments(corrector, node, method_call); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#374 - def max_chain_length; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#348 - def method_called?(send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#340 - def negated?(send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#229 - def offending_node?(node, lhs_receiver, rhs, rhs_receiver); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#264 - def relevant_comment_ranges(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#334 - def unsafe_method?(send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#322 - def unsafe_method_used?(method_chain, method); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#239 - def use_var_only_in_unless_modifier?(node, variable); end -end - -# source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#97 -RuboCop::Cop::Style::SafeNavigation::LOGIC_JUMP_KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#95 -RuboCop::Cop::Style::SafeNavigation::MSG = T.let(T.unsafe(nil), String) - -# Enforces safe navigation chains length to not exceed the configured maximum. -# The longer the chain is, the harder it becomes to track what on it could be -# returning `nil`. -# -# There is a potential interplay with `Style/SafeNavigation` - if both are enabled -# and their settings are "incompatible", one of the cops will complain about what -# the other proposes. -# -# E.g. if `Style/SafeNavigation` is configured with `MaxChainLength: 2` (default) -# and this cop is configured with `Max: 1`, then for `foo.bar.baz if foo` the former -# will suggest `foo&.bar&.baz`, which is an offense for the latter. -# -# @example Max: 2 (default) -# # bad -# user&.address&.zip&.upcase -# -# # good -# user&.address&.zip -# user.address.zip if user -# -# source://rubocop//lib/rubocop/cop/style/safe_navigation_chain_length.rb#26 -class RuboCop::Cop::Style::SafeNavigationChainLength < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/safe_navigation_chain_length.rb#29 - def on_csend(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/safe_navigation_chain_length.rb#46 - def max; end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation_chain_length.rb#38 - def safe_navigation_chains(node); end -end - -# source://rubocop//lib/rubocop/cop/style/safe_navigation_chain_length.rb#27 -RuboCop::Cop::Style::SafeNavigationChainLength::MSG = T.let(T.unsafe(nil), String) - -# Identifies usages of `shuffle.first`, -# `shuffle.last`, and `shuffle[]` and change them to use -# `sample` instead. -# -# @example -# # bad -# [1, 2, 3].shuffle.first -# [1, 2, 3].shuffle.first(2) -# [1, 2, 3].shuffle.last -# [2, 1, 3].shuffle.at(0) -# [2, 1, 3].shuffle.slice(0) -# [1, 2, 3].shuffle[2] -# [1, 2, 3].shuffle[0, 2] # sample(2) will do the same -# [1, 2, 3].shuffle[0..2] # sample(3) will do the same -# [1, 2, 3].shuffle(random: Random.new).first -# -# # good -# [1, 2, 3].shuffle -# [1, 2, 3].sample -# [1, 2, 3].sample(3) -# [1, 2, 3].shuffle[1, 3] # sample(3) might return a longer Array -# [1, 2, 3].shuffle[1..3] # sample(3) might return a longer Array -# [1, 2, 3].shuffle[foo, bar] -# [1, 2, 3].shuffle(random: Random.new) -# -# source://rubocop//lib/rubocop/cop/style/sample.rb#30 -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 - - # source://rubocop//lib/rubocop/cop/style/sample.rb#37 - def sample_candidate?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/sample.rb#122 - def correction(shuffle_arg, method, method_args); end - - # source://rubocop//lib/rubocop/cop/style/sample.rb#138 - def extract_source(args); end - - # source://rubocop//lib/rubocop/cop/style/sample.rb#116 - def message(shuffle_arg, method, method_args, range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/sample.rb#59 - def offensive?(method, method_args); end - - # source://rubocop//lib/rubocop/cop/style/sample.rb#96 - def range_size(range_node); end - - # source://rubocop//lib/rubocop/cop/style/sample.rb#129 - def sample_arg(method, method_args); end - - # source://rubocop//lib/rubocop/cop/style/sample.rb#70 - def sample_size(method_args); end - - # 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#89 - def sample_size_for_two_args(first, second); end - - # source://rubocop//lib/rubocop/cop/style/sample.rb#112 - def source_range(shuffle_node, node); end -end - -# source://rubocop//lib/rubocop/cop/style/sample.rb#33 -RuboCop::Cop::Style::Sample::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/sample.rb#34 -RuboCop::Cop::Style::Sample::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Looks for places where a subset of an Enumerable (array, -# range, set, etc.; see note below) is calculated based on a `Regexp` -# match, and suggests `grep` or `grep_v` instead. -# -# NOTE: Hashes do not behave as you may expect with `grep`, which -# means that `hash.grep` is not equivalent to `hash.select`. Although -# RuboCop is limited by static analysis, this cop attempts to avoid -# registering an offense when the receiver is a hash (hash literal, -# `Hash.new`, `Hash#[]`, or `to_h`/`to_hash`). -# -# NOTE: `grep` and `grep_v` were optimized when used without a block -# in Ruby 3.0, but may be slower in previous versions. -# See https://bugs.ruby-lang.org/issues/17030 -# -# @example -# # bad (select, filter, or find_all) -# array.select { |x| x.match? /regexp/ } -# array.select { |x| /regexp/.match?(x) } -# array.select { |x| x =~ /regexp/ } -# array.select { |x| /regexp/ =~ x } -# -# # bad (reject) -# array.reject { |x| x.match? /regexp/ } -# array.reject { |x| /regexp/.match?(x) } -# array.reject { |x| x =~ /regexp/ } -# array.reject { |x| /regexp/ =~ x } -# -# # good -# array.grep(regexp) -# array.grep_v(regexp) -# -# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#45 -class RuboCop::Cop::Style::SelectByRegexp < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#81 - def calls_lvar?(param0 = T.unsafe(nil), param1); end - - # Returns true if a node appears to return a hash - # - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#67 - def creates_hash?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#76 - def env_const?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#90 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#90 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#58 - def regexp_match?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#136 - def extract_send_node(block_node); end - - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#149 - def find_regexp(node, block); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#160 - def match_predicate_without_receiver?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#145 - def opposite?(regexp_method_send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#110 - def receiver_allowed?(node); end - - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#124 - def register_offense(node, block_node, regexp, replacement); end - - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#116 - def replacement(regexp_method_send_node, node); end -end - -# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#49 -RuboCop::Cop::Style::SelectByRegexp::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#52 -RuboCop::Cop::Style::SelectByRegexp::OPPOSITE_REPLACEMENTS = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#55 -RuboCop::Cop::Style::SelectByRegexp::REGEXP_METHODS = T.let(T.unsafe(nil), Set) - -# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#51 -RuboCop::Cop::Style::SelectByRegexp::REPLACEMENTS = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#50 -RuboCop::Cop::Style::SelectByRegexp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Enforces the use the shorthand for self-assignment. -# -# @example -# -# # bad -# x = x + 1 -# -# # good -# x += 1 -# -# source://rubocop//lib/rubocop/cop/style/self_assignment.rb#15 -class RuboCop::Cop::Style::SelfAssignment < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#33 - def on_cvasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#29 - def on_ivasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#25 - def on_lvasgn(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#88 - def apply_autocorrect(corrector, node, rhs, operator, new_rhs); end - - # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#70 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#84 - def autocorrect_boolean_node(corrector, node, rhs); end - - # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#80 - def autocorrect_send_node(corrector, node, rhs); end - - # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#39 - def check(node, var_type); end - - # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#60 - def check_boolean_node(node, rhs, var_name, var_type); end - - # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#49 - def check_send_node(node, rhs, var_name, var_type); end - - class << self - # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#21 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/self_assignment.rb#18 -RuboCop::Cop::Style::SelfAssignment::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/self_assignment.rb#19 -RuboCop::Cop::Style::SelfAssignment::OPS = T.let(T.unsafe(nil), Array) - -# Checks for multiple expressions placed on the same line. -# It also checks for lines terminated with a semicolon. -# -# This cop has `AllowAsExpressionSeparator` configuration option. -# It allows `;` to separate several expressions on the same line. -# -# @example -# # bad -# foo = 1; bar = 2; -# baz = 3; -# -# # good -# foo = 1 -# bar = 2 -# baz = 3 -# @example AllowAsExpressionSeparator: false (default) -# # bad -# foo = 1; bar = 2 -# @example AllowAsExpressionSeparator: true -# # good -# foo = 1; bar = 2 -# -# source://rubocop//lib/rubocop/cop/style/semicolon.rb#29 -class RuboCop::Cop::Style::Semicolon < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#45 - def on_begin(node); end - - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#39 - def on_new_investigation; end - - private - - # 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#70 - def each_semicolon; end - - # @return [Boolean] - # - # 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#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 - - # @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#156 - def find_range_node(token_before_semicolon); end - - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#148 - def find_semicolon_positions(line); end - - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#162 - def range_nodes; end - - # 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#84 - def semicolon_position(tokens); end - - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#79 - def tokens_for_lines; end - - class << self - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#35 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/semicolon.rb#33 -RuboCop::Cop::Style::Semicolon::MSG = T.let(T.unsafe(nil), String) - -# Checks for the use of the send method. -# -# @example -# # bad -# Foo.send(bar) -# quuz.send(fred) -# -# # good -# Foo.__send__(bar) -# quuz.public_send(fred) -# -# source://rubocop//lib/rubocop/cop/style/send.rb#16 -class RuboCop::Cop::Style::Send < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/send.rb#20 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/send.rb#20 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/style/send.rb#17 -RuboCop::Cop::Style::Send::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/send.rb#18 -RuboCop::Cop::Style::Send::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Detects the use of the `public_send` method with a literal method name argument. -# Since the `send` method can be used to call private methods, by default, -# only the `public_send` method is detected. -# -# NOTE: Writer methods with names ending in `=` are always permitted because their -# behavior differs as follows: -# -# [source,ruby] -# ---- -# def foo=(foo) -# @foo = foo -# 42 -# end -# -# self.foo = 1 # => 1 -# send(:foo=, 1) # => 42 -# ---- -# -# @example -# # bad -# obj.public_send(:method_name) -# obj.public_send('method_name') -# -# # good -# obj.method_name -# @example AllowSend: true (default) -# # good -# obj.send(:method_name) -# obj.send('method_name') -# obj.__send__(:method_name) -# obj.__send__('method_name') -# @example AllowSend: false -# # bad -# obj.send(:method_name) -# obj.send('method_name') -# obj.__send__(:method_name) -# obj.__send__('method_name') -# -# # good -# obj.method_name -# -# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#54 -class RuboCop::Cop::Style::SendWithLiteralMethodName < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#68 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#68 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#91 - def allow_send?; end - - # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#95 - def offense_range(node); end - - # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#99 - def removal_argument_range(first_argument, second_argument); end -end - -# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#60 -RuboCop::Cop::Style::SendWithLiteralMethodName::METHOD_NAME_PATTERN = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#57 -RuboCop::Cop::Style::SendWithLiteralMethodName::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#61 -RuboCop::Cop::Style::SendWithLiteralMethodName::RESERVED_WORDS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#58 -RuboCop::Cop::Style::SendWithLiteralMethodName::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#59 -RuboCop::Cop::Style::SendWithLiteralMethodName::STATIC_METHOD_NAME_NODE_TYPES = T.let(T.unsafe(nil), Array) - -# Checks for uses of `fail` and `raise`. -# -# @example EnforcedStyle: only_raise (default) -# # The `only_raise` style enforces the sole use of `raise`. -# # bad -# begin -# fail -# rescue Exception -# # handle it -# end -# -# def watch_out -# fail -# rescue Exception -# # handle it -# end -# -# Kernel.fail -# -# # good -# begin -# raise -# rescue Exception -# # handle it -# end -# -# def watch_out -# raise -# rescue Exception -# # handle it -# end -# -# Kernel.raise -# @example EnforcedStyle: only_fail -# # The `only_fail` style enforces the sole use of `fail`. -# # bad -# begin -# raise -# rescue Exception -# # handle it -# end -# -# def watch_out -# raise -# rescue Exception -# # handle it -# end -# -# Kernel.raise -# -# # good -# begin -# fail -# rescue Exception -# # handle it -# end -# -# def watch_out -# fail -# rescue Exception -# # handle it -# end -# -# Kernel.fail -# @example EnforcedStyle: semantic -# # The `semantic` style enforces the use of `fail` to signal an -# # exception, then will use `raise` to trigger an offense after -# # it has been rescued. -# # bad -# begin -# raise -# rescue Exception -# # handle it -# end -# -# def watch_out -# # Error thrown -# rescue Exception -# fail -# end -# -# Kernel.fail -# Kernel.raise -# -# # good -# begin -# fail -# rescue Exception -# # handle it -# end -# -# def watch_out -# fail -# rescue Exception -# raise 'Preferably with descriptive message' -# end -# -# explicit_receiver.fail -# explicit_receiver.raise -# -# source://rubocop//lib/rubocop/cop/style/signal_exception.rb#107 -class RuboCop::Cop::Style::SignalException < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#120 - def custom_fail_methods(param0); end - - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#117 - def kernel_call?(param0 = T.unsafe(nil), param1); end - - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#122 - def on_rescue(node); end - - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#133 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#205 - def allow(method_name, node); end - - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#187 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#166 - def check_scope(method_name, node); end - - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#179 - def check_send(method_name, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#199 - def command_or_kernel_call?(name, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#148 - def custom_fail_defined?; end - - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#209 - def each_command_or_kernel_call(method_name, node); end - - # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#155 - def message(method_name); end -end - -# source://rubocop//lib/rubocop/cop/style/signal_exception.rb#111 -RuboCop::Cop::Style::SignalException::FAIL_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/signal_exception.rb#112 -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 `[]`. -# -# 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 -# { key: 'value' }.dig(:key) -# [1, 2, 3].dig(0) -# -# # good -# { key: 'value' }[:key] -# [1, 2, 3][0] -# -# # good -# { key1: { key2: 'value' } }.dig(:key1, :key2) -# [1, [2, [3]]].dig(1, 1) -# -# # good -# keys = %i[key1 key2] -# { key1: { key2: 'value' } }.dig(*keys) -# -# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#34 -class RuboCop::Cop::Style::SingleArgumentDig < ::RuboCop::Cop::Base - include ::RuboCop::Cop::DigHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#42 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#66 - def ignore_dig_chain?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#40 -RuboCop::Cop::Style::SingleArgumentDig::IGNORED_ARGUMENT_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#38 -RuboCop::Cop::Style::SingleArgumentDig::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#39 -RuboCop::Cop::Style::SingleArgumentDig::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks whether the block parameters of a single-line -# method accepting a block match the names specified via configuration. -# -# For instance one can configure `reduce`(`inject`) to use |a, e| as -# parameters. -# -# Configuration option: Methods -# Should be set to use this cop. `Array` of hashes, where each key is the -# method name and value - array of argument names. -# -# @example Methods: [{reduce: %w[a b]}] -# # bad -# foo.reduce { |c, d| c + d } -# foo.reduce { |_, _d| 1 } -# -# # good -# foo.reduce { |a, b| a + b } -# foo.reduce { |a, _b| a } -# foo.reduce { |a, (id, _)| a + id } -# foo.reduce { true } -# -# # good -# foo.reduce do |c, d| -# c + d -# end -# -# source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#31 -class RuboCop::Cop::Style::SingleLineBlockParams < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#36 - def on_block(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#105 - def args_match?(method_name, args); end - - # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#69 - def autocorrect(corrector, node, preferred_block_arguments, joined_block_arguments); end - - # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#57 - def build_preferred_arguments_map(node, preferred_arguments); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#79 - def eligible_arguments?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#83 - def eligible_method?(node); end - - # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#95 - def method_name(method); end - - # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#91 - def method_names; end - - # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#87 - def methods; end - - # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#99 - def target_args(method_name); end -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` -# is configured for `Style/BlockDelimiters`. The autocorrection maintains the -# `do` ... `end` syntax to preserve semantics and does not change it to `{`...`}` block. -# -# NOTE: If `InspectBlocks` is set to `true` for `Layout/RedundantLineBreak`, blocks will -# be autocorrected to be on a single line if possible. This cop respects that configuration -# by not registering an offense if it would subsequently cause a -# `Layout/RedundantLineBreak` offense. -# -# @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#33 -class RuboCop::Cop::Style::SingleLineDoEndBlock < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CheckSingleLineSuitability - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#40 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#40 - def on_numblock(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#62 - def do_line(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#70 - def single_line_blocks_preferred?; end -end - -# source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#37 -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. -# -# Endless methods added in Ruby 3.0 are also accepted by this cop. -# -# If `Style/EndlessMethod` is enabled with `EnforcedStyle: allow_single_line`, `allow_always`, -# `require_single_line`, or `require_always`, single-line methods will be autocorrected -# to endless methods if there is only one statement in the body. -# -# @example -# # bad -# def some_method; body end -# def link_to(url); {:name => url}; end -# def @table.columns; super; end -# -# # good -# def self.resource_class=(klass); end -# def @table.columns; end -# def some_method() = body -# @example AllowIfMethodIsEmpty: true (default) -# # good -# def no_op; end -# @example AllowIfMethodIsEmpty: false -# # bad -# def no_op; end -# -# source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#34 -class RuboCop::Cop::Style::SingleLineMethods < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#41 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#41 - def on_defs(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#60 - def allow_empty?; end - - # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#52 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#97 - def break_line_before(corrector, node, range, indent_steps: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#88 - def correct_to_endless(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#64 - def correct_to_endless?(body_node); end - - # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#74 - def correct_to_multiline(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#136 - def disallow_endless_method_style?; end - - # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#104 - def each_part(body); end - - # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#121 - def method_body_source(method_body); end - - # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#114 - def move_comment(node, corrector); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#132 - def require_parentheses?(method_body); end -end - -# source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#38 -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 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[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[..42] # Ruby 2.7+ -# items[0..42] # Ruby 2.7+ -# -# 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#77 - def on_csend(node); end - - # 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#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#140 - def arguments_source(node); end - - # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#136 - def beginless(range_node); end - - # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#132 - def endless(range_node); end - - # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#102 - def find_offense_range(node); end - - # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#126 - def offense_message_for_partial_range(node, prefer, offense_range); end - - # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#110 - def offense_message_with_removal_range(node, range_node, offense_range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#98 - def unparenthesized_call?(node); end -end - -# 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#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, -# its conditions can be combined with the conditions of the outer branch. -# This helps to keep the nesting level from getting too deep. -# -# @example -# # bad -# if condition_a -# if condition_b -# do_something -# end -# end -# -# # bad -# if condition_b -# do_something -# end if condition_a -# -# # good -# if condition_a && condition_b -# do_something -# end -# @example AllowModifier: false (default) -# # bad -# if condition_a -# do_something if condition_b -# end -# -# # bad -# if condition_b -# do_something -# end if condition_a -# @example AllowModifier: true -# # good -# if condition_a -# do_something if condition_b -# end -# -# # good -# if condition_b -# do_something -# end if condition_a -# -# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#49 -class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#59 - def on_if(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#254 - def allow_modifier?; end - - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#81 - def assigned_variables(condition); end - - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#98 - def autocorrect(corrector, node, if_branch); end - - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#110 - def autocorrect_outer_condition_basic(corrector, node, if_branch); end - - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#125 - def autocorrect_outer_condition_modify_form(corrector, node, if_branch); end - - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#145 - def correct_for_basic_condition_style(corrector, node, if_branch, and_operator); end - - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#181 - def correct_for_comment(corrector, node, if_branch); end - - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#136 - def correct_for_guard_condition_style(corrector, outer_condition, if_branch, and_operator); end - - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#171 - def correct_for_outer_condition_modify_form_style(corrector, node, if_branch); end - - # 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#190 - def correct_outer_condition(corrector, condition); end - - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#203 - def insert_bang(corrector, node, is_modify_form); end - - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#216 - def insert_bang_for_and(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#89 - def offending_branch?(node, branch); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#258 - def outer_condition_modify_form?(node, if_branch); end - - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#247 - def parenthesized_method_arguments(node); end - - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#237 - def replace_condition(condition); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#228 - def require_parentheses?(condition); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#74 - def use_variable_assignment_in_condition?(condition, if_branch); end - - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#155 - def wrap_condition(corrector, condition); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#233 - def wrap_condition?(node); end - - class << self - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#55 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#53 -RuboCop::Cop::Style::SoleNestedConditional::MSG = T.let(T.unsafe(nil), String) - -# 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. -# -# @example EnforcedStyle: use_english_names (default) -# # good -# require 'English' # or this could be in another file. -# -# puts $LOAD_PATH -# puts $LOADED_FEATURES -# puts $PROGRAM_NAME -# puts $ERROR_INFO -# puts $ERROR_POSITION -# puts $FIELD_SEPARATOR # or $FS -# puts $OUTPUT_FIELD_SEPARATOR # or $OFS -# puts $INPUT_RECORD_SEPARATOR # or $RS -# puts $OUTPUT_RECORD_SEPARATOR # or $ORS -# puts $INPUT_LINE_NUMBER # or $NR -# puts $LAST_READ_LINE -# puts $DEFAULT_OUTPUT -# puts $DEFAULT_INPUT -# puts $PROCESS_ID # or $PID -# puts $CHILD_STATUS -# puts $LAST_MATCH_INFO -# puts $IGNORECASE -# puts $ARGV # or ARGV -# @example EnforcedStyle: use_perl_names -# # good -# puts $: -# puts $" -# puts $0 -# puts $! -# puts $@ -# puts $; -# puts $, -# puts $/ -# puts $\ -# puts $. -# puts $_ -# puts $> -# puts $< -# puts $$ -# puts $? -# puts $~ -# puts $= -# puts $* -# @example EnforcedStyle: use_builtin_english_names -# -# # good -# # Like `use_perl_names` but allows builtin global vars. -# puts $LOAD_PATH -# puts $LOADED_FEATURES -# puts $PROGRAM_NAME -# puts ARGV -# puts $: -# puts $" -# puts $0 -# puts $! -# puts $@ -# puts $; -# puts $, -# puts $/ -# puts $\ -# puts $. -# puts $_ -# puts $> -# puts $< -# puts $$ -# puts $? -# puts $~ -# puts $= -# puts $* -# -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#86 -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#175 - def autocorrect(corrector, node, global_var); end - - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#167 - def message(global_var); end - - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#151 - def on_gvar(node); end - - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#146 - def on_new_investigation; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#246 - def add_require_english?; end - - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#240 - def english_name_replacement(preferred_name, node); end - - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#189 - 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#211 - def format_list(items); end - - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#197 - def format_message(english, regular, global); end - - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#234 - def matching_styles(global); end - - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#226 - def preferred_names(global); end - - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#215 - def replacement(node, global_var); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#250 - def should_require_english?(global_var); end -end - -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#127 -RuboCop::Cop::Style::SpecialGlobalVars::BUILTIN_VARS = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#99 -RuboCop::Cop::Style::SpecialGlobalVars::ENGLISH_VARS = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#144 -RuboCop::Cop::Style::SpecialGlobalVars::LIBRARY_NAME = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#92 -RuboCop::Cop::Style::SpecialGlobalVars::MSG_BOTH = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#95 -RuboCop::Cop::Style::SpecialGlobalVars::MSG_ENGLISH = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#97 -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#121 -RuboCop::Cop::Style::SpecialGlobalVars::NON_ENGLISH_VARS = T.let(T.unsafe(nil), Set) - -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#123 -RuboCop::Cop::Style::SpecialGlobalVars::PERL_VARS = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#138 -RuboCop::Cop::Style::SpecialGlobalVars::STYLE_VARS_MAP = T.let(T.unsafe(nil), Hash) - -# Check for parentheses around stabby lambda arguments. -# There are two different styles. Defaults to `require_parentheses`. -# -# @example EnforcedStyle: require_parentheses (default) -# # bad -# ->a,b,c { a + b + c } -# -# # good -# ->(a,b,c) { a + b + c} -# @example EnforcedStyle: require_no_parentheses -# # bad -# ->(a,b,c) { a + b + c } -# -# # good -# ->a,b,c { a + b + c} -# -# source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#22 -class RuboCop::Cop::Style::StabbyLambdaParentheses < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#28 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#54 - def message(_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#46 - def missing_parentheses?(node); end - - # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#58 - def missing_parentheses_corrector(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#73 - def parentheses?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#50 - def redundant_parentheses?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#69 - def stabby_lambda_with_args?(node); end - - # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#62 - def unwanted_parentheses_corrector(corrector, node); end -end - -# source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#27 -RuboCop::Cop::Style::StabbyLambdaParentheses::MSG_NO_REQUIRE = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#26 -RuboCop::Cop::Style::StabbyLambdaParentheses::MSG_REQUIRE = T.let(T.unsafe(nil), String) - -# Checks for places where classes with only class methods can be -# replaced with a module. Classes should be used only when it makes sense to create -# instances out of them. -# -# @example -# # bad -# class SomeClass -# def self.some_method -# # body omitted -# end -# -# def self.some_other_method -# # body omitted -# end -# end -# -# # good -# module SomeModule -# module_function -# -# def some_method -# # body omitted -# end -# -# def some_other_method -# # body omitted -# end -# end -# -# # good - has instance method -# class SomeClass -# def instance_method; end -# def self.class_method; end -# end -# -# source://rubocop//lib/rubocop/cop/style/static_class.rb#46 -class RuboCop::Cop::Style::StaticClass < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::VisibilityHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/static_class.rb#53 - def on_class(class_node); end - - private - - # source://rubocop//lib/rubocop/cop/style/static_class.rb#64 - def autocorrect(corrector, class_node); end - - # source://rubocop//lib/rubocop/cop/style/static_class.rb#77 - def autocorrect_def(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/static_class.rb#83 - def autocorrect_sclass(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/static_class.rb#90 - def class_convertible_to_module?(class_node); end - - # source://rubocop//lib/rubocop/cop/style/static_class.rb#114 - def class_elements(class_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/static_class.rb#102 - def extend_call?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/static_class.rb#106 - def sclass_convertible_to_module?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/static_class.rb#51 -RuboCop::Cop::Style::StaticClass::MSG = T.let(T.unsafe(nil), String) - -# Identifies places where `$stderr.puts` can be replaced by -# `warn`. The latter has the advantage of easily being disabled by, -# the `-W0` interpreter flag or setting `$VERBOSE` to `nil`. -# -# @example -# # bad -# $stderr.puts('hello') -# -# # good -# warn('hello') -# -# source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#17 -class RuboCop::Cop::Style::StderrPuts < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#32 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#25 - def stderr_puts?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#43 - def message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#47 - def stderr_gvar?(sym); end - - # source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#51 - def stderr_puts_range(send); end -end - -# source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#21 -RuboCop::Cop::Style::StderrPuts::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#22 -RuboCop::Cop::Style::StderrPuts::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for uses of `String#split` with empty string or regexp literal argument. -# -# @example -# # bad -# string.split(//) -# string.split('') -# -# # good -# string.chars -# -# source://rubocop//lib/rubocop/cop/style/string_chars.rb#21 -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 - -# source://rubocop//lib/rubocop/cop/style/string_chars.rb#27 -RuboCop::Cop::Style::StringChars::BAD_ARGUMENTS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/string_chars.rb#25 -RuboCop::Cop::Style::StringChars::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/string_chars.rb#26 -RuboCop::Cop::Style::StringChars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for places where string concatenation -# can be replaced with string interpolation. -# -# The cop can autocorrect simple cases but will skip autocorrecting -# more complex cases where the resulting code would be harder to read. -# In those cases, it might be useful to extract statements to local -# variables or methods which you can then interpolate in a string. -# -# NOTE: When concatenation between two strings is broken over multiple -# lines, this cop does not register an offense; instead, -# `Style/LineEndConcatenation` will pick up the offense if enabled. -# -# Two modes are supported: -# 1. `aggressive` style checks and corrects all occurrences of `+` where -# either the left or right side of `+` is a string literal. -# 2. `conservative` style on the other hand, checks and corrects only if -# left side (receiver of `+` method call) is a string literal. -# This is useful when the receiver is some expression that returns string like `Pathname` -# instead of a string literal. -# -# @example Mode: aggressive (default) -# # bad -# email_with_name = user.name + ' <' + user.email + '>' -# Pathname.new('/') + 'test' -# -# # good -# email_with_name = "#{user.name} <#{user.email}>" -# email_with_name = format('%s <%s>', user.name, user.email) -# "#{Pathname.new('/')}test" -# -# # accepted, line-end concatenation -# name = 'First' + -# 'Last' -# @example Mode: conservative -# # bad -# 'Hello' + user.name -# -# # good -# "Hello #{user.name}" -# user.name + '!!' -# Pathname.new('/') + 'test' -# -# source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#53 -class RuboCop::Cop::Style::StringConcatenation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#68 - def on_new_investigation; end - - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#72 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#61 - def string_concatenation?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#159 - def adjust_str(node); end - - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#115 - def collect_parts(node, parts = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#140 - def corrected_ancestor?(node); end - - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#107 - def find_topmost_plus_node(node); end - - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#163 - def handle_quotes(parts); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#134 - def heredoc?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#97 - def line_end_concatenation?(node); end - - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#173 - def mode; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#126 - def plus_node?(node); end - - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#85 - def register_offense(topmost_plus_node, parts); end - - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#144 - def replacement(parts); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#169 - def single_quoted?(str_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#130 - def uncorrectable?(part); end -end - -# source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#57 -RuboCop::Cop::Style::StringConcatenation::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#58 -RuboCop::Cop::Style::StringConcatenation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for the use of strings as keys in hashes. The use of -# symbols is preferred instead. -# -# @example -# # bad -# { 'one' => 1, 'two' => 2, 'three' => 3 } -# -# # good -# { one: 1, two: 2, three: 3 } -# -# source://rubocop//lib/rubocop/cop/style/string_hash_keys.rb#19 -class RuboCop::Cop::Style::StringHashKeys < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/string_hash_keys.rb#42 - def on_pair(node); end - - # source://rubocop//lib/rubocop/cop/style/string_hash_keys.rb#30 - def receive_environments_method?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/string_hash_keys.rb#25 - def string_hash_key?(param0 = T.unsafe(nil)); end -end - -# source://rubocop//lib/rubocop/cop/style/string_hash_keys.rb#22 -RuboCop::Cop::Style::StringHashKeys::MSG = T.let(T.unsafe(nil), String) - -# Checks if uses of quotes match the configured preference. -# -# @example EnforcedStyle: single_quotes (default) -# # bad -# "No special symbols" -# "No string interpolation" -# "Just text" -# -# # good -# 'No special symbols' -# 'No string interpolation' -# 'Just text' -# "Wait! What's #{this}!" -# @example EnforcedStyle: double_quotes -# # bad -# 'Just some text' -# 'No special chars or interpolation' -# -# # good -# "Just some text" -# "No special chars or interpolation" -# "Every string in #{project} uses double_quotes" -# -# source://rubocop//lib/rubocop/cop/style/string_literals.rb#29 -class RuboCop::Cop::Style::StringLiterals < ::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.rb#37 - def on_dstr(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/string_literals.rb#123 - def accept_child_double_quotes?(nodes); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/string_literals.rb#71 - def all_string_literals?(nodes); end - - # source://rubocop//lib/rubocop/cop/style/string_literals.rb#61 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/string_literals.rb#105 - def check_multiline_quote_style(node, quote); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/string_literals.rb#101 - def consistent_multiline?; end - - # source://rubocop//lib/rubocop/cop/style/string_literals.rb#75 - def detect_quote_styles(node); end - - # source://rubocop//lib/rubocop/cop/style/string_literals.rb#87 - def message(_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/string_literals.rb#97 - def offense?(node); end - - # source://rubocop//lib/rubocop/cop/style/string_literals.rb#65 - def register_offense(node, message: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/string_literals.rb#119 - def unexpected_double_quotes?(quote); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/string_literals.rb#115 - def unexpected_single_quotes?(quote); end -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 string, symbol, and regexp interpolations -# match the configured preference. -# -# @example EnforcedStyle: single_quotes (default) -# # bad -# string = "Tests #{success ? "PASS" : "FAIL"}" -# symbol = :"Tests #{success ? "PASS" : "FAIL"}" -# heredoc = <<~TEXT -# Tests #{success ? "PASS" : "FAIL"} -# TEXT -# regexp = /Tests #{success ? "PASS" : "FAIL"}/ -# -# # good -# 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 -# string = "Tests #{success ? 'PASS' : 'FAIL'}" -# symbol = :"Tests #{success ? 'PASS' : 'FAIL'}" -# heredoc = <<~TEXT -# Tests #{success ? 'PASS' : 'FAIL'} -# TEXT -# regexp = /Tests #{success ? 'PASS' : 'FAIL'}/ -# -# # good -# 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#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#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#59 - def message(_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#66 - def offense?(node); end -end - -# Enforces the use of consistent method names -# from the `String` class. -# -# @example -# # bad -# 'name'.intern -# 'var'.unfavored_method -# -# # good -# 'name'.to_sym -# 'var'.preferred_method -# -# source://rubocop//lib/rubocop/cop/style/string_methods.rb#17 -class RuboCop::Cop::Style::StringMethods < ::RuboCop::Cop::Base - include ::RuboCop::Cop::MethodPreference - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/string_methods.rb#23 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/string_methods.rb#23 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/style/string_methods.rb#21 -RuboCop::Cop::Style::StringMethods::MSG = T.let(T.unsafe(nil), String) - -# Identifies places where `lstrip.rstrip` can be replaced by -# `strip`. -# -# @example -# # bad -# 'abc'.lstrip.rstrip -# 'abc'.rstrip.lstrip -# -# # good -# 'abc'.strip -# -# source://rubocop//lib/rubocop/cop/style/strip.rb#16 -class RuboCop::Cop::Style::Strip < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # 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#31 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/strip.rb#31 - def on_send(node); end -end - -# source://rubocop//lib/rubocop/cop/style/strip.rb#20 -RuboCop::Cop::Style::Strip::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/strip.rb#21 -RuboCop::Cop::Style::Strip::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for inheritance from Struct.new. -# -# @example -# # bad -# class Person < Struct.new(:first_name, :last_name) -# def age -# 42 -# end -# end -# -# # good -# Person = Struct.new(:first_name, :last_name) do -# def age -# 42 -# end -# end -# -# source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#26 -class RuboCop::Cop::Style::StructInheritance < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#33 - def on_class(node); end - - # source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#45 - def struct_constructor?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#52 - def correct_parent(parent, corrector); end - - # source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#62 - def range_for_empty_class_body(class_node, struct_new); end -end - -# source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#30 -RuboCop::Cop::Style::StructInheritance::MSG = T.let(T.unsafe(nil), String) - -# Checks for redundant argument forwarding when calling super with arguments identical to -# the method definition. -# -# Using zero arity `super` within a `define_method` block results in `RuntimeError`: -# -# [source,ruby] -# ---- -# def m -# define_method(:foo) { super() } # => OK -# end -# -# def m -# define_method(:foo) { super } # => RuntimeError -# end -# ---- -# -# Furthermore, any arguments accompanied by a block may potentially be delegating to -# `define_method`, therefore, `super` used within these blocks will be allowed. -# This approach might result in false negatives, yet ensuring safe detection takes precedence. -# -# NOTE: When forwarding the same arguments but replacing the block argument with a new inline -# block, it is not necessary to explicitly list the non-block arguments. As such, an offense -# will be registered in this case. -# -# @example -# # bad -# def method(*args, **kwargs) -# super(*args, **kwargs) -# end -# -# # good - implicitly passing all arguments -# def method(*args, **kwargs) -# super -# end -# -# # good - forwarding a subset of the arguments -# def method(*args, **kwargs) -# super(*args) -# end -# -# # good - forwarding no arguments -# def method(*args, **kwargs) -# super() -# end -# -# # bad - forwarding with overridden block -# def method(*args, **kwargs, &block) -# super(*args, **kwargs) { do_something } -# end -# -# # good - implicitly passing all non-block arguments -# def method(*args, **kwargs, &block) -# super { do_something } -# end -# -# # good - assigning to the block variable before calling super -# def method(&block) -# # Assigning to the block variable would pass the old value to super, -# # under this circumstance the block must be referenced explicitly. -# block ||= proc { 'fallback behavior' } -# super(&block) -# end -# -# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#68 -class RuboCop::Cop::Style::SuperArguments < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#78 - def on_super(super_node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#126 - def argument_list_size_differs?(def_args, super_args, super_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#108 - def arguments_identical?(def_node, super_node, def_args, super_args); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#181 - def block_arg_same?(def_node, super_node, def_arg, super_arg); end - - # Reassigning the block argument will still pass along the original block to super - # https://bugs.ruby-lang.org/issues/20505 - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#195 - def block_reassigned?(def_node, block_arg_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#135 - def block_sends_to_super?(super_node, parent_node = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#96 - def find_def_node(super_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#206 - def forward_arg_same?(def_arg, super_arg); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#161 - def keyword_arg_same?(def_arg, super_arg); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#171 - def keyword_rest_arg_same?(def_arg, super_arg); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#144 - def positional_arg_same?(def_arg, super_arg); end - - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#151 - def positional_rest_arg_same(def_arg, super_arg); end - - # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#210 - def preprocess_super_args(super_args); end -end - -# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#72 -RuboCop::Cop::Style::SuperArguments::ASSIGN_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#71 -RuboCop::Cop::Style::SuperArguments::DEF_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#74 -RuboCop::Cop::Style::SuperArguments::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#75 -RuboCop::Cop::Style::SuperArguments::MSG_INLINE_BLOCK = 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 -# # bad -# tmp = x -# x = y -# y = tmp -# -# # good -# x, y = y, x -# -# source://rubocop//lib/rubocop/cop/style/swap_values.rb#21 -class RuboCop::Cop::Style::SwapValues < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/swap_values.rb#30 - def on_asgn(node); end - - # source://rubocop//lib/rubocop/cop/style/swap_values.rb#30 - def on_casgn(node); end - - # source://rubocop//lib/rubocop/cop/style/swap_values.rb#30 - def on_cvasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/swap_values.rb#30 - def on_gvasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/swap_values.rb#30 - def on_ivasgn(node); end - - # source://rubocop//lib/rubocop/cop/style/swap_values.rb#30 - def on_lvasgn(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/swap_values.rb#47 - def allowed_assignment?(node); end - - # source://rubocop//lib/rubocop/cop/style/swap_values.rb#93 - def correction_range(tmp_assign, y_assign); end - - # source://rubocop//lib/rubocop/cop/style/swap_values.rb#81 - def lhs(node); end - - # source://rubocop//lib/rubocop/cop/style/swap_values.rb#66 - def message(x_assign, y_assign); end - - # source://rubocop//lib/rubocop/cop/style/swap_values.rb#75 - def replacement(x_assign); end - - # source://rubocop//lib/rubocop/cop/style/swap_values.rb#89 - def rhs(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/swap_values.rb#60 - def simple_assignment?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/swap_values.rb#51 - def swapping_values?(tmp_assign, x_assign, y_assign); end -end - -# source://rubocop//lib/rubocop/cop/style/swap_values.rb#25 -RuboCop::Cop::Style::SwapValues::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/swap_values.rb#28 -RuboCop::Cop::Style::SwapValues::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Set) - -# Checks for array literals made up of symbols that are not -# using the %i() syntax. -# -# Alternatively, it checks for symbol arrays using the %i() syntax on -# projects which do not want to use that syntax, perhaps because they -# support a version of Ruby lower than 2.0. -# -# Configuration option: MinSize -# If set, arrays with fewer elements than this value will not trigger the -# cop. For example, a `MinSize` of `3` will not enforce a style on an -# array of 2 or fewer elements. -# -# @example EnforcedStyle: percent (default) -# # good -# %i[foo bar baz] -# -# # 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] -# -# # bad -# %i[foo bar baz] -# -# 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 - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::PercentArray - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # 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#96 - def build_bracketed_array(node); end - - # @return [Boolean] - # - # 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#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#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#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#63 - def largest_brackets=(_arg0); end - end -end - -# 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#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 -# -# # bad -# :"symbol" -# -# # good -# :symbol -# -# source://rubocop//lib/rubocop/cop/style/symbol_literal.rb#15 -class RuboCop::Cop::Style::SymbolLiteral < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/symbol_literal.rb#20 - def on_sym(node); end -end - -# source://rubocop//lib/rubocop/cop/style/symbol_literal.rb#18 -RuboCop::Cop::Style::SymbolLiteral::MSG = T.let(T.unsafe(nil), String) - -# Use symbols as procs when possible. -# -# If you prefer a style that allows block for method with arguments, -# please set `true` to `AllowMethodsWithArguments`. -# `define_method?` methods are allowed by default. -# These are customizable with `AllowedMethods` option. -# -# @example AllCops:ActiveSupportExtensionsEnabled: true -# # good -# ->(x) { x.foo } -# proc { |x| x.foo } -# Proc.new { |x| x.foo } -# @example AllowMethodsWithArguments: false (default) -# # bad -# something.do_something(foo) { |o| o.bar } -# -# # good -# something.do_something(foo, &:bar) -# @example AllowMethodsWithArguments: true -# # good -# something.do_something(foo) { |o| o.bar } -# @example AllowComments: false (default) -# # bad -# something.do_something do |s| # some comment -# # some comment -# s.upcase # some comment -# # some comment -# end -# @example AllowComments: true -# # good - if there are comment in either position -# something.do_something do |s| # some comment -# # some comment -# s.upcase # some comment -# # some comment -# end -# @example AllowedMethods: [define_method] (default) -# # good -# define_method(:foo) { |foo| foo.bar } -# @example AllowedPatterns: [] (default) -# # bad -# something.map { |s| s.upcase } -# @example AllowedPatterns: ['map'] (default) -# # good -# something.map { |s| s.upcase } -# @example AllCops:ActiveSupportExtensionsEnabled: false (default) -# # bad -# ->(x) { x.foo } -# proc { |x| x.foo } -# Proc.new { |x| x.foo } -# -# # good -# lambda(&:foo) -# proc(&:foo) -# Proc.new(&:foo) -# @example -# # bad -# something.map { |s| s.upcase } -# something.map { _1.upcase } -# -# # good -# something.map(&:upcase) -# -# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#140 -class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CommentsHelp - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - extend ::RuboCop::Cop::AutoCorrector - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#189 - def destructuring_block_argument?(argument_node); end - - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#170 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#170 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#152 - def proc_node?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#158 - def symbol_proc?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#155 - def symbol_proc_receiver?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#274 - def allow_comments?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#270 - def allow_if_method_has_argument?(send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#204 - def allowed_method_name?(name); end - - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#217 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#247 - def autocorrect_lambda_block(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#238 - def autocorrect_with_args(corrector, node, args, method_name); end - - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#225 - def autocorrect_without_args(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#260 - def begin_pos_for_replacement(node); end - - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#255 - def block_range_with_space(node); end - - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#208 - def register_offense(node, method_name, block_method_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#200 - 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#196 - def unsafe_hash_usage?(node); end - - class << self - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#165 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#149 -RuboCop::Cop::Style::SymbolProc::LAMBDA_OR_PROC = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#147 -RuboCop::Cop::Style::SymbolProc::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#148 -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#499 -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#504 - def correct(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#508 - def move_assignment_inside_condition(corrector, node); end - - private - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#522 - def correction(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#535 - def element_assignment?(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#539 - def extract_branches(node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#552 - def move_branch_inside_condition(corrector, branch, assignment); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#547 - def remove_parentheses(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#526 - def ternary(node); end - end -end - -# Checks for the presence of parentheses around ternary -# conditions. It is configurable to enforce inclusion or omission of -# parentheses using `EnforcedStyle`. Omission is only enforced when -# removing the parentheses won't cause a different behavior. -# -# `AllowSafeAssignment` option for safe assignment. -# By safe assignment we mean putting parentheses around -# an assignment to indicate "I know I'm using an assignment -# as a condition. It's not a mistake." -# -# @example EnforcedStyle: require_no_parentheses (default) -# # bad -# foo = (bar?) ? a : b -# foo = (bar.baz?) ? a : b -# foo = (bar && baz) ? a : b -# -# # good -# foo = bar? ? a : b -# foo = bar.baz? ? a : b -# foo = bar && baz ? a : b -# @example EnforcedStyle: require_parentheses -# # bad -# foo = bar? ? a : b -# foo = bar.baz? ? a : b -# foo = bar && baz ? a : b -# -# # good -# foo = (bar?) ? a : b -# foo = (bar.baz?) ? a : b -# foo = (bar && baz) ? a : b -# @example EnforcedStyle: require_parentheses_when_complex -# # bad -# foo = (bar?) ? a : b -# foo = (bar.baz?) ? a : b -# foo = bar && baz ? a : b -# -# # good -# foo = bar? ? a : b -# foo = bar.baz? ? a : b -# foo = (bar && baz) ? a : b -# @example AllowSafeAssignment: true (default) -# # good -# foo = (bar = baz) ? a : b -# @example AllowSafeAssignment: false -# # bad -# foo = (bar = baz) ? a : b -# -# source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#57 -class RuboCop::Cop::Style::TernaryParentheses < ::RuboCop::Cop::Base - include ::RuboCop::Cop::SafeAssignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#191 - def method_name(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#69 - def on_if(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#100 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#181 - def below_ternary_precedence?(child); end - - # If the condition is parenthesized we recurse and check for any - # complex expressions within it. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#131 - def complex_condition?(condition); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#89 - def condition_as_parenthesized_one_line_pattern_matching?(condition); end - - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#196 - def correct_parenthesized(corrector, condition); end - - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#210 - def correct_unparenthesized(corrector, condition); end - - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#151 - def message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#227 - def node_args_need_parens?(send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#234 - def node_with_args?(node); end - - # Anything that is not a variable, constant, or method/.method call - # will be counted as a complex expression. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#141 - def non_complex_expression?(condition); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#145 - def non_complex_send?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#113 - def offense?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#85 - def only_closing_parenthesis_is_last_line?(condition); end - - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#214 - def parenthesize_condition_arguments(corrector, send_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#169 - def parenthesized?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#161 - def require_parentheses?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#165 - def require_parentheses_when_complex?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#177 - def unparenthesized_method_call?(child); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#173 - def unsafe_autocorrect?(condition); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#222 - def whitespace_after?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#66 -RuboCop::Cop::Style::TernaryParentheses::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#67 -RuboCop::Cop::Style::TernaryParentheses::MSG_COMPLEX = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#64 -RuboCop::Cop::Style::TernaryParentheses::NON_COMPLEX_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#63 -RuboCop::Cop::Style::TernaryParentheses::VARIABLE_TYPES = T.let(T.unsafe(nil), Set) - -# Newcomers to ruby applications may write top-level methods, -# when ideally they should be organized in appropriate classes or modules. -# This cop looks for definitions of top-level methods and warns about them. -# -# However for ruby scripts it is perfectly fine to use top-level methods. -# Hence this cop is disabled by default. -# -# @example -# # bad -# def some_method -# end -# -# # bad -# def self.some_method -# end -# -# # bad -# define_method(:foo) { puts 1 } -# -# # good -# module Foo -# def some_method -# end -# end -# -# # good -# class Foo -# def self.some_method -# end -# end -# -# # good -# Struct.new do -# def some_method -# end -# end -# -# # good -# class Foo -# define_method(:foo) { puts 1 } -# end -# -# source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#47 -class RuboCop::Cop::Style::TopLevelMethodDefinition < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#79 - def define_method_block?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#60 - def on_block(node); end - - # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#52 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#52 - def on_defs(node); end - - # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#60 - def on_numblock(node); end - - # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#52 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#70 - def top_level_method_definition?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#48 -RuboCop::Cop::Style::TopLevelMethodDefinition::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#50 -RuboCop::Cop::Style::TopLevelMethodDefinition::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for trailing code after the class definition. -# -# @example -# # bad -# class Foo; def foo; end -# end -# -# # good -# class Foo -# def foo; end -# end -# -# source://rubocop//lib/rubocop/cop/style/trailing_body_on_class.rb#18 -class RuboCop::Cop::Style::TrailingBodyOnClass < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::TrailingBody - extend ::RuboCop::Cop::AutoCorrector - - # 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 -RuboCop::Cop::Style::TrailingBodyOnClass::MSG = T.let(T.unsafe(nil), String) - -# Checks for trailing code after the method definition. -# -# NOTE: It always accepts endless method definitions that are basically on the same line. -# -# @example -# # bad -# def some_method; do_stuff -# end -# -# def f(x); b = foo -# b[c: x] -# end -# -# # good -# def some_method -# do_stuff -# end -# -# def f(x) -# b = foo -# b[c: x] -# end -# -# def endless_method = do_stuff -# -# source://rubocop//lib/rubocop/cop/style/trailing_body_on_method_definition.rb#31 -class RuboCop::Cop::Style::TrailingBodyOnMethodDefinition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::TrailingBody - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/trailing_body_on_method_definition.rb#38 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/trailing_body_on_method_definition.rb#38 - def on_defs(node); end -end - -# source://rubocop//lib/rubocop/cop/style/trailing_body_on_method_definition.rb#36 -RuboCop::Cop::Style::TrailingBodyOnMethodDefinition::MSG = T.let(T.unsafe(nil), String) - -# Checks for trailing code after the module definition. -# -# @example -# # bad -# module Foo extend self -# end -# -# # good -# module Foo -# extend self -# end -# -# source://rubocop//lib/rubocop/cop/style/trailing_body_on_module.rb#18 -class RuboCop::Cop::Style::TrailingBodyOnModule < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::TrailingBody - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/trailing_body_on_module.rb#25 - def on_module(node); end -end - -# source://rubocop//lib/rubocop/cop/style/trailing_body_on_module.rb#23 -RuboCop::Cop::Style::TrailingBodyOnModule::MSG = T.let(T.unsafe(nil), String) - -# Checks for trailing comma in argument lists. -# The supported styles are: -# -# * `consistent_comma`: Requires a comma after the last argument, -# for all parenthesized multi-line method calls with arguments. -# * `comma`: Requires a comma after the last argument, but only for -# parenthesized method calls where each argument is on its own line. -# * `no_comma`: Requires that there is no comma after the last -# argument. -# -# Regardless of style, trailing commas are not allowed in -# single-line method calls. -# -# @example EnforcedStyleForMultiline: consistent_comma -# # bad -# method(1, 2,) -# -# # good -# method(1, 2) -# -# # good -# method( -# 1, 2, -# 3, -# ) -# -# # good -# method( -# 1, 2, 3, -# ) -# -# # good -# method( -# 1, -# 2, -# ) -# @example EnforcedStyleForMultiline: comma -# # bad -# method(1, 2,) -# -# # good -# method(1, 2) -# -# # bad -# method( -# 1, 2, -# 3, -# ) -# -# # good -# method( -# 1, 2, -# 3 -# ) -# -# # bad -# method( -# 1, 2, 3, -# ) -# -# # good -# method( -# 1, 2, 3 -# ) -# -# # good -# method( -# 1, -# 2, -# ) -# @example EnforcedStyleForMultiline: no_comma (default) -# # bad -# method(1, 2,) -# -# # good -# method(1, 2) -# -# # good -# method( -# 1, -# 2 -# ) -# -# source://rubocop//lib/rubocop/cop/style/trailing_comma_in_arguments.rb#90 -class RuboCop::Cop::Style::TrailingCommaInArguments < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::TrailingComma - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_arguments.rb#98 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_arguments.rb#98 - def on_send(node); end - - class << self - # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_arguments.rb#94 - def autocorrect_incompatible_with; end - end -end - -# Checks for trailing comma in array literals. -# The configuration options are: -# -# * `consistent_comma`: Requires a comma after the last item of all non-empty, multiline array -# literals. -# * `comma`: Requires a comma after the last item in an array, but only when each item is on -# its own line. -# * `diff_comma`: Requires a comma after the last item in an array, but only when that item is -# followed by an immediate newline. -# * `no_comma`: Does not require a comma after the last item in an array -# -# @example EnforcedStyleForMultiline: consistent_comma -# # bad -# a = [1, 2,] -# -# # good -# a = [1, 2] -# -# # good -# a = [ -# 1, 2, -# 3, -# ] -# -# # good -# a = [ -# 1, 2, 3, -# ] -# -# # good -# a = [ -# 1, -# 2, -# ] -# -# # bad -# a = [1, 2, -# 3, 4] -# -# # good -# a = [1, 2, -# 3, 4,] -# @example EnforcedStyleForMultiline: comma -# # bad -# a = [1, 2,] -# -# # good -# a = [1, 2] -# -# # bad -# a = [ -# 1, 2, -# 3, -# ] -# -# # good -# a = [ -# 1, 2, -# 3 -# ] -# -# # bad -# a = [ -# 1, 2, 3, -# ] -# -# # good -# a = [ -# 1, 2, 3 -# ] -# -# # good -# a = [ -# 1, -# 2, -# ] -# @example EnforcedStyleForMultiline: diff_comma -# # bad -# a = [1, 2,] -# -# # good -# a = [1, 2] -# -# # good -# a = [ -# 1, 2, -# 3, -# ] -# -# # good -# a = [ -# 1, 2, 3, -# ] -# -# # good -# a = [ -# 1, -# 2, -# ] -# -# # bad -# a = [1, 2, -# 3, 4,] -# -# # good -# a = [1, 2, -# 3, 4] -# @example EnforcedStyleForMultiline: no_comma (default) -# # bad -# a = [1, 2,] -# -# # good -# a = [ -# 1, -# 2 -# ] -# -# source://rubocop//lib/rubocop/cop/style/trailing_comma_in_array_literal.rb#125 -class RuboCop::Cop::Style::TrailingCommaInArrayLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::TrailingComma - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_array_literal.rb#129 - def on_array(node); end -end - -# Checks whether trailing commas in block arguments are -# required. Blocks with only one argument and a trailing comma require -# that comma to be present. Blocks with more than one argument never -# require a trailing comma. -# -# @example -# # bad -# add { |foo, bar,| foo + bar } -# -# # good -# add { |foo, bar| foo + bar } -# -# # good -# add { |foo,| foo } -# -# # good -# add { foo } -# -# # bad -# add do |foo, bar,| -# foo + bar -# end -# -# # good -# add do |foo, bar| -# foo + bar -# end -# -# # good -# add do |foo,| -# foo -# end -# -# # good -# add do -# foo + bar -# end -# -# source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#62 -class RuboCop::Cop::Style::TrailingCommaInBlockArgs < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#67 - def on_block(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#83 - def arg_count(node); end - - # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#95 - def argument_tokens(node); end - - # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#91 - def last_comma(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#87 - def trailing_comma?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#79 - def useless_trailing_comma?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#65 -RuboCop::Cop::Style::TrailingCommaInBlockArgs::MSG = T.let(T.unsafe(nil), String) - -# Checks for trailing comma in hash literals. -# The configuration options are: -# -# * `consistent_comma`: Requires a comma after the last item of all non-empty, multiline hash -# literals. -# * `comma`: Requires a comma after the last item in a hash, but only when each item is on its -# own line. -# * `diff_comma`: Requires a comma after the last item in a hash, but only when that item is -# followed by an immediate newline. -# * `no_comma`: Does not require a comma after the last item in a hash -# -# @example EnforcedStyleForMultiline: consistent_comma -# -# # bad -# a = { foo: 1, bar: 2, } -# -# # good -# a = { foo: 1, bar: 2 } -# -# # good -# a = { -# foo: 1, bar: 2, -# qux: 3, -# } -# -# # good -# a = { -# foo: 1, bar: 2, qux: 3, -# } -# -# # good -# a = { -# foo: 1, -# bar: 2, -# } -# -# # bad -# a = { foo: 1, bar: 2, -# baz: 3, qux: 4 } -# -# # good -# a = { foo: 1, bar: 2, -# baz: 3, qux: 4, } -# @example EnforcedStyleForMultiline: comma -# -# # bad -# a = { foo: 1, bar: 2, } -# -# # good -# a = { foo: 1, bar: 2 } -# -# # bad -# a = { -# foo: 1, bar: 2, -# qux: 3, -# } -# -# # good -# a = { -# foo: 1, bar: 2, -# qux: 3 -# } -# -# # bad -# a = { -# foo: 1, bar: 2, qux: 3, -# } -# -# # good -# a = { -# foo: 1, bar: 2, qux: 3 -# } -# -# # good -# a = { -# foo: 1, -# bar: 2, -# } -# @example EnforcedStyleForMultiline: diff_comma -# -# # bad -# a = { foo: 1, bar: 2, } -# -# # good -# a = { foo: 1, bar: 2 } -# -# # good -# a = { -# foo: 1, bar: 2, -# qux: 3, -# } -# -# # good -# a = { -# foo: 1, bar: 2, qux: 3, -# } -# -# # good -# a = { -# foo: 1, -# bar: 2, -# } -# -# # bad -# a = { foo: 1, bar: 2, -# baz: 3, qux: 4, } -# -# # good -# a = { foo: 1, bar: 2, -# baz: 3, qux: 4 } -# @example EnforcedStyleForMultiline: no_comma (default) -# -# # bad -# a = { foo: 1, bar: 2, } -# -# # good -# a = { -# foo: 1, -# bar: 2 -# } -# -# source://rubocop//lib/rubocop/cop/style/trailing_comma_in_hash_literal.rb#129 -class RuboCop::Cop::Style::TrailingCommaInHashLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::TrailingComma - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_hash_literal.rb#133 - def on_hash(node); end -end - -# Checks for trailing code after the method definition. -# -# @example -# # bad -# def some_method -# do_stuff; end -# -# def do_this(x) -# baz.map { |b| b.this(x) } end -# -# def foo -# block do -# bar -# end end -# -# # good -# def some_method -# do_stuff -# end -# -# def do_this(x) -# baz.map { |b| b.this(x) } -# end -# -# def foo -# block do -# bar -# end -# end -# -# source://rubocop//lib/rubocop/cop/style/trailing_method_end_statement.rb#36 -class RuboCop::Cop::Style::TrailingMethodEndStatement < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/trailing_method_end_statement.rb#41 - def on_def(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trailing_method_end_statement.rb#55 - def body_and_end_on_same_line?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trailing_method_end_statement.rb#51 - def trailing_end?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/trailing_method_end_statement.rb#39 -RuboCop::Cop::Style::TrailingMethodEndStatement::MSG = T.let(T.unsafe(nil), String) - -# Checks for extra underscores in variable assignment. -# -# @example -# # bad -# a, b, _ = foo() -# a, b, _, = foo() -# a, _, _ = foo() -# a, _, _, = foo() -# -# # good -# a, b, = foo() -# a, = foo() -# *a, b, _ = foo() -# # => We need to know to not include 2 variables in a -# a, *b, _ = foo() -# # => The correction `a, *b, = foo()` is a syntax error -# @example AllowNamedUnderscoreVariables: true (default) -# # good -# a, b, _something = foo() -# @example AllowNamedUnderscoreVariables: false -# # bad -# a, b, _something = foo() -# -# source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#31 -class RuboCop::Cop::Style::TrailingUnderscoreVariable < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#41 - def on_masgn(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#92 - def allow_named_underscore_variables; end - - # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#125 - def children_offenses(variables); end - - # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#57 - def find_first_offense(variables); end - - # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#66 - def find_first_possible_offense(variables); end - - # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#108 - def main_node_offense(node); end - - # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#146 - def range_for_parentheses(offense, left); end - - # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#88 - def reverse_index(collection, item); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#80 - def splat_variable_before?(first_offense, variables); end - - # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#96 - def unneeded_ranges(node); end - - # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#133 - def unused_range(node_type, mlhs_node, right); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#129 - def unused_variables_only?(offense, variables); end -end - -# source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#38 -RuboCop::Cop::Style::TrailingUnderscoreVariable::DISALLOW = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#36 -RuboCop::Cop::Style::TrailingUnderscoreVariable::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#37 -RuboCop::Cop::Style::TrailingUnderscoreVariable::UNDERSCORE = T.let(T.unsafe(nil), String) - -# Looks for trivial reader/writer methods, that could -# have been created with the attr_* family of functions automatically. -# `to_ary`, `to_a`, `to_c`, `to_enum`, `to_h`, `to_hash`, `to_i`, `to_int`, `to_io`, -# `to_open`, `to_path`, `to_proc`, `to_r`, `to_regexp`, `to_str`, `to_s`, and `to_sym` methods -# are allowed by default. These are customizable with `AllowedMethods` option. -# -# @example AllowedMethods: ['allowed_method'] -# # good -# def allowed_method -# @foo -# end -# @example ExactNameMatch: true (default) -# # good -# def name -# @other_name -# end -# @example ExactNameMatch: false -# # bad -# def name -# @other_name -# end -# @example AllowPredicates: true (default) -# # good -# def foo? -# @foo -# end -# @example AllowPredicates: false -# # bad -# def foo? -# @foo -# end -# -# # good -# attr_reader :foo -# @example AllowDSLWriters: true (default) -# # good -# def on_exception(action) -# @on_exception=action -# end -# @example AllowDSLWriters: false -# # bad -# def on_exception(action) -# @on_exception=action -# end -# -# # good -# attr_writer :on_exception -# @example IgnoreClassMethods: false (default) -# # bad -# def self.foo -# @foo -# end -# -# # good -# class << self -# attr_reader :foo -# end -# @example IgnoreClassMethods: true -# # good -# def self.foo -# @foo -# end -# @example -# # bad -# def foo -# @foo -# end -# -# def bar=(val) -# @bar = val -# end -# -# def self.baz -# @baz -# end -# -# # good -# attr_reader :foo -# attr_writer :bar -# -# class << self -# attr_reader :baz -# end -# -# source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#98 -class RuboCop::Cop::Style::TrivialAccessors < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#190 - def looks_like_trivial_writer?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#104 - def on_def(node); end - - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#104 - def on_defs(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#222 - def accessor(kind, method_name); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#161 - def allow_dsl_writers?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#157 - def allow_predicates?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#195 - def allowed_method_name?(node); end - - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#169 - def allowed_method_names; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#204 - def allowed_reader?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#200 - def allowed_writer?(node); end - - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#142 - def autocorrect(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#234 - def autocorrect_class(corrector, node); end - - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#226 - def autocorrect_instance(corrector, node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#173 - def dsl_writer?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#153 - def exact_name_match?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#165 - def ignore_class_methods?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#115 - def in_module_or_instance_eval?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#181 - def looks_like_trivial_reader?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#208 - def names_match?(node); end - - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#129 - def on_method_def(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#248 - def top_level_node?(node); end - - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#214 - def trivial_accessor_kind(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#177 - def trivial_reader?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#185 - def trivial_writer?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#102 -RuboCop::Cop::Style::TrivialAccessors::MSG = T.let(T.unsafe(nil), String) - -# Looks for `unless` expressions with `else` clauses. -# -# @example -# # bad -# unless foo_bar.nil? -# # do something... -# else -# # do a different thing... -# end -# -# # good -# if foo_bar.present? -# # do something... -# else -# # do a different thing... -# end -# -# source://rubocop//lib/rubocop/cop/style/unless_else.rb#22 -class RuboCop::Cop::Style::UnlessElse < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/unless_else.rb#28 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/style/unless_else.rb#45 - def range_between_condition_and_else(node, condition); end - - # source://rubocop//lib/rubocop/cop/style/unless_else.rb#49 - def range_between_else_and_end(node); end -end - -# source://rubocop//lib/rubocop/cop/style/unless_else.rb#26 -RuboCop::Cop::Style::UnlessElse::MSG = T.let(T.unsafe(nil), String) - -# Checks for the use of logical operators in an `unless` condition. -# It discourages such code, as the condition becomes more difficult -# to read and understand. -# -# This cop supports two styles: -# -# - `forbid_mixed_logical_operators` (default) -# - `forbid_logical_operators` -# -# `forbid_mixed_logical_operators` style forbids the use of more than one type -# of logical operators. This makes the `unless` condition easier to read -# because either all conditions need to be met or any condition need to be met -# in order for the expression to be truthy or falsey. -# -# `forbid_logical_operators` style forbids any use of logical operator. -# This makes it even more easy to read the `unless` condition as -# there is only one condition in the expression. -# -# @example EnforcedStyle: forbid_mixed_logical_operators (default) -# # bad -# return unless a || b && c -# return unless a && b || c -# return unless a && b and c -# return unless a || b or c -# return unless a && b or c -# return unless a || b and c -# -# # good -# return unless a && b && c -# return unless a || b || c -# return unless a and b and c -# return unless a or b or c -# return unless a? -# @example EnforcedStyle: forbid_logical_operators -# # bad -# return unless a || b -# return unless a && b -# return unless a or b -# return unless a and b -# -# # good -# return unless a -# return unless a? -# -# source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#50 -class RuboCop::Cop::Style::UnlessLogicalOperators < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#62 - def and_with_or?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#67 - def logical_operator?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#71 - def on_if(node); end - - # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#57 - def or_with_and?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#83 - def mixed_logical_operator?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#90 - def mixed_precedence_and?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#97 - def mixed_precedence_or?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#54 -RuboCop::Cop::Style::UnlessLogicalOperators::FORBID_LOGICAL_OPERATORS = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#53 -RuboCop::Cop::Style::UnlessLogicalOperators::FORBID_MIXED_LOGICAL_OPERATORS = T.let(T.unsafe(nil), String) - -# Checks for accessing the first element of `String#unpack` -# which can be replaced with the shorter method `unpack1`. -# -# @example -# -# # bad -# 'foo'.unpack('h*').first -# 'foo'.unpack('h*')[0] -# 'foo'.unpack('h*').slice(0) -# 'foo'.unpack('h*').at(0) -# -# # good -# 'foo'.unpack1('h*') -# -# source://rubocop//lib/rubocop/cop/style/unpack_first.rb#20 -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#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#30 - def unpack_and_first_element?(param0 = T.unsafe(nil)); end - - private - - # 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#27 -RuboCop::Cop::Style::UnpackFirst::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for variable interpolation (like "#@ivar"). -# -# @example -# # bad -# "His name is #$name" -# /check #$pattern/ -# "Let's go to the #@store" -# -# # good -# "His name is #{$name}" -# /check #{$pattern}/ -# "Let's go to the #{@store}" -# -# source://rubocop//lib/rubocop/cop/style/variable_interpolation.rb#18 -class RuboCop::Cop::Style::VariableInterpolation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Interpolation - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/variable_interpolation.rb#24 - def on_node_with_interpolations(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/variable_interpolation.rb#34 - def message(range); end - - # source://rubocop//lib/rubocop/cop/style/variable_interpolation.rb#38 - def var_nodes(nodes); end -end - -# source://rubocop//lib/rubocop/cop/style/variable_interpolation.rb#22 -RuboCop::Cop::Style::VariableInterpolation::MSG = T.let(T.unsafe(nil), String) - -# Checks for `when;` uses in `case` expressions. -# -# @example -# # bad -# case foo -# when 1; 'baz' -# when 2; 'bar' -# end -# -# # good -# case foo -# when 1 then 'baz' -# when 2 then 'bar' -# end -# -# source://rubocop//lib/rubocop/cop/style/when_then.rb#20 -class RuboCop::Cop::Style::WhenThen < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/when_then.rb#25 - def on_when(node); end -end - -# source://rubocop//lib/rubocop/cop/style/when_then.rb#23 -RuboCop::Cop::Style::WhenThen::MSG = T.let(T.unsafe(nil), String) - -# Checks for uses of `do` in multi-line `while/until` statements. -# -# @example -# -# # bad -# while x.any? do -# do_something(x.pop) -# end -# -# # good -# while x.any? -# do_something(x.pop) -# end -# -# # bad -# until x.empty? do -# do_something(x.pop) -# end -# -# # good -# until x.empty? -# do_something(x.pop) -# end -# -# source://rubocop//lib/rubocop/cop/style/while_until_do.rb#29 -class RuboCop::Cop::Style::WhileUntilDo < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/while_until_do.rb#34 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/style/while_until_do.rb#34 - def on_while(node); end -end - -# source://rubocop//lib/rubocop/cop/style/while_until_do.rb#32 -RuboCop::Cop::Style::WhileUntilDo::MSG = T.let(T.unsafe(nil), String) - -# Checks for while and until statements that would fit on one line -# if written as a modifier while/until. The maximum line length is -# configured in the `Layout/LineLength` cop. -# -# @example -# # bad -# while x < 10 -# x += 1 -# end -# -# # good -# x += 1 while x < 10 -# -# # bad -# until x > 10 -# x += 1 -# end -# -# # good -# x += 1 until x > 10 -# -# # bad -# x += 100 while x < 500 # a long comment that makes code too long if it were a single line -# -# # good -# while x < 500 # a long comment that makes code too long if it were a single line -# x += 100 -# end -# -# source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#34 -class RuboCop::Cop::Style::WhileUntilModifier < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::StatementModifier - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#40 - def on_until(node); end - - # source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#40 - def on_while(node); end -end - -# source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#38 -RuboCop::Cop::Style::WhileUntilModifier::MSG = T.let(T.unsafe(nil), String) - -# Checks for array literals made up of word-like -# strings, that are not using the %w() syntax. -# -# Alternatively, it can check for uses of the %w() syntax, in projects -# which do not want to include that syntax. -# -# NOTE: When using the `percent` style, %w() arrays containing a space -# will be registered as offenses. -# -# Configuration option: MinSize -# If set, arrays with fewer elements than this value will not trigger the -# cop. For example, a `MinSize` of `3` will not enforce a style on an -# array of 2 or fewer elements. -# -# @example EnforcedStyle: percent (default) -# # good -# %w[foo bar baz] -# -# # bad -# ['foo', 'bar', 'baz'] -# -# # bad (contains spaces) -# %w[foo\ bar baz\ quux] -# -# # bad -# [ -# ['one', 'One'], -# ['two', 'Two'] -# ] -# -# # good -# [ -# %w[one One], -# %w[two Two] -# ] -# -# # good (2d array containing spaces) -# [ -# ['one', 'One'], -# ['two', 'Two'], -# ['forty two', 'Forty Two'] -# ] -# @example EnforcedStyle: brackets -# # good -# ['foo', 'bar', 'baz'] -# -# # bad -# %w[foo bar baz] -# -# # good (contains spaces) -# ['foo bar', 'baz quux'] -# -# # good -# [ -# ['one', 'One'], -# ['two', 'Two'] -# ] -# -# # bad -# [ -# %w[one One], -# %w[two Two] -# ] -# -# source://rubocop//lib/rubocop/cop/style/word_array.rb#71 -class RuboCop::Cop::Style::WordArray < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ArrayMinSize - include ::RuboCop::Cop::ArraySyntax - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::PercentArray - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/word_array.rb#94 - def on_array(node); end - - # source://rubocop//lib/rubocop/cop/style/word_array.rb#85 - def on_new_investigation; end - - private - - # source://rubocop//lib/rubocop/cop/style/word_array.rb#138 - def build_bracketed_array(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/word_array.rb#118 - def complex_content?(strings, complex_regex: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/word_array.rb#129 - def invalid_percent_array_contents?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/word_array.rb#113 - def matrix_of_complex_content?(array); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/word_array.rb#107 - def within_matrix_of_complex_content?(node); end - - # source://rubocop//lib/rubocop/cop/style/word_array.rb#134 - def word_regex; end - - class << self - # Returns the value of attribute largest_brackets. - # - # source://rubocop//lib/rubocop/cop/style/word_array.rb#82 - 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/word_array.rb#82 - def largest_brackets=(_arg0); end - end -end - -# source://rubocop//lib/rubocop/cop/style/word_array.rb#79 -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` -# -# @example EnforcedStyle: forbid_for_all_comparison_operators (default) -# # bad -# 99 == foo -# "bar" != foo -# 42 >= foo -# 10 < bar -# 99 == CONST -# -# # good -# foo == 99 -# foo == "bar" -# foo <= 42 -# bar > 10 -# CONST == 99 -# "#{interpolation}" == foo -# /#{interpolation}/ == foo -# @example EnforcedStyle: forbid_for_equality_operators_only -# # bad -# 99 == foo -# "bar" != foo -# -# # good -# 99 >= foo -# 3 < a && a < 5 -# @example EnforcedStyle: require_for_all_comparison_operators -# # bad -# foo == 99 -# foo == "bar" -# foo <= 42 -# bar > 10 -# -# # good -# 99 == foo -# "bar" != foo -# 42 >= foo -# 10 < bar -# @example EnforcedStyle: require_for_equality_operators_only -# # bad -# 99 >= foo -# 3 < a && a < 5 -# -# # good -# 99 == foo -# "bar" != foo -# -# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#77 -class RuboCop::Cop::Style::YodaCondition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#96 - def file_constant_equal_program_name?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#100 - def on_send(node); end - - private - - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#153 - def actual_code_range(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#149 - def constant_portion?(node); end - - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#142 - def corrected_code(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#113 - def enforce_yoda?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#117 - def equality_only?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#177 - def interpolation?(node); end - - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#138 - def message(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#161 - def non_equality_operator?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#165 - def noncommutative_operator?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#173 - def program_name?(name); end - - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#157 - def reverse_comparison(operator); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#169 - def source_file_path_constant?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#126 - def valid_yoda?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#121 - def yoda_compatible_condition?(node); end -end - -# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#88 -RuboCop::Cop::Style::YodaCondition::ENFORCE_YODA_STYLES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#91 -RuboCop::Cop::Style::YodaCondition::EQUALITY_ONLY_STYLES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#84 -RuboCop::Cop::Style::YodaCondition::EQUALITY_OPERATORS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#82 -RuboCop::Cop::Style::YodaCondition::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#85 -RuboCop::Cop::Style::YodaCondition::NONCOMMUTATIVE_OPERATORS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#86 -RuboCop::Cop::Style::YodaCondition::PROGRAM_NAMES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#87 -RuboCop::Cop::Style::YodaCondition::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) - -# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#83 -RuboCop::Cop::Style::YodaCondition::REVERSE_COMPARISON = T.let(T.unsafe(nil), Hash) - -# Forbids Yoda expressions, i.e. binary operations (using `*`, `+`, `&`, `|`, -# and `^` operators) where the order of expression is reversed, eg. `1 + x`. -# This cop complements `Style/YodaCondition` cop, which has a similar purpose. -# -# This cop is disabled by default to respect user intentions such as: -# -# [source,ruby] -# ---- -# config.server_port = 9000 + ENV["TEST_ENV_NUMBER"].to_i -# ---- -# -# @example SupportedOperators: ['*', '+', '&', '|', '^'] (default) -# # bad -# 10 * y -# 1 + x -# 1 & z -# 1 | x -# 1 ^ x -# 1 + CONST -# -# # good -# y * 10 -# x + 1 -# z & 1 -# x | 1 -# x ^ 1 -# CONST + 1 -# 60 * 24 -# -# 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#47 - def on_new_investigation; end - - # 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#74 - def constant_portion?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#82 - def offended_ancestor?(node); end - - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#86 - def offended_nodes; end - - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#78 - def supported_operators; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#70 - def yoda_expression_constant?(lhs, rhs); end -end - -# 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#45 -RuboCop::Cop::Style::YodaExpression::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for numeric comparisons that can be replaced -# by a predicate method, such as `receiver.length == 0`, -# `receiver.length > 0`, and `receiver.length != 0`, -# `receiver.length < 1` and `receiver.size == 0` that can be -# replaced by `receiver.empty?` and `!receiver.empty?`. -# -# NOTE: `File`, `Tempfile`, and `StringIO` do not have `empty?` -# so allow `size == 0` and `size.zero?`. -# -# @example -# # bad -# [1, 2, 3].length == 0 -# 0 == "foobar".length -# array.length < 1 -# {a: 1, b: 2}.length != 0 -# string.length > 0 -# hash.size > 0 -# -# # good -# [1, 2, 3].empty? -# "foobar".empty? -# array.empty? -# !{a: 1, b: 2}.empty? -# !string.empty? -# !hash.empty? -# -# source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#37 -class RuboCop::Cop::Style::ZeroLengthPredicate < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # Some collection like objects in the Ruby standard library - # implement `#size`, but not `#empty`. We ignore those to - # reduce false positives. - # - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#147 - def non_polymorphic_collection?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#114 - def nonzero_length_comparison(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#51 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#45 - def on_send(node); end - - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#138 - def other_length_node(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#106 - def zero_length_comparison(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#130 - def zero_length_node(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#101 - def zero_length_predicate?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#85 - def check_nonzero_length_comparison(node); end - - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#70 - def check_zero_length_comparison(node); end - - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#58 - def check_zero_length_predicate(node); end - - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#119 - def replacement(node); end -end - -# source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#41 -RuboCop::Cop::Style::ZeroLengthPredicate::NONZERO_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#43 -RuboCop::Cop::Style::ZeroLengthPredicate::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#40 -RuboCop::Cop::Style::ZeroLengthPredicate::ZERO_MSG = T.let(T.unsafe(nil), String) - -# Common functionality for checking and correcting surrounding whitespace. -# -# source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#6 -module RuboCop::Cop::SurroundingSpace - include ::RuboCop::Cop::RangeHelp - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#110 - def empty_brackets?(left_bracket_token, right_bracket_token, tokens: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#104 - def empty_offense(node, range, message, command); end - - # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#94 - def empty_offenses(node, left, right, message); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#68 - def extra_space?(token, side); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#129 - def no_character_between?(left_bracket_token, right_bracket_token); end - - # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#38 - def no_space_offenses(node, left_token, right_token, message, start_ok: T.unsafe(nil), end_ok: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#120 - def offending_empty_no_space?(config, left_token, right_token); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#116 - def offending_empty_space?(config, left_token, right_token); end - - # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#33 - def on_new_investigation; end - - # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#78 - def reposition(src, pos, step, include_newlines: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#16 - def side_space_range(range:, side:, include_newlines: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#124 - def space_between?(left_bracket_token, right_bracket_token); end - - # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#85 - def space_offense(node, token, side, message, command); end - - # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#53 - def space_offenses(node, left_token, right_token, message, start_ok: T.unsafe(nil), end_ok: T.unsafe(nil)); end -end - -# source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#9 -RuboCop::Cop::SurroundingSpace::NO_SPACE_COMMAND = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#12 -RuboCop::Cop::SurroundingSpace::SINGLE_SPACE_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#10 -RuboCop::Cop::SurroundingSpace::SPACE_COMMAND = T.let(T.unsafe(nil), String) - -# Classes that include this module just implement functions for working -# with symbol nodes. -# -# source://rubocop//lib/rubocop/cop/mixin/symbol_help.rb#7 -module RuboCop::Cop::SymbolHelp - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/symbol_help.rb#8 - def hash_key?(node); end -end - -# Common functionality for checking target ruby version. -# -# source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#6 -module RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#19 - def maximum_target_ruby_version(version); end - - # source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#15 - def minimum_target_ruby_version(version); end - - # source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#11 - def required_maximum_ruby_version; end - - # source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#7 - def required_minimum_ruby_version; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#23 - def support_target_ruby_version?(version); end -end - -# A group of cops, ready to be called on duty to inspect files. -# Team is responsible for selecting only relevant cops to be sent on duty, -# as well as insuring that the needed forces are sent along with them. -# -# For performance reasons, Team will first dispatch cops & forces in two groups, -# first the ones needed for autocorrection (if any), then the rest -# (unless autocorrections happened). -# -# source://rubocop//lib/rubocop/cop/team.rb#13 -class RuboCop::Cop::Team - # @return [Team] a new instance of Team - # - # source://rubocop//lib/rubocop/cop/team.rb#61 - def initialize(cops, config = T.unsafe(nil), options = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/team.rb#72 - def autocorrect?; end - - # Returns the value of attribute cops. - # - # source://rubocop//lib/rubocop/cop/team.rb#57 - def cops; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/team.rb#76 - def debug?; end - - # Returns the value of attribute errors. - # - # source://rubocop//lib/rubocop/cop/team.rb#57 - def errors; end - - # source://rubocop//lib/rubocop/cop/team.rb#128 - def external_dependency_checksum; end - - # @deprecated - # - # source://rubocop//lib/rubocop/cop/team.rb#120 - def forces; end - - # source://rubocop//lib/rubocop/cop/team.rb#82 - def inspect_file(processed_source); end - - # @return [Commissioner::InvestigationReport] - # - # source://rubocop//lib/rubocop/cop/team.rb#91 - def investigate(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end - - # Returns the value of attribute updated_source_file. - # - # source://rubocop//lib/rubocop/cop/team.rb#57 - def updated_source_file; end - - # Returns the value of attribute updated_source_file. - # - # source://rubocop//lib/rubocop/cop/team.rb#57 - def updated_source_file?; end - - # Returns the value of attribute warnings. - # - # source://rubocop//lib/rubocop/cop/team.rb#57 - def warnings; end - - private - - # source://rubocop//lib/rubocop/cop/team.rb#139 - def autocorrect(processed_source, report, original:, offset:); end - - # source://rubocop//lib/rubocop/cop/team.rb#203 - def autocorrect_report(report, offset:, original:); end - - # source://rubocop//lib/rubocop/cop/team.rb#158 - def be_ready; end - - # source://rubocop//lib/rubocop/cop/team.rb#209 - def collate_corrections(report, offset:, original:); end - - # source://rubocop//lib/rubocop/cop/team.rb#225 - def each_corrector(report); end - - # source://rubocop//lib/rubocop/cop/team.rb#277 - def handle_error(error, location, cop); end - - # source://rubocop//lib/rubocop/cop/team.rb#269 - def handle_warning(error, location); end - - # @return [Commissioner::InvestigationReport] - # - # source://rubocop//lib/rubocop/cop/team.rb#172 - def investigate_partial(cops, processed_source, offset:, original:); end - - # source://rubocop//lib/rubocop/cop/team.rb#252 - def process_errors(file, errors); end - - # source://rubocop//lib/rubocop/cop/team.rb#166 - def reset; end - - # @return [Array] - # - # source://rubocop//lib/rubocop/cop/team.rb#178 - def roundup_relevant_cops(processed_source); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/team.rb#194 - def support_target_rails_version?(cop); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/team.rb#188 - def support_target_ruby_version?(cop); end - - # source://rubocop//lib/rubocop/cop/team.rb#240 - def suppress_clobbering; end - - # source://rubocop//lib/rubocop/cop/team.rb#246 - def validate_config; end - - class << self - # @return [Array] needed for the given cops - # - # source://rubocop//lib/rubocop/cop/team.rb#43 - def forces_for(cops); end - - # @return [Team] with cops assembled from the given `cop_classes` - # - # source://rubocop//lib/rubocop/cop/team.rb#28 - def mobilize(cop_classes, config, options = T.unsafe(nil)); end - - # @return [Array] - # - # source://rubocop//lib/rubocop/cop/team.rb#34 - def mobilize_cops(cop_classes, config, options = T.unsafe(nil)); end - - # @return [Team] - # - # source://rubocop//lib/rubocop/cop/team.rb#15 - def new(cop_or_classes, config, options = T.unsafe(nil)); end - end -end - -# Common methods shared by TrailingBody cops -# -# source://rubocop//lib/rubocop/cop/mixin/trailing_body.rb#6 -module RuboCop::Cop::TrailingBody - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/trailing_body.rb#12 - def body_on_first_line?(node, body); end - - # source://rubocop//lib/rubocop/cop/mixin/trailing_body.rb#16 - def first_part_of(body); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/trailing_body.rb#7 - def trailing_body?(node); end -end - -# Common methods shared by Style/TrailingCommaInArguments, -# Style/TrailingCommaInArrayLiteral and Style/TrailingCommaInHashLiteral -# -# source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#8 -module RuboCop::Cop::TrailingComma - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - - private - - # A single argument with the closing bracket on the same line as the end - # of the argument is not considered multiline, even if the argument - # itself might span multiple lines. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#109 - def allowed_multiline_argument?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#178 - def any_heredoc?(items); end - - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#170 - def autocorrect_range(item); end - - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#144 - def avoid_comma(kind, comma_begin_pos, extra_info); end - - # Returns true if the node has round/square/curly brackets. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#87 - def brackets?(node); end - - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#20 - def check(node, items, kind, begin_pos, end_pos); end - - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#38 - def check_comma(node, kind, comma_pos); end - - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#44 - def check_literal(node, kind); end - - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#31 - def comma_offset(items, range); end - - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#113 - def elements(node); end - - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#55 - def extra_avoid_comma_info; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#182 - def heredoc?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#200 - def heredoc_send?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#81 - def inside_comment?(range, comma_offset); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#138 - def last_item_precedes_newline?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#98 - def method_name_and_arguments_on_same_line?(node); end - - # Returns true if the round/square/curly brackets of the given node are - # on different lines, each item within is on its own line, and the - # closing bracket is on its own line. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#94 - def multiline?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#128 - def no_elements_on_same_line?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#134 - def on_same_line?(range1, range2); end - - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#158 - def put_comma(items, kind); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#68 - def should_have_comma?(style, node); end - - # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#16 - def style_parameter_name; end -end - -# source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#12 -RuboCop::Cop::TrailingComma::MSG = T.let(T.unsafe(nil), String) - -# Common functionality shared by Uncommunicative cops -# -# source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#6 -module RuboCop::Cop::UncommunicativeName - # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#12 - def check(node, args); end - - private - - # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#95 - def allow_nums; end - - # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#87 - def allowed_names; end - - # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#78 - def arg_range(arg, length); end - - # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#45 - def case_offense(node, range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#64 - def ends_with_num?(name); end - - # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#91 - def forbidden_names; end - - # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#83 - def forbidden_offense(node, range, name); end - - # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#36 - def issue_offenses(node, range, name); end - - # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#68 - def length_offense(node, range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#74 - def long_enough?(name); end - - # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#99 - def min_length; end - - # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#53 - def name_type(node); end - - # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#60 - def num_offense(node, range); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#49 - def uppercase?(name); end -end - -# source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#7 -RuboCop::Cop::UncommunicativeName::CASE_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#10 -RuboCop::Cop::UncommunicativeName::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#9 -RuboCop::Cop::UncommunicativeName::LENGTH_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#8 -RuboCop::Cop::UncommunicativeName::NUM_MSG = T.let(T.unsafe(nil), String) - -# This autocorrects unused arguments. -# -# source://rubocop//lib/rubocop/cop/correctors/unused_arg_corrector.rb#6 -class RuboCop::Cop::UnusedArgCorrector - extend ::RuboCop::Cop::RangeHelp - - class << self - # source://rubocop//lib/rubocop/cop/correctors/unused_arg_corrector.rb#12 - def correct(corrector, processed_source, node); end - - # source://rubocop//lib/rubocop/cop/correctors/unused_arg_corrector.rb#31 - def correct_for_blockarg_type(corrector, node); end - - # Returns the value of attribute processed_source. - # - # source://rubocop//lib/rubocop/cop/correctors/unused_arg_corrector.rb#10 - def processed_source; end - end -end - -# This module contains a collection of useful utility methods. -# -# source://rubocop//lib/rubocop/cop/util.rb#7 -module RuboCop::Cop::Util - include ::RuboCop::PathUtil - - private - - # source://rubocop//lib/rubocop/cop/util.rb#39 - def add_parentheses(node, corrector); end - - # source://rubocop//lib/rubocop/cop/util.rb#60 - def any_descendant?(node, *types); end - - # source://rubocop//lib/rubocop/cop/util.rb#75 - def args_begin(node); end - - # source://rubocop//lib/rubocop/cop/util.rb#87 - def args_end(node); end - - # source://rubocop//lib/rubocop/cop/util.rb#108 - def begins_its_line?(range); end - - # This is a bad API - # - # source://rubocop//lib/rubocop/cop/util.rb#17 - def comment_line?(line_source); end - - # @deprecated Use `ProcessedSource#line_with_comment?`, `contains_comment?` or similar - # - # source://rubocop//lib/rubocop/cop/util.rb#22 - def comment_lines?(node); end - - # source://rubocop//lib/rubocop/cop/util.rb#206 - def compatible_external_encoding_for?(src); end - - # If converting a string to Ruby string literal source code, must - # double quotes be used? - # - # source://rubocop//lib/rubocop/cop/util.rb#134 - def double_quotes_required?(string); end - - # source://rubocop//lib/rubocop/cop/util.rb#148 - def escape_string(string); end - - # Returns, for example, a bare `if` node if the given node is an `if` - # with calls chained to the end of it. - # - # source://rubocop//lib/rubocop/cop/util.rb#118 - def first_part_of_call_chain(node); end - - # source://rubocop//lib/rubocop/cop/util.rb#210 - def include_or_equal?(source, target); end - - # source://rubocop//lib/rubocop/cop/util.rb#185 - def indent(node, offset: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/util.rb#165 - def interpret_string_escapes(string); end - - # source://rubocop//lib/rubocop/cop/util.rb#169 - def line(node_or_range); end - - # source://rubocop//lib/rubocop/cop/util.rb#30 - def line_range(node); end - - # source://rubocop//lib/rubocop/cop/util.rb#144 - def needs_escaping?(string); end - - # source://rubocop//lib/rubocop/cop/util.rb#91 - def on_node(syms, sexp, excludes = T.unsafe(nil), &block); end - - # source://rubocop//lib/rubocop/cop/util.rb#34 - def parentheses?(node); end - - # source://rubocop//lib/rubocop/cop/util.rb#196 - def parse_regexp(text); end - - # source://rubocop//lib/rubocop/cop/util.rb#177 - def same_line?(node1, node2); end - - # source://rubocop//lib/rubocop/cop/util.rb#152 - def to_string_literal(string); end - - # source://rubocop//lib/rubocop/cop/util.rb#191 - def to_supported_styles(enforced_style); end - - # source://rubocop//lib/rubocop/cop/util.rb#161 - def trim_string_interpolation_escape_character(str); end - - class << self - # source://rubocop//lib/rubocop/cop/util.rb#39 - def add_parentheses(node, corrector); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/util.rb#60 - def any_descendant?(node, *types); end - - # source://rubocop//lib/rubocop/cop/util.rb#75 - def args_begin(node); end - - # source://rubocop//lib/rubocop/cop/util.rb#87 - def args_end(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/util.rb#108 - def begins_its_line?(range); end - - # This is a bad API - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/util.rb#17 - def comment_line?(line_source); end - - # @deprecated Use `ProcessedSource#line_with_comment?`, `contains_comment?` or similar - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/util.rb#22 - def comment_lines?(node); end - - # If converting a string to Ruby string literal source code, must - # double quotes be used? - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/util.rb#134 - def double_quotes_required?(string); end - - # source://rubocop//lib/rubocop/cop/util.rb#148 - def escape_string(string); end - - # Returns, for example, a bare `if` node if the given node is an `if` - # with calls chained to the end of it. - # - # source://rubocop//lib/rubocop/cop/util.rb#118 - def first_part_of_call_chain(node); end - - # source://rubocop//lib/rubocop/cop/util.rb#185 - def indent(node, offset: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/util.rb#165 - def interpret_string_escapes(string); end - - # source://rubocop//lib/rubocop/cop/util.rb#169 - def line(node_or_range); end - - # source://rubocop//lib/rubocop/cop/util.rb#30 - def line_range(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/util.rb#144 - def needs_escaping?(string); end - - # @yield [sexp] - # - # source://rubocop//lib/rubocop/cop/util.rb#91 - def on_node(syms, sexp, excludes = T.unsafe(nil), &block); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/util.rb#34 - def parentheses?(node); end - - # source://rubocop//lib/rubocop/cop/util.rb#196 - def parse_regexp(text); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/util.rb#177 - def same_line?(node1, node2); end - - # source://rubocop//lib/rubocop/cop/util.rb#152 - def to_string_literal(string); end - - # source://rubocop//lib/rubocop/cop/util.rb#191 - def to_supported_styles(enforced_style); end - - # source://rubocop//lib/rubocop/cop/util.rb#161 - def trim_string_interpolation_escape_character(str); end - end -end - -# source://rubocop//lib/rubocop/cop/util.rb#103 -RuboCop::Cop::Util::LINE_BEGINS_REGEX_CACHE = T.let(T.unsafe(nil), Hash) - -# Match literal regex characters, not including anchors, character -# classes, alternatives, groups, repetitions, references, etc -# -# source://rubocop//lib/rubocop/cop/util.rb#12 -RuboCop::Cop::Util::LITERAL_REGEX = T.let(T.unsafe(nil), Regexp) - -# Arbitrarily chosen value, should be enough to cover -# the most nested source code in real world projects. -# -# source://rubocop//lib/rubocop/cop/util.rb#102 -RuboCop::Cop::Util::MAX_LINE_BEGINS_REGEX_INDEX = T.let(T.unsafe(nil), Integer) - -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#5 -module RuboCop::Cop::Utils; end - -# Parses {Kernel#sprintf} format strings. -# -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#7 -class RuboCop::Cop::Utils::FormatString - # @return [FormatString] a new instance of FormatString - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#94 - def initialize(string); end - - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#98 - def format_sequences; end - - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#110 - def max_digit_dollar_num; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#106 - def named_interpolation?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#102 - def valid?; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#122 - def mixed_formats?; end - - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#116 - def parse; end -end - -# Escaping the `#` in `INTERPOLATION` and `TEMPLATE_NAME` is necessary to -# avoid a bug in Ruby 3.2.0 -# See: https://bugs.ruby-lang.org/issues/19379 -# -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#11 -RuboCop::Cop::Utils::FormatString::DIGIT_DOLLAR = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#13 -RuboCop::Cop::Utils::FormatString::FLAG = T.let(T.unsafe(nil), Regexp) - -# The syntax of a format sequence is as follows. -# -# ``` -# %[flags][width][.precision]type -# ``` -# -# A format sequence consists of a percent sign, followed by optional -# flags, width, and precision indicators, then terminated with a field -# type character. -# -# For more complex formatting, Ruby supports a reference by name. -# -# @see https://ruby-doc.org/core-2.6.3/Kernel.html#method-i-format -# -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#47 -class RuboCop::Cop::Utils::FormatString::FormatSequence - # @return [FormatSequence] a new instance of FormatSequence - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#50 - def initialize(match); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#66 - def annotated?; end - - # Returns the value of attribute arg_number. - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#48 - def arg_number; end - - # Number of arguments required for the format sequence - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#75 - def arity; end - - # Returns the value of attribute begin_pos. - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#48 - def begin_pos; end - - # Returns the value of attribute end_pos. - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#48 - def end_pos; end - - # Returns the value of attribute flags. - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#48 - def flags; end - - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#79 - def max_digit_dollar_num; end - - # Returns the value of attribute name. - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#48 - def name; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#62 - def percent?; end - - # Returns the value of attribute precision. - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#48 - def precision; end - - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#83 - def style; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#70 - def template?; end - - # Returns the value of attribute type. - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#48 - def type; end - - # Returns the value of attribute width. - # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#48 - def width; end -end - -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#12 -RuboCop::Cop::Utils::FormatString::INTERPOLATION = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#19 -RuboCop::Cop::Utils::FormatString::NAME = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#15 -RuboCop::Cop::Utils::FormatString::NUMBER = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#14 -RuboCop::Cop::Utils::FormatString::NUMBER_ARG = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#17 -RuboCop::Cop::Utils::FormatString::PRECISION = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#22 -RuboCop::Cop::Utils::FormatString::SEQUENCE = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#20 -RuboCop::Cop::Utils::FormatString::TEMPLATE_NAME = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#18 -RuboCop::Cop::Utils::FormatString::TYPE = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#16 -RuboCop::Cop::Utils::FormatString::WIDTH = T.let(T.unsafe(nil), Regexp) - -# 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. -# -# def before_entering_scope(scope, variable_table) -# end -# -# def after_entering_scope(scope, variable_table) -# end -# -# def before_leaving_scope(scope, variable_table) -# end -# -# def after_leaving_scope(scope, variable_table) -# end -# -# def before_declaring_variable(variable, variable_table) -# end -# -# def after_declaring_variable(variable, variable_table) -# end -# -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#27 -class RuboCop::Cop::VariableForce < ::RuboCop::Cop::Force - # Starting point. - # - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#79 - def investigate(processed_source); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#88 - def process_node(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#74 - def variable_table; end - - private - - # source://rubocop//lib/rubocop/cop/variable_force.rb#374 - def after_declaring_variable(arg); end - - # source://rubocop//lib/rubocop/cop/variable_force.rb#374 - def after_entering_scope(arg); end - - # source://rubocop//lib/rubocop/cop/variable_force.rb#374 - def after_leaving_scope(arg); end - - # source://rubocop//lib/rubocop/cop/variable_force.rb#374 - def before_declaring_variable(arg); end - - # source://rubocop//lib/rubocop/cop/variable_force.rb#374 - def before_entering_scope(arg); end - - # source://rubocop//lib/rubocop/cop/variable_force.rb#374 - def before_leaving_scope(arg); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#346 - def descendant_reference(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#336 - def each_descendant_reference(loop_node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#321 - 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#97 - def inspect_variables_in_scope(scope_node); end - - # Mark all assignments which are referenced in the same loop - # as referenced by ignoring AST order since they would be referenced - # in next iteration. - # - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#302 - def mark_assignments_as_referenced_in_loop(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#130 - def node_handler_method_name(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#103 - def process_children(origin_node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#238 - def process_loop(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#182 - def process_pattern_match_variable(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#164 - def process_regexp_named_captures(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#253 - def process_rescue(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#272 - def process_scope(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#291 - def process_send(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#146 - def process_variable_assignment(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#134 - def process_variable_declaration(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#226 - def process_variable_multiple_assignment(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#196 - def process_variable_operator_assignment(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#233 - def process_variable_referencing(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#264 - def process_zero_arity_super(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#190 - def regexp_captured_names(node); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#357 - def scanned_node?(node); end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#361 - def scanned_nodes; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#111 - def skip_children!; end - - # @api private - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#285 - def twisted_nodes(node); end -end - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#35 -RuboCop::Cop::VariableForce::ARGUMENT_DECLARATION_TYPES = T.let(T.unsafe(nil), Array) - -# This class represents each assignment of a variable. -# -# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#7 -class RuboCop::Cop::VariableForce::Assignment - include ::RuboCop::Cop::VariableForce::Branchable - - # @return [Assignment] a new instance of Assignment - # - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#17 - def initialize(node, variable); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#58 - def exception_assignment?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#80 - def for_assignment?; end - - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#91 - def meta_assignment_node; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#68 - def multiple_assignment?; end - - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#31 - def name; end - - # Returns the value of attribute node. - # - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12 - def node; end - - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#86 - def operator; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#62 - def operator_assignment?; end - - # Returns the value of attribute reassigned. - # - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12 - def reassigned; end - - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#44 - def reassigned!; end - - # Returns the value of attribute reassigned. - # - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12 - def reassigned?; end - - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#39 - def reference!(node); end - - # Returns the value of attribute referenced. - # - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12 - def referenced; end - - # Returns the value of attribute referenced. - # - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12 - def referenced?; end - - # Returns the value of attribute references. - # - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12 - def references; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#54 - def regexp_named_capture?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#74 - def rest_assignment?; end - - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#35 - def scope; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#50 - def used?; end - - # Returns the value of attribute variable. - # - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12 - def variable; end - - private - - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#140 - def find_multiple_assignment_node(grandparent_node); end - - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#130 - def for_assignment_node; end - - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#112 - def multiple_assignment_node; end - - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#104 - def operator_assignment_node; end - - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#123 - def rest_assignment_node; end -end - -# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#10 -RuboCop::Cop::VariableForce::Assignment::MULTIPLE_LEFT_HAND_SIDE_TYPE = T.let(T.unsafe(nil), Symbol) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#68 -class RuboCop::Cop::VariableForce::AssignmentReference < ::Struct - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#69 - def assignment?; end - - # Returns the value of attribute node - # - # @return [Object] the current value of node - def node; end - - # Sets the attribute node - # - # @param value [Object] the value to set the attribute node to. - # @return [Object] the newly set value - def node=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# Namespace for branch classes for each control structure. -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#7 -module RuboCop::Cop::VariableForce::Branch - class << self - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#8 - def of(target_node, scope: T.unsafe(nil)); end - end -end - -# left_body && right_body -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#265 -class RuboCop::Cop::VariableForce::Branch::And < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::LogicalOperator - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def left_body?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def right_body?; end -end - -# Abstract base class for branch classes. -# A branch represents a conditional branch in a scope. -# -# @example -# def some_scope -# do_something # no branch -# -# if foo -# do_something # branch A -# do_something # branch A -# else -# do_something # branch B -# if bar -# do_something # branch C (whose parent is branch B) -# end -# end -# -# do_something # no branch -# end -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#42 -class RuboCop::Cop::VariableForce::Branch::Base < ::Struct - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#121 - def ==(other); end - - # @raise [NotImplementedError] - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#92 - def always_run?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#88 - def branched?; end - - # Returns the value of attribute child_node - # - # @return [Object] the current value of child_node - def child_node; end - - # Sets the attribute child_node - # - # @param value [Object] the value to set the attribute child_node to. - # @return [Object] the newly set value - def child_node=(_); end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#70 - def control_node; end - - # @yield [_self] - # @yieldparam _self [RuboCop::Cop::VariableForce::Branch::Base] the object that the method was called on - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#80 - def each_ancestor(include_self: T.unsafe(nil), &block); end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#121 - def eql?(other); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#104 - def exclusive_with?(other); end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#129 - def hash; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#96 - def may_jump_to_other_branch?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#100 - def may_run_incompletely?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#74 - def parent; end - - # Returns the value of attribute scope - # - # @return [Object] the current value of scope - def scope; end - - # Sets the attribute scope - # - # @param value [Object] the value to set the attribute scope to. - # @return [Object] the newly set value - def scope=(_); end - - private - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#135 - def scan_ancestors; end - - class << self - def [](*_arg0); end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#43 - def classes; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#56 - def define_predicate(name, child_index: T.unsafe(nil)); end - - # @private - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#47 - def inherited(subclass); end - - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#52 - def type; end - end -end - -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#325 -RuboCop::Cop::VariableForce::Branch::CLASSES_BY_TYPE = T.let(T.unsafe(nil), Hash) - -# case target -# when /pattern/ # when_clause -# else -# else_body -# end -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#219 -class RuboCop::Cop::VariableForce::Branch::Case < ::RuboCop::Cop::VariableForce::Branch::Base - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#224 - def always_run?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def else_body?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def target?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def when_clause?; end -end - -# case target -# in pattern # in_pattern -# else -# else_body -# end -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#234 -class RuboCop::Cop::VariableForce::Branch::CaseMatch < ::RuboCop::Cop::VariableForce::Branch::Base - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#239 - def always_run?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def else_body?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def in_pattern?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def target?; end -end - -# begin -# main_body -# ensure -# ensure_body -# end -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#314 -class RuboCop::Cop::VariableForce::Branch::Ensure < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::ExceptionHandler - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#320 - def always_run?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def ensure_body?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def main_body?; end -end - -# Mix-in module for exception handling control structures. -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#281 -module RuboCop::Cop::VariableForce::Branch::ExceptionHandler - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#282 - def may_jump_to_other_branch?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#286 - def may_run_incompletely?; end -end - -# for element in collection -# loop_body -# end -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#247 -class RuboCop::Cop::VariableForce::Branch::For < ::RuboCop::Cop::VariableForce::Branch::Base - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#252 - def always_run?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def collection?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def element?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def loop_body?; end -end - -# if conditional_clause -# truthy_body -# else -# falsey_body -# end -# -# unless conditional_clause -# falsey_body -# else -# truthy_body -# end -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#166 -class RuboCop::Cop::VariableForce::Branch::If < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def conditional_clause?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def falsey_body?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def truthy_body?; end -end - -# Mix-in module for logical operator control structures. -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#258 -module RuboCop::Cop::VariableForce::Branch::LogicalOperator - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#259 - def always_run?; end -end - -# left_body || right_body -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#273 -class RuboCop::Cop::VariableForce::Branch::Or < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::LogicalOperator - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def left_body?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def right_body?; end -end - -# begin -# main_body -# rescue StandardError => error # rescue_clause -# else -# else_body -# end -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#297 -class RuboCop::Cop::VariableForce::Branch::Rescue < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::ExceptionHandler - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#304 - def always_run?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def else_body?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def main_body?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def rescue_clause?; end -end - -# Mix-in module for simple conditional control structures. -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#145 -module RuboCop::Cop::VariableForce::Branch::SimpleConditional - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#150 - def always_run?; end - - # @raise [NotImplementedError] - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#146 - def conditional_clause?; end -end - -# until conditional_clause -# loop_body -# end -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#187 -class RuboCop::Cop::VariableForce::Branch::Until < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def conditional_clause?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def loop_body?; end -end - -# begin -# loop_body -# end until conditional_clause -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#207 -class RuboCop::Cop::VariableForce::Branch::UntilPost < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def conditional_clause?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def loop_body?; end -end - -# while conditional_clause -# loop_body -# end -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#177 -class RuboCop::Cop::VariableForce::Branch::While < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def conditional_clause?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def loop_body?; end -end - -# begin -# loop_body -# end while conditional_clause -# -# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#197 -class RuboCop::Cop::VariableForce::Branch::WhilePost < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def conditional_clause?; end - - # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 - def loop_body?; end -end - -# Mix-in module for classes which own a node and need branch information -# of the node. The user classes must implement #node and #scope. -# -# source://rubocop//lib/rubocop/cop/variable_force/branchable.rb#8 -module RuboCop::Cop::VariableForce::Branchable - # source://rubocop//lib/rubocop/cop/variable_force/branchable.rb#9 - def branch; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/branchable.rb#15 - def run_exclusively_with?(other); end -end - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#42 -RuboCop::Cop::VariableForce::LOGICAL_OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#51 -RuboCop::Cop::VariableForce::LOOP_TYPES = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#45 -RuboCop::Cop::VariableForce::MULTIPLE_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Symbol) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#115 -RuboCop::Cop::VariableForce::NODE_HANDLER_METHOD_NAMES = T.let(T.unsafe(nil), Hash) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#43 -RuboCop::Cop::VariableForce::OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#30 -RuboCop::Cop::VariableForce::PATTERN_MATCH_VARIABLE_TYPE = T.let(T.unsafe(nil), Symbol) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#50 -RuboCop::Cop::VariableForce::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#29 -RuboCop::Cop::VariableForce::REGEXP_NAMED_CAPTURE_TYPE = T.let(T.unsafe(nil), Symbol) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#53 -RuboCop::Cop::VariableForce::RESCUE_TYPE = T.let(T.unsafe(nil), Symbol) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#46 -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 -class RuboCop::Cop::VariableForce::Reference - include ::RuboCop::Cop::VariableForce::Branchable - - # @return [Reference] a new instance of Reference - # - # source://rubocop//lib/rubocop/cop/variable_force/reference.rb#16 - def initialize(node, scope); end - - # There's an implicit variable reference by the zero-arity `super`: - # - # def some_method(foo) - # super - # end - # - # Another case is `binding`: - # - # def some_method(foo) - # do_something(binding) - # end - # - # In these cases, the variable `foo` is not explicitly referenced, - # but it can be considered used implicitly by the `super` or `binding`. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/reference.rb#41 - def explicit?; end - - # Returns the value of attribute node. - # - # source://rubocop//lib/rubocop/cop/variable_force/reference.rb#14 - def node; end - - # Returns the value of attribute scope. - # - # source://rubocop//lib/rubocop/cop/variable_force/reference.rb#14 - def scope; end -end - -# source://rubocop//lib/rubocop/cop/variable_force/reference.rb#10 -RuboCop::Cop::VariableForce::Reference::VARIABLE_REFERENCE_TYPES = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#58 -RuboCop::Cop::VariableForce::SCOPE_TYPES = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#60 -RuboCop::Cop::VariableForce::SEND_TYPE = T.let(T.unsafe(nil), Symbol) - -# A Scope represents a context of local variable visibility. -# This is a place where local variables belong to. -# A scope instance holds a scope node and variable entries. -# -# source://rubocop//lib/rubocop/cop/variable_force/scope.rb#9 -class RuboCop::Cop::VariableForce::Scope - # @return [Scope] a new instance of Scope - # - # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#22 - def initialize(node); end - - # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#35 - def ==(other); end - - # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#43 - def body_node; end - - # @yield [node] - # - # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#61 - def each_node(&block); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#57 - def include?(target_node); end - - # Returns the value of attribute naked_top_level. - # - # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#18 - def naked_top_level; end - - # Returns the value of attribute naked_top_level. - # - # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#18 - def naked_top_level?; end - - # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#39 - def name; end - - # Returns the value of attribute node. - # - # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#18 - def node; end - - # Returns the value of attribute variables. - # - # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#18 - def variables; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#100 - def ancestor_node?(target_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#90 - def belong_to_inner_scope?(target_node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#79 - def belong_to_outer_scope?(target_node); end - - # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#70 - def scan_node(node, &block); end -end - -# source://rubocop//lib/rubocop/cop/variable_force/scope.rb#10 -RuboCop::Cop::VariableForce::Scope::OUTER_SCOPE_CHILD_INDICES = T.let(T.unsafe(nil), Hash) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#57 -RuboCop::Cop::VariableForce::TWISTED_SCOPE_TYPES = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#28 -RuboCop::Cop::VariableForce::VARIABLE_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Symbol) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#31 -RuboCop::Cop::VariableForce::VARIABLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#48 -RuboCop::Cop::VariableForce::VARIABLE_REFERENCE_TYPE = T.let(T.unsafe(nil), Symbol) - -# A Variable represents existence of a local variable. -# This holds a variable declaration node and some states of the variable. -# -# source://rubocop//lib/rubocop/cop/variable_force/variable.rb#8 -class RuboCop::Cop::VariableForce::Variable - extend ::RuboCop::AST::NodePattern::Macros - - # @return [Variable] a new instance of Variable - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#17 - def initialize(name, declaration_node, scope); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#110 - def argument?; end - - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#33 - def assign(node); end - - # Returns the value of attribute assignments. - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#13 - def assignments; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#118 - def block_argument?; end - - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#49 - def candidate_condition?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#90 - def capture_with_block!; end - - # Returns the value of attribute captured_by_block. - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#13 - def captured_by_block; end - - # Returns the value of attribute captured_by_block. - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#13 - def captured_by_block?; end - - # Returns the value of attribute declaration_node. - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#13 - def declaration_node; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#126 - def explicit_block_local_variable?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#82 - def in_modifier_conditional?(assignment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#122 - def keyword_argument?; end - - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#41 - def mark_last_as_reassigned!(assignment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#114 - def method_argument?; end - - # Returns the value of attribute name. - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#13 - def name; end - - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#56 - def reference!(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#51 - def referenced?; end - - # Returns the value of attribute references. - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#13 - def references; end - - # Returns the value of attribute scope. - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#13 - def scope; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#106 - def should_be_unused?; end - - # This is a convenient way to check whether the variable is used - # in its entire variable lifetime. - # For more precise usage check, refer Assignment#used?. - # - # Once the variable is captured by a block, we have no idea - # when, where, and how many times the block would be invoked. - # This means we cannot track the usage of the variable. - # So we consider it's used to suppress false positive offenses. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#102 - def used?; end -end - -# source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 -RuboCop::Cop::VariableForce::Variable::VARIABLE_DECLARATION_TYPES = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#62 -class RuboCop::Cop::VariableForce::VariableReference < ::Struct - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force.rb#63 - def assignment?; end - - # Returns the value of attribute name - # - # @return [Object] the current value of name - def name; end - - # Sets the attribute name - # - # @param value [Object] the value to set the attribute name to. - # @return [Object] the newly set value - def name=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# A VariableTable manages the lifetime of all scopes and local variables -# in a program. -# This holds scopes as stack structure, provides a way to add local -# variables to current scope, and find local variables by considering -# variable visibility of the current scope. -# -# source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#11 -class RuboCop::Cop::VariableForce::VariableTable - # @return [VariableTable] a new instance of VariableTable - # - # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#12 - def initialize(hook_receiver = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#113 - def accessible_variables; end - - # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#56 - def assign_to_variable(name, node); end - - # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#40 - def current_scope; end - - # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#44 - def current_scope_level; end - - # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#48 - def declare_variable(name, node); end - - # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#94 - def find_variable(name); end - - # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#16 - def invoke_hook(hook_name, *args); end - - # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#32 - def pop_scope; end - - # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#24 - def push_scope(scope_node); end - - # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#68 - def reference_variable(name, node); end - - # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#20 - def scope_stack; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#109 - def variable_exist?(name); end - - private - - # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#122 - def mark_variable_as_captured_by_block_if_so(variable); end -end - -# @api private -# -# source://rubocop//lib/rubocop/cop/variable_force.rb#55 -RuboCop::Cop::VariableForce::ZERO_ARITY_SUPER_TYPE = T.let(T.unsafe(nil), Symbol) - -# Help methods for determining node visibility. -# -# source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#8 -module RuboCop::Cop::VisibilityHelp - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#57 - def visibility_block?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#62 - def visibility_inline_on_def?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#67 - def visibility_inline_on_method_name?(param0 = T.unsafe(nil), method_name:); end - - private - - # Navigate to find the last protected method - # - # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#48 - def find_visibility_end(node); end - - # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#43 - def find_visibility_start(node); end - - # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#15 - def node_visibility(node); end - - # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#39 - def node_visibility_from_visibility_block(node); end - - # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#21 - def node_visibility_from_visibility_inline(node); end - - # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#28 - def node_visibility_from_visibility_inline_on_def(node); end - - # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#33 - def node_visibility_from_visibility_inline_on_method_name(node); end -end - -# source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#11 -RuboCop::Cop::VisibilityHelp::VISIBILITY_SCOPES = T.let(T.unsafe(nil), Set) - -# This class wraps the `Parser::Source::Comment` object that represents a -# cops it contains. -# -# source://rubocop//lib/rubocop/directive_comment.rb#7 -class RuboCop::DirectiveComment - # @return [DirectiveComment] a new instance of DirectiveComment - # - # source://rubocop//lib/rubocop/directive_comment.rb#46 - def initialize(comment, cop_registry = T.unsafe(nil)); end - - # Checks if all cops specified in this directive - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/directive_comment.rb#115 - def all_cops?; end - - # Returns the value of attribute comment. - # - # source://rubocop//lib/rubocop/directive_comment.rb#44 - def comment; end - - # Returns array of specified in this directive cop names - # - # source://rubocop//lib/rubocop/directive_comment.rb#120 - def cop_names; end - - # Returns the value of attribute cop_registry. - # - # source://rubocop//lib/rubocop/directive_comment.rb#44 - def cop_registry; end - - # Returns the value of attribute cops. - # - # source://rubocop//lib/rubocop/directive_comment.rb#44 - def cops; end - - # Returns array of specified in this directive department names - # when all department disabled - # - # source://rubocop//lib/rubocop/directive_comment.rb#131 - def department_names; end - - # source://rubocop//lib/rubocop/directive_comment.rb#145 - def directive_count; end - - # Checks if this directive disables cops - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/directive_comment.rb#95 - def disabled?; end - - # Checks if this directive disables all cops - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/directive_comment.rb#110 - def disabled_all?; end - - # Checks if this directive enables cops - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/directive_comment.rb#100 - def enabled?; end - - # Checks if this directive enables all cops - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/directive_comment.rb#105 - def enabled_all?; end - - # Checks if directive departments include cop - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/directive_comment.rb#136 - def in_directive_department?(cop); end - - # Returns line number for directive - # - # source://rubocop//lib/rubocop/directive_comment.rb#150 - def line_number; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/directive_comment.rb#59 - def malformed?; end - - # Checks if this directive contains all the given cop names - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/directive_comment.rb#77 - def match?(cop_names); end - - # Returns match captures to directive comment pattern - # - # source://rubocop//lib/rubocop/directive_comment.rb#90 - def match_captures; end - - # Checks if the directive comment is missing a cop name - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/directive_comment.rb#67 - def missing_cop_name?; end - - # Returns the value of attribute mode. - # - # source://rubocop//lib/rubocop/directive_comment.rb#44 - def mode; end - - # Checks if cop department has already used in directive comment - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/directive_comment.rb#141 - def overridden_by_department?(cop); end - - # source://rubocop//lib/rubocop/directive_comment.rb#81 - def range; end - - # Returns an array of cops for this directive comment, without resolving departments - # - # source://rubocop//lib/rubocop/directive_comment.rb#125 - def raw_cop_names; end - - # Checks if this directive relates to single line - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/directive_comment.rb#72 - def single_line?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/directive_comment.rb#54 - def start_with_marker?; end - - private - - # source://rubocop//lib/rubocop/directive_comment.rb#167 - def all_cop_names; end - - # source://rubocop//lib/rubocop/directive_comment.rb#171 - def cop_names_for_department(department); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/directive_comment.rb#163 - def department?(name); end - - # source://rubocop//lib/rubocop/directive_comment.rb#176 - def exclude_lint_department_cops(cops); end - - # source://rubocop//lib/rubocop/directive_comment.rb#156 - def parsed_cop_names; end - - class << self - # source://rubocop//lib/rubocop/directive_comment.rb#40 - def before_comment(line); end - end -end - -# @api private -# -# source://rubocop//lib/rubocop/directive_comment.rb#21 -RuboCop::DirectiveComment::AVAILABLE_MODES = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://rubocop//lib/rubocop/directive_comment.rb#19 -RuboCop::DirectiveComment::COPS_PATTERN = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/directive_comment.rb#17 -RuboCop::DirectiveComment::COP_NAMES_PATTERN = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/directive_comment.rb#15 -RuboCop::DirectiveComment::COP_NAME_PATTERN = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/directive_comment.rb#29 -RuboCop::DirectiveComment::DIRECTIVE_COMMENT_REGEXP = T.let(T.unsafe(nil), Regexp) - -# @api private -# -# source://rubocop//lib/rubocop/directive_comment.rb#27 -RuboCop::DirectiveComment::DIRECTIVE_HEADER_PATTERN = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/directive_comment.rb#23 -RuboCop::DirectiveComment::DIRECTIVE_MARKER_PATTERN = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/directive_comment.rb#25 -RuboCop::DirectiveComment::DIRECTIVE_MARKER_REGEXP = T.let(T.unsafe(nil), Regexp) - -# @api private -# -# source://rubocop//lib/rubocop/directive_comment.rb#9 -RuboCop::DirectiveComment::LINT_DEPARTMENT = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/directive_comment.rb#11 -RuboCop::DirectiveComment::LINT_REDUNDANT_DIRECTIVE_COP = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/directive_comment.rb#13 -RuboCop::DirectiveComment::LINT_SYNTAX_COP = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/directive_comment.rb#36 -RuboCop::DirectiveComment::MALFORMED_DIRECTIVE_WITHOUT_COP_NAME_REGEXP = T.let(T.unsafe(nil), Regexp) - -# @api private -# -# source://rubocop//lib/rubocop/directive_comment.rb#34 -RuboCop::DirectiveComment::TRAILING_COMMENT_MARKER = T.let(T.unsafe(nil), String) - -# An Error exception is different from an Offense with severity 'error' -# When this exception is raised, it means that RuboCop is unable to perform -# a requested action (probably due to misconfiguration) and must stop -# immediately, rather than carrying on -# -# source://rubocop//lib/rubocop/error.rb#8 -class RuboCop::Error < ::StandardError; end - -# A wrapper to display errored location of analyzed file. -# -# source://rubocop//lib/rubocop/error.rb#13 -class RuboCop::ErrorWithAnalyzedFileLocation < ::RuboCop::Error - # @return [ErrorWithAnalyzedFileLocation] a new instance of ErrorWithAnalyzedFileLocation - # - # source://rubocop//lib/rubocop/error.rb#14 - def initialize(cause:, node:, cop:); end - - # Returns the value of attribute cause. - # - # source://rubocop//lib/rubocop/error.rb#21 - def cause; end - - # source://rubocop//lib/rubocop/error.rb#27 - def column; end - - # Returns the value of attribute cop. - # - # source://rubocop//lib/rubocop/error.rb#21 - def cop; end - - # source://rubocop//lib/rubocop/error.rb#23 - def line; end - - # source://rubocop//lib/rubocop/error.rb#31 - def message; end -end - -# Allows specified configuration options to have an exclude limit -# ie. a maximum value tracked that it can be used by `--auto-gen-config`. -# -# source://rubocop//lib/rubocop/cop/exclude_limit.rb#6 -module RuboCop::ExcludeLimit - # Sets up a configuration option to have an exclude limit tracked. - # The parameter name given is transformed into a method name (eg. `Max` - # becomes `self.max=` and `MinDigits` becomes `self.min_digits=`). - # - # source://rubocop//lib/rubocop/cop/exclude_limit.rb#10 - def exclude_limit(parameter_name, method_name: T.unsafe(nil)); end - - private - - # source://rubocop//lib/rubocop/cop/exclude_limit.rb#22 - def transform(parameter_name); end -end - -# source://rubocop//lib/rubocop/ext/comment.rb#4 -module RuboCop::Ext; end - -# Extensions to `Parser::Source::Comment`. -# -# source://rubocop//lib/rubocop/ext/comment.rb#6 -module RuboCop::Ext::Comment - # source://rubocop//lib/rubocop/ext/comment.rb#7 - def source; end - - # source://rubocop//lib/rubocop/ext/comment.rb#11 - def source_range; end -end - -# Extensions to AST::ProcessedSource for our cached comment_config -# -# source://rubocop//lib/rubocop/ext/processed_source.rb#6 -module RuboCop::Ext::ProcessedSource - # source://rubocop//lib/rubocop/ext/processed_source.rb#9 - def comment_config; end - - # Returns the value of attribute config. - # - # source://rubocop//lib/rubocop/ext/processed_source.rb#7 - def config; end - - # Sets the attribute config - # - # @param value the value to set the attribute config to. - # - # source://rubocop//lib/rubocop/ext/processed_source.rb#7 - def config=(_arg0); end - - # source://rubocop//lib/rubocop/ext/processed_source.rb#13 - def disabled_line_ranges; end - - # Returns the value of attribute registry. - # - # source://rubocop//lib/rubocop/ext/processed_source.rb#7 - def registry; end - - # Sets the attribute registry - # - # @param value the value to set the attribute registry to. - # - # source://rubocop//lib/rubocop/ext/processed_source.rb#7 - def registry=(_arg0); end -end - -# Extensions to Parser::Source::Range -# -# source://rubocop//lib/rubocop/ext/range.rb#6 -module RuboCop::Ext::Range - # Adds `Range#single_line?` to parallel `Node#single_line?` - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/ext/range.rb#8 - def single_line?; end -end - -# Extensions to AST::RegexpNode for our cached parsed regexp info -# -# source://rubocop//lib/rubocop/ext/regexp_node.rb#6 -module RuboCop::Ext::RegexpNode - # source://rubocop//lib/rubocop/ext/regexp_node.rb#18 - def assign_properties(*_arg0); end - - # source://rubocop//lib/rubocop/ext/regexp_node.rb#31 - def each_capture(named: T.unsafe(nil)); end - - # Note: we extend Regexp nodes to provide `loc` and `expression` - # see `ext/regexp_parser`. - # - # @return [Regexp::Expression::Root, nil] - # - # source://rubocop//lib/rubocop/ext/regexp_node.rb#16 - def parsed_tree; end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/ext/regexp_node.rb#43 - def named_capturing?(exp, event, named); end - - # source://rubocop//lib/rubocop/ext/regexp_node.rb#50 - def with_interpolations_blanked; end -end - -# source://rubocop//lib/rubocop/ext/regexp_node.rb#7 -RuboCop::Ext::RegexpNode::ANY = T.let(T.unsafe(nil), Object) - -# Extensions for `regexp_parser` gem -# -# source://rubocop//lib/rubocop/ext/regexp_parser.rb#6 -module RuboCop::Ext::RegexpParser; end - -# source://rubocop//lib/rubocop/ext/regexp_parser.rb#20 -module RuboCop::Ext::RegexpParser::Expression; end - -# Add `expression` and `loc` to all `regexp_parser` nodes -# -# source://rubocop//lib/rubocop/ext/regexp_parser.rb#22 -module RuboCop::Ext::RegexpParser::Expression::Base - # Shortcut to `loc.expression` - # - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#26 - def expression; end - - # E.g. - # [a-z]{2,} - # ^^^^^^^^^ expression - # ^^^^ quantifier - # ^^^^^ body - # ^ begin - # ^ end - # - # Please open issue if you need other locations - # - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#44 - def loc; end - - # Returns the value of attribute origin. - # - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#23 - def origin; end - - # Sets the attribute origin - # - # @param value the value to set the attribute origin to. - # - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#23 - def origin=(_arg0); end - - private - - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#50 - def build_location; end -end - -# Provide `CharacterSet` with `begin` and `end` locations. -# -# source://rubocop//lib/rubocop/ext/regexp_parser.rb#62 -module RuboCop::Ext::RegexpParser::Expression::CharacterSet - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#63 - def build_location; end -end - -# Source map for RegexpParser nodes -# -# source://rubocop//lib/rubocop/ext/regexp_parser.rb#8 -class RuboCop::Ext::RegexpParser::Map < ::Parser::Source::Map - # @return [Map] a new instance of Map - # - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#11 - def initialize(expression, body:, quantifier: T.unsafe(nil), begin_l: T.unsafe(nil), end_l: T.unsafe(nil)); end - - # Returns the value of attribute begin. - # - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#9 - def begin; end - - # Returns the value of attribute body. - # - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#9 - def body; end - - # Returns the value of attribute end. - # - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#9 - def end; end - - # Returns the value of attribute quantifier. - # - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#9 - def quantifier; end -end - -# This class handles loading files (a.k.a. features in Ruby) specified -# by `--require` command line option and `require` directive in the config. -# -# Normally, the given string is directly passed to `require`. If a string -# beginning with `.` is given, it is assumed to be relative to the given -# directory. -# -# If a string containing `-` is given, it will be used as is, but if we -# cannot find the file to load, we will replace `-` with `/` and try it -# again as when Bundler loads gems. -# -# @api private -# -# source://rubocop//lib/rubocop/feature_loader.rb#16 -class RuboCop::FeatureLoader - # @api private - # @param config_directory_path [String] - # @param feature [String] - # @return [FeatureLoader] a new instance of FeatureLoader - # - # source://rubocop//lib/rubocop/feature_loader.rb#27 - def initialize(config_directory_path:, feature:); end - - # @api private - # - # source://rubocop//lib/rubocop/feature_loader.rb#32 - def load; end - - private - - # @api private - # @return [String] - # - # source://rubocop//lib/rubocop/feature_loader.rb#55 - def namespaced_feature; end - - # @api private - # @return [String] - # - # source://rubocop//lib/rubocop/feature_loader.rb#60 - def namespaced_target; end - - # @api private - # @param [String] - # @return [String] - # - # source://rubocop//lib/rubocop/feature_loader.rb#70 - def relative(feature); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/feature_loader.rb#75 - def relative?; end - - # @api private - # @param error [LoadError] - # @return [Boolean] - # - # source://rubocop//lib/rubocop/feature_loader.rb#81 - def seems_cannot_load_such_file_error?(error); end - - # @api private - # @return [String] - # - # source://rubocop//lib/rubocop/feature_loader.rb#86 - def target; end - - class << self - # @api private - # @param config_directory_path [String] - # @param feature [String] - # - # source://rubocop//lib/rubocop/feature_loader.rb#20 - def load(config_directory_path:, feature:); end - end -end - -# Common methods for finding files. -# -# @api private -# -# source://rubocop//lib/rubocop/file_finder.rb#8 -module RuboCop::FileFinder - # @api private - # - # 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#20 - def find_last_file_upwards(filename, start_dir, stop_dir = T.unsafe(nil)); end - - # @api private - # - # source://rubocop//lib/rubocop/file_finder.rb#26 - def traverse_directories_upwards(start_dir, stop_dir = T.unsafe(nil)); end - - private - - # @api private - # - # source://rubocop//lib/rubocop/file_finder.rb#36 - def traverse_files_upwards(filename, start_dir, stop_dir); end - - class << self - # @api private - # - # source://rubocop//lib/rubocop/file_finder.rb#10 - def root_level; end - - # @api private - # - # source://rubocop//lib/rubocop/file_finder.rb#10 - def root_level=(_arg0); end - end -end - -# A wrapper around patterns array to perform optimized search. -# -# For projects with a large set of rubocop todo files, most items in `Exclude`/`Include` -# are exact file names. It is wasteful to linearly check the list of patterns over and over -# to check if the file is relevant to the cop. -# -# This class partitions an array of patterns into a set of exact match strings and the rest -# of the patterns. This way we can firstly do a cheap check in the set and then proceed via -# the costly patterns check, if needed. -# -# @api private -# -# source://rubocop//lib/rubocop/file_patterns.rb#14 -class RuboCop::FilePatterns - # @api private - # @return [FilePatterns] a new instance of FilePatterns - # - # source://rubocop//lib/rubocop/file_patterns.rb#21 - def initialize(patterns); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/file_patterns.rb#27 - def match?(path); end - - private - - # @api private - # - # source://rubocop//lib/rubocop/file_patterns.rb#33 - def partition_patterns(patterns); end - - class << self - # @api private - # - # source://rubocop//lib/rubocop/file_patterns.rb#17 - def from(patterns); end - end -end - -# The bootstrap module for formatter. -# -# source://rubocop//lib/rubocop/formatter.rb#5 -module RuboCop::Formatter; end - -# Does not show individual offenses in the console. -# -# source://rubocop//lib/rubocop/formatter/auto_gen_config_formatter.rb#6 -class RuboCop::Formatter::AutoGenConfigFormatter < ::RuboCop::Formatter::ProgressFormatter - # source://rubocop//lib/rubocop/formatter/auto_gen_config_formatter.rb#7 - def finished(inspected_files); end -end - -# Abstract base class for formatter, implements all public API methods. -# -# ## Creating Custom Formatter -# -# You can create a custom formatter by subclassing -# `RuboCop::Formatter::BaseFormatter` and overriding some methods -# or by implementing all the methods by duck typing. -# -# ## Using Custom Formatter in Command Line -# -# You can tell RuboCop to use your custom formatter with a combination of -# `--format` and `--require` option. -# For example, when you have defined `MyCustomFormatter` in -# `./path/to/my_custom_formatter.rb`, you would type this command: -# -# rubocop --require ./path/to/my_custom_formatter --format MyCustomFormatter -# -# Note: The path passed to `--require` is directly passed to -# `Kernel.require`. -# If your custom formatter file is not in `$LOAD_PATH`, -# you need to specify the path as relative path prefixed with `./` -# explicitly or absolute path. -# -# ## Method Invocation Order -# -# For example, when RuboCop inspects 2 files, -# the invocation order should be like this: -# -# * `#initialize` -# * `#started` -# * `#file_started` -# * `#file_finished` -# * `#file_started` -# * `#file_finished` -# * `#finished` -# -# source://rubocop//lib/rubocop/formatter/base_formatter.rb#41 -class RuboCop::Formatter::BaseFormatter - # @api public - # @param output [IO] `$stdout` or opened file - # @return [BaseFormatter] a new instance of BaseFormatter - # - # source://rubocop//lib/rubocop/formatter/base_formatter.rb#63 - def initialize(output, options = T.unsafe(nil)); end - - # Invoked at the end of inspecting each files. - # - # @api public - # @param file [String] the file path - # @param offenses [Array(RuboCop::Cop::Offense)] all detected offenses for the file - # @return [void] - # @see RuboCop::Cop::Offense - # - # source://rubocop//lib/rubocop/formatter/base_formatter.rb#104 - def file_finished(file, offenses); end - - # Invoked at the beginning of inspecting each files. - # - # @api public - # @param file [String] the file path - # @param options [Hash] file specific information, currently this is always empty. - # @return [void] - # - # source://rubocop//lib/rubocop/formatter/base_formatter.rb#89 - def file_started(file, options); end - - # Invoked after all files are inspected or interrupted by user. - # - # @api public - # @param inspected_files [Array(String)] the inspected file paths. - # This would be same as `target_files` passed to `#started` - # unless RuboCop is interrupted by user. - # @return [void] - # - # source://rubocop//lib/rubocop/formatter/base_formatter.rb#116 - def finished(inspected_files); end - - # @api public - # @return [Hash] - # - # source://rubocop//lib/rubocop/formatter/base_formatter.rb#57 - def options; end - - # @api public - # @return [IO] the IO object passed to `#initialize` - # @see #initialize - # - # source://rubocop//lib/rubocop/formatter/base_formatter.rb#50 - def output; end - - # Invoked once before any files are inspected. - # - # @api public - # @param target_files [Array(String)] all target file paths to be inspected - # @return [void] - # - # source://rubocop//lib/rubocop/formatter/base_formatter.rb#76 - def started(target_files); end -end - -# This formatter formats report data in clang style. -# The precise location of the problem is shown together with the -# relevant source code. -# -# source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#8 -class RuboCop::Formatter::ClangStyleFormatter < ::RuboCop::Formatter::SimpleTextFormatter - # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#11 - def report_file(file, offenses); end - - private - - # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#47 - def report_highlighted_area(highlighted_area); end - - # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#37 - def report_line(location); end - - # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#17 - def report_offense(file, offense); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#33 - def valid_line?(offense); end -end - -# source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#9 -RuboCop::Formatter::ClangStyleFormatter::ELLIPSES = T.let(T.unsafe(nil), String) - -# This mix-in module provides string coloring methods for terminals. -# It automatically disables coloring if coloring is disabled in the process -# globally or the formatter's output is not a terminal. -# -# source://rubocop//lib/rubocop/formatter/colorizable.rb#8 -module RuboCop::Formatter::Colorizable - # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 - def black(string); end - - # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 - def blue(string); end - - # source://rubocop//lib/rubocop/formatter/colorizable.rb#21 - def colorize(string, *args); end - - # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 - def cyan(string); end - - # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 - def green(string); end - - # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 - def magenta(string); end - - # source://rubocop//lib/rubocop/formatter/colorizable.rb#9 - def rainbow; end - - # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 - def red(string); end - - # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 - def white(string); end - - # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 - def yellow(string); end -end - -# This formatter displays a YAML configuration file where all cops that -# detected any offenses are configured to not detect the offense. -# -# source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#7 -class RuboCop::Formatter::DisabledConfigFormatter < ::RuboCop::Formatter::BaseFormatter - include ::RuboCop::PathUtil - - # @return [DisabledConfigFormatter] a new instance of DisabledConfigFormatter - # - # 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#40 - def file_finished(file, offenses); end - - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#33 - def file_started(_file, options); end - - # 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#69 - def auto_gen_enforced_style?; end - - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#73 - def command; end - - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#165 - def cop_config_params(default_cfg, cfg); end - - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#185 - def default_config(cop_name); end - - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#229 - def excludes(offending_files, cop_name, parent); end - - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#200 - 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#277 - def include_or_match?(arr, elm); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#250 - def merge_mode_for_exclude?(cfg); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#271 - def no_exclude_limit?; end - - # 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#137 - def output_cop_comments(output_buffer, cfg, cop_name, offense_count); end - - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#189 - def output_cop_config(output_buffer, cfg, cop_name); end - - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#172 - def output_cop_param_comments(output_buffer, params, default_cfg); end - - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#219 - def output_exclude_list(output_buffer, offending_files, cop_name); end - - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#254 - def output_exclude_path(output_buffer, exclude_path, parent); end - - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#208 - def output_offending_files(output_buffer, cfg, cop_name); end - - # 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#267 - def safe_autocorrect?(config); end - - # 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#125 - def should_set_max?(cop_name); end - - # @return [Boolean] - # - # 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#61 - def show_timestamp?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#157 - def supports_safe_autocorrect?(cop_class, default_cfg); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#161 - def supports_unsafe_autocorrect?(cop_class, default_cfg); end - - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#92 - def timestamp; end - - class << self - # Returns the value of attribute config_to_allow_offenses. - # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#24 - def config_to_allow_offenses; end - - # Sets the attribute config_to_allow_offenses - # - # @param value the value to set the attribute config_to_allow_offenses to. - # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#24 - def config_to_allow_offenses=(_arg0); end - - # Returns the value of attribute detected_styles. - # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#24 - def detected_styles; end - - # Sets the attribute detected_styles - # - # @param value the value to set the attribute detected_styles to. - # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#24 - def detected_styles=(_arg0); end - end -end - -# source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#10 -RuboCop::Formatter::DisabledConfigFormatter::HEADING = T.let(T.unsafe(nil), String) - -# This formatter displays the report data in format that's -# easy to process in the Emacs text editor. -# The output is machine-parsable. -# -# source://rubocop//lib/rubocop/formatter/emacs_style_formatter.rb#8 -class RuboCop::Formatter::EmacsStyleFormatter < ::RuboCop::Formatter::BaseFormatter - # source://rubocop//lib/rubocop/formatter/emacs_style_formatter.rb#9 - def file_finished(file, offenses); end - - private - - # source://rubocop//lib/rubocop/formatter/emacs_style_formatter.rb#24 - def message(offense); end -end - -# This formatter displays just a list of the files with offenses in them, -# separated by newlines. The output is machine-parsable. -# -# Here's the format: -# -# /some/file -# /some/other/file -# -# source://rubocop//lib/rubocop/formatter/file_list_formatter.rb#12 -class RuboCop::Formatter::FileListFormatter < ::RuboCop::Formatter::BaseFormatter - # source://rubocop//lib/rubocop/formatter/file_list_formatter.rb#13 - def file_finished(file, offenses); end -end - -# This is a collection of formatters. A FormatterSet can hold multiple -# formatter instances and provides transparent formatter API methods -# which invoke same method of each formatters. -# -# source://rubocop//lib/rubocop/formatter/formatter_set.rb#10 -class RuboCop::Formatter::FormatterSet < ::Array - # @return [FormatterSet] a new instance of FormatterSet - # - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#40 - def initialize(options = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#56 - def add_formatter(formatter_type, output_path = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#68 - def close_output_files; end - - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#51 - def file_finished(file, offenses); end - - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#45 - def file_started(file, options); end - - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#35 - def finished(*args); end - - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#35 - def started(*args); end - - private - - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#87 - def builtin_formatter_class(specified_key); end - - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#105 - def custom_formatter_class(specified_class_name); end - - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#76 - def formatter_class(formatter_type); end -end - -# source://rubocop//lib/rubocop/formatter/formatter_set.rb#11 -RuboCop::Formatter::FormatterSet::BUILTIN_FORMATTERS_FOR_KEYS = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/formatter/formatter_set.rb#30 -RuboCop::Formatter::FormatterSet::BUILTIN_FORMATTER_NAMES = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/formatter/formatter_set.rb#32 -RuboCop::Formatter::FormatterSet::FORMATTER_APIS = T.let(T.unsafe(nil), Array) - -# This formatter displays a progress bar and shows details of offenses as -# soon as they are detected. -# This is inspired by the Fuubar formatter for RSpec by Jeff Kreeftmeijer. -# https://github.com/jeffkreeftmeijer/fuubar -# -# source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#11 -class RuboCop::Formatter::FuubarStyleFormatter < ::RuboCop::Formatter::ClangStyleFormatter - # @return [FuubarStyleFormatter] a new instance of FuubarStyleFormatter - # - # source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#14 - def initialize(*output); end - - # source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#51 - def count_stats(offenses); end - - # source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#40 - def file_finished(file, offenses); end - - # source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#71 - def progressbar_color; end - - # source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#20 - def started(target_files); end - - # source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#61 - def with_color; end -end - -# source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#12 -RuboCop::Formatter::FuubarStyleFormatter::RESET_SEQUENCE = T.let(T.unsafe(nil), String) - -# This formatter formats report data as GitHub Workflow commands resulting -# in GitHub check annotations when run within GitHub Actions. -# -# source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#7 -class RuboCop::Formatter::GitHubActionsFormatter < ::RuboCop::Formatter::BaseFormatter - # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#14 - def file_finished(file, offenses); end - - # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#18 - def finished(_inspected_files); end - - # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#10 - def started(_target_files); end - - private - - # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#29 - def github_escape(string); end - - # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#41 - def github_severity(offense); end - - # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#33 - def minimum_severity_to_fail; end - - # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#45 - def report_offense(file, offense); end -end - -# 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#9 -class RuboCop::Formatter::HTMLFormatter < ::RuboCop::Formatter::BaseFormatter - # @return [HTMLFormatter] a new instance of HTMLFormatter - # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#29 - def initialize(output, options = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#39 - def file_finished(file, offenses); end - - # Returns the value of attribute files. - # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#27 - def files; end - - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#44 - def finished(inspected_files); end - - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#50 - def render_html; end - - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#35 - def started(target_files); end - - # Returns the value of attribute summary. - # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#27 - def summary; end -end - -# This class provides helper methods used in the ERB CSS template. -# -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#137 -class RuboCop::Formatter::HTMLFormatter::CSSContext - # Make Kernel#binding public. - # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#148 - def binding; end -end - -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#138 -RuboCop::Formatter::HTMLFormatter::CSSContext::SEVERITY_COLORS = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#12 -RuboCop::Formatter::HTMLFormatter::CSS_PATH = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#14 -class RuboCop::Formatter::HTMLFormatter::Color < ::Struct - # Returns the value of attribute alpha - # - # @return [Object] the current value of alpha - def alpha; end - - # Sets the attribute alpha - # - # @param value [Object] the value to set the attribute alpha to. - # @return [Object] the newly set value - def alpha=(_); end - - # Returns the value of attribute blue - # - # @return [Object] the current value of blue - def blue; end - - # Sets the attribute blue - # - # @param value [Object] the value to set the attribute blue to. - # @return [Object] the newly set value - def blue=(_); end - - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#19 - def fade_out(amount); end - - # Returns the value of attribute green - # - # @return [Object] the current value of green - def green; end - - # Sets the attribute green - # - # @param value [Object] the value to set the attribute green to. - # @return [Object] the newly set value - def green=(_); end - - # Returns the value of attribute red - # - # @return [Object] the current value of red - def red; end - - # Sets the attribute red - # - # @param value [Object] the value to set the attribute red to. - # @return [Object] the newly set value - def red=(_); end - - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#15 - def to_s; end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# 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#63 -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#71 - def initialize(files, summary); end - - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#118 - def base64_encoded_logo_image; end - - # Make Kernel#binding public. - # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#78 - def binding; end - - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#83 - def decorated_message(offense); end - - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#114 - def escape(string); end - - # Returns the value of attribute files. - # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#69 - def files; end - - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#94 - def highlight_source_tag(offense); end - - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#87 - def highlighted_source_line(offense); end - - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#110 - def possible_ellipses(location); end - - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#126 - def render_css; end - - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#105 - def source_after_highlight(offense); end - - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#100 - def source_before_highlight(offense); end - - # Returns the value of attribute summary. - # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#69 - def summary; end -end - -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#67 -RuboCop::Formatter::HTMLFormatter::ERBContext::LOGO_IMAGE_PATH = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#25 -class RuboCop::Formatter::HTMLFormatter::FileOffenses < ::Struct - # Returns the value of attribute offenses - # - # @return [Object] the current value of offenses - def offenses; end - - # Sets the attribute offenses - # - # @param value [Object] the value to set the attribute offenses to. - # @return [Object] the newly set value - def offenses=(_); end - - # Returns the value of attribute path - # - # @return [Object] the current value of path - def path; end - - # Sets the attribute path - # - # @param value [Object] the value to set the attribute path to. - # @return [Object] the newly set value - def path=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#24 -class RuboCop::Formatter::HTMLFormatter::Summary < ::Struct - # Returns the value of attribute inspected_files - # - # @return [Object] the current value of inspected_files - def inspected_files; end - - # Sets the attribute inspected_files - # - # @param value [Object] the value to set the attribute inspected_files to. - # @return [Object] the newly set value - def inspected_files=(_); end - - # Returns the value of attribute offense_count - # - # @return [Object] the current value of offense_count - def offense_count; end - - # Sets the attribute offense_count - # - # @param value [Object] the value to set the attribute offense_count to. - # @return [Object] the newly set value - def offense_count=(_); end - - # Returns the value of attribute target_files - # - # @return [Object] the current value of target_files - def target_files; end - - # Sets the attribute target_files - # - # @param value [Object] the value to set the attribute target_files to. - # @return [Object] the newly set value - def target_files=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# 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#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#13 - def initialize(output, options = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#22 - def file_finished(file, offenses); end - - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#27 - def finished(inspected_files); end - - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#42 - def hash_for_file(file, offenses); end - - # TODO: Consider better solution for Offense#real_column. - # The minimum value of `start_column: real_column` is 1. - # 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#64 - def hash_for_location(offense); end - - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#49 - def hash_for_offense(offense); end - - # 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#11 - def output_hash; end - - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#18 - def started(target_files); end -end - -# This formatter formats the report data in JUnit format. -# -# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#15 -class RuboCop::Formatter::JUnitFormatter < ::RuboCop::Formatter::BaseFormatter - # @return [JUnitFormatter] a new instance of JUnitFormatter - # - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#24 - def initialize(output, options = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#32 - def file_finished(file, offenses); end - - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#51 - def finished(_inspected_files); end - - private - - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#106 - def add_failure_to(testcase, offenses, cop_name); end - - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#85 - def add_testcase_element_to_testsuite_element(file, target_offenses, cop); end - - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#94 - def classname_attribute_value(file); end - - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#81 - def offenses_for_cop(all_offenses, cop); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#77 - def relevant_for_output?(options, target_offenses); end - - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#101 - def reset_count; end - - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#118 - def xml_escape(string); end -end - -# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#16 -RuboCop::Formatter::JUnitFormatter::ESCAPE_MAP = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#132 -class RuboCop::Formatter::JUnitFormatter::FailureElement - # @return [FailureElement] a new instance of FailureElement - # - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#135 - def initialize(type:, message:, text:); end - - # Returns the value of attribute message. - # - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#133 - def message; end - - # Returns the value of attribute text. - # - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#133 - def text; end - - # Returns the value of attribute type. - # - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#133 - def type; end -end - -# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#122 -class RuboCop::Formatter::JUnitFormatter::TestCaseElement - # @return [TestCaseElement] a new instance of TestCaseElement - # - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#125 - def initialize(classname:, name:); end - - # Returns the value of attribute classname. - # - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#123 - def classname; end - - # Returns the value of attribute failures. - # - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#123 - def failures; end - - # Returns the value of attribute name. - # - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#123 - def name; end -end - -# This formatter displays the report data in markdown -# -# source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#6 -class RuboCop::Formatter::MarkdownFormatter < ::RuboCop::Formatter::BaseFormatter - include ::RuboCop::Formatter::TextUtil - include ::RuboCop::PathUtil - - # @return [MarkdownFormatter] a new instance of MarkdownFormatter - # - # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#11 - def initialize(output, options = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#21 - def file_finished(file, offenses); end - - # Returns the value of attribute files. - # - # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#9 - def files; end - - # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#26 - def finished(inspected_files); end - - # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#17 - def started(target_files); end - - # Returns the value of attribute summary. - # - # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#9 - def summary; end - - private - - # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#73 - def possible_ellipses(location); end - - # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#33 - def render_markdown; end - - # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#67 - def write_code(offense); end - - # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#61 - def write_context(offense); end - - # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#42 - def write_file_messages; end - - # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#54 - def write_heading(file); end -end - -# This formatter displays the list of offended cops with a count of how -# many offenses of their kind were found. Ordered by desc offense count -# -# Here's the format: -# -# 26 LineLength -# 3 OneLineConditional -# -- -# 29 Total in 5 files -# -# source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#16 -class RuboCop::Formatter::OffenseCountFormatter < ::RuboCop::Formatter::BaseFormatter - # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#81 - def cop_information(cop_name); end - - # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#42 - def file_finished(_file, offenses); end - - # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#51 - def finished(_inspected_files); end - - # Returns the value of attribute offense_counts. - # - # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#17 - def offense_counts; end - - # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#73 - def ordered_offense_counts(offense_counts); end - - # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#56 - def report_summary(offense_counts, offending_files_count); end - - # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#19 - def started(target_files); end - - # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#77 - def total_offense_count(offense_counts); end -end - -# This formatter prints a PACDOT per every file to be analyzed. -# Pacman will "eat" one PACDOT per file when no offense is detected. -# Otherwise it will print a Ghost. -# This is inspired by the Pacman formatter for RSpec by Carlos Rojas. -# https://github.com/go-labs/rspec_pacman_formatter -# -# source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#10 -class RuboCop::Formatter::PacmanFormatter < ::RuboCop::Formatter::ClangStyleFormatter - include ::RuboCop::Formatter::TextUtil - - # @return [PacmanFormatter] a new instance of PacmanFormatter - # - # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#19 - def initialize(output, options = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#50 - def cols; end - - # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#37 - def file_finished(file, offenses); end - - # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#33 - def file_started(_file, _options); end - - # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#43 - def next_step(offenses); end - - # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#64 - def pacdots(number); end - - # Returns the value of attribute progress_line. - # - # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#12 - def progress_line; end - - # Sets the attribute progress_line - # - # @param value the value to set the attribute progress_line to. - # - # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#12 - def progress_line=(_arg0); end - - # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#26 - def started(target_files); end - - # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#68 - def step(character); end - - # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#57 - def update_progress_line; end -end - -# source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#14 -RuboCop::Formatter::PacmanFormatter::FALLBACK_TERMINAL_WIDTH = T.let(T.unsafe(nil), Integer) - -# source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#15 -RuboCop::Formatter::PacmanFormatter::GHOST = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#17 -RuboCop::Formatter::PacmanFormatter::PACDOT = T.let(T.unsafe(nil), Rainbow::Presenter) - -# source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#16 -RuboCop::Formatter::PacmanFormatter::PACMAN = T.let(T.unsafe(nil), Rainbow::Presenter) - -# This formatter display dots for files with no offenses and -# letters for files with problems in the them. In the end it -# appends the regular report data in the clang style format. -# -# source://rubocop//lib/rubocop/formatter/progress_formatter.rb#8 -class RuboCop::Formatter::ProgressFormatter < ::RuboCop::Formatter::ClangStyleFormatter - include ::RuboCop::Formatter::TextUtil - - # @return [ProgressFormatter] a new instance of ProgressFormatter - # - # source://rubocop//lib/rubocop/formatter/progress_formatter.rb#13 - def initialize(output, options = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/formatter/progress_formatter.rb#24 - def file_finished(file, offenses); end - - # source://rubocop//lib/rubocop/formatter/progress_formatter.rb#33 - def finished(inspected_files); end - - # source://rubocop//lib/rubocop/formatter/progress_formatter.rb#50 - def report_file_as_mark(offenses); end - - # source://rubocop//lib/rubocop/formatter/progress_formatter.rb#18 - def started(target_files); end -end - -# source://rubocop//lib/rubocop/formatter/progress_formatter.rb#11 -RuboCop::Formatter::ProgressFormatter::DOT = T.let(T.unsafe(nil), String) - -# If no offenses are found, no output is displayed. -# Otherwise, SimpleTextFormatter's output is displayed. -# -# source://rubocop//lib/rubocop/formatter/quiet_formatter.rb#7 -class RuboCop::Formatter::QuietFormatter < ::RuboCop::Formatter::SimpleTextFormatter - # source://rubocop//lib/rubocop/formatter/quiet_formatter.rb#8 - def report_summary(file_count, offense_count, correction_count, correctable_count); end -end - -# A basic formatter that displays only files with offenses. -# Offenses are displayed at compact form - just the -# location of the problem and the associated message. -# -# source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#10 -class RuboCop::Formatter::SimpleTextFormatter < ::RuboCop::Formatter::BaseFormatter - include ::RuboCop::Formatter::Colorizable - include ::RuboCop::PathUtil - - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#29 - def file_finished(file, offenses); end - - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#36 - def finished(inspected_files); end - - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#43 - def report_file(file, offenses); end - - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#57 - def report_summary(file_count, offense_count, correction_count, correctable_count); end - - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#23 - def started(_target_files); end - - private - - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#85 - def annotate_message(msg); end - - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#80 - def colored_severity_code(offense); end - - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#73 - def count_stats(offenses); end - - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#89 - def message(offense); end -end - -# source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#14 -RuboCop::Formatter::SimpleTextFormatter::COLOR_FOR_SEVERITY = T.let(T.unsafe(nil), Hash) - -# A helper class for building the report summary text. -# -# source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#105 -class RuboCop::Formatter::SimpleTextFormatter::Report - include ::RuboCop::Formatter::Colorizable - include ::RuboCop::Formatter::TextUtil - - # @return [Report] a new instance of Report - # - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#110 - def initialize(file_count, offense_count, correction_count, correctable_count, rainbow, safe_autocorrect: T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#123 - def summary; end - - private - - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#160 - def correctable; end - - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#153 - def corrections; end - - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#142 - def files; end - - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#146 - def offenses; end - - # Returns the value of attribute rainbow. - # - # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#140 - def rainbow; end -end - -# This formatter formats report data using the Test Anything Protocol. -# TAP allows for to communicate tests results in a language agnostics way. -# -# source://rubocop//lib/rubocop/formatter/tap_formatter.rb#7 -class RuboCop::Formatter::TapFormatter < ::RuboCop::Formatter::ClangStyleFormatter - # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#14 - def file_finished(file, offenses); end - - # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#8 - def started(target_files); end - - private - - # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#62 - def annotate_message(msg); end - - # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#66 - def message(offense); end - - # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#39 - def report_highlighted_area(highlighted_area); end - - # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#29 - def report_line(location); end - - # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#46 - def report_offense(file, offense); end -end - -# Common logic for UI texts. -# -# source://rubocop//lib/rubocop/formatter/text_util.rb#6 -module RuboCop::Formatter::TextUtil - private - - # source://rubocop//lib/rubocop/formatter/text_util.rb#9 - def pluralize(number, thing, options = T.unsafe(nil)); end - - class << self - # source://rubocop//lib/rubocop/formatter/text_util.rb#9 - def pluralize(number, thing, options = T.unsafe(nil)); end - end -end - -# This formatter displays the list of offensive files, sorted by number of -# offenses with the worst offenders first. -# -# Here's the format: -# -# 26 this/file/is/really/bad.rb -# 3 just/ok.rb -# -- -# 29 Total in 2 files -# -# source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#16 -class RuboCop::Formatter::WorstOffendersFormatter < ::RuboCop::Formatter::BaseFormatter - # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#24 - def file_finished(file, offenses); end - - # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#31 - def finished(_inspected_files); end - - # Returns the value of attribute offense_counts. - # - # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#17 - def offense_counts; end - - # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#55 - def ordered_offense_counts(offense_counts); end - - # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#36 - def report_summary(offense_counts); end - - # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#19 - def started(target_files); end - - # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#59 - def total_offense_count(offense_counts); end -end - -# source://rubocop//lib/rubocop/options.rb#8 -class RuboCop::IncorrectCopNameError < ::StandardError; end - -# The RuboCop's built-in LSP module. -# -# source://rubocop//lib/rubocop/lsp.rb#5 -module RuboCop::LSP - private - - # Disable LSP. - # - # @return [void] - # - # source://rubocop//lib/rubocop/lsp.rb#25 - def disable(&block); end - - # Enable LSP. - # - # @return [void] - # - # source://rubocop//lib/rubocop/lsp.rb#18 - def enable; end - - # Returns true when LSP is enabled, false when disabled. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/lsp.rb#11 - def enabled?; end - - class << self - # Disable LSP. - # - # @return [void] - # - # source://rubocop//lib/rubocop/lsp.rb#25 - def disable(&block); end - - # Enable LSP. - # - # @return [void] - # - # source://rubocop//lib/rubocop/lsp.rb#18 - def enable; end - - # Returns true when LSP is enabled, false when disabled. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/lsp.rb#11 - def enabled?; end - end -end - -# Encapsulation of a lockfile for use when checking for gems. -# Does not actually resolve gems, just parses the lockfile. -# -# @api private -# -# source://rubocop//lib/rubocop/lockfile.rb#15 -class RuboCop::Lockfile - # @api private - # @param lockfile_path [String, Pathname, nil] - # @return [Lockfile] a new instance of Lockfile - # - # source://rubocop//lib/rubocop/lockfile.rb#17 - def initialize(lockfile_path = T.unsafe(nil)); end - - # Gems that the bundle directly depends on. - # - # @api private - # @return [Array, nil] - # - # source://rubocop//lib/rubocop/lockfile.rb#29 - def dependencies; end - - # Returns the locked versions of gems from this lockfile. - # - # @api private - # @param include_transitive_dependencies: [Boolean] When false, only direct dependencies - # are returned, i.e. those listed explicitly in the `Gemfile`. - # - # source://rubocop//lib/rubocop/lockfile.rb#49 - def gem_versions(include_transitive_dependencies: T.unsafe(nil)); end - - # All activated gems, including transitive dependencies. - # - # @api private - # @return [Array, nil] - # - # source://rubocop//lib/rubocop/lockfile.rb#37 - def gems; end - - # Whether this lockfile includes the named gem, directly or indirectly. - # - # @api private - # @param name [String] - # @return [Boolean] - # - # source://rubocop//lib/rubocop/lockfile.rb#65 - def includes_gem?(name); end - - private - - # @api private - # @return [Bundler::LockfileParser, nil] - # - # source://rubocop//lib/rubocop/lockfile.rb#72 - def parser; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/lockfile.rb#85 - def use_bundler_lock_parser?; end -end - -# Parse different formats of magic comments. -# -# @abstract parent of three different magic comment handlers -# -# source://rubocop//lib/rubocop/magic_comment.rb#7 -class RuboCop::MagicComment - # @return [MagicComment] a new instance of MagicComment - # - # source://rubocop//lib/rubocop/magic_comment.rb#32 - def initialize(comment); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/magic_comment.rb#36 - def any?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/magic_comment.rb#104 - def encoding_specified?; end - - # Expose the `frozen_string_literal` value coerced to a boolean if possible. - # - # @return [Boolean] if value is `true` or `false` in any case - # @return [nil] if frozen_string_literal comment isn't found - # @return [String] if comment is found but isn't true or false - # - # source://rubocop//lib/rubocop/magic_comment.rb#86 - def frozen_string_literal; end - - # Does the magic comment enable the frozen string literal feature. - # - # Test whether the frozen string literal value is `true`. Cannot - # just return `frozen_string_literal` since an invalid magic comment - # `'yes'` does not actually enable the feature - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/magic_comment.rb#55 - def frozen_string_literal?; end - - # Was a magic comment for the frozen string literal found? - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/magic_comment.rb#70 - def frozen_string_literal_specified?; end - - # Expose the `shareable_constant_value` value coerced to a boolean if possible. - # - # @return [String] for shareable_constant_value config - # - # source://rubocop//lib/rubocop/magic_comment.rb#100 - def shareable_constant_value; end - - # Was a shareable_constant_value specified? - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/magic_comment.rb#77 - def shareable_constant_value_specified?; end - - # source://rubocop//lib/rubocop/magic_comment.rb#115 - def typed; end - - # Was the Sorbet `typed` sigil specified? - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/magic_comment.rb#111 - def typed_specified?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/magic_comment.rb#43 - def valid?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/magic_comment.rb#59 - def valid_literal_value?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/magic_comment.rb#63 - def valid_shareable_constant_value?; end - - private - - # Match the entire comment string with a pattern and take the first capture. - # - # @param pattern [Regexp] - # @return [String] if pattern matched - # @return [nil] otherwise - # - # source://rubocop//lib/rubocop/magic_comment.rb#131 - def extract(pattern); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/magic_comment.rb#121 - def specified?(value); end - - class << self - # Detect magic comment format and pass it to the appropriate wrapper. - # - # @param comment [String] - # @return [RuboCop::MagicComment] - # - # source://rubocop//lib/rubocop/magic_comment.rb#23 - def parse(comment); end - end -end - -# Parent to Vim and Emacs magic comment handling. -# -# @abstract -# -# source://rubocop//lib/rubocop/magic_comment.rb#138 -class RuboCop::MagicComment::EditorComment < ::RuboCop::MagicComment - # source://rubocop//lib/rubocop/magic_comment.rb#139 - def encoding; end - - # Rewrite the comment without a given token type - # - # source://rubocop//lib/rubocop/magic_comment.rb#144 - def without(type); end - - private - - # Find a token starting with the provided keyword and extract its value. - # - # @param keyword [String] - # @return [String] extracted value if it is found - # @return [nil] otherwise - # - # source://rubocop//lib/rubocop/magic_comment.rb#159 - def match(keyword); end - - # Individual tokens composing an editor specific comment string. - # - # @return [Array] - # - # source://rubocop//lib/rubocop/magic_comment.rb#174 - def tokens; end -end - -# Wrapper for Emacs style magic comments. -# -# @example Emacs style comment -# comment = RuboCop::MagicComment.parse( -# '# -*- encoding: ASCII-8BIT -*-' -# ) -# -# comment.encoding # => 'ascii-8bit' -# @see https://www.gnu.org/software/emacs/manual/html_node/emacs/Specify-Coding.html -# @see https://github.com/ruby/ruby/blob/3f306dc/parse.y#L6873-L6892 Emacs handling in parse.y -# -# source://rubocop//lib/rubocop/magic_comment.rb#190 -class RuboCop::MagicComment::EmacsComment < ::RuboCop::MagicComment::EditorComment - private - - # source://rubocop//lib/rubocop/magic_comment.rb#198 - def extract_frozen_string_literal; end - - # source://rubocop//lib/rubocop/magic_comment.rb#202 - def extract_shareable_constant_value; end - - # Emacs comments cannot specify Sorbet typechecking behavior. - # - # source://rubocop//lib/rubocop/magic_comment.rb#207 - def extract_typed; end -end - -# source://rubocop//lib/rubocop/magic_comment.rb#192 -RuboCop::MagicComment::EmacsComment::FORMAT = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/magic_comment.rb#194 -RuboCop::MagicComment::EmacsComment::OPERATOR = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/magic_comment.rb#191 -RuboCop::MagicComment::EmacsComment::REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/magic_comment.rb#193 -RuboCop::MagicComment::EmacsComment::SEPARATOR = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/magic_comment.rb#11 -RuboCop::MagicComment::KEYWORDS = T.let(T.unsafe(nil), Hash) - -# Wrapper for regular magic comments not bound to an editor. -# -# Simple comments can only specify one setting per comment. -# -# @example frozen string literal comments -# comment1 = RuboCop::MagicComment.parse('# frozen_string_literal: true') -# comment1.frozen_string_literal # => true -# comment1.encoding # => nil -# @example encoding comments -# comment2 = RuboCop::MagicComment.parse('# encoding: utf-8') -# comment2.frozen_string_literal # => nil -# comment2.encoding # => 'utf-8' -# -# source://rubocop//lib/rubocop/magic_comment.rb#261 -class RuboCop::MagicComment::SimpleComment < ::RuboCop::MagicComment - # Match `encoding` or `coding` - # - # 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#270 - def without(type); end - - private - - # Extract `frozen_string_literal`. - # - # The `frozen_string_literal` magic comment only works if it - # is the only text in the comment. - # - # Case-insensitive and dashes/underscores are acceptable. - # - # @see https://github.com/ruby/ruby/blob/78b95b49f8/parse.y#L7134-L7138 - # - # source://rubocop//lib/rubocop/magic_comment.rb#287 - def extract_frozen_string_literal; end - - # source://rubocop//lib/rubocop/magic_comment.rb#291 - def extract_shareable_constant_value; end - - # 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), String) - -# Wrapper for Vim style magic comments. -# -# @example Vim style comment -# comment = RuboCop::MagicComment.parse( -# '# vim: filetype=ruby, fileencoding=ascii-8bit' -# ) -# -# comment.encoding # => 'ascii-8bit' -# -# source://rubocop//lib/rubocop/magic_comment.rb#218 -class RuboCop::MagicComment::VimComment < ::RuboCop::MagicComment::EditorComment - # For some reason the fileencoding keyword only works if there - # is at least one other token included in the string. For example - # - # # works - # # vim: foo=bar, fileencoding=ascii-8bit - # - # # does nothing - # # vim: foo=bar, fileencoding=ascii-8bit - # - # source://rubocop//lib/rubocop/magic_comment.rb#234 - def encoding; end - - # Vim comments cannot specify Sorbet typechecking behavior. - # - # source://rubocop//lib/rubocop/magic_comment.rb#245 - def extract_typed; end - - # Vim comments cannot specify frozen string literal behavior. - # - # source://rubocop//lib/rubocop/magic_comment.rb#239 - def frozen_string_literal; end - - # Vim comments cannot specify shareable constant values behavior. - # - # source://rubocop//lib/rubocop/magic_comment.rb#242 - def shareable_constant_value; end -end - -# source://rubocop//lib/rubocop/magic_comment.rb#220 -RuboCop::MagicComment::VimComment::FORMAT = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/magic_comment.rb#223 -RuboCop::MagicComment::VimComment::KEYWORDS = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/magic_comment.rb#222 -RuboCop::MagicComment::VimComment::OPERATOR = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/magic_comment.rb#219 -RuboCop::MagicComment::VimComment::REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/magic_comment.rb#221 -RuboCop::MagicComment::VimComment::SEPARATOR = T.let(T.unsafe(nil), String) - -# Common functionality for finding names that are similar to a given name. -# -# @api private -# -# source://rubocop//lib/rubocop/name_similarity.rb#6 -module RuboCop::NameSimilarity - private - - # @api private - # - # source://rubocop//lib/rubocop/name_similarity.rb#9 - def find_similar_name(target_name, names); end - - # @api private - # - # source://rubocop//lib/rubocop/name_similarity.rb#15 - def find_similar_names(target_name, names); end - - class << self - # @api private - # - # source://rubocop//lib/rubocop/name_similarity.rb#9 - def find_similar_name(target_name, names); end - - # @api private - # - # source://rubocop//lib/rubocop/name_similarity.rb#15 - def find_similar_names(target_name, names); end - end -end - -# source://rubocop//lib/rubocop/ast_aliases.rb#5 -RuboCop::NodePattern = RuboCop::AST::NodePattern - -# source://rubocop//lib/rubocop/options.rb#10 -class RuboCop::OptionArgumentError < ::StandardError; end - -# This class handles command line options. -# -# @api private -# -# source://rubocop//lib/rubocop/options.rb#14 -class RuboCop::Options - # @api private - # @return [Options] a new instance of Options - # - # source://rubocop//lib/rubocop/options.rb#22 - def initialize; end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#27 - def parse(command_line_args); end - - private - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#229 - def add_additional_modes(opts); end - - # the autocorrect command-line arguments map to the autocorrect @options values like so: - # :fix_layout :autocorrect :safe_autocorrect :autocorrect_all - # -x, --fix-layout true true - - - # -a, --auto-correct - true true - - # --safe-auto-correct - true true - - # -A, --auto-correct-all - true - true - # - # @api private - # - # source://rubocop//lib/rubocop/options.rb#140 - def add_autocorrection_options(opts); end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#205 - def add_cache_options(opts); end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#73 - def add_check_options(opts); end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#163 - def add_config_generation_options(opts); end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#181 - def add_cop_selection_csv_option(option, opts); end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#241 - def add_general_options(opts); end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#212 - def add_lsp_option(opts); end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#105 - def add_output_options(opts); end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#254 - def add_profile_options(opts); end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#218 - def add_server_options(opts); end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#196 - def add_severity_option(opts); end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#53 - def define_options; end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#264 - def handle_deprecated_option(old_option, new_option); end - - # Finds the option in `args` starting with -- and converts it to a symbol, - # e.g. [..., '--autocorrect', ...] to :autocorrect. - # - # @api private - # - # source://rubocop//lib/rubocop/options.rb#298 - def long_opt_symbol(args); end - - # Sets a value in the @options hash, based on the given long option and its - # value, in addition to calling the block if a block is given. - # - # @api private - # - # source://rubocop//lib/rubocop/options.rb#287 - def option(opts, *args); end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#303 - def plugin_feature(file); end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#269 - def rainbow; end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#309 - def require_feature(file); end - - # Creates a section of options in order to separate them visually when - # using `--help`. - # - # @api private - # - # source://rubocop//lib/rubocop/options.rb#279 - def section(opts, heading, &_block); end -end - -# @api private -# -# source://rubocop//lib/rubocop/options.rb#20 -RuboCop::Options::DEFAULT_MAXIMUM_EXCLUSION_ITEMS = T.let(T.unsafe(nil), Integer) - -# @api private -# -# source://rubocop//lib/rubocop/options.rb#19 -RuboCop::Options::EXITING_OPTIONS = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://rubocop//lib/rubocop/options.rb#15 -RuboCop::Options::E_STDIN_NO_PATH = T.let(T.unsafe(nil), String) - -# This module contains help texts for command line options. -# -# @api private -# -# source://rubocop//lib/rubocop/options.rb#512 -module RuboCop::OptionsHelp; end - -# @api private -# -# source://rubocop//lib/rubocop/options.rb#514 -RuboCop::OptionsHelp::FORMATTER_OPTION_LIST = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://rubocop//lib/rubocop/options.rb#513 -RuboCop::OptionsHelp::MAX_EXCL = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/options.rb#516 -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#327 -class RuboCop::OptionsValidator - # @api private - # @return [OptionsValidator] a new instance of OptionsValidator - # - # source://rubocop//lib/rubocop/options.rb#365 - def initialize(options); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/options.rb#486 - def boolean_or_empty_cache?; end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#456 - def disable_parallel_when_invalid_option_combo; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/options.rb#482 - def except_syntax?; end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#490 - def incompatible_options; end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#469 - def invalid_arguments_for_parallel; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/options.rb#477 - def only_includes_redundant_disable?; end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#397 - def validate_auto_gen_config; end - - # @api private - # @raise [OptionArgumentError] - # - # source://rubocop//lib/rubocop/options.rb#442 - def validate_autocorrect; end - - # @api private - # @raise [OptionArgumentError] - # - # source://rubocop//lib/rubocop/options.rb#502 - def validate_cache_enabled_for_cache_root; end - - # @api private - # @raise [OptionArgumentError] - # - # source://rubocop//lib/rubocop/options.rb#374 - def validate_compatibility; end - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#369 - def validate_cop_options; end - - # @api private - # @raise [OptionArgumentError] - # - # source://rubocop//lib/rubocop/options.rb#418 - def validate_display_only_correctable_and_autocorrect; end - - # @api private - # @raise [OptionArgumentError] - # - # source://rubocop//lib/rubocop/options.rb#410 - def validate_display_only_failed; end - - # @api private - # @raise [OptionArgumentError] - # - # source://rubocop//lib/rubocop/options.rb#427 - def validate_display_only_failed_and_display_only_correctable; end - - # @api private - # @raise [OptionParser::MissingArgument] - # - # source://rubocop//lib/rubocop/options.rb#494 - def validate_exclude_limit_option; end - - # @api private - # @raise [OptionArgumentError] - # - # source://rubocop//lib/rubocop/options.rb#436 - def validate_lsp_and_editor_mode; end - - class << self - # Cop name validation must be done later than option parsing, so it's not - # called from within Options. - # - # @api private - # - # source://rubocop//lib/rubocop/options.rb#334 - def validate_cop_list(names); end - - private - - # @api private - # - # source://rubocop//lib/rubocop/options.rb#351 - def format_message_from(name, cop_names); end - end -end - -# Common methods and behaviors for dealing with paths. -# -# source://rubocop//lib/rubocop/path_util.rb#5 -module RuboCop::PathUtil - private - - # Returns true for an absolute Unix or Windows path. - # - # source://rubocop//lib/rubocop/path_util.rb#83 - def absolute?(path); end - - # Returns true for a glob - # - # source://rubocop//lib/rubocop/path_util.rb#88 - def glob?(path); end - - # source://rubocop//lib/rubocop/path_util.rb#118 - def hidden_dir?(path); end - - # source://rubocop//lib/rubocop/path_util.rb#101 - def hidden_file?(path); end - - # source://rubocop//lib/rubocop/path_util.rb#92 - def hidden_file_in_not_hidden_dir?(pattern, path); end - - # source://rubocop//lib/rubocop/path_util.rb#55 - def match_path?(pattern, path); end - - # Loose check to reduce memory allocations - # - # source://rubocop//lib/rubocop/path_util.rb#108 - def maybe_hidden_file?(path); end - - # source://rubocop//lib/rubocop/path_util.rb#13 - def relative_path(path, base_dir = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/path_util.rb#31 - def remote_file?(uri); end - - # source://rubocop//lib/rubocop/path_util.rb#38 - def smart_path(path); end - - class << self - # Returns true for an absolute Unix or Windows path. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/path_util.rb#83 - def absolute?(path); end - - # Returns true for a glob - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/path_util.rb#88 - def glob?(path); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/path_util.rb#118 - def hidden_dir?(path); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/path_util.rb#101 - def hidden_file?(path); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/path_util.rb#92 - def hidden_file_in_not_hidden_dir?(pattern, path); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/path_util.rb#55 - def match_path?(pattern, path); end - - # Loose check to reduce memory allocations - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/path_util.rb#108 - def maybe_hidden_file?(path); end - - # source://rubocop//lib/rubocop/path_util.rb#13 - def relative_path(path, base_dir = T.unsafe(nil)); end - - # Returns the value of attribute relative_paths_cache. - # - # source://rubocop//lib/rubocop/path_util.rb#7 - def relative_paths_cache; end - - # Sets the attribute relative_paths_cache - # - # @param value the value to set the attribute relative_paths_cache to. - # - # source://rubocop//lib/rubocop/path_util.rb#7 - def relative_paths_cache=(_arg0); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/path_util.rb#31 - def remote_file?(uri); end - - # source://rubocop//lib/rubocop/path_util.rb#38 - def smart_path(path); end - end -end - -# source://rubocop//lib/rubocop/path_util.rb#105 -RuboCop::PathUtil::HIDDEN_FILE_PATTERN = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/path_util.rb#35 -RuboCop::PathUtil::SMART_PATH_CACHE = T.let(T.unsafe(nil), Hash) - -# This module provides information on the platform that RuboCop is being run -# on. -# -# source://rubocop//lib/rubocop/platform.rb#6 -module RuboCop::Platform - class << self - # @return [Boolean] - # - # source://rubocop//lib/rubocop/platform.rb#7 - def windows?; end - end -end - -# Provides a plugin for RuboCop extensions that conform to lint_roller. -# https://github.com/standardrb/lint_roller -# -# @api private -# -# source://rubocop//lib/rubocop/plugin/not_supported_error.rb#4 -module RuboCop::Plugin - class << self - # @api private - # - # source://rubocop//lib/rubocop/plugin.rb#37 - def integrate_plugins(rubocop_config, plugins); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/plugin.rb#22 - def plugin_capable?(feature_name); end - end -end - -# @api private -# -# source://rubocop//lib/rubocop/plugin.rb#11 -RuboCop::Plugin::BUILTIN_INTERNAL_PLUGINS = T.let(T.unsafe(nil), Hash) - -# A class for integrating plugin configurations into RuboCop. -# Handles configuration merging, validation, and compatibility for plugins. -# -# @api private -# -# source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#11 -class RuboCop::Plugin::ConfigurationIntegrator - class << self - # @api private - # - # source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#13 - def integrate_plugins_into_rubocop_config(rubocop_config, plugins); end - - private - - # @api private - # - # source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#44 - def combine_rubocop_configs(default_config, runner_context, plugins); end - - # @api private - # - # source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#27 - def create_context(rubocop_config); end - - # @api private - # - # source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#81 - def fake_out_rubocop_default_configuration(default_config); end - - # @api private - # - # source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#92 - def load_plugin_rubocop_config(plugin, runner_context); end - - # This is how we ensure "first-in wins": plugins can override AllCops settings that are - # set by RuboCop's default configuration, but once a plugin sets an AllCop setting, they - # have exclusive first-in-wins rights to that setting. - # - # The one exception to this are array fields, because we don't want to - # overwrite the AllCops defaults but rather munge the arrays (`existing | - # new`) to allow plugins to add to the array, for example Include and - # Exclude paths and patterns. - # - # @api private - # - # source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#118 - def merge_all_cop_settings(existing_all_cops, new_all_cops, already_configured_keys); end - - # @api private - # - # source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#67 - def merge_plugin_config_into_all_cops!(rubocop_config, plugin_config); end - - # @api private - # - # source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#71 - def merge_plugin_config_into_default_config!(default_config, plugin_config); end - - # @api private - # - # source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#137 - def resolver; end - - # @api private - # @raise [Plugin::NotSupportedError] - # - # source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#37 - def validate_plugins!(plugins, runner_context); end - end -end - -# @api private -# -# source://rubocop//lib/rubocop/plugin.rb#18 -RuboCop::Plugin::INTERNAL_AFFAIRS_PLUGIN_NAME = T.let(T.unsafe(nil), String) - -# An exception raised when a plugin fails to load. -# -# @api private -# -# source://rubocop//lib/rubocop/plugin/load_error.rb#7 -class RuboCop::Plugin::LoadError < ::RuboCop::Error - # @api private - # @return [LoadError] a new instance of LoadError - # - # source://rubocop//lib/rubocop/plugin/load_error.rb#8 - def initialize(plugin_name); end - - # @api private - # - # source://rubocop//lib/rubocop/plugin/load_error.rb#14 - def message; end -end - -# A class for loading and resolving plugins. -# -# @api private -# -# source://rubocop//lib/rubocop/plugin/loader.rb#10 -class RuboCop::Plugin::Loader - class << self - # @api private - # - # source://rubocop//lib/rubocop/plugin/loader.rb#20 - def load(plugins); end - - private - - # @api private - # - # source://rubocop//lib/rubocop/plugin/loader.rb#70 - def constantize(plugin_name, plugin_config); end - - # @api private - # - # source://rubocop//lib/rubocop/plugin/loader.rb#61 - def constantize_plugin_from(plugin_name, plugin_config); end - - # @api private - # - # source://rubocop//lib/rubocop/plugin/loader.rb#90 - def constantize_plugin_from_gemspec_metadata(plugin_name); end - - # @api private - # - # source://rubocop//lib/rubocop/plugin/loader.rb#34 - def normalize(plugin_configs); end - - # @api private - # - # source://rubocop//lib/rubocop/plugin/loader.rb#86 - def require_plugin(require_path); end - end -end - -# @api private -# -# source://rubocop//lib/rubocop/plugin/loader.rb#12 -RuboCop::Plugin::Loader::DEFAULT_PLUGIN_CONFIG = T.let(T.unsafe(nil), Hash) - -# An exception raised when a plugin is not supported by the RuboCop engine. -# -# @api private -# -# source://rubocop//lib/rubocop/plugin/not_supported_error.rb#7 -class RuboCop::Plugin::NotSupportedError < ::RuboCop::Error - # @api private - # @return [NotSupportedError] a new instance of NotSupportedError - # - # source://rubocop//lib/rubocop/plugin/not_supported_error.rb#8 - def initialize(unsupported_plugins); end - - # @api private - # - # source://rubocop//lib/rubocop/plugin/not_supported_error.rb#14 - def message; end -end - -# @api private -# -# source://rubocop//lib/rubocop/plugin.rb#19 -RuboCop::Plugin::OBSOLETE_INTERNAL_AFFAIRS_PLUGIN_NAME = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/ast_aliases.rb#6 -RuboCop::ProcessedSource = RuboCop::AST::ProcessedSource - -# Common methods and behaviors for dealing with remote config files. -# -# @api private -# -# source://rubocop//lib/rubocop/remote_config.rb#9 -class RuboCop::RemoteConfig - # @api private - # @return [RemoteConfig] a new instance of RemoteConfig - # - # source://rubocop//lib/rubocop/remote_config.rb#14 - def initialize(url, base_dir); end - - # @api private - # - # source://rubocop//lib/rubocop/remote_config.rb#23 - def file; end - - # @api private - # - # source://rubocop//lib/rubocop/remote_config.rb#36 - def inherit_from_remote(file, path); end - - # @api private - # - # source://rubocop//lib/rubocop/remote_config.rb#10 - def uri; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/remote_config.rb#99 - def cache_name_from_uri; end - - # @api private - # - # source://rubocop//lib/rubocop/remote_config.rb#82 - def cache_path; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/remote_config.rb#86 - def cache_path_exists?; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/remote_config.rb#90 - def cache_path_expired?; end - - # @api private - # - # source://rubocop//lib/rubocop/remote_config.rb#105 - def cloned_url; end - - # @api private - # @yield [request] - # - # source://rubocop//lib/rubocop/remote_config.rb#57 - def generate_request(uri); end - - # @api private - # - # source://rubocop//lib/rubocop/remote_config.rb#66 - def handle_response(response, limit, &block); end - - # @api private - # @raise [ArgumentError] - # - # source://rubocop//lib/rubocop/remote_config.rb#44 - def request(uri = T.unsafe(nil), limit = T.unsafe(nil), &block); end -end - -# @api private -# -# source://rubocop//lib/rubocop/remote_config.rb#12 -RuboCop::RemoteConfig::CACHE_LIFETIME = T.let(T.unsafe(nil), Integer) - -# Provides functionality for caching RuboCop runs. -# -# @api private -# -# 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#87 - def initialize(file, team, options, config_store, cache_root_override = T.unsafe(nil)); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/result_cache.rb#100 - def debug?; end - - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#108 - def load; end - - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#85 - def path; end - - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#113 - def save(offenses); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/result_cache.rb#104 - def valid?; end - - private - - # @api private - # @return [Boolean] - # - # 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 - # making file names that are too long for some filesystems to handle. - # This context is for anything that's not (1) the RuboCop executable - # checksum or (2) the inspected file checksum. - # - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#229 - def context_checksum(team, options); end - - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#189 - def digest(path); end - - # @api private - # - # 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 - # no effect on which offenses and disabled line ranges are found, and thus - # don't affect caching. - # - # @api private - # - # 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#174 - def rubocop_checksum; end - - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#200 - def rubocop_extra_features; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/result_cache.rb#142 - def symlink_protection_triggered?(path); end - - class << self - # @api private - # @return [Boolean] - # - # 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#75 - def cache_root(config_store, cache_root_override = T.unsafe(nil)); end - - # Remove old files so that the cache doesn't grow too big. When the - # threshold MaxFilesInCache has been exceeded, the oldest 50% of all the - # files in the cache are removed. The reason for removing so much is that - # cleaning should be done relatively seldom, since there is a slight risk - # that some other RuboCop process was just about to read the file, when - # there's parallel execution and the cache is shared. - # - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#28 - def cleanup(config_store, verbose, cache_root_override = T.unsafe(nil)); end - - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#170 - def inhibit_cleanup; end - - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#170 - def inhibit_cleanup=(_arg0); end - - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#42 - def rubocop_required_features; end - - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#42 - def rubocop_required_features=(_arg0); end - - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#170 - def source_checksum; end - - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#170 - def source_checksum=(_arg0); end - - private - - # @api private - # - # 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#52 - def remove_oldest_files(files, dirs, rubocop_cache_dir, verbose); end - - # @api private - # @return [Boolean] - # - # 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#16 -RuboCop::ResultCache::DL_EXTENSIONS = T.let(T.unsafe(nil), Array) - -# @api private -# -# 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 -# formatters and letting cops inspect the files. -# -# source://rubocop//lib/rubocop/runner.rb#8 -class RuboCop::Runner - # @return [Runner] a new instance of Runner - # - # source://rubocop//lib/rubocop/runner.rb#59 - def initialize(options, config_store); end - - # Sets the attribute aborting - # - # @param value the value to set the attribute aborting to. - # - # source://rubocop//lib/rubocop/runner.rb#57 - def aborting=(_arg0); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/runner.rb#83 - def aborting?; end - - # Returns the value of attribute errors. - # - # source://rubocop//lib/rubocop/runner.rb#56 - def errors; end - - # source://rubocop//lib/rubocop/runner.rb#67 - def run(paths); end - - # Returns the value of attribute warnings. - # - # source://rubocop//lib/rubocop/runner.rb#56 - def warnings; end - - private - - # source://rubocop//lib/rubocop/runner.rb#199 - def add_redundant_disables(file, offenses, source); end - - # source://rubocop//lib/rubocop/runner.rb#173 - def cached_result(file, team); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/runner.rb#253 - def cached_run?; end - - # Check whether a run created source identical to a previous run, which - # means that we definitely have an infinite loop. - # - # source://rubocop//lib/rubocop/runner.rb#331 - def check_for_infinite_loop(processed_source, offenses_by_iteration); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/runner.rb#225 - def check_for_redundant_disables?(source); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/runner.rb#433 - def considered_failure?(offense); end - - # source://rubocop//lib/rubocop/runner.rb#470 - def default_config(cop_name); end - - # source://rubocop//lib/rubocop/runner.rb#275 - def do_inspection_loop(file); end - - # source://rubocop//lib/rubocop/runner.rb#133 - def each_inspected_file(files); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/runner.rb#239 - def except_redundant_cop_disable_directive?; end - - # source://rubocop//lib/rubocop/runner.rb#360 - def extract_ruby_sources(processed_source); end - - # source://rubocop//lib/rubocop/runner.rb#248 - def file_finished(file, offenses); end - - # source://rubocop//lib/rubocop/runner.rb#177 - def file_offense_cache(file); end - - # source://rubocop//lib/rubocop/runner.rb#165 - def file_offenses(file); end - - # source://rubocop//lib/rubocop/runner.rb#243 - def file_started(file); end - - # source://rubocop//lib/rubocop/runner.rb#413 - def filter_cop_classes(cop_classes, config); end - - # source://rubocop//lib/rubocop/runner.rb#104 - def find_target_files(paths); end - - # source://rubocop//lib/rubocop/runner.rb#424 - def formatter_set; end - - # source://rubocop//lib/rubocop/runner.rb#485 - def get_processed_source(file); end - - # source://rubocop//lib/rubocop/runner.rb#345 - def inspect_file(processed_source, team = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/runner.rb#115 - def inspect_files(files); end - - # source://rubocop//lib/rubocop/runner.rb#306 - def iterate_until_no_changes(source, offenses_by_iteration); end - - # source://rubocop//lib/rubocop/runner.rb#148 - def list_files(paths); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/runner.rb#466 - def mark_as_safe_by_config?(config); end - - # source://rubocop//lib/rubocop/runner.rb#474 - def minimum_severity_to_fail; end - - # source://rubocop//lib/rubocop/runner.rb#374 - def mobilize_team(processed_source); end - - # source://rubocop//lib/rubocop/runner.rb#379 - def mobilized_cop_classes(config); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/runner.rb#442 - def offense_displayed?(offense); end - - # source://rubocop//lib/rubocop/runner.rb#454 - def offenses_to_report(offenses); end - - # source://rubocop//lib/rubocop/runner.rb#152 - def process_file(file); end - - # source://rubocop//lib/rubocop/runner.rb#403 - def qualify_option_cop_names; end - - # @yield [cop] - # - # source://rubocop//lib/rubocop/runner.rb#231 - def redundant_cop_disable_directive(file); end - - # source://rubocop//lib/rubocop/runner.rb#265 - def save_in_cache(cache, offenses); end - - # A Cop::Team instance is stateful and may change when inspecting. - # The "standby" team for a given config is an initialized but - # otherwise dormant team that can be used for config- and option- - # level caching in ResultCache. - # - # source://rubocop//lib/rubocop/runner.rb#513 - def standby_team(config); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/runner.rb#420 - def style_guide_cops_only?(config); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/runner.rb#458 - def supports_safe_autocorrect?(offense); end - - # @yield [team] - # - # source://rubocop//lib/rubocop/runner.rb#214 - def team_for_redundant_disables(file, offenses, source); end - - # Warms up the RuboCop cache by forking a suitable number of RuboCop - # instances that each inspects its allotted group of files. - # - # source://rubocop//lib/rubocop/runner.rb#91 - def warm_cache(target_files); end - - class << self - # @return [Array<#call>] - # - # source://rubocop//lib/rubocop/runner.rb#29 - def ruby_extractors; end - - private - - # @return [#call] - # - # source://rubocop//lib/rubocop/runner.rb#36 - def default_ruby_extractor; end - end -end - -# An exception indicating that the inspection loop got stuck correcting -# offenses back and forth. -# -# source://rubocop//lib/rubocop/runner.rb#11 -class RuboCop::Runner::InfiniteCorrectionLoop < ::StandardError - # @return [InfiniteCorrectionLoop] a new instance of InfiniteCorrectionLoop - # - # source://rubocop//lib/rubocop/runner.rb#14 - def initialize(path, offenses_by_iteration, loop_start: T.unsafe(nil)); end - - # Returns the value of attribute offenses. - # - # source://rubocop//lib/rubocop/runner.rb#12 - def offenses; end -end - -# @api private -# -# source://rubocop//lib/rubocop/runner.rb#49 -RuboCop::Runner::MAX_ITERATIONS = T.let(T.unsafe(nil), Integer) - -# @api private -# -# source://rubocop//lib/rubocop/runner.rb#52 -RuboCop::Runner::REDUNDANT_COP_DISABLE_DIRECTIVE_RULES = T.let(T.unsafe(nil), Array) - -# Take a string with embedded escapes, and convert the escapes as the Ruby -# interpreter would when reading a double-quoted string literal. -# For example, "\\n" will be converted to "\n". -# -# source://rubocop//lib/rubocop/string_interpreter.rb#7 -class RuboCop::StringInterpreter - class << self - # source://rubocop//lib/rubocop/string_interpreter.rb#24 - def interpret(string); end - - private - - # source://rubocop//lib/rubocop/string_interpreter.rb#51 - def interpret_hex(escape); end - - # source://rubocop//lib/rubocop/string_interpreter.rb#55 - def interpret_octal(escape); end - - # source://rubocop//lib/rubocop/string_interpreter.rb#33 - def interpret_string_escape(escape); end - - # source://rubocop//lib/rubocop/string_interpreter.rb#43 - def interpret_unicode(escape); end - end -end - -# source://rubocop//lib/rubocop/string_interpreter.rb#8 -RuboCop::StringInterpreter::STRING_ESCAPES = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/string_interpreter.rb#12 -RuboCop::StringInterpreter::STRING_ESCAPE_REGEX = T.let(T.unsafe(nil), Regexp) - -# This class finds target files to inspect by scanning the directory tree and picking ruby files. -# -# @api private -# -# source://rubocop//lib/rubocop/target_finder.rb#6 -class RuboCop::TargetFinder - # @api private - # @return [TargetFinder] a new instance of TargetFinder - # - # source://rubocop//lib/rubocop/target_finder.rb#9 - def initialize(config_store, options = T.unsafe(nil)); end - - # Generate a list of target files by expanding globbing patterns (if any). If args is empty, - # recursively find all Ruby source files under the current directory - # - # @api private - # @return [Array] array of file paths - # - # source://rubocop//lib/rubocop/target_finder.rb#17 - def find(args, mode); end - - # Search for files recursively starting at the given base directory using the given flags that - # determine how the match is made. Excluded files will be removed later by the caller, but as an - # optimization find_files removes the top level directories that are excluded in configuration - # in the normal way (dir/**/*). - # - # @api private - # - # source://rubocop//lib/rubocop/target_finder.rb#58 - def find_files(base_dir, flags); end - - # Finds all Ruby source files under the current or other supplied directory. A Ruby source file - # is defined as a file with the `.rb` extension or a file with no extension that has a ruby - # shebang line as its first line. - # It is possible to specify includes and excludes using the config file, so you can include - # other Ruby files like Rakefiles and gemspecs. - # - # @api private - # @param base_dir Root directory under which to search for - # ruby source files - # @return [Array] Array of filenames - # - # source://rubocop//lib/rubocop/target_finder.rb#41 - def target_files_in_dir(base_dir = T.unsafe(nil)); end - - private - - # @api private - # - # source://rubocop//lib/rubocop/target_finder.rb#120 - def all_cops_include; end - - # @api private - # - # source://rubocop//lib/rubocop/target_finder.rb#106 - def combined_exclude_glob_patterns(base_dir); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/target_finder.rb#173 - def configured_include?(file); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/target_finder.rb#209 - def debug?; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/target_finder.rb#213 - def fail_fast?; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/target_finder.rb#201 - def force_exclusion?; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/target_finder.rb#205 - def ignore_parent_exclusion?; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/target_finder.rb#146 - def included_file?(file); end - - # @api private - # - # source://rubocop//lib/rubocop/target_finder.rb#192 - def order; end - - # @api private - # - # source://rubocop//lib/rubocop/target_finder.rb#124 - def process_explicit_path(path, mode); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/target_finder.rb#177 - def ruby_executable?(file); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/target_finder.rb#158 - def ruby_extension?(file); end - - # @api private - # - # source://rubocop//lib/rubocop/target_finder.rb#162 - def ruby_extensions; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/target_finder.rb#150 - def ruby_file?(file); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/target_finder.rb#169 - def ruby_filename?(file); end - - # @api private - # - # source://rubocop//lib/rubocop/target_finder.rb#113 - def ruby_filenames; end - - # @api private - # - # source://rubocop//lib/rubocop/target_finder.rb#188 - def ruby_interpreters(file); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/target_finder.rb#154 - def stdin?; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/target_finder.rb#98 - def symlink_excluded_or_infinite_loop?(base_dir, current_dir, exclude_pattern, flags); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/target_finder.rb#73 - def to_inspect?(file, hidden_files, base_dir_config); end - - # @api private - # - # source://rubocop//lib/rubocop/target_finder.rb#82 - def wanted_dir_patterns(base_dir, exclude_pattern, flags); end - - # @api private - # - # source://rubocop//lib/rubocop/target_finder.rb#135 - def without_excluded(files); end -end - -# @api private -# -# source://rubocop//lib/rubocop/target_finder.rb#7 -RuboCop::TargetFinder::HIDDEN_PATH_SUBSTRING = T.let(T.unsafe(nil), String) - -# The kind of Ruby that code inspected by RuboCop is written in. -# -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#6 -class RuboCop::TargetRuby - # @api private - # @return [TargetRuby] a new instance of TargetRuby - # - # source://rubocop//lib/rubocop/target_ruby.rb#273 - def initialize(config); end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#289 - def rubocop_version_with_support; end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#277 - def source; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/target_ruby.rb#285 - def supported?; end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#281 - def version; end - - class << self - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#258 - def supported_versions; end - end -end - -# The lock file of Bundler may identify the target ruby version. -# -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#205 -class RuboCop::TargetRuby::BundlerLockFile < ::RuboCop::TargetRuby::Source - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#206 - def name; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#239 - def bundler_lock_file_path; end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#212 - def find_version; end -end - -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#8 -RuboCop::TargetRuby::DEFAULT_VERSION = T.let(T.unsafe(nil), Float) - -# If all else fails, a default version will be picked. -# -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#246 -class RuboCop::TargetRuby::Default < ::RuboCop::TargetRuby::Source - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#247 - def name; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#253 - def find_version; end -end - -# The target ruby version may be found in a .gemspec file. -# -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#67 -class RuboCop::TargetRuby::GemspecFile < ::RuboCop::TargetRuby::Source - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop//lib/rubocop/target_ruby.rb#76 - def gem_requirement_versions(param0 = T.unsafe(nil)); end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#82 - def name; end - - # source://rubocop//lib/rubocop/target_ruby.rb#71 - def required_ruby_version(param0); end - - private - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#137 - def find_minimal_known_ruby(right_hand_side); end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#88 - def find_version; end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#98 - def gemspec_filepath; end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#133 - def version_from_array(array); end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#112 - def version_from_gemspec_file(file); end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#121 - def version_from_right_hand_side(right_hand_side); end -end - -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#7 -RuboCop::TargetRuby::KNOWN_RUBIES = T.let(T.unsafe(nil), Array) - -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#10 -RuboCop::TargetRuby::OBSOLETE_RUBIES = T.let(T.unsafe(nil), Hash) - -# The target ruby version may be configured in RuboCop's config. -# -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#53 -class RuboCop::TargetRuby::RuboCopConfig < ::RuboCop::TargetRuby::Source - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#54 - def name; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#60 - def find_version; end -end - -# The target ruby version may be configured by setting the -# `RUBOCOP_TARGET_RUBY_VERSION` environment variable. -# -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#39 -class RuboCop::TargetRuby::RuboCopEnvVar < ::RuboCop::TargetRuby::Source - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#40 - def name; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#46 - def find_version; end -end - -# The target ruby version may be found in a .ruby-version file. -# -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#151 -class RuboCop::TargetRuby::RubyVersionFile < ::RuboCop::TargetRuby::Source - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#155 - def name; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#161 - def filename; end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#169 - def find_version; end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#165 - def pattern; end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#176 - def version_file; end -end - -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#152 -RuboCop::TargetRuby::RubyVersionFile::RUBY_VERSION_FILENAME = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#153 -RuboCop::TargetRuby::RubyVersionFile::RUBY_VERSION_PATTERN = T.let(T.unsafe(nil), Regexp) - -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#262 -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#24 -class RuboCop::TargetRuby::Source - # @api private - # @return [Source] a new instance of Source - # - # source://rubocop//lib/rubocop/target_ruby.rb#27 - def initialize(config); end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#25 - def name; end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#32 - def to_s; end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#25 - def version; end -end - -# The target ruby version may be found in a .tool-versions file, in a line -# starting with `ruby`. -# -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#184 -class RuboCop::TargetRuby::ToolVersionsFile < ::RuboCop::TargetRuby::RubyVersionFile - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#188 - def name; end - - private - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#194 - def filename; end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#198 - def pattern; end -end - -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#185 -RuboCop::TargetRuby::ToolVersionsFile::TOOL_VERSIONS_FILENAME = T.let(T.unsafe(nil), String) - -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#186 -RuboCop::TargetRuby::ToolVersionsFile::TOOL_VERSIONS_PATTERN = T.let(T.unsafe(nil), Regexp) - -# source://rubocop//lib/rubocop/ast_aliases.rb#7 -RuboCop::Token = RuboCop::AST::Token - -# This module contains a collection of useful utility methods. -# -# source://rubocop//lib/rubocop/util.rb#5 -module RuboCop::Util - class << self - # source://rubocop//lib/rubocop/util.rb#6 - def silence_warnings; end - end -end - -# source://rubocop//lib/rubocop/error.rb#10 -class RuboCop::ValidationError < ::RuboCop::Error; end - -# This module holds the RuboCop version information. -# -# source://rubocop//lib/rubocop/version.rb#5 -module RuboCop::Version - class << self - # @api private - # - # source://rubocop//lib/rubocop/version.rb#114 - def config_for_pwd(env); end - - # @api private - # - # source://rubocop//lib/rubocop/version.rb#144 - def document_version; end - - # @api private - # - # source://rubocop//lib/rubocop/version.rb#67 - def extension_versions(env); end - - # Returns feature version in one of two ways: - # - # * Find by RuboCop core version style (e.g. rubocop-performance, rubocop-rspec) - # * Find by `bundle gem` version style (e.g. rubocop-rake) - # - # @api private - # - # source://rubocop//lib/rubocop/version.rb#128 - def feature_version(feature); end - - # @api private - # - # source://rubocop//lib/rubocop/version.rb#51 - def parser_version; end - - # @api private - # - # source://rubocop//lib/rubocop/version.rb#149 - def server_mode; end - - # @api private - # - # source://rubocop//lib/rubocop/version.rb#105 - def target_ruby_version(env); end - - # @api private - # - # source://rubocop//lib/rubocop/version.rb#46 - def verbose(env: T.unsafe(nil)); end - - # NOTE: Marked as private but used by gems like standard. - # - # @api private - # - # source://rubocop//lib/rubocop/version.rb#23 - def version(debug: T.unsafe(nil), env: T.unsafe(nil)); end - end -end - -# source://rubocop//lib/rubocop/version.rb#13 -RuboCop::Version::CANONICAL_FEATURE_NAMES = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/version.rb#17 -RuboCop::Version::EXTENSION_PATH_NAMES = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/version.rb#8 -RuboCop::Version::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/version.rb#6 -RuboCop::Version::STRING = T.let(T.unsafe(nil), String) - -# A Warning exception is different from an Offense with severity 'warning' -# When a Warning is raised, this means that RuboCop was unable to perform a -# requested operation (such as inspecting or correcting a source file) due to -# user error -# For example, a configuration value in .rubocop.yml might be malformed -# -# source://rubocop//lib/rubocop/warning.rb#9 -class RuboCop::Warning < ::StandardError; end - -# Find duplicated keys from YAML. -# -# @api private -# -# source://rubocop//lib/rubocop/yaml_duplication_checker.rb#6 -module RuboCop::YAMLDuplicationChecker - class << self - # @api private - # - # source://rubocop//lib/rubocop/yaml_duplication_checker.rb#7 - def check(yaml_string, filename, &on_duplicated); end - end -end - -# @api private -# -# source://rubocop//lib/rubocop/yaml_duplication_checker.rb#14 -class RuboCop::YAMLDuplicationChecker::DuplicationCheckHandler < ::Psych::TreeBuilder - # @api private - # @return [DuplicationCheckHandler] a new instance of DuplicationCheckHandler - # - # source://rubocop//lib/rubocop/yaml_duplication_checker.rb#15 - def initialize(&block); end - - # @api private - # - # source://rubocop//lib/rubocop/yaml_duplication_checker.rb#20 - def end_mapping; end -end - -# Extensions to the core String class -# -# source://rubocop//lib/rubocop/core_ext/string.rb#4 -class String - include ::Comparable - - # Checks whether a string is blank. A string is considered blank if it - # is either empty or contains only whitespace characters. - # - # @example - # ''.blank? #=> true - # ' '.blank? #=> true - # ' test'.blank? #=> false - # @return [Boolean] true is the string is blank, false otherwise - # - # source://rubocop//lib/rubocop/core_ext/string.rb#15 - def blank?; end -end diff --git a/sorbet/rbi/gems/rubocop@1.92.0.rbi b/sorbet/rbi/gems/rubocop@1.92.0.rbi new file mode 100644 index 0000000..538106d --- /dev/null +++ b/sorbet/rbi/gems/rubocop@1.92.0.rbi @@ -0,0 +1,68420 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop` gem. +# Please instead update this file by running `bin/tapioca gem rubocop`. + + +class Parser::Source::Comment + include ::RuboCop::Ext::Comment +end + +class Parser::Source::Range + include ::RuboCop::Ext::Range +end + +class Regexp::Expression::Base + include ::RuboCop::Ext::RegexpParser::Expression::Base +end + +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 + +# These aliases are for compatibility. +# FIXME: Moving Rails department code to RuboCop Rails will remove +# The Lint/RedundantCopDisableDirective cop needs to be disabled so as +# to be able to provide a (bad) example of a redundant disable. +# Lint/RedundantCopDisableDirective needs to be disabled so as +# +# This code is based on https://github.com/mikian/rubocop-junit-formatter. +# +# Copyright (c) 2015 Mikko Kokkonen +# +# MIT License +# +# https://github.com/mikian/rubocop-junit-formatter/blob/master/LICENSE.txt +# +# +# This code is based on https://github.com/standardrb/standard. +# +# Copyright (c) 2023 Test Double, Inc. +# +# The MIT License (MIT) +# +# https://github.com/standardrb/standard/blob/main/LICENSE.txt +# +# +# This code is based on https://github.com/fohte/rubocop-daemon. +# +# Copyright (c) 2018 Hayato Kawai +# +# The MIT License (MIT) +# +# https://github.com/fohte/rubocop-daemon/blob/master/LICENSE.txt +# +# pkg:gem/rubocop#lib/rubocop/version.rb:3 +module RuboCop; end + +# pkg:gem/rubocop#lib/rubocop/ast_aliases.rb:6 +class RuboCop::AST::ProcessedSource + include ::RuboCop::Ext::ProcessedSource +end + +class RuboCop::AST::RegexpNode < ::RuboCop::AST::Node + include ::RuboCop::Ext::RegexpNode +end + +# This is a class that reads optional command line arguments to rubocop from environment variable. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/arguments_env.rb:6 +class RuboCop::ArgumentsEnv + class << self + # pkg:gem/rubocop#lib/rubocop/arguments_env.rb:7 + def read_as_arguments; end + end +end + +# This is a class that reads optional command line arguments to rubocop from .rubocop file. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/arguments_file.rb:6 +class RuboCop::ArgumentsFile + class << self + # pkg:gem/rubocop#lib/rubocop/arguments_file.rb:7 + def read_as_arguments; end + end +end + +# The CLI is a class responsible of handling all the command line interface +# logic. +# +# pkg:gem/rubocop#lib/rubocop/cli.rb:8 +class RuboCop::CLI + # pkg:gem/rubocop#lib/rubocop/cli.rb:25 + def initialize; end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:23 + def config_store; end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:23 + def options; end + + # @api public + # + # Entry point for the application logic. Here we + # do the command line arguments processing and inspect + # the target files. + # + # @param args [Array] command line arguments + # @return [Integer] UNIX exit code + # + # pkg:gem/rubocop#lib/rubocop/cli.rb:40 + def run(args = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cli.rb:163 + def act_on_options; end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:220 + def apply_default_formatter; end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:132 + def execute_runners; end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:206 + def handle_editor_mode; end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:210 + def handle_exiting_options; end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:151 + def parallel_by_default!; end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:88 + def profile_if_needed; end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:234 + def report_pending_cops; end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:120 + def require_gem(name); end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:128 + def run_command(name); end + + # Options that decide which cops run, as opposed to how configuration is loaded. + # + # pkg:gem/rubocop#lib/rubocop/cli.rb:193 + def set_cop_selection_options_to_config_loader; end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:185 + def set_options_to_config_loader; end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:201 + def set_options_to_pending_cops_reporter; end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:140 + def suggest_extensions; end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:144 + def validate_options_vs_config; end + + # pkg:gem/rubocop#lib/rubocop/cli.rb:238 + def warn_if_cache_root_changed(early, desired); end +end + +# Home of subcommands in the CLI. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cli/command.rb:7 +module RuboCop::CLI::Command + class << self + # Find the command with a given name and run it in an environment. + # + # pkg:gem/rubocop#lib/rubocop/cli/command.rb:10 + def run(env, name); end + + private + + # pkg:gem/rubocop#lib/rubocop/cli/command.rb:16 + def class_for(name); end + end +end + +# Generate a configuration file acting as a TODO list. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:8 +class RuboCop::CLI::Command::AutoGenerateConfig < ::RuboCop::CLI::Command::Base + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:25 + def run; end + + private + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:139 + def add_formatter; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:147 + def add_inheritance_from_auto_generated_file(config_file); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:56 + def auto_gen_tmp_dir; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:143 + def execute_runner; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:168 + def existing_configuration(config_file); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:97 + def line_length_cop(config); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:85 + def line_length_enabled?(config); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:93 + def max_line_length(config); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:66 + def maybe_run_line_length_cop; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:105 + def only_exclude?; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:101 + def options_has_only_flag?; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:185 + def relative_path_to_todo_from_options_config; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:51 + def reset_auto_gen_tmp_dir; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:132 + def reset_config_and_auto_gen_file; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:123 + def run_all_cops(line_length_contents); end + + # Do an initial run with only Layout/LineLength so that cops that + # depend on Layout/LineLength:Max get the correct value for that + # parameter. + # + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:112 + def run_line_length_cop; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:89 + def same_max_line_length?(config1, config2); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:80 + def skip_line_length_cop(reason); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:44 + def use_temporary_cache; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:174 + def write_config_file(file_name, file_string, rubocop_yml_contents); end +end + +# pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:11 +RuboCop::CLI::Command::AutoGenerateConfig::AUTO_GENERATED_FILE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:15 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1 = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:19 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_DISABLED = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:18 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_OVERRIDDEN = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:20 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_SKIPPED_ONLY_COPS = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:22 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_SKIPPED_ONLY_EXCLUDE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:16 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_2 = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:13 +RuboCop::CLI::Command::AutoGenerateConfig::PLACEHOLDER = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:12 +RuboCop::CLI::Command::AutoGenerateConfig::YAML_OPTIONAL_DOC_START = T.let(T.unsafe(nil), Regexp) + +# A subcommand in the CLI. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cli/command/base.rb:8 +class RuboCop::CLI::Command::Base + # pkg:gem/rubocop#lib/rubocop/cli/command/base.rb:26 + def initialize(env); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/base.rb:9 + def env; end + + class << self + # pkg:gem/rubocop#lib/rubocop/cli/command/base.rb:21 + def by_command_name(name); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/base.rb:14 + def command_name; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/base.rb:14 + def command_name=(_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/base.rb:16 + def inherited(subclass); end + end +end + +# Shared handling for commands that take a list of cop names. +# +# Validation happens here rather than during option parsing because the +# registry is not complete until the configuration has been loaded, which +# is also why `--only` and `--except` are validated from the runner. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cli/command/cop_names.rb:12 +module RuboCop::CLI::Command::CopNames + private + + # Not memoized: the MCP server lives long enough for a plugin to register + # a cop after a lookup has missed it. + # + # pkg:gem/rubocop#lib/rubocop/cli/command/cop_names.rb:31 + def cop_class_for(name); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/cop_names.rb:45 + def department?(name); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/cop_names.rb:49 + def department_message(name); end + + # The cops among `names` that exist, so a command can report on what it + # understood before {#validate_cop_names!} objects to the rest. + # + # pkg:gem/rubocop#lib/rubocop/cli/command/cop_names.rb:17 + def known_cop_classes(names); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/cop_names.rb:35 + def unknown_cop_message(name); end + + # @raise [IncorrectCopNameError] if any name is not a cop + # + # pkg:gem/rubocop#lib/rubocop/cli/command/cop_names.rb:22 + def validate_cop_names!(names); end +end + +# Run all the selected cops and report the result. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:8 +class RuboCop::CLI::Command::ExecuteRunner < ::RuboCop::CLI::Command::Base + include ::RuboCop::Formatter::TextUtil + + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:16 + def run; end + + private + + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:125 + def bug_tracker_uri; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:109 + def display_error_summary(errors); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:96 + def display_summary(runner); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:101 + def display_warning_summary(warnings); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:22 + def execute_runner(paths); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:142 + def maybe_print_corrected_source; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:55 + def merge_todo_audit_status(status); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:131 + def print_diffs(diffs); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:76 + def print_unused_todo_entries(todo_file, unused); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:62 + def report_unused_todo_entries; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:45 + def runner_status(runner, all_pass_or_excluded); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:82 + def with_redirect; end +end + +# Combination of short and long formatter names. +# +# pkg:gem/rubocop#lib/rubocop/cli/command/execute_runner.rb:12 +RuboCop::CLI::Command::ExecuteRunner::INTEGRATION_FORMATTERS = T.let(T.unsafe(nil), Array) + +# Explains what cops do, as described by {Cop::CopExplanation}. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cli/command/explain.rb:8 +class RuboCop::CLI::Command::Explain < ::RuboCop::CLI::Command::Base + include ::RuboCop::CLI::Command::CopNames + + # pkg:gem/rubocop#lib/rubocop/cli/command/explain.rb:13 + def initialize(env); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/explain.rb:19 + def run; end +end + +# Generate a .rubocop.yml file in the current directory. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cli/command/init_dotfile.rb:8 +class RuboCop::CLI::Command::InitDotfile < ::RuboCop::CLI::Command::Base + # pkg:gem/rubocop#lib/rubocop/cli/command/init_dotfile.rb:13 + def run; end +end + +# pkg:gem/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 +# +# pkg:gem/rubocop#lib/rubocop/cli/command/lsp.rb:8 +class RuboCop::CLI::Command::LSP < ::RuboCop::CLI::Command::Base + # pkg:gem/rubocop#lib/rubocop/cli/command/lsp.rb:11 + def run; end +end + +# Lists the cops that will inspect the given file or directory. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cli/command/list_enabled_cops_for.rb:8 +class RuboCop::CLI::Command::ListEnabledCopsFor < ::RuboCop::CLI::Command::Base + # pkg:gem/rubocop#lib/rubocop/cli/command/list_enabled_cops_for.rb:11 + def initialize(env); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/list_enabled_cops_for.rb:18 + def run; end + + private + + # pkg:gem/rubocop#lib/rubocop/cli/command/list_enabled_cops_for.rb:32 + def cops_of_department(registry, department); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/list_enabled_cops_for.rb:24 + def print_available_cops; end +end + +# Start Model Context Protocol of RuboCop. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cli/command/mcp.rb:8 +class RuboCop::CLI::Command::MCP < ::RuboCop::CLI::Command::Base + # pkg:gem/rubocop#lib/rubocop/cli/command/mcp.rb:11 + def run; end +end + +# Shows the given cops, or all cops by default, and their configurations +# for the current directory. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:9 +class RuboCop::CLI::Command::ShowCops < ::RuboCop::CLI::Command::Base + include ::RuboCop::CLI::Command::CopNames + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:26 + def initialize(env); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:41 + def run; end + + private + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:95 + def config_lines(cop); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:91 + def cops_of_department(cops, department); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:51 + def print_available_cops; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:74 + def print_cop_details(cops); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:62 + def print_cops_of_department(registry, department, show_all); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:83 + def selected_cops_of_department(cops, department); end +end + +# pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:14 +class RuboCop::CLI::Command::ShowCops::ExactMatcher < ::Struct + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:15 + def match?(name); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:14 + def pattern; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:14 + def pattern=(_); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:14 + def [](*_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:14 + def inspect; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:14 + def keyword_init?; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:14 + def members; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:14 + def new(*_arg0); end + end +end + +# pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:20 +class RuboCop::CLI::Command::ShowCops::WildcardMatcher < ::Struct + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:21 + def match?(name); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:20 + def pattern; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:20 + def pattern=(_); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:20 + def [](*_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:20 + def inspect; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:20 + def keyword_init?; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:20 + def members; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_cops.rb:20 + def new(*_arg0); end + end +end + +# Prints out url to documentation of provided cops +# or documentation base url by default. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cli/command/show_docs_url.rb:9 +class RuboCop::CLI::Command::ShowDocsUrl < ::RuboCop::CLI::Command::Base + include ::RuboCop::CLI::Command::CopNames + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_docs_url.rb:14 + def initialize(env); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_docs_url.rb:20 + def run; end + + private + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_docs_url.rb:40 + def cops_array; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/show_docs_url.rb:29 + def print_documentation_url; end +end + +# Suggest RuboCop extensions to install based on Gemfile dependencies. +# Only primary dependencies are evaluated, so if a dependency depends on a +# gem with an extension, it is not suggested. However, if an extension is +# a transitive dependency, it will not be suggested. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:11 +class RuboCop::CLI::Command::SuggestExtensions < ::RuboCop::CLI::Command::Base + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:17 + def run; end + + private + + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:73 + def all_extensions; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:69 + def current_formatter; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:117 + def dependent_gems; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:87 + def extensions; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:109 + def installed_and_not_loaded_extensions; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:91 + def installed_extensions; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:121 + def installed_gems; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:99 + def loaded_extensions; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:113 + def lockfile; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:95 + def not_installed_extensions; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:41 + def print_install_suggestions; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:51 + def print_load_suggestions; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:60 + def print_opt_out_instruction; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:125 + def puts(*args); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:30 + def skip?; end +end + +# Combination of short and long formatter names. +# +# pkg:gem/rubocop#lib/rubocop/cli/command/suggest_extensions.rb:13 +RuboCop::CLI::Command::SuggestExtensions::INCLUDED_FORMATTERS = T.let(T.unsafe(nil), Array) + +# Display version. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cli/command/version.rb:8 +class RuboCop::CLI::Command::Version < ::RuboCop::CLI::Command::Base + # pkg:gem/rubocop#lib/rubocop/cli/command/version.rb:11 + def run; end +end + +# pkg:gem/rubocop#lib/rubocop/cli.rb:13 +RuboCop::CLI::DEFAULT_PARALLEL_OPTIONS = T.let(T.unsafe(nil), Array) + +# Execution environment for a CLI command. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cli/environment.rb:7 +class RuboCop::CLI::Environment + # pkg:gem/rubocop#lib/rubocop/cli/environment.rb:10 + def initialize(options, config_store, paths); end + + # pkg:gem/rubocop#lib/rubocop/cli/environment.rb:8 + def config_store; end + + # pkg:gem/rubocop#lib/rubocop/cli/environment.rb:8 + def options; end + + # pkg:gem/rubocop#lib/rubocop/cli/environment.rb:8 + def paths; end + + # Run a command in this environment. + # + # pkg:gem/rubocop#lib/rubocop/cli/environment.rb:17 + def run(name); end +end + +# pkg:gem/rubocop#lib/rubocop/cli.rb:21 +class RuboCop::CLI::Finished < ::StandardError; end + +# pkg:gem/rubocop#lib/rubocop/cli.rb:11 +RuboCop::CLI::STATUS_ERROR = T.let(T.unsafe(nil), Integer) + +# pkg:gem/rubocop#lib/rubocop/cli.rb:12 +RuboCop::CLI::STATUS_INTERRUPTED = T.let(T.unsafe(nil), Integer) + +# pkg:gem/rubocop#lib/rubocop/cli.rb:10 +RuboCop::CLI::STATUS_OFFENSES = T.let(T.unsafe(nil), Integer) + +# pkg:gem/rubocop#lib/rubocop/cli.rb:9 +RuboCop::CLI::STATUS_SUCCESS = T.let(T.unsafe(nil), Integer) + +# This class represents the cache config of the caching RuboCop runs. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cache_config.rb:6 +class RuboCop::CacheConfig + class << self + # pkg:gem/rubocop#lib/rubocop/cache_config.rb:7 + def root_dir; end + + # Lightweight cache root computation that reads CacheRootDirectory from + # the toplevel config file and environment variables without going through + # the full ConfigStore/ConfigLoader. This method can be used, for example, + # before loading configuration files. Please note that this method doesn't + # take into account any `inherit_from` dependencies. + # + # pkg:gem/rubocop#lib/rubocop/cache_config.rb:34 + def root_dir_from_toplevel_config(cache_root_override = T.unsafe(nil)); end + end +end + +# Converts RuboCop objects to and from the serialization format JSON. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cached_data.rb:8 +class RuboCop::CachedData + # pkg:gem/rubocop#lib/rubocop/cached_data.rb:9 + def initialize(filename); end + + # pkg:gem/rubocop#lib/rubocop/cached_data.rb:13 + def from_json(text); end + + # pkg:gem/rubocop#lib/rubocop/cached_data.rb:17 + def to_json(offenses); end + + private + + # A corrector cannot be serialized, so the edits it would make are cached + # separately; without this a cache hit would report no corrections. + # + # pkg:gem/rubocop#lib/rubocop/cached_data.rb:67 + def add_corrections(hash, offense); end + + # Only offenses suppressed by a directive can carry one, so keep the key out of the + # common case rather than writing a null for every cached offense. + # + # pkg:gem/rubocop#lib/rubocop/cached_data.rb:59 + def add_justification(hash, offense); end + + # pkg:gem/rubocop#lib/rubocop/cached_data.rb:89 + def corrections_from_cache(offense); end + + # Restore an offense object loaded from a JSON file. + # + # pkg:gem/rubocop#lib/rubocop/cached_data.rb:79 + def deserialize_offenses(offenses); end + + # pkg:gem/rubocop#lib/rubocop/cached_data.rb:47 + def encode_to_utf8(value); end + + # pkg:gem/rubocop#lib/rubocop/cached_data.rb:99 + def location_from_source_buffer(offense); end + + # pkg:gem/rubocop#lib/rubocop/cached_data.rb:43 + def message(offense); end + + # pkg:gem/rubocop#lib/rubocop/cached_data.rb:23 + def serialize_offense(offense); end + + # Delay creation until needed. Some type of offenses will have no buffer associated with them + # and be global only. For these, trying to create the buffer will likely fail, for example + # because of unknown encoding comments. + # + # pkg:gem/rubocop#lib/rubocop/cached_data.rb:112 + def source_buffer; end +end + +# Lists the files that differ from a git revision, for `--changed`. +# +# Shelling out to `git` keeps RuboCop free of a version control dependency, +# and means the answer is exactly what git would give on the command line. +# +# @api private +# +# pkg:gem/rubocop#lib/rubocop/changed_files.rb:12 +class RuboCop::ChangedFiles + # pkg:gem/rubocop#lib/rubocop/changed_files.rb:25 + def initialize(revision = T.unsafe(nil)); end + + # @return [Array] the files among these that changed + # + # pkg:gem/rubocop#lib/rubocop/changed_files.rb:42 + def filter(files); end + + # Files that were added or modified since the revision, as absolute paths. + # Deleted files are left out - there is nothing left to inspect - and + # untracked files are included, since a file that is new to the working + # tree has changed as surely as one git already knows about. + # + # @return [Set] + # + # pkg:gem/rubocop#lib/rubocop/changed_files.rb:35 + def paths; end + + private + + # Hashed rather than hardcoded, since its id depends on the repository's + # object format (SHA-1 or SHA-256). + # + # pkg:gem/rubocop#lib/rubocop/changed_files.rb:75 + def empty_tree; end + + # git hands back bytes, which Ruby tags with the encoding the process + # happens to have been started in - splitting those bytes as US-ASCII raises + # on any path that is not. They have to end up in the encoding `Dir.glob` + # uses, or a path with a non-ASCII character in it never matches the file + # list it is compared against. + # + # On POSIX those bytes are already the filesystem's own, so the encoding is + # simply corrected. Windows is the exception: git converts paths to UTF-8 on + # the way out, while Ruby reports file names in the local code page, so the + # two have to be reconciled. + # + # pkg:gem/rubocop#lib/rubocop/changed_files.rb:105 + def filesystem_path(path); end + + # pkg:gem/rubocop#lib/rubocop/changed_files.rb:117 + def git(*args); end + + # pkg:gem/rubocop#lib/rubocop/changed_files.rb:127 + def git_error_message(stderr); end + + # pkg:gem/rubocop#lib/rubocop/changed_files.rb:53 + def modified_paths(revision = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/changed_files.rb:49 + def repository_root; end + + # The `-z` above is what makes these usable: without it git wraps any path + # that is not plain ASCII in quotes and octal escapes, and those files drop + # out of the comparison without a word. + # + # pkg:gem/rubocop#lib/rubocop/changed_files.rb:91 + def split_paths(output); end + + # pkg:gem/rubocop#lib/rubocop/changed_files.rb:69 + def unborn_head?; end + + # pkg:gem/rubocop#lib/rubocop/changed_files.rb:79 + def untracked_paths; end + + class << self + # Whether git can resolve `name` to a commit in the current repository. + # + # pkg:gem/rubocop#lib/rubocop/changed_files.rb:17 + def revision?(name); end + end +end + +# pkg:gem/rubocop#lib/rubocop/changed_files.rb:13 +RuboCop::ChangedFiles::DEFAULT_REVISION = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/changed_files.rb:14 +RuboCop::ChangedFiles::FILESYSTEM_ENCODING = T.let(T.unsafe(nil), Encoding) + +# and provides a way to check if each cop is enabled at arbitrary line. +# +# pkg:gem/rubocop#lib/rubocop/comment_config/directive_range.rb:4 +class RuboCop::CommentConfig + include ::RuboCop::CommentConfig::DisableNext + include ::RuboCop::CommentConfig::PushPop + extend ::RuboCop::SimpleForwardable + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:34 + def initialize(processed_source); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:75 + def comment_only_line?(line_number); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:32 + def config(*, **, &); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:63 + def cop_disabled_line_ranges; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:41 + def cop_enabled_at_line?(cop, line_number); end + + # Whether the cop is enabled for all of the given line span. The cop + # counts as disabled for the span when any of its disabled ranges + # overlaps it, so that a directive on any line of a multi-line offense + # suppresses the offense. + # + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:49 + def cop_enabled_at_lines?(cop, first_line, last_line); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:59 + def cop_opted_in?(cop); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:67 + def extra_enabled_comments; end + + # The names of the cops that are opted in by an `enable` comment directive + # or a `+` argument of a `push`/`next` directive, used to mobilize cops + # disabled in the config on demand. Departments are expanded for the + # opt-in forms only: a plain `enable` naming a department usually just + # closes a `disable` of it, and expanding it would switch on every + # config-disabled cop of the department for the rest of the file. + # + # @api private + # @return [Set] + # + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:88 + def opt_in_cops; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:30 + def processed_source; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:32 + def registry(*, **, &); end + + private + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:126 + def analyze; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:170 + def analyze_cop(analysis, directive); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:190 + def analyze_disabled(analysis, directive); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:194 + def analyze_rest(analysis, directive); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:181 + def analyze_single_line(analysis, directive); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:198 + def cop_line_ranges(analysis); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:202 + def each_directive; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:98 + def extra_enabled_comments_with_names(extras:, names:); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:243 + def handle_enable_all(directive, names, extras); end + + # Collect cops that have been disabled or enabled by name in a directive comment + # so that `Lint/RedundantCopEnableDirective` can register offenses correctly. + # + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:257 + def handle_switch(directive, names, extras); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:161 + def inject_disabled_cops_directives(analyses); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:236 + def non_comment_token_line_numbers; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:113 + def opted_in_by(directive); end + + # `Style/DisableCopsWithinSourceCodeDirective` cannot be disabled via + # directive comments when it is explicitly enabled with `Enabled: true`. + # This prevents users from bypassing the cop by writing a disable + # directive that targets this cop itself. + # + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:231 + def prevent_directive_disabling?(cop_name); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:218 + def qualified_cop_name(cop_name); end + + # Push/pop and next-statement directives close themselves, so they + # play no part in the disable/enable pairing. + # + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:213 + def self_closing_directive?(directive); end +end + +# pkg:gem/rubocop#lib/rubocop/comment_config.rb:11 +RuboCop::CommentConfig::CONFIG_DISABLED_LINE_RANGE_MIN = T.let(T.unsafe(nil), Float) + +# This class provides an API compatible with RuboCop::DirectiveComment +# to be used for cops that are disabled in the config file +# +# pkg:gem/rubocop#lib/rubocop/comment_config.rb:15 +class RuboCop::CommentConfig::ConfigDisabledCopDirectiveComment + include ::RuboCop::Ext::Comment + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:23 + def initialize(cop_name); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:18 + def line_number; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:18 + def loc; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:18 + def text; end +end + +# pkg:gem/rubocop#lib/rubocop/comment_config.rb:21 +class RuboCop::CommentConfig::ConfigDisabledCopDirectiveComment::Expression < ::Struct + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:21 + def line; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:21 + def line=(_); end + + class << self + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:21 + def [](*_arg0); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:21 + def inspect; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:21 + def keyword_init?; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:21 + def members; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:21 + def new(*_arg0); end + end +end + +# pkg:gem/rubocop#lib/rubocop/comment_config.rb:20 +class RuboCop::CommentConfig::ConfigDisabledCopDirectiveComment::Loc < ::Struct + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:20 + def expression; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:20 + def expression=(_); end + + class << self + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:20 + def [](*_arg0); end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:20 + def inspect; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:20 + def keyword_init?; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:20 + def members; end + + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:20 + def new(*_arg0); end + end +end + +# The per-cop state accumulated while analyzing directives: the disabled +# ranges so far, plus the line and directive of the currently open +# disable, if any. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/comment_config/directive_range.rb:22 +class RuboCop::CommentConfig::CopAnalysis < ::Struct + # pkg:gem/rubocop#lib/rubocop/comment_config/directive_range.rb:27 + def close(line); end + + # pkg:gem/rubocop#lib/rubocop/comment_config/directive_range.rb:22 + def line_ranges; end + + # pkg:gem/rubocop#lib/rubocop/comment_config/directive_range.rb:22 + def line_ranges=(_); end + + # pkg:gem/rubocop#lib/rubocop/comment_config/directive_range.rb:22 + def start_directive; end + + # pkg:gem/rubocop#lib/rubocop/comment_config/directive_range.rb:22 + def start_directive=(_); end + + # pkg:gem/rubocop#lib/rubocop/comment_config/directive_range.rb:22 + def start_line_number; end + + # pkg:gem/rubocop#lib/rubocop/comment_config/directive_range.rb:22 + def start_line_number=(_); end + + class << self + # pkg:gem/rubocop#lib/rubocop/comment_config/directive_range.rb:22 + def [](*_arg0); end + + # pkg:gem/rubocop#lib/rubocop/comment_config/directive_range.rb:22 + def inspect; end + + # pkg:gem/rubocop#lib/rubocop/comment_config/directive_range.rb:22 + def keyword_init?; end + + # pkg:gem/rubocop#lib/rubocop/comment_config/directive_range.rb:22 + def members; end + + # pkg:gem/rubocop#lib/rubocop/comment_config/directive_range.rb:22 + def new(*_arg0); end + end +end + +# A disabled line range that remembers the directive comment that opened +# it. Value-equal to a plain `Range`, so consumers comparing or hashing +# ranges are unaffected. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/comment_config/directive_range.rb:9 +class RuboCop::CommentConfig::DirectiveRange < ::Range + # pkg:gem/rubocop#lib/rubocop/comment_config/directive_range.rb:12 + def initialize(first_line, last_line, directive); end + + # pkg:gem/rubocop#lib/rubocop/comment_config/directive_range.rb:10 + def directive; end +end + +# Handling of next-statement directives (`disable-next`, `todo-next` and +# `next`): computing the statement scope they apply to and tracking +# directives that attached to nothing. +# The scope is the whole statement starting on the next line bearing +# code. Comment-only lines between the directive and the code chain (so +# several directives can stack), while a blank line breaks the attachment. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:12 +module RuboCop::CommentConfig::DisableNext + # Next-statement directives that affect nothing: nothing follows + # them, or they sit at the end of a code line. + # + # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:15 + def detached_next_directives; end + + # The line range of the statement a `disable-next` directive on the + # given line scopes to (or would scope to), or `nil` when no statement + # is attached. A directive is only honored on a comment-only line. + # Stacked directives share the target, so the computation is memoized. + # @api private + # + # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:25 + def statement_scope_after(line); end + + private + + # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:46 + def add_next_range(analyses, cop_name, range); end + + # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:36 + def apply_disable_next(analyses, directive); end + + # Applies an `enable-next` directive: every listed cop (departments + # and `all` included) has any open disable suspended for the attached + # statement. + # + # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:75 + def apply_enable_next(analyses, directive); end + + # Applies a `next` directive: `-` cops are disabled for the attached + # statement (exactly like `disable-next`), `+` cops have any open + # disable suspended for it. The `resolved_cops` come pre-expanded and + # qualified, mirroring `push`. + # + # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:56 + def apply_next_directive(analyses, resolved_cops, directive); end + + # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:97 + def attached_code_line(directive_line); end + + # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:138 + def heredoc?(node); end + + # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:106 + def statement_bounds_at(line); end + + # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:130 + def statement_end_line(statement); end + + # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:115 + def statement_start_line?(node, line); end + + # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:123 + def statement_starting_at(line); end + + # Punches a statement-sized hole into the currently open disable of the + # cop (whether opened by a directive or injected for a config-disabled + # cop): the open range closes just above the statement and reopens + # right below it, still attributed to its opening directive. Aligned + # with `push`, a `+` for a cop that is not disabled is a no-op. + # + # pkg:gem/rubocop#lib/rubocop/comment_config/disable_next.rb:89 + def suspend_disable(analyses, cop, bounds); end +end + +# Handling of `push`/`pop` directives and their signed cop arguments: +# saving and restoring the per-cop analysis state, and resolving the +# `+`/`-` argument lists (shared with the `next` directive). +# @api private +# +# pkg:gem/rubocop#lib/rubocop/comment_config/push_pop.rb:9 +module RuboCop::CommentConfig::PushPop + private + + # pkg:gem/rubocop#lib/rubocop/comment_config/push_pop.rb:30 + def apply_cop_op(analyses, operation, cop, directive); end + + # pkg:gem/rubocop#lib/rubocop/comment_config/push_pop.rb:24 + def apply_push(analyses, resolved_cops, directive); end + + # pkg:gem/rubocop#lib/rubocop/comment_config/push_pop.rb:18 + def expand_cop_name(name); end + + # pkg:gem/rubocop#lib/rubocop/comment_config/push_pop.rb:40 + def pop_state(analyses, line); end + + # pkg:gem/rubocop#lib/rubocop/comment_config/push_pop.rb:47 + def popped_analysis(current, restored, line); end + + # pkg:gem/rubocop#lib/rubocop/comment_config/push_pop.rb:12 + def resolve_push_cops(directive); end +end + +# This class represents the configuration of the RuboCop application +# and all its cops. A Config is associated with a YAML configuration +# file from which it was read. Several different Configs can be used +# during a run of the rubocop program, if files in several +# directories are inspected. +# +# pkg:gem/rubocop#lib/rubocop/config.rb:12 +class RuboCop::Config + include ::RuboCop::PathUtil + include ::RuboCop::FileFinder + extend ::RuboCop::SimpleForwardable + + # pkg:gem/rubocop#lib/rubocop/config.rb:31 + def initialize(hash = T.unsafe(nil), loaded_path = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:96 + def [](*, **, &); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:96 + def []=(*, **, &); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:239 + def active_support_extensions_enabled?; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:126 + def add_excludes_from_higher_level(highest_config); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:267 + def allowed_camel_case_file?(file); end + + # Paths specified in configuration files starting with .rubocop are + # relative to the directory where that file is. Paths in other config files + # are relative to the current directory. This is so that paths in + # config/default.yml, for example, are not relative to RuboCop's config + # directory since that wouldn't work. + # + # pkg:gem/rubocop#lib/rubocop/config.rb:308 + def base_dir_for_path_parameters; end + + # @return [String, nil] + # + # pkg:gem/rubocop#lib/rubocop/config.rb:338 + def bundler_lock_file_path; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:84 + def check; end + + # @return [Boolean] whether config for this badge has 'Include' or 'Exclude' keys + # @api private + # + # pkg:gem/rubocop#lib/rubocop/config.rb:183 + def clusivity_config_for_badge?(badge); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:203 + def cop_enabled?(name); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:96 + def delete(*, **, &); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:138 + def deprecation_check; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:96 + def dig(*, **, &); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:207 + def disabled_new_cops?; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:96 + def each(*, **, &); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:96 + def each_key(*, **, &); end + + # Whether the given pending cop should be enabled, based on the `NewCops` setting of + # its department (if any) or of `AllCops`. A department may set `NewCops` to `enable`, + # `disable`, `pending`, or a version, in which case pending cops added in that version + # or earlier are enabled. + # + # pkg:gem/rubocop#lib/rubocop/config.rb:219 + def enabled_new_cop?(qualified_cop_name); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:211 + def enabled_new_cops?; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:96 + def fetch(*, **, &); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:286 + def file_to_exclude?(file); end + + # Returns true if the file matches any include pattern. If a block is given, the block is called + # to determine if the pattern is relevant (true returned by the block) or should be skipped + # (false returned). + # + # pkg:gem/rubocop#lib/rubocop/config.rb:250 + def file_to_include?(file); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:199 + def for_all_cops; end + + # @return [Config] for the given cop merged with that of its department (if any) + # Note: the 'Enabled' attribute is same as that returned by `for_cop` + # + # pkg:gem/rubocop#lib/rubocop/config.rb:165 + def for_badge(badge); end + + # @return [Config] for the given cop / cop name. + # Note: the 'Enabled' attribute is calculated according to the department's + # and 'AllCops' configuration; other attributes are not inherited. + # + # pkg:gem/rubocop#lib/rubocop/config.rb:152 + def for_cop(cop); end + + # @return [Config] for the given department name. + # Note: the 'Enabled' attribute will be present only if specified + # at the department's level + # + # pkg:gem/rubocop#lib/rubocop/config.rb:194 + def for_department(department_name); end + + # @return [Config, Hash] for the given cop / cop name. + # If the given cop is enabled, returns its configuration hash. + # Otherwise, returns an empty hash. + # + # pkg:gem/rubocop#lib/rubocop/config.rb:159 + def for_enabled_cop(cop); end + + # Returns target's locked gem versions (i.e. from Gemfile.lock or gems.locked) + # @returns [Hash{String => Gem::Version}] The locked gem versions, keyed by the gems' names. + # + # pkg:gem/rubocop#lib/rubocop/config.rb:364 + def gem_versions_in_target; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:376 + def inspect; end + + # True if this is a config file that is shipped with RuboCop + # + # pkg:gem/rubocop#lib/rubocop/config.rb:109 + def internal?; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:96 + def key?(*, **, &); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:96 + def keys(*, **, &); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:80 + def loaded_features; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:21 + def loaded_path; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:76 + def loaded_plugins; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:114 + def make_excludes_absolute; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:96 + def map(*, **, &); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:96 + def merge(*, **, &); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:318 + def parser_engine; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:299 + def path_relative_to_config(path); end + + # Returns the names of the target's gems that are sourced from a local path + # (i.e. `path:` dependencies and the project's own gem when the `Gemfile` + # uses `gemspec`), whose code therefore lives in the project itself. + # @returns [Array, nil] The gem names, or nil without a lockfile. + # + # pkg:gem/rubocop#lib/rubocop/config.rb:372 + def path_sourced_gems_in_target; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:295 + def patterns_to_exclude; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:291 + def patterns_to_include; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:349 + def pending_cops; end + + # Returns true if there's a chance that an Include pattern matches hidden + # files, false if that's definitely not possible. + # + # pkg:gem/rubocop#lib/rubocop/config.rb:278 + def possibly_include_hidden?; end + + # Whether preview behavior is on, for cops that gate an unstable change + # behind it and for cops that are themselves `Enabled: preview`. + # `--preview` / `--no-preview` win over `AllCops: Preview`. + # + # pkg:gem/rubocop#lib/rubocop/config.rb:232 + def preview?(options = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:96 + def replace(*, **, &); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:104 + def signature; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:333 + def smart_loaded_path; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:243 + def string_literals_frozen_by_default?; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:322 + def target_rails_version; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:98 + def target_ruby_version(*, **, &); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:96 + def to_h(*, **, &); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:96 + def to_hash(*, **, &); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:100 + def to_s; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:96 + def transform_values(*, **, &); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:98 + def validate(*, **, &); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:91 + def validate_after_resolution; end + + private + + # Returns a `Gem::Version` for values like `'1.19'` or `1.19`, and `nil` + # for non-version values like `'N/A'` or `'<>'`. + # + # pkg:gem/rubocop#lib/rubocop/config.rb:480 + def comparable_version(value); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:440 + def department_of(qualified_cop_name); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:428 + def enable_cop?(qualified_cop_name, cop_options); end + + # @param [Gem::Version] gem_version an object like `Gem::Version.new("7.1.2.3")` + # @return [Float] The major and minor version, like `7.1` + # + # pkg:gem/rubocop#lib/rubocop/config.rb:407 + def gem_version_to_major_minor_float(gem_version); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:382 + def match_relative_or_absolute_path?(pattern, relative_file_path, absolute_file_path); end + + # Whether the cop's pending status is resolved by a `NewCops` setting, + # so that it should not appear in the pending cops warning. + # Unlike `enabled_new_cop?`, `disable` counts as covered. + # + # pkg:gem/rubocop#lib/rubocop/config.rb:459 + def new_cops_covered?(qualified_cop_name); end + + # The effective `NewCops` setting for the given cop: the department-level + # setting if present, otherwise the `AllCops` setting. + # + # pkg:gem/rubocop#lib/rubocop/config.rb:449 + def new_cops_setting_for(qualified_cop_name); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:469 + def new_cops_version_covers?(new_cops_version, qualified_cop_name); end + + # @returns [Hash{String => Gem::Version}] The locked gem versions, keyed by the gems' names. + # + # pkg:gem/rubocop#lib/rubocop/config.rb:413 + def read_gem_versions_from_target_lockfile; end + + # @returns [Array, nil] The names of the gems sourced from a local path. + # + # pkg:gem/rubocop#lib/rubocop/config.rb:421 + def read_path_sourced_gems_from_target_lockfile; end + + # @return [Float, nil] The Rails version as a `major.minor` Float. + # + # pkg:gem/rubocop#lib/rubocop/config.rb:394 + def read_rails_version_from_bundler_lock_file; end + + # @return [Float, nil] The Rails version as a `major.minor` Float. + # + # pkg:gem/rubocop#lib/rubocop/config.rb:389 + def target_rails_version_from_bundler_lock_file; end + + class << self + # pkg:gem/rubocop#lib/rubocop/config.rb:23 + def create(hash, path, check: T.unsafe(nil)); end + end +end + +# pkg:gem/rubocop#lib/rubocop/config.rb:17 +class RuboCop::Config::CopConfig < ::Struct + # pkg:gem/rubocop#lib/rubocop/config.rb:17 + def metadata; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:17 + def metadata=(_); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:17 + def name; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:17 + def name=(_); end + + class << self + # pkg:gem/rubocop#lib/rubocop/config.rb:17 + def [](*_arg0); end + + # pkg:gem/rubocop#lib/rubocop/config.rb:17 + def inspect; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:17 + def keyword_init?; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:17 + def members; end + + # pkg:gem/rubocop#lib/rubocop/config.rb:17 + def new(*_arg0); end + end +end + +# pkg:gem/rubocop#lib/rubocop/config.rb:20 +RuboCop::Config::DEFAULT_RAILS_VERSION = T.let(T.unsafe(nil), Float) + +# pkg:gem/rubocop#lib/rubocop/config.rb:19 +RuboCop::Config::EMPTY_CONFIG = T.let(T.unsafe(nil), Hash) + +# This class has methods related to finding configuration path. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_finder.rb:8 +class RuboCop::ConfigFinder + extend ::RuboCop::FileFinder + + class << self + # pkg:gem/rubocop#lib/rubocop/config_finder.rb:19 + def find_config_path(target_dir); end + + # Returns the path RuboCop inferred as the root of the project. No file + # searches will go past this directory. + # + # pkg:gem/rubocop#lib/rubocop/config_finder.rb:26 + def project_root; end + + # Returns the path RuboCop inferred as the root of the project. No file + # searches will go past this directory. + # + # pkg:gem/rubocop#lib/rubocop/config_finder.rb:17 + def project_root=(_arg0); end + + private + + # pkg:gem/rubocop#lib/rubocop/config_finder.rb:69 + def expand_path(path); end + + # pkg:gem/rubocop#lib/rubocop/config_finder.rb:40 + def find_project_dotfile(target_dir); end + + # pkg:gem/rubocop#lib/rubocop/config_finder.rb:32 + def find_project_root; end + + # pkg:gem/rubocop#lib/rubocop/config_finder.rb:44 + def find_project_root_dot_config; end + + # pkg:gem/rubocop#lib/rubocop/config_finder.rb:54 + def find_user_dotfile; end + + # pkg:gem/rubocop#lib/rubocop/config_finder.rb:62 + def find_user_xdg_config; end + end +end + +# pkg:gem/rubocop#lib/rubocop/config_finder.rb:12 +RuboCop::ConfigFinder::DEFAULT_FILE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/config_finder.rb:9 +RuboCop::ConfigFinder::DOTFILE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/config_finder.rb:11 +RuboCop::ConfigFinder::RUBOCOP_HOME = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/config_finder.rb:10 +RuboCop::ConfigFinder::XDG_CONFIG = T.let(T.unsafe(nil), String) + +# This class represents the configuration of the RuboCop application +# and all its cops. A Config is associated with a YAML configuration +# file from which it was read. Several different Configs can be used +# during a run of the rubocop program, if files in several +# directories are inspected. +# +# pkg:gem/rubocop#lib/rubocop/config_loader.rb:18 +class RuboCop::ConfigLoader + extend ::RuboCop::FileFinder + + class << self + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:141 + def add_excludes_from_files(config, config_file); end + + # @api private + # Used to add features that were required inside a config or from + # the CLI using `--require`. + # + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:228 + def add_loaded_features(loaded_features); end + + # @api private + # Used to add plugins that were required inside a config or from + # the CLI using `--plugin`. + # + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:221 + def add_loaded_plugins(loaded_plugins); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:94 + def add_missing_namespaces(path, hash); end + + # Applies CLI overrides for `AllCops/EnabledByDefault` and + # `AllCops/DisabledByDefault` to the given configuration. Used when the + # configuration would otherwise be returned without going through + # `merge_with_default` (e.g. there is no user-supplied `.rubocop.yml`). + # Used when there is no configuration file, so the defaults are the whole + # configuration and still need the same treatment `merge_with_default` + # would have given them. + # + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:206 + def apply_default_overrides(config); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:35 + def cache_root(cache_root_override = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:29 + def cache_root=(_arg0); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:39 + def clear_options; end + + # Returns the path of .rubocop.yml searching upwards in the + # directory structure starting at the given directory where the + # inspected file is. If no .rubocop.yml is found there, the + # user's home directory is checked. If there's no .rubocop.yml + # there either, the path to the default file is returned. + # + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:122 + def configuration_file_for(target_dir); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:126 + def configuration_from_file(config_file, check: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 + def debug; end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 + def debug=(_arg0); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:32 + def debug?; end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:151 + def default_configuration; end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:29 + def default_configuration=(_arg0); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 + def disable_pending_cops; end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 + def disable_pending_cops=(_arg0); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 + def disabled_by_default; end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 + def disabled_by_default=(_arg0); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 + def enable_pending_cops; end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 + def enable_pending_cops=(_arg0); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 + def enabled_by_default; end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 + def enabled_by_default=(_arg0); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 + def ignore_parent_exclusion; end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 + def ignore_parent_exclusion=(_arg0); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:33 + def ignore_parent_exclusion?; end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 + def ignore_unrecognized_cops; end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 + def ignore_unrecognized_cops=(_arg0); end + + # This API is primarily intended for testing and documenting plugins. + # When testing a plugin using `rubocop/rspec/support`, the plugin is loaded automatically, + # so this API is usually not needed. It is intended to be used only when implementing tests + # that do not use `rubocop/rspec/support`. + # + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:162 + def inject_defaults!(config_yml_path); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:55 + def load_file(file, check: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:79 + def load_yaml_configuration(absolute_path); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:30 + def loaded_features; end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:30 + def loaded_plugins; 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. + # + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:113 + def merge(base_hash, derived_hash); end + + # Merges the given configuration with the default one. + # + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:193 + def merge_with_default(config, config_file, unset_nil: T.unsafe(nil), resolve_preview: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 + def preview; end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:26 + def preview=(_arg0); end + + # Returns the path RuboCop inferred as the root of the project. No file + # searches will go past this directory. + # @deprecated Use `RuboCop::ConfigFinder.project_root` instead. + # + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:183 + def project_root; end + + private + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:242 + def check_duplication(yaml_code, absolute_path); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:234 + 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. + # + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:262 + def read_file(absolute_path); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:238 + def resolver; end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:268 + def yaml_tree_to_hash(yaml_tree); end + + # pkg:gem/rubocop#lib/rubocop/config_loader.rb:278 + def yaml_tree_to_hash!(yaml_tree); end + end +end + +# pkg:gem/rubocop#lib/rubocop/config_loader.rb:21 +RuboCop::ConfigLoader::DEFAULT_FILE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/config_loader.rb:19 +RuboCop::ConfigLoader::DOTFILE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/config_loader.rb:20 +RuboCop::ConfigLoader::RUBOCOP_HOME = T.let(T.unsafe(nil), String) + +# A help class for ConfigLoader that handles configuration resolution. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:10 +class RuboCop::ConfigLoaderResolver + # A cop's entry in the default configuration may carry a `Preview` section + # with the defaults it is expected to adopt in the next major release. Under + # `Preview` those replace the current defaults. The section is dropped either + # way, so the resolved configuration only ever shows what is in effect. + # + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:182 + def apply_preview_defaults(default_configuration, preview); end + + # When one .rubocop.yml file inherits from another .rubocop.yml file, the Include paths in the + # base configuration are relative to the directory where the base configuration file is. For the + # derived configuration, we need to make those paths relative to where the derived configuration + # file is. + # + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:66 + 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 + # arguments, will also be merged. And so on. + # + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:128 + def merge(base_hash, derived_hash, **opts); end + + # Merges the given configuration with the default one. If + # AllCops:DisabledByDefault is true, it changes the Enabled params so that + # only cops from user configuration are enabled. If + # AllCops:EnabledByDefault is true, it changes the Enabled params so that + # only cops explicitly disabled in user configuration are disabled. + # When the `--disable-all-cops` or `--enable-all-cops` CLI option is given, + # it takes precedence over the configuration values. + # + # With `resolve_preview: false` the `Preview` sections of the default + # configuration are left in place and preview is treated as off. That is + # what extending the default configuration itself needs: preview gets + # applied later, when a project configuration is resolved against it. + # + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:103 + def merge_with_default(config, config_file, unset_nil:, resolve_preview: T.unsafe(nil)); end + + # An `Enabled: true` setting in user configuration for a cop overrides an + # `Enabled: false` setting for its department. + # + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:147 + def override_department_setting_for_cops(base_hash, derived_hash); end + + # If a cop was previously explicitly enabled, but then superseded by the + # department being disabled, disable it. + # + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:164 + def override_enabled_for_disabled_departments(base_hash, derived_hash); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:38 + def resolve_inheritance(path, hash, file, debug); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:76 + def resolve_inheritance_from_gems(hash); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:11 + def resolve_plugins(rubocop_config, plugins); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:18 + def resolve_requires(path, hash); end + + private + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:309 + def base_configs(path, inherit_from, file); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:194 + def defaults_with_preview(config, resolve_preview); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:277 + def determine_inherit_mode(hash, key, preview); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:235 + def disabled?(hash, department); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:239 + def duplicate_setting?(base_hash, derived_hash, key, inherited_file); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:260 + def duplicate_setting_warning(opts, key); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:368 + def gem_config_path(gem_name, relative_config_path); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:346 + def handle_disabled_by_default(config, new_default_configuration, base_defaults); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:202 + def inherit_mode_for_default(config, preview); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:321 + def inherited_file(path, inherit_from, file); end + + # The `AllCops: Preview` in effect once inheritance is resolved: the file + # itself wins, then the files it inherits from, last one first. It has to be + # known before merging, since the keys are merged in whatever order they + # appear and `AllCops` may well come after the cops whose `Exclude` it affects. + # + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:270 + def inherited_preview?(hash, base_configs); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:305 + def merge_hashes?(base_hash, derived_hash, key); end + + # `config` has already been through `handle_disabled_by_default` by this + # point, which returns a plain hash, so read `AllCops` directly rather than + # going through `Config#for_all_cops`. + # + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:221 + def preview?(config); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:342 + def remote_config?(file); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:227 + def resolve_default_overrides(config); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:297 + def should_merge?(mode, key); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:301 + def should_override?(mode, key); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:283 + def should_union?(derived_hash, base_hash, root_mode, key); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:364 + def transform(config, &block); end + + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:248 + def warn_on_duplicate_setting(base_hash, derived_hash, key, **opts); end + + # Under `Preview`, `Exclude` is merged rather than replaced, so that excluding + # one directory does not silently drop the excludes it would have inherited - + # from the default configuration or from a file named in `inherit_from`. An + # explicit `inherit_mode` still wins, in either direction. + # + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:210 + def with_preview_exclude_merge(mode, preview); end +end + +# Raised when a RuboCop configuration file is not found. +# +# pkg:gem/rubocop#lib/rubocop/config_loader.rb:10 +class RuboCop::ConfigNotFoundError < ::RuboCop::Error; end + +# This class handles obsolete configuration. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_obsoletion/rule.rb:4 +class RuboCop::ConfigObsoletion + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:66 + def initialize(config); end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:84 + def deprecated_cop_name?(name); end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:79 + def legacy_cop_names; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:72 + def reject_obsolete!; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:21 + def rules; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:21 + def warnings; end + + private + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:151 + def cop_rules; end + + # Cop rules are keyed by the name of the original cop + # + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:112 + def load_cop_rules(rules); end + + # Parameter rules may apply to multiple cops and multiple parameters + # and are given as an array. Each combination is turned into a separate + # rule object. + # + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:125 + def load_parameter_rules(rules); end + + # Default rules for obsoletions are in config/obsoletion.yml + # Additional rules files can be added with `RuboCop::ConfigObsoletion.files << filename` + # + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:92 + def load_rules; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:138 + def obsoletions; end + + class << self + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:45 + def deprecated_cop_name?(name); end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:49 + def deprecated_names_for(cop); end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:24 + def files; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:24 + def files=(_arg0); end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:26 + def global; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:40 + def legacy_cop_names; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:30 + def reset!; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:36 + def rules_cache_key; end + end +end + +# pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:8 +RuboCop::ConfigObsoletion::COP_RULE_CLASSES = T.let(T.unsafe(nil), Hash) + +# Encapsulation of a ConfigObsoletion rule for changing a parameter +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_obsoletion/changed_enforced_styles.rb:7 +class RuboCop::ConfigObsoletion::ChangedEnforcedStyles < ::RuboCop::ConfigObsoletion::ParameterRule + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/changed_enforced_styles.rb:14 + def message; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/changed_enforced_styles.rb:10 + def violated?; end + + private + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/changed_enforced_styles.rb:28 + def value; end +end + +# pkg:gem/rubocop#lib/rubocop/config_obsoletion/changed_enforced_styles.rb:8 +RuboCop::ConfigObsoletion::ChangedEnforcedStyles::BASE_MESSAGE = T.let(T.unsafe(nil), String) + +# Encapsulation of a ConfigObsoletion rule for changing a parameter +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_obsoletion/changed_parameter.rb:7 +class RuboCop::ConfigObsoletion::ChangedParameter < ::RuboCop::ConfigObsoletion::ParameterRule + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/changed_parameter.rb:10 + def message; end +end + +# pkg:gem/rubocop#lib/rubocop/config_obsoletion/changed_parameter.rb:8 +RuboCop::ConfigObsoletion::ChangedParameter::BASE_MESSAGE = T.let(T.unsafe(nil), String) + +# Base class for ConfigObsoletion rules relating to cops +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_obsoletion/cop_rule.rb:7 +class RuboCop::ConfigObsoletion::CopRule < ::RuboCop::ConfigObsoletion::Rule + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/cop_rule.rb:10 + def initialize(config, old_name); end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/cop_rule.rb:15 + def cop_rule?; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/cop_rule.rb:19 + def message; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/cop_rule.rb:8 + def old_name; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/cop_rule.rb:29 + def violated?; end + + # Failure by default; rules that accept `severity: warning` say so + # themselves. + # + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/cop_rule.rb:25 + def warning?; end +end + +# pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:7 +RuboCop::ConfigObsoletion::DEFAULT_RULES_FILE = T.let(T.unsafe(nil), String) + +# Encapsulation of a ConfigObsoletion rule for splitting a cop's +# functionality into multiple new cops. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_obsoletion/extracted_cop.rb:8 +class RuboCop::ConfigObsoletion::ExtractedCop < ::RuboCop::ConfigObsoletion::CopRule + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/extracted_cop.rb:11 + def initialize(config, old_name, gem); end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/extracted_cop.rb:9 + def department; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/extracted_cop.rb:9 + def gem; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/extracted_cop.rb:23 + def rule_message; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/extracted_cop.rb:17 + def violated?; end + + private + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/extracted_cop.rb:32 + def affected_cops; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/extracted_cop.rb:41 + def plugin_loaded?; end +end + +# pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:18 +RuboCop::ConfigObsoletion::LOAD_RULES_CACHE = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubocop#lib/rubocop/config_obsoletion.rb:14 +RuboCop::ConfigObsoletion::PARAMETER_RULE_CLASSES = T.let(T.unsafe(nil), Hash) + +# Base class for ConfigObsoletion rules relating to parameters +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_obsoletion/parameter_rule.rb:7 +class RuboCop::ConfigObsoletion::ParameterRule < ::RuboCop::ConfigObsoletion::Rule + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/parameter_rule.rb:10 + def initialize(config, cop, parameter, metadata); end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/parameter_rule.rb:8 + def cop; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/parameter_rule.rb:8 + def metadata; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/parameter_rule.rb:8 + def parameter; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/parameter_rule.rb:17 + def parameter_rule?; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/parameter_rule.rb:21 + def violated?; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/parameter_rule.rb:25 + def warning?; end + + private + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/parameter_rule.rb:39 + def alternative; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/parameter_rule.rb:43 + def alternatives; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/parameter_rule.rb:31 + def applies_to_current_ruby_version?; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/parameter_rule.rb:47 + def reason; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/parameter_rule.rb:51 + def severity; end +end + +# Encapsulation of a ConfigObsoletion rule for removing +# a previously defined cop. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_obsoletion/removed_cop.rb:8 +class RuboCop::ConfigObsoletion::RemovedCop < ::RuboCop::ConfigObsoletion::CopRule + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/removed_cop.rb:13 + def initialize(config, old_name, metadata); end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/removed_cop.rb:9 + def metadata; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/removed_cop.rb:9 + def old_name; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/removed_cop.rb:18 + def rule_message; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/removed_cop.rb:30 + def warning?; end + + private + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/removed_cop.rb:44 + def alternatives; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/removed_cop.rb:40 + def reason; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/removed_cop.rb:36 + def severity; end +end + +# pkg:gem/rubocop#lib/rubocop/config_obsoletion/removed_cop.rb:11 +RuboCop::ConfigObsoletion::RemovedCop::BASE_MESSAGE = T.let(T.unsafe(nil), String) + +# Encapsulation of a ConfigObsoletion rule for renaming +# a cop or moving it to a new department. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_obsoletion/renamed_cop.rb:8 +class RuboCop::ConfigObsoletion::RenamedCop < ::RuboCop::ConfigObsoletion::CopRule + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/renamed_cop.rb:11 + def initialize(config, old_name, name_or_hash); end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/renamed_cop.rb:9 + def metadata; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/renamed_cop.rb:9 + def new_name; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/renamed_cop.rb:23 + def rule_message; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/renamed_cop.rb:27 + def warning?; end + + private + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/renamed_cop.rb:33 + def moved?; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/renamed_cop.rb:44 + def severity; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/renamed_cop.rb:40 + def verb; end +end + +# Abstract base class for ConfigObsoletion rules +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_obsoletion/rule.rb:7 +class RuboCop::ConfigObsoletion::Rule + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/rule.rb:8 + def initialize(config); end + + # Does this rule relate to cops? + # + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/rule.rb:13 + def cop_rule?; end + + # Does this rule relate to parameters? + # + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/rule.rb:18 + def parameter_rule?; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/rule.rb:22 + def violated?; end + + private + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/rule.rb:28 + def config; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/rule.rb:36 + def smart_loaded_path; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/rule.rb:30 + def to_sentence(collection, connector: T.unsafe(nil)); end +end + +# Encapsulation of a ConfigObsoletion rule for splitting a cop's +# functionality into multiple new cops. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_obsoletion/split_cop.rb:8 +class RuboCop::ConfigObsoletion::SplitCop < ::RuboCop::ConfigObsoletion::CopRule + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/split_cop.rb:11 + def initialize(config, old_name, metadata); end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/split_cop.rb:9 + def metadata; end + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/split_cop.rb:16 + def rule_message; end + + private + + # pkg:gem/rubocop#lib/rubocop/config_obsoletion/split_cop.rb:22 + def alternatives; end +end + +# This class handles collecting the options for regenerating a TODO file. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_regeneration.rb:6 +class RuboCop::ConfigRegeneration + # Get options from the comment in the TODO file, and parse them as options + # + # pkg:gem/rubocop#lib/rubocop/config_regeneration.rb:12 + def options; end + + private + + # pkg:gem/rubocop#lib/rubocop/config_regeneration.rb:29 + def generation_command; end + + # pkg:gem/rubocop#lib/rubocop/config_regeneration.rb:25 + def todo_exists?; end +end + +# pkg:gem/rubocop#lib/rubocop/config_regeneration.rb:7 +RuboCop::ConfigRegeneration::AUTO_GENERATED_FILE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/config_regeneration.rb:8 +RuboCop::ConfigRegeneration::COMMAND_REGEX = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop#lib/rubocop/config_regeneration.rb:9 +RuboCop::ConfigRegeneration::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# Handles caching of configurations and association of inspected +# ruby files to configurations. +# +# pkg:gem/rubocop#lib/rubocop/config_store.rb:6 +class RuboCop::ConfigStore + # pkg:gem/rubocop#lib/rubocop/config_store.rb:10 + def initialize; end + + # pkg:gem/rubocop#lib/rubocop/config_store.rb:28 + def apply_options!(options); end + + # If type (file/dir) is known beforehand, + # prefer using #for_file or #for_dir for improved performance + # + # pkg:gem/rubocop#lib/rubocop/config_store.rb:57 + def for(file_or_dir); end + + # pkg:gem/rubocop#lib/rubocop/config_store.rb:66 + def for_dir(dir); end + + # pkg:gem/rubocop#lib/rubocop/config_store.rb:47 + def for_file(file); end + + # pkg:gem/rubocop#lib/rubocop/config_store.rb:51 + def for_pwd; end + + # pkg:gem/rubocop#lib/rubocop/config_store.rb:38 + def force_default_config!; end + + # pkg:gem/rubocop#lib/rubocop/config_store.rb:33 + def options_config=(options_config); end + + # pkg:gem/rubocop#lib/rubocop/config_store.rb:42 + def unvalidated; end + + # pkg:gem/rubocop#lib/rubocop/config_store.rb:7 + def validated; end + + # pkg:gem/rubocop#lib/rubocop/config_store.rb:8 + def validated?; end +end + +# Handles validation of configuration, for example cop names, parameter +# names, and Ruby versions. +# +# pkg:gem/rubocop#lib/rubocop/config_validator.rb:7 +class RuboCop::ConfigValidator + extend ::RuboCop::SimpleForwardable + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:30 + def initialize(config); end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:28 + def for_all_cops(*, **, &); end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:28 + def smart_loaded_path(*, **, &); end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:67 + def target_ruby_version; end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:36 + def validate; end + + # Validations that should only be run after all config resolving has + # taken place: + # * The target ruby version is only checked once the entire inheritance + # chain has been loaded so that only the final value is validated, and + # any obsolete but overridden values are ignored. + # + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:63 + def validate_after_resolution; end + + private + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:102 + def alert_about_unrecognized_cops(invalid_cop_names); end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:326 + def check_cop_config_value(hash, parent = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:75 + def check_obsoletions; end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:82 + def check_target_ruby; end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:265 + def each_invalid_parameter(cop_name); end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:118 + def list_unknown_cops(invalid_cop_names); end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:222 + def new_cops_value_for_department(name, section); end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:229 + def new_cops_version_value?(value); end + + # FIXME: Handling colors in exception messages like this is ugly. + # + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:347 + def param_error_message(parent, key, value, supposed_values); end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:315 + def reject_conflicting_safe_settings; end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:306 + def reject_mutually_exclusive_defaults; end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:141 + def suggestion(name); end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:73 + def target_ruby; end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:199 + def validate_all_cops_new_cops_parameter; end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:173 + def validate_all_cops_parameters; end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:210 + def validate_department_new_cops_parameters; end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:280 + def validate_enforced_styles(valid_cop_names); end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:179 + def validate_fail_level_parameter; end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:168 + def validate_new_cops_parameter; end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:251 + def validate_parameter_names(valid_cop_names); end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:237 + def validate_parameter_shape(valid_cop_names); end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:189 + def validate_preview_parameter; end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:300 + def validate_support_and_has_list(name, formats, valid); end + + # pkg:gem/rubocop#lib/rubocop/config_validator.rb:157 + def validate_syntax_cop; end +end + +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_validator.rb:11 +RuboCop::ConfigValidator::COMMON_PARAMS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/config_validator.rb:25 +RuboCop::ConfigValidator::CONFIG_CHECK_AUTOCORRECTS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/config_validator.rb:24 +RuboCop::ConfigValidator::CONFIG_CHECK_DEPARTMENTS = T.let(T.unsafe(nil), Array) + +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_validator.rb:23 +RuboCop::ConfigValidator::CONFIG_CHECK_KEYS = T.let(T.unsafe(nil), Set) + +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_validator.rb:14 +RuboCop::ConfigValidator::INTERNAL_PARAMS = T.let(T.unsafe(nil), Array) + +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_validator.rb:18 +RuboCop::ConfigValidator::NEW_COPS_VALUES = T.let(T.unsafe(nil), Array) + +# @api private +# +# pkg:gem/rubocop#lib/rubocop/config_validator.rb:20 +RuboCop::ConfigValidator::NEW_COPS_VERSION_PATTERN = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop#lib/rubocop/cop/util.rb:4 +module RuboCop::Cop; end + +# This module checks for nodes that should be aligned to the left or right. +# This amount is determined by the instance variable @column_delta. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/alignment.rb:7 +module RuboCop::Cop::Alignment + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/alignment.rb:30 + def check_alignment(items, base_column = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/alignment.rb:12 + def column_delta; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/alignment.rb:14 + def configured_indentation_width; end + + # @api public + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/alignment.rb:62 + def display_column(range); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/alignment.rb:49 + def each_bad_alignment(items, base_column); end + + # @deprecated Use processed_source.line_with_comment?(line) + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/alignment.rb:73 + def end_of_line_comment(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/alignment.rb:22 + def indentation(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/alignment.rb:26 + def offset(node); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/alignment.rb:82 + def register_offense(offense_node, message_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/alignment.rb:18 + def using_tabs?; end + + # @api public + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/alignment.rb:68 + def within?(inner, outer); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/alignment.rb:8 +RuboCop::Cop::Alignment::SPACE = T.let(T.unsafe(nil), String) + +# This class does autocorrection of nodes that should just be moved to +# the left or to the right, amount being determined by the instance +# variable column_delta. +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:8 +class RuboCop::Cop::AlignmentCorrector + extend ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::Alignment + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:40 + def align_end(corrector, processed_source, node, align_to); end + + # `tab_indentation` may only be set by callers whose `column_delta` represents + # whole indentation levels (e.g. `Layout/IndentationWidth`). + # Alignment to an arbitrary column cannot be expressed with tabs, so those callers + # leave tab correction disabled to avoid producing a never-converging correction. + # + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:19 + def correct(corrector, processed_source, node, column_delta, tab_indentation: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:13 + def processed_source; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:180 + def alignment_column(align_to); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:55 + def autocorrect_line(corrector, line_begin_pos, expr, column_delta, taboo_ranges); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:148 + def block_comment_within?(expr); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:154 + def calculate_range(expr, line_begin_pos, column_delta); end + + # The number of columns a single tab spans. This must match the width + # `Layout/IndentationWidth` uses to compute `column_delta`, otherwise + # the division below would not land on a tab boundary. `Layout/IndentationStyle` + # has its own `IndentationWidth`, but that only governs how that cop replaces tabs + # with spaces, so it must not be consulted here. + # + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:107 + def configured_indentation_width; end + + # Tab indentation is corrected by rewriting each line's leading whitespace to + # the target number of tabs. Working in whole tabs rather than applying a column delta + # keeps the result idempotent, which avoids the infinite loops that delta-based correction + # caused for tabs. + # + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:73 + def correct_tab_indentation(corrector, expr, column_delta, taboo_ranges); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:82 + def correct_tab_line(corrector, line_range, column_delta, taboo_ranges); end + + # Some special kinds of string literals are not composed of literal + # characters between two delimiters: + # - The source map of `?a` responds to :begin and :end but its end is + # nil. + # - The source map of `__FILE__` responds to neither :begin nor :end. + # + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:144 + def delimited_string_literal?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:166 + def each_line(expr); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:190 + def indentation_string(column); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:129 + def inside_string_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:111 + def inside_string_ranges(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:117 + def source_string_ranges; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:125 + def string_ranges(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:93 + def target_tab_indentation(leading, column_delta); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:198 + def using_tabs?; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/alignment_corrector.rb:174 + def whitespace_range(node); end + end +end + +# This module encapsulates the ability to allow certain identifiers in a cop. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_identifiers.rb:6 +module RuboCop::Cop::AllowedIdentifiers + # if a variable starts with a sigil it will be removed + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_identifiers.rb:9 + def allowed_identifier?(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_identifiers.rb:13 + def allowed_identifiers; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_identifiers.rb:7 +RuboCop::Cop::AllowedIdentifiers::SIGILS = T.let(T.unsafe(nil), String) + +# This module encapsulates the ability to allow certain methods when +# parsing. Even if the code is in offense, if it contains methods +# that are allowed. This module is equivalent to the IgnoredMethods module, +# which will be deprecated in RuboCop 2.0. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_methods.rb:9 +module RuboCop::Cop::AllowedMethods + private + + # @api public + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_methods.rb:13 + def allowed_method?(name); end + + # @api public + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_methods.rb:27 + def allowed_methods; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_methods.rb:35 + def cop_config_allowed_methods; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_methods.rb:39 + def cop_config_deprecated_values; end + + # @deprecated Use allowed_method? instead + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_methods.rb:18 + def ignored_method?; end +end + +# This module encapsulates the ability to ignore certain lines when +# parsing. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_pattern.rb:7 +module RuboCop::Cop::AllowedPattern + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_pattern.rb:10 + def allowed_line?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_pattern.rb:52 + def allowed_pattern_regexps; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_pattern.rb:42 + def allowed_patterns; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_pattern.rb:62 + def cop_config_deprecated_methods_values; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_pattern.rb:56 + def cop_config_patterns_values; end + + # @deprecated Use allowed_line? instead + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_pattern.rb:21 + def ignored_line?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_pattern.rb:29 + def matches_allowed_pattern?(line); end + + # @deprecated Use matches_allowed_pattern? instead + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_pattern.rb:34 + def matches_ignored_pattern?(line); end +end + +# This module encapsulates the ability to allow certain receivers in a cop. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_receivers.rb:6 +module RuboCop::Cop::AllowedReceivers + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_receivers.rb:7 + def allowed_receiver?(receiver); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_receivers.rb:29 + def allowed_receivers; end + + # pkg:gem/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 +# +# pkg:gem/rubocop#lib/rubocop/cop/registry.rb:7 +class RuboCop::Cop::AmbiguousCopName < ::RuboCop::Error + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:11 + def initialize(name, origin, badges); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/registry.rb:8 +RuboCop::Cop::AmbiguousCopName::MSG = T.let(T.unsafe(nil), String) + +# Representation of an annotation comment in source code (eg. `# TODO: blah blah blah`). +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:6 +class RuboCop::Cop::AnnotationComment + # @param [Parser::Source::Comment] comment + # @param [Array] keywords + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:11 + def initialize(comment, keywords); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:17 + def annotation?; end + + # Returns the range bounds for just the annotation + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:29 + def bounds; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:7 + def colon; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:7 + def comment; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:21 + def correct?(colon:); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:7 + def keyword; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:7 + def margin; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:7 + def note; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:7 + def space; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:65 + def just_keyword_of_sentence?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:61 + def keyword_appearance?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:37 + def keywords; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:51 + def regex; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:39 + def split_comment(comment); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/annotation_comment.rb:48 +RuboCop::Cop::AnnotationComment::KEYWORDS_REGEX_CACHE = T.let(T.unsafe(nil), Hash) + +# Handles the `MinSize` configuration option for array-based cops +# `Style/SymbolArray` and `Style/WordArray`, which check for use of the +# relevant percent literal syntax such as `%i[...]` and `%w[...]` +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/array_min_size.rb:8 +module RuboCop::Cop::ArrayMinSize + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/array_min_size.rb:19 + def array_style_detected(style, ary_size); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/array_min_size.rb:11 + def below_array_length?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/array_min_size.rb:38 + def largest_brackets_size(style, ary_size); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/array_min_size.rb:15 + def min_size_config; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/array_min_size.rb:48 + def smallest_percent_size(style, ary_size); end +end + +# Common code for ordinary arrays with [] that can be written with % +# syntax. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/array_syntax.rb:7 +module RuboCop::Cop::ArraySyntax + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/array_syntax.rb:10 + def bracketed_array_of?(element_type, node); end +end + +# extend this module to signal autocorrection support +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/auto_corrector.rb:6 +module RuboCop::Cop::AutoCorrector + # pkg:gem/rubocop#lib/rubocop/cop/mixin/auto_corrector.rb:7 + def support_autocorrect?; end +end + +# This module encapsulates the logic for autocorrect behavior for a cop. +# +# pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:6 +module RuboCop::Cop::AutocorrectLogic + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:7 + def autocorrect?; end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:39 + def autocorrect_enabled?; end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:23 + def autocorrect_requested?; end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:11 + def autocorrect_with_disable_uncorrectable?; end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:27 + def correctable?; end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:31 + def disable_uncorrectable?; end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:35 + def safe_autocorrect?; end + + # Whether a correction exists but is skipped because it is unsafe in a + # safe autocorrect run, while `--disable-uncorrectable` asks for a todo + # comment on everything this run cannot correct. + # + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:18 + def skipped_unsafe_correction_with_disable_uncorrectable?; end + + private + + # When LSP is enabled or the `--editor-mode` option is on, it is considered as editing + # source code, and autocorrection with `AutoCorrect: contextual` will not be performed. + # The `editing` option says the same without the rest of LSP mode, which + # is about showing offenses in an editor. + # + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:60 + def contextual_autocorrect_held_back?; end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:64 + def disable_offense(offense_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:157 + def disable_offense_at_end_of_line(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:165 + def disable_offense_before_and_after(range_by_lines); end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:91 + def disable_offense_with_eol_or_surround_comment(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:161 + def eol_comment; end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:99 + def eol_comment_would_be_inside_literal?(offense_range, literal_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:116 + def heredoc_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:106 + def line_with_eol_comment_too_long?(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:151 + def max_line_length; end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:77 + def multiline_ranges(offense_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:128 + def multiline_string?(node); end + + # Expand the given range to include all of any lines it covers. Does not + # include newline at end of the last line. + # + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:141 + def range_by_lines(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:132 + def range_of_first_line(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:124 + def string_continuation?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:112 + def surrounding_heredoc?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:120 + def surrounding_percent_array?(node); end +end + +# Identifier of all cops containing a department and cop name. +# +# All cops are identified by their badge. For example, the badge for +# `RuboCop::Cop::Layout::IndentationStyle` is `Layout/IndentationStyle`. +# Badges can be parsed as either `Department/CopName` or just `CopName` to +# allow for badge references in source files that omit the department for +# RuboCop to infer. +# +# pkg:gem/rubocop#lib/rubocop/cop/badge.rb:12 +class RuboCop::Cop::Badge + # pkg:gem/rubocop#lib/rubocop/cop/badge.rb:34 + def initialize(class_name_parts); end + + # pkg:gem/rubocop#lib/rubocop/cop/badge.rb:41 + def ==(other); end + + # pkg:gem/rubocop#lib/rubocop/cop/badge.rb:13 + def cop_name; end + + # pkg:gem/rubocop#lib/rubocop/cop/badge.rb:13 + def department; end + + # pkg:gem/rubocop#lib/rubocop/cop/badge.rb:13 + def department_name; end + + # pkg:gem/rubocop#lib/rubocop/cop/badge.rb:44 + def eql?(other); end + + # pkg:gem/rubocop#lib/rubocop/cop/badge.rb:46 + def hash; end + + # pkg:gem/rubocop#lib/rubocop/cop/badge.rb:51 + def match?(other); end + + # Returns true if the badge's qualified name or the badge's department + # matches any of the given names. + # + # pkg:gem/rubocop#lib/rubocop/cop/badge.rb:57 + def match_name?(given_names); end + + # pkg:gem/rubocop#lib/rubocop/cop/badge.rb:67 + def qualified?; end + + # pkg:gem/rubocop#lib/rubocop/cop/badge.rb:63 + def to_s; end + + # pkg:gem/rubocop#lib/rubocop/cop/badge.rb:71 + def with_department(department); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/badge.rb:27 + def camel_case(name_part); end + + # pkg:gem/rubocop#lib/rubocop/cop/badge.rb:15 + def for(class_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/badge.rb:23 + def parse(identifier); end + end +end + +# A scaffold for concrete cops. +# +# The Cop::Base class is meant to be extended. +# +# Cops track offenses and can autocorrect them on the fly. +# +# A commissioner object is responsible for traversing the AST and invoking +# the specific callbacks on each cop. +# +# First the callback `on_new_investigation` is called; +# if a cop needs to do its own processing of the AST or depends on +# something else. +# +# Then callbacks like `on_def`, `on_send` (see AST::Traversal) are called +# with their respective nodes. +# +# Finally the callback `on_investigation_end` is called. +# +# Within these callbacks, cops are meant to call `add_offense` or +# `add_global_offense`. Use the `processed_source` method to +# get the currently processed source being investigated. +# +# In case of invalid syntax / unparsable content, +# the callback `on_other_file` is called instead of all the other +# `on_...` callbacks. +# +# Private methods are not meant for custom cops consumption, +# nor are any instance variables. +# +# pkg:gem/rubocop#lib/rubocop/cop/base.rb:34 +class RuboCop::Cop::Base + include ::RuboCop::AST::Sexp + include ::RuboCop::PathUtil + include ::RuboCop::Cop::Util + include ::RuboCop::Cop::IgnoredNode + include ::RuboCop::Cop::AutocorrectLogic + extend ::RuboCop::AST::Sexp + extend ::RuboCop::AST::NodePattern::Macros + extend ::RuboCop::ExcludeLimit + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:164 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:293 + def active_support_extensions_enabled?; end + + # Adds an offense that has no particular location. + # No correction can be applied to global offenses + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:197 + def add_global_offense(message = T.unsafe(nil), severity: T.unsafe(nil)); end + + # Adds an offense on the specified range (or node with an expression) + # Unless that offense is disabled for this range, a corrector will be yielded + # to provide the cop the opportunity to autocorrect the offense. + # If message is not specified, the method `message` will be called. + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:209 + def add_offense(node_or_range, message: T.unsafe(nil), severity: T.unsafe(nil), &block); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:380 + def always_autocorrect?; end + + # Called before any investigation + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:366 + def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:348 + def callbacks_needed; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:43 + def config; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:256 + def config_to_allow_offenses; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:260 + def config_to_allow_offenses=(hash); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:386 + def contextual_autocorrect?; end + + # Configuration Helpers + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:250 + def cop_config; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:242 + def cop_name; end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:391 + def disabled_autocorrect?; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:317 + def excluded_file?(file); end + + # This method should be overridden when a cop's behavior depends + # on state that lives outside of these locations: + # + # (1) the file under inspection + # (2) the cop's source code + # (3) the config (eg a .rubocop.yml file) + # + # For example, some cops may want to look at other parts of + # the codebase being inspected to find violations. A cop may + # use the presence or absence of file `foo.rb` to determine + # whether a certain violation exists in `bar.rb`. + # + # Overriding this method allows the cop to indicate to RuboCop's + # ResultCache system when those external dependencies change, + # ie when the ResultCache should be invalidated. + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:238 + def external_dependency_checksum; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:396 + 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 + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:191 + def message(_range = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:246 + def name; end + + # @deprecated Make potential errors with previous API more obvious + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:339 + def offenses; end + + # Called after all on_... have been called + # When refining this method, always call `super` + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:178 + def on_investigation_end; end + + # Called before all on_... have been called + # When refining this method, always call `super` + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:172 + def on_new_investigation; end + + # Called instead of all on_... callbacks for unrecognized files / syntax errors + # When refining this method, always call `super` + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:184 + def on_other_file; end + + # There should be very limited reasons for a Cop to do it's own parsing + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:322 + def parse(source, path = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:285 + def parser_engine; end + + # Whether the user opted in to unstable behavior, with `--preview` or + # `AllCops: Preview`. Cops branch on this to ship a change that is not + # ready to be the default yet. + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:304 + def preview?; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:43 + def processed_source; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:44 + def project_index; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:44 + def project_index=(_arg0); end + + # @api private + # Called between investigations + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:328 + def ready; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:308 + def relevant_file?(file); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:297 + def string_literals_frozen_by_default?; end + + # Returns the version of a gem in the target, by default its locked version + # (i.e. from Gemfile.lock or gems.locked). + # + # The requirements declared with `requires_gem` are checked against the version + # this method returns, so an extension that lets users state the version of its + # gem in `AllCops` (e.g. `TargetFrameworkVersion`) can override it for that gem, + # returning a `Gem::Version`, and fall back to `super` for any other gem. + # + # @param [String] gem_name + # @return [Gem::Version, nil] The gem version, or nil if the gem is not present. + # + # @api public + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:280 + def target_gem_version(gem_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:289 + def target_rails_version; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:264 + def target_ruby_version; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:540 + def annotate(message); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:430 + def apply_correction(corrector); end + + # @return [Symbol] offense status + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:504 + def attempt_correction(range, corrector); end + + # Reserved for Cop::Cop + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:426 + def callback_argument(range); end + + # Called to complete an investigation + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:455 + def complete_investigation; end + + # @return [Symbol, Corrector] offense status + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:473 + def correct(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:592 + def covering_disabled_range(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:444 + def current_corrector; end + + # Reserved for Commissioner: + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:436 + def current_offense_locations; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:448 + def current_offenses; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:440 + def currently_disabled_lines; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:607 + def custom_severity; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:603 + def default_severity; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:518 + def disable_uncorrectable(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:569 + def enabled_line?(line_number); end + + # A multi-line offense is suppressed by a directive on any line of its + # range, not only its first line, matching the intuition that the + # directive is attached to the offending code. + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:578 + def enabled_lines?(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:546 + def file_name_matches_any?(file, parameter, default_result); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:536 + def find_message(range, message); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:599 + def find_severity(_range, severity); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:561 + def matches_absolute_include_pattern?(patterns, file); end + + # @return [Offense] + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:409 + def new_offense(range, severity, message, status, corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:620 + def range_for_original(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:525 + def range_from_node_or_range(node_or_range); end + + # Actually private methods + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:465 + def reset_investigation; end + + # The `--` reason on the directive that suppresses offenses on this + # range, or `nil` when the directive carries none. + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:587 + def suppression_reason(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:631 + def target_satisfies_all_gem_version_requirements?; end + + # @return [Symbol] offense status + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:488 + def use_corrector(range, corrector); end + + class << self + # List of cops that should not try to autocorrect at the same + # time as this cop + # + # @return [Array] + # + # @api public + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:65 + def autocorrect_incompatible_with; end + + # Naming + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:99 + def badge; end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:353 + def callbacks_needed; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:103 + def cop_name; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:107 + def department; end + + # Returns a url to view this cops documentation online. + # Requires 'DocumentationBaseURL' to be set for your department. + # Will follow the convention of RuboCops own documentation structure, + # overwrite this method to accommodate your custom layout. + # @return [String, nil] + # + # @api public + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:76 + def documentation_url(config = T.unsafe(nil)); end + + # Call for abstract Cop classes + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:87 + def exclude_from_registry; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:146 + def gem_requirements; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:80 + def inherited(subclass); end + + # Override and return the Force class(es) you need to join + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:124 + def joining_forces; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:111 + def lint?; end + + # Returns true if the cop name or the cop namespace matches any of the + # given names. + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:117 + def match?(given_names); end + + # Register a version requirement for the given gem name. + # This cop will be skipped unless the target satisfies *all* requirements. + # @param [String] gem_name + # @param [Array] version_requirements The version requirements, + # using the same syntax as a Gemfile, e.g. ">= 1.2.3" + # + # If omitted, any version of the gem will be accepted. + # + # https://guides.rubygems.org/patterns/#declaring-dependencies + # + # @api public + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:159 + def requires_gem(gem_name, *version_requirements); end + + # Returns if class supports autocorrect. + # It is recommended to extend AutoCorrector instead of overriding + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:93 + def support_autocorrect?; end + + # Override if your cop should be called repeatedly for multiple investigations + # Between calls to `on_new_investigation` and `on_investigation_end`, + # the result of `processed_source` will remain constant. + # You should invalidate any caches that depend on the current `processed_source` + # in the `on_new_investigation` callback. + # If your cop does autocorrections, be aware that your instance may be called + # multiple times with the same `processed_source.path` but different content. + # Note that under `--parallel` each worker process has its own cop + # instances, so state persists only within a worker's share of the files. + # + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:137 + def support_multiple_source?; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:404 + def restrict_on_send; end + end +end + +# Departments whose cops report above `convention` unless a cop says +# otherwise. The exceptions live in `config/default.yml` as an explicit +# `Severity`, such as the lint-like cops in `Bundler` and `Gemspec`. +# +# pkg:gem/rubocop#lib/rubocop/cop/base.rb:57 +RuboCop::Cop::Base::DEPARTMENT_SEVERITIES = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubocop#lib/rubocop/cop/base.rb:452 +RuboCop::Cop::Base::EMPTY_OFFENSES = T.let(T.unsafe(nil), Array) + +# Reports of an investigation. +# Immutable +# Consider creation API private +# +# pkg:gem/rubocop#lib/rubocop/cop/base.rb:49 +class RuboCop::Cop::Base::InvestigationReport < ::Struct + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:49 + def cop; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:49 + def cop=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:49 + def corrector; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:49 + def corrector=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:49 + def offenses; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:49 + def offenses=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:49 + def processed_source; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:49 + def processed_source=(_); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:49 + def [](*_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:49 + def inspect; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:49 + def keyword_init?; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:49 + def members; end + + # pkg:gem/rubocop#lib/rubocop/cop/base.rb:49 + def new(*_arg0); end + end +end + +# List of methods names to restrict calls for `on_send` / `on_csend` +# +# pkg:gem/rubocop#lib/rubocop/cop/base.rb:52 +RuboCop::Cop::Base::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# Cops for the `Bundler` department. The department's cops are registered for lazy loading +# and their files are loaded on demand. +# +# pkg:gem/rubocop#lib/rubocop/cop/bundler.rb:7 +module RuboCop::Cop::Bundler + extend ::RuboCop::Cop::LazyLoader +end + +# A Gem's requirements should be listed only once in a Gemfile. +# +# @example +# # bad +# gem 'rubocop' +# gem 'rubocop' +# +# # bad +# group :development do +# gem 'rubocop' +# end +# +# group :test do +# gem 'rubocop' +# end +# +# # good +# group :development, :test do +# gem 'rubocop' +# end +# +# # good +# gem 'rubocop', groups: [:development, :test] +# +# # good - conditional declaration +# if Dir.exist?(local) +# gem 'rubocop', path: local +# elsif ENV['RUBOCOP_VERSION'] == 'master' +# gem 'rubocop', git: 'https://github.com/rubocop/rubocop.git' +# else +# gem 'rubocop', '~> 0.90.0' +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_gem.rb:39 +class RuboCop::Cop::Bundler::DuplicatedGem < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_gem.rb:58 + def gem_declarations(param0); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_gem.rb:45 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_gem.rb:67 + def conditional_declaration?(nodes); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_gem.rb:60 + def duplicated_gem_nodes; end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_gem.rb:81 + def register_offense(node, gem_name, line_of_first_occurrence); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_gem.rb:75 + def within_conditional?(node, conditional_node); end +end + +# pkg:gem/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] +# +# pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_group.rb:58 +class RuboCop::Cop::Bundler::DuplicatedGroup < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_group.rb:66 + def group_declarations(param0); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_group.rb:68 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_group.rb:82 + def duplicated_group_nodes; end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_group.rb:105 + def find_source_key(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_group.rb:115 + def group_attributes(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_group.rb:94 + def register_offense(node, group_name, line_of_first_occurrence); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/duplicated_group.rb:61 +RuboCop::Cop::Bundler::DuplicatedGroup::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/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. +# +# The optional "OnlyFor" configuration array +# can be used to only register offenses when the gems +# use certain options or have version specifiers. +# +# When "version_specifiers" is included, a comment +# will be enforced if the gem has any version specifier. +# +# When "restrictive_version_specifiers" is included, a comment +# will be enforced if the gem has a version specifier that +# holds back the version of the gem. +# +# For any other value in the array, a comment will be enforced for +# a gem if an option by the same name is present. +# A useful use case is to enforce a comment when using +# options that change the source of a gem: +# +# - `bitbucket` +# - `gist` +# - `git` +# - `github` +# - `source` +# +# For a full list of options supported by bundler, +# see https://bundler.io/man/gemfile.5.html +# . +# +# @example OnlyFor: [] (default) +# # bad +# +# gem 'foo' +# +# # good +# +# # Helpers for the foo things. +# gem 'foo' +# +# @example OnlyFor: ['version_specifiers'] +# # bad +# +# gem 'foo', '< 2.1' +# +# # good +# +# # Version 2.1 introduces breaking change baz +# gem 'foo', '< 2.1' +# +# @example OnlyFor: ['restrictive_version_specifiers'] +# # bad +# +# gem 'foo', '< 2.1' +# +# # good +# +# gem 'foo', '>= 1.0' +# +# # Version 2.1 introduces breaking change baz +# gem 'foo', '< 2.1' +# +# @example OnlyFor: ['version_specifiers', 'github'] +# # bad +# +# gem 'foo', github: 'some_account/some_fork_of_foo' +# +# gem 'bar', '< 2.1' +# +# # good +# +# # Using this fork because baz +# gem 'foo', github: 'some_account/some_fork_of_foo' +# +# # Version 2.1 introduces breaking change baz +# gem 'bar', '< 2.1' +# +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:83 +class RuboCop::Cop::Bundler::GemComment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::GemDeclaration + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:93 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:134 + def checked_options_present?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:108 + def commented?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:104 + def commented_any_descendant?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:158 + def contains_checked_options?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:162 + def gem_options(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:129 + def ignored_gem?(node); end + + # The args node1 & node2 may represent a RuboCop::AST::Node + # or a Parser::Source::Comment. Both respond to #loc. + # + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:115 + def precede?(node1, node2); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:125 + def preceding_comment?(node1, node2); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:119 + def preceding_lines(node); end + + # Version specifications that restrict all updates going forward. This excludes versions + # like ">= 1.0" or "!= 2.0.3". + # + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:151 + def restrictive_version_specified_gem?(node); end + + # Besides the gem name, all other *positional* arguments to `gem` are version specifiers, + # as long as it has one we know there's at least one version specifier. + # + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:144 + def version_specified_gem?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:87 +RuboCop::Cop::Bundler::GemComment::CHECKED_OPTIONS_CONFIG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:86 +RuboCop::Cop::Bundler::GemComment::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:90 +RuboCop::Cop::Bundler::GemComment::RESTRICTIVE_VERSION_PATTERN = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:89 +RuboCop::Cop::Bundler::GemComment::RESTRICTIVE_VERSION_SPECIFIERS_OPTION = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:91 +RuboCop::Cop::Bundler::GemComment::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_comment.rb:88 +RuboCop::Cop::Bundler::GemComment::VERSION_SPECIFIERS_OPTION = T.let(T.unsafe(nil), String) + +# Verifies that a project contains Gemfile or gems.rb file and correct +# associated lock file based on the configuration. +# +# @example EnforcedStyle: Gemfile (default) +# # bad +# Project contains gems.rb and gems.locked files +# +# # bad +# Project contains Gemfile and gems.locked file +# +# # good +# Project contains Gemfile and Gemfile.lock +# +# @example EnforcedStyle: gems.rb +# # bad +# Project contains Gemfile and Gemfile.lock files +# +# # bad +# Project contains gems.rb and Gemfile.lock file +# +# # good +# Project contains gems.rb and gems.locked files +# +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:28 +class RuboCop::Cop::Bundler::GemFilename < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:42 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:87 + def expected_gemfile?(basename); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:79 + def gemfile_offense?(basename); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:92 + def gemfile_required?; end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:83 + def gems_rb_offense?(basename); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:96 + def gems_rb_required?; end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:57 + def register_gemfile_offense(file_path, basename); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:68 + def register_gems_rb_offense(file_path, basename); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:52 + def register_offense(file_path, basename); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:39 +RuboCop::Cop::Bundler::GemFilename::GEMFILE_FILES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:40 +RuboCop::Cop::Bundler::GemFilename::GEMS_RB_FILES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:35 +RuboCop::Cop::Bundler::GemFilename::MSG_GEMFILE_MISMATCHED = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:31 +RuboCop::Cop::Bundler::GemFilename::MSG_GEMFILE_REQUIRED = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:37 +RuboCop::Cop::Bundler::GemFilename::MSG_GEMS_RB_MISMATCHED = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_filename.rb:33 +RuboCop::Cop::Bundler::GemFilename::MSG_GEMS_RB_REQUIRED = T.let(T.unsafe(nil), String) + +# Enforce that Gem version specifications or a commit reference (branch, +# ref, or tag) are either required or forbidden. +# +# @example EnforcedStyle: required (default) +# # bad +# gem 'rubocop' +# +# # good +# gem 'rubocop', '~> 1.12' +# +# # good +# gem 'rubocop', '>= 1.10.0' +# +# # good +# gem 'rubocop', '>= 1.5.0', '< 1.10.0' +# +# # good +# gem 'rubocop', branch: 'feature-branch' +# +# # good +# gem 'rubocop', ref: '74b5bfbb2c4b6fd6cdbbc7254bd7084b36e0c85b' +# +# # good +# gem 'rubocop', tag: 'v1.17.0' +# +# @example EnforcedStyle: forbidden +# # good +# gem 'rubocop' +# +# # bad +# gem 'rubocop', '~> 1.12' +# +# # bad +# gem 'rubocop', '>= 1.10.0' +# +# # bad +# gem 'rubocop', '>= 1.5.0', '< 1.10.0' +# +# # bad +# gem 'rubocop', branch: 'feature-branch' +# +# # bad +# gem 'rubocop', ref: '74b5bfbb2c4b6fd6cdbbc7254bd7084b36e0c85b' +# +# # bad +# gem 'rubocop', tag: 'v1.17.0' +# +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:53 +class RuboCop::Cop::Bundler::GemVersion < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::GemDeclaration + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:68 + def includes_commit_reference?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:63 + def includes_version_specification?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:72 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:86 + def allowed_gem?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:90 + def allowed_gems; end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:112 + def forbidden_offense?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:118 + def forbidden_style?; end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:94 + def message(_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:102 + def offense?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:106 + def required_offense?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:122 + def required_style?; end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:126 + def version_specification?(expression); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:58 +RuboCop::Cop::Bundler::GemVersion::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:57 +RuboCop::Cop::Bundler::GemVersion::REQUIRED_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:59 +RuboCop::Cop::Bundler::GemVersion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/gem_version.rb:60 +RuboCop::Cop::Bundler::GemVersion::VERSION_SPECIFICATION_REGEX = T.let(T.unsafe(nil), Regexp) + +# Passing symbol arguments to `source` (e.g. `source :rubygems`) is +# deprecated because they default to using HTTP requests. Instead, specify +# `'https://rubygems.org'` if possible, or `'http://rubygems.org'` if not. +# +# When autocorrecting, this cop will replace symbol arguments with +# `'https://rubygems.org'`. +# +# This cop will not replace existing sources that use `http://`. This may +# be necessary where HTTPS is not available. For example, where using an +# internal gem server via an intranet, or where HTTPS is prohibited. +# However, you should strongly prefer `https://` where possible, as it is +# more secure. +# +# If you don't allow `http://`, please set `false` to `AllowHttpProtocol`. +# This option is `true` by default for safe autocorrection. +# +# @example +# # bad +# source :gemcutter +# source :rubygems +# source :rubyforge +# +# # good +# source 'https://rubygems.org' # strongly recommended +# +# @example AllowHttpProtocol: true (default) +# +# # good +# source 'http://rubygems.org' # use only if HTTPS is unavailable +# +# @example AllowHttpProtocol: false +# +# # bad +# source 'http://rubygems.org' +# +# pkg:gem/rubocop#lib/rubocop/cop/bundler/insecure_protocol_source.rb:41 +class RuboCop::Cop::Bundler::InsecureProtocolSource < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/insecure_protocol_source.rb:53 + def insecure_protocol_source?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/insecure_protocol_source.rb:58 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/insecure_protocol_source.rb:79 + def allow_http_protocol?; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/insecure_protocol_source.rb:44 +RuboCop::Cop::Bundler::InsecureProtocolSource::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/insecure_protocol_source.rb:48 +RuboCop::Cop::Bundler::InsecureProtocolSource::MSG_HTTP_PROTOCOL = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/bundler/insecure_protocol_source.rb:50 +RuboCop::Cop::Bundler::InsecureProtocolSource::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Gems should be alphabetically sorted within groups. +# +# @example +# # bad +# gem 'rubocop' +# gem 'rspec' +# +# # good +# gem 'rspec' +# gem 'rubocop' +# +# # good +# gem 'rubocop' +# +# gem 'rspec' +# +# @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' +# +# pkg:gem/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 + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/ordered_gems.rb:55 + def gem_declarations(param0); end + + # pkg:gem/rubocop#lib/rubocop/cop/bundler/ordered_gems.rb:43 + def on_new_investigation; end +end + +# pkg:gem/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. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/check_assignment.rb:6 +module RuboCop::Cop::CheckAssignment + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_assignment.rb:17 + def on_and_asgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_assignment.rb:13 + def on_casgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_assignment.rb:11 + def on_cvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_assignment.rb:12 + def on_gvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_assignment.rb:10 + def on_ivasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_assignment.rb:7 + def on_lvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_assignment.rb:14 + def on_masgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_assignment.rb:15 + def on_op_asgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_assignment.rb:16 + def on_or_asgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_assignment.rb:19 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_assignment.rb:27 + def extract_rhs(node); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_assignment.rb:27 + def extract_rhs(node); end + end +end + +# This mixin detects collections that are safe to "break" +# by inserting new lines. This is useful for breaking +# up long lines. +# +# Let's look at hashes as an example: +# +# We know hash keys are safe to break across lines. We can add +# linebreaks into hashes on lines longer than the specified maximum. +# Then in further passes cops can clean up the multi-line hash. +# For example, say the maximum line length is as indicated below: +# +# | +# v +# {foo: "0000000000", bar: "0000000000", baz: "0000000000"} +# +# In a LineLength autocorrection pass, a line is added before +# the first key that exceeds the column limit: +# +# {foo: "0000000000", bar: "0000000000", +# baz: "0000000000"} +# +# In a MultilineHashKeyLineBreaks pass, lines are inserted +# before all keys: +# +# {foo: "0000000000", +# bar: "0000000000", +# baz: "0000000000"} +# +# Then in future passes FirstHashElementLineBreak, +# MultilineHashBraceLayout, and TrailingCommaInHashLiteral will +# manipulate as well until we get: +# +# { +# foo: "0000000000", +# bar: "0000000000", +# baz: "0000000000", +# } +# +# (Note: Passes may not happen exactly in this sequence.) +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:44 +module RuboCop::Cop::CheckLineBreakable + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:45 + def extract_breakable_node(node, max); end + + private + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:223 + def all_on_same_line?(nodes); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:243 + def already_on_multiple_lines?(node); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:142 + def breakable_collection?(node, elements); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:249 + def chained_to_heredoc?(node); end + + # @api private + # The result depends only on the given node, but the check may traverse all children of + # a large collection and is repeated for each contained element, so memoize it per node. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:198 + def children_could_be_broken_up?(node, children); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:210 + def compute_children_could_be_broken_up?(children); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:157 + def contained_by_breakable_collection_on_same_line?(node); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:177 + def contained_by_multiline_collection_that_could_be_broken_up?(node); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:62 + def extract_breakable_node_from_elements(node, elements, max); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:76 + def extract_first_element_over_column_limit(node, elements, max); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:96 + def first_argument_is_heredoc?(node); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:115 + def heredoc_begin_position(node); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:230 + def process_args(args); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:128 + def safe_to_ignore?(node); end + + # @api private + # If a `send` or `csend` node contains a heredoc argument, splitting cannot happen + # after the heredoc or else it will cause a syntax error. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:103 + def shift_elements_for_heredoc_arg(node, elements, index); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_line_breakable.rb:123 + def within_column_limit?(element, max, line); end +end + +# Checks for code on multiple lines that could be rewritten on a single line +# without changing semantics or exceeding the `Max` parameter of `Layout/LineLength`. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/check_single_line_suitability.rb:7 +module RuboCop::Cop::CheckSingleLineSuitability + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_single_line_suitability.rb:8 + def suitable_as_single_line?(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_single_line_suitability.rb:36 + def comment_within?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_single_line_suitability.rb:44 + def safe_to_split?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_single_line_suitability.rb:27 + def to_single_line(source); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_single_line_suitability.rb:16 + def too_long?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/check_single_line_suitability.rb:20 + def too_long_as_single_line?(line_range); end +end + +# Common functionality for checking length of code segments. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/code_length.rb:6 +module RuboCop::Cop::CodeLength + extend ::RuboCop::ExcludeLimit + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/code_length.rb:11 + def max=(value); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/code_length.rb:49 + def build_code_length_calculator(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/code_length.rb:31 + def check_code_length(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/code_length.rb:27 + def count_as_one; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/code_length.rb:23 + def count_comments?; end + + # Where the header of a definition ends: the name of a class, module or + # method, the `self` of `class << self`, or the opening of a block. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/code_length.rb:70 + def header_end(node); end + + # Returns true for lines that shall not be included in the count. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/code_length.rb:45 + def irrelevant_line(source_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/code_length.rb:58 + def location(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/code_length.rb:19 + def max_length; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/code_length.rb:15 + def message(length, max_length); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/code_length.rb:9 +RuboCop::Cop::CodeLength::MSG = T.let(T.unsafe(nil), String) + +# Help methods for working with nodes containing comments. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/comments_help.rb:6 +module RuboCop::Cop::CommentsHelp + # pkg:gem/rubocop#lib/rubocop/cop/mixin/comments_help.rb:27 + def comments_contain_disables?(node, cop_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/comments_help.rb:18 + def comments_in_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/comments_help.rb:14 + def contains_comments?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/comments_help.rb:7 + def source_range_with_comment(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/comments_help.rb:46 + def begin_pos_with_comment(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/comments_help.rb:60 + def buffer; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/comments_help.rb:41 + def end_position_for(node); end + + # Returns the end line of a node, which might be a comment and not part of the AST + # End line is considered either the line at which another node starts, or + # the line at which the parent node ends. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/comments_help.rb:68 + def find_end_line(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/comments_help.rb:56 + def start_line_position(node); end +end + +# Commissioner class is responsible for processing the AST and delegating +# work to the specified cops. +# +# pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:7 +class RuboCop::Cop::Commissioner + include ::RuboCop::AST::Traversal + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:44 + def initialize(cops, forces = T.unsafe(nil), options = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:42 + def errors; end + + # @return [InvestigationReport] + # + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:81 + def investigate(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on___ENCODING__(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on___FILE__(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on___LINE__(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_alias(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_and(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_and_asgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_arg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_arg_expr(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_args(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_array(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_array_pattern(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_array_pattern_with_tail(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_back_ref(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_begin(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_block_pass(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_blockarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_blocknilarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_break(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_case(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_case_match(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_casgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_cbase(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_complex(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_const(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_const_pattern(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_cvar(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_cvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_defined?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_defs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_dstr(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_dsym(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_eflipflop(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_empty_else(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_ensure(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_erange(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_false(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_find_pattern(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_float(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_for(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_forward_arg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_forward_args(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_forwarded_args(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_forwarded_kwrestarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_forwarded_restarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_gvar(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_gvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_hash(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_hash_pattern(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_if(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_if_guard(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_iflipflop(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_in_match(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_in_pattern(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_index(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_indexasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_int(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_irange(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_ivar(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_ivasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_kwarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_kwargs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_kwbegin(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_kwnilarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_kwoptarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_kwrestarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_kwsplat(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_lambda(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_lvar(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_lvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_masgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_match_alt(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_match_as(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_match_current_line(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_match_nil_pattern(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_match_pattern(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_match_pattern_p(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_match_rest(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_match_var(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_match_with_lvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_match_with_trailing_comma(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_mlhs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_module(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_next(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_nil(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_not(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_nth_ref(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_numblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_op_asgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_optarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_or(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_or_asgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_pair(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_pin(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_postexe(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_preexe(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_procarg0(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_rational(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_redo(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_regexp(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_regopt(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_resbody(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_rescue(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_restarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_retry(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_return(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_sclass(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_self(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_shadowarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_splat(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_str(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_super(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_sym(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_true(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_undef(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_unless_guard(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_until(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_until_post(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_when(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_while(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_while_post(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_xstr(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_yield(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:69 + def on_zsuper(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:100 + def begin_investigation(processed_source, offset:, original:); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:123 + def build_callbacks(cops); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:118 + def initialize_callbacks; end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:161 + def invoke(callback, cops); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:165 + def invoke_with_argument(callback, cops, arg); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:114 + def reset; end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:133 + def restrict_callbacks(callbacks); end + + # NOTE: mutates `callbacks` in place + # + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:151 + def restricted_map(callbacks); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:106 + def trigger_responding_cops(callback, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:141 + def trigger_restricted_cops(event, node); end + + # Allow blind rescues here, since we're absorbing and packaging or + # re-raising exceptions that can be raised from within the individual + # cops' `#investigate` methods. + # + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:172 + def with_cop_error_handling(cop, node = T.unsafe(nil)); end +end + +# How a Commissioner returns the results of the investigation +# as a list of Cop::InvestigationReport and any errors caught +# during the investigation. +# Immutable +# Consider creation API private +# +# pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:18 +class RuboCop::Cop::Commissioner::InvestigationReport < ::Struct + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:18 + def cop_reports; end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:18 + def cop_reports=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:19 + def cops; end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:27 + def correctors; end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:18 + def errors; end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:18 + def errors=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:35 + def merge(investigation); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:31 + def offenses; end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:23 + def offenses_per_cop; end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:18 + def processed_source; end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:18 + def processed_source=(_); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:18 + def [](*_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:18 + def inspect; end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:18 + def keyword_init?; end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:18 + def members; end + + # pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:18 + def new(*_arg0); end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/commissioner.rb:10 +RuboCop::Cop::Commissioner::RESTRICTED_CALLBACKS = T.let(T.unsafe(nil), Array) + +# This class does condition autocorrection +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/condition_corrector.rb:6 +class RuboCop::Cop::ConditionCorrector + class << self + # pkg:gem/rubocop#lib/rubocop/cop/correctors/condition_corrector.rb:8 + def correct_negative_condition(corrector, node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/condition_corrector.rb:17 + def negated_condition(node); end + end +end + +# Handles `EnforcedStyle` configuration parameters. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:6 +module RuboCop::Cop::ConfigurableEnforcedStyle + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:87 + def alternative_style; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:95 + def alternative_styles; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:19 + def ambiguous_style_detected(*possibilities); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:71 + def conflicting_styles_detected; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:11 + def correct_style_detected; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:63 + def detected_style; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:67 + def detected_style=(style); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:59 + def no_acceptable_style!; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:55 + def no_acceptable_style?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:7 + def opposite_style_detected; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:78 + def style; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:74 + def style_configured?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:29 + def style_detected(detected); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:106 + def style_parameter_name; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:99 + def supported_styles; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:15 + def unexpected_style_detected(unexpected); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:72 + def unrecognized_style_detected; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_enforced_style.rb:23 +RuboCop::Cop::ConfigurableEnforcedStyle::SYMBOL_TO_STRING_CACHE = T.let(T.unsafe(nil), Hash) + +# Shared functionality between mixins that enforce naming conventions +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_formatting.rb:6 +module RuboCop::Cop::ConfigurableFormatting + include ::RuboCop::Cop::ConfigurableEnforcedStyle + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_formatting.rb:9 + def check_name(node, name, name_range); end + + # A class emitter method is a singleton method in a class/module, where + # the method has the same name as a class defined in the class/module. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_formatting.rb:30 + def class_emitter_method?(node, name); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_formatting.rb:17 + def report_opposing_styles(node, name); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_formatting.rb:24 + def valid_name?(node, name, given_style = T.unsafe(nil)); end +end + +# Handles `Max` configuration parameters, especially setting them to an +# appropriate value with --auto-gen-config. +# @deprecated Use `exclude_limit ` instead. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_max.rb:8 +module RuboCop::Cop::ConfigurableMax + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_max.rb:11 + def max=(value); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_max.rb:24 + def max_parameter_name; end +end + +# This module provides functionality for checking if names match the +# configured EnforcedStyle. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_naming.rb:7 +module RuboCop::Cop::ConfigurableNaming + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::ConfigurableFormatting +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_naming.rb:10 +RuboCop::Cop::ConfigurableNaming::FORMATS = T.let(T.unsafe(nil), Hash) + +# This module provides functionality for checking if numbering match the +# configured EnforcedStyle. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_numbering.rb:7 +module RuboCop::Cop::ConfigurableNumbering + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::ConfigurableFormatting +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_numbering.rb:11 +RuboCop::Cop::ConfigurableNumbering::FORMATS = T.let(T.unsafe(nil), Hash) + +# @deprecated Use Cop::Base instead +# Legacy scaffold for Cops. +# See https://docs.rubocop.org/rubocop/v1_upgrade_notes.html +# Monkey-patch Cop for tests to provide easy access to messages and +# highlights. +# +# pkg:gem/rubocop#lib/rubocop/cop/cop.rb:11 +class RuboCop::Cop::Cop < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:73 + def add_offense(node_or_range, location: T.unsafe(nil), message: T.unsafe(nil), severity: T.unsafe(nil), &block); end + + # Called before any investigation + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:129 + def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end + + # @deprecated + # + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:105 + def corrections; end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:90 + def find_location(node, loc); end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:12 + def offenses; end + + # Called after all on_... have been called + # + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:122 + def on_investigation_end; end + + # Called before all on_... have been called + # + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:116 + def on_new_investigation; end + + # @deprecated Use class method + # + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:96 + def support_autocorrect?; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:147 + def apply_correction(corrector); end + + # Override Base + # + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:143 + def callback_argument(_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:164 + def correction_lambda; end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:170 + def dedupe_on_node(node); end + + # Just for legacy + # + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:152 + def emulate_v0_callsequence(corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:183 + def range_for_original(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:177 + def suppress_clobbering; end + + class << self + # @deprecated Use Registry.all + # + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:56 + def all; end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:25 + def inherited(_subclass); end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:37 + def joining_forces; end + + # @deprecated Use Registry.qualified_cop_name + # + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:65 + def qualified_cop_name(name, origin); end + + # @deprecated Use Registry.global + # + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:47 + def registry; end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:33 + def support_autocorrect?; end + end +end + +# @deprecated +# +# pkg:gem/rubocop#lib/rubocop/cop/cop.rb:17 +class RuboCop::Cop::Cop::Correction < ::Struct + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:18 + def call(corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:17 + def cop; end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:17 + def cop=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:17 + def lambda; end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:17 + def lambda=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:17 + def node; end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:17 + def node=(_); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:17 + def [](*_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:17 + def inspect; end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:17 + def keyword_init?; end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:17 + def members; end + + # pkg:gem/rubocop#lib/rubocop/cop/cop.rb:17 + def new(*_arg0); end + end +end + +# Reads the documentation comment a cop carries above its class definition +# and splits it into the sections worth showing on their own. +# +# YARD is a development dependency, so the comment is read straight from the +# source rather than through a doclet. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cop/cop_documentation.rb:11 +class RuboCop::Cop::CopDocumentation + # pkg:gem/rubocop#lib/rubocop/cop/cop_documentation.rb:14 + def initialize(cop_class); end + + # @return [Array)>] title and body per section + # + # pkg:gem/rubocop#lib/rubocop/cop/cop_documentation.rb:19 + def sections; end + + private + + # Walks up from the class definition for as long as the lines are comments. + # + # pkg:gem/rubocop#lib/rubocop/cop/cop_documentation.rb:48 + def collect_comment_above(lines, index); end + + # pkg:gem/rubocop#lib/rubocop/cop/cop_documentation.rb:30 + def comment_lines; end + + # pkg:gem/rubocop#lib/rubocop/cop/cop_documentation.rb:71 + def section_title(tag, argument); end + + # pkg:gem/rubocop#lib/rubocop/cop/cop_documentation.rb:38 + def source_location; end + + # pkg:gem/rubocop#lib/rubocop/cop/cop_documentation.rb:57 + def split_on_first_tag(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/cop_documentation.rb:76 + def strip_blank(lines); end + + # pkg:gem/rubocop#lib/rubocop/cop/cop_documentation.rb:64 + def tagged_sections(lines); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/cop_documentation.rb:12 +RuboCop::Cop::CopDocumentation::TAG = T.let(T.unsafe(nil), Regexp) + +# Explains what a single cop does: its description, how it is configured, +# whether it corrects, and the examples from its own documentation. +# +# Rendered as plain text, which is what `--explain` prints and what the MCP +# server hands to an agent. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cop/cop_explanation.rb:11 +class RuboCop::Cop::CopExplanation + # pkg:gem/rubocop#lib/rubocop/cop/cop_explanation.rb:19 + def initialize(cop_class, config); end + + # pkg:gem/rubocop#lib/rubocop/cop/cop_explanation.rb:25 + def to_s; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/cop_explanation.rb:88 + def autocorrect_description; end + + # pkg:gem/rubocop#lib/rubocop/cop/cop_explanation.rb:109 + def configuration_lines; end + + # pkg:gem/rubocop#lib/rubocop/cop/cop_explanation.rb:51 + def description_lines; end + + # The comment above the class opens by restating the description, which + # is already printed above, so that opening is dropped. + # + # pkg:gem/rubocop#lib/rubocop/cop/cop_explanation.rb:127 + def documentation_sections(description); end + + # pkg:gem/rubocop#lib/rubocop/cop/cop_explanation.rb:115 + def format_value(value); end + + # pkg:gem/rubocop#lib/rubocop/cop/cop_explanation.rb:31 + def lines; end + + # pkg:gem/rubocop#lib/rubocop/cop/cop_explanation.rb:74 + def patterns_line(label, patterns); end + + # pkg:gem/rubocop#lib/rubocop/cop/cop_explanation.rb:55 + def property_lines; end + + # `Exclude` patterns are absolutized against the config that set them, + # which makes for a wall of identical prefixes. A user config can also + # hold a regexp rather than a glob. + # + # pkg:gem/rubocop#lib/rubocop/cop/cop_explanation.rb:84 + def readable_pattern(pattern); end + + # pkg:gem/rubocop#lib/rubocop/cop/cop_explanation.rb:119 + def reference_lines; end + + # Which files the cop looks at. A cop that only runs on Gemfiles + # explains an absent offense better than anything else here does. + # + # pkg:gem/rubocop#lib/rubocop/cop/cop_explanation.rb:67 + def scope_lines; end + + # pkg:gem/rubocop#lib/rubocop/cop/cop_explanation.rb:44 + def section(title, body); end + + # pkg:gem/rubocop#lib/rubocop/cop/cop_explanation.rb:135 + def strip_blank(lines); end + + # pkg:gem/rubocop#lib/rubocop/cop/cop_explanation.rb:102 + def version_lines; end +end + +# Keys that describe the cop to RuboCop itself rather than something a +# user would set, so they are reported in their own section or not at all. +# +# pkg:gem/rubocop#lib/rubocop/cop/cop_explanation.rb:14 +RuboCop::Cop::CopExplanation::METADATA_KEYS = T.let(T.unsafe(nil), Array) + +# This class takes a source buffer and rewrite its source +# based on the different correction rules supplied. +# +# Important! +# The nodes modified by the corrections should be part of the +# AST of the source_buffer. +# +# pkg:gem/rubocop#lib/rubocop/cop/corrector.rb:11 +class RuboCop::Cop::Corrector < ::Parser::Source::TreeRewriter + # @param source [Parser::Source::Buffer, or anything + # leading to one via `(processed_source.)buffer`] + # + # corrector = Corrector.new(cop) + # + # pkg:gem/rubocop#lib/rubocop/cop/corrector.rb:32 + def initialize(source); end + + # Removes `size` characters from the beginning of the given range. + # If `size` is greater than the size of `range`, the removed region can + # overrun the end of `range`. + # + # @param [Parser::Source::Range, RuboCop::AST::Node] node_or_range + # @param [Integer] size + # + # pkg:gem/rubocop#lib/rubocop/cop/corrector.rb:63 + def remove_leading(node_or_range, size); end + + # Removes `size` characters prior to the source range. + # + # @param [Parser::Source::Range, RuboCop::AST::Node] node_or_range + # @param [Integer] size + # + # pkg:gem/rubocop#lib/rubocop/cop/corrector.rb:51 + def remove_preceding(node_or_range, size); end + + # Removes `size` characters from the end of the given range. + # If `size` is greater than the size of `range`, the removed region can + # overrun the beginning of `range`. + # + # @param [Parser::Source::Range, RuboCop::AST::Node] node_or_range + # @param [Integer] size + # + # pkg:gem/rubocop#lib/rubocop/cop/corrector.rb:75 + def remove_trailing(node_or_range, size); end + + # pkg:gem/rubocop#lib/rubocop/cop/corrector.rb:45 + def rewrite; end + + # Swaps sources at the given ranges. + # + # @param [Parser::Source::Range, RuboCop::AST::Node] node_or_range1 + # @param [Parser::Source::Range, RuboCop::AST::Node] node_or_range2 + # + # pkg:gem/rubocop#lib/rubocop/cop/corrector.rb:85 + def swap(node_or_range1, node_or_range2); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/corrector.rb:119 + def check_range_validity(node_or_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/corrector.rb:104 + def to_range(node_or_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/corrector.rb:123 + def validate_buffer(buffer); end + + class << self + # Duck typing for get to a ::Parser::Source::Buffer + # + # pkg:gem/rubocop#lib/rubocop/cop/corrector.rb:15 + def source_buffer(source); end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/corrector.rb:12 +RuboCop::Cop::Corrector::NOOP_CONSUMER = T.let(T.unsafe(nil), Proc) + +# Common functionality for checking def nodes. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/def_node.rb:6 +module RuboCop::Cop::DefNode + include ::RuboCop::Cop::VisibilityHelp + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/def_node.rb:21 + def non_public_modifier?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/def_node.rb:12 + def non_public?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/def_node.rb:16 + def preceding_non_public_modifier?(node); end +end + +# Help methods for working with `Enumerable#dig` in cops. +# Used by `Style::DigChain` and `Style::SingleArgumentDig` +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/dig_help.rb:7 +module RuboCop::Cop::DigHelp + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/dig_help.rb:11 + def dig?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/dig_help.rb:16 + def single_argument_dig?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/dig_help.rb:22 + def dig_chain_enabled?; end +end + +# Helpers for builtin documentation +# +# pkg:gem/rubocop#lib/rubocop/cop/documentation.rb:6 +module RuboCop::Cop::Documentation + private + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/documentation.rb:25 + def base_url_for(cop_class, config); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/documentation.rb:57 + def builtin?(cop_class); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/documentation.rb:47 + def default_base_url; end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/documentation.rb:52 + def default_extension; end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/documentation.rb:10 + def department_to_basename(department); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/documentation.rb:36 + def extension_for(cop_class, config); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/documentation.rb:15 + def url_for(cop_class, config = T.unsafe(nil)); end + + class << self + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/documentation.rb:25 + def base_url_for(cop_class, config); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/documentation.rb:57 + def builtin?(cop_class); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/documentation.rb:47 + def default_base_url; end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/documentation.rb:52 + def default_extension; end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/documentation.rb:10 + def department_to_basename(department); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/documentation.rb:36 + def extension_for(cop_class, config); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/documentation.rb:15 + def url_for(cop_class, config = T.unsafe(nil)); end + end +end + +# Common functionality for checking documentation. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/documentation_comment.rb:6 +module RuboCop::Cop::DocumentationComment + extend ::RuboCop::AST::NodePattern::Macros + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/documentation_comment.rb:47 + def annotation_keywords; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/documentation_comment.rb:11 + def documentation_comment?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/documentation_comment.rb:39 + def interpreter_directive_comment?(comment); end + + # The args node1 & node2 may represent a RuboCop::AST::Node + # or a Parser::Source::Comment. Both respond to #loc. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/documentation_comment.rb:31 + def precede?(node1, node2); end + + # The args node1 & node2 may represent a RuboCop::AST::Node + # or a Parser::Source::Comment. Both respond to #loc. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/documentation_comment.rb:25 + def preceding_comment?(node1, node2); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/documentation_comment.rb:35 + def preceding_lines(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/documentation_comment.rb:43 + def rubocop_directive_comment?(comment); end +end + +# Common functionality for dealing with duplication. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/duplication.rb:6 +module RuboCop::Cop::Duplication + private + + # Returns the consecutive duplicates, leaving out the first instance of + # the duplicated elements. + # + # @param [Array] collection an array to return consecutive duplicates for + # @return [Array] the consecutive duplicates + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/duplication.rb:31 + def consecutive_duplicates(collection); end + + # Returns all duplicates, including the first instance of the duplicated + # elements. + # + # @param [Array] collection an array to return duplicates for + # @return [Array] all the duplicates + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/duplication.rb:22 + def duplicates(collection); end + + # Whether the `collection` contains any duplicates. + # + # @param [Array] collection an array to check for duplicates + # @return [Boolean] whether the array contains any duplicates + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/duplication.rb:13 + def duplicates?(collection); end + + # Returns a hash of grouped duplicates. The key will be the first + # instance of the element, and the value an `array` of the initial + # element and all duplicate instances. + # + # @param [Array] collection an array to group duplicates for + # @return [Array] the grouped duplicates + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/duplication.rb:41 + def grouped_duplicates(collection); end +end + +# This class autocorrects `#each` enumeration to `for` iteration. +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/each_to_for_corrector.rb:6 +class RuboCop::Cop::EachToForCorrector + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/each_to_for_corrector.rb:12 + def initialize(block_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/each_to_for_corrector.rb:18 + def call(corrector); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/each_to_for_corrector.rb:25 + def argument_node; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/each_to_for_corrector.rb:25 + def block_node; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/each_to_for_corrector.rb:41 + def closing_keyword; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/each_to_for_corrector.rb:25 + def collection_node; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/each_to_for_corrector.rb:27 + def correction; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/each_to_for_corrector.rb:51 + def offending_range; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/each_to_for_corrector.rb:45 + def padding_needed?(position); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/correctors/each_to_for_corrector.rb:10 +RuboCop::Cop::EachToForCorrector::CORRECTION_WITHOUT_ARGUMENTS = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/correctors/each_to_for_corrector.rb:9 +RuboCop::Cop::EachToForCorrector::CORRECTION_WITH_ARGUMENTS = T.let(T.unsafe(nil), String) + +# This class does empty line autocorrection +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/empty_line_corrector.rb:6 +class RuboCop::Cop::EmptyLineCorrector + class << self + # pkg:gem/rubocop#lib/rubocop/cop/correctors/empty_line_corrector.rb:8 + def correct(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/empty_line_corrector.rb:19 + def insert_before(corrector, node); end + end +end + +# Common code for empty parameter cops. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_parameter.rb:6 +module RuboCop::Cop::EmptyParameter + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_parameter.rb:12 + def empty_arguments?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_parameter.rb:16 + def check(node); end +end + +# Functions for checking the alignment of the `end` keyword. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/end_keyword_alignment.rb:6 +module RuboCop::Cop::EndKeywordAlignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/end_keyword_alignment.rb:49 + def add_offense_for_misalignment(node, align_with); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/end_keyword_alignment.rb:19 + def check_end_kw_alignment(node, align_ranges); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/end_keyword_alignment.rb:15 + def check_end_kw_in_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/end_keyword_alignment.rb:69 + def line_break_before_keyword?(whole_expression, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/end_keyword_alignment.rb:34 + def matching_ranges(end_loc, align_ranges); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/end_keyword_alignment.rb:40 + def start_line_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/end_keyword_alignment.rb:59 + def style_parameter_name; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/end_keyword_alignment.rb:63 + def variable_alignment?(whole_expression, rhs, end_alignment_style); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/end_keyword_alignment.rb:10 +RuboCop::Cop::EndKeywordAlignment::MSG = T.let(T.unsafe(nil), String) + +# Common functionality for checking whether a method body can become the +# body of an endless method definition without changing its meaning. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/endless_method_body_help.rb:7 +module RuboCop::Cop::EndlessMethodBodyHelp + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/endless_method_body_help.rb:54 + def assigned_value(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/endless_method_body_help.rb:61 + def command_call?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/endless_method_body_help.rb:46 + def command_disallowed_in_endless_body?(body); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/endless_method_body_help.rb:10 + def endless_method_body?(body); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/endless_method_body_help.rb:37 + def ends_with_anonymous_argument?(body); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/endless_method_body_help.rb:31 + def ends_with_omitted_hash_value?(body); end + + # `def foo = bar and baz` parses as `(def foo = bar) and baz`. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/endless_method_body_help.rb:20 + def low_precedence_body?(body); end + + # `foo = 1, 2` and `foo = *bar` assign an array without brackets. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/endless_method_body_help.rb:27 + def multiple_values?(node); end +end + +# Common functionality for rewriting endless methods to normal method definitions +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/endless_method_rewriter.rb:6 +module RuboCop::Cop::EndlessMethodRewriter + # pkg:gem/rubocop#lib/rubocop/cop/mixin/endless_method_rewriter.rb:7 + def correct_to_multiline(corrector, node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/endless_method_rewriter.rb:23 + def arguments(node, missing = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/endless_method_rewriter.rb:27 + def configured_indentation_width; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/endless_method_rewriter.rb:19 + def receiver(node); end +end + +# Common functionality for enforcing a specific superclass. +# +# IMPORTANT: RuboCop core depended on this module when it supported Rails department. +# Rails department has been extracted to RuboCop Rails gem. +# +# @deprecated This module is deprecated and will be removed by RuboCop 2.0. +# It will not be updated to `RuboCop::Cop::Base` v1 API to maintain compatibility +# with existing RuboCop Rails 2.8 or lower. +# +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/enforce_superclass.rb:15 +module RuboCop::Cop::EnforceSuperclass + # pkg:gem/rubocop#lib/rubocop/cop/mixin/enforce_superclass.rb:35 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/enforce_superclass.rb:39 + def on_send(node); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/mixin/enforce_superclass.rb:16 + def included(base); end + end +end + +# Common functionality for checking for a line break before the first +# element in a multi-line collection. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/first_element_line_break.rb:7 +module RuboCop::Cop::FirstElementLineBreak + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/first_element_line_break.rb:23 + def check_children_line_break(node, children, start = T.unsafe(nil), ignore_last: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/first_element_line_break.rb:10 + def check_method_line_break(node, children, ignore_last: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/first_element_line_break.rb:37 + def first_by_line(nodes); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/first_element_line_break.rb:41 + def last_line(nodes, ignore_last:); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/first_element_line_break.rb:18 + def method_uses_parens?(node, limit); end +end + +# This class autocorrects `for` iteration to `#each` enumeration. +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/for_to_each_corrector.rb:6 +class RuboCop::Cop::ForToEachCorrector + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/for_to_each_corrector.rb:11 + def initialize(for_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/for_to_each_corrector.rb:17 + def call(corrector); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/for_to_each_corrector.rb:62 + def collection_end; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/for_to_each_corrector.rb:25 + def collection_node; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/for_to_each_corrector.rb:36 + def collection_source; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/for_to_each_corrector.rb:27 + def correction; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/for_to_each_corrector.rb:50 + def end_range; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/for_to_each_corrector.rb:25 + def for_node; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/for_to_each_corrector.rb:58 + def keyword_begin; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/for_to_each_corrector.rb:44 + def requires_parentheses?; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/for_to_each_corrector.rb:25 + def variable_node; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/correctors/for_to_each_corrector.rb:9 +RuboCop::Cop::ForToEachCorrector::CORRECTION = T.let(T.unsafe(nil), String) + +# This module encapsulates the ability to forbid certain identifiers in a cop. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/forbidden_identifiers.rb:6 +module RuboCop::Cop::ForbiddenIdentifiers + # if a variable starts with a sigil it will be removed + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/forbidden_identifiers.rb:9 + def forbidden_identifier?(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/forbidden_identifiers.rb:15 + def forbidden_identifiers; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/forbidden_identifiers.rb:7 +RuboCop::Cop::ForbiddenIdentifiers::SIGILS = T.let(T.unsafe(nil), String) + +# This module encapsulates the ability to forbid certain patterns in a cop. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/forbidden_pattern.rb:6 +module RuboCop::Cop::ForbiddenPattern + # pkg:gem/rubocop#lib/rubocop/cop/mixin/forbidden_pattern.rb:7 + def forbidden_pattern?(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/forbidden_pattern.rb:15 + def forbidden_pattern_regexps; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/forbidden_pattern.rb:11 + def forbidden_patterns; end +end + +# A scaffold for concrete forces. +# +# pkg:gem/rubocop#lib/rubocop/cop/force.rb:6 +class RuboCop::Cop::Force + # pkg:gem/rubocop#lib/rubocop/cop/force.rb:32 + def initialize(cops); end + + # pkg:gem/rubocop#lib/rubocop/cop/force.rb:17 + def cops; end + + # pkg:gem/rubocop#lib/rubocop/cop/force.rb:50 + def investigate(_processed_source); end + + # pkg:gem/rubocop#lib/rubocop/cop/force.rb:36 + def name; end + + # pkg:gem/rubocop#lib/rubocop/cop/force.rb:40 + def run_hook(method_name, *args); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/force.rb:19 + def all; end + + # pkg:gem/rubocop#lib/rubocop/cop/force.rb:28 + def force_name; end + + # pkg:gem/rubocop#lib/rubocop/cop/force.rb:23 + def inherited(subclass); end + end +end + +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cop/force.rb:8 +class RuboCop::Cop::Force::HookError < ::StandardError + # pkg:gem/rubocop#lib/rubocop/cop/force.rb:11 + def initialize(joining_cop); end + + # pkg:gem/rubocop#lib/rubocop/cop/force.rb:9 + def joining_cop; end +end + +# Common functionality for dealing with frozen string literals. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/frozen_string_literal.rb:6 +module RuboCop::Cop::FrozenStringLiteral + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/frozen_string_literal.rb:41 + def frozen_heredoc?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/frozen_string_literal.rb:20 + def frozen_string_literal?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/frozen_string_literal.rb:14 + def frozen_string_literal_comment_exists?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/frozen_string_literal.rb:77 + def frozen_string_literal_specified?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/frozen_string_literal.rb:71 + def frozen_string_literals_disabled?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/frozen_string_literal.rb:43 + def frozen_string_literals_enabled?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/frozen_string_literal.rb:87 + def leading_comment_lines; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/frozen_string_literal.rb:83 + def leading_magic_comments; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/frozen_string_literal.rb:36 + def uninterpolated_heredoc?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/frozen_string_literal.rb:30 + def uninterpolated_string?(node); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/mixin/frozen_string_literal.rb:14 + def frozen_string_literal_comment_exists?; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/frozen_string_literal.rb:9 +RuboCop::Cop::FrozenStringLiteral::FROZEN_STRING_LITERAL_ENABLED = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/frozen_string_literal.rb:10 +RuboCop::Cop::FrozenStringLiteral::FROZEN_STRING_LITERAL_TYPES_RUBY27 = T.let(T.unsafe(nil), Array) + +# Common functionality for checking gem declarations. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/gem_declaration.rb:6 +module RuboCop::Cop::GemDeclaration + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/gem_declaration.rb:10 + def gem_declaration?(param0 = T.unsafe(nil)); end +end + +# Cops for the `Gemspec` department. The department's cops are registered for lazy loading +# and their files are loaded on demand. +# +# pkg:gem/rubocop#lib/rubocop/cop/gemspec.rb:7 +module RuboCop::Cop::Gemspec + extend ::RuboCop::Cop::LazyLoader +end + +# Prefer `add_dependency` over `add_runtime_dependency` as the latter is +# considered soft-deprecated. +# +# @example +# +# # bad +# Gem::Specification.new do |spec| +# spec.add_runtime_dependency('rubocop') +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_dependency('rubocop') +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/add_runtime_dependency.rb:21 +class RuboCop::Cop::Gemspec::AddRuntimeDependency < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/add_runtime_dependency.rb:28 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/add_runtime_dependency.rb:24 +RuboCop::Cop::Gemspec::AddRuntimeDependency::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/add_runtime_dependency.rb:26 +RuboCop::Cop::Gemspec::AddRuntimeDependency::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Use consistent style for Gemspec attributes assignment. +# +# @example +# +# # bad +# # This example uses two styles for assignment of metadata attribute. +# Gem::Specification.new do |spec| +# spec.metadata = { 'key' => 'value' } +# spec.metadata['another-key'] = 'another-value' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.metadata['key'] = 'value' +# spec.metadata['another-key'] = 'another-value' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.metadata = { 'key' => 'value', 'another-key' => 'another-value' } +# end +# +# # bad +# # This example uses two styles for assignment of authors attribute. +# Gem::Specification.new do |spec| +# spec.authors = %w[author-0 author-1] +# spec.authors[2] = 'author-2' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.authors = %w[author-0 author-1 author-2] +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.authors[0] = 'author-0' +# spec.authors[1] = 'author-1' +# spec.authors[2] = 'author-2' +# end +# +# # good +# # This example uses consistent assignment per attribute, +# # even though two different styles are used overall. +# Gem::Specification.new do |spec| +# spec.metadata = { 'key' => 'value' } +# spec.authors[0] = 'author-0' +# spec.authors[1] = 'author-1' +# spec.authors[2] = 'author-2' +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/attribute_assignment.rb:57 +class RuboCop::Cop::Gemspec::AttributeAssignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::GemspecHelp + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/attribute_assignment.rb:62 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/attribute_assignment.rb:77 + def source_assignments(ast); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/attribute_assignment.rb:84 + def source_indexed_assignments(ast); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/attribute_assignment.rb:60 +RuboCop::Cop::Gemspec::AttributeAssignment::MSG = T.let(T.unsafe(nil), String) + +# Enforce that gem dependency version specifications or a commit reference (branch, +# ref, or tag) are either required or forbidden. +# +# @example EnforcedStyle: required (default) +# +# # bad +# Gem::Specification.new do |spec| +# spec.add_dependency 'parser' +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.add_development_dependency 'parser' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_dependency 'parser', '>= 2.3.3.1', '< 3.0' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_development_dependency 'parser', '>= 2.3.3.1', '< 3.0' +# end +# +# @example EnforcedStyle: forbidden +# +# # bad +# Gem::Specification.new do |spec| +# spec.add_dependency 'parser', '>= 2.3.3.1', '< 3.0' +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.add_development_dependency 'parser', '>= 2.3.3.1', '< 3.0' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_dependency 'parser' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_development_dependency 'parser' +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:53 +class RuboCop::Cop::Gemspec::DependencyVersion < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::GemspecHelp + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:67 + def add_dependency_method_declaration?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:78 + def includes_commit_reference?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:73 + def includes_version_specification?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:82 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:112 + def add_dependency_method?(method_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:96 + def allowed_gem?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:100 + def allowed_gems; end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:126 + def forbidden_offense?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:132 + def forbidden_style?; end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:104 + def message(_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:116 + def offense?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:120 + def required_offense?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:136 + def required_style?; end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:140 + def version_specification?(expression); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:61 +RuboCop::Cop::Gemspec::DependencyVersion::ADD_DEPENDENCY_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:58 +RuboCop::Cop::Gemspec::DependencyVersion::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:57 +RuboCop::Cop::Gemspec::DependencyVersion::REQUIRED_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/dependency_version.rb:64 +RuboCop::Cop::Gemspec::DependencyVersion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# pkg:gem/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 attributes are not set in a gemspec file. +# Removing deprecated attributes allows the user to receive smaller packed gems. +# +# @example +# +# # bad +# Gem::Specification.new do |spec| +# spec.name = 'your_cool_gem_name' +# spec.test_files = Dir.glob('test/**/*') +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.name = 'your_cool_gem_name' +# spec.test_files += Dir.glob('test/**/*') +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.name = 'your_cool_gem_name' +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb:28 +class RuboCop::Cop::Gemspec::DeprecatedAttributeAssignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb:35 + def gem_specification(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb:43 + def on_block(block_node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb:85 + def format_message_from; end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb:63 + def node_and_method_name(node, attribute); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb:71 + def use_deprecated_attributes?(node, block_parameter); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb:32 +RuboCop::Cop::Gemspec::DeprecatedAttributeAssignment::MSG = T.let(T.unsafe(nil), String) + +# Enforce that development dependencies for a gem are specified in +# `Gemfile`, rather than in the `gemspec` using +# `add_development_dependency`. Alternatively, using `EnforcedStyle: +# gemspec`, enforce that all dependencies are specified in `gemspec`, +# rather than in `Gemfile`. +# +# @example EnforcedStyle: Gemfile (default) +# # Specify runtime dependencies in your gemspec, +# # but all other dependencies in your Gemfile. +# +# # bad +# # example.gemspec +# s.add_development_dependency "foo" +# +# # good +# # Gemfile +# gem "foo" +# +# # good +# # gems.rb +# gem "foo" +# +# # good (with AllowedGems: ["bar"]) +# # example.gemspec +# s.add_development_dependency "bar" +# +# @example EnforcedStyle: gems.rb +# # Specify runtime dependencies in your gemspec, +# # but all other dependencies in your Gemfile. +# # +# # Identical to `EnforcedStyle: Gemfile`, but with a different error message. +# # Rely on Bundler/GemFilename to enforce the use of `Gemfile` vs `gems.rb`. +# +# # bad +# # example.gemspec +# s.add_development_dependency "foo" +# +# # good +# # Gemfile +# gem "foo" +# +# # good +# # gems.rb +# gem "foo" +# +# # good (with AllowedGems: ["bar"]) +# # example.gemspec +# s.add_development_dependency "bar" +# +# @example EnforcedStyle: gemspec +# # Specify all dependencies in your gemspec. +# +# # bad +# # Gemfile +# gem "foo" +# +# # good +# # example.gemspec +# s.add_development_dependency "foo" +# +# # good (with AllowedGems: ["bar"]) +# # Gemfile +# gem "bar" +# +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/development_dependencies.rb:70 +class RuboCop::Cop::Gemspec::DevelopmentDependencies < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/development_dependencies.rb:77 + def add_development_dependency?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/development_dependencies.rb:82 + def gem?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/development_dependencies.rb:86 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/development_dependencies.rb:97 + def forbidden_gem?(gem_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/development_dependencies.rb:101 + def message(_range); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/development_dependencies.rb:73 +RuboCop::Cop::Gemspec::DevelopmentDependencies::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/development_dependencies.rb:74 +RuboCop::Cop::Gemspec::DevelopmentDependencies::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# An attribute assignment method call should be listed only once +# in a gemspec. +# +# Assigning to an attribute with the same name using `spec.foo =` or +# `spec.attribute#[]=` will be an unintended usage. On the other hand, +# duplication of methods such as `spec.requirements`, +# `spec.add_runtime_dependency`, and others are permitted because it is +# the intended use of appending values. +# +# @example +# # bad +# Gem::Specification.new do |spec| +# spec.name = 'rubocop' +# spec.name = 'rubocop2' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.name = 'rubocop' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.requirements << 'libmagick, v6.0' +# spec.requirements << 'A good graphics card' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_dependency('parallel', '~> 1.10') +# spec.add_dependency('parser', '>= 2.3.3.1', '< 3.0') +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.metadata["key"] = "value" +# spec.metadata["key"] = "value" +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.metadata["key"] = "value" +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/duplicated_assignment.rb:50 +class RuboCop::Cop::Gemspec::DuplicatedAssignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::GemspecHelp + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/duplicated_assignment.rb:57 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/duplicated_assignment.rb:83 + def duplicated_assignment_method_nodes; end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/duplicated_assignment.rb:91 + def duplicated_indexed_assignment_method_nodes; end + + # Assignments in separate `Gem::Specification.new` blocks are not duplicates of + # one another, so the enclosing specification is part of the grouping key. + # + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/duplicated_assignment.rb:104 + def enclosing_specification(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/duplicated_assignment.rb:98 + def indexed_assignment_key(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/duplicated_assignment.rb:66 + def process_assignment_method_nodes; end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/duplicated_assignment.rb:74 + def process_indexed_assignment_method_nodes; end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/duplicated_assignment.rb:108 + def register_offense(node, assignment, line_of_first_occurrence); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/duplicated_assignment.rb:54 +RuboCop::Cop::Gemspec::DuplicatedAssignment::MSG = T.let(T.unsafe(nil), String) + +# Dependencies in the gemspec should be alphabetically sorted. +# +# @example +# # bad +# spec.add_dependency 'rubocop' +# spec.add_dependency 'rspec' +# +# # good +# spec.add_dependency 'rspec' +# spec.add_dependency 'rubocop' +# +# # good +# spec.add_dependency 'rubocop' +# +# spec.add_dependency 'rspec' +# +# # bad +# spec.add_development_dependency 'rubocop' +# spec.add_development_dependency 'rspec' +# +# # good +# spec.add_development_dependency 'rspec' +# spec.add_development_dependency 'rubocop' +# +# # good +# spec.add_development_dependency 'rubocop' +# +# spec.add_development_dependency 'rspec' +# +# # bad +# spec.add_runtime_dependency 'rubocop' +# spec.add_runtime_dependency 'rspec' +# +# # good +# spec.add_runtime_dependency 'rspec' +# spec.add_runtime_dependency 'rubocop' +# +# # good +# spec.add_runtime_dependency 'rubocop' +# +# spec.add_runtime_dependency 'rspec' +# +# @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' +# +# pkg:gem/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 + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/ordered_dependencies.rb:88 + def dependency_declarations(param0); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/ordered_dependencies.rb:69 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/ordered_dependencies.rb:83 + def get_dependency_name(node); end +end + +# pkg:gem/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. +# +# This setting tells RubyGems that MFA (Multi-Factor Authentication) is +# required for accounts to be able to perform privileged operations, such as +# (see RubyGems' documentation for the full list of privileged +# operations): +# +# * `gem push` +# * `gem yank` +# * `gem owner --add/remove` +# * adding or removing owners using gem ownership page +# +# This helps make your gem more secure, as users can be more +# confident that gem updates were pushed by maintainers. +# +# @example +# # bad +# Gem::Specification.new do |spec| +# # no `rubygems_mfa_required` metadata specified +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.metadata = { +# 'rubygems_mfa_required' => 'true' +# } +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.metadata['rubygems_mfa_required'] = 'true' +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.metadata = { +# 'rubygems_mfa_required' => 'false' +# } +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.metadata = { +# 'rubygems_mfa_required' => 'true' +# } +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.metadata['rubygems_mfa_required'] = 'false' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.metadata['rubygems_mfa_required'] = 'true' +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/require_mfa.rb:63 +class RuboCop::Cop::Gemspec::RequireMFA < ::RuboCop::Cop::Base + include ::RuboCop::Cop::GemspecHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/require_mfa.rb:70 + def metadata(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/require_mfa.rb:78 + def metadata_assignment(param0); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/require_mfa.rb:95 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/require_mfa.rb:86 + def rubygems_mfa_required(param0); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/require_mfa.rb:91 + def true_string?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/require_mfa.rb:123 + def autocorrect(corrector, node, block_var, metadata); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/require_mfa.rb:156 + def change_value(corrector, value); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/require_mfa.rb:133 + def correct_metadata(corrector, metadata); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/require_mfa.rb:141 + def insert_mfa_required(corrector, node, block_var); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/require_mfa.rb:116 + def mfa_value(metadata_value); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/require_mfa.rb:67 +RuboCop::Cop::Gemspec::RequireMFA::MSG = T.let(T.unsafe(nil), String) + +# Checks that `required_ruby_version` in a gemspec file is set to a valid +# value (non-blank) and matches `TargetRubyVersion` as set in RuboCop's +# configuration for the gem. +# +# This ensures that RuboCop is using the same Ruby version as the gem. +# +# @example +# # When `TargetRubyVersion` of .rubocop.yml is `2.5`. +# +# # bad +# Gem::Specification.new do |spec| +# # no `required_ruby_version` specified +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.required_ruby_version = '>= 2.4.0' +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.required_ruby_version = '>= 2.6.0' +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.required_ruby_version = '' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.required_ruby_version = '>= 2.5.0' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.required_ruby_version = '>= 2.5' +# end +# +# # accepted but not recommended +# Gem::Specification.new do |spec| +# spec.required_ruby_version = ['>= 2.5.0', '< 2.7.0'] +# end +# +# # accepted but not recommended, since +# # Ruby does not really follow semantic versioning +# Gem::Specification.new do |spec| +# spec.required_ruby_version = '~> 2.5' +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/required_ruby_version.rb:55 +class RuboCop::Cop::Gemspec::RequiredRubyVersion < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/required_ruby_version.rb:68 + def defined_ruby_version(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/required_ruby_version.rb:76 + def on_new_investigation; end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/required_ruby_version.rb:82 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/required_ruby_version.rb:63 + def required_ruby_version?(param0); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/required_ruby_version.rb:94 + def dynamic_version?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/required_ruby_version.rb:100 + def extract_ruby_version(required_ruby_version); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/required_ruby_version.rb:118 + def not_equal_message(required_ruby_version, target_ruby_version); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/required_ruby_version.rb:60 +RuboCop::Cop::Gemspec::RequiredRubyVersion::MISSING_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/required_ruby_version.rb:57 +RuboCop::Cop::Gemspec::RequiredRubyVersion::NOT_EQUAL_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/required_ruby_version.rb:56 +RuboCop::Cop::Gemspec::RequiredRubyVersion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks that `RUBY_VERSION` and `Ruby::VERSION` constants are not used in gemspec. +# Using `RUBY_VERSION` and `Ruby::VERSION` is dangerous because the value of the +# constant is determined by `rake release`. +# It's possible to have a dependency based on the Ruby version used +# to execute `rake release` and not the user's Ruby version. +# +# @example +# +# # bad +# Gem::Specification.new do |spec| +# if RUBY_VERSION >= '3.0' +# spec.add_dependency 'gem_a' +# else +# spec.add_dependency 'gem_b' +# end +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_dependency 'gem_a' +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb:28 +class RuboCop::Cop::Gemspec::RubyVersionGlobalsUsage < ::RuboCop::Cop::Base + include ::RuboCop::Cop::GemspecHelp + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb:41 + def on_const(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb:34 + def ruby_version?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb:49 + def gem_spec_with_ruby_version?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb:31 +RuboCop::Cop::Gemspec::RubyVersionGlobalsUsage::MSG = T.let(T.unsafe(nil), String) + +# Common functionality for checking gem declarations. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/gemspec_help.rb:6 +module RuboCop::Cop::GemspecHelp + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/gemspec_help.rb:30 + def assignment_method_declarations(param0); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/gemspec_help.rb:20 + def gem_specification(param0); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/gemspec_help.rb:10 + def gem_specification?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/gemspec_help.rb:36 + def indexed_assignment_method_declarations(param0); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/gemspec_help.rb:45 + def match_block_variable_name?(receiver_name); end +end + +# Source and spec generator for new cops +# +# This generator will take a cop name and generate a source file +# and spec file when given a valid qualified cop name. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cop/generator.rb:10 +class RuboCop::Cop::Generator + # pkg:gem/rubocop#lib/rubocop/cop/generator.rb:119 + def initialize(name, output: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/generator.rb:143 + def inject_config(config_file_path: T.unsafe(nil), version_added: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/generator.rb:139 + def inject_registration; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator.rb:135 + def inject_require(root_file_path: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/generator.rb:156 + def todo; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator.rb:127 + def write_source; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator.rb:131 + def write_spec; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/generator.rb:170 + def badge; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator.rb:193 + def generate(template); end + + # pkg:gem/rubocop#lib/rubocop/cop/generator.rb:185 + def generated_source; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator.rb:189 + def generated_spec; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator.rb:170 + def output; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator.rb:218 + def snake_case(camel_case_string); end + + # pkg:gem/rubocop#lib/rubocop/cop/generator.rb:208 + def source_path; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator.rb:198 + def spec_path; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator.rb:172 + def write_unless_file_exists(path, contents); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/generator.rb:115 +RuboCop::Cop::Generator::CONFIGURATION_ADDED_MESSAGE = T.let(T.unsafe(nil), String) + +# A class that injects a require directive into the root RuboCop file. +# It looks for other directives that require files in the same (cop) +# namespace and injects the provided one in alpha +# +# pkg:gem/rubocop#lib/rubocop/cop/generator/configuration_injector.rb:9 +class RuboCop::Cop::Generator::ConfigurationInjector + # pkg:gem/rubocop#lib/rubocop/cop/generator/configuration_injector.rb:17 + def initialize(configuration_file_path:, badge:, version_added: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/configuration_injector.rb:24 + def inject; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/generator/configuration_injector.rb:39 + def badge; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/configuration_injector.rb:41 + def configuration_entries; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/configuration_injector.rb:39 + def configuration_file_path; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/configuration_injector.rb:59 + def cop_name_line?(yaml); end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/configuration_injector.rb:49 + def find_target_line; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/configuration_injector.rb:45 + def new_configuration_entry; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/configuration_injector.rb:39 + def output; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/configuration_injector.rb:39 + def version_added; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/generator/configuration_injector.rb:10 +RuboCop::Cop::Generator::ConfigurationInjector::TEMPLATE = T.let(T.unsafe(nil), String) + +# A class that injects a `register_cop` directive into the cop's department module +# so that the new cop is registered for lazy loading. +# The directive is injected in alphabetical order among the existing directives without +# reordering them, since the registration order defines the cop execution order. +# When the department module file does not exist yet, it is created, and a require for +# it is injected into the root RuboCop file. +# +# Anything unexpected in the department module, such as a commented-out or otherwise +# unparsable `register_cop` line, raises an error instead of silently producing +# a broken registration. +# +# pkg:gem/rubocop#lib/rubocop/cop/generator/registration_injector.rb:16 +class RuboCop::Cop::Generator::RegistrationInjector + # pkg:gem/rubocop#lib/rubocop/cop/generator/registration_injector.rb:25 + def initialize(source_path:, badge:, root_file_path: T.unsafe(nil), output: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/registration_injector.rb:33 + def inject; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/generator/registration_injector.rb:44 + def badge; end + + # The directive path is relative to the department module file's directory, + # which `__dir__` resolves to at load time. + # + # pkg:gem/rubocop#lib/rubocop/cop/generator/registration_injector.rb:99 + def cop_path; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/registration_injector.rb:57 + def create_department_file; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/registration_injector.rb:44 + def department_file_path; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/registration_injector.rb:152 + def department_module_source; end + + # The department requires form the contiguous block right before + # the `rubocop/cop/team` require in the root RuboCop file. + # + # pkg:gem/rubocop#lib/rubocop/cop/generator/registration_injector.rb:120 + def department_require_index(lines, require_directive); end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/registration_injector.rb:114 + def directive; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/registration_injector.rb:136 + def first_directive_position(lines); end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/registration_injector.rb:63 + def inject_department_require; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/registration_injector.rb:46 + def inject_directive; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/registration_injector.rb:103 + def insertion_point(lines, entries); end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/registration_injector.rb:182 + def module_closing_lines(modules); end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/registration_injector.rb:166 + def module_opening_lines(modules); end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/registration_injector.rb:44 + def output; end + + # @return [Array] the `register_cop` entries with their line numbers + # + # pkg:gem/rubocop#lib/rubocop/cop/generator/registration_injector.rb:83 + def parse_entries(lines); end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/registration_injector.rb:44 + def root_file_path; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/registration_injector.rb:44 + def source_path; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/registration_injector.rb:76 + def write_department_file(lines); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/generator/registration_injector.rb:23 +RuboCop::Cop::Generator::RegistrationInjector::DEPARTMENT_REQUIRE_PATTERN = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop#lib/rubocop/cop/generator/registration_injector.rb:18 +RuboCop::Cop::Generator::RegistrationInjector::ENTRY_PATTERN = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop#lib/rubocop/cop/generator/registration_injector.rb:17 +RuboCop::Cop::Generator::RegistrationInjector::EXTEND_PATTERN = T.let(T.unsafe(nil), Regexp) + +# A class that injects a require directive into the root RuboCop file. +# It looks for other directives that require files in the same (cop) +# namespace and injects the provided one in alpha +# +# pkg:gem/rubocop#lib/rubocop/cop/generator/require_file_injector.rb:9 +class RuboCop::Cop::Generator::RequireFileInjector + # pkg:gem/rubocop#lib/rubocop/cop/generator/require_file_injector.rb:12 + def initialize(source_path:, root_file_path:, output: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/require_file_injector.rb:19 + def inject; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/generator/require_file_injector.rb:64 + def injectable_require_directive; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/require_file_injector.rb:29 + def output; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/require_file_injector.rb:29 + def require_entries; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/require_file_injector.rb:31 + def require_exists?; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/require_file_injector.rb:68 + def require_path; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/require_file_injector.rb:58 + def require_path_fragments(require_directive); end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/require_file_injector.rb:29 + def root_file_path; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/require_file_injector.rb:29 + def source_path; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/require_file_injector.rb:39 + def target_line; end + + # pkg:gem/rubocop#lib/rubocop/cop/generator/require_file_injector.rb:35 + def updated_directives; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/generator/require_file_injector.rb:10 +RuboCop::Cop::Generator::RequireFileInjector::REQUIRE_PATH = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop#lib/rubocop/cop/generator.rb:11 +RuboCop::Cop::Generator::SOURCE_TEMPLATE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/generator.rb:91 +RuboCop::Cop::Generator::SPEC_TEMPLATE = T.let(T.unsafe(nil), String) + +# Common functionality for checking hash alignment. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:6 +module RuboCop::Cop::HashAlignmentStyles; end + +# Handles calculation of deltas when the enforced style is 'key'. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:8 +class RuboCop::Cop::HashAlignmentStyles::KeyAlignment + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:9 + def checkable_layout?(_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:20 + def deltas(first_pair, current_pair); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:13 + def deltas_for_first_pair(first_pair); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:34 + def separator_delta(pair); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:45 + def value_delta(pair); end +end + +# Handles calculation of deltas for `kwsplat` nodes. +# This is a special case that just ensures the kwsplat is aligned with the rest of the hash +# since a `kwsplat` does not have a key, separator or value. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:187 +class RuboCop::Cop::HashAlignmentStyles::KeywordSplatAlignment + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:188 + def deltas(first_pair, current_pair); end +end + +# Handles calculation of deltas when the enforced style is 'separator'. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:148 +class RuboCop::Cop::HashAlignmentStyles::SeparatorAlignment + include ::RuboCop::Cop::HashAlignmentStyles::ValueAlignment + + # Keys are right-aligned by the column their last line ends on. + # A key spanning several lines ends on a line other than the one it starts on, + # so moving its first line would never change that column and the correction + # would be repeated on every pass. Such pairs are left alone, and so is every pair + # when the first key spans several lines, since there is then no column to right-align to. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:160 + def deltas(first_pair, current_pair); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:151 + def deltas_for_first_pair(_first_pair); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:172 + def hash_rocket_delta(first_pair, current_pair); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:168 + def key_delta(first_pair, current_pair); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:176 + def value_delta(first_pair, current_pair); end +end + +# Handles calculation of deltas when the enforced style is 'table'. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:91 +class RuboCop::Cop::HashAlignmentStyles::TableAlignment + include ::RuboCop::Cop::HashAlignmentStyles::ValueAlignment + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:94 + def deltas_for_first_pair(first_pair); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:108 + def hash_rocket_delta(first_pair, current_pair); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:104 + def key_delta(first_pair, current_pair); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:142 + def max_delimiter_width(hash_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:138 + def max_key_width(hash_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:134 + def multiline_key_end_columns(hash_node); end + + # The column the separator should land on: the shared key margin + # plus the widest single-line key, or, if larger, a multiline key's + # own last-line end column. The latter can't be measured from a + # multiline key's (newline-including) source length, so it's a + # separate candidate rather than folded into `max_key_width`. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:124 + def target_operator_column(first_pair); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:112 + def value_delta(first_pair, current_pair); end +end + +# Common functionality for checking alignment of hash values. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:56 +module RuboCop::Cop::HashAlignmentStyles::ValueAlignment + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:57 + def checkable_layout?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:61 + def deltas(first_pair, current_pair); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:71 + def alignable_values?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:81 + def separator_delta(first_pair, current_pair, key_delta); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_alignment_styles.rb:77 + def value_on_later_line?(pair); end +end + +# This module checks for Ruby 3.1's hash value omission syntax. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:7 +module RuboCop::Cop::HashShorthandSyntax + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:41 + def on_hash_for_mixed_shorthand(hash_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:53 + def on_pair(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:165 + def brackets?(method_dispatch_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:195 + def breakdown_value_types_of_hash(hash_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:143 + def def_node_that_require_parentheses(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:224 + def each_omittable_value_pair(hash_value_type_breakdown, &block); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:220 + def each_omitted_value_pair(hash_value_type_breakdown, &block); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:121 + def enforced_shorthand_syntax; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:157 + def find_ancestor_method_dispatch_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:108 + def hash_rockets_enforced?(hash_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:207 + def hash_with_mixed_shorthand_syntax?(hash_value_type_breakdown); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:211 + def hash_with_values_that_cant_be_omitted?(hash_value_type_breakdown); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:215 + def ignore_explicit_omissible_hash_shorthand_syntax?(hash_value_type_breakdown); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:102 + def ignore_hash_shorthand_syntax?(pair_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:96 + def ignore_mixed_hash_shorthand_syntax?(hash_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:257 + def keyword_value?(pair_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:180 + def last_expression?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:228 + def mixed_shorthand_syntax_check(hash_value_type_breakdown); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:113 + def no_mixed_keys_enforces_hash_rockets?(pairs); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:246 + def no_mixed_shorthand_syntax_check(hash_value_type_breakdown); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:76 + def register_offense(node, message, replacement); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:125 + def require_hash_value?(hash_key_source, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:134 + def require_hash_value_for_around_hash_literal?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:188 + def requires_parentheses_context?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:169 + def use_element_of_hash_literal_as_receiver?(ancestor, parent); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:174 + def use_modifier_form_without_parenthesized_method_call?(ancestor); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:12 +RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_EXPLICIT_VALUE_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:10 +RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_MSG_PREFIX = T.let(T.unsafe(nil), String) + +# pkg:gem/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) + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:23 +class RuboCop::Cop::HashShorthandSyntax::DefNode < ::Struct + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:32 + def first_argument; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:36 + def last_argument; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:23 + def node; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:23 + def node=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:24 + def selector; end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:23 + def [](*_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:23 + def inspect; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:23 + def keyword_init?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:23 + def members; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:23 + def new(*_arg0); end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:9 +RuboCop::Cop::HashShorthandSyntax::EXPLICIT_HASH_VALUE_MSG = T.let(T.unsafe(nil), String) + +# A keyword parameter can be named after a keyword, as in `def foo(if:)`, +# but the parameter can only be referenced by an omitted hash value, +# so `{ if: }` has no explicit form: `{ if: if }` is invalid Ruby. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:17 +RuboCop::Cop::HashShorthandSyntax::KEYWORDS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_shorthand_syntax.rb:8 +RuboCop::Cop::HashShorthandSyntax::OMIT_HASH_VALUE_MSG = T.let(T.unsafe(nil), String) + +# Common functionality for Style/HashExcept and Style/HashSlice cops. +# It registers an offense on methods with blocks that are equivalent +# to Hash#except or Hash#slice. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:9 +module RuboCop::Cop::HashSubset + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:21 + def block_with_first_arg_check?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:47 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:36 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:181 + def decorate_source(value); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:197 + def except_key(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:168 + def except_key_source(key); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:160 + def extract_body_if_negated(body); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:59 + def extract_offense(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:69 + def extracts_hash_subset?(block); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:138 + def included?(body, negated); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:146 + def not_included?(body, negated); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:205 + def offense_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:55 + def preferred_method_name; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:95 + def range_include?(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:150 + def safe_to_register_offense?(block, except_key); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:123 + def semantically_except_method?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:134 + def semantically_slice_method?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:51 + def semantically_subset_method?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:88 + def slices_key?(send_node, method, key_arg, value_arg); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:115 + def supported_subset_method?(method); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:193 + def to_single_quoted(string); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:107 + def using_value_variable?(send_node, value_arg); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:16 +RuboCop::Cop::HashSubset::ACTIVE_SUPPORT_SUBSET_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:18 +RuboCop::Cop::HashSubset::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:13 +RuboCop::Cop::HashSubset::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_subset.rb:15 +RuboCop::Cop::HashSubset::SUBSET_METHODS = T.let(T.unsafe(nil), Array) + +# Common functionality for Style/HashTransformKeys and +# Style/HashTransformValues +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:5 +module RuboCop::Cop::HashTransformMethod + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:33 + def hash_receiver?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:41 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:58 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:51 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:136 + def execute_correction(corrector, node, correction); end + + # @abstract + # + # @return [Captures] + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:111 + def extract_captures(_match); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:84 + def handle_possible_offense(node, match, match_desc); end + + # @abstract + # + # @return [String] + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:118 + def new_method_name; end + + # @abstract Implemented with `def_node_matcher` + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:65 + def on_bad_each_with_object(_node); end + + # @abstract Implemented with `def_node_matcher` + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:70 + def on_bad_hash_brackets_map(_node); end + + # @abstract Implemented with `def_node_matcher` + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:75 + def on_bad_map_to_h(_node); end + + # @abstract Implemented with `def_node_matcher` + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:80 + def on_bad_to_h(_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:122 + def prepare_correction(node); end +end + +# Internal helper class to hold autocorrect data +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:7 +class RuboCop::Cop::HashTransformMethod::Autocorrection < ::Struct + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:7 + def block_node; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:7 + def block_node=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:7 + def leading; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:7 + def leading=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:7 + def match; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:7 + def match=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:48 + def set_new_arg_name(transformed_argname, corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:52 + def set_new_body_expression(transforming_body_expr, corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:38 + def set_new_method_name(new_method_name, corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:32 + def strip_prefix_and_suffix(node, corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:7 + def trailing; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:7 + def trailing=(_); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:7 + def [](*_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:8 + def from_each_with_object(node, match); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:12 + def from_hash_brackets_map(node, match); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:16 + def from_map_to_h(node, match); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:28 + def from_to_h(node, match); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:7 + def inspect; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:7 + def keyword_init?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:7 + def members; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb:7 + def new(*_arg0); end + end +end + +# Internal helper class to hold match data +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:15 +class RuboCop::Cop::HashTransformMethod::Captures < ::Struct + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:16 + def noop_transformation?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:21 + def transformation_uses_both_args?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:15 + def transformed_argname; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:15 + def transformed_argname=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:15 + def transforming_body_expr; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:15 + def transforming_body_expr=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:15 + def unchanged_body_expr; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:15 + def unchanged_body_expr=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:25 + def use_transformed_argname?; end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:15 + def [](*_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:15 + def inspect; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:15 + def keyword_init?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:15 + def members; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:15 + def new(*_arg0); end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/hash_transform_method.rb:12 +RuboCop::Cop::HashTransformMethod::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Common functionality for working with heredoc strings. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/heredoc.rb:6 +module RuboCop::Cop::Heredoc + # pkg:gem/rubocop#lib/rubocop/cop/mixin/heredoc.rb:14 + def on_dstr(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/heredoc.rb:17 + def on_heredoc(_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/heredoc.rb:9 + def on_str(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/heredoc.rb:15 + def on_xstr(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/heredoc.rb:28 + def delimiter_string(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/heredoc.rb:34 + def heredoc_type(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/heredoc.rb:23 + def indent_level(str); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/heredoc.rb:7 +RuboCop::Cop::Heredoc::OPENING_DELIMITER = T.let(T.unsafe(nil), Regexp) + +# This class autocorrects `if...then` structures to a multiline `if` statement +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/if_then_corrector.rb:6 +class RuboCop::Cop::IfThenCorrector + # pkg:gem/rubocop#lib/rubocop/cop/correctors/if_then_corrector.rb:9 + def initialize(if_node, indentation: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/if_then_corrector.rb:14 + def call(corrector); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/if_then_corrector.rb:50 + def branch_body_indentation; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/if_then_corrector.rb:20 + def if_node; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/if_then_corrector.rb:20 + def indentation; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/if_then_corrector.rb:22 + def replacement(node = T.unsafe(nil), indentation = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/if_then_corrector.rb:36 + def rewrite_else_branch(else_branch, indentation); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/correctors/if_then_corrector.rb:7 +RuboCop::Cop::IfThenCorrector::DEFAULT_INDENTATION_WIDTH = T.let(T.unsafe(nil), Integer) + +# @deprecated IgnoredMethods class has been replaced with AllowedMethods. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_methods.rb:46 +RuboCop::Cop::IgnoredMethods = RuboCop::Cop::AllowedMethods + +# Handles adding and checking ignored nodes. +# +# pkg:gem/rubocop#lib/rubocop/cop/ignored_node.rb:6 +module RuboCop::Cop::IgnoredNode + # pkg:gem/rubocop#lib/rubocop/cop/ignored_node.rb:7 + def ignore_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/ignored_node.rb:24 + def ignored_node?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/ignored_node.rb:11 + def part_of_ignored_node?(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/ignored_node.rb:31 + def ignored_nodes; end +end + +# @deprecated IgnoredPattern class has been replaced with AllowedPattern. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/allowed_pattern.rb:70 +RuboCop::Cop::IgnoredPattern = RuboCop::Cop::AllowedPattern + +# Shared machinery for cops that compare a call site's arguments against +# a method signature from the project index (`Rubydex::Signature`). +# +# A signature is reduced to a shape - `[min, max, has_keywords]` where +# `max` is nil for a rest parameter - and the number of positional +# arguments a call passes is counted with Ruby's semantics for trailing +# keyword hashes: keywords passed to a method with no keyword parameters +# collapse into a single positional hash. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/indexed_method_arity.rb:13 +module RuboCop::Cop::IndexedMethodArity + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/indexed_method_arity.rb:16 + def arity_satisfied?(given, min, max); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/indexed_method_arity.rb:89 + def double_splat?(hash_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/indexed_method_arity.rb:20 + def expected_range(min, max); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/indexed_method_arity.rb:79 + def forwards_arguments?(arguments); end + + # The agreed `[min, max, has_keywords]` shape of an indexed member's + # method definitions, or nil when the member is not backed by plain + # method definitions (attr, alias), has no signature, forwards + # arguments, or its definitions disagree on arity (e.g. reopened with + # a different one). + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/indexed_method_arity.rb:32 + def indexed_member_shape(member); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/indexed_method_arity.rb:85 + def keyword_hash(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/indexed_method_arity.rb:58 + def keyword_parameters?(signature); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/indexed_method_arity.rb:52 + def maximum_positional(signature, min); end + + # The number of positional arguments the call passes, or nil when it + # cannot be determined statically (argument forwarding). + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/indexed_method_arity.rb:66 + def positional_argument_count(node, callee_has_keywords); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/indexed_method_arity.rb:44 + def shape_for(signature); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/indexed_method_arity.rb:39 + def signature_shape(signatures); end +end + +# Common functionality for checking integer nodes. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/integer_node.rb:6 +module RuboCop::Cop::IntegerNode + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/integer_node.rb:9 + def integer_part(node); end +end + +# Common functionality for working with string interpolations. +# +# @abstract Subclasses are expected to implement {#on_interpolation}. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/interpolation.rb:8 +module RuboCop::Cop::Interpolation + # pkg:gem/rubocop#lib/rubocop/cop/mixin/interpolation.rb:9 + def on_dstr(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/interpolation.rb:14 + def on_dsym(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/interpolation.rb:17 + def on_node_with_interpolations(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/interpolation.rb:15 + def on_regexp(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/interpolation.rb:13 + def on_xstr(node); end +end + +# This class autocorrects lambda literal to method notation. +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:6 +class RuboCop::Cop::LambdaLiteralToMethodCorrector + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:7 + def initialize(block_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:13 + def call(corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:32 + def replace_delimiters?; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:128 + def arg_to_unparenthesized_call?; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:148 + def argument_source(argument); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:38 + def arguments; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:112 + def arguments_begin_pos; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:108 + def arguments_end_pos; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:120 + def block_begin; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:116 + def block_end; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:38 + def block_node; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:63 + def insert_arguments(corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:47 + def insert_separating_space(corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:92 + def lambda_arg_string; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:38 + def method; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:102 + def needs_separating_space?; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:158 + def operator_expression?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:57 + def remove_arguments(corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:70 + def remove_leading_whitespace(corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:78 + def remove_trailing_whitespace(corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:40 + def remove_unparenthesized_whitespace(corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:83 + def replace_delimiters(corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:53 + def replace_selector(corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:124 + def selector_end; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb:144 + def separating_space?; end +end + +# Cops for the `Layout` department. The department's cops are registered for lazy loading +# and their files are loaded on demand. +# +# pkg:gem/rubocop#lib/rubocop/cop/layout.rb:7 +module RuboCop::Cop::Layout + extend ::RuboCop::Cop::LazyLoader +end + +# Bare access modifiers (those not applying to specific methods) should be +# indented as deep as method definitions, or as deep as the `class`/`module` +# keyword, depending on configuration. +# +# @example EnforcedStyle: indent (default) +# # bad +# class Plumbus +# private +# def smooth; end +# end +# +# # good +# class Plumbus +# private +# def smooth; end +# end +# +# @example EnforcedStyle: outdent +# # bad +# class Plumbus +# private +# def smooth; end +# end +# +# # good +# class Plumbus +# private +# def smooth; end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/access_modifier_indentation.rb:35 +class RuboCop::Cop::Layout::AccessModifierIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/access_modifier_indentation.rb:50 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/access_modifier_indentation.rb:43 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/access_modifier_indentation.rb:49 + def on_module(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/access_modifier_indentation.rb:48 + def on_sclass(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/access_modifier_indentation.rb:54 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/access_modifier_indentation.rb:58 + def check_body(body, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/access_modifier_indentation.rb:69 + def check_modifier(send_node, end_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/access_modifier_indentation.rb:92 + def expected_indent_offset; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/access_modifier_indentation.rb:88 + def message(range); end + + # An offset that is not expected, but correct if the configuration is + # changed. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/access_modifier_indentation.rb:98 + def unexpected_indent_offset; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/access_modifier_indentation.rb:41 +RuboCop::Cop::Layout::AccessModifierIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks that the arguments on a multi-line method call are aligned. +# +# @example EnforcedStyle: with_first_argument (default) +# # good +# +# foo :bar, +# :baz, +# key: value +# +# foo( +# :bar, +# :baz, +# key: value +# ) +# +# # bad +# +# foo :bar, +# :baz, +# key: value +# +# foo( +# :bar, +# :baz, +# key: value +# ) +# +# @example EnforcedStyle: with_fixed_indentation +# # good +# +# foo :bar, +# :baz, +# key: value +# +# # bad +# +# foo :bar, +# :baz, +# key: value +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:45 +class RuboCop::Cop::Layout::ArgumentAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:63 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:54 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:93 + def arguments_or_first_arg_pairs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:79 + def arguments_with_last_arg_pairs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:109 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:67 + def autocorrect_incompatible_with_other_cops?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:125 + def base_column(node, first_argument); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:145 + def enforce_hash_argument_with_separator?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:117 + def fixed_indentation?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:71 + def flattened_arguments(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:113 + def message(_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:102 + def multiple_arguments?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:136 + def target_method_lineno(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:121 + def with_first_argument_style?; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:49 +RuboCop::Cop::Layout::ArgumentAlignment::ALIGN_PARAMS_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/argument_alignment.rb:51 +RuboCop::Cop::Layout::ArgumentAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), String) + +# Checks that the elements of a multi-line array literal are +# aligned. +# +# @example EnforcedStyle: with_first_element (default) +# # good +# +# array = [1, 2, 3, +# 4, 5, 6] +# array = ['run', +# 'forrest', +# 'run'] +# +# # bad +# +# array = [1, 2, 3, +# 4, 5, 6] +# array = ['run', +# 'forrest', +# 'run'] +# +# @example EnforcedStyle: with_fixed_indentation +# # good +# +# array = [1, 2, 3, +# 4, 5, 6] +# +# # bad +# +# array = [1, 2, 3, +# 4, 5, 6] +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/array_alignment.rb:36 +class RuboCop::Cop::Layout::ArrayAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/array_alignment.rb:46 + def on_array(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/array_alignment.rb:55 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/array_alignment.rb:67 + def base_column(node, args); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/array_alignment.rb:63 + def fixed_indentation?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/array_alignment.rb:59 + def message(_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/array_alignment.rb:78 + def target_method_lineno(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/array_alignment.rb:40 +RuboCop::Cop::Layout::ArrayAlignment::ALIGN_ELEMENTS_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/array_alignment.rb:43 +RuboCop::Cop::Layout::ArrayAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of the first line of the +# right-hand-side of a multi-line assignment. +# +# The indentation of the remaining lines can be corrected with +# other cops such as `Layout/IndentationConsistency` and `Layout/EndAlignment`. +# +# @example +# # bad +# value = +# if foo +# 'bar' +# end +# +# # good +# value = +# if foo +# 'bar' +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/assignment_indentation.rb:25 +class RuboCop::Cop::Layout::AssignmentIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CheckAssignment + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/assignment_indentation.rb:43 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/assignment_indentation.rb:34 + def check_assignment(node, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/assignment_indentation.rb:47 + def leftmost_multiple_assignment(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/assignment_indentation.rb:30 +RuboCop::Cop::Layout::AssignmentIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks whether the end keyword of `begin` is aligned properly. +# +# Two modes are supported through the `EnforcedStyleAlignWith` configuration +# parameter. If it's set to `start_of_line` (which is the default), the +# `end` shall be aligned with the start of the line where the `begin` +# keyword is. If it's set to `begin`, the `end` shall be aligned with the +# `begin` keyword. +# +# `Layout/EndAlignment` cop aligns with keywords (e.g. `if`, `while`, `case`) +# by default. On the other hand, `||= begin` that this cop targets tends to +# align with the start of the line, it defaults to `EnforcedStyleAlignWith: start_of_line`. +# These styles can be configured by each cop. +# +# @example EnforcedStyleAlignWith: start_of_line (default) +# # bad +# foo ||= begin +# do_something +# end +# +# # good +# foo ||= begin +# do_something +# end +# +# @example EnforcedStyleAlignWith: begin +# # bad +# foo ||= begin +# do_something +# end +# +# # good +# foo ||= begin +# do_something +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/begin_end_alignment.rb:41 +class RuboCop::Cop::Layout::BeginEndAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::EndKeywordAlignment + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/begin_end_alignment.rb:47 + def on_kwbegin(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/begin_end_alignment.rb:62 + def alignment_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/begin_end_alignment.rb:58 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/begin_end_alignment.rb:53 + def check_begin_alignment(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/begin_end_alignment.rb:45 +RuboCop::Cop::Layout::BeginEndAlignment::MSG = T.let(T.unsafe(nil), String) + +# Checks whether the end keywords are aligned properly for do +# end blocks. +# +# Three modes are supported through the `EnforcedStyleAlignWith` +# configuration parameter: +# +# `start_of_block` : the `end` shall be aligned with the +# start of the line where the `do` appeared. +# +# `start_of_line` : the `end` shall be aligned with the +# start of the line where the expression started. +# +# `either` (which is the default) : the `end` is allowed to be in either +# location. The autocorrect will default to `start_of_line`. +# +# When the `do` or `{` appears on a continuation line of multiline +# method arguments, the start of the line where the method is called +# is used as the alignment target instead of that continuation line. +# +# @example EnforcedStyleAlignWith: either (default) +# # bad +# +# foo.bar +# .each do +# baz +# end +# +# # good +# +# foo.bar +# .each do +# baz +# end +# +# @example EnforcedStyleAlignWith: start_of_block +# # bad +# +# foo.bar +# .each do +# baz +# end +# +# # good +# +# foo.bar +# .each do +# baz +# end +# +# @example EnforcedStyleAlignWith: start_of_line +# # bad +# +# foo.bar +# .each do +# baz +# end +# +# # good +# +# foo.bar +# .each do +# baz +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:70 +class RuboCop::Cop::Layout::BlockAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:79 + def block_end_align_target?(param0 = T.unsafe(nil), param1); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:89 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:94 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:93 + def on_numblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:96 + def style_parameter_name; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:290 + def add_space_before(corrector, loc, delta); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:267 + def alt_start_msg(start_loc, source_line_column); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:166 + def anchor_indentation(ancestor_node, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:152 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:102 + def block_end_align_target(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:120 + def check_block_alignment(start_node, block_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:229 + def compute_do_source_line_column(node, end_loc); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:282 + def compute_start_col(ancestor_node, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:116 + def disqualified_parent?(parent, node); end + + # When the `do` or `{` is on a continuation line of multiline method + # arguments, the indentation of that line is not a meaningful + # alignment target; anchor on the method dispatch position instead. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:303 + def do_line_anchor_loc(node, do_loc); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:312 + def do_line_begins_inside_argument?(node, do_loc); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:112 + def end_align_target?(node, parent); end + + # In offense message, we want to show the assignment LHS rather than + # the entire assignment. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:224 + def find_lhs_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:195 + def format_message(start_loc, end_loc, do_source_line_column, error_source_line_column); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:277 + def format_source_line_column(source_line_column); end + + # The continuation line indentation is only an unmeaningful alignment target when + # it is dictated by an opening delimiter, i.e. the line begins inside `(` or `[`. + # For a bare argument list without parentheses the indentation is the author's + # deliberate alignment, so the anchor must not move to the method dispatch line. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:327 + def inside_parentheses?(node, pos); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:259 + def loc_to_source_line_column(loc); end + + # `end` aligned with an argument continuation line that holds the `do` + # was accepted before the anchor moved to the method dispatch line; + # keep accepting it so that such code does not become an offense. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:253 + def permitted_do_line_columns(do_loc, indentation_of_do_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:134 + def register_offense(block_node, start_loc, end_loc, do_source_line_column); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:294 + def remove_space_before(corrector, end_pos, delta); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:175 + def replace_end_indentation(corrector, node, indentation); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:183 + def shift_end_to_start_col(corrector, ancestor_node, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:205 + def start_for_block_node(block_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:212 + def start_for_line_node(block_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/block_alignment.rb:76 +RuboCop::Cop::Layout::BlockAlignment::MSG = T.let(T.unsafe(nil), String) + +# Checks whether the end statement of a do..end block +# is on its own line. +# +# @example +# # bad +# blah do |i| +# foo(i) end +# +# # good +# blah do |i| +# foo(i) +# end +# +# # bad +# blah { |i| +# foo(i) } +# +# # good +# blah { |i| +# foo(i) +# } +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/block_end_newline.rb:27 +class RuboCop::Cop::Layout::BlockEndNewline < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_end_newline.rb:33 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_end_newline.rb:46 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_end_newline.rb:45 + def on_numblock(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_end_newline.rb:67 + def last_heredoc_argument(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_end_newline.rb:63 + def message(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_end_newline.rb:77 + def offense_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/block_end_newline.rb:50 + def register_offense(node, offense_range); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/block_end_newline.rb:31 +RuboCop::Cop::Layout::BlockEndNewline::MSG = T.let(T.unsafe(nil), String) + +# Checks how the `when` and ``in``s of a `case` expression +# are indented in relation to its `case` or `end` keyword. +# +# It will register a separate offense for each misaligned `when` and `in`. +# +# @example +# # If Layout/EndAlignment is set to keyword style (default) +# # *case* and *end* should always be aligned to same depth, +# # and therefore *when* should always be aligned to both - +# # regardless of configuration. +# +# # bad for all styles +# case n +# when 0 +# x * 2 +# else +# y / 3 +# end +# +# case n +# in pattern +# x * 2 +# else +# y / 3 +# end +# +# # good for all styles +# case n +# when 0 +# x * 2 +# else +# y / 3 +# end +# +# case n +# in pattern +# x * 2 +# else +# y / 3 +# end +# +# @example EnforcedStyle: case (default) +# # if EndAlignment is set to other style such as +# # start_of_line (as shown below), then *when* alignment +# # configuration does have an effect. +# +# # bad +# a = case n +# when 0 +# x * 2 +# else +# y / 3 +# end +# +# a = case n +# in pattern +# x * 2 +# else +# y / 3 +# end +# +# # good +# a = case n +# when 0 +# x * 2 +# else +# y / 3 +# end +# +# a = case n +# in pattern +# x * 2 +# else +# y / 3 +# end +# +# @example EnforcedStyle: end +# # bad +# a = case n +# when 0 +# x * 2 +# else +# y / 3 +# end +# +# a = case n +# in pattern +# x * 2 +# else +# y / 3 +# end +# +# # good +# a = case n +# when 0 +# x * 2 +# else +# y / 3 +# end +# +# a = case n +# in pattern +# x * 2 +# else +# y / 3 +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/case_indentation.rb:112 +class RuboCop::Cop::Layout::CaseIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/case_indentation.rb:120 + def on_case(case_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/case_indentation.rb:127 + def on_case_match(case_match_node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/case_indentation.rb:201 + def base_column(case_node, base); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/case_indentation.rb:228 + def base_location(case_node, base); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/case_indentation.rb:152 + def check_when(when_node, branch_type); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/case_indentation.rb:221 + def configured_base_location(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/case_indentation.rb:190 + def detect_incorrect_style(when_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/case_indentation.rb:138 + def end_and_last_conditional_same_line?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/case_indentation.rb:148 + def enforced_style_end?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/case_indentation.rb:175 + def incorrect_style(when_node, branch_type); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/case_indentation.rb:163 + def indent_one_step?; end + + # Under tabs one step is a single tab character, which counts as one column + # regardless of the configured indentation width. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/case_indentation.rb:169 + def indentation_width; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/case_indentation.rb:212 + def replacement(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/case_indentation.rb:205 + def whitespace_range(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/case_indentation.rb:118 +RuboCop::Cop::Layout::CaseIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks if the code style follows the `ExpectedOrder` configuration: +# +# `Categories` allows us to map macro names into a category. +# +# Consider an example of code style that covers the following order: +# +# * Module inclusion (`include`, `prepend`, `extend`) +# * Constants +# * Associations (`has_one`, `has_many`) +# * Public attribute macros (`attr_accessor`, `attr_writer`, `attr_reader`) +# * Other macros (`validates`, `validate`) +# * Public class methods +# * Initializer +# * Public instance methods +# * Protected attribute macros (`attr_accessor`, `attr_writer`, `attr_reader`) +# * Protected instance methods +# * Private attribute macros (`attr_accessor`, `attr_writer`, `attr_reader`) +# * Private instance methods +# +# NOTE: Simply enabling the cop with `Enabled: true` will not use +# the example order shown below. +# To enforce the order of macros like `attr_reader`, +# you must define both `ExpectedOrder` *and* `Categories`. +# +# You can configure the following order: +# +# [source,yaml] +# ---- +# Layout/ClassStructure: +# ExpectedOrder: +# - module_inclusion +# - constants +# - association +# - public_attribute_macros +# - public_delegate +# - macros +# - public_class_methods +# - initializer +# - public_methods +# - protected_attribute_macros +# - protected_methods +# - private_attribute_macros +# - private_delegate +# - private_methods +# ---- +# +# Instead of putting all literals in the expected order, it is also +# possible to group categories of macros. Visibility levels are handled +# automatically. +# +# [source,yaml] +# ---- +# Layout/ClassStructure: +# Categories: +# association: +# - has_many +# - has_one +# attribute_macros: +# - attr_accessor +# - attr_reader +# - attr_writer +# macros: +# - validates +# - validate +# module_inclusion: +# - include +# - prepend +# - extend +# ---- +# +# If you only set `ExpectedOrder` +# without defining `Categories`, +# macros such as `attr_reader` or `has_many` +# will not be recognized as part of a category, and their order will not be validated. +# For example, the following will NOT raise any offenses, even if the order is incorrect: +# +# [source,yaml] +# ---- +# Layout/ClassStructure: +# Enabled: true +# ExpectedOrder: +# - public_attribute_macros +# - initializer +# ---- +# +# To make it work as expected, you must also specify `Categories` like this: +# +# [source,yaml] +# ---- +# Layout/ClassStructure: +# ExpectedOrder: +# - public_attribute_macros +# - initializer +# Categories: +# attribute_macros: +# - attr_reader +# - attr_writer +# - attr_accessor +# ---- +# +# @safety +# Autocorrection is unsafe because class methods and module inclusion +# can behave differently, based on which methods or constants have +# already been defined. +# +# Constants will only be moved when they are assigned with literals. +# +# @example +# # bad +# # Expect extend be before constant +# class Person < ApplicationRecord +# has_many :orders +# ANSWER = 42 +# +# extend SomeModule +# include AnotherModule +# end +# +# # good +# class Person +# # extend and include go first +# extend SomeModule +# include AnotherModule +# +# # inner classes +# CustomError = Class.new(StandardError) +# +# # constants are next +# SOME_CONSTANT = 20 +# +# # afterwards we have public attribute macros +# attr_reader :name +# +# # followed by other macros (if any) +# validates :name +# +# # then we have public delegate macros +# delegate :to_s, to: :name +# +# # public class methods are next in line +# def self.some_method +# end +# +# # initialization goes between class methods and instance methods +# def initialize +# end +# +# # followed by other public instance methods +# def some_method +# end +# +# # protected attribute macros and methods go next +# protected +# +# attr_reader :protected_name +# +# def some_protected_method +# end +# +# # private attribute macros, delegate macros and methods +# # are grouped near the end +# private +# +# attr_reader :private_name +# +# delegate :some_private_delegate, to: :name +# +# def some_private_method +# end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:177 +class RuboCop::Cop::Layout::ClassStructure < ::RuboCop::Cop::Base + include ::RuboCop::Cop::VisibilityHelp + include ::RuboCop::Cop::CommentsHelp + extend ::RuboCop::Cop::AutoCorrector + + # Validates code style on class declaration. + # Add offense when find a node out of expected order. + # A node is out of order when its category is expected earlier than + # the highest-priority category seen so far, so that a low-priority element + # (even an unmovable one) cannot mask disorder among the elements that follow it. + # Consecutive elements of the same category are reported only once, + # on the first element of the group. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:206 + def on_class(class_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:218 + def on_sclass(class_node); end + + private + + # Autocorrect by moving the node, together with the contiguous group of + # same-category elements that follows it, to its expected position. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:239 + def autocorrect(corrector, node); end + + # A dynamic constant blocks every element: the cop does not move such constants, + # and letting other elements jump over one would change execution order just the same. + # A bare visibility modifier blocks only the elements whose meaning depends on + # the visibility section they appear in. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:398 + def barrier?(node, sibling); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:441 + def begin_pos_with_comment(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:464 + def buffer; end + + # Setting categories hash allow you to group methods in group to match + # in the {expected_order}. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:476 + def categories; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:309 + def class_elements(class_node); end + + # Classifies a node to match with something in the {expected_order} + # @param node to be analysed + # @return String when the node type is a `:block` then + # {classify} recursively with the first children + # @return String when the node type is a `:send` then {find_send_node_category} + # by method name + # @return String otherwise trying to {humanize_node} of the current node + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:262 + def classify(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:347 + def dynamic_constant?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:431 + def end_position_for(node); end + + # Load expected order from `ExpectedOrder` config. + # Define new terms in the expected order by adding new {categories}. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:470 + def expected_order; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:294 + def find_category(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:460 + def find_heredoc(node); end + + # Categorize a node according to the {expected_order} + # Try to match {categories} values against the node's method_name given + # also its visibility. + # @param node to be analysed. + # @return [String] with the key category or the `method_name` as string + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:281 + def find_send_node_category(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:332 + def flatten_class_elements(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:338 + def humanize_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:325 + def ignore?(node, classification); end + + # The expected position of the node: the first left sibling within its movable span + # whose category is expected to appear after the node's. + # Requiring a strictly later category keeps the order of elements sharing a category stable. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:358 + def insertion_anchor(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:425 + def marked_as_private_constant?(node, name); end + + # The node together with the contiguous same-category right siblings, + # so that the whole group moves in a single pass while the offense is + # reported only on its first element. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:371 + def movable_group(node); end + + # Left siblings the node may be reordered with: those after the last barrier. + # Ignored elements within the span are simply jumped over. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:387 + def movable_span(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:222 + def out_of_order_elements(class_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:415 + def private_constant?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:456 + def start_line_position(node); end + + # Whether moving the node across a bare visibility modifier would change its meaning. + # This is the case for `def` nodes and for macros whose category is classified by visibility + # (e.g. `attr_accessor` when the expected order lists `private_attribute_macros`). + # Inline visibility (`private def foo`, `def self.foo`) travels with the node. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:406 + def visibility_dependent?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:300 + def walk_over_nested_class_definition(class_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:452 + def whole_line_comment_at_line?(line); end + + class << self + # A moved element is inserted before the line break that precedes its anchor. + # When the anchor follows a blank line, `Layout/EmptyLines`, + # `Layout/EmptyLinesAroundAccessModifier` or `Layout/EmptyLinesAroundClassBody` + # may remove that line break in the same pass. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:195 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:182 +RuboCop::Cop::Layout::ClassStructure::HUMANIZED_NODE_TYPE = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/class_structure.rb:189 +RuboCop::Cop::Layout::ClassStructure::MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of here document closings. +# +# @example +# +# # bad +# class Foo +# def bar +# <<~SQL +# 'Hi' +# SQL +# end +# end +# +# # good +# class Foo +# def bar +# <<~SQL +# 'Hi' +# SQL +# end +# end +# +# # bad +# +# # heredoc contents is before closing heredoc. +# foo arg, +# <<~EOS +# Hi +# EOS +# +# # good +# foo arg, +# <<~EOS +# Hi +# EOS +# +# # good +# foo arg, +# <<~EOS +# Hi +# EOS +# +# pkg:gem/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 + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_heredoc_indentation.rb:57 + def on_heredoc(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_heredoc_indentation.rb:74 + def argument_indentation_correct?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_heredoc_indentation.rb:82 + def closing_indentation(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_heredoc_indentation.rb:101 + def find_node_used_heredoc_argument(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_heredoc_indentation.rb:90 + def heredoc_closing(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_heredoc_indentation.rb:86 + def heredoc_opening(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_heredoc_indentation.rb:117 + def indent_level(source_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_heredoc_indentation.rb:94 + def indented_end(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_heredoc_indentation.rb:109 + def message(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_heredoc_indentation.rb:70 + def opening_indentation(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/closing_heredoc_indentation.rb:53 +RuboCop::Cop::Layout::ClosingHeredocIndentation::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/closing_heredoc_indentation.rb:54 +RuboCop::Cop::Layout::ClosingHeredocIndentation::MSG_ARG = T.let(T.unsafe(nil), String) + +# pkg:gem/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 +# method calls, method definitions, and grouped expressions. A hanging +# closing parenthesis means `)` preceded by a line break. +# +# @example +# +# # bad +# some_method( +# a, +# b +# ) +# +# some_method( +# a, b +# ) +# +# some_method(a, b, c +# ) +# +# some_method(a, +# b, +# c +# ) +# +# some_method(a, +# x: 1, +# y: 2 +# ) +# +# # Scenario 1: When First Parameter Is On Its Own Line +# +# # good: when first param is on a new line, right paren is *always* +# # outdented by IndentationWidth +# some_method( +# a, +# b +# ) +# +# # good +# some_method( +# a, b +# ) +# +# # Scenario 2: When First Parameter Is On The Same Line +# +# # good: when all other params are also on the same line, outdent +# # right paren by IndentationWidth +# some_method(a, b, c +# ) +# +# # good: when all other params are on multiple lines, but are lined +# # up, align right paren with left paren +# some_method(a, +# b, +# c +# ) +# +# # good: when other params are not lined up on multiple lines, outdent +# # right paren by IndentationWidth +# some_method(a, +# x: 1, +# y: 2 +# ) +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:71 +class RuboCop::Cop::Layout::ClosingParenthesisIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:84 + def on_begin(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:82 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:88 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:91 + def on_defs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:79 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:157 + def all_elements_aligned?(elements); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:95 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:99 + def check(node, elements); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:107 + def check_for_elements(node, elements); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:125 + def check_for_no_elements(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:171 + def correct_column_candidates(node, left_paren); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:144 + def expected_column(left_paren, elements); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:167 + def first_argument_line(elements); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:187 + def line_break_after_left_paren?(left_paren, elements); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:179 + def message(correct_column, left_paren, right_paren); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:77 +RuboCop::Cop::Layout::ClosingParenthesisIndentation::MSG_ALIGN = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/closing_parenthesis_indentation.rb:75 +RuboCop::Cop::Layout::ClosingParenthesisIndentation::MSG_INDENT = T.let(T.unsafe(nil), String) + +# Checks the indentation of comments. +# +# @example +# # bad +# # comment here +# def method_name +# end +# +# # comment here +# a = 'hello' +# +# # yet another comment +# if true +# true +# end +# +# # good +# # comment here +# def method_name +# end +# +# # comment here +# a = 'hello' +# +# # yet another comment +# if true +# true +# end +# +# @example AllowForAlignment: false (default) +# # bad +# a = 1 # A really long comment +# # spanning two lines. +# +# # good +# # A really long comment spanning one line. +# a = 1 +# +# @example AllowForAlignment: true +# # good +# a = 1 # A really long comment +# # spanning two lines. +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:48 +class RuboCop::Cop::Layout::CommentIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:55 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:61 + def autocorrect(corrector, comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:91 + def autocorrect_one(corrector, comment); end + + # Corrects all preceding comment lines that have the same indentation + # and are separated from the given comment by nothing but blank lines. + # This is to avoid a long chain of correcting, saving the file, parsing + # and inspecting again, and then correcting one more line, and so on. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:71 + def autocorrect_preceding_comments(corrector, comment); end + + # Only a bare access modifier (the keyword alone on its line) is outdented by + # `Layout/AccessModifierIndentation`. An inline modifier such as `private def foo` + # keeps the regular method indentation, so a comment above it must not be pushed + # one level deeper. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:168 + def bare_access_modifier?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:95 + def check(comment, comment_index); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:148 + def correct_indentation(next_line); end + + # Returns true if: + # a) the cop is configured to allow extra indentation for alignment, and + # b) the currently inspected comment is aligned with the nearest preceding end-of-line + # comment. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:124 + def correctly_aligned_with_preceding_comment?(comment_index, column); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:159 + def less_indented?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:143 + def line_after_comment(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:134 + def message(column, correct_comment_indentation); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:138 + def own_line_comment?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:82 + def should_correct?(preceding_comment, reference_comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:172 + def two_alternatives?(line); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/comment_indentation.rb:52 +RuboCop::Cop::Layout::CommentIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks for conditions that are not on the same line as +# if/while/until. +# +# @example +# +# # bad +# if +# some_condition +# do_something +# end +# +# # good +# if some_condition +# do_something +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/condition_position.rb:21 +class RuboCop::Cop::Layout::ConditionPosition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/condition_position.rb:27 + def on_if(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/condition_position.rb:36 + def on_until(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/condition_position.rb:33 + def on_while(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/condition_position.rb:40 + def check(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/condition_position.rb:52 + def message(condition); end + + # When a body statement shares the condition's line (e.g. `while\n cond; body\nend`), + # removing the whole line would delete the body too. In that case only remove the + # condition and its trailing separator, preserving the body statement. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/condition_position.rb:59 + def removal_range(node, condition); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/condition_position.rb:25 +RuboCop::Cop::Layout::ConditionPosition::MSG = T.let(T.unsafe(nil), String) + +# Checks whether the end keywords of method definitions are +# aligned properly. +# +# Two modes are supported through the EnforcedStyleAlignWith configuration +# parameter. If it's set to `start_of_line` (which is the default), the +# `end` shall be aligned with the start of the line where the `def` +# keyword is. If it's set to `def`, the `end` shall be aligned with the +# `def` keyword. +# +# @example EnforcedStyleAlignWith: start_of_line (default) +# # bad +# +# private def foo +# end +# +# # good +# +# private def foo +# end +# +# @example EnforcedStyleAlignWith: def +# # bad +# +# private def foo +# end +# +# # good +# +# private def foo +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/def_end_alignment.rb:36 +class RuboCop::Cop::Layout::DefEndAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::EndKeywordAlignment + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/def_end_alignment.rb:43 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/def_end_alignment.rb:46 + def on_defs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/def_end_alignment.rb:48 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/def_end_alignment.rb:67 + def autocorrect(corrector, node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/def_end_alignment.rb:41 +RuboCop::Cop::Layout::DefEndAlignment::MSG = T.let(T.unsafe(nil), String) + +# Checks the . position in multi-line method calls. +# +# @example EnforcedStyle: leading (default) +# # bad +# something. +# method +# +# # good +# something +# .method +# +# @example EnforcedStyle: trailing +# # bad +# something +# .method +# +# # good +# something. +# method +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/dot_position.rb:25 +class RuboCop::Cop::Layout::DotPosition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/dot_position.rb:45 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/dot_position.rb:34 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/dot_position.rb:49 + def autocorrect(corrector, dot, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/dot_position.rb:99 + def correct_dot_position_style?(dot_line, selector_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/dot_position.rb:126 + def end_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/dot_position.rb:122 + def heredoc?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/dot_position.rb:114 + def last_heredoc_line(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/dot_position.rb:95 + def line_between?(first_line, second_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/dot_position.rb:64 + def message(dot); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/dot_position.rb:74 + def proper_dot_position?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/dot_position.rb:106 + def receiver_end_line(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/dot_position.rb:130 + def selector_range(node); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/layout/dot_position.rb:30 + def autocorrect_incompatible_with; end + end +end + +# Checks the alignment of else keywords. Normally they should +# be aligned with an if/unless/while/until/begin/def/rescue keyword, but there +# are special cases when they should follow the same rules as the +# alignment of end. +# +# @example +# # bad +# if something +# code +# else +# code +# end +# +# # bad +# if something +# code +# elsif something +# code +# end +# +# # good +# if something +# code +# else +# code +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:32 +class RuboCop::Cop::Layout::ElseAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::EndKeywordAlignment + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::CheckAssignment + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:57 + def on_case(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:63 + def on_case_match(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:40 + def on_if(node, base = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:51 + def on_rescue(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:71 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:101 + def base_for_method_definition(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:80 + def base_range_of_if(node, base); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:89 + def base_range_of_rescue(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:126 + def check_alignment(base_range, else_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:110 + def check_assignment(node, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:75 + def check_nested(node, base); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/else_alignment.rb:38 +RuboCop::Cop::Layout::ElseAlignment::MSG = T.let(T.unsafe(nil), String) + +# Checks empty comment. +# +# @example +# # bad +# +# # +# class Foo +# end +# +# # good +# +# # +# # Description of `Foo` class. +# # +# class Foo +# end +# +# @example AllowBorderComment: true (default) +# # good +# +# def foo +# end +# +# ################# +# +# def bar +# end +# +# @example AllowBorderComment: false +# # bad +# +# def foo +# end +# +# ################# +# +# def bar +# end +# +# @example AllowMarginComment: true (default) +# # good +# +# # +# # Description of `Foo` class. +# # +# class Foo +# end +# +# @example AllowMarginComment: false +# # bad +# +# # +# # Description of `Foo` class. +# # +# class Foo +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_comment.rb:63 +class RuboCop::Cop::Layout::EmptyComment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_comment.rb:69 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_comment.rb:132 + def allow_border_comment?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_comment.rb:136 + def allow_margin_comment?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_comment.rb:97 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_comment.rb:128 + def comment_text(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_comment.rb:107 + def concat_consecutive_comments(comments); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_comment.rb:118 + def empty_comment_only?(comment_text); end + + # A comment is inline when code precedes it on the same line. Detecting this + # from the source (rather than the token stream) is required because, for a + # comment trailing a heredoc opener, the preceding token is the heredoc end on + # a later line, which would wrongly trigger whole-line removal of the opener. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_comment.rb:144 + def inline_comment?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_comment.rb:85 + def investigate(comments); end +end + +# pkg:gem/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. +# +# This cop allows a SimpleCov directive comment after guard clause because +# SimpleCov excludes code from the coverage report by wrapping it in such directives. +# Both the legacy `# :nocov:` comment and the newer `# simplecov:disable` / +# `# simplecov:enable` comments are recognized: +# +# [source,ruby] +# ---- +# def foo +# # :nocov: +# return if condition +# # :nocov: +# bar +# end +# +# def foo +# # simplecov:disable +# return if condition +# # simplecov:enable +# bar +# end +# ---- +# +# Refer to SimpleCov's documentation for more details: +# https://github.com/simplecov-ruby/simplecov#ignoringskipping-code +# +# @example +# +# # bad +# def foo +# return if need_return? +# bar +# end +# +# # good +# def foo +# return if need_return? +# +# bar +# end +# +# # good +# def foo +# return if something? +# return if something_different? +# +# bar +# end +# +# # also good +# def foo +# if something? +# do_something +# return if need_return? +# end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:63 +class RuboCop::Cop::Layout::EmptyLineAfterGuardClause < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::PathUtil + extend ::RuboCop::Cop::Util + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:73 + def guard_clause_branch?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:77 + def on_if(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:98 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:120 + def contains_guard_clause?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:113 + def correct_style?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:199 + def heredoc?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:192 + def heredoc_line(node, heredoc_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:165 + def last_heredoc_argument(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:180 + def last_heredoc_argument_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:217 + def multiple_statements_on_line?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:137 + def next_line_allowed_directive_comment?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:133 + def next_line_empty?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:126 + def next_line_empty_or_allowed_directive_comment?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:143 + def next_line_rescue_or_ensure?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:157 + def next_sibling_empty_or_guard_clause?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:148 + def next_sibling_parent_empty_or_else?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:209 + def offense_location(node); end + + # SimpleCov excludes code from the coverage report by wrapping it in directive comments: + # https://github.com/simplecov-ruby/simplecov#ignoringskipping-code + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:226 + def simplecov_directive_comment?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:203 + def use_heredoc_in_condition?(condition); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:69 +RuboCop::Cop::Layout::EmptyLineAfterGuardClause::END_OF_HEREDOC_LINE = T.let(T.unsafe(nil), Integer) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:68 +RuboCop::Cop::Layout::EmptyLineAfterGuardClause::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:70 +RuboCop::Cop::Layout::EmptyLineAfterGuardClause::SIMPLECOV_COMMENT_PATTERN = T.let(T.unsafe(nil), Regexp) + +# Checks for a newline after the final magic comment. +# +# `NumberOfEmptyLines` configures the minimum number of empty lines required. Set it +# to `2` when using YARD, which otherwise treats the magic comments as documentation +# for the first module or class in the file. +# +# NOTE: `Layout/EmptyLines` has to be disabled for values greater than `1`, as it +# removes the extra empty lines this cop adds, and autocorrecting with both enabled +# loops between them. +# +# @example +# # good +# +# # Some documentation for Person +# class Person +# # Some code +# end +# +# # bad +# # Some documentation for Person +# class Person +# # Some code +# end +# +# @example NumberOfEmptyLines: 1 (default) +# # good +# +# class Person +# end +# +# @example NumberOfEmptyLines: 2 +# # bad +# +# class Person +# end +# +# # good +# +# +# class Person +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_magic_comment.rb:52 +class RuboCop::Cop::Layout::EmptyLineAfterMagicComment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_magic_comment.rb:68 + def on_new_investigation; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_magic_comment.rb:59 + def validate_config; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_magic_comment.rb:119 + def comments_before_code(source); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_magic_comment.rb:90 + def empty_lines_after(last_magic_comment); end + + # Find the last magic comment in the source file. + # + # Take all comments that precede the first line of code (or just take + # them all in the case when there is no code), select the + # magic comments, and return the last magic comment in the file. + # + # @return [Parser::Source::Comment] if magic comments exist before code + # @return [nil] otherwise + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_magic_comment.rb:113 + def last_magic_comment(source); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_magic_comment.rb:85 + def message(actual); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_magic_comment.rb:101 + def number_of_empty_lines; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_magic_comment.rb:97 + def offending_range(last_magic_comment); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_magic_comment.rb:56 +RuboCop::Cop::Layout::EmptyLineAfterMagicComment::MSG = T.let(T.unsafe(nil), String) + +# Enforces empty line after multiline condition. +# +# @example +# # bad +# if multiline && +# condition +# do_something +# end +# +# # good +# if multiline && +# condition +# +# do_something +# end +# +# # bad +# case x +# when foo, +# bar +# do_something +# end +# +# # good +# case x +# when foo, +# bar +# +# do_something +# end +# +# # bad +# begin +# do_something +# rescue FooError, +# BarError +# handle_error +# end +# +# # good +# begin +# do_something +# rescue FooError, +# BarError +# +# handle_error +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb:54 +class RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb:84 + def on_case(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb:60 + def on_if(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb:96 + def on_rescue(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb:75 + def on_until(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb:82 + def on_until_post(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb:70 + def on_while(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb:77 + def on_while_post(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb:136 + def autocorrect(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb:121 + def body_on_line?(body, line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb:109 + def check_condition(condition, body = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb:129 + def multiline_rescue_exceptions?(exception_nodes); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb:125 + def multiline_when_condition?(when_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb:117 + def next_line_empty?(line); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb:58 +RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition::MSG = T.let(T.unsafe(nil), String) + +# Checks whether class/module/method definitions are +# separated by one or more empty lines. +# +# `NumberOfEmptyLines` can be an integer (default is 1) or +# an array (e.g. [1, 2]) to specify a minimum and maximum +# number of empty lines permitted. +# +# `AllowAdjacentOneLineDefs` configures whether adjacent +# one-line definitions are considered an offense. +# +# @example EmptyLineBetweenMethodDefs: true (default) +# # checks for empty lines between method definitions. +# +# # bad +# def a +# end +# def b +# end +# +# # good +# def a +# end +# +# def b +# end +# +# @example EmptyLineBetweenClassDefs: true (default) +# # checks for empty lines between class definitions. +# +# # bad +# class A +# end +# class B +# end +# def b +# end +# +# # good +# class A +# end +# +# class B +# end +# +# def b +# end +# +# @example EmptyLineBetweenModuleDefs: true (default) +# # checks for empty lines between module definitions. +# +# # bad +# module A +# end +# module B +# end +# def b +# end +# +# # good +# module A +# end +# +# module B +# end +# +# def b +# end +# +# @example AllowAdjacentOneLineDefs: true (default) +# +# # good +# class ErrorA < BaseError; end +# class ErrorB < BaseError; end +# +# # good +# class ErrorA < BaseError; end +# +# class ErrorB < BaseError; end +# +# # good - DefLikeMacros: [memoize] +# memoize :attribute_a +# memoize :attribute_b +# +# # good +# memoize :attribute_a +# +# memoize :attribute_b +# +# @example AllowAdjacentOneLineDefs: false +# +# # bad +# class ErrorA < BaseError; end +# class ErrorB < BaseError; end +# +# # good +# class ErrorA < BaseError; end +# +# class ErrorB < BaseError; end +# +# # bad - DefLikeMacros: [memoize] +# memoize :attribute_a +# memoize :attribute_b +# +# # good +# memoize :attribute_a +# +# memoize :attribute_b +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:114 +class RuboCop::Cop::Layout::EmptyLineBetweenDefs < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:151 + def autocorrect(corrector, prev_def, node, count); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:136 + def check_defs(nodes); end + + # We operate on `begin` nodes, instead of using `OnMethodDef`, + # so that we can walk over pairs of consecutive nodes and + # efficiently access a node's predecessor; #prev_node ends up + # doing a linear scan over siblings, so we don't want to call + # it on each def. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:129 + def on_begin(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:318 + def allowance_range?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:300 + def autocorrect_insert_lines(corrector, newline_pos, count); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:293 + def autocorrect_remove_lines(corrector, newline_pos, count); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:242 + def blank_lines_count_between(first_def_node, second_def_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:180 + def candidate?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:206 + def class_candidate?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:272 + def def_end(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:170 + def def_location(correction_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:262 + def def_start(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:187 + def empty_line_between_macros; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:276 + def end_loc(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:220 + def expected_lines; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:238 + def line_count_allowed?(count); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:254 + def lines_between_defs(first_def_node, second_def_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:191 + def macro_candidate?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:250 + def maximum_empty_lines; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:214 + def message(node, count: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:202 + def method_candidate?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:246 + def minimum_empty_lines; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:210 + def module_candidate?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:229 + def multiple_blank_lines_groups?(first_def_node, second_def_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:307 + def node_type(node); end + + # For an endless method whose body is a heredoc (e.g. `def a = <<~TEXT`), the + # node's source range ends at the heredoc opening line, before the heredoc body. + # Use the heredoc's closing delimiter so the def's real end is located after the + # heredoc and blank-line insertion does not land inside the heredoc body. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:285 + def trailing_heredoc_end(node, end_location); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:120 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_between_defs.rb:118 +RuboCop::Cop::Layout::EmptyLineBetweenDefs::MSG = T.let(T.unsafe(nil), String) + +# Checks for two or more consecutive blank lines. +# +# @example +# +# # bad - It has two empty lines. +# some_method +# # one empty line +# # two empty lines +# some_method +# +# # good +# some_method +# # one empty line +# some_method +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines.rb:21 +class RuboCop::Cop::Layout::EmptyLines < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines.rb:28 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines.rb:44 + def consecutive_blank_lines_possible?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines.rb:48 + def each_extra_empty_line(lines); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines.rb:66 + def exceeds_line_offset?(line_diff); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines.rb:70 + def previous_and_current_lines_empty?(line); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines.rb:26 +RuboCop::Cop::Layout::EmptyLines::LINE_OFFSET = T.let(T.unsafe(nil), Integer) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines.rb:25 +RuboCop::Cop::Layout::EmptyLines::MSG = T.let(T.unsafe(nil), String) + +# Checks for an empty line after a module inclusion method (`extend`, +# `include` and `prepend`), or a group of them. +# +# @example +# # bad +# class Foo +# include Bar +# attr_reader :baz +# end +# +# # good +# class Foo +# include Bar +# +# attr_reader :baz +# end +# +# # also good - multiple module inclusions grouped together +# class Foo +# extend Bar +# include Baz +# prepend Qux +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb:30 +class RuboCop::Cop::Layout::EmptyLinesAfterModuleInclusion < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb:40 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb:85 + def allowed_method?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb:54 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb:69 + def enable_directive_comment?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb:75 + def line_empty?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb:65 + def next_line_empty_or_enable_directive_comment?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb:93 + def next_line_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb:79 + def require_empty_line?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb:36 +RuboCop::Cop::Layout::EmptyLinesAfterModuleInclusion::MODULE_INCLUSION_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb:34 +RuboCop::Cop::Layout::EmptyLinesAfterModuleInclusion::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb:38 +RuboCop::Cop::Layout::EmptyLinesAfterModuleInclusion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Access modifiers should be surrounded by blank lines. +# +# @example EnforcedStyle: around (default) +# +# # bad +# class Foo +# def bar; end +# private +# def baz; end +# end +# +# # good +# class Foo +# def bar; end +# +# private +# +# def baz; end +# end +# +# @example EnforcedStyle: only_before +# +# # bad +# class Foo +# def bar; end +# private +# def baz; end +# end +# +# # good +# class Foo +# def bar; end +# +# private +# def baz; end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:43 +class RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:56 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:81 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:62 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:86 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:71 + def on_module(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:85 + def on_numblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:76 + def on_sclass(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:88 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:116 + def allowed_only_before_style?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:171 + def block_start?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:177 + def body_end?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:165 + def class_def?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:125 + def correct_next_line_if_denied_style(corrector, node, line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:161 + def empty_lines_around?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:105 + def expected_empty_lines?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:230 + def inside_block?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:187 + def message(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:196 + def message_for_around_style(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:206 + def message_for_only_before_style(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:183 + def next_empty_line_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:151 + def next_line_empty?(last_send_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:157 + def next_line_empty_and_exists?(last_send_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:234 + def no_empty_lines_around_block_body?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:144 + def previous_line_empty?(send_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:140 + def previous_line_ignoring_comments(processed_source, send_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:224 + def should_insert_line_after?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:216 + def should_insert_line_before?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:48 +RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_AFTER = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:52 +RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_AFTER_FOR_ONLY_BEFORE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:49 +RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_BEFORE_AND_AFTER = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:51 +RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_BEFORE_FOR_ONLY_BEFORE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb:54 +RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks if empty lines exist around the arguments +# of a method invocation. +# +# @example +# # bad +# do_something( +# foo +# +# ) +# +# process(bar, +# +# baz: qux, +# thud: fred) +# +# some_method( +# +# [1,2,3], +# x: y +# ) +# +# # good +# do_something( +# foo +# ) +# +# process(bar, +# baz: qux, +# thud: fred) +# +# some_method( +# [1,2,3], +# x: y +# ) +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_arguments.rb:41 +class RuboCop::Cop::Layout::EmptyLinesAroundArguments < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_arguments.rb:57 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_arguments.rb:47 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_arguments.rb:73 + def empty_range_for_starting_point(start); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_arguments.rb:65 + def extra_lines(node, &block); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_arguments.rb:61 + def receiver_and_method_call_on_different_lines?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_arguments.rb:45 +RuboCop::Cop::Layout::EmptyLinesAroundArguments::MSG = T.let(T.unsafe(nil), String) + +# Checks for a newline after an attribute accessor or a group of them. +# `alias` syntax and `alias_method`, `public`, `protected`, and `private` methods are allowed +# by default. These are customizable with `AllowAliasSyntax` and `AllowedMethods` options. +# +# @example +# # bad +# attr_accessor :foo +# def do_something +# end +# +# # good +# attr_accessor :foo +# +# def do_something +# end +# +# # good +# attr_accessor :foo +# attr_reader :bar +# attr_writer :baz +# attr :qux +# +# def do_something +# end +# +# @example AllowAliasSyntax: true (default) +# # good +# attr_accessor :foo +# alias :foo? :foo +# +# def do_something +# end +# +# @example AllowAliasSyntax: false +# # bad +# attr_accessor :foo +# alias :foo? :foo +# +# def do_something +# end +# +# # good +# attr_accessor :foo +# +# alias :foo? :foo +# +# def do_something +# end +# +# @example AllowedMethods: ['private'] +# # good +# attr_accessor :foo +# private :foo +# +# def do_something +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:63 +class RuboCop::Cop::Layout::EmptyLinesAroundAttributeAccessor < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::AllowedMethods + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:71 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:125 + def allow_alias?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:135 + def allow_alias_syntax?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:129 + def attribute_or_allowed_method?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:84 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:108 + def next_line_empty?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:95 + def next_line_empty_or_enable_directive_comment?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:102 + def next_line_enable_directive_comment?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:119 + def next_line_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:112 + def require_empty_line?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:68 +RuboCop::Cop::Layout::EmptyLinesAroundAttributeAccessor::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:69 +RuboCop::Cop::Layout::EmptyLinesAroundAttributeAccessor::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks if empty lines exist around the bodies of begin-end +# blocks. +# +# @example +# +# # bad +# begin +# +# # ... +# +# end +# +# # good +# begin +# # ... +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_begin_body.rb:23 +class RuboCop::Cop::Layout::EmptyLinesAroundBeginBody < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Layout::EmptyLinesAroundBody + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_begin_body.rb:29 + def on_kwbegin(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_begin_body.rb:35 + def style; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_begin_body.rb:27 +RuboCop::Cop::Layout::EmptyLinesAroundBeginBody::KIND = T.let(T.unsafe(nil), String) + +# Checks if empty lines around the bodies of blocks match +# the configuration. +# +# @example EnforcedStyle: no_empty_lines (default) +# # bad +# foo do |bar| +# +# # ... +# +# end +# +# # good +# foo do |bar| +# # ... +# end +# +# @example EnforcedStyle: empty_lines +# # bad +# foo do |bar| +# # ... +# end +# +# # good +# foo do |bar| +# +# # ... +# +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_block_body.rb:34 +class RuboCop::Cop::Layout::EmptyLinesAroundBlockBody < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Layout::EmptyLinesAroundBody + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_block_body.rb:40 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_block_body.rb:47 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_block_body.rb:46 + def on_numblock(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_block_body.rb:38 +RuboCop::Cop::Layout::EmptyLinesAroundBlockBody::KIND = T.let(T.unsafe(nil), String) + +# Common functionality for checking if presence/absence of empty lines +# around some kind of body matches the configuration. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:8 +module RuboCop::Cop::Layout::EmptyLinesAroundBody + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:22 + def constant_definition?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:25 + def empty_line_required?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:28 + def check(node, body, adjusted_first_line: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:84 + def check_beginning(style, first_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:70 + def check_both(style, first_line, last_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:119 + def check_deferred_empty_line(body); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:46 + def check_empty_lines_except_namespace(body, first_line, last_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:54 + def check_empty_lines_special(body, first_line, last_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:88 + def check_ending(style, last_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:101 + def check_line(style, line, msg); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:92 + def check_source(style, line_no, desc); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:170 + def deferred_message(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:143 + def first_child_requires_empty_line?(body); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:151 + def first_empty_line_required_child(body); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:113 + def leading_dot_line?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:166 + def message(type, desc); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:133 + def namespace?(body, with_one_child: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:159 + def previous_line_ignoring_comments(send_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:174 + def valid_body_style?(body); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:17 +RuboCop::Cop::Layout::EmptyLinesAroundBody::LEADING_DOT_TYPES = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:15 +RuboCop::Cop::Layout::EmptyLinesAroundBody::MSG_DEFERRED = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:13 +RuboCop::Cop::Layout::EmptyLinesAroundBody::MSG_EXTRA = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/empty_lines_around_body.rb:14 +RuboCop::Cop::Layout::EmptyLinesAroundBody::MSG_MISSING = T.let(T.unsafe(nil), String) + +# Checks if empty lines around the bodies of classes match +# the configuration. +# +# @example EnforcedStyle: no_empty_lines (default) +# # bad +# class Foo +# +# def bar +# # ... +# end +# +# end +# +# # good +# class Foo +# def bar +# # ... +# end +# end +# +# @example EnforcedStyle: empty_lines +# # bad +# class Foo +# def bar +# # ... +# end +# end +# +# # good +# class Foo +# +# def bar +# # ... +# end +# +# end +# +# @example EnforcedStyle: empty_lines_except_namespace +# # good +# +# class Foo +# class Bar +# +# # ... +# +# end +# end +# +# @example EnforcedStyle: empty_lines_special +# # good +# class Foo +# +# def bar; end +# +# end +# +# @example EnforcedStyle: beginning_only +# # good +# +# class Foo +# +# def bar +# # ... +# end +# end +# +# @example EnforcedStyle: ending_only +# # good +# +# class Foo +# def bar +# # ... +# end +# +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_class_body.rb:81 +class RuboCop::Cop::Layout::EmptyLinesAroundClassBody < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Layout::EmptyLinesAroundBody + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_class_body.rb:87 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_class_body.rb:93 + def on_sclass(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_class_body.rb:85 +RuboCop::Cop::Layout::EmptyLinesAroundClassBody::KIND = T.let(T.unsafe(nil), String) + +# Checks if empty lines exist around the bodies of `begin` +# sections. This cop doesn't check empty lines at `begin` body +# beginning/end and around method definition body. +# `Layout/EmptyLinesAroundBeginBody` or `Layout/EmptyLinesAroundMethodBody` +# can be used for this purpose. +# +# @example +# +# # good +# +# begin +# do_something +# rescue +# do_something2 +# else +# do_something3 +# ensure +# do_something4 +# end +# +# # good +# +# def foo +# do_something +# rescue +# do_something2 +# end +# +# # bad +# +# begin +# do_something +# +# rescue +# +# do_something2 +# +# else +# +# do_something3 +# +# ensure +# +# do_something4 +# end +# +# # bad +# +# def foo +# do_something +# +# rescue +# +# do_something2 +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb:61 +class RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Layout::EmptyLinesAroundBody + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb:71 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb:67 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb:70 + def on_defs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb:74 + def on_kwbegin(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb:72 + def on_numblock(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb:80 + def check_body(body, line_of_def_or_kwbegin); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb:116 + def keyword_locations(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb:142 + def keyword_locations_in_ensure(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb:138 + def keyword_locations_in_rescue(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb:99 + def last_body_and_end_on_same_line?(body); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb:129 + def left_to_block_body_cop?(body, keyword_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb:108 + def message(location, keyword); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb:150 + def only_empty_lines_until_end?(body, keyword_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb:112 + def style; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb:65 +RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords::MSG = T.let(T.unsafe(nil), String) + +# Checks if empty lines exist around the bodies of methods. +# +# @example +# +# # good +# +# def foo +# # ... +# end +# +# # bad +# +# def bar +# +# # ... +# +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_method_body.rb:23 +class RuboCop::Cop::Layout::EmptyLinesAroundMethodBody < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Layout::EmptyLinesAroundBody + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_method_body.rb:29 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_method_body.rb:39 + def on_defs(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_method_body.rb:47 + def offending_endless_method?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_method_body.rb:52 + def register_offense_for_endless_method(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_method_body.rb:43 + def style; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_method_body.rb:27 +RuboCop::Cop::Layout::EmptyLinesAroundMethodBody::KIND = T.let(T.unsafe(nil), String) + +# Checks if empty lines around the bodies of modules match +# the configuration. +# +# @example EnforcedStyle: no_empty_lines (default) +# # bad +# module Foo +# +# def bar +# # ... +# end +# +# end +# +# # good +# module Foo +# def bar +# # ... +# end +# end +# +# @example EnforcedStyle: empty_lines +# # bad +# module Foo +# def bar +# # ... +# end +# end +# +# # good +# module Foo +# +# def bar +# # ... +# end +# +# end +# +# @example EnforcedStyle: empty_lines_except_namespace +# # good +# +# module Foo +# module Bar +# +# # ... +# +# end +# end +# +# @example EnforcedStyle: empty_lines_special +# # good +# module Foo +# +# def bar; end +# +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_module_body.rb:61 +class RuboCop::Cop::Layout::EmptyLinesAroundModuleBody < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Layout::EmptyLinesAroundBody + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_module_body.rb:67 + def on_module(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_module_body.rb:65 +RuboCop::Cop::Layout::EmptyLinesAroundModuleBody::KIND = T.let(T.unsafe(nil), String) + +# Checks whether the end keywords are aligned properly. +# +# Three modes are supported through the `EnforcedStyleAlignWith` +# configuration parameter: +# +# If it's set to `keyword` (which is the default), the `end` +# shall be aligned with the start of the keyword (if, class, etc.). +# +# If it's set to `variable` the `end` shall be aligned with the +# left-hand-side of the variable assignment, if there is one. +# +# If it's set to `start_of_line`, the `end` shall be aligned with the +# start of the line where the matching keyword appears. +# +# This `Layout/EndAlignment` cop aligns with keywords (e.g. `if`, `while`, `case`) +# by default. On the other hand, `Layout/BeginEndAlignment` cop aligns with +# `EnforcedStyleAlignWith: start_of_line` by default because `||= begin` tends +# to align with the start of the line. `Layout/DefEndAlignment` cop also aligns with +# `EnforcedStyleAlignWith: start_of_line` by default. +# These styles can be configured by each cop. +# +# @example EnforcedStyleAlignWith: keyword (default) +# # bad +# +# variable = if true +# end +# +# # good +# +# variable = if true +# end +# +# variable = +# if true +# end +# +# @example EnforcedStyleAlignWith: variable +# # bad +# +# variable = if true +# end +# +# # good +# +# variable = if true +# end +# +# variable = +# if true +# end +# +# @example EnforcedStyleAlignWith: start_of_line +# # bad +# +# variable = if true +# end +# +# puts(if true +# end) +# +# # good +# +# variable = if true +# end +# +# puts(if true +# end) +# +# variable = +# if true +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:77 +class RuboCop::Cop::Layout::EndAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CheckAssignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::EndKeywordAlignment + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:111 + def on_case(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:118 + def on_case_match(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:83 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:99 + def on_if(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:95 + def on_module(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:87 + def on_sclass(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:107 + def on_until(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:103 + def on_while(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:175 + def alignment_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:192 + def alignment_node_for_variable_style(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:156 + def asgn_variable_align_with(outer_node, inner_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:210 + def assignment_or_operator_method(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:122 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:135 + def check_asgn_alignment(outer_node, inner_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:126 + def check_assignment(node, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:166 + def check_other_alignment(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:146 + def leading_node(rhs); end +end + +# Checks for Windows-style line endings in the source code. +# +# @example EnforcedStyle: native (default) +# # The `native` style means that CR+LF (Carriage Return + Line Feed) is +# # enforced on Windows, and LF is enforced on other platforms. +# +# # bad +# puts 'Hello' # Return character is LF on Windows. +# puts 'Hello' # Return character is CR+LF on other than Windows. +# +# # good +# puts 'Hello' # Return character is CR+LF on Windows. +# puts 'Hello' # Return character is LF on other than Windows. +# +# @example EnforcedStyle: lf +# # The `lf` style means that LF (Line Feed) is enforced on +# # all platforms. +# +# # bad +# puts 'Hello' # Return character is CR+LF on all platforms. +# +# # good +# puts 'Hello' # Return character is LF on all platforms. +# +# @example EnforcedStyle: crlf +# # The `crlf` style means that CR+LF (Carriage Return + Line Feed) is +# # enforced on all platforms. +# +# # bad +# puts 'Hello' # Return character is LF on all platforms. +# +# # good +# puts 'Hello' # Return character is CR+LF on all platforms. +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/end_of_line.rb:40 +class RuboCop::Cop::Layout::EndOfLine < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_of_line.rb:71 + def offense_message(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_of_line.rb:47 + def on_new_investigation; end + + # If there is no LF on the last line, we don't care if there's no CR. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_of_line.rb:67 + def unimportant_missing_cr?(index, last_line, line); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_of_line.rb:85 + def last_line(processed_source); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/end_of_line.rb:44 +RuboCop::Cop::Layout::EndOfLine::MSG_DETECTED = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/end_of_line.rb:45 +RuboCop::Cop::Layout::EndOfLine::MSG_MISSING = T.let(T.unsafe(nil), String) + +# Checks for extra/unnecessary whitespace. +# +# @example +# +# # good if AllowForAlignment is true +# name = "RuboCop" +# # Some comment and an empty line +# +# website += "/rubocop/rubocop" unless cond +# puts "rubocop" if debug +# +# # bad for any configuration +# set_app("RuboCop") +# website = "https://github.com/rubocop/rubocop" +# +# # good only if AllowBeforeTrailingComments is true +# object.method(arg) # this is a comment +# +# # good even if AllowBeforeTrailingComments is false or not set +# object.method(arg) # this is a comment +# +# # good with either AllowBeforeTrailingComments or AllowForAlignment +# object.method(arg) # this is a comment +# another_object.method(arg) # this is another comment +# some_object.method(arg) # this is some comment +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:31 +class RuboCop::Cop::Layout::ExtraSpacing < ::RuboCop::Cop::Base + include ::RuboCop::Cop::PrecedingFollowingAlignment + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:43 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:276 + def align_column(asgn_token); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:253 + def align_equal_sign(corrector, token, align_to); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:243 + def align_equal_signs(range, corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:57 + def aligned_locations(locs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:140 + def aligned_on_other_column?(token, lines); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:108 + def aligned_tok?(previous_token, token); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:265 + def all_relevant_assignment_lines(line_number); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:285 + def allow_for_trailing_comments?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:162 + def build_group_profile(group); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:77 + def check_assignment(token); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:86 + def check_other(token1, token2, ast); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:67 + def check_tokens(ast, token1, token2); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:152 + def distinct_spacings(entries); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:96 + def extra_space_range(token1, token2); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:239 + def force_equal_sign_alignment?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:156 + def group_profile(line_number); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:217 + 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. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:224 + def ignored_ranges(ast); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:191 + def nearest_spacing_differs?(line_numbers, token, spacing); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:181 + def nearest_spacing_varies?(previous_token, token); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:211 + def prepare_alignment_data; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:171 + def record_line_spacings(by_column, typed, line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:203 + def spacing_before_token_at(line_number, column); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:118 + def spacing_varies?(previous_token, token); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:133 + def uniform_alignment_allowed?(token, lines, spacings); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:39 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:37 +RuboCop::Cop::Layout::ExtraSpacing::MSG_UNALIGNED_ASGN = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/extra_spacing.rb:36 +RuboCop::Cop::Layout::ExtraSpacing::MSG_UNNECESSARY = T.let(T.unsafe(nil), String) + +# Checks the indentation of the first argument in a method call. +# Arguments after the first one are checked by `Layout/ArgumentAlignment`, +# not by this cop. +# +# For indenting the first parameter of method _definitions_, check out +# `Layout/FirstParameterIndentation`. +# +# This cop will respect `Layout/ArgumentAlignment` and will not work when +# `EnforcedStyle: with_fixed_indentation` is specified for `Layout/ArgumentAlignment`. +# +# @example +# +# # bad +# some_method( +# first_param, +# second_param) +# +# foo = some_method( +# first_param, +# second_param) +# +# foo = some_method(nested_call( +# nested_first_param), +# second_param) +# +# foo = some_method( +# nested_call( +# nested_first_param), +# second_param) +# +# some_method nested_call( +# nested_first_param), +# second_param +# +# @example EnforcedStyle: special_for_inner_method_call_in_parentheses (default) +# # Same as `special_for_inner_method_call` except that the special rule +# # only applies if the outer method call encloses its arguments in +# # parentheses. +# +# # good +# some_method( +# first_param, +# second_param) +# +# foo = some_method( +# first_param, +# second_param) +# +# foo = some_method(nested_call( +# nested_first_param), +# second_param) +# +# foo = some_method( +# nested_call( +# nested_first_param), +# second_param) +# +# some_method nested_call( +# nested_first_param), +# second_param +# +# @example EnforcedStyle: consistent +# # The first argument should always be indented one step more than the +# # preceding line. +# +# # good +# some_method( +# first_param, +# second_param) +# +# foo = some_method( +# first_param, +# second_param) +# +# foo = some_method(nested_call( +# nested_first_param), +# second_param) +# +# foo = some_method( +# nested_call( +# nested_first_param), +# second_param) +# +# some_method nested_call( +# nested_first_param), +# second_param +# +# @example EnforcedStyle: consistent_relative_to_receiver +# # The first argument should always be indented one level relative to +# # the parent that is receiving the argument +# +# # good +# some_method( +# first_param, +# second_param) +# +# foo = some_method( +# first_param, +# second_param) +# +# foo = some_method(nested_call( +# nested_first_param), +# second_param) +# +# foo = some_method( +# nested_call( +# nested_first_param), +# second_param) +# +# some_method nested_call( +# nested_first_param), +# second_params +# +# @example EnforcedStyle: special_for_inner_method_call +# # The first argument should normally be indented one step more than +# # the preceding line, but if it's an argument for a method call that +# # is itself an argument in a method call, then the inner argument +# # should be indented relative to the inner method. +# +# # good +# some_method( +# first_param, +# second_param) +# +# foo = some_method( +# first_param, +# second_param) +# +# foo = some_method(nested_call( +# nested_first_param), +# second_param) +# +# foo = some_method( +# nested_call( +# nested_first_param), +# second_param) +# +# some_method nested_call( +# nested_first_param), +# second_param +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:147 +class RuboCop::Cop::Layout::FirstArgumentIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:257 + def eligible_method_call?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:166 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:155 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:167 + def on_super(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:322 + def argument_alignment_applies?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:175 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:213 + def bare_operator?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:233 + def base_indentation(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:261 + def base_range(send_node, arg_node); end + + # Returns the column of the given range. For single line ranges, this + # is simple. For ranges with line breaks, we look a the last code line. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:273 + def column_of(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:294 + def comment_lines; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:315 + def conflicts_with_fixed_indentation_alignment?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:311 + def enable_layout_first_method_argument_line_break?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:306 + def enforce_first_argument_with_fixed_indentation?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:203 + def find_top_level_send(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:329 + def indentation_of_method_line(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:197 + def inner_call?(top_level_send); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:217 + def message(arg_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:302 + def on_new_investigation; end + + # Takes the line number of a given code line and returns a string + # containing the previous line that's not a comment line or a blank + # line. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:285 + def previous_code_line(line_number); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:171 + def should_check?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:188 + def should_correct_entire_chain?(send_node, top_level_send); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:241 + def special_inner_call_indentation?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/first_argument_indentation.rb:153 +RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), String) + +# 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 `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 +# same line as the opening parenthesis of the method call, shall have +# their first element indented one step (two spaces) more than the +# position inside the opening parenthesis. +# +# Other array literals shall have their first element indented one step +# more than the start of the line where the opening square bracket is. +# +# This default style is called 'special_inside_parentheses'. Alternative +# styles are 'consistent' and 'align_brackets'. Here are examples: +# +# @example EnforcedStyle: special_inside_parentheses (default) +# # The `special_inside_parentheses` style enforces that the first +# # element in an array literal where the opening bracket and first +# # element are on separate lines is indented one step (two spaces) more +# # than the position inside the opening parenthesis. +# +# # bad +# array = [ +# :value +# ] +# and_in_a_method_call([ +# :no_difference +# ]) +# +# # good +# array = [ +# :value +# ] +# but_in_a_method_call([ +# :its_like_this +# ]) +# +# @example EnforcedStyle: consistent +# # The `consistent` style enforces that the first element in an array +# # literal where the opening bracket and the first element are on +# # separate lines is indented the same as an array literal which is not +# # defined inside a method call. +# +# # bad +# array = [ +# :value +# ] +# but_in_a_method_call([ +# :its_like_this +# ]) +# +# # good +# array = [ +# :value +# ] +# and_in_a_method_call([ +# :no_difference +# ]) +# +# @example EnforcedStyle: align_brackets +# # The `align_brackets` style enforces that the opening and closing +# # brackets are indented to the same position. +# +# # bad +# and_now_for_something = [ +# :completely_different +# ] +# +# # good +# and_now_for_something = [ +# :completely_different +# ] +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:82 +class RuboCop::Cop::Layout::FirstArrayElementIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineElementIndentation + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:91 + def on_array(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:105 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:98 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:121 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:109 + def autocorrect_incompatible_with_other_cops?(array_node, left_parenthesis); end + + # Returns the description of what the correct indentation is based on. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:159 + def base_description(indent_base_type); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:125 + def brace_alignment_style; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:129 + def check(array_node, left_parenthesis); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:143 + def check_right_bracket(right_bracket, first_elem, left_bracket, left_parenthesis); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:195 + def enforce_first_argument_with_fixed_indentation?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:172 + def message(base_description); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:180 + def message_for_right_bracket(indent_base_type); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_indentation.rb:88 +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 +# +# # bad +# [ :a, +# :b] +# +# # good +# [ +# :a, +# :b] +# +# # good +# [:a, :b] +# +# @example AllowImplicitArrayLiterals: false (default) +# +# # bad +# a = b, +# c +# +# # good +# a = +# b, +# c +# +# @example AllowImplicitArrayLiterals: true +# +# # good +# a = b, +# c +# +# a = +# b, +# c +# +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# [ :a, { +# :b => :c +# }] +# +# # good +# [ +# :a, { +# :b => :c +# }] +# +# @example AllowMultilineFinalElement: true +# +# # good +# [:a, { +# :b => :c +# }] +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_line_break.rb:64 +class RuboCop::Cop::Layout::FirstArrayElementLineBreak < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FirstElementLineBreak + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_line_break.rb:70 + def on_array(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_line_break.rb:84 + def allow_implicit_array_brackets?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_line_break.rb:79 + def assignment_on_same_line?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_line_break.rb:88 + def ignore_last_element?; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/first_array_element_line_break.rb:68 +RuboCop::Cop::Layout::FirstArrayElementLineBreak::MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of the first key in a hash literal +# where the opening brace and the first key are on separate lines. The +# other keys' indentations are handled by the HashAlignment cop. +# +# By default, `Hash` literals that are arguments in a method call with +# parentheses, and where the opening curly brace of the hash is on the +# same line as the opening parenthesis of the method call, shall have +# their first key indented one step (two spaces) more than the position +# inside the opening parenthesis. +# +# Other hash literals shall have their first key indented one step more +# than the start of the line where the opening curly brace is. +# +# This default style is called 'special_inside_parentheses'. Alternative +# styles are 'consistent' and 'align_braces'. Here are examples: +# +# @example EnforcedStyle: special_inside_parentheses (default) +# # The `special_inside_parentheses` style enforces that the first key +# # in a hash literal where the opening brace and the first key are on +# # separate lines is indented one step (two spaces) more than the +# # position inside the opening parentheses. +# +# # bad +# hash = { +# key: :value +# } +# in_a_method_call({ +# foo: :bar +# }) +# takes_multi_pairs_hash(x: { +# a: 1, +# b: 2 +# }, +# y: { +# c: 1, +# d: 2 +# }) +# +# # good +# hash = { +# key: :value +# } +# in_a_method_call({ +# foo: :bar +# }) +# takes_multi_pairs_hash(x: { +# a: 1, +# b: 2 +# }, +# y: { +# c: 1, +# d: 2 +# }) +# +# @example EnforcedStyle: consistent +# # The `consistent` style enforces that the first key in a hash +# # literal where the opening brace and the first key are on +# # separate lines is indented the same as a hash literal which is not +# # defined inside a method call. +# +# # bad +# hash = { +# key: :value +# } +# in_a_method_call({ +# foo: :bar +# }) +# +# # good +# hash = { +# key: :value +# } +# in_a_method_call({ +# foo: :bar +# }) +# +# +# @example EnforcedStyle: align_braces +# # The `align_brackets` style enforces that the opening and closing +# # braces are indented to the same position. +# +# # bad +# and_now_for_something = { +# completely: :different +# } +# takes_multi_pairs_hash(x: { +# a: 1, +# b: 2 +# }, +# y: { +# c: 1, +# d: 2 +# }) +# +# # good +# and_now_for_something = { +# completely: :different +# } +# takes_multi_pairs_hash(x: { +# a: 1, +# b: 2 +# }, +# y: { +# c: 1, +# d: 2 +# }) +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_indentation.rb:112 +class RuboCop::Cop::Layout::FirstHashElementIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineElementIndentation + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_indentation.rb:132 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_indentation.rb:121 + def on_hash(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_indentation.rb:125 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_indentation.rb:136 + def autocorrect(corrector, node); end + + # Returns the description of what the correct indentation is based on. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_indentation.rb:198 + def base_description(indent_base_type); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_indentation.rb:146 + def brace_alignment_style; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_indentation.rb:150 + def check(hash_node, left_parenthesis); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_indentation.rb:189 + def check_based_on_longest_key(hash_node, left_brace, left_parenthesis); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_indentation.rb:169 + def check_right_brace(right_brace, first_pair, left_brace, left_parenthesis); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_indentation.rb:234 + def enforce_first_argument_with_fixed_indentation?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_indentation.rb:211 + def message(base_description); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_indentation.rb:219 + def message_for_right_brace(indent_base_type); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_indentation.rb:183 + def separator_style?(first_pair); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_indentation.rb:118 +RuboCop::Cop::Layout::FirstHashElementIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks for a line break before the first element in a +# multi-line hash. +# +# @example +# +# # bad +# { a: 1, +# b: 2} +# +# # good +# { +# a: 1, +# b: 2 } +# +# # good +# { +# a: 1, b: { +# c: 3 +# }} +# +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# { a: 1, b: { +# c: 3 +# }} +# +# @example AllowMultilineFinalElement: true +# +# # bad +# { a: 1, +# b: { +# c: 3 +# }} +# +# # good +# { a: 1, b: { +# c: 3 +# }} +# +# pkg:gem/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 + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_line_break.rb:52 + def on_hash(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_hash_element_line_break.rb:62 + def ignore_last_element?; end +end + +# pkg:gem/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 +# +# # 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", +# qux: "b", +# }) +# +# # good +# method( +# foo, bar, { +# baz: "a", +# qux: "b", +# }) +# +# @example AllowMultilineFinalElement: true +# +# # bad +# method(foo, +# bar, +# { +# baz: "a", +# qux: "b", +# } +# ) +# +# # good +# method(foo, bar, { +# baz: "a", +# qux: "b", +# }) +# +# # good +# method( +# foo, +# bar, +# { +# baz: "a", +# qux: "b", +# } +# ) +# +# @example AllowedMethods: ['some_method'] +# +# # good +# some_method(foo, bar, +# baz) +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/first_method_argument_line_break.rb:71 +class RuboCop::Cop::Layout::FirstMethodArgumentLineBreak < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FirstElementLineBreak + include ::RuboCop::Cop::AllowedMethods + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_method_argument_line_break.rb:100 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_method_argument_line_break.rb:84 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_method_argument_line_break.rb:101 + def on_super(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_method_argument_line_break.rb:105 + def ignore_last_element?; end + + class << self + # A line break inserted after `(` while `Style/MethodCallWithArgsParentheses` removes + # the parentheses in the same pass leaves the method name alone on its line. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_method_argument_line_break.rb:80 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/first_method_argument_line_break.rb:76 +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 +# +# # bad +# def method(foo, bar, +# baz) +# do_something +# end +# +# # good +# def method( +# foo, bar, +# baz) +# do_something +# end +# +# # ignored +# def method foo, +# bar +# do_something +# end +# +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# def method(foo, bar, baz = { +# :a => "b", +# }) +# do_something +# end +# +# # good +# def method( +# foo, bar, baz = { +# :a => "b", +# }) +# do_something +# end +# +# @example AllowMultilineFinalElement: true +# +# # good +# def method(foo, bar, baz = { +# :a => "b", +# }) +# do_something +# end +# +# pkg:gem/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 + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_method_parameter_line_break.rb:66 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_method_parameter_line_break.rb:69 + def on_defs(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_method_parameter_line_break.rb:73 + def ignore_last_element?; end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_method_parameter_line_break.rb:62 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/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 +# definition. Parameters after the first one are checked by +# `Layout/ParameterAlignment`, not by this cop. +# +# For indenting the first argument of method _calls_, check out +# `Layout/FirstArgumentIndentation`, which supports options related to +# nesting that are irrelevant for method _definitions_. +# +# @example +# +# # bad +# def some_method( +# first_param, +# second_param) +# 123 +# end +# +# @example EnforcedStyle: consistent (default) +# # The first parameter should always be indented one step more than the +# # preceding line. +# +# # good +# def some_method( +# first_param, +# second_param) +# 123 +# end +# +# @example EnforcedStyle: align_parentheses +# # The first parameter should always be indented one step more than the +# # opening parenthesis. +# +# # good +# def some_method( +# first_param, +# second_param) +# 123 +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:44 +class RuboCop::Cop::Layout::FirstParameterIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineElementIndentation + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:53 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:60 + def on_defs(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:69 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:64 + def autocorrect_incompatible_with_other_cops?(node); end + + # Returns the description of what the correct indentation is based on. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:89 + def base_description(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:73 + def brace_alignment_style; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:77 + def check(def_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:105 + def enforce_parameter_with_fixed_indentation?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:97 + def message(base_description); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/first_parameter_indentation.rb:50 +RuboCop::Cop::Layout::FirstParameterIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks that the keys, separators, and values of a multi-line hash +# literal are aligned according to configuration. The configuration +# options are: +# +# * key (left align keys, one space before hash rockets and values) +# * separator (align hash rockets and colons, right align keys) +# * table (left align keys, hash rockets, and values) +# +# The treatment of hashes passed as the last argument to a method call +# can also be configured. The options are: +# +# * always_inspect +# * always_ignore +# * ignore_implicit (without curly braces) +# +# Alternatively you can specify multiple allowed styles. That's done by +# passing a list of styles to EnforcedHashRocketStyle and EnforcedColonStyle. +# +# @example EnforcedHashRocketStyle: key (default) +# # bad +# { +# :foo => bar, +# :ba => baz +# } +# { +# :foo => bar, +# :ba => baz +# } +# +# # good +# { +# :foo => bar, +# :ba => baz +# } +# +# @example EnforcedHashRocketStyle: separator +# # bad +# { +# :foo => bar, +# :ba => baz +# } +# { +# :foo => bar, +# :ba => baz +# } +# +# # good +# { +# :foo => bar, +# :ba => baz +# } +# +# @example EnforcedHashRocketStyle: table +# # bad +# { +# :foo => bar, +# :ba => baz +# } +# +# # good +# { +# :foo => bar, +# :ba => baz +# } +# +# @example EnforcedColonStyle: key (default) +# # bad +# { +# foo: bar, +# ba: baz +# } +# { +# foo: bar, +# ba: baz +# } +# +# # good +# { +# foo: bar, +# ba: baz +# } +# +# @example EnforcedColonStyle: separator +# # bad +# { +# foo: bar, +# ba: baz +# } +# +# # good +# { +# foo: bar, +# ba: baz +# } +# +# @example EnforcedColonStyle: table +# # bad +# { +# foo: bar, +# ba: baz +# } +# +# # good +# { +# foo: bar, +# ba: baz +# } +# +# @example EnforcedLastArgumentHashStyle: always_inspect (default) +# # Inspect both implicit and explicit hashes. +# +# # bad +# do_something(foo: 1, +# bar: 2) +# +# # bad +# do_something({foo: 1, +# bar: 2}) +# +# # good +# do_something(foo: 1, +# bar: 2) +# +# # good +# do_something( +# foo: 1, +# bar: 2 +# ) +# +# # good +# do_something({foo: 1, +# bar: 2}) +# +# # good +# do_something({ +# foo: 1, +# bar: 2 +# }) +# +# @example EnforcedLastArgumentHashStyle: always_ignore +# # Ignore both implicit and explicit hashes. +# +# # good +# do_something(foo: 1, +# bar: 2) +# +# # good +# do_something({foo: 1, +# bar: 2}) +# +# @example EnforcedLastArgumentHashStyle: ignore_implicit +# # Ignore only implicit hashes. +# +# # bad +# do_something({foo: 1, +# bar: 2}) +# +# # good +# do_something(foo: 1, +# bar: 2) +# +# @example EnforcedLastArgumentHashStyle: ignore_explicit +# # Ignore only explicit hashes. +# +# # bad +# do_something(foo: 1, +# bar: 2) +# +# # good +# do_something({foo: 1, +# bar: 2}) +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:178 +class RuboCop::Cop::Layout::HashAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::HashAlignmentStyles + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:218 + def column_deltas; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:218 + def column_deltas=(_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:218 + def offenses_by; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:218 + def offenses_by=(_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:204 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:208 + def on_hash(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:195 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:205 + def on_super(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:206 + def on_yield(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:218 + def unalignable_styles; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:218 + def unalignable_styles=(_arg0); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:265 + def add_offenses; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:375 + def adjust(corrector, delta, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:311 + def alignment_for(pair); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:325 + def alignment_for_colons; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:321 + def alignment_for_hash_rockets; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:234 + def argument_before_hash(hash_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:222 + def autocorrect_incompatible_with_other_cops?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:285 + def check_delta(delta, node:, alignment:); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:246 + def check_pairs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:344 + def correct_key_value(corrector, delta, key, value, separator); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:329 + def correct_node(corrector, node, delta); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:388 + def enforce_first_argument_with_fixed_indentation?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:384 + def good_alignment?(column_deltas); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:302 + def ignore_hash_argument?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:298 + def key_out_of_line?(delta, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:357 + def new_alignment(key); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:275 + def register_offenses_with_format(offenses, format); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:240 + def reset!; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:393 + def same_line?(node1, node2); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:183 +RuboCop::Cop::Layout::HashAlignment::MESSAGES = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/hash_alignment.rb:193 +RuboCop::Cop::Layout::HashAlignment::SEPARATOR_ALIGNMENT_STYLES = T.let(T.unsafe(nil), Array) + +# Checks for the placement of the closing parenthesis +# in a method call that passes a HEREDOC string as an argument. +# It should be placed at the end of the line containing the +# opening HEREDOC tag. +# +# @example +# # bad +# +# foo(<<-SQL +# bar +# SQL +# ) +# +# foo(<<-SQL, 123, <<-NOSQL, +# bar +# SQL +# baz +# NOSQL +# ) +# +# foo( +# bar(<<-SQL +# baz +# SQL +# ), +# 123, +# ) +# +# # good +# +# foo(<<-SQL) +# bar +# SQL +# +# foo(<<-SQL, 123, <<-NOSQL) +# bar +# SQL +# baz +# NOSQL +# +# foo( +# bar(<<-SQL), +# baz +# SQL +# 123, +# ) +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:53 +class RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:78 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:64 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:187 + def add_correct_closing_paren(node, corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:274 + def add_correct_external_trailing_comma(node, corrector); end + + # Autocorrection note: + # + # Commas are a bit tricky to handle when the method call is + # embedded in another expression. Here's an example: + # + # [ + # first_array_value, + # foo(<<-SQL, 123, 456, + # SELECT * FROM db + # SQL + # ), + # third_array_value, + # ] + # + # The "internal" trailing comma is after `456`. + # The "external" trailing comma is after `)`. + # + # To autocorrect, we remove the latter, and move the former up: + # + # [ + # first_array_value, + # foo(<<-SQL, 123, 456), + # SELECT * FROM db + # SQL + # third_array_value, + # ] + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:108 + def autocorrect(corrector, node); end + + # Closing parenthesis helpers. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:165 + def end_keyword_before_closing_parenthesis?(parenthesized_send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:225 + def exist_argument_between_heredoc_end_and_closing_parentheses?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:292 + def external_trailing_comma?(node); end + + # Returns nil if no trailing external comma. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:297 + def external_trailing_comma_offset_from_loc_end(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:140 + def extract_heredoc(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:136 + def extract_heredoc_argument(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:233 + def find_most_bottom_of_heredoc_end(arguments); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:182 + def fix_closing_parenthesis(node, corrector); end + + # External trailing comma helpers. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:269 + def fix_external_trailing_comma(node, corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:152 + def heredoc_node?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:200 + def incorrect_parenthesis_removal_begin(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:216 + def incorrect_parenthesis_removal_end(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:247 + def internal_trailing_comma?(node); end + + # Returns nil if no trailing internal comma. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:252 + def internal_trailing_comma_offset_from_last_arg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:116 + def outermost_send_on_same_line(heredoc); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:191 + def remove_incorrect_closing_paren(node, corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:280 + def remove_incorrect_external_trailing_comma(node, corrector); end + + # Internal trailing comma helpers. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:241 + def remove_internal_trailing_comma(node, corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:210 + def safe_to_remove_line_containing_closing_paren?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:129 + def send_missing_closing_parens?(parent, child, heredoc); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:156 + def single_line_send_with_heredoc_receiver?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:308 + def space?(pos); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:171 + def subsequent_closing_parentheses_in_same_line?(outermost_send); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:60 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb:57 +RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis::MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of the here document bodies. The bodies +# are indented one step. +# +# 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. +# +# @example +# # bad +# <<-RUBY +# something +# RUBY +# +# # good +# <<~RUBY +# something +# RUBY +# +# @example AllCops:ActiveSupportExtensionsEnabled: false (default) +# # good +# <<-RUBY.squish +# something +# RUBY +# +# @example AllCops:ActiveSupportExtensionsEnabled: true +# # bad +# <<-RUBY.squish +# something +# RUBY +# +# # good +# <<~RUBY.squish +# something +# RUBY +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:41 +class RuboCop::Cop::Layout::HeredocIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::Heredoc + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:62 + def on_heredoc(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:58 + def on_new_investigation; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:54 + def squish_method?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:151 + def adjust_heredoc_squish(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:161 + def adjust_minus(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:156 + def adjust_squiggly(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:185 + def base_indent_level(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:196 + def heredoc_body(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:200 + def heredoc_end(node); end + + # Returns '~', '-' or nil + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:192 + def heredoc_indent_type(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:204 + def heredoc_squish?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:167 + def indented_body(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:174 + def indented_end(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:130 + def line_too_long?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:143 + def longest_line(lines); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:108 + def message(heredoc_indent_type); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:104 + def offending_heredoc_bodies; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:83 + def register_offense(node, heredoc_indent_type); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:118 + def type_message(indentation_width, current_indent_type); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:147 + def unlimited_heredoc_length?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:126 + def width_message(indentation_width); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:100 + def within_offending_heredoc?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:49 +RuboCop::Cop::Layout::HeredocIndentation::TYPE_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/heredoc_indentation.rb:51 +RuboCop::Cop::Layout::HeredocIndentation::WIDTH_MSG = T.let(T.unsafe(nil), String) + +# Checks for inconsistent indentation. +# +# The difference between `indented_internal_methods` and `normal` is +# that the `indented_internal_methods` style prescribes that in +# classes and modules the `protected` and `private` modifier keywords +# shall be indented the same as public methods and that protected and +# private members shall be indented one step more than the modifiers. +# Other than that, both styles mean that entities on the same logical +# depth shall have the same indentation. +# +# @example EnforcedStyle: normal (default) +# # bad +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# end +# +# # bad +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# +# protected +# +# def foo +# end +# +# private +# +# def bar +# end +# end +# +# # good +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# end +# +# # good +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# +# protected +# +# def foo +# end +# +# private +# +# def bar +# end +# end +# +# @example EnforcedStyle: indented_internal_methods +# # bad +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# end +# +# # bad +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# +# protected +# +# def foo +# end +# +# private +# +# def bar +# end +# end +# +# # good +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# end +# +# # good +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# +# protected +# +# def foo +# end +# +# private +# +# def bar +# end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_consistency.rb:121 +class RuboCop::Cop::Layout::IndentationConsistency < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_consistency.rb:128 + def on_begin(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_consistency.rb:132 + def on_kwbegin(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_consistency.rb:138 + def autocorrect(corrector, node); end + + # Not all nodes define `bare_access_modifier?` (for example, + # `RuboCop::AST::DefNode` does not), so we must check `send_type?` first + # to avoid a NoMethodError. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_consistency.rb:145 + def bare_access_modifier?(node); end + + # Returns an integer representing the correct indentation, or nil to + # indicate that the correct indentation is that of the first child that + # is not an access modifier. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_consistency.rb:152 + def base_column_for_normal_style(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_consistency.rb:172 + def check(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_consistency.rb:187 + def check_indented_internal_methods_style(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_consistency.rb:180 + def check_normal_style(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_consistency.rb:126 +RuboCop::Cop::Layout::IndentationConsistency::MSG = T.let(T.unsafe(nil), String) + +# Checks that the indentation method is consistent. +# Either tabs only or spaces only are used for indentation. +# +# With `EnforcedStyle: tabs`, spaces that follow the indenting tabs are +# taken to be alignment rather than indentation, and are left alone. +# +# @example EnforcedStyle: spaces (default) +# # bad +# # This example uses a tab to indent bar. +# def foo +# bar +# end +# +# # good +# # This example uses spaces to indent bar. +# def foo +# bar +# end +# +# @example EnforcedStyle: tabs +# # bad +# # This example uses spaces to indent bar. +# def foo +# bar +# end +# +# # good +# # This example uses a tab to indent bar. +# def foo +# bar +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_style.rb:37 +class RuboCop::Cop::Layout::IndentationStyle < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_style.rb:45 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_style.rb:61 + def autocorrect(corrector, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_style.rb:85 + def autocorrect_lambda_for_spaces(corrector, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_style.rb:80 + def autocorrect_lambda_for_tabs(corrector, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_style.rb:69 + def find_offense(line, lineno); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_style.rb:91 + def in_string_literal?(ranges, tabs_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_style.rb:112 + def message(_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_style.rb:95 + def string_literal_ranges(ast); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_style.rb:43 +RuboCop::Cop::Layout::IndentationStyle::MSG = T.let(T.unsafe(nil), String) + +# Checks for indentation that doesn't use the specified number of spaces. +# The indentation width can be configured using the `Width` setting. The default width is 2. +# The block body indentation for method chain blocks can be configured using the +# `EnforcedStyleAlignWith` setting. +# +# See also the `Layout/IndentationConsistency` cop which is the companion to this one. +# +# @example Width: 2 (default) +# # bad +# class A +# def test +# puts 'hello' +# end +# end +# +# # good +# class A +# def test +# puts 'hello' +# end +# end +# +# @example +# # bad +# value = ( +# foo - bar +# ) +# +# # good +# value = ( +# foo - bar +# ) +# +# @example AllowedPatterns: ['^\s*module'] +# # bad +# module A +# class B +# def test +# puts 'hello' +# end +# end +# end +# +# # good +# module A +# class B +# def test +# puts 'hello' +# end +# end +# end +# +# @example EnforcedStyleAlignWith: start_of_line (default) +# # good +# records.uniq { |el| el[:profile_id] } +# .map do |message| +# SomeJob.perform_later(message[:id]) +# end +# +# @example EnforcedStyleAlignWith: relative_to_receiver +# # good +# records.uniq { |el| el[:profile_id] } +# .map do |message| +# SomeJob.perform_later(message[:id]) +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:71 +class RuboCop::Cop::Layout::IndentationWidth < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::EndKeywordAlignment + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::CheckAssignment + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:84 + def access_modifier?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:109 + def on_begin(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:119 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:179 + def on_case(case_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:187 + def on_case_match(case_match); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:136 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:160 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:162 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:167 + def on_defs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:97 + def on_ensure(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:95 + def on_for(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:197 + def on_if(node, base = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:134 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:101 + def on_kwbegin(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:143 + def on_module(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:133 + def on_numblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:92 + def on_resbody(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:88 + def on_rescue(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:142 + def on_sclass(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:145 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:177 + def on_until(node, base = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:169 + def on_while(node, base = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:279 + def access_modifier_indentation_style; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:206 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:505 + def block_body_indentation_base(node, end_loc); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:287 + def check_assignment(node, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:307 + def check_if(node, body, else_clause, base_loc); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:320 + def check_indentation(base_loc, body_node, style = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:221 + def check_members(base, members); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:245 + def check_members_for_indented_internal_methods_style(members); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:251 + def check_members_for_normal_style(base, members); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:414 + def check_rescue?(rescue_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:470 + def column_offset_between(base_range, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:456 + def contains_access_modifier?(body_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:517 + def dot_on_new_line?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:259 + def each_member(members); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:283 + def indentation_consistency_style; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:462 + def indentation_style; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:397 + def indentation_to_check?(base_loc, body_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:271 + def indented_internal_methods_style?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:499 + def leftmost_modifier_of(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:481 + def line_indentation(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:486 + def line_uses_tabs?(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:354 + def message(configured_indentation_width, indentation, name); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:375 + def message_for_spaces(configured_indentation_width, indentation, name); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:362 + def message_for_tabs(configured_indentation_width, indentation, name); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:433 + def offending_range(body_node, indentation); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:330 + def offense(body_node, indentation, style); end + + # Returns a range at the first non-space column of the line the opening parenthesis is on, + # used as the base to indent the body from. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:216 + def opening_line_start(begin_loc); end + + # Returns true if the given node is within another node that has + # already been marked for autocorrection by this cop. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:387 + def other_offense_in_same_range?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:233 + def select_check_member(member); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:525 + def selector_on_new_line?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:418 + def skip_check?(base_loc, body_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:275 + def special_modifier?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:447 + def starts_with_access_modifier?(body_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:466 + def using_tabs?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:490 + def visual_column(range); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/indentation_width.rb:80 +RuboCop::Cop::Layout::IndentationWidth::MSG = T.let(T.unsafe(nil), String) + +# Checks for indentation of the first non-blank non-comment +# line in a file. +# +# @example +# # bad +# class A +# def foo; end +# end +# +# # good +# class A +# def foo; end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/initial_indentation.rb:20 +class RuboCop::Cop::Layout::InitialIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/initial_indentation.rb:26 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/initial_indentation.rb:36 + def first_token; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/initial_indentation.rb:40 + def space_before(token); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/initial_indentation.rb:24 +RuboCop::Cop::Layout::InitialIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks whether comments have a leading space after the +# `#` denoting the start of the comment. The leading space is not +# required for some RDoc special syntax, like `#++`, `#--`, +# `#:nodoc`, `=begin`- and `=end` comments, "shebang" directives, +# or rackup options. +# +# @example +# +# # bad +# #Some comment +# +# # good +# # Some comment +# +# @example AllowDoxygenCommentStyle: false (default) +# +# # bad +# +# #** +# # Some comment +# # Another line of comment +# #* +# +# @example AllowDoxygenCommentStyle: true +# +# # good +# +# #** +# # Some comment +# # Another line of comment +# #* +# +# @example AllowGemfileRubyComment: false (default) +# +# # bad +# +# #ruby=2.7.0 +# #ruby-gemset=myproject +# +# @example AllowGemfileRubyComment: true +# +# # good +# +# #ruby=2.7.0 +# #ruby-gemset=myproject +# +# @example AllowRBSInlineAnnotation: false (default) +# +# # bad +# +# include Enumerable #[Integer] +# +# attr_reader :name #: String +# attr_reader :age #: Integer? +# +# #: ( +# #| Integer, +# #| String +# #| ) -> void +# def foo; end +# +# @example AllowRBSInlineAnnotation: true +# +# # good +# +# include Enumerable #[Integer] +# +# attr_reader :name #: String +# attr_reader :age #: Integer? +# +# #: ( +# #| Integer, +# #| String +# #| ) -> void +# def foo; end +# +# @example AllowSteepAnnotation: false (default) +# +# # bad +# [1, 2, 3].each_with_object([]) do |n, list| #$ Array[Integer] +# list << n +# end +# +# name = 'John' #: String +# +# @example AllowSteepAnnotation: true +# +# # good +# +# [1, 2, 3].each_with_object([]) do |n, list| #$ Array[Integer] +# list << n +# end +# +# name = 'John' #: String +# +# @example AllowYARDCommentBlockSeparator: false (default) +# +# # bad +# +# # Copyright (c) Example Corp +# #- +# class Client +# end +# +# @example AllowYARDCommentBlockSeparator: true +# +# # good +# +# # Copyright (c) Example Corp +# #- +# class Client +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:119 +class RuboCop::Cop::Layout::LeadingCommentSpace < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:125 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:180 + def allow_doxygen_comment?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:188 + def allow_gemfile_ruby_comment?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:204 + def allow_rbs_inline_annotation?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:212 + def allow_steep_annotation?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:220 + def allow_yard_comment_block_separator?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:150 + def allowed_on_first_line?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:184 + def doxygen_comment_style?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:192 + def gemfile?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:200 + def gemfile_ruby_comment?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:146 + def hash_mark(expr); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:176 + def rackup_config_file?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:172 + def rackup_options?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:208 + def rbs_inline_annotation?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:196 + def ruby_comment_in_gemfile?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:154 + def shebang?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:158 + def shebang_continuation?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:216 + def steep_annotation?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:224 + def yard_comment_block_separator?(comment); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/leading_comment_space.rb:123 +RuboCop::Cop::Layout::LeadingCommentSpace::MSG = T.let(T.unsafe(nil), String) + +# Checks for unnecessary leading blank lines at the beginning +# of a file. +# +# @example +# +# # bad +# # (start of file) +# +# class Foo +# end +# +# # bad +# # (start of file) +# +# # a comment +# +# # good +# # (start of file) +# class Foo +# end +# +# # good +# # (start of file) +# # a comment +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/leading_empty_lines.rb:30 +class RuboCop::Cop::Layout::LeadingEmptyLines < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/leading_empty_lines.rb:35 + def on_new_investigation; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/leading_empty_lines.rb:33 +RuboCop::Cop::Layout::LeadingEmptyLines::MSG = T.let(T.unsafe(nil), String) + +# Checks that strings broken over multiple lines (by a backslash) contain +# trailing spaces instead of leading spaces (default) or leading spaces +# instead of trailing spaces. +# +# @example EnforcedStyle: trailing (default) +# # bad +# 'this text contains a lot of' \ +# ' spaces' +# +# # good +# 'this text contains a lot of ' \ +# 'spaces' +# +# # bad +# 'this text is too' \ +# ' long' +# +# # good +# 'this text is too ' \ +# 'long' +# +# @example EnforcedStyle: leading +# # bad +# 'this text contains a lot of ' \ +# 'spaces' +# +# # good +# 'this text contains a lot of' \ +# ' spaces' +# +# # bad +# 'this text is too ' \ +# 'long' +# +# # good +# 'this text is too' \ +# ' long' +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:43 +class RuboCop::Cop::Layout::LineContinuationLeadingSpace < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:63 + def on_dstr(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:122 + def autocorrect(corrector, offense_range, insert_pos, spaces); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:115 + def continuation?(line, line_num, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:147 + def enforced_style_leading?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:85 + def investigate(first_line, second_line, end_of_first_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:93 + def investigate_leading_style(first_line, second_line, end_of_first_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:104 + def investigate_trailing_style(first_line, second_line, end_of_first_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:127 + def leading_offense_range(end_of_first_line, matches); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:139 + def message(_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:81 + def raw_lines(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:133 + def trailing_offense_range(end_of_first_line, matches); end + + class << self + # When both cops are activated and run in the same iteration of the correction loop, + # `Style/StringLiterals` undoes the moving of spaces that + # `Layout/LineContinuationLeadingSpace` performs. This is because `Style/StringLiterals` + # takes the original string content and transforms it, rather than just modifying the + # delimiters, in order to handle escaping for quotes within the string. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:59 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:49 +RuboCop::Cop::Layout::LineContinuationLeadingSpace::LEADING_STYLE_OFFENSE = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:47 +RuboCop::Cop::Layout::LineContinuationLeadingSpace::LINE_1_ENDING = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:48 +RuboCop::Cop::Layout::LineContinuationLeadingSpace::LINE_2_BEGINNING = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_leading_space.rb:50 +RuboCop::Cop::Layout::LineContinuationLeadingSpace::TRAILING_STYLE_OFFENSE = T.let(T.unsafe(nil), Regexp) + +# Checks that the backslash of a line continuation is separated from +# preceding text by exactly one space (default) or zero spaces. +# +# @example EnforcedStyle: space (default) +# # bad +# 'a'\ +# 'b' \ +# 'c' +# +# # good +# 'a' \ +# 'b' \ +# 'c' +# +# @example EnforcedStyle: no_space +# # bad +# 'a' \ +# 'b' \ +# 'c' +# +# # good +# 'a'\ +# 'b'\ +# 'c' +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_spacing.rb:30 +class RuboCop::Cop::Layout::LineContinuationSpacing < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_spacing.rb:34 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_spacing.rb:81 + def autocorrect(corrector, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_spacing.rb:110 + def comment_ranges(comments); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_spacing.rb:65 + def find_offensive_spacing(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_spacing.rb:126 + def ignore_range?(backtick_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_spacing.rb:91 + def ignored_literal_ranges(ast); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_spacing.rb:136 + def ignored_parent?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_spacing.rb:130 + def ignored_ranges; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_spacing.rb:49 + def investigate(line, line_number); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_spacing.rb:120 + def last_line(processed_source); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_spacing.rb:73 + def message(_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_spacing.rb:142 + def no_space_style?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_spacing.rb:114 + def output_record_separator_ranges(ast); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_continuation_spacing.rb:146 + def space_style?; end +end + +# Checks the indentation of the next line after a line that ends with a string +# literal and a backslash. +# +# If `EnforcedStyle: aligned` is set, the concatenated string parts shall be aligned with the +# first part. There are some exceptions, such as implicit return values, where the +# concatenated string parts shall be indented regardless of `EnforcedStyle` configuration. +# +# If `EnforcedStyle: indented` is set, it's the second line that shall be indented one step +# more than the first line. Lines 3 and forward shall be aligned with line 2. +# +# @example +# # bad +# def some_method +# 'x' \ +# 'y' \ +# 'z' +# end +# +# my_hash = { +# first: 'a message' \ +# 'in two parts' +# } +# +# # good +# def some_method +# 'x' \ +# 'y' \ +# 'z' +# end +# +# @example EnforcedStyle: aligned (default) +# # bad +# puts 'x' \ +# 'y' +# +# my_hash = { +# first: 'a message' \ +# 'in two parts' +# } +# +# # good +# puts 'x' \ +# 'y' +# +# my_hash = { +# first: 'a message' \ +# 'in two parts' +# } +# +# @example EnforcedStyle: indented +# # bad +# result = 'x' \ +# 'y' +# +# my_hash = { +# first: 'a message' \ +# 'in two parts' +# } +# +# # good +# result = 'x' \ +# 'y' +# +# my_hash = { +# first: 'a message' \ +# 'in two parts' +# } +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb:74 +class RuboCop::Cop::Layout::LineEndStringConcatenationIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb:97 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb:83 + def on_dstr(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb:153 + def add_offense_and_correction(node, message); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb:109 + def always_indented?(dstr_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb:144 + def base_column(child); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb:113 + def check_aligned(children, start_index, target_column); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb:135 + def check_indented(children); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb:140 + def indented_column(children); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb:128 + def register_misaligned_run(run, column_delta); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb:124 + def same_column_runs(parts); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb:103 + def strings_concatenated_with_backslash?(dstr_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb:79 +RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::MSG_ALIGN = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb:80 +RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::MSG_INDENT = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb:81 +RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::PARENT_TYPES_FOR_INDENTED = T.let(T.unsafe(nil), Array) + +# Checks the length of lines in the source code. +# The maximum length is configurable. +# The tab size is configured in the `IndentationWidth` +# of the `Layout/IndentationStyle` cop. +# It also ignores a shebang line by default. +# +# This cop has some autocorrection capabilities. +# It can programmatically shorten certain long lines by +# inserting line breaks into expressions that can be safely +# split across lines. These include arrays, hashes, and +# method calls with argument lists. +# +# If autocorrection is enabled, the following cops +# are recommended to further format the broken lines. +# (Many of these are enabled by default.) +# +# * `Layout/ArgumentAlignment` +# * `Layout/ArrayAlignment` +# * `Layout/BlockAlignment` +# * `Layout/BlockEndNewline` +# * `Layout/ClosingParenthesisIndentation` +# * `Layout/FirstArgumentIndentation` +# * `Layout/FirstArrayElementIndentation` +# * `Layout/FirstHashElementIndentation` +# * `Layout/FirstParameterIndentation` +# * `Layout/HashAlignment` +# * `Layout/IndentationWidth` +# * `Layout/MultilineArrayLineBreaks` +# * `Layout/MultilineBlockLayout` +# * `Layout/MultilineHashBraceLayout` +# * `Layout/MultilineHashKeyLineBreaks` +# * `Layout/MultilineMethodArgumentLineBreaks` +# * `Layout/MultilineMethodParameterLineBreaks` +# * `Layout/ParameterAlignment` +# * `Style/BlockDelimiters` +# +# Together, these cops will pretty print hashes, arrays, +# method calls, etc. For example, let's say the max columns +# is 25: +# +# @example +# +# # bad +# {foo: "0000000000", bar: "0000000000", baz: "0000000000"} +# +# # good +# {foo: "0000000000", +# bar: "0000000000", baz: "0000000000"} +# +# # good (with recommended cops enabled) +# { +# foo: "0000000000", +# bar: "0000000000", +# baz: "0000000000", +# } +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:63 +class RuboCop::Cop::Layout::LineLength < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CheckLineBreakable + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp + include ::RuboCop::Cop::EndlessMethodRewriter + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:71 + def max=(value); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:108 + def on_array(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:91 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:111 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:113 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:120 + def on_defs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:101 + def on_dstr(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:109 + def on_hash(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:133 + def on_investigation_end; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:95 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:122 + def on_new_investigation; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:94 + def on_numblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:105 + def on_potential_breakable_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:110 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:97 + def on_str(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:458 + def allow_string_split?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:521 + def allowed_combination?(line, uri_range, qualified_name_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:454 + def allowed_heredoc; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:410 + def allowed_line?(line, line_index); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:277 + def breakable_block_range(block_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:533 + def breakable_dstr?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:352 + def breakable_dstr_begin_position(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:141 + def breakable_range; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:141 + def breakable_range=(_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:285 + def breakable_range_after_semicolon(semicolon_token); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:366 + def breakable_range_by_line_index; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:326 + def breakable_space_position(node, substr); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:268 + def breakable_string?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:374 + def breakable_string_delimiters; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:298 + def breakable_string_position(node); end + + # Locate where to break a string that is too long, ensuring that escape characters + # are not bisected. + # If the string contains spaces, use them to determine a place for a clean break; + # otherwise, the string will be broken at the line length limit. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:311 + def breakable_string_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:337 + def breakable_string_range_at_limit(source_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:488 + def check_directive_line(line, line_index); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:228 + def check_for_breakable_block(block_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:253 + def check_for_breakable_dstr(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:207 + def check_for_breakable_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:220 + def check_for_breakable_semicolons(processed_source); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:241 + def check_for_breakable_str(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:390 + def check_line(line, line_index); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:505 + def check_line_for_exemptions(line, line_index); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:195 + def correct_endless_method_block_to_multiline(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:185 + def correctable_endless_method_block?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:370 + def endless_methods_by_line; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:333 + def escape_sequence_start(text); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:438 + def excess_range(uri_range, line, line_index); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:462 + def extract_heredocs(ast); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:148 + def handle_endless_method_line(line, line_index); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:378 + def heredocs; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:382 + def highlight_start(line); end + + # Find the largest possible substring of a string node to retain before a break + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:549 + def largest_possible_string(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:472 + def line_in_permitted_heredoc?(line_number); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:449 + def max; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:452 + def max_line_length; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:360 + def opens_string?(begin_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:515 + def range_if_applicable(line, type); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:481 + def receiver_contains_heredoc?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:161 + def register_endless_method_offense(line, line_index); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:420 + def register_offense(loc, line, line_index, length: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:172 + def register_required_endless_method_offense(line, line_index); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:156 + def require_endless_methods?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:416 + def shebang?(line, line_index); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:346 + def string_content_length(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:538 + def string_delimiter(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:143 + def track_endless_method(node); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:87 + def autocorrect_incompatible_with; end + end +end + +# A trailing backslash, or a trailing unicode, hex, octal, meta or control escape whose +# payload may be incomplete. An even run of backslashes is complete on its own. +# Meta and control prefixes chain (`\M-\C-x`, `\c\M-x`), so a whole chain is one escape, +# and a braced unicode escape may hold several space-separated codepoints. +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:79 +RuboCop::Cop::Layout::LineLength::ESCAPE_SEQUENCE_TAIL = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:73 +RuboCop::Cop::Layout::LineLength::MSG = T.let(T.unsafe(nil), String) + +# Checks that the closing brace in an array literal is either +# on the same line as the last array element or on a new line. +# +# When using the `symmetrical` (default) style: +# +# If an array's opening brace is on the same line as the first element +# of the array, then the closing brace should be on the same line as +# the last element of the array. +# +# If an array's opening brace is on the line above the first element +# of the array, then the closing brace should be on the line below +# the last element of the array. +# +# When using the `new_line` style: +# +# The closing brace of a multi-line array literal must be on the line +# after the last element of the array. +# +# When using the `same_line` style: +# +# The closing brace of a multi-line array literal must be on the same +# line as the last element of the array. +# +# @example EnforcedStyle: symmetrical (default) +# # bad +# [ :a, +# :b +# ] +# +# # bad +# [ +# :a, +# :b ] +# +# # good +# [ :a, +# :b ] +# +# # good +# [ +# :a, +# :b +# ] +# +# @example EnforcedStyle: new_line +# # bad +# [ +# :a, +# :b ] +# +# # bad +# [ :a, +# :b ] +# +# # good +# [ :a, +# :b +# ] +# +# # good +# [ +# :a, +# :b +# ] +# +# @example EnforcedStyle: same_line +# # bad +# [ :a, +# :b +# ] +# +# # bad +# [ +# :a, +# :b +# ] +# +# # good +# [ +# :a, +# :b ] +# +# # good +# [ :a, +# :b ] +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_array_brace_layout.rb:91 +class RuboCop::Cop::Layout::MultilineArrayBraceLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineLiteralBraceLayout + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_array_brace_layout.rb:121 + def on_array(node); end + + class << self + # Moving the closing bracket after a hash literal or method call element while + # `Layout/MultilineHashBraceLayout` or `Layout/MultilineMethodCallBraceLayout` moves + # that element's closing brace in the same pass places the bracket after whatever + # follows the moved brace, such as a comment. + # Moving it while `Style/ConcatArrayLiterals` removes the brackets in the same pass + # leaves the bracket behind. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_array_brace_layout.rb:115 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_array_brace_layout.rb:103 +RuboCop::Cop::Layout::MultilineArrayBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_array_brace_layout.rb:106 +RuboCop::Cop::Layout::MultilineArrayBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_array_brace_layout.rb:99 +RuboCop::Cop::Layout::MultilineArrayBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_array_brace_layout.rb:95 +RuboCop::Cop::Layout::MultilineArrayBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# Ensures that each item in a multi-line array +# starts on a separate line. +# +# @example +# +# # bad +# [ +# a, b, +# c +# ] +# +# # good +# [ +# a, +# b, +# c +# ] +# +# # good +# [ +# a, +# b, +# foo( +# bar +# ) +# ] +# +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# [a, b, foo( +# bar +# )] +# +# @example AllowMultilineFinalElement: true +# +# # good +# [a, b, foo( +# bar +# )] +# +# pkg:gem/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 + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_array_line_breaks.rb:53 + def on_array(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_array_line_breaks.rb:59 + def ignore_last_element?; end +end + +# pkg:gem/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 +# after the assignment operator. +# +# @example EnforcedStyle: new_line (default) +# # bad +# foo = if expression +# 'bar' +# end +# +# # good +# foo = +# if expression +# 'bar' +# end +# +# # good +# foo = +# begin +# compute +# rescue => e +# nil +# end +# +# @example EnforcedStyle: same_line +# # good +# foo = if expression +# 'bar' +# end +# +# @example SupportedTypes: ['block', 'case', 'class', 'if', 'kwbegin', 'module'] (default) +# # good +# foo = +# if expression +# 'bar' +# end +# +# # good +# foo = +# [1].map do |i| +# i + 1 +# end +# +# @example SupportedTypes: ['block'] +# # good +# foo = if expression +# 'bar' +# end +# +# # good +# foo = +# [1].map do |i| +# 'bar' * i +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_assignment_layout.rb:60 +class RuboCop::Cop::Layout::MultilineAssignmentLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CheckAssignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_assignment_layout.rb:75 + def check_assignment(node, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_assignment_layout.rb:84 + def check_by_enforced_style(node, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_assignment_layout.rb:93 + def check_new_line_offense(node, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_assignment_layout.rb:101 + def check_same_line_offense(node, rhs); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_assignment_layout.rb:114 + def supported_types; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_assignment_layout.rb:72 +RuboCop::Cop::Layout::MultilineAssignmentLayout::BLOCK_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_assignment_layout.rb:66 +RuboCop::Cop::Layout::MultilineAssignmentLayout::NEW_LINE_OFFENSE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_assignment_layout.rb:69 +RuboCop::Cop::Layout::MultilineAssignmentLayout::SAME_LINE_OFFENSE = T.let(T.unsafe(nil), String) + +# Checks whether the multiline do end blocks have a newline +# after the start of the block. Additionally, it checks whether the block +# arguments, if any, are on the same line as the start of the +# block. Putting block arguments on separate lines, because the whole +# line would otherwise be too long, is accepted. +# +# @example +# # bad +# blah do |i| foo(i) +# bar(i) +# end +# +# # bad +# blah do +# |i| foo(i) +# bar(i) +# end +# +# # good +# blah do |i| +# foo(i) +# bar(i) +# end +# +# # bad +# blah { |i| foo(i) +# bar(i) +# } +# +# # good +# blah { |i| +# foo(i) +# bar(i) +# } +# +# # good +# blah { | +# long_list, +# of_parameters, +# that_would_not, +# fit_on_one_line +# | +# foo(i) +# bar(i) +# } +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:51 +class RuboCop::Cop::Layout::MultilineBlockLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:66 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:79 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:78 + def on_numblock(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:108 + def add_offense_for_expression(node, expr, msg); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:83 + def args_on_beginning_line?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:115 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:130 + def autocorrect_arguments(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:140 + def autocorrect_body(corrector, node, block_body); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:152 + def block_arg_string(node, args); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:100 + def characters_needed_for_space_and_pipes(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:164 + def include_trailing_comma?(args); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:87 + def line_break_necessary_in_args?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:93 + def needed_length_for_args(node); end + + class << self + # `Style/Lambda` moves the block arguments of `lambda` into `->(...)`, and + # `Style/ItBlockParameter` and `Style/HashEachMethods` remove some or all of them, + # in the same pass, while this cop moves them next to the block start. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:62 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:56 +RuboCop::Cop::Layout::MultilineBlockLayout::ARG_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:55 +RuboCop::Cop::Layout::MultilineBlockLayout::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_block_layout.rb:57 +RuboCop::Cop::Layout::MultilineBlockLayout::PIPE_SIZE = T.let(T.unsafe(nil), Integer) + +# Checks that the closing brace in a hash literal is either +# on the same line as the last hash element, or a new line. +# +# When using the `symmetrical` (default) style: +# +# If a hash's opening brace is on the same line as the first element +# of the hash, then the closing brace should be on the same line as +# the last element of the hash. +# +# If a hash's opening brace is on the line above the first element +# of the hash, then the closing brace should be on the line below +# the last element of the hash. +# +# When using the `new_line` style: +# +# The closing brace of a multi-line hash literal must be on the line +# after the last element of the hash. +# +# When using the `same_line` style: +# +# The closing brace of a multi-line hash literal must be on the same +# line as the last element of the hash. +# +# @example EnforcedStyle: symmetrical (default) +# +# # bad +# { a: 1, +# b: 2 +# } +# # bad +# { +# a: 1, +# b: 2 } +# +# # good +# { a: 1, +# b: 2 } +# +# # good +# { +# a: 1, +# b: 2 +# } +# +# @example EnforcedStyle: new_line +# # bad +# { +# a: 1, +# b: 2 } +# +# # bad +# { a: 1, +# b: 2 } +# +# # good +# { a: 1, +# b: 2 +# } +# +# # good +# { +# a: 1, +# b: 2 +# } +# +# @example EnforcedStyle: same_line +# # bad +# { a: 1, +# b: 2 +# } +# +# # bad +# { +# a: 1, +# b: 2 +# } +# +# # good +# { +# a: 1, +# b: 2 } +# +# # good +# { a: 1, +# b: 2 } +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_hash_brace_layout.rb:91 +class RuboCop::Cop::Layout::MultilineHashBraceLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineLiteralBraceLayout + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_hash_brace_layout.rb:116 + def on_hash(node); end + + class << self + # Moving the closing brace while `Style/HashAsLastArrayItem` or + # `Style/RedundantDoubleSplatHashBraces` removes the braces in the same pass leaves + # the brace behind. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_hash_brace_layout.rb:112 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_hash_brace_layout.rb:103 +RuboCop::Cop::Layout::MultilineHashBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_hash_brace_layout.rb:106 +RuboCop::Cop::Layout::MultilineHashBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_hash_brace_layout.rb:99 +RuboCop::Cop::Layout::MultilineHashBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_hash_brace_layout.rb:95 +RuboCop::Cop::Layout::MultilineHashBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# Ensures that each key in a multi-line hash +# starts on a separate line. +# +# @example +# +# # bad +# { +# a: 1, b: 2, +# c: 3 +# } +# +# # good +# { +# a: 1, +# b: 2, +# c: 3 +# } +# +# # good +# { +# a: 1, +# b: { +# c: 3, +# } +# } +# +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# { a: 1, b: { +# c: 3, +# }} +# +# @example AllowMultilineFinalElement: true +# +# # good +# { a: 1, b: { +# c: 3, +# }} +# +# pkg:gem/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 + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb:52 + def on_hash(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb:68 + def ignore_last_element?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb:64 + def starts_with_curly_brace?(node); end +end + +# pkg:gem/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 +# starts on a separate line. +# +# NOTE: This cop does not move the first argument, if you want that to +# be on a separate line, see `Layout/FirstMethodArgumentLineBreak`. +# +# @example +# +# # bad +# foo(a, b, +# c +# ) +# +# # bad +# foo(a, b, { +# foo: "bar", +# }) +# +# # good +# foo( +# a, +# b, +# c +# ) +# +# # good +# foo(a, b, c) +# +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# foo(a, b, +# c +# ) +# +# # bad +# foo( +# a, b, { +# foo: "bar", +# } +# ) +# +# # good +# foo( +# a, +# b, +# { +# foo: "bar", +# } +# ) +# +# @example AllowMultilineFinalElement: true +# +# # bad +# foo(a, b, +# c +# ) +# +# # good +# foo( +# a, b, { +# foo: "bar", +# } +# ) +# +# # good +# foo( +# a, +# b, +# { +# foo: "bar", +# } +# ) +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb:80 +class RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks < ::RuboCop::Cop::Base + include ::RuboCop::Cop::MultilineElementLineBreaks + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb:102 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb:86 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb:106 + def ignore_last_element?; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb:84 +RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks::MSG = T.let(T.unsafe(nil), String) + +# Checks that the closing brace in a method call is either +# on the same line as the last method argument, or a new line. +# +# When using the `symmetrical` (default) style: +# +# If a method call's opening brace is on the same line as the first +# argument of the call, then the closing brace should be on the same +# line as the last argument of the call. +# +# If a method call's opening brace is on the line above the first +# argument of the call, then the closing brace should be on the line +# below the last argument of the call. +# +# When using the `new_line` style: +# +# The closing brace of a multi-line method call must be on the line +# after the last argument of the call. +# +# When using the `same_line` style: +# +# The closing brace of a multi-line method call must be on the same +# line as the last argument of the call. +# +# @example EnforcedStyle: symmetrical (default) +# # bad +# foo(a, +# b +# ) +# +# # bad +# foo( +# a, +# b) +# +# # good +# foo(a, +# b) +# +# # good +# foo( +# a, +# b +# ) +# +# @example EnforcedStyle: new_line +# # bad +# foo( +# a, +# b) +# +# # bad +# foo(a, +# b) +# +# # good +# foo(a, +# b +# ) +# +# # good +# foo( +# a, +# b +# ) +# +# @example EnforcedStyle: same_line +# # bad +# foo(a, +# b +# ) +# +# # bad +# foo( +# a, +# b +# ) +# +# # good +# foo( +# a, +# b) +# +# # good +# foo(a, +# b) +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb:91 +class RuboCop::Cop::Layout::MultilineMethodCallBraceLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineLiteralBraceLayout + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb:118 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb:115 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb:122 + def children(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb:126 + def ignored_literal?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb:130 + def single_line_ignoring_receiver?(node); end + + class << self + # Moving the closing parenthesis and removing it under `omit_parentheses` in the same pass + # leaves the moved parenthesis behind. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb:111 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb:103 +RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb:106 +RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb:99 +RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb:95 +RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# Checks the indentation of the method name part in method calls +# that span more than one line. +# +# @example EnforcedStyle: aligned (default) +# # bad +# while myvariable +# .b +# # do something +# end +# +# # good +# while myvariable +# .b +# # do something +# end +# +# # good +# Thing.a +# .b +# .c +# +# @example EnforcedStyle: indented +# # good +# while myvariable +# .b +# +# # do something +# end +# +# @example EnforcedStyle: indented_relative_to_receiver +# # good +# while myvariable +# .a +# .b +# +# # do something +# end +# +# # good +# myvariable = Thing +# .a +# .b +# .c +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:50 +class RuboCop::Cop::Layout::MultilineMethodCallIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::MultilineExpressionIndentation + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:57 + def validate_config; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:210 + def after_multiline_block_base(first_call, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:299 + def align_with_base_message(rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:238 + def aligned_with_first_line_dot?(node, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:321 + def alignment_base(node, rhs, given_style); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:380 + def alignment_base_for_chained_receiver?(receiver_chain, base_receiver); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:102 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:303 + def base_source; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:261 + def calculate_column_delta_offense(rhs, correct_column); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:176 + def check_hash_pair_indentation(node, lhs, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:167 + def check_hash_pair_indented_style(rhs, pair_ancestor); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:248 + def check_regular_indentation(node, lhs, rhs, given_style); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:117 + def correct_block(corrector, block_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:111 + def correct_selector_only(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:266 + def extra_indentation(given_style, parent); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:69 + def find_base_receiver(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:425 + def find_continuation_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:226 + def find_enclosing_chain_call(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:368 + def find_hash_method_base_in_receiver_chain(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:186 + def find_hash_pair_alignment_base(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:419 + def find_multiline_block_chain_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:75 + def find_pair_ancestor(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:393 + def first_call_alignment_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:459 + def first_call_has_a_dot(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:194 + def first_dot_alignment_base(node, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:410 + def get_dot_right_above(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:449 + def handle_descendant_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:234 + def hash_arg_in_chain?(call, hash_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:159 + def hash_pair_aligned?(pair_ancestor, given_style); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:163 + def hash_pair_indented?(node, pair_ancestor, given_style); end + + # A block, `begin`, `if` or loop body is a separate set of statements, so + # a method chain in it is not the value of a hash pair the body is nested in. + # The send node of a block is still part of the value. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:91 + def inside_body?(ancestor, child); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:219 + def inside_multiline_chain_arg?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:439 + def leftmost_call_on_same_line(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:276 + def message(node, lhs, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:404 + def method_on_receiver_last_line?(node, base_receiver, type); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:307 + def no_base_message(lhs, rhs, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:139 + def offending_range(node, lhs, rhs, given_style); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:466 + def operation_rhs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:476 + def operator_rhs?(node, receiver); end + + # a + # .b + # .c + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:360 + def receiver_alignment_base(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:294 + def relative_to_receiver_message(rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:123 + def relevant_node?(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:127 + def right_hand_side(send_node); end + + # a.b + # .c + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:348 + def semantic_alignment_base(node, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:385 + def semantic_alignment_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:290 + def should_align_with_base?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:286 + def should_indent_relative_to_receiver?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:435 + def single_line_block_receiver?(receiver); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:155 + def skip_for_context?(node, pair_ancestor); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:330 + def syntactic_alignment_base(lhs, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:98 + def unwrap_block_node(node); end +end + +# Checks that the closing brace in a method definition is either +# on the same line as the last method parameter, or a new line. +# +# When using the `symmetrical` (default) style: +# +# If a method definition's opening brace is on the same line as the +# first parameter of the definition, then the closing brace should be +# on the same line as the last parameter of the definition. +# +# If a method definition's opening brace is on the line above the first +# parameter of the definition, then the closing brace should be on the +# line below the last parameter of the definition. +# +# When using the `new_line` style: +# +# The closing brace of a multi-line method definition must be on the line +# after the last parameter of the definition. +# +# When using the `same_line` style: +# +# The closing brace of a multi-line method definition must be on the same +# line as the last parameter of the definition. +# +# @example EnforcedStyle: symmetrical (default) +# # bad +# def foo(a, +# b +# ) +# end +# +# # bad +# def foo( +# a, +# b) +# end +# +# # good +# def foo(a, +# b) +# end +# +# # good +# def foo( +# a, +# b +# ) +# end +# +# @example EnforcedStyle: new_line +# # bad +# def foo( +# a, +# b) +# end +# +# # bad +# def foo(a, +# b) +# end +# +# # good +# def foo(a, +# b +# ) +# end +# +# # good +# def foo( +# a, +# b +# ) +# end +# +# @example EnforcedStyle: same_line +# # bad +# def foo(a, +# b +# ) +# end +# +# # bad +# def foo( +# a, +# b +# ) +# end +# +# # good +# def foo( +# a, +# b) +# end +# +# # good +# def foo(a, +# b) +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb:103 +class RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineLiteralBraceLayout + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb:125 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb:128 + def on_defs(node); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb:121 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb:115 +RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb:118 +RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb:111 +RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb:107 +RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# Ensures that each parameter in a multi-line method definition +# starts on a separate line. +# +# NOTE: This cop does not move the first argument, if you want that to +# be on a separate line, see `Layout/FirstMethodParameterLineBreak`. +# +# @example +# +# # bad +# def foo(a, b, +# c +# ) +# end +# +# # good +# def foo( +# a, +# b, +# c +# ) +# end +# +# # good +# def foo( +# a, +# b = { +# foo: "bar", +# } +# ) +# end +# +# # good +# def foo(a, b, c) +# end +# +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# def foo(a, b = { +# foo: "bar", +# }) +# end +# +# @example AllowMultilineFinalElement: true +# +# # good +# def foo(a, b = { +# foo: "bar", +# }) +# end +# +# pkg:gem/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 + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb:63 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb:68 + def on_defs(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb:72 + def ignore_last_element?; end +end + +# pkg:gem/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 +# span more than one line. +# +# The `aligned` style checks that operators are aligned if they are part of an `if` or `while` +# condition, an explicit `return` statement, etc. In other contexts, the second operand should +# be indented regardless of enforced style. +# +# In both styles, operators should be aligned when an assignment begins on the next line. +# +# @example EnforcedStyle: aligned (default) +# # bad +# if a + +# b +# something && +# something_else +# end +# +# # good +# if a + +# b +# something && +# something_else +# end +# +# @example EnforcedStyle: indented +# # bad +# if a + +# b +# something && +# something_else +# end +# +# # good +# if a + +# b +# something && +# something_else +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_operation_indentation.rb:45 +class RuboCop::Cop::Layout::MultilineOperationIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::MultilineExpressionIndentation + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_operation_indentation.rb:51 + def on_and(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_operation_indentation.rb:55 + def on_or(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_operation_indentation.rb:59 + def validate_config; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_operation_indentation.rb:70 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_operation_indentation.rb:80 + def check_and_or(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_operation_indentation.rb:113 + def message(node, lhs, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_operation_indentation.rb:85 + def offending_range(node, lhs, rhs, given_style); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_operation_indentation.rb:74 + def relevant_node?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_operation_indentation.rb:124 + def right_hand_side(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_operation_indentation.rb:98 + def should_align?(node, rhs, given_style); end +end + +# Checks that the parameters on a multi-line method call or definition are aligned. +# +# To set the alignment of the first argument, use the +# `Layout/FirstParameterIndentation` cop. +# +# @example EnforcedStyle: with_first_parameter (default) +# # good +# +# def foo(bar, +# baz) +# 123 +# end +# +# def foo( +# bar, +# baz +# ) +# 123 +# end +# +# # bad +# +# def foo(bar, +# baz) +# 123 +# end +# +# # bad +# +# def foo( +# bar, +# baz) +# 123 +# end +# +# @example EnforcedStyle: with_fixed_indentation +# # good +# +# def foo(bar, +# baz) +# 123 +# end +# +# def foo( +# bar, +# baz +# ) +# 123 +# end +# +# # bad +# +# def foo(bar, +# baz) +# 123 +# end +# +# # bad +# +# def foo( +# bar, +# baz) +# 123 +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/parameter_alignment.rb:70 +class RuboCop::Cop::Layout::ParameterAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/parameter_alignment.rb:80 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/parameter_alignment.rb:85 + def on_defs(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/parameter_alignment.rb:89 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/parameter_alignment.rb:101 + def base_column(node, args); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/parameter_alignment.rb:97 + def fixed_indentation?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/parameter_alignment.rb:93 + def message(_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/parameter_alignment.rb:112 + def target_method_lineno(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/parameter_alignment.rb:74 +RuboCop::Cop::Layout::ParameterAlignment::ALIGN_PARAMS_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/parameter_alignment.rb:77 +RuboCop::Cop::Layout::ParameterAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), String) + +# Checks whether certain expressions, e.g. method calls, that could fit +# completely on a single line, are broken up into multiple lines unnecessarily. +# +# @example +# # bad +# foo( +# a, +# b +# ) +# +# # good +# foo(a, b) +# +# # bad +# puts 'string that fits on ' \ +# 'a single line' +# +# # good +# puts 'string that fits on a single line' +# +# # bad +# things +# .select { |thing| thing.cond? } +# .join('-') +# +# # good +# things.select { |thing| thing.cond? }.join('-') +# +# @example InspectBlocks: false (default) +# # good +# foo(a) do |x| +# puts x +# end +# +# @example InspectBlocks: true +# # bad +# foo(a) do |x| +# puts x +# end +# +# # good +# foo(a) { |x| puts x } +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:49 +class RuboCop::Cop::Layout::RedundantLineBreak < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CheckAssignment + include ::RuboCop::Cop::CheckSingleLineSuitability + include ::RuboCop::Cop::ReparsedEquivalence + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:76 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:62 + def on_lvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:57 + def on_new_investigation; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:66 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:118 + def apply_reparse_correction(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:84 + def check_assignment(node, _rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:206 + def configured_to_not_be_inspected?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:225 + def convertible_block?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:80 + def end_with_percent_blank_string?(processed_source); end + + # Joining lines merges split string literals (`"a" \ "b"` into + # `"ab"`) and turns mixed-quote pairs into `+` concatenation, which + # changes the tree but not the resulting string. Normalize all string + # concatenation to a canonical form before comparing: nested + # concatenations are flattened and adjacent literal parts merged. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:139 + def fold_string_concatenation(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:200 + def index_access_call_chained?(node); end + + # Offenses registered in the same pass that share a line with `node` + # get joined onto that line too, so the combined line has to fit. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:109 + def joined_line_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:175 + def merge_plain_strings(chunk); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:166 + def merge_string_parts(parts); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:130 + def normalize_reparsed_ast(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:189 + def offense?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:213 + def other_cop_takes_precedence?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:185 + def plain_string?(node); end + + # Joining lines shifts the value of any later `__LINE__`, exactly as + # any other line-removing correction does; neutralize it on both sides + # with an identifier, which stays valid in every position the keyword + # can appear in. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:126 + def preprocess_reparsed_source(source); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:90 + def register_offense(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:196 + def require_backslash?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:221 + def single_line_block_chain_enabled?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:156 + def string_concatenation_parts(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:181 + def stringish?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/redundant_line_break.rb:55 +RuboCop::Cop::Layout::RedundantLineBreak::MSG = T.let(T.unsafe(nil), String) + +# Checks whether the rescue and ensure keywords are aligned +# properly. +# +# @example +# +# # bad +# begin +# something +# rescue +# puts 'error' +# end +# +# # good +# begin +# something +# rescue +# puts 'error' +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:24 +class RuboCop::Cop::Layout::RescueEnsureAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::EndKeywordAlignment + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:40 + def on_ensure(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:44 + def on_new_investigation; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:36 + def on_resbody(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:199 + def access_modifier?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:177 + def access_modifier_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:163 + def aligned_with_leading_dot?(do_keyword_line, send_node_loc, rescue_keyword_column); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:150 + def aligned_with_line_break_method?(ancestor_node, node); end + + # A run of spaces sized to the target column would be turned back into tabs by + # `Layout/IndentationStyle`, generally landing on a different column, so under + # tabs the target line's own indentation is reused. There is nothing to reuse + # when the target does not start its line. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:100 + def alignment_indentation(location); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:208 + def alignment_location(alignment_node); end + + # We will use ancestor or wrapper with access modifier. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:130 + def alignment_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:108 + def alignment_source(node, starting_loc); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:146 + def ancestor_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:169 + def assignment_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:73 + def autocorrect(corrector, node, alignment_location); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:224 + def begin_end_alignment_style; end + + # Check alignment of node with rescue or ensure modifiers. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:57 + def check(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:84 + def format_message(alignment_node, alignment_loc, kw_loc); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:186 + def modifier?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:192 + def whitespace_range(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:34 +RuboCop::Cop::Layout::RescueEnsureAlignment::ALTERNATIVE_ACCESS_MODIFIERS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:33 +RuboCop::Cop::Layout::RescueEnsureAlignment::ANCESTOR_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/rescue_ensure_alignment.rb:30 +RuboCop::Cop::Layout::RescueEnsureAlignment::MSG = T.let(T.unsafe(nil), String) + +# Checks if method calls are chained onto single line blocks. It considers that a +# line break before the dot improves the readability of the code. +# +# @example +# # bad +# example.select { |item| item.cond? }.join('-') +# +# # good +# example.select { |item| item.cond? } +# .join('-') +# +# # good (not a concern for this cop) +# example.select do |item| +# item.cond? +# end.join('-') +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/single_line_block_chain.rb:22 +class RuboCop::Cop::Layout::SingleLineBlockChain < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/single_line_block_chain.rb:40 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/single_line_block_chain.rb:34 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/single_line_block_chain.rb:60 + def call_method_after_block?(node, dot_range, closing_block_delimiter_line_num); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/single_line_block_chain.rb:71 + def heredoc_opened_before?(receiver, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/single_line_block_chain.rb:44 + def offending_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/single_line_block_chain.rb:66 + def selector_range(node); end + + class << self + # `Style/FloatDivision` and `Style/NilComparison` rewrite a method chained to the block + # in the same pass, which must not start a line of its own. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/single_line_block_chain.rb:30 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/single_line_block_chain.rb:26 +RuboCop::Cop::Layout::SingleLineBlockChain::MSG = T.let(T.unsafe(nil), String) + +# Checks for colon (`:`) not followed by some kind of space. +# N.B. this cop does not handle spaces after a ternary operator, which are +# instead handled by `Layout/SpaceAroundOperators`. +# +# @example +# # bad +# def f(a:, b:2); {a:3}; end +# +# # good +# def f(a:, b: 2); {a: 3}; end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_colon.rb:16 +class RuboCop::Cop::Layout::SpaceAfterColon < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_colon.rb:29 + def on_kwoptarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_colon.rb:21 + def on_pair(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_colon.rb:43 + def followed_by_space?(colon); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_colon.rb:39 + def register_offense(colon); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_colon.rb:19 +RuboCop::Cop::Layout::SpaceAfterColon::MSG = T.let(T.unsafe(nil), String) + +# Checks for comma (`,`) not followed by some kind of space. +# +# @example +# +# # bad +# [1,2] +# { foo:bar,} +# +# # good +# [1, 2] +# { foo:bar, } +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_comma.rb:17 +class RuboCop::Cop::Layout::SpaceAfterComma < ::RuboCop::Cop::Base + include ::RuboCop::Cop::SpaceAfterPunctuation + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_comma.rb:26 + def kind(token, next_token); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_comma.rb:21 + def space_style_before_rcurly; end +end + +# Checks for space between a method name and a left parenthesis in defs. +# +# @example +# +# # bad +# def func (x) end +# def method= (y) end +# +# # good +# def func(x) end +# def method=(y) end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_method_name.rb:17 +class RuboCop::Cop::Layout::SpaceAfterMethodName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_method_name.rb:23 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_method_name.rb:35 + def on_defs(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_method_name.rb:21 +RuboCop::Cop::Layout::SpaceAfterMethodName::MSG = T.let(T.unsafe(nil), String) + +# Checks for space after `!`. +# +# @example +# # bad +# ! something +# +# # good +# !something +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_not.rb:14 +class RuboCop::Cop::Layout::SpaceAfterNot < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_not.rb:21 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_not.rb:38 + def unary_tilde?(receiver); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_not.rb:34 + def whitespace_after_operator?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_not.rb:18 +RuboCop::Cop::Layout::SpaceAfterNot::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_not.rb:19 +RuboCop::Cop::Layout::SpaceAfterNot::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for semicolon (`;`) not followed by some kind of space. +# +# @example +# # bad +# x = 1;y = 2 +# +# # good +# x = 1; y = 2 +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_semicolon.rb:14 +class RuboCop::Cop::Layout::SpaceAfterSemicolon < ::RuboCop::Cop::Base + include ::RuboCop::Cop::SpaceAfterPunctuation + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_semicolon.rb:23 + def kind(token, _next_token); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_semicolon.rb:27 + def space_missing?(token1, token2); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_semicolon.rb:18 + def space_style_before_rcurly; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_after_semicolon.rb:33 + def semicolon_sequence?(token, next_token); end +end + +# Checks the spacing inside and after block parameters pipes. Line breaks +# inside parameter pipes are checked by `Layout/MultilineBlockLayout` and +# not by this cop. Spaces inside a lambda's parameter parentheses are left +# to `Layout/SpaceInsideParens` when that cop is enabled, so the examples +# below apply to a lambda only when it is not. +# +# @example EnforcedStyleInsidePipes: no_space (default) +# # bad +# {}.each { | x, y |puts x } +# ->( x, y ) { puts x } +# +# # good +# {}.each { |x, y| puts x } +# ->(x, y) { puts x } +# +# @example EnforcedStyleInsidePipes: space +# # bad +# {}.each { |x, y| puts x } +# ->(x, y) { puts x } +# +# # good +# {}.each { | x, y | puts x } +# ->( x, y ) { puts x } +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:29 +class RuboCop::Cop::Layout::SpaceAroundBlockParameters < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:34 + def on_block(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:71 + def check_after_closing_pipe(arguments); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:131 + def check_arg(arg); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:109 + def check_closing_pipe_space(arguments, closing_pipe); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:127 + def check_each_arg(args); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:62 + def check_inside_pipes(arguments); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:156 + def check_no_space(space_begin_pos, space_end_pos, msg); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:79 + def check_no_space_style_inside_pipes(arguments); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:98 + def check_opening_pipe_space(arguments, opening_pipe); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:142 + def check_space(space_begin_pos, space_end_pos, range, msg, node = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:91 + def check_space_style_inside_pipes(arguments); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:58 + def checked_by_space_inside_parens?(arguments); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:119 + def last_end_pos_inside_pipes(arguments, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:46 + def pipes(arguments); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:50 + def pipes?(arguments); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_block_parameters.rb:54 + def style_parameter_name; end +end + +# Checks that the equals signs in parameter default assignments +# have or don't have surrounding space depending on configuration. +# +# @example EnforcedStyle: space (default) +# # bad +# def some_method(arg1=:default, arg2=nil, arg3=[]) +# # do something... +# end +# +# # good +# def some_method(arg1 = :default, arg2 = nil, arg3 = []) +# # do something... +# end +# +# @example EnforcedStyle: no_space +# # bad +# def some_method(arg1 = :default, arg2 = nil, arg3 = []) +# # do something... +# end +# +# # good +# def some_method(arg1=:default, arg2=nil, arg3=[]) +# # do something... +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb:30 +class RuboCop::Cop::Layout::SpaceAroundEqualsInParameterDefault < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb:38 + def on_optarg(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb:67 + def autocorrect(corrector, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb:46 + def check_optarg(arg, equals, value); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb:58 + def incorrect_style_detected(arg, value); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb:83 + def message(_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb:79 + def no_surrounding_space?(arg, equals); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb:75 + def space_on_both_sides?(arg, equals); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb:36 +RuboCop::Cop::Layout::SpaceAroundEqualsInParameterDefault::MSG = T.let(T.unsafe(nil), String) + +# Checks the spacing around the keywords. +# +# @example +# +# # bad +# something 'test'do|x| +# end +# +# while(something) +# end +# +# something = 123if test +# +# return(foo + bar) +# +# # good +# something 'test' do |x| +# end +# +# while (something) +# end +# +# something = 123 if test +# +# return (foo + bar) +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:32 +class RuboCop::Cop::Layout::SpaceAroundKeyword < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:46 + def on_and(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:50 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:56 + def on_break(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:60 + def on_case(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:64 + def on_case_match(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:164 + def on_defined?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:68 + def on_ensure(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:72 + def on_for(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:76 + def on_if(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:80 + def on_if_guard(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:84 + def on_in_pattern(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:54 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:88 + def on_kwbegin(node); end + + # Handle one-line pattern matching syntax (`in`) with `Parser::Ruby27`. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:93 + def on_match_pattern(node); end + + # Handle one-line pattern matching syntax (`in`) with `Parser::Ruby30`. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:100 + def on_match_pattern_p(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:104 + def on_next(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:53 + def on_numblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:108 + def on_or(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:112 + def on_postexe(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:116 + def on_preexe(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:120 + def on_resbody(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:124 + def on_rescue(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:128 + def on_return(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:132 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:136 + def on_super(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:144 + def on_unless_guard(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:148 + def on_until(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:152 + def on_when(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:156 + def on_while(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:160 + def on_yield(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:140 + def on_zsuper(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:253 + def accept_left_parenthesis?(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:257 + def accept_left_square_bracket?(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:261 + def accept_namespace_operator?(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:246 + def accepted_opening_delimiter?(range, char); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:237 + def block_brace_with_no_space_style?(node, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:170 + def check(node, locations, begin_keyword = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:185 + def check_begin(node, range, begin_keyword); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:191 + def check_end(node, range, begin_keyword); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:204 + def check_keyword(node, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:200 + def do?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:269 + def namespace_operator?(range, pos); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:273 + def preceded_by_operator?(node, _range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:265 + def safe_navigation_call?(range, pos); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:226 + def space_after_missing?(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:219 + def space_before_missing?(range); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:41 +RuboCop::Cop::Layout::SpaceAroundKeyword::ACCEPT_LEFT_PAREN = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:42 +RuboCop::Cop::Layout::SpaceAroundKeyword::ACCEPT_LEFT_SQUARE_BRACKET = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:43 +RuboCop::Cop::Layout::SpaceAroundKeyword::ACCEPT_NAMESPACE_OPERATOR = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:38 +RuboCop::Cop::Layout::SpaceAroundKeyword::DO = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:36 +RuboCop::Cop::Layout::SpaceAroundKeyword::MSG_AFTER = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:35 +RuboCop::Cop::Layout::SpaceAroundKeyword::MSG_BEFORE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:40 +RuboCop::Cop::Layout::SpaceAroundKeyword::NAMESPACE_OPERATOR = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:44 +RuboCop::Cop::Layout::SpaceAroundKeyword::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:39 +RuboCop::Cop::Layout::SpaceAroundKeyword::SAFE_NAVIGATION = T.let(T.unsafe(nil), String) + +# Checks method call operators to not have spaces around them. +# +# @example +# # bad +# foo. bar +# foo .bar +# foo . bar +# foo. bar .buzz +# foo +# . bar +# . buzz +# foo&. bar +# foo &.bar +# foo &. bar +# foo &. bar&. buzz +# RuboCop:: Cop +# RuboCop:: Cop:: Base +# :: RuboCop::Cop +# +# # good +# foo.bar +# foo.bar.buzz +# foo +# .bar +# .buzz +# foo&.bar +# foo&.bar&.buzz +# RuboCop::Cop +# RuboCop::Cop::Base +# ::RuboCop::Cop +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_method_call_operator.rb:37 +class RuboCop::Cop::Layout::SpaceAroundMethodCallOperator < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_method_call_operator.rb:53 + def on_const(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_method_call_operator.rb:51 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_method_call_operator.rb:45 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_method_call_operator.rb:87 + def check_space(begin_pos, end_pos); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_method_call_operator.rb:67 + def check_space_after_dot(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_method_call_operator.rb:81 + def check_space_after_double_colon(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_method_call_operator.rb:61 + def check_space_before_dot(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_method_call_operator.rb:43 +RuboCop::Cop::Layout::SpaceAroundMethodCallOperator::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_method_call_operator.rb:41 +RuboCop::Cop::Layout::SpaceAroundMethodCallOperator::SPACES_REGEXP = T.let(T.unsafe(nil), Regexp) + +# Checks that operators have space around them, except for ** which +# should or shouldn't have surrounding space depending on configuration. +# It allows vertical alignment consisting of one or more whitespace +# around operators. +# +# This cop has `AllowForAlignment` option. When `true`, allows most +# uses of extra spacing if the intent is to align with an operator on +# the previous or next line, not counting empty lines or comment lines. +# +# @example +# # bad +# total = 3*4 +# "apple"+"juice" +# my_number = 38/4 +# +# # good +# total = 3 * 4 +# "apple" + "juice" +# my_number = 38 / 4 +# +# @example AllowForAlignment: true (default) +# # good +# { +# 1 => 2, +# 11 => 3 +# } +# +# @example AllowForAlignment: false +# # bad +# { +# 1 => 2, +# 11 => 3 +# } +# +# @example EnforcedStyleForExponentOperator: no_space (default) +# # bad +# a ** b +# +# # good +# a**b +# +# @example EnforcedStyleForExponentOperator: space +# # bad +# a**b +# +# # good +# a ** b +# +# @example EnforcedStyleForRationalLiterals: no_space (default) +# # bad +# 1 / 48r +# +# # good +# 1/48r +# +# @example EnforcedStyleForRationalLiterals: space +# # bad +# 1/48r +# +# # good +# 1 / 48r +# +# pkg:gem/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 + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:169 + def on_and(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:177 + def on_and_asgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:115 + def on_assignment(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:138 + def on_binary(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:171 + def on_casgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:124 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:174 + def on_cvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:132 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:179 + def on_defs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:175 + def on_gvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:92 + def on_if(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:173 + def on_ivasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:170 + def on_lvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:172 + def on_masgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:160 + def on_match_alt(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:164 + def on_match_as(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:154 + def on_match_pattern(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:178 + def on_op_asgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:168 + def on_or(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:176 + def on_or_asgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:84 + def on_pair(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:99 + def on_resbody(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:80 + def on_sclass(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:105 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:146 + def on_setter_method(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:281 + def align_hash_cop_config; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:212 + def autocorrect(corrector, range, right_operand); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:193 + def check_operator(type, operator, right_operand); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:230 + def enclose_operator_with_space(corrector, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:257 + def excess_leading_space?(type, operator, with_space); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:276 + def excess_trailing_space?(right_operand, with_space); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:302 + def force_equal_sign_alignment?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:272 + def grouped_alignment_type?(type); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:285 + def hash_table_style?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:207 + def offense(type, operator, with_space, right_operand); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:243 + def offense_message(type, operator, with_space, right_operand); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:189 + def operator_with_regular_syntax?(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:183 + def regular_operator?(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:306 + def should_not_have_surrounding_space?(operator, right_operand); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:292 + def space_around_exponent_operator?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:296 + def space_around_slash_operator?(right_operand); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:76 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_operators.rb:74 +RuboCop::Cop::Layout::SpaceAroundOperators::EXCESSIVE_SPACE = T.let(T.unsafe(nil), String) + +# pkg:gem/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 +# brace depending on configuration. +# +# @example EnforcedStyle: space (default) +# # bad +# foo.map{ |a| +# a.bar.to_s +# } +# +# # good +# foo.map { |a| +# a.bar.to_s +# } +# +# @example EnforcedStyle: no_space +# # bad +# foo.map { |a| +# a.bar.to_s +# } +# +# # good +# foo.map{ |a| +# a.bar.to_s +# } +# +# @example EnforcedStyleForEmptyBraces: space (default) +# # bad +# 7.times{} +# +# # good +# 7.times {} +# +# @example EnforcedStyleForEmptyBraces: no_space +# # bad +# 7.times {} +# +# # good +# 7.times{} +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:44 +class RuboCop::Cop::Layout::SpaceBeforeBlockBraces < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:59 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:83 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:82 + def on_numblock(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:137 + def autocorrect(corrector, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:157 + def block_delimiters_style; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:87 + def check_empty(left_brace, space_plus_brace, used_style); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:113 + def check_non_empty(left_brace, space_plus_brace, used_style); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:153 + def conflict_with_block_delimiters?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:161 + def empty_braces?(loc); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:105 + def handle_different_styles_for_empty_braces(used_style); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:128 + def space_detected(left_brace, space_plus_brace); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:121 + def space_missing(left_brace); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:144 + def style_for_empty_braces; end + + class << self + # `Style/BlockDelimiters` decides whether to put a space before the `do` + # it writes by looking at the source before this cop removed the space, + # so the two corrections cannot be applied in the same pass. + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:55 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:50 +RuboCop::Cop::Layout::SpaceBeforeBlockBraces::DETECTED_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_block_braces.rb:49 +RuboCop::Cop::Layout::SpaceBeforeBlockBraces::MISSING_MSG = T.let(T.unsafe(nil), String) + +# Checks for space between the name of a receiver and a left +# bracket. +# +# @example +# +# # bad +# collection [index_or_key] +# +# # good +# collection[index_or_key] +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_brackets.rb:17 +class RuboCop::Cop::Layout::SpaceBeforeBrackets < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_brackets.rb:24 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_brackets.rb:21 +RuboCop::Cop::Layout::SpaceBeforeBrackets::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_brackets.rb:22 +RuboCop::Cop::Layout::SpaceBeforeBrackets::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for comma (`,`) preceded by space. +# +# @example +# # bad +# [1 , 2 , 3] +# a(1 , 2) +# each { |a , b| } +# +# # good +# [1, 2, 3] +# a(1, 2) +# each { |a, b| } +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_comma.rb:19 +class RuboCop::Cop::Layout::SpaceBeforeComma < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SpaceBeforePunctuation + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_comma.rb:23 + def kind(token); end +end + +# Checks for missing space between a token and a comment on the +# same line. +# +# @example +# # bad +# 1 + 1# this operation does ... +# +# # good +# 1 + 1 # this operation does ... +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_comment.rb:15 +class RuboCop::Cop::Layout::SpaceBeforeComment < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_comment.rb:20 + def on_new_investigation; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_comment.rb:18 +RuboCop::Cop::Layout::SpaceBeforeComment::MSG = T.let(T.unsafe(nil), String) + +# Checks that exactly one space is used between a method name and the +# first argument for method calls without parentheses. +# +# Alternatively, extra spaces can be added to align the argument with +# something on a preceding or following line, if the AllowForAlignment +# config parameter is true. +# +# @example +# # bad +# something x +# something y, z +# something'hello' +# +# # good +# something x +# something y, z +# something 'hello' +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_first_arg.rb:24 +class RuboCop::Cop::Layout::SpaceBeforeFirstArg < ::RuboCop::Cop::Base + include ::RuboCop::Cop::PrecedingFollowingAlignment + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_first_arg.rb:47 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_first_arg.rb:35 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_first_arg.rb:55 + def expect_params_after_method_name?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_first_arg.rb:64 + def no_space_between_method_name_and_first_argument?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_first_arg.rb:51 + def regular_method_call_with_arguments?(node); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_first_arg.rb:31 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_first_arg.rb:29 +RuboCop::Cop::Layout::SpaceBeforeFirstArg::MSG = T.let(T.unsafe(nil), String) + +# Checks for semicolon (`;`) preceded by space. +# +# @example +# # bad +# x = 1 ; y = 2 +# +# # good +# x = 1; y = 2 +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_semicolon.rb:14 +class RuboCop::Cop::Layout::SpaceBeforeSemicolon < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SpaceBeforePunctuation + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_before_semicolon.rb:18 + def kind(token); end +end + +# Checks for spaces between `->` and opening parameter +# parenthesis (`(`) in lambda literals. +# +# @example EnforcedStyle: require_no_space (default) +# # bad +# a = -> (x, y) { x + y } +# +# # good +# a = ->(x, y) { x + y } +# +# @example EnforcedStyle: require_space +# # bad +# a = ->(x, y) { x + y } +# +# # good +# a = -> (x, y) { x + y } +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:22 +class RuboCop::Cop::Layout::SpaceInLambdaLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:31 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:51 + def arrow_lambda_with_args?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:73 + def lambda_arguments(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:66 + def range_of_offense(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:59 + def space_after_arrow(lambda_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:55 + def space_after_arrow?(lambda_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:28 +RuboCop::Cop::Layout::SpaceInLambdaLiteral::MSG_REQUIRE_NO_SPACE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:27 +RuboCop::Cop::Layout::SpaceInLambdaLiteral::MSG_REQUIRE_SPACE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:29 +RuboCop::Cop::Layout::SpaceInLambdaLiteral::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks that brackets used for array literals have or don't have +# surrounding space depending on configuration. +# +# Array pattern matching is handled in the same way. +# +# @example EnforcedStyle: no_space (default) +# # The `no_space` style enforces that array literals have +# # no surrounding space. +# +# # bad +# array = [ a, b, c, d ] +# array = [ a, [ b, c ]] +# +# # good +# array = [a, b, c, d] +# array = [a, [b, c]] +# +# @example EnforcedStyle: space +# # The `space` style enforces that array literals have +# # surrounding space. +# +# # bad +# array = [a, b, c, d] +# array = [ a, [ b, c ]] +# +# # good +# array = [ a, b, c, d ] +# array = [ a, [ b, c ] ] +# +# @example EnforcedStyle: compact +# # The `compact` style normally requires a space inside +# # array brackets, with the exception that successive left +# # or right brackets are collapsed together in nested arrays. +# +# # bad +# array = [a, b, c, d] +# array = [ a, [ b, c ] ] +# array = [ +# [ a ], +# [ b, c ] +# ] +# +# # good +# array = [ a, b, c, d ] +# array = [ a, [ b, c ]] +# array = [[ a ], +# [ b, c ]] +# +# @example EnforcedStyleForEmptyBrackets: no_space (default) +# # The `no_space` EnforcedStyleForEmptyBrackets style enforces that +# # empty array brackets do not contain spaces. +# +# # bad +# foo = [ ] +# bar = [ ] +# +# # good +# foo = [] +# bar = [] +# +# @example EnforcedStyleForEmptyBrackets: space +# # The `space` EnforcedStyleForEmptyBrackets style enforces that +# # empty array brackets contain exactly one space. +# +# # bad +# foo = [] +# bar = [ ] +# +# # good +# foo = [ ] +# bar = [ ] +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:78 +class RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:86 + def on_array(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:102 + def on_array_pattern(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:124 + def array_brackets(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:110 + def autocorrect(corrector, node); end + + # A closing bracket on its own line is only collapsed when the opening + # bracket ends up on the first element's line, so that the brackets + # stay symmetrical (see `Layout/MultilineArrayBraceLayout`). + # + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:220 + def closing_bracket_kept_apart?(node, tokens, left, right); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:242 + def compact(corrector, bracket, side); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:226 + def compact_corrections(corrector, node, tokens, left, right); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:209 + def compact_offense(node, token, side: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:174 + def compact_offenses(node, tokens, left, right, start_ok, end_ok); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:133 + def empty_config; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:141 + def end_has_own_line?(token); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:106 + def find_node_with_brackets(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:148 + def index_for(tokens, token); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:157 + def issue_offenses(node, tokens, left, right, start_ok, end_ok); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:152 + def line_and_column_for(token); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:198 + def multi_dimensional_array?(tokens, token, side: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:169 + def next_to_comment?(tokens, token); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:137 + def next_to_newline?(tokens, token); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:190 + def qualifies_for_compact?(tokens, token, side: T.unsafe(nil)); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:84 +RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets::EMPTY_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb:83 +RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets::MSG = T.let(T.unsafe(nil), String) + +# Checks for unnecessary additional spaces inside array percent literals +# (i.e. %i/%w). +# +# Note that blank percent literals (e.g. `%i( )`) are checked by +# `Layout/SpaceInsidePercentLiteralDelimiters`. +# +# @example +# +# # bad +# %w(foo bar baz) +# # good +# %i(foo bar baz) +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_percent_literal.rb:18 +class RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::MatchRange + include ::RuboCop::Cop::PercentLiteral + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_percent_literal.rb:26 + def on_array(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_percent_literal.rb:30 + def on_percent_literal(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_percent_literal.rb:40 + def each_unnecessary_space_match(node, &blk); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_percent_literal.rb:23 +RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_array_percent_literal.rb:24 +RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral::MULTIPLE_SPACES_BETWEEN_ITEMS_REGEX = T.let(T.unsafe(nil), Regexp) + +# Checks that block braces have or don't have surrounding space inside +# them on configuration. For blocks taking parameters, it checks that the +# left brace has or doesn't have trailing space depending on +# configuration. +# +# @example EnforcedStyle: space (default) +# # The `space` style enforces that block braces have +# # surrounding space. +# +# # bad +# some_array.each {puts e} +# +# # good +# some_array.each { puts e } +# +# @example EnforcedStyle: no_space +# # The `no_space` style enforces that block braces don't +# # have surrounding space. +# +# # bad +# some_array.each { puts e } +# +# # good +# some_array.each {puts e} +# +# +# @example EnforcedStyleForEmptyBraces: no_space (default) +# # The `no_space` EnforcedStyleForEmptyBraces style enforces that +# # block braces don't have a space in between when empty. +# +# # bad +# some_array.each { } +# some_array.each { } +# some_array.each { } +# +# # good +# some_array.each {} +# +# @example EnforcedStyleForEmptyBraces: space +# # The `space` EnforcedStyleForEmptyBraces style enforces that +# # block braces have at least a space in between when empty. +# +# # bad +# some_array.each {} +# +# # good +# some_array.each { } +# some_array.each { } +# some_array.each { } +# +# +# @example SpaceBeforeBlockParameters: true (default) +# # The SpaceBeforeBlockParameters style set to `true` enforces that +# # there is a space between `{` and `|`. Overrides `EnforcedStyle` +# # if there is a conflict. +# +# # bad +# [1, 2, 3].each {|n| n * 2 } +# +# # good +# [1, 2, 3].each { |n| n * 2 } +# +# @example SpaceBeforeBlockParameters: false +# # The SpaceBeforeBlockParameters style set to `false` enforces that +# # there is no space between `{` and `|`. Overrides `EnforcedStyle` +# # if there is a conflict. +# +# # bad +# [1, 2, 3].each { |n| n * 2 } +# +# # good +# [1, 2, 3].each {|n| n * 2 } +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:79 +class RuboCop::Cop::Layout::SpaceInsideBlockBraces < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:89 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:106 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:105 + def on_numblock(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:127 + def adjacent_braces(left_brace, right_brace); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:166 + def aligned_braces?(inner, right_brace, column, left_brace); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:176 + def aligned_with_opening_brace_line?(left_brace, right_brace); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:135 + def braces_with_contents_inside(node, inner); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:110 + def check_inside(node, left_brace, right_brace); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:142 + def check_left_brace(inner, left_brace, args_delimiter); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:150 + def check_right_brace(node, inner, left_brace, right_brace, single_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:246 + def closing_bracket_on_own_line?(inner); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:225 + def comment_at?(pos); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:172 + def inner_last_space_count(inner); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:162 + def multiline_block?(left_brace, right_brace); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:250 + def no_space(begin_pos, end_pos, msg); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:181 + def no_space_inside_left_brace(left_brace, args_delimiter); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:266 + def offense(begin_pos, end_pos, msg, style_param = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:211 + def pipe?(args_delimiter); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:258 + def space(begin_pos, end_pos, msg); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:215 + def space_after_left_brace(left_brace); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:198 + def space_inside_left_brace(left_brace, args_delimiter); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:229 + def space_inside_right_brace(inner, right_brace, column); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:281 + def style_for_empty_braces; end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_block_braces.rb:85 + def autocorrect_incompatible_with; end + end +end + +# Checks that braces used for hash literals have or don't have +# surrounding space depending on configuration. +# +# Hash pattern matching is handled in the same way. +# +# @example EnforcedStyle: space (default) +# # The `space` style enforces that hash literals have +# # surrounding space. +# +# # bad +# h = {a: 1, b: 2} +# foo = {{ a: 1 } => { b: { c: 2 }}} +# +# # good +# h = { a: 1, b: 2 } +# foo = { { a: 1 } => { b: { c: 2 } } } +# +# @example EnforcedStyle: no_space +# # The `no_space` style enforces that hash literals have +# # no surrounding space. +# +# # bad +# h = { a: 1, b: 2 } +# foo = {{ a: 1 } => { b: { c: 2 }}} +# +# # good +# h = {a: 1, b: 2} +# foo = {{a: 1} => {b: {c: 2}}} +# +# @example EnforcedStyle: compact +# # The `compact` style normally requires a space inside +# # hash braces, with the exception that successive left +# # braces or right braces are collapsed together in nested hashes. +# +# # bad +# h = { a: { b: 2 } } +# foo = { { a: 1 } => { b: { c: 2 } } } +# +# # good +# h = { a: { b: 2 }} +# foo = {{ a: 1 } => { b: { c: 2 }}} +# +# @example EnforcedStyleForEmptyBraces: no_space (default) +# # The `no_space` EnforcedStyleForEmptyBraces style enforces that +# # empty hash braces do not contain spaces. +# +# # bad +# foo = { } +# bar = { } +# baz = { +# } +# +# # good +# foo = {} +# bar = {} +# baz = {} +# +# @example EnforcedStyleForEmptyBraces: space +# # The `space` EnforcedStyleForEmptyBraces style enforces that +# # empty hash braces contain space. +# +# # bad +# foo = {} +# +# # good +# foo = { } +# foo = { } +# foo = { +# } +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:76 +class RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:84 + def on_hash(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:92 + def on_hash_pattern(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:144 + def ambiguous_or_unexpected_style_detected(style, is_match); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:136 + def autocorrect(corrector, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:96 + def check(token1, token2); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:191 + def check_whitespace_only_hash(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:209 + def enforce_no_space_style_for_empty_braces?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:111 + def expect_space?(token1, token2); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:124 + def incorrect_style_detected(token1, token2, expect_space, is_empty_braces); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:157 + def message(brace, is_empty_braces, expect_space); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:152 + def offense?(token1, expect_space); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:203 + def range_inside_hash(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:183 + def range_of_space_to_the_left(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:175 + def range_of_space_to_the_right(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:167 + def space_range(token_range); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb:82 +RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces::MSG = T.let(T.unsafe(nil), String) + +# Checks for spaces inside ordinary round parentheses. +# +# @example EnforcedStyle: no_space (default) +# # The `no_space` style enforces that parentheses do not have spaces. +# +# # bad +# f( 3) +# g = (a + 3 ) +# f( ) +# +# # good +# f(3) +# g = (a + 3) +# f() +# +# @example EnforcedStyle: space +# # The `space` style enforces that parentheses have a space at the +# # beginning and end. +# # Note: Empty parentheses should not have spaces. +# +# # bad +# f(3) +# g = (a + 3) +# y( ) +# +# # good +# f( 3 ) +# g = ( a + 3 ) +# y() +# +# @example EnforcedStyle: compact +# # The `compact` style enforces that parentheses have a space at the +# # beginning with the exception that successive parentheses are allowed. +# # Note: Empty parentheses should not have spaces. +# +# # bad +# f(3) +# g = (a + 3) +# y( ) +# g( f( x ) ) +# g( f( x( 3 ) ), 5 ) +# g( ( ( 3 + 5 ) * f) ** x, 5 ) +# +# # good +# f( 3 ) +# g = ( a + 3 ) +# y() +# g( f( x )) +# g( f( x( 3 )), 5 ) +# g((( 3 + 5 ) * f ) ** x, 5 ) +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_parens.rb:57 +class RuboCop::Cop::Layout::SpaceInsideParens < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_parens.rb:66 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_parens.rb:161 + def can_be_ignored?(token1, token2); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_parens.rb:99 + def correct_extraneous_space(tokens); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_parens.rb:115 + def correct_extraneous_space_between_consecutive_parens(token1, token2); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_parens.rb:124 + def correct_extraneous_space_in_empty_parens(token1, token2); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_parens.rb:135 + def correct_missing_space(token1, token2); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_parens.rb:153 + def left_parens?(token1, token2); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_parens.rb:149 + def parens?(token1, token2); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_parens.rb:88 + def process_with_compact_style(tokens); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_parens.rb:81 + def process_with_space_style(tokens); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_parens.rb:157 + def right_parens?(token1, token2); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_parens.rb:63 +RuboCop::Cop::Layout::SpaceInsideParens::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_parens.rb:64 +RuboCop::Cop::Layout::SpaceInsideParens::MSG_SPACE = T.let(T.unsafe(nil), String) + +# Checks for unnecessary additional spaces inside the delimiters of +# %i/%w/%x literals. +# +# @example +# +# # bad +# %i( foo bar baz ) +# +# # good +# %i(foo bar baz) +# +# # bad +# %w( foo bar baz ) +# +# # good +# %w(foo bar baz) +# +# # bad +# %x( ls -l ) +# +# # good +# %x(ls -l) +# +# # bad +# %w( ) +# %w( +# ) +# +# # good +# %w() +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb:36 +class RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::MatchRange + include ::RuboCop::Cop::PercentLiteral + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb:45 + def on_array(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb:53 + def on_percent_literal(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb:49 + def on_xstr(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb:60 + def add_offenses_for_blank_spaces(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb:69 + def add_offenses_for_unnecessary_spaces(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb:85 + def body_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb:79 + def regex_matches(node, &blk); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb:42 +RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters::BEGIN_REGEX = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb:43 +RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters::END_REGEX = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb:41 +RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters::MSG = T.let(T.unsafe(nil), String) + +# Checks for spaces inside range literals. +# +# @example +# # bad +# 1 .. 3 +# +# # good +# 1..3 +# +# # bad +# 'a' .. 'z' +# +# # good +# 'a'..'z' +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_range_literal.rb:20 +class RuboCop::Cop::Layout::SpaceInsideRangeLiteral < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_range_literal.rb:29 + def on_erange(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_range_literal.rb:25 + def on_irange(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_range_literal.rb:35 + def check(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_range_literal.rb:23 +RuboCop::Cop::Layout::SpaceInsideRangeLiteral::MSG = T.let(T.unsafe(nil), String) + +# Checks that reference brackets have or don't have +# surrounding space depending on configuration. +# +# @example EnforcedStyle: no_space (default) +# # The `no_space` style enforces that reference brackets have +# # no surrounding space. +# +# # bad +# hash[ :key ] +# array[ index ] +# +# # good +# hash[:key] +# array[index] +# +# @example EnforcedStyle: space +# # The `space` style enforces that reference brackets have +# # surrounding space. +# +# # bad +# hash[:key] +# array[index] +# +# # good +# hash[ :key ] +# array[ index ] +# +# +# @example EnforcedStyleForEmptyBrackets: no_space (default) +# # The `no_space` EnforcedStyleForEmptyBrackets style enforces that +# # empty reference brackets do not contain spaces. +# +# # bad +# foo[ ] +# foo[ ] +# foo[ +# ] +# +# # good +# foo[] +# +# @example EnforcedStyleForEmptyBrackets: space +# # The `space` EnforcedStyleForEmptyBrackets style enforces that +# # empty reference brackets contain exactly one space. +# +# # bad +# foo[] +# foo[ ] +# foo[ +# ] +# +# # good +# foo[ ] +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_reference_brackets.rb:60 +class RuboCop::Cop::Layout::SpaceInsideReferenceBrackets < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_reference_brackets.rb:70 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_reference_brackets.rb:92 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_reference_brackets.rb:121 + def closing_bracket(tokens, opening_bracket); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_reference_brackets.rb:137 + def empty_config; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_reference_brackets.rb:110 + def left_ref_bracket(node, tokens); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_reference_brackets.rb:132 + def previous_token(current_token); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_reference_brackets.rb:104 + def reference_brackets(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_reference_brackets.rb:66 +RuboCop::Cop::Layout::SpaceInsideReferenceBrackets::EMPTY_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_reference_brackets.rb:65 +RuboCop::Cop::Layout::SpaceInsideReferenceBrackets::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_reference_brackets.rb:68 +RuboCop::Cop::Layout::SpaceInsideReferenceBrackets::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for whitespace within string interpolations. +# +# @example EnforcedStyle: no_space (default) +# # bad +# var = "This is the #{ space } example" +# +# # good +# var = "This is the #{no_space} example" +# +# @example EnforcedStyle: space +# # bad +# var = "This is the #{no_space} example" +# +# # good +# var = "This is the #{ space } example" +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_string_interpolation.rb:21 +class RuboCop::Cop::Layout::SpaceInsideStringInterpolation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Interpolation + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_string_interpolation.rb:29 + def on_interpolation(begin_node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_string_interpolation.rb:45 + def autocorrect(corrector, begin_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_string_interpolation.rb:55 + def delimiters(begin_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_inside_string_interpolation.rb:27 +RuboCop::Cop::Layout::SpaceInsideStringInterpolation::MSG = T.let(T.unsafe(nil), String) + +# Looks for trailing blank lines and a final newline in the +# source code. +# +# @example EnforcedStyle: final_newline (default) +# # `final_newline` looks for one newline at the end of files. +# +# # bad +# class Foo; end +# +# # EOF +# +# # bad +# class Foo; end # EOF +# +# # good +# class Foo; end +# # EOF +# +# @example EnforcedStyle: final_blank_line +# # `final_blank_line` looks for one blank line followed by a new line +# # at the end of files. +# +# # bad +# class Foo; end +# # EOF +# +# # bad +# class Foo; end # EOF +# +# # good +# class Foo; end +# +# # EOF +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_empty_lines.rb:40 +class RuboCop::Cop::Layout::TrailingEmptyLines < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_empty_lines.rb:45 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_empty_lines.rb:90 + def end_with_percent_blank_string?(processed_source); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_empty_lines.rb:80 + def ends_in_end?(processed_source); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_empty_lines.rb:94 + def message(wanted_blank_lines, blank_lines); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_empty_lines.rb:67 + def offense_detected(buffer, wanted_blank_lines, blank_lines, whitespace_at_end); end +end + +# Looks for trailing whitespace in the source code. +# +# @example +# # The line in this example contains spaces after the 0. +# # bad +# x = 0 +# +# # The line in this example ends directly after the 0. +# # good +# x = 0 +# +# @example AllowInHeredoc: false (default) +# # The line in this example contains spaces after the 0. +# # bad +# code = <<~RUBY +# x = 0 +# RUBY +# +# # ok +# code = <<~RUBY +# x = 0 #{} +# RUBY +# +# # good +# trailing_whitespace = ' ' +# code = <<~RUBY +# x = 0#{trailing_whitespace} +# RUBY +# +# @example AllowInHeredoc: true +# # The line in this example contains spaces after the 0. +# # good +# code = <<~RUBY +# x = 0 +# RUBY +# +# pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_whitespace.rb:42 +class RuboCop::Cop::Layout::TrailingWhitespace < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Heredoc + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_whitespace.rb:57 + def on_heredoc(_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_whitespace.rb:49 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_whitespace.rb:112 + def extract_heredocs(ast); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_whitespace.rb:103 + def find_heredoc(line_number); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_whitespace.rb:108 + def heredocs; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_whitespace.rb:125 + def offense_range(lineno, line); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_whitespace.rb:61 + def process_line(line, lineno); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_whitespace.rb:75 + def process_line_in_heredoc(corrector, range, heredoc); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_whitespace.rb:99 + def skip_heredoc?; end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_whitespace.rb:95 + def static?(heredoc); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_whitespace.rb:86 + def whitespace_is_indentation?(range, level); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_whitespace.rb:90 + def whitespace_only?(range); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/layout/trailing_whitespace.rb:47 +RuboCop::Cop::Layout::TrailingWhitespace::MSG = T.let(T.unsafe(nil), String) + +# Extend a department module with this module and call `register_cop` to register +# the department's cops with the global registry without loading their files until +# a cop class itself is needed: +# +# module RuboCop +# module Cop +# # The Foo department. +# module Foo +# extend LazyLoader +# +# register_cop :BarBaz, "#{__dir__}/foo/bar_baz" +# end +# end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lazy_loader.rb:19 +module RuboCop::Cop::LazyLoader + # Registers a cop for lazy loading. The cop appears in the registry by name right away, + # but its file is loaded only when the cop class is needed, e.g. when the cop is enabled + # for an inspection run. + # + # The path must be absolute so that loading does not depend on `$LOAD_PATH` and cannot resolve + # to another RuboCop installation. + # + # @param constant_name [Symbol] name of the cop class, e.g. `:BarBaz` + # @param path [String] absolute path to the file defining the cop class, + # with or without the `.rb` extension + # + # pkg:gem/rubocop#lib/rubocop/cop/lazy_loader.rb:30 + def register_cop(constant_name, path); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/legacy/corrections_proxy.rb:5 +module RuboCop::Cop::Legacy; end + +# Legacy support for Corrector#corrections +# See https://docs.rubocop.org/rubocop/v1_upgrade_notes.html +# +# pkg:gem/rubocop#lib/rubocop/cop/legacy/corrections_proxy.rb:8 +class RuboCop::Cop::Legacy::CorrectionsProxy + # pkg:gem/rubocop#lib/rubocop/cop/legacy/corrections_proxy.rb:9 + def initialize(corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/legacy/corrections_proxy.rb:13 + def <<(callable); end + + # pkg:gem/rubocop#lib/rubocop/cop/legacy/corrections_proxy.rb:21 + def concat(corrections); end + + # pkg:gem/rubocop#lib/rubocop/cop/legacy/corrections_proxy.rb:17 + def empty?; end + + protected + + # pkg:gem/rubocop#lib/rubocop/cop/legacy/corrections_proxy.rb:31 + def corrector; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/legacy/corrections_proxy.rb:35 + def suppress_clobbering; end +end + +# This class handles autocorrection for code that needs to be moved +# to new lines. +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/line_break_corrector.rb:7 +class RuboCop::Cop::LineBreakCorrector + extend ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::TrailingBody + extend ::RuboCop::PathUtil + extend ::RuboCop::Cop::Util + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/correctors/line_break_corrector.rb:27 + def break_line_before(range:, node:, corrector:, configured_width:, indent_steps: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/line_break_corrector.rb:15 + def correct_trailing_body(configured_width:, corrector:, node:, processed_source:); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/line_break_corrector.rb:35 + def move_comment(eol_comment:, node:, corrector:); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/line_break_corrector.rb:13 + def processed_source; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/line_break_corrector.rb:45 + def remove_semicolon(node, corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/line_break_corrector.rb:51 + def semicolon(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/line_break_corrector.rb:60 + def trailing_class_definition?(token, body); end + end +end + +# Help methods for determining if a line is too long. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:6 +module RuboCop::Cop::LineLengthHelp + include ::RuboCop::Cop::Alignment + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:24 + def allow_cop_directives?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:47 + def allow_qualified_name?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:11 + def allow_rbs_inline_annotation?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:43 + def allow_uri?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:51 + def allowed_position?(line, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:34 + def directive_on_source_line?(line_index); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:104 + def extend_end_position(line, end_position); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:59 + def find_excessive_range(line, type); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:91 + def indentation_difference(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:55 + def line_length(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:152 + def line_length_without_directive(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:83 + def match_qualified_names(string); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:75 + def match_uris(string); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:141 + def qualified_name_regexp; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:15 + def rbs_inline_annotation_on_source_line?(line_index); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:120 + def tab_indentation_width; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:125 + def uri_regexp; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/line_length_help.rb:145 + def valid_uri?(uri_ish_string); end +end + +# Cops for the `Lint` department. The department's cops are registered for lazy loading +# and their files are loaded on demand. +# +# pkg:gem/rubocop#lib/rubocop/cop/lint.rb:7 +module RuboCop::Cop::Lint + extend ::RuboCop::Cop::LazyLoader +end + +# Checks for mistyped shorthand assignments. +# +# @example +# # bad +# x =- y +# x =+ y +# x =* y +# x =! y +# +# # good +# x -= y # or x = -y +# x += y # or x = +y +# x *= y # or x = *y +# x != y # or x = !y +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_assignment.rb:21 +class RuboCop::Cop::Lint::AmbiguousAssignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CheckAssignment + include ::RuboCop::Cop::RangeHelp + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_assignment.rb:29 + def on_csend(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_assignment.rb:33 + def check_assignment(node, rhs); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_assignment.rb:27 +RuboCop::Cop::Lint::AmbiguousAssignment::MISTAKES = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_assignment.rb:25 +RuboCop::Cop::Lint::AmbiguousAssignment::MSG = T.let(T.unsafe(nil), String) + +# Checks for ambiguous block association with method +# when param passed without parentheses. +# +# This cop also detects `do...end` blocks that are likely intended for +# an enumerable method in the arguments but actually bind to the outer +# method call. For example, in `render json: data.map do |x| x end`, +# Ruby parses the `do...end` block as belonging to `render`, not `map`. +# +# This cop can customize allowed methods with `AllowedMethods`. +# By default, there are no allowed methods. +# +# @example +# +# # bad +# some_method a { |val| puts val } +# +# # good +# # With parentheses, there's no ambiguity. +# some_method(a { |val| puts val }) +# # or (different meaning) +# some_method(a) { |val| puts val } +# +# # bad +# render json: data.map do |item| +# item.to_h +# end +# +# # good +# render json: data.map { |item| item.to_h } +# +# # good +# mapped = data.map { |item| item.to_h } +# render json: mapped +# +# # good +# # Operator methods require no disambiguation +# foo == bar { |b| b.baz } +# +# # good +# # Lambda arguments require no disambiguation +# foo = ->(bar) { bar.baz } +# +# @example AllowedMethods: [] (default) +# +# # bad +# expect { do_something }.to change { object.attribute } +# +# @example AllowedMethods: [change] +# +# # good +# expect { do_something }.to change { object.attribute } +# +# @example AllowedPatterns: [] (default) +# +# # bad +# expect { do_something }.to change { object.attribute } +# +# @example AllowedPatterns: ['change'] +# +# # good +# expect { do_something }.to change { object.attribute } +# expect { do_something }.to not_change { object.attribute } +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_block_association.rb:69 +class RuboCop::Cop::Lint::AmbiguousBlockAssociation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_block_association.rb:107 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_block_association.rb:105 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_block_association.rb:120 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_block_association.rb:119 + def on_numblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_block_association.rb:92 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_block_association.rb:141 + def allowed_method_pattern?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_block_association.rb:137 + def ambiguous_block_association?(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_block_association.rb:124 + def find_ambiguous_block_method(block_node); end + + # Only the call the `do` block could actually have attached to is a candidate: + # the one whose source ends where the arguments end. This skips calls chained + # into another call (`foo bar.map.to_a`) and calls buried inside a + # parenthesized subcall (`foo bar(baz.map)`), which were never block candidates. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_block_association.rb:157 + def find_block_method_arg(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_block_association.rb:147 + def message(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_block_association.rb:166 + def wrap_in_parentheses(corrector, node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_block_association.rb:82 +RuboCop::Cop::Lint::AmbiguousBlockAssociation::BLOCK_METHODS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_block_association.rb:75 +RuboCop::Cop::Lint::AmbiguousBlockAssociation::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_block_association.rb:78 +RuboCop::Cop::Lint::AmbiguousBlockAssociation::MSG_DO_END_BLOCK = T.let(T.unsafe(nil), String) + +# Checks for ambiguous operators in the first argument of a +# method invocation without parentheses. +# +# @example +# +# # bad +# +# # The `*` is interpreted as a splat operator but it could possibly be +# # a `*` method invocation (i.e. `do_something.*(some_array)`). +# do_something *some_array +# +# # good +# +# # With parentheses, there's no ambiguity. +# do_something(*some_array) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator.rb:21 +class RuboCop::Cop::Lint::AmbiguousOperator < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator.rb:43 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator.rb:62 + def find_offense_node_by(diagnostic); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator.rb:80 + def message(diagnostic); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator.rb:90 + def offense_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator.rb:86 + def offense_position?(node, diagnostic); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator.rb:99 + def unary_operator?(node, diagnostic); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator.rb:39 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator.rb:24 +RuboCop::Cop::Lint::AmbiguousOperator::AMBIGUITIES = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator.rb:34 +RuboCop::Cop::Lint::AmbiguousOperator::MSG_FORMAT = T.let(T.unsafe(nil), String) + +# Looks for expressions containing multiple binary operators +# where precedence is ambiguous due to lack of parentheses. For example, +# in `1 + 2 * 3`, the multiplication will happen before the addition, but +# lexically it appears that the addition will happen first. +# +# The cop does not consider unary operators (ie. `!a` or `-b`) or comparison +# operators (ie. `a =~ b`) because those are not ambiguous. +# +# NOTE: Ranges are handled by `Lint/AmbiguousRange`. +# +# @example +# # bad +# a + b * c +# a || b && c +# a ** b + c +# +# # good (different precedence) +# a + (b * c) +# a || (b && c) +# (a ** b) + c +# +# # good (same precedence) +# a + b + c +# a * b / c % d +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator_precedence.rb:30 +class RuboCop::Cop::Lint::AmbiguousOperatorPrecedence < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator_precedence.rb:47 + def on_and(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator_precedence.rb:58 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator_precedence.rb:97 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator_precedence.rb:81 + def greater_precedence?(node1, node2); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator_precedence.rb:77 + def operator?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator_precedence.rb:89 + def operator_name(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator_precedence.rb:73 + def precedence(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator_precedence.rb:45 +RuboCop::Cop::Lint::AmbiguousOperatorPrecedence::MSG = T.let(T.unsafe(nil), String) + +# See https://ruby-doc.org/core-3.0.2/doc/syntax/precedence_rdoc.html +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator_precedence.rb:34 +RuboCop::Cop::Lint::AmbiguousOperatorPrecedence::PRECEDENCE = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_operator_precedence.rb:44 +RuboCop::Cop::Lint::AmbiguousOperatorPrecedence::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for ambiguous ranges. +# +# Ranges have quite low precedence, which leads to unexpected behavior when +# using a range with other operators. This cop avoids that by making ranges +# explicit by requiring parenthesis around complex range boundaries (anything +# that is not a literal: numerics, strings, symbols, etc.). +# +# This cop can be configured with `RequireParenthesesForMethodChains` in order to +# specify whether method chains (including `self.foo`) should be wrapped in parens +# by this cop. +# +# NOTE: Regardless of this configuration, if a method receiver is a basic literal +# value, it will be wrapped in order to prevent the ambiguity of `1..2.to_a`. +# +# @safety +# The cop autocorrects by wrapping the entire boundary in parentheses, which +# makes the outcome more explicit but is possible to not be the intention of the +# programmer. For this reason, this cop's autocorrect is unsafe (it will not +# change the behavior of the code, but will not necessarily match the +# intent of the program). +# +# @example +# # bad +# x || 1..2 +# x - 1..2 +# (x || 1..2) +# x || 1..y || 2 +# 1..2.to_a +# +# # good, unambiguous +# 1..2 +# 'a'..'z' +# :bar..:baz +# MyClass::MIN..MyClass::MAX +# @min..@max +# a..b +# -a..b +# +# # good, ambiguity removed +# x || (1..2) +# (x - 1)..2 +# (x || 1)..2 +# (x || 1)..(y || 2) +# (1..2).to_a +# +# @example RequireParenthesesForMethodChains: false (default) +# # good +# a.foo..b.bar +# (a.foo)..(b.bar) +# +# @example RequireParenthesesForMethodChains: true +# # bad +# a.foo..b.bar +# +# # good +# (a.foo)..(b.bar) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_range.rb:62 +class RuboCop::Cop::Lint::AmbiguousRange < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RationalLiteral + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_range.rb:77 + def on_erange(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_range.rb:68 + def on_irange(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_range.rb:87 + def acceptable?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_range.rb:94 + def acceptable_call?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_range.rb:81 + def each_boundary(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_range.rb:106 + def require_parentheses_for_method_chain?; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_range.rb:66 +RuboCop::Cop::Lint::AmbiguousRange::MSG = T.let(T.unsafe(nil), String) + +# Checks for ambiguous regexp literals in the first argument of +# a method invocation without parentheses. +# +# @example +# +# # bad +# +# # This is interpreted as a method invocation with a regexp literal, +# # but it could possibly be `/` method invocations. +# # (i.e. `do_something./(pattern)./(i)`) +# do_something /pattern/i +# +# # good +# +# # With parentheses, there's no ambiguity. +# do_something(/pattern/i) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_regexp_literal.rb:22 +class RuboCop::Cop::Lint::AmbiguousRegexpLiteral < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_regexp_literal.rb:29 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_regexp_literal.rb:54 + def find_offense_node(node, regexp_receiver); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_regexp_literal.rb:47 + def find_offense_node_by(diagnostic); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_regexp_literal.rb:65 + def first_argument_is_regexp?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_regexp_literal.rb:69 + def method_chain_to_regexp_receiver?(node, regexp_receiver); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/ambiguous_regexp_literal.rb:25 +RuboCop::Cop::Lint::AmbiguousRegexpLiteral::MSG = T.let(T.unsafe(nil), String) + +# Checks for calls that pass the wrong number of positional arguments to a +# method whose definition is known from the project index. +# +# The check is powered by the project-wide index, so it only runs when +# `AllCops/UseProjectIndex` is enabled and the `rubydex` gem is installed. +# Without the index the cop does nothing. +# +# Only calls on constant receivers (`Foo.bar`) are considered, and only +# when the receiver resolves in the index, its entire ancestry is resolved +# (so a method inherited from a gem or the standard library never produces +# an offense), and the called method resolves to a single, unambiguous +# signature. Calls that forward arguments (`*`, `**`, `...`) are skipped +# because their argument count is not statically known. Keyword arguments +# passed to a method that declares no keyword parameters are counted as the +# single positional hash they collapse into, matching Ruby's semantics. +# +# Constructor calls (`Foo.new`) and keyword-argument validation are out of +# scope: only positional arity of explicitly defined singleton methods is +# checked. `new` is skipped outright, because `Class#new` is not in the +# index: any `new` the index does find sits below it in the method +# resolution order, where Ruby would never reach it. +# +# @example +# # Given the project defines: +# # class Report +# # def self.generate(source, format); end +# # end +# +# # bad +# Report.generate(source) +# +# # bad +# Report.generate(source, :pdf, :extra) +# +# # good +# Report.generate(source, :pdf) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/argument_mismatch.rb:43 +class RuboCop::Cop::Lint::ArgumentMismatch < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ProjectIndexHelp + include ::RuboCop::Cop::IndexedMethodArity + + # pkg:gem/rubocop#lib/rubocop/cop/lint/argument_mismatch.rb:61 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/argument_mismatch.rb:49 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/argument_mismatch.rb:65 + def checkable_call?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/argument_mismatch.rb:69 + def message(node, given, min, max); end + + # `[min, max, has_keywords]` for the called singleton method, or nil when + # the receiver or its ancestry is not resolved. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/argument_mismatch.rb:75 + def resolved_signature_shape(node); end + + # A call with an explicit receiver cannot reach a private method, so its + # signature says nothing about the call. This matters because `Object` + # closes the singleton ancestry of every constant, and a bare `def` at + # the top level of any file — what every block-based DSL produces — is a + # private instance method of `Object`. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/argument_mismatch.rb:90 + def singleton_signature_shape(declaration, method_name); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/argument_mismatch.rb:47 +RuboCop::Cop::Lint::ArgumentMismatch::MSG = T.let(T.unsafe(nil), String) + +# Checks for an array literal interpolated inside a regexp. +# +# When interpolating an array literal, it is converted to a string. This means +# that when inside a regexp, it acts as a character class but with additional +# quotes, spaces and commas that are likely not intended. For example, +# `/#{%w[a b c]}/` parses as `/["a", "b", "c"]/` (or `/["a, bc]/` without +# repeated characters). +# +# The cop can autocorrect to a character class (if all items in the array are a +# single character) or alternation (if the array contains longer items). +# +# NOTE: This only considers interpolated arrays that contain only strings, symbols, +# integers, and floats. Any other type is not easily convertible to a character class +# or regexp alternation. +# +# @safety +# Autocorrection is unsafe because it will change the regexp pattern, by +# removing the additional quotes, spaces and commas from the character class. +# +# @example +# # bad +# /#{%w[a b c]}/ +# +# # good +# /[abc]/ +# +# # bad +# /#{%w[foo bar baz]}/ +# +# # good +# /(?:foo|bar|baz)/ +# +# # bad - construct a regexp rather than interpolate an array of identifiers +# /#{[foo, bar]}/ +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/array_literal_in_regexp.rb:41 +class RuboCop::Cop::Lint::ArrayLiteralInRegexp < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Interpolation + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/array_literal_in_regexp.rb:53 + def on_interpolation(begin_node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/array_literal_in_regexp.rb:106 + def alternation_for(values); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/array_literal_in_regexp.rb:67 + def array_of_literal_values?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/array_literal_in_regexp.rb:92 + def array_values(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/array_literal_in_regexp.rb:98 + def character_class?(values); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/array_literal_in_regexp.rb:102 + def character_class_for(values); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/array_literal_in_regexp.rb:110 + def escape_values(values); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/array_literal_in_regexp.rb:71 + def register_array_of_literal_values(begin_node, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/array_literal_in_regexp.rb:87 + def register_array_of_nonliteral_values(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/array_literal_in_regexp.rb:45 +RuboCop::Cop::Lint::ArrayLiteralInRegexp::LITERAL_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/array_literal_in_regexp.rb:49 +RuboCop::Cop::Lint::ArrayLiteralInRegexp::MSG_ALTERNATION = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/array_literal_in_regexp.rb:48 +RuboCop::Cop::Lint::ArrayLiteralInRegexp::MSG_CHARACTER_CLASS = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/array_literal_in_regexp.rb:50 +RuboCop::Cop::Lint::ArrayLiteralInRegexp::MSG_UNKNOWN = T.let(T.unsafe(nil), String) + +# Checks for assignments in the conditions of +# if/while/until. +# +# `AllowSafeAssignment` option for safe assignment. +# By safe assignment we mean putting parentheses around +# an assignment to indicate "I know I'm using an assignment +# as a condition. It's not a mistake." +# +# @safety +# This cop's autocorrection is unsafe because it assumes that +# the author meant to use an assignment result as a condition. +# +# @example +# # bad +# if some_var = value +# do_something +# end +# +# # good +# if some_var == value +# do_something +# end +# +# @example AllowSafeAssignment: true (default) +# # good +# if (some_var = value) +# do_something +# end +# +# @example AllowSafeAssignment: false +# # bad +# if (some_var = value) +# do_something +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/assignment_in_condition.rb:41 +class RuboCop::Cop::Lint::AssignmentInCondition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::SafeAssignment + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/assignment_in_condition.rb:55 + def on_if(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/assignment_in_condition.rb:68 + def on_until(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/assignment_in_condition.rb:67 + def on_while(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/assignment_in_condition.rb:80 + def allowed_construct?(asgn_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/assignment_in_condition.rb:86 + def conditional_assignment?(asgn_node); end + + # An assignment that is a statement of a multi-statement `begin` + # (e.g. `(foo = bar; baz)`) has its value discarded, so it is not used + # as the condition. Wrapping it in parentheses would only conflict with + # `Style/RedundantParentheses`, so it is left alone. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/assignment_in_condition.rb:94 + def discarded_assignment?(asgn_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/assignment_in_condition.rb:72 + def message(_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/assignment_in_condition.rb:100 + def skip_children?(asgn_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/assignment_in_condition.rb:106 + def traverse_node(node, &block); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/assignment_in_condition.rb:53 +RuboCop::Cop::Lint::AssignmentInCondition::ASGN_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/assignment_in_condition.rb:50 +RuboCop::Cop::Lint::AssignmentInCondition::MSG_WITHOUT_SAFE_ASSIGNMENT_ALLOWED = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/assignment_in_condition.rb:46 +RuboCop::Cop::Lint::AssignmentInCondition::MSG_WITH_SAFE_ASSIGNMENT_ALLOWED = T.let(T.unsafe(nil), String) + +# `BigDecimal.new()` is deprecated since BigDecimal 1.3.3. +# This cop identifies places where `BigDecimal.new()` +# can be replaced by `BigDecimal()`. +# +# @example +# # bad +# BigDecimal.new(123.456, 3) +# +# # good +# BigDecimal(123.456, 3) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/big_decimal_new.rb:17 +class RuboCop::Cop::Lint::BigDecimalNew < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/big_decimal_new.rb:24 + def big_decimal_new(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/big_decimal_new.rb:29 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/big_decimal_new.rb:20 +RuboCop::Cop::Lint::BigDecimalNew::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/big_decimal_new.rb:21 +RuboCop::Cop::Lint::BigDecimalNew::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for places where binary operator has identical operands. +# +# It covers comparison operators: `==`, `===`, `=~`, `>`, `>=`, `<`, ``<=``; +# bitwise operators: `|`, `^`, `&`; +# boolean operators: `&&`, `||` +# 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 +# do so. Operations such as `-` or `/` where the result will always be the same +# (`x - x` will always be 0; `x / x` will always be 1) are offenses, but these +# are covered by `Lint/NumericOperationWithConstantResult` instead. +# +# @safety +# This cop is unsafe as it does not consider side effects when calling methods +# and thus can generate false positives, for example: +# +# [source,ruby] +# ---- +# if wr.take_char == '\0' && wr.take_char == '\0' +# # ... +# end +# ---- +# +# @example +# # bad +# x.top >= x.top +# +# if a.x != 0 && a.x != 0 +# do_something +# end +# +# def child? +# left_child || left_child +# end +# +# # good +# x + x +# 1 << 1 +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb:46 +class RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb:57 + def on_and(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb:62 + def on_or(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb:50 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb:47 +RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb:48 +RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for `:true` and `:false` symbols. +# In most cases it would be a typo. +# +# @safety +# Autocorrection is unsafe for this cop because code relying +# on `:true` or `:false` symbols will break when those are +# changed to actual booleans. +# +# @example +# +# # bad +# :true +# +# # good +# true +# +# # bad +# :false +# +# # good +# false +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/boolean_symbol.rb:27 +class RuboCop::Cop::Lint::BooleanSymbol < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/boolean_symbol.rb:33 + def boolean_symbol?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/boolean_symbol.rb:35 + def on_sym(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/boolean_symbol.rb:48 + def autocorrect(corrector, node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/boolean_symbol.rb:30 +RuboCop::Cop::Lint::BooleanSymbol::MSG = T.let(T.unsafe(nil), String) + +# Checks for circular argument references in optional keyword +# arguments and optional ordinal arguments. +# +# NOTE: This syntax was made invalid on Ruby 2.7 - Ruby 3.3 but is allowed +# again since Ruby 3.4. +# +# @example +# +# # bad +# def bake(pie: pie) +# pie.heat_up +# end +# +# # good +# def bake(pie:) +# pie.refrigerate +# end +# +# # good +# def bake(pie: self.pie) +# pie.feed_to(user) +# end +# +# # bad +# def cook(dry_ingredients = dry_ingredients) +# dry_ingredients.reduce(&:+) +# end +# +# # good +# def cook(dry_ingredients = self.dry_ingredients) +# dry_ingredients.combine +# end +# +# # bad +# def foo(pie = pie = pie) +# pie.heat_up +# end +# +# # good +# def foo(pie) +# pie.heat_up +# end +# +# # bad +# def foo(pie = cake = pie) +# [pie, cake].each(&:heat_up) +# end +# +# # good +# def foo(cake = pie) +# [pie, cake].each(&:heat_up) +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/circular_argument_reference.rb:58 +class RuboCop::Cop::Lint::CircularArgumentReference < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::TargetRubyVersion + + # pkg:gem/rubocop#lib/rubocop/cop/lint/circular_argument_reference.rb:63 + def on_kwoptarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/circular_argument_reference.rb:67 + def on_optarg(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/circular_argument_reference.rb:83 + def check_assignment_chain(arg_name, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/circular_argument_reference.rb:73 + def check_for_circular_argument_references(arg_name, arg_value); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/circular_argument_reference.rb:61 +RuboCop::Cop::Lint::CircularArgumentReference::MSG = T.let(T.unsafe(nil), String) + +# Do not define constants within a block, since the block's scope does not +# isolate or namespace the constant in any way. +# +# If you are trying to define that constant once, define it outside of +# the block instead, or use a variable or method if defining the constant +# in the outer scope would be problematic. +# +# For meta-programming, use `const_set`. +# +# @example +# # bad +# task :lint do +# FILES_TO_LINT = Dir['lib/*.rb'] +# end +# +# # bad +# describe 'making a request' do +# class TestRequest; end +# end +# +# # bad +# module M +# extend ActiveSupport::Concern +# included do +# LIST = [] +# end +# end +# +# # good +# task :lint do +# files_to_lint = Dir['lib/*.rb'] +# end +# +# # good +# describe 'making a request' do +# let(:test_request) { Class.new } +# # see also `stub_const` for RSpec +# end +# +# # good +# module M +# extend ActiveSupport::Concern +# included do +# const_set(:LIST, []) +# end +# end +# +# @example AllowedMethods: ['enums'] (default) +# # good +# +# # `enums` for Typed Enums via `T::Enum` in Sorbet. +# # https://sorbet.org/docs/tenum +# class TestEnum < T::Enum +# enums do +# Foo = new("foo") +# end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/constant_definition_in_block.rb:64 +class RuboCop::Cop::Lint::ConstantDefinitionInBlock < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_definition_in_block.rb:70 + def constant_assigned_in_block?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_definition_in_block.rb:75 + def module_defined_in_block?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_definition_in_block.rb:79 + def on_casgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_definition_in_block.rb:85 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_definition_in_block.rb:90 + def on_module(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_definition_in_block.rb:94 + def method_name(node); end +end + +# pkg:gem/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 using ``rescue =>``. +# +# You intended to write as `rescue StandardError`. +# However, you have written `rescue => StandardError`. +# In that case, the result of `rescue` will overwrite `StandardError`. +# +# @example +# +# # bad +# begin +# something +# rescue => StandardError +# end +# +# # good +# begin +# something +# rescue StandardError +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb:26 +class RuboCop::Cop::Lint::ConstantOverwrittenInRescue < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb:41 + def on_resbody(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb:33 + def overwritten_constant(param0 = T.unsafe(nil)); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb:37 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb:30 +RuboCop::Cop::Lint::ConstantOverwrittenInRescue::MSG = T.let(T.unsafe(nil), String) + +# Checks for constant reassignments. +# +# Emulates Ruby's runtime warning "already initialized constant X" +# when a constant is reassigned in the same file and namespace. +# +# The cop tracks constants defined via `NAME = value` syntax as well as +# class/module keyword definitions. It detects reassignment when a constant +# is first defined one way and then redefined using the `NAME = value` syntax. +# +# The cop cannot catch all offenses, like, for example, when using metaprogramming +# (`Module#const_set`). +# +# By default the cop also cannot detect reassignment across files. +# When `AllCops/UseProjectIndex` is enabled and the `rubydex` gem is installed, +# the cop additionally consults the project-wide index and reports reassignments +# whose previous definition lives in another file. +# +# The cop only takes into account constants assigned in a "simple" way: directly +# inside class/module definition, or within another constant. Other type of assignments +# (e.g., inside a conditional) are disregarded. +# +# The cop also tracks constant removal using `Module#remove_const` with symbol +# or string argument. +# +# @example +# # bad +# X = :foo +# X = :bar +# +# # bad +# class A +# X = :foo +# X = :bar +# end +# +# # bad +# module A +# X = :foo +# X = :bar +# end +# +# # bad +# class FooError < StandardError; end +# FooError = Class.new(RuntimeError) +# +# # bad +# module M; end +# M = 1 +# +# # good - keep only one assignment +# X = :bar +# +# class A +# X = :bar +# end +# +# module A +# X = :bar +# end +# +# # good - use OR assignment +# X = :foo +# X ||= :bar +# +# # good - use conditional assignment +# X = :foo +# X = :bar unless defined?(X) +# +# # good - remove the assigned constant first +# class A +# X = :foo +# remove_const :X +# X = :bar +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:81 +class RuboCop::Cop::Lint::ConstantReassignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ProjectIndexHelp + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:107 + def on_casgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:95 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:101 + def on_module(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:122 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:90 + def remove_constant(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:177 + def ancestor_namespaces(node); end + + # Compact definitions (e.g. `module A::B`) contribute every path segment, + # and an absolute one (e.g. `module ::A::B`) discards the enclosing namespaces. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:187 + def append_namespaces(namespaces, identifier); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:211 + def constant_definitions; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:169 + def constant_display_name(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:173 + def constant_namespaces(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:199 + def definition_name(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:136 + def fixed_constant_path?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:149 + def freeze_method?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:153 + def fully_qualified_constant_name(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:165 + def fully_qualified_name_for(namespaces, constant); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:207 + def identifier_namespaces(identifier); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:215 + def report_cross_file_collision(node, fully_qualified_name, display_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:140 + def simple_assignment?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:193 + def unconditional_definition?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:85 +RuboCop::Cop::Lint::ConstantReassignment::CROSS_FILE_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:84 +RuboCop::Cop::Lint::ConstantReassignment::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:87 +RuboCop::Cop::Lint::ConstantReassignment::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks that certain constants are fully qualified. +# +# This is not enabled by default because it would mark a lot of offenses +# unnecessarily. +# +# Generally, gems should fully qualify all constants to avoid conflicts with +# the code that uses the gem. Enable this cop without using `Only`/`Ignore` +# +# Large projects will over time end up with one or two constant names that +# are problematic because of a conflict with a library or just internally +# using the same name for a namespace and a class. To avoid too many unnecessary +# offenses, enable this cop with `Only: [The, Constant, Names, Causing, Issues]` +# +# NOTE: `Style/RedundantConstantBase` cop is disabled if this cop is enabled, +# to prevent conflicting rules. This is because it respects user configurations +# that want to enable this cop which is disabled by default. +# +# When `AllCops/UseProjectIndex` is enabled and the `rubydex` gem is +# installed, only genuinely ambiguous constants are reported: those +# that resolve to a different declaration through the surrounding +# nesting than they would fully qualified. This makes the cop practical +# to enable without `Only`/`Ignore` lists. +# +# @example +# # By default checks every constant +# +# # bad +# User +# +# # bad +# User::Login +# +# # good +# ::User +# +# # good +# ::User::Login +# +# @example Only: ['Login'] +# # Restrict this cop to only being concerned about certain constants +# +# # bad +# Login +# +# # good +# ::Login +# +# # good +# User::Login +# +# @example Ignore: ['Login'] +# # Restrict this cop not being concerned about certain constants +# +# # bad +# User +# +# # good +# ::User::Login +# +# # good +# Login +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/constant_resolution.rb:68 +class RuboCop::Cop::Lint::ConstantResolution < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ProjectIndexHelp + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_resolution.rb:78 + def on_const(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_resolution.rb:74 + def unqualified_const?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_resolution.rb:108 + def allowed_names; end + + # When `AllCops/UseProjectIndex` is enabled, only genuinely ambiguous + # references are reported: the constant resolves to a different + # declaration through the lexical nesting than it would fully + # qualified. Names that resolve identically either way, or that the + # index cannot resolve at all (e.g. constants from gems), are not + # reported. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_resolution.rb:93 + def ambiguous_resolution?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_resolution.rb:103 + def const_name?(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_resolution.rb:112 + def ignored_names; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/constant_resolution.rb:71 +RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String) + +# are strictly formatted. +# +# A comment can be added to the directive by prefixing it with `--`. +# +# @example +# # bad +# +# # good +# +# # bad +# +# # good +# +# # bad - only the first directive takes effect +# +# # good +# +# # bad +# +# # good +# +# # bad +# +# # good +# +# # bad +# # rucocop:disable Layout/LineLength +# +# # good +# +# # bad +# +# # good +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:54 +class RuboCop::Cop::Lint::CopDirectiveSyntax < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:80 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:94 + def check_directive(comment, directive_comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:224 + def directive_names(directive_comment); end + + # Anything written between the directives is a `--` reason or prose, + # and merging around it would either move it or drop it. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:144 + def directives_adjacent?(comment, directives); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:120 + def filter_reason_matches(matches, directive_comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:126 + def merge_directives(corrector, comment, directives); end + + # `all` covers every cop already, so folding it into a list of names + # would be a rewrite rather than a merge. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:136 + def merged_cops(directives); end + + # `todo` is an alias of `disable`, so those two combine. Anything else + # (an `enable` beside a `disable`, or directives of different scopes) + # means different things per directive and can't be folded into one. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:154 + def merged_mode(directives); end + + # An EOL next-statement directive is not honored - it must fail + # loudly instead of silently doing nothing. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:164 + def misplaced_next_directive?(directive_comment); end + + # Everything after the first directive in a comment is trailing text as + # far as the parser is concerned, so a second directive written on the + # same line disables nothing at all. A valid `--` reason may mention a + # directive as plain text, which should not be treated as another one. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:112 + def multiple_directives(comment, directive_comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:194 + def near_miss_keyword(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:169 + def next_statement_directive?(directive_comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:175 + def offense_message(directive_comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:204 + def similar_to_rubocop?(keyword); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:232 + def unknown_cop_message(directive_comment, name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:212 + def unknown_cop_name(directive_comment); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:57 +RuboCop::Cop::Lint::CopDirectiveSyntax::COMMON_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:70 +RuboCop::Cop::Lint::CopDirectiveSyntax::INVALID_KEYWORD_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:60 +RuboCop::Cop::Lint::CopDirectiveSyntax::INVALID_MODE_NAME_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:66 +RuboCop::Cop::Lint::CopDirectiveSyntax::INVALID_SIGNED_ARGS_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:64 +RuboCop::Cop::Lint::CopDirectiveSyntax::MALFORMED_COP_NAMES_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:61 +RuboCop::Cop::Lint::CopDirectiveSyntax::MISSING_COP_NAME_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:59 +RuboCop::Cop::Lint::CopDirectiveSyntax::MISSING_MODE_NAME_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:62 +RuboCop::Cop::Lint::CopDirectiveSyntax::MULTIPLE_DIRECTIVES_MSG = T.let(T.unsafe(nil), String) + +# A comment that looks like an attempted directive: any keyword +# followed by a colon and a valid mode name. +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:75 +RuboCop::Cop::Lint::CopDirectiveSyntax::NEAR_MISS_KEYWORD_REGEXP = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:68 +RuboCop::Cop::Lint::CopDirectiveSyntax::NEXT_DIRECTIVE_AT_EOL_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/cop_directive_syntax.rb:71 +RuboCop::Cop::Lint::CopDirectiveSyntax::UNKNOWN_COP_MSG = T.let(T.unsafe(nil), String) + +# Checks unexpected overrides of the `Data` built-in methods +# via `Data.define`. +# +# @example +# # bad +# Bad = Data.define(:members, :clone, :to_s) +# b = Bad.new(members: [], clone: true, to_s: 'bad') +# b.members #=> [] (overriding `Data#members`) +# b.clone #=> true (overriding `Object#clone`) +# b.to_s #=> "bad" (overriding `Data#to_s`) +# +# # good +# Good = Data.define(:id, :name) +# g = Good.new(id: 1, name: "foo") +# g.members #=> [:id, :name] +# g.clone #=> # +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/data_define_override.rb:23 +class RuboCop::Cop::Lint::DataDefineOverride < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/data_define_override.rb:41 + def data_define(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/data_define_override.rb:46 + def on_send(node); end +end + +# This is based on `Data.define.instance_methods.sort` in Ruby 4.0.0. +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/data_define_override.rb:28 +RuboCop::Cop::Lint::DataDefineOverride::DATA_METHOD_NAMES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/data_define_override.rb:38 +RuboCop::Cop::Lint::DataDefineOverride::MEMBER_NAME_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/data_define_override.rb:24 +RuboCop::Cop::Lint::DataDefineOverride::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/data_define_override.rb:25 +RuboCop::Cop::Lint::DataDefineOverride::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for debug calls (such as `debugger` or `binding.pry`) that should +# not be kept for production code. +# +# The cop can be configured using `DebuggerMethods`. By default, a number of gems +# debug entrypoints are configured (`Kernel`, `Byebug`, `Capybara`, `debug.rb`, +# `Pry`, `Rails`, `RubyJard`, and `WebConsole`). Additional methods can be added. +# +# Specific default groups can be disabled if necessary: +# +# [source,yaml] +# ---- +# Lint/Debugger: +# DebuggerMethods: +# WebConsole: ~ +# ---- +# +# You can also add your own methods by adding a new category: +# +# [source,yaml] +# ---- +# Lint/Debugger: +# DebuggerMethods: +# MyDebugger: +# MyDebugger.debug_this +# ---- +# +# Some gems also ship files that will start a debugging session when required, +# for example `require 'debug/start'` from `ruby/debug`. These requires can +# be configured through `DebuggerRequires`. It has the same structure as +# `DebuggerMethods`, which you can read about above. +# +# @example +# +# # bad (ok during development) +# +# # using pry +# def some_method +# binding.pry +# do_something +# end +# +# # bad (ok during development) +# +# # using byebug +# def some_method +# byebug +# do_something +# end +# +# # good +# +# def some_method +# do_something +# end +# +# @example DebuggerMethods: [my_debugger] +# +# # bad (ok during development) +# +# def some_method +# my_debugger +# end +# +# @example DebuggerRequires: [my_debugger/start] +# +# # bad (ok during development) +# +# require 'my_debugger/start' +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/debugger.rb:74 +class RuboCop::Cop::Lint::Debugger < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/debugger.rb:77 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/debugger.rb:147 + def assumed_argument?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/debugger.rb:126 + def assumed_usage_context?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/debugger.rb:136 + def chained_method_name(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/debugger.rb:104 + def debugger_method?(send_node); end + + # The last segment of each configured debugger method, used to cheaply + # rule out the vast majority of `send` nodes before building the + # chained method name. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/debugger.rb:113 + def debugger_method_names; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/debugger.rb:90 + def debugger_methods; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/debugger.rb:119 + def debugger_require?(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/debugger.rb:97 + def debugger_requires; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/debugger.rb:86 + def message(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/debugger.rb:75 +RuboCop::Cop::Lint::Debugger::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of the deprecated class method usages. +# +# @example +# +# # bad +# File.exists?(some_path) +# Dir.exists?(some_path) +# iterator? +# attr :name, true +# attr :name, false +# ENV.freeze # Calling `Env.freeze` raises `TypeError` since Ruby 2.7. +# ENV.clone +# ENV.dup # Calling `Env.dup` raises `TypeError` since Ruby 3.1. +# Socket.gethostbyname(host) +# Socket.gethostbyaddr(host) +# +# # good +# File.exist?(some_path) +# Dir.exist?(some_path) +# block_given? +# attr_accessor :name +# attr_reader :name +# ENV # `ENV.freeze` cannot prohibit changes to environment variables. +# ENV.to_h +# ENV.to_h # `ENV.dup` cannot dup `ENV`, use `ENV.to_h` to get a copy of `ENV` as a hash. +# Addrinfo.getaddrinfo(nodename, service) +# Addrinfo.tcp(host, port).getnameinfo +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_class_methods.rb:33 +class RuboCop::Cop::Lint::DeprecatedClassMethods < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_class_methods.rb:53 + def deprecated_class_method?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_class_methods.rb:63 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_class_methods.rb:112 + def dir_env_file_const?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_class_methods.rb:83 + def offense_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_class_methods.rb:93 + def preferred_method(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_class_methods.rb:108 + def socket_const?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_class_methods.rb:50 +RuboCop::Cop::Lint::DeprecatedClassMethods::DIR_ENV_FILE_CONSTANTS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_class_methods.rb:36 +RuboCop::Cop::Lint::DeprecatedClassMethods::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_class_methods.rb:41 +RuboCop::Cop::Lint::DeprecatedClassMethods::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_class_methods.rb:37 +RuboCop::Cop::Lint::DeprecatedClassMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for deprecated constants. +# +# It has `DeprecatedConstants` config. If there is an alternative method, you can set +# alternative value as `Alternative`. And you can set the deprecated version as +# `DeprecatedVersion`. These options can be omitted if they are not needed. +# +# DeprecatedConstants: +# 'DEPRECATED_CONSTANT': +# Alternative: 'alternative_value' +# DeprecatedVersion: 'deprecated_version' +# +# By default, `NIL`, `TRUE`, `FALSE`, `Net::HTTPServerException`, `Random::DEFAULT`, +# `Struct::Group`, and `Struct::Passwd` are configured. +# +# @example +# +# # bad +# NIL +# TRUE +# FALSE +# Net::HTTPServerException +# Random::DEFAULT # Return value of Ruby 2 is `Random` instance, Ruby 3.0 is `Random` class. +# Struct::Group +# Struct::Passwd +# +# # good +# nil +# true +# false +# Net::HTTPClientException +# Random.new # `::DEFAULT` has been deprecated in Ruby 3, `.new` is compatible with Ruby 2. +# Etc::Group +# Etc::Passwd +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_constants.rb:40 +class RuboCop::Cop::Lint::DeprecatedConstants < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_constants.rb:46 + def on_const(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_constants.rb:76 + def deprecated_constants; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_constants.rb:66 + def message(good, bad, deprecated_version); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_constants.rb:44 +RuboCop::Cop::Lint::DeprecatedConstants::DO_NOT_USE_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_constants.rb:43 +RuboCop::Cop::Lint::DeprecatedConstants::SUGGEST_GOOD_MSG = T.let(T.unsafe(nil), String) + +# Algorithmic constants for `OpenSSL::Cipher` and `OpenSSL::Digest` +# deprecated since OpenSSL version 2.2.0. Prefer passing a string +# instead. +# +# @example +# +# # bad +# OpenSSL::Cipher::AES.new(128, :GCM) +# +# # good +# OpenSSL::Cipher.new('aes-128-gcm') +# +# # bad +# OpenSSL::Digest::SHA256.new +# +# # good +# OpenSSL::Digest.new('SHA256') +# +# # bad +# OpenSSL::Digest::SHA256.digest('foo') +# +# # good +# OpenSSL::Digest.digest('SHA256', 'foo') +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb:30 +class RuboCop::Cop::Lint::DeprecatedOpenSSLConstant < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb:40 + def algorithm_const(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb:50 + def digest_const?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb:54 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb:101 + def algorithm_name(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb:66 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb:133 + def build_cipher_arguments(node, algorithm_name, no_arguments); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb:93 + def correction_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb:78 + def message(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb:97 + def openssl_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb:119 + def replacement_args(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb:111 + def sanitize_arguments(arguments); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb:34 +RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb:37 +RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::NO_ARG_ALGORITHM = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb:36 +RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for calls to methods and references to constants that are documented +# as deprecated with a YARD `@deprecated` tag. +# +# The check is powered by the project-wide index, so it only runs when +# `AllCops/UseProjectIndex` is enabled and the `rubydex` gem is installed. +# Without the index the cop does nothing. +# +# Only references that can be resolved without type inference are checked: +# constants, method calls without an explicit receiver (or with `self`), +# which are looked up in the enclosing class or module and its ancestry, +# and calls whose receiver is a constant, which are looked up in that +# namespace's singleton class. Calls on arbitrary objects are not checked. +# +# References made from a definition that is itself deprecated are allowed, +# so deprecated implementations can keep calling each other. +# +# @example +# # Given a deprecated method and constant: +# # +# # class Api +# # # @deprecated Use `#new_method` instead. +# # def old_method +# # end +# # +# # # @deprecated +# # OLD_TIMEOUT = 10 +# # end +# +# # bad +# class Client < Api +# def call +# old_method +# end +# +# def timeout +# OLD_TIMEOUT +# end +# end +# +# # good +# class Client < Api +# def call +# new_method +# end +# +# def timeout +# NEW_TIMEOUT +# end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_reference.rb:56 +class RuboCop::Cop::Lint::DeprecatedReference < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ProjectIndexHelp + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_reference.rb:82 + def on_const(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_reference.rb:80 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_reference.rb:65 + def on_new_investigation; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_reference.rb:70 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_reference.rb:117 + def const_receiver_declaration(node, receiver); end + + # Enumerated in a single pass that stops at the first non-deprecated + # definition, since materializing every definition of a declaration + # that is almost never deprecated dominates the cop's cost. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_reference.rb:156 + def deprecated?(declaration); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_reference.rb:184 + def deprecation_text(declaration); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_reference.rb:177 + def detail_for(declaration); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_reference.rb:124 + def enclosing_namespace(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_reference.rb:106 + def implicit_receiver_declaration(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_reference.rb:96 + def method_declaration_for(node); end + + # Whether an implicit-receiver call runs with the class or module itself + # as `self` (directly in a namespace body, in a singleton method, or + # inside `class << self`) rather than inside an instance method. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_reference.rb:136 + def singleton_context?(node); end + + # References from a definition that is itself documented as deprecated + # are allowed. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_reference.rb:170 + def within_deprecated_definition?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_reference.rb:60 +RuboCop::Cop::Lint::DeprecatedReference::CONSTANT_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_reference.rb:62 +RuboCop::Cop::Lint::DeprecatedReference::DEPRECATED_TAG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_reference.rb:63 +RuboCop::Cop::Lint::DeprecatedReference::DEPRECATION_DETAIL = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/deprecated_reference.rb:59 +RuboCop::Cop::Lint::DeprecatedReference::METHOD_MSG = T.let(T.unsafe(nil), String) + +# Checks constructors for disjunctive assignments (`||=`) that should +# be plain assignments. +# +# So far, this cop is only concerned with disjunctive assignment of +# instance variables. +# +# In ruby, an instance variable is nil until a value is assigned, so the +# disjunction is unnecessary. A plain assignment has the same effect. +# +# @safety +# This cop is unsafe because it can register a false positive when a +# method is redefined in a subclass that calls super. For example: +# +# [source,ruby] +# ---- +# class Base +# def initialize +# @config ||= 'base' +# end +# end +# +# class Derived < Base +# def initialize +# @config = 'derived' +# super +# end +# end +# ---- +# +# Without the disjunctive assignment, `Derived` will be unable to override +# the value for `@config`. +# +# @example +# # bad +# def initialize +# @x ||= 1 +# end +# +# # good +# def initialize +# @x = 1 +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb:48 +class RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb:53 + def on_def(node); end + + private + + # @param [DefNode] node a constructor definition + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb:60 + def check(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb:66 + def check_body(body); end + + # @param [Array] lines the logical lines of the constructor + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb:78 + def check_body_lines(lines); end + + # Add an offense if the LHS of the given disjunctive assignment is + # an instance variable. + # + # For now, we only care about assignments to instance variables. + # + # @param [Node] node a disjunctive assignment + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb:99 + def check_disjunctive_assignment(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb:51 +RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor::MSG = T.let(T.unsafe(nil), String) + +# Checks that there are no repeated bodies +# within `if/unless`, `case-when`, `case-in` and `rescue` constructs. +# +# With `IgnoreLiteralBranches: true`, branches are not registered +# as offenses if they return a basic literal value (string, symbol, +# integer, float, rational, complex, `true`, `false`, or `nil`), or +# return an array, hash, regexp or range that only contains one of +# the above basic literal values. +# +# With `IgnoreConstantBranches: true`, branches are not registered +# as offenses if they return a constant value. +# +# With `IgnoreDuplicateElseBranch: true`, in conditionals with multiple branches, +# duplicate 'else' branches are not registered as offenses. +# +# @example +# # bad +# if foo +# do_foo +# do_something_else +# elsif bar +# do_foo +# do_something_else +# end +# +# # good +# if foo || bar +# do_foo +# do_something_else +# end +# +# # bad +# case x +# when foo +# do_foo +# when bar +# do_foo +# else +# do_something_else +# end +# +# # good +# case x +# when foo, bar +# do_foo +# else +# do_something_else +# end +# +# # bad +# begin +# do_something +# rescue FooError +# handle_error +# rescue BarError +# handle_error +# end +# +# # good +# begin +# do_something +# rescue FooError, BarError +# handle_error +# end +# +# @example IgnoreLiteralBranches: true +# # good +# case size +# when "small" then 100 +# when "medium" then 250 +# when "large" then 1000 +# else 250 +# end +# +# @example IgnoreConstantBranches: true +# # good +# case size +# when "small" then SMALL_SIZE +# when "medium" then MEDIUM_SIZE +# when "large" then LARGE_SIZE +# else MEDIUM_SIZE +# end +# +# @example IgnoreDuplicateElseBranch: true +# # good +# if foo +# do_foo +# elsif bar +# do_bar +# else +# do_foo +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:99 +class RuboCop::Cop::Lint::DuplicateBranch < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:102 + def on_branching_statement(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:110 + def on_case(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:111 + def on_case_match(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:114 + def on_if(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:112 + def on_rescue(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:136 + def branches(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:140 + def consider_branch?(branches, branch); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:174 + def const_branch?(branch); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:178 + def duplicate_else_branch?(branches, branch); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:155 + def ignore_constant_branches?; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:159 + def ignore_duplicate_else_branches?; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:151 + def ignore_literal_branches?; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:163 + def literal_branch?(branch); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:122 + def offense_range(duplicate_branch); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_branch.rb:100 +RuboCop::Cop::Lint::DuplicateBranch::MSG = T.let(T.unsafe(nil), String) + +# Checks that there are no repeated conditions +# used in case 'when' expressions. +# +# @example +# +# # bad +# case x +# when 'first' +# do_something +# when 'first' +# do_something_else +# end +# +# # good +# case x +# when 'first' +# do_something +# when 'second' +# do_something_else +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_case_condition.rb:26 +class RuboCop::Cop::Lint::DuplicateCaseCondition < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_case_condition.rb:29 + def on_case(case_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_case_condition.rb:27 +RuboCop::Cop::Lint::DuplicateCaseCondition::MSG = T.let(T.unsafe(nil), String) + +# Checks that there are no repeated conditions used in if 'elsif'. +# +# @example +# # bad +# if x == 1 +# do_something +# elsif x == 1 +# do_something_else +# end +# +# # good +# if x == 1 +# do_something +# elsif x == 2 +# do_something_else +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_elsif_condition.rb:23 +class RuboCop::Cop::Lint::DuplicateElsifCondition < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_elsif_condition.rb:26 + def on_if(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_elsif_condition.rb:24 +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. +# +# @example +# +# # bad +# hash = { food: 'apple', food: 'orange' } +# +# # good +# hash = { food: 'apple', other_food: 'orange' } +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_hash_key.rb:18 +class RuboCop::Cop::Lint::DuplicateHashKey < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Duplication + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_hash_key.rb:23 + def on_hash(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_hash_key.rb:21 +RuboCop::Cop::Lint::DuplicateHashKey::MSG = T.let(T.unsafe(nil), String) + +# Checks for duplicated magic comments. +# +# @example +# +# # bad +# +# +# # good +# +# +# # bad +# +# +# # good +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_magic_comment.rb:28 +class RuboCop::Cop::Lint::DuplicateMagicComment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FrozenStringLiteral + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_magic_comment.rb:35 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_magic_comment.rb:51 + def magic_comment_lines; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_magic_comment.rb:65 + def register_offense(range); end +end + +# pkg:gem/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 0 | 1 +# first_method +# in 1 | 0 +# second_method +# end +# +# # good +# case x +# in 0 | 1 +# first_method +# in 2 | 3 +# 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 +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_match_pattern.rb:90 +class RuboCop::Cop::Lint::DuplicateMatchPattern < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::TargetRubyVersion + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_match_pattern.rb:97 + def on_case_match(case_node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_match_pattern.rb:108 + def pattern_identity(pattern); end +end + +# pkg:gem/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. +# +# NOTE: Aliasing a method to itself is allowed, as it indicates that +# the developer intends to suppress Ruby's method redefinition warnings. +# See https://bugs.ruby-lang.org/issues/13574. +# +# By default the cop can only detect duplicates within a single file. +# When `AllCops/UseProjectIndex` is enabled and the `rubydex` gem is installed, +# the cop additionally consults the project-wide index and reports methods +# whose duplicate definition lives in another file. +# +# NOTE: The project index does not record whether a definition in another +# file is wrapped in a conditional, so a platform-specific redefinition in +# another file may still be reported. Aliasing the method to itself (see above) +# before redefining marks the redefinition as intentional and is respected +# across files. With `AllCops/ActiveSupportExtensionsEnabled: true`, Active +# Support's redefinition markers (`silence_redefinition_of_method` and +# `redefine_method`) are honored the same way. +# +# NOTE: Methods defined with `define_method` are not recorded in the project +# index, so a duplicate whose other definition uses `define_method` cannot +# be detected across files. +# +# Cross-file duplicates whose other definition lives in a file matching one +# of the `AllowedCrossFilePaths` patterns are not reported. This suits files +# that redefine application methods but are never loaded together with them, +# such as standalone scripts. Patterns are matched with the same glob (or +# regexp) semantics as `Exclude`, against the other file's path relative to +# the directory of the `.rubocop.yml` that configures the cop; absolute +# patterns are matched against the absolute path. Offenses inside such files +# themselves are best silenced with an ordinary per-cop `Exclude`. +# +# @example +# +# # bad +# def foo +# 1 +# end +# +# def foo +# 2 +# end +# +# # bad +# def foo +# 1 +# end +# +# alias foo bar +# +# # good +# def foo +# 1 +# end +# +# def bar +# 2 +# end +# +# # good +# def foo +# 1 +# end +# +# alias bar foo +# +# # good +# alias foo foo +# def foo +# 1 +# end +# +# # good +# alias_method :foo, :foo +# def foo +# 1 +# end +# +# # bad +# class MyClass +# extend Forwardable +# +# # or with: `def_instance_delegator`, `def_delegators`, `def_instance_delegators` +# def_delegator :delegation_target, :delegated_method_name +# +# def delegated_method_name +# end +# end +# +# # good +# class MyClass +# extend Forwardable +# +# def_delegator :delegation_target, :delegated_method_name +# +# def non_duplicated_delegated_method_name +# end +# end +# +# @example AllCops:ActiveSupportExtensionsEnabled: false (default) +# +# # good +# def foo +# 1 +# end +# +# delegate :foo, to: :bar +# +# @example AllCops:ActiveSupportExtensionsEnabled: true +# +# # bad +# def foo +# 1 +# end +# +# delegate :foo, to: :bar +# +# # good +# def foo +# 1 +# end +# +# delegate :baz, to: :bar +# +# # good - delegate with splat arguments is ignored +# def foo +# 1 +# end +# +# delegate :foo, **options +# +# # good - delegate inside a condition is ignored +# def foo +# 1 +# end +# +# if cond +# delegate :foo, to: :bar +# end +# +# # good - Active Support's redefinition markers signal an intentional +# # redefinition of a method defined in another file +# silence_redefinition_of_method :foo +# def foo +# 1 +# end +# +# @example AllowedCrossFilePaths: ['script/**/*'] (default: []) +# # Cross-file duplicates whose other definition lives in a file +# # matching one of the patterns are not reported. +# +# # good - assuming `AppHelper#format` is also defined in +# # `script/backfill.rb`, which is never loaded with this file +# class AppHelper +# def format +# end +# end +# +# @example DelegatingMethods: ['delegate', 'expose'] (default: ['delegate']) +# # A project's own `delegate`-shaped macros can be registered so the +# # methods they define are recognized (with +# # `AllCops/ActiveSupportExtensionsEnabled: true`). +# +# # bad +# def foo +# 1 +# end +# +# expose :foo, to: :bar +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:177 +class RuboCop::Cop::Lint::DuplicateMethods < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ProjectIndexHelp + + # No `RESTRICT_ON_SEND`: the delegating method names are configurable + # (`DelegatingMethods`), so `on_send` must see every call. The handler + # returns quickly for calls that are not method definitions, and + # benchmarks show no measurable cost over the previous fixed list. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:192 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:283 + def active_support_redefinition_marker(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:245 + def alias_method?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:298 + def class_new_block?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:291 + def class_or_module_new_block?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:253 + def delegate_args(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:261 + def delegator?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:271 + def delegators?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:227 + def method_alias?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:231 + def on_alias(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:207 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:215 + def on_defs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:199 + def on_new_investigation; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:304 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:288 + def sym_name(param0 = T.unsafe(nil)); end + + private + + # Cross-file duplicates whose other definition site matches one of the + # `AllowedCrossFilePaths` patterns are skipped (e.g. standalone scripts that + # are never loaded together with the code they redefine). Patterns are + # matched like `Exclude` patterns, against the path relative to the + # directory of the config file that configures the cop; absolute patterns + # are matched against the absolute path. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:636 + def allowed_cross_file_path?(path); end + + # `AllowedCrossFilePaths` also covers duplicates detected without the index, + # when the cop instance carries definitions over from an earlier file of the + # same run. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:504 + def allowed_cross_file_redefinition?(node, key); end + + # Internal identity for an anonymous block, used as a scope key. + # Includes the source range's begin position to distinguish blocks + # that share the same line (e.g. two Class.new calls separated by `;`). + # The user-facing offense message still uses `source_location`, which + # shows only `path:line`. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:716 + def anon_block_identity(anon_block); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:436 + def anon_block_scope_id(anon_block); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:427 + def anonymous_class_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:340 + def check_const_receiver(node, name, const_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:606 + def check_cross_file_duplicate(node, method_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:347 + def check_self_receiver(node, name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:618 + def cross_file_prior_definition(method_name); end + + # An Active Support redefinition marker alongside one of the definitions in + # another file marks the redefinition there as intentional, like the + # self-alias trick. The index does not record the marker's method-name + # argument, so the other file's source is searched for a marker naming + # the method. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:685 + def cross_file_redefinition_marker?(definitions, name); end + + # An alias of the method alongside one of its definitions in another file may be + # the self-alias trick marking an intentional redefinition there, so no offense + # is registered. A genuine `alias` duplicate is still reported when the alias + # itself is inspected. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:671 + def cross_file_self_alias_trick?(definitions); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:389 + def delegate_prefix(node); end + + # Recognizing a delegating call as a method definition is Active + # Support behavior, so it stays gated on `ActiveSupportExtensionsEnabled` + # as it was when only `delegate` was supported. `DelegatingMethods` lets + # a project register its own `delegate`-shaped macros. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:370 + def delegating_method?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:375 + def delegating_methods; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:702 + def first_indexed_definition(definitions); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:558 + def found_attr(node, args, readable: T.unsafe(nil), writable: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:405 + def found_instance_method(node, name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:476 + def found_method(node, method_name, scope_id: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:489 + def found_redefinition(node, method_name, key, scope); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:466 + def found_sclass_method(node, name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:401 + def hash_value(node, key); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:419 + def humanize_scope(scope); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:706 + def index_source_location(definition); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:658 + def indexed_declaration_definitions(namespace, name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:644 + def indexed_definitions(owner, separator, name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:357 + def inside_condition?(node); end + + # The self-alias trick (`alias foo foo` or `alias_method :foo, :foo` right before + # a `def`) suppresses Ruby's method redefinition warning, signaling an intentional + # redefinition of a method defined in another file. Active Support's redefinition + # markers (tracked when `ActiveSupportExtensionsEnabled` is on) signal the same. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:515 + def intentional_cross_file_redefinition?(node, method_name, key); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:536 + def location(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:568 + def lookup_constant(node, const_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:361 + def message_for_dup(node, method_name, key); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:528 + def method_key(node, method_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:461 + def named_receiver(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:544 + def on_attr(node, attr_name, args); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:379 + def on_delegate(node, method_names); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:586 + def qualified_name(enclosing, namespace, mod_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:693 + def redefinition_marker_in_file?(path, name); end + + # When a Class.new block is passed as an argument to a named-receiver + # method call (e.g. T.cast(Class.new(Base) do ... end, ...)), the + # receiver-based scope id (e.g. "T.cast") is the same for every call, + # causing false positives for methods defined in distinct anonymous + # classes. Return nil so the block falls through to the unique + # source-location-based scope id. + # Module.new blocks are excluded because they may be intentionally + # mixed into the same target via prepend/include/extend. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:455 + def scope_receiver(parent, anon_block); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:600 + def source_location(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:521 + def track_intentional_redefinition(node, name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:662 + def writer_attr_definition?(definition); end +end + +# Method names the cop registers that can be looked up in the project index: +# a fully qualified namespace followed by `#` (instance) or `.` (singleton) +# and the method name. +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:185 +RuboCop::Cop::Lint::DuplicateMethods::INDEXABLE_METHOD_NAME = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:180 +RuboCop::Cop::Lint::DuplicateMethods::MSG = T.let(T.unsafe(nil), String) + +# Checks for duplicate elements in `Regexp` character classes. +# +# @example +# +# # bad +# r = /[xyx]/ +# +# # bad +# r = /[0-9x0-9]/ +# +# # good +# r = /[xy]/ +# +# # good +# r = /[0-9x]/ +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb:21 +class RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb:35 + def each_repeated_character_class_element_loc(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb:27 + def on_regexp(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb:52 + def group_expressions(node, expressions); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb:73 + def interpolation_locs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb:60 + def skip_expression?(expr); 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 + # that are within an interpolation. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb:67 + def within_interpolation?(node, child); end +end + +# pkg:gem/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) + +# Checks for duplicate ``require``s and ``require_relative``s. +# +# @safety +# This cop's autocorrection is unsafe because it may break the dependency order +# of `require`. +# +# @example +# # bad +# require 'foo' +# require 'bar' +# require 'foo' +# +# # good +# require 'foo' +# require 'bar' +# +# # good +# require 'foo' +# require_relative 'foo' +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_require.rb:26 +class RuboCop::Cop::Lint::DuplicateRequire < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_require.rb:39 + def on_new_investigation; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_require.rb:45 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_require.rb:35 + def require_call?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_require.rb:30 +RuboCop::Cop::Lint::DuplicateRequire::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_require.rb:31 +RuboCop::Cop::Lint::DuplicateRequire::REQUIRE_METHODS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_require.rb:32 +RuboCop::Cop::Lint::DuplicateRequire::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# Checks that there are no repeated exceptions +# used in 'rescue' expressions. +# +# @example +# # bad +# begin +# something +# rescue FirstException +# handle_exception +# rescue FirstException +# handle_other_exception +# end +# +# # good +# begin +# something +# rescue FirstException +# handle_exception +# rescue SecondException +# handle_other_exception +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_rescue_exception.rb:28 +class RuboCop::Cop::Lint::DuplicateRescueException < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RescueNode + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_rescue_exception.rb:33 + def on_rescue(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_rescue_exception.rb:31 +RuboCop::Cop::Lint::DuplicateRescueException::MSG = T.let(T.unsafe(nil), String) + +# Checks for duplicate literal, constant, or variable elements in `Set` and `SortedSet`. +# +# @example +# +# # bad +# Set[:foo, :bar, :foo] +# +# # good +# Set[:foo, :bar] +# +# # bad +# Set.new([:foo, :bar, :foo]) +# +# # good +# Set.new([:foo, :bar]) +# +# # bad +# [:foo, :bar, :foo].to_set +# +# # good +# [:foo, :bar].to_set +# +# # bad +# SortedSet[:foo, :bar, :foo] +# +# # good +# SortedSet[:foo, :bar] +# +# # bad +# SortedSet.new([:foo, :bar, :foo]) +# +# # good +# SortedSet.new([:foo, :bar]) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_set_element.rb:39 +class RuboCop::Cop::Lint::DuplicateSetElement < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_set_element.rb:71 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_set_element.rb:54 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_set_element.rb:46 + def set_init_elements(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_set_element.rb:75 + def register_offense(current_element, prev_element, node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_set_element.rb:42 +RuboCop::Cop::Lint::DuplicateSetElement::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_set_element.rb:43 +RuboCop::Cop::Lint::DuplicateSetElement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks if each_with_object is called with an immutable +# argument. Since the argument is the object that the given block shall +# make calls on to build something based on the enumerable that +# each_with_object iterates over, an immutable argument makes no sense. +# It's definitely a bug. +# +# @example +# +# # bad +# sum = numbers.each_with_object(0) { |e, a| a += e } +# +# # good +# num = 0 +# sum = numbers.each_with_object(num) { |e, a| a += e } +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/each_with_object_argument.rb:20 +class RuboCop::Cop::Lint::EachWithObjectArgument < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/each_with_object_argument.rb:25 + def each_with_object?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/each_with_object_argument.rb:36 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/each_with_object_argument.rb:29 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/each_with_object_argument.rb:21 +RuboCop::Cop::Lint::EachWithObjectArgument::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/each_with_object_argument.rb:22 +RuboCop::Cop::Lint::EachWithObjectArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for odd `else` block layout - like +# having an expression on the same line as the `else` keyword, +# which is usually a mistake. +# +# Its autocorrection tweaks layout to keep the syntax. So, this autocorrection +# is compatible correction for bad case syntax, but if your code makes a mistake +# with `elsif` and `else`, you will have to correct it manually. +# +# @example +# +# # bad +# +# if something +# # ... +# else do_this +# do_that +# end +# +# # good +# +# # This code is compatible with the bad case. It will be autocorrected like this. +# if something +# # ... +# else +# do_this +# do_that +# end +# +# # This code is incompatible with the bad case. +# # If `do_this` is a condition, `elsif` should be used instead of `else`. +# if something +# # ... +# elsif do_this +# do_that +# end +# +# # bad +# +# # For single-line conditionals using `then` the layout is disallowed +# # when the `else` body is multiline because it is treated as a lint offense. +# if something then on_the_same_line_as_then +# else first_line +# second_line +# end +# +# # good +# +# # For single-line conditional using `then` the layout is allowed +# # when `else` body is a single-line because it is treated as intentional. +# +# if something then on_the_same_line_as_then +# else single_line +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/else_layout.rb:59 +class RuboCop::Cop::Lint::ElseLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/else_layout.rb:66 + def on_if(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/else_layout.rb:98 + def autocorrect(corrector, node, first_else); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/else_layout.rb:78 + def check(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/else_layout.rb:88 + def check_else(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/else_layout.rb:64 +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 +# to clarify what we're aiming for. +# +# Empty lambdas and procs are ignored by default. +# +# NOTE: For backwards compatibility, the configuration that allows/disallows +# empty lambdas and procs is called `AllowEmptyLambdas`, even though it also +# applies to procs. +# +# @example +# # bad +# items.each { |item| } +# +# # good +# items.each { |item| puts item } +# +# @example AllowComments: true (default) +# # good +# items.each do |item| +# # TODO: implement later (inner comment) +# end +# +# items.each { |item| } # TODO: implement later (inline comment) +# +# @example AllowComments: false +# # bad +# items.each do |item| +# # TODO: implement later (inner comment) +# end +# +# items.each { |item| } # TODO: implement later (inline comment) +# +# @example AllowEmptyLambdas: true (default) +# # good +# allow(subject).to receive(:callable).and_return(-> {}) +# +# placeholder = lambda do +# end +# (callable || placeholder).call +# +# proc { } +# +# Proc.new { } +# +# @example AllowEmptyLambdas: false +# # bad +# allow(subject).to receive(:callable).and_return(-> {}) +# +# placeholder = lambda do +# end +# (callable || placeholder).call +# +# proc { } +# +# Proc.new { } +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_block.rb:63 +class RuboCop::Cop::Lint::EmptyBlock < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_block.rb:66 + def on_block(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_block.rb:76 + def allow_comment?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_block.rb:83 + def allow_empty_lambdas?; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_block.rb:87 + def comment_disables_cop?(comment); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_block.rb:64 +RuboCop::Cop::Lint::EmptyBlock::MSG = T.let(T.unsafe(nil), String) + +# Checks for classes and metaclasses without a body. +# Such empty classes and metaclasses are typically an oversight or we should provide a comment +# to be clearer what we're aiming for. +# +# @example +# # bad +# class Foo +# end +# +# class Bar +# class << self +# end +# end +# +# class << obj +# end +# +# # good +# class Foo +# def do_something +# # ... code +# end +# end +# +# class Bar +# class << self +# attr_reader :bar +# end +# end +# +# class << obj +# attr_reader :bar +# end +# +# @example AllowComments: false (default) +# # bad +# class Foo +# # TODO: implement later +# end +# +# class Bar +# class << self +# # TODO: implement later +# end +# end +# +# class << obj +# # TODO: implement later +# end +# +# @example AllowComments: true +# # good +# class Foo +# # TODO: implement later +# end +# +# class Bar +# class << self +# # TODO: implement later +# end +# end +# +# class << obj +# # TODO: implement later +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_class.rb:72 +class RuboCop::Cop::Lint::EmptyClass < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_class.rb:76 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_class.rb:81 + def on_sclass(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_class.rb:87 + def body_or_allowed_comment_lines?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_class.rb:73 +RuboCop::Cop::Lint::EmptyClass::CLASS_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_class.rb:74 +RuboCop::Cop::Lint::EmptyClass::METACLASS_MSG = T.let(T.unsafe(nil), String) + +# Checks for the presence of `if`, `elsif` and `unless` branches without a body. +# +# NOTE: empty `else` branches are handled by `Style/EmptyElse`. +# +# @example +# # bad +# if condition +# end +# +# # bad +# unless condition +# end +# +# # bad +# if condition +# do_something +# elsif other_condition +# end +# +# # good +# if condition +# do_something +# end +# +# # good +# unless condition +# do_something +# end +# +# # good +# if condition +# do_something +# elsif other_condition +# nil +# end +# +# # good +# if condition +# do_something +# elsif other_condition +# do_something_else +# end +# +# @example AllowComments: true (default) +# # good +# if condition +# do_something +# elsif other_condition +# # noop +# end +# +# @example AllowComments: false +# # bad +# if condition +# do_something +# elsif other_condition +# # noop +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:65 +class RuboCop::Cop::Lint::EmptyConditionalBody < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CommentsHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:71 + def on_if(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:86 + def allow_comments?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:132 + def branch_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:99 + def can_simplify_conditional?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:140 + def deletion_range(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:128 + def else_branch?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:120 + def empty_if_branch?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:115 + def flip_orphaned_else(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:91 + def offense_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:103 + def remove_empty_branch(corrector, node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:69 +RuboCop::Cop::Lint::EmptyConditionalBody::MSG = T.let(T.unsafe(nil), String) + +# Checks for empty `ensure` blocks. +# +# @example +# +# # bad +# def some_method +# do_something +# ensure +# end +# +# # bad +# begin +# do_something +# ensure +# end +# +# # good +# def some_method +# do_something +# ensure +# do_something_else +# end +# +# # good +# begin +# do_something +# ensure +# do_something_else +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_ensure.rb:35 +class RuboCop::Cop::Lint::EmptyEnsure < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_ensure.rb:40 + def on_ensure(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_ensure.rb:38 +RuboCop::Cop::Lint::EmptyEnsure::MSG = T.let(T.unsafe(nil), String) + +# Checks for the presence of empty expressions. +# +# @example +# +# # bad +# +# foo = () +# if () +# bar +# end +# +# # good +# +# foo = (some_expression) +# if (some_expression) +# bar +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_expression.rb:23 +class RuboCop::Cop::Lint::EmptyExpression < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_expression.rb:26 + def on_begin(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_expression.rb:34 + def empty_expression?(begin_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_expression.rb:24 +RuboCop::Cop::Lint::EmptyExpression::MSG = T.let(T.unsafe(nil), String) + +# Enforces that Ruby source files are not empty. +# +# @example +# # bad +# # Empty file +# +# # good +# # File containing non commented source lines +# +# @example AllowComments: true (default) +# # good +# # File consisting only of comments +# +# @example AllowComments: false +# # bad +# # File consisting only of comments +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_file.rb:23 +class RuboCop::Cop::Lint::EmptyFile < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_file.rb:26 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_file.rb:40 + def contains_only_comments?; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_file.rb:36 + def empty_file?; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_file.rb:32 + def offending?; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_file.rb:24 +RuboCop::Cop::Lint::EmptyFile::MSG = T.let(T.unsafe(nil), String) + +# Checks for the presence of `in` pattern branches without a body. +# +# @example +# +# # bad +# case condition +# in [a] +# do_something +# in [a, b] +# end +# +# # good +# case condition +# in [a] +# do_something +# in [a, b] +# nil +# end +# +# @example AllowComments: true (default) +# +# # good +# case condition +# in [a] +# do_something +# in [a, b] +# # noop +# end +# +# @example AllowComments: false +# +# # bad +# case condition +# in [a] +# do_something +# in [a, b] +# # noop +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_in_pattern.rb:45 +class RuboCop::Cop::Lint::EmptyInPattern < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CommentsHelp + extend ::RuboCop::Cop::TargetRubyVersion + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_in_pattern.rb:53 + def on_case_match(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_in_pattern.rb:64 + def allow_comments?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_in_pattern.rb:49 +RuboCop::Cop::Lint::EmptyInPattern::MSG = T.let(T.unsafe(nil), String) + +# Checks for empty interpolation. +# +# @example +# +# # bad +# "result is #{}" +# +# # good +# "result is #{some_result}" +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_interpolation.rb:15 +class RuboCop::Cop::Lint::EmptyInterpolation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Interpolation + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_interpolation.rb:21 + def on_interpolation(begin_node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_interpolation.rb:33 + def in_percent_literal_array?(begin_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_interpolation.rb:19 +RuboCop::Cop::Lint::EmptyInterpolation::MSG = T.let(T.unsafe(nil), String) + +# Checks for the presence of `when` branches without a body. +# +# @example +# +# # bad +# case foo +# when bar +# do_something +# when baz +# end +# +# # good +# case condition +# when foo +# do_something +# when bar +# nil +# end +# +# @example AllowComments: true (default) +# +# # good +# case condition +# when foo +# do_something +# when bar +# # noop +# end +# +# @example AllowComments: false +# +# # bad +# case condition +# when foo +# do_something +# when bar +# # do nothing +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_when.rb:45 +class RuboCop::Cop::Lint::EmptyWhen < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CommentsHelp + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_when.rb:50 + def on_case(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_when.rb:61 + def allow_comments?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/empty_when.rb:48 +RuboCop::Cop::Lint::EmptyWhen::MSG = T.let(T.unsafe(nil), String) + +# Checks for `return` from an `ensure` block. +# `return` from an ensure block is a dangerous code smell as it +# will take precedence over any exception being raised, +# and the exception will be silently thrown away as if it were rescued. +# +# If you want to rescue some (or all) exceptions, best to do it explicitly +# +# @example +# +# # bad +# def foo +# do_something +# ensure +# cleanup +# return self +# end +# +# # good +# def foo +# do_something +# self +# ensure +# cleanup +# end +# +# # good +# def foo +# begin +# do_something +# rescue SomeException +# # Let's ignore this exception +# end +# self +# ensure +# cleanup +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/ensure_return.rb:42 +class RuboCop::Cop::Lint::EnsureReturn < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/ensure_return.rb:45 + def on_ensure(node); end + + private + + # A `return` inside a nested method definition or lambda within the + # `ensure` returns from that inner scope, not from the method whose + # `ensure` this is, so it is not an offense. A `return` inside a plain + # block (or `proc`) does propagate out, so it remains an offense. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/ensure_return.rb:59 + def return_from_inner_scope?(return_node, ensure_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/ensure_return.rb:43 +RuboCop::Cop::Lint::EnsureReturn::MSG = T.let(T.unsafe(nil), String) + +# Emulates the following Ruby warnings in Ruby 2.6. +# +# [source,console] +# ---- +# $ cat example.rb +# ERB.new('hi', nil, '-', '@output_buffer') +# $ 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 +# deprecated. Use keyword argument like ERB.new(str, trim_mode:...) instead. +# example.rb:1: warning: Passing eoutvar with the 4th argument of ERB.new is +# deprecated. Use keyword argument like ERB.new(str, eoutvar: ...) instead. +# ---- +# +# Now non-keyword arguments other than first one are softly deprecated +# and will be removed when Ruby 2.5 becomes EOL. +# `ERB.new` with non-keyword arguments is deprecated since ERB 2.2.0. +# Use `:trim_mode` and `:eoutvar` keyword arguments to `ERB.new`. +# This cop identifies places where `ERB.new(str, trim_mode, eoutvar)` can +# be replaced by `ERB.new(str, trim_mode: trim_mode, eoutvar: eoutvar)`. +# +# @example +# # Target codes supports Ruby 2.6 and higher only +# # bad +# ERB.new(str, nil, '-', '@output_buffer') +# +# # good +# ERB.new(str, trim_mode: '-', eoutvar: '@output_buffer') +# +# # Target codes supports Ruby 2.5 and lower only +# # good +# ERB.new(str, nil, '-', '@output_buffer') +# +# # Target codes supports Ruby 2.6, 2.5 and lower +# # bad +# ERB.new(str, nil, '-', '@output_buffer') +# +# # good +# # Ruby standard library style +# # https://github.com/ruby/ruby/commit/3406c5d +# if ERB.instance_method(:initialize).parameters.assoc(:key) # Ruby 2.6+ +# ERB.new(str, trim_mode: '-', eoutvar: '@output_buffer') +# else +# ERB.new(str, nil, '-', '@output_buffer') +# end +# +# # good +# # Use `RUBY_VERSION` style +# if RUBY_VERSION >= '2.6' +# ERB.new(str, trim_mode: '-', eoutvar: '@output_buffer') +# else +# ERB.new(str, nil, '-', '@output_buffer') +# end +# +# pkg:gem/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 + + # pkg:gem/rubocop#lib/rubocop/cop/lint/erb_new_arguments.rb:81 + def erb_new_with_non_keyword_arguments(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/erb_new_arguments.rb:86 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/erb_new_arguments.rb:115 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/erb_new_arguments.rb:130 + def build_kwargs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/erb_new_arguments.rb:126 + def correct_arguments?(arguments); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/erb_new_arguments.rb:104 + def message(positional_argument_index, arg_value); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/erb_new_arguments.rb:147 + def override_by_legacy_args(kwargs, node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/erb_new_arguments.rb:74 +RuboCop::Cop::Lint::ErbNewArguments::MESSAGE_EOUTVAR = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/erb_new_arguments.rb:68 +RuboCop::Cop::Lint::ErbNewArguments::MESSAGE_SAFE_LEVEL = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/erb_new_arguments.rb:71 +RuboCop::Cop::Lint::ErbNewArguments::MESSAGE_TRIM_MODE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/erb_new_arguments.rb:78 +RuboCop::Cop::Lint::ErbNewArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Looks for uses of flip-flop operator +# based on the Ruby Style Guide. +# +# Here is the history of flip-flops in Ruby. +# flip-flop operator is deprecated in Ruby 2.6.0 and +# the deprecation has been reverted by Ruby 2.7.0 and +# backported to Ruby 2.6. +# See: https://bugs.ruby-lang.org/issues/5400 +# +# @example +# # bad +# (1..20).each do |x| +# puts x if (x == 5) .. (x == 10) +# end +# +# # good +# (1..20).each do |x| +# puts x if (x >= 5) && (x <= 10) +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/flip_flop.rb:25 +class RuboCop::Cop::Lint::FlipFlop < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/flip_flop.rb:32 + def on_eflipflop(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/flip_flop.rb:28 + def on_iflipflop(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/flip_flop.rb:26 +RuboCop::Cop::Lint::FlipFlop::MSG = T.let(T.unsafe(nil), String) + +# Checks for the presence of precise comparison of floating point numbers. +# +# Floating point values are inherently inaccurate, and comparing them for exact equality +# is almost never the desired semantics. Comparison via the `==/!=` operators checks +# 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 +# +# # bad +# case value +# when 1.0 +# foo +# when 2.0 +# bar +# end +# +# # 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 +# +# # good +# tolerance = 0.0001 +# (x - 0.1).abs < tolerance +# +# # good - comparing against nil +# Float(x, exception: false) == nil +# +# # good - using epsilon comparison in case expression +# case +# when (value - 1.0).abs < Float::EPSILON +# foo +# when (value - 2.0).abs < Float::EPSILON +# bar +# end +# +# # Or some other epsilon based type of comparison: +# # https://www.embeddeduse.com/2019/08/26/qt-compare-two-floats/ +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/float_comparison.rb:54 +class RuboCop::Cop::Lint::FloatComparison < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/float_comparison.rb:78 + def on_case(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/float_comparison.rb:76 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/float_comparison.rb:65 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/float_comparison.rb:90 + def float?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/float_comparison.rb:112 + def float_send?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/float_comparison.rb:105 + def literal_safe?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/float_comparison.rb:123 + def numeric_returning_method?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/float_comparison.rb:59 +RuboCop::Cop::Lint::FloatComparison::EQUALITY_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/float_comparison.rb:61 +RuboCop::Cop::Lint::FloatComparison::FLOAT_INSTANCE_METHODS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/float_comparison.rb:60 +RuboCop::Cop::Lint::FloatComparison::FLOAT_RETURNING_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/float_comparison.rb:57 +RuboCop::Cop::Lint::FloatComparison::MSG_CASE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/float_comparison.rb:55 +RuboCop::Cop::Lint::FloatComparison::MSG_EQUALITY = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/float_comparison.rb:56 +RuboCop::Cop::Lint::FloatComparison::MSG_INEQUALITY = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/float_comparison.rb:63 +RuboCop::Cop::Lint::FloatComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies `Float` literals which are, like, really really really +# really really really really really big. Too big. No-one needs Floats +# that big. If you need a float that big, something is wrong with you. +# +# @example +# +# # bad +# float = 3.0e400 +# +# # good +# float = 42.9 +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/float_out_of_range.rb:17 +class RuboCop::Cop::Lint::FloatOutOfRange < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/float_out_of_range.rb:20 + def on_float(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/float_out_of_range.rb:18 +RuboCop::Cop::Lint::FloatOutOfRange::MSG = T.let(T.unsafe(nil), String) + +# This lint sees if there is a mismatch between the number of +# expected fields for format/sprintf/#% and what is actually +# passed as arguments. +# +# In addition, it checks whether different formats are used in the same +# format string. Do not mix numbered, unnumbered, and named formats in +# the same format string. +# +# @example +# +# # bad +# format('A value: %s and another: %i', a_value) +# +# # good +# format('A value: %s and another: %i', a_value, another) +# +# # bad +# format('Unnumbered format: %s and numbered: %2$s', a_value, another) +# +# # good +# format('Numbered format: %1$s and numbered %2$s', a_value, another) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:27 +class RuboCop::Cop::Lint::FormatParameterMismatch < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:90 + def called_on_string?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:39 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:127 + def count_format_matches(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:109 + def count_matches(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:131 + def count_percent_matches(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:119 + def countable_format?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:123 + def countable_percent?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:143 + def expected_fields_count(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:158 + def format?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:136 + def format_method?(name, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:54 + def format_string?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:105 + def heredoc?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:58 + def invalid_format_string?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:81 + def matched_arguments_count?(expected, passed); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:176 + def message(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:95 + def method_with_format_args?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:67 + def offending_node?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:166 + def percent?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:99 + def splat_args?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:162 + def sprintf?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:185 + def string_type?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:34 +RuboCop::Cop::Lint::FormatParameterMismatch::KERNEL = T.let(T.unsafe(nil), String) + +# http://rubular.com/r/CvpbxkcTzy +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:29 +RuboCop::Cop::Lint::FormatParameterMismatch::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:31 +RuboCop::Cop::Lint::FormatParameterMismatch::MSG_INVALID = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:37 +RuboCop::Cop::Lint::FormatParameterMismatch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:35 +RuboCop::Cop::Lint::FormatParameterMismatch::SHOVEL = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/format_parameter_mismatch.rb:36 +RuboCop::Cop::Lint::FormatParameterMismatch::STRING_TYPES = T.let(T.unsafe(nil), Array) + +# Prefer using `Hash#compare_by_identity` rather than using `object_id` +# for hash keys. +# +# This cop looks for hashes being keyed by objects' `object_id`, using +# one of these methods: `key?`, `has_key?`, `fetch`, `[]` and `[]=`. +# +# @safety +# This cop is unsafe. Although unlikely, the hash could store both object +# ids and other values that need be compared by value, and thus +# could be a false positive. +# +# Furthermore, this cop cannot guarantee that the receiver of one of the +# methods (`key?`, etc.) is actually a hash. +# +# @example +# # bad +# hash = {} +# hash[foo.object_id] = :bar +# hash.key?(baz.object_id) +# +# # good +# hash = {}.compare_by_identity +# hash[foo] = :bar +# hash.key?(baz) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/hash_compare_by_identity.rb:31 +class RuboCop::Cop::Lint::HashCompareByIdentity < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/hash_compare_by_identity.rb:37 + def id_as_hash_key?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/hash_compare_by_identity.rb:44 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/hash_compare_by_identity.rb:41 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/hash_compare_by_identity.rb:34 +RuboCop::Cop::Lint::HashCompareByIdentity::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/hash_compare_by_identity.rb:32 +RuboCop::Cop::Lint::HashCompareByIdentity::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the deprecated use of keyword arguments as a default in `Hash.new`. +# +# This usage raises a warning in Ruby 3.3 and results in an error in Ruby 3.4. +# In Ruby 3.4, keyword arguments will instead be used to change the behavior of a hash. +# For example, the capacity option can be passed to create a hash with a certain size +# if you know it in advance, for better performance. +# +# NOTE: The following corner case may result in a false negative when upgrading from Ruby 3.3 +# or earlier, but it is intentionally not detected to respect the expected usage in Ruby 3.4. +# +# [source,ruby] +# ---- +# Hash.new(capacity: 42) +# ---- +# +# @example +# +# # bad +# Hash.new(key: :value) +# +# # good +# Hash.new({key: :value}) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/hash_new_with_keyword_arguments_as_default.rb:29 +class RuboCop::Cop::Lint::HashNewWithKeywordArgumentsAsDefault < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/hash_new_with_keyword_arguments_as_default.rb:36 + def hash_new(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/hash_new_with_keyword_arguments_as_default.rb:40 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/hash_new_with_keyword_arguments_as_default.rb:32 +RuboCop::Cop::Lint::HashNewWithKeywordArgumentsAsDefault::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/hash_new_with_keyword_arguments_as_default.rb:33 +RuboCop::Cop::Lint::HashNewWithKeywordArgumentsAsDefault::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the ordering of a method call where +# the receiver of the call is a HEREDOC. +# +# @example +# # bad +# <<-SQL +# bar +# SQL +# .strip_indent +# +# <<-SQL +# bar +# SQL +# .strip_indent +# .trim +# +# # good +# <<~SQL +# bar +# SQL +# +# <<~SQL.trim +# bar +# SQL +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:31 +class RuboCop::Cop::Lint::HeredocMethodCallPosition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:46 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:37 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:97 + def all_on_same_line?(nodes); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:50 + def autocorrect(corrector, node, heredoc); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:77 + def call_after_heredoc_range(heredoc); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:107 + def call_end_pos(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:116 + def call_line_range(node); end + + # Returns nil if no range can be safely repositioned. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:122 + def call_range_to_safely_reposition(node, heredoc); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:86 + def calls_on_multiple_lines?(node, _heredoc); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:82 + def correctly_positioned?(node, heredoc); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:111 + def heredoc_begin_line_range(heredoc); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:103 + def heredoc_end_pos(heredoc); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:73 + def heredoc_node?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:59 + def heredoc_node_descendent_receiver(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:67 + def send_node?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:146 + def trailing_comma?(call_source, call_line_source); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/heredoc_method_call_position.rb:35 +RuboCop::Cop::Lint::HeredocMethodCallPosition::MSG = T.let(T.unsafe(nil), String) + +# Prefer `equal?` over `==` when comparing `object_id`. +# +# `Object#equal?` is provided to compare objects for identity, and in contrast +# `Object#==` is provided for the purpose of doing value comparison. +# +# @example +# # bad +# foo.object_id == bar.object_id +# foo.object_id != baz.object_id +# +# # good +# foo.equal?(bar) +# !foo.equal?(baz) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/identity_comparison.rb:20 +class RuboCop::Cop::Lint::IdentityComparison < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/identity_comparison.rb:27 + def object_id_comparison(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/identity_comparison.rb:35 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/identity_comparison.rb:23 +RuboCop::Cop::Lint::IdentityComparison::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/identity_comparison.rb:24 +RuboCop::Cop::Lint::IdentityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for implicit string concatenation of string literals +# which are on the same line. +# +# @example +# +# # bad +# array = ['Item 1' 'Item 2'] +# +# # good +# array = ['Item 1Item 2'] +# array = ['Item 1' + 'Item 2'] +# array = [ +# 'Item 1' \ +# 'Item 2' +# ] +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/implicit_string_concatenation.rb:21 +class RuboCop::Cop::Lint::ImplicitStringConcatenation < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/implicit_string_concatenation.rb:32 + def on_dstr(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/implicit_string_concatenation.rb:91 + def display_str(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/implicit_string_concatenation.rb:58 + def each_bad_cons(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/implicit_string_concatenation.rb:73 + def ending_delimiter(str); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/implicit_string_concatenation.rb:99 + def str_content(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/implicit_string_concatenation.rb:83 + def string_literal?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/implicit_string_concatenation.rb:87 + def string_literals?(node1, node2); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/implicit_string_concatenation.rb:26 +RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_ARRAY = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/implicit_string_concatenation.rb:28 +RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_METHOD = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/implicit_string_concatenation.rb:24 +RuboCop::Cop::Lint::ImplicitStringConcatenation::MSG = T.let(T.unsafe(nil), String) + +# 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`. +# They are not autocorrected when assigning a return value because these types are different. +# It's up to user how to handle the return value. +# +# @safety +# This cop's autocorrection is unsafe because `NoMethodError` occurs +# if `require 'io/wait'` is not called. +# +# @example +# +# # bad +# IO.select([io], [], [], timeout) +# +# # good +# io.wait_readable(timeout) +# +# # bad +# IO.select([], [io], [], timeout) +# +# # good +# io.wait_writable(timeout) +# +# pkg:gem/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 + + # pkg:gem/rubocop#lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb:41 + def io_select(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb:46 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb:73 + def preferred_method(read, write, timeout); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb:63 + def scheduler_compatible?(io1, io2); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb:69 + def single_io_array?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb:37 +RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/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 +# applied to a singleton method. These access modifiers do not make +# singleton methods private/protected. `private_class_method` can be +# used for that. +# +# @example +# +# # bad +# class C +# private +# +# def self.method +# puts 'hi' +# end +# end +# +# # good +# class C +# def self.method +# puts 'hi' +# end +# +# private_class_method :method +# end +# +# # good +# class C +# class << self +# private +# +# def method +# puts 'hi' +# end +# end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/ineffective_access_modifier.rb:41 +class RuboCop::Cop::Lint::IneffectiveAccessModifier < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/ineffective_access_modifier.rb:52 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ineffective_access_modifier.rb:55 + def on_module(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ineffective_access_modifier.rb:48 + def private_class_methods(param0); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ineffective_access_modifier.rb:101 + def access_modifier?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ineffective_access_modifier.rb:59 + def check_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ineffective_access_modifier.rb:105 + def correct_visibility?(node, modifier, ignored_methods); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ineffective_access_modifier.rb:71 + def format_message(modifier); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ineffective_access_modifier.rb:84 + def ineffective_modifier(node, ignored_methods = T.unsafe(nil), modifier = T.unsafe(nil), &block); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ineffective_access_modifier.rb:67 + def private_class_method_names(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/ineffective_access_modifier.rb:44 +RuboCop::Cop::Lint::IneffectiveAccessModifier::ALTERNATIVE_PRIVATE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/ineffective_access_modifier.rb:45 +RuboCop::Cop::Lint::IneffectiveAccessModifier::ALTERNATIVE_PROTECTED = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/ineffective_access_modifier.rb:42 +RuboCop::Cop::Lint::IneffectiveAccessModifier::MSG = T.let(T.unsafe(nil), String) + +# Looks for error classes inheriting from `Exception`. +# It is configurable to suggest using either `StandardError` (default) or +# `RuntimeError` instead. +# +# @safety +# This cop's autocorrection is unsafe because `rescue` that omit +# exception class handle `StandardError` and its subclasses, +# but not `Exception` and its subclasses. +# +# When `AllCops/UseProjectIndex` is enabled and the `rubydex` gem is +# installed, indirect inheritance is also detected: a class whose parent +# (defined anywhere in the project) ultimately inherits from `Exception` +# is reported, without autocorrection. +# +# @example EnforcedStyle: standard_error (default) +# # bad +# +# class C < Exception; end +# +# C = Class.new(Exception) +# +# # good +# +# class C < StandardError; end +# +# C = Class.new(StandardError) +# +# @example EnforcedStyle: runtime_error +# # bad +# +# class C < Exception; end +# +# C = Class.new(Exception) +# +# # good +# +# class C < RuntimeError; end +# +# C = Class.new(RuntimeError) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/inherit_exception.rb:45 +class RuboCop::Cop::Lint::InheritException < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::ProjectIndexHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/inherit_exception.rb:60 + def class_new_call?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/inherit_exception.rb:66 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/inherit_exception.rb:84 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/inherit_exception.rb:121 + def exception_ancestor(declaration); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/inherit_exception.rb:101 + def exception_class?(class_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/inherit_exception.rb:127 + def exception_superclass_reference?(ancestor); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/inherit_exception.rb:137 + def inherit_exception_class_with_omitted_namespace?(class_node); end + + # When `AllCops/UseProjectIndex` is enabled, indirect inheritance is + # detected by walking the parent's indexed ancestry: `Exception` itself + # is not indexed, so a chain ending in it shows up as an ancestor whose + # superclass reference is unresolved and literally named `Exception`. + # Returns the name of that ancestor, or `nil`. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/inherit_exception.rb:110 + def inherits_exception_via(parent_class); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/inherit_exception.rb:97 + def message(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/inherit_exception.rb:145 + def preferred_base_class; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/inherit_exception.rb:51 +RuboCop::Cop::Lint::InheritException::INDIRECT_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/inherit_exception.rb:50 +RuboCop::Cop::Lint::InheritException::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/inherit_exception.rb:52 +RuboCop::Cop::Lint::InheritException::PREFERRED_BASE_CLASS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/inherit_exception.rb:57 +RuboCop::Cop::Lint::InheritException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for interpolation in a single quoted string. +# +# @safety +# This cop's autocorrection is unsafe because although it always replaces single quotes as +# if it were miswritten double quotes, it is not always the case. For example, +# `'#{foo} bar'` would be replaced by `"#{foo} bar"`, so the replaced code would evaluate +# the expression `foo`. +# +# @example +# +# # bad +# foo = 'something with #{interpolation} inside' +# +# # good +# foo = "something with #{interpolation} inside" +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/interpolation_check.rb:21 +class RuboCop::Cop::Lint::InterpolationCheck < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # A multiline single-quoted string is parsed as a `dstr` of `str` segments, so it + # is not covered by `on_str`. Inspect single-quoted `dstr`s here; double-quoted + # interpolation is also a `dstr`, hence the delimiter check. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/interpolation_check.rb:34 + def on_dstr(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/interpolation_check.rb:27 + def on_str(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/interpolation_check.rb:55 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/interpolation_check.rb:45 + def check(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/interpolation_check.rb:66 + def heredoc?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/interpolation_check.rb:70 + def valid_syntax?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/interpolation_check.rb:24 +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 } +# +# pkg:gem/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 + extend ::RuboCop::Cop::TargetRubyVersion + + # pkg:gem/rubocop#lib/rubocop/cop/lint/it_without_arguments_in_block.rb:44 + def deprecated_it_method?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/it_without_arguments_in_block.rb:37 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/it_without_arguments_in_block.rb:33 +RuboCop::Cop::Lint::ItWithoutArgumentsInBlock::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/it_without_arguments_in_block.rb:35 +RuboCop::Cop::Lint::ItWithoutArgumentsInBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks uses of lambda without a literal block. +# It emulates the following warning in Ruby 3.0: +# +# $ 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 +# +# This way, proc object is never converted to lambda. +# Autocorrection replaces with compatible proc argument. +# +# @example +# +# # bad +# lambda(&proc { do_something }) +# lambda(&Proc.new { do_something }) +# +# # good +# proc { do_something } +# Proc.new { do_something } +# lambda { do_something } # If you use lambda. +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/lambda_without_literal_block.rb:28 +class RuboCop::Cop::Lint::LambdaWithoutLiteralBlock < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/lambda_without_literal_block.rb:35 + def lambda_with_symbol_proc?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/lambda_without_literal_block.rb:39 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/lambda_without_literal_block.rb:31 +RuboCop::Cop::Lint::LambdaWithoutLiteralBlock::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/lambda_without_literal_block.rb:32 +RuboCop::Cop::Lint::LambdaWithoutLiteralBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for literals used as the conditions or as +# operands in and/or expressions serving as the conditions of +# if/while/until/case-when/case-in. +# +# NOTE: Literals in `case-in` condition where the match variable is used in +# `in` are accepted as a pattern matching. +# +# @example +# +# # bad +# if 20 +# do_something +# end +# +# # bad +# # We're only interested in the left hand side being a truthy literal, +# # because it affects the evaluation of the &&, whereas the right hand +# # side will be conditionally executed/called and can be a literal. +# if true && some_var +# do_something +# end +# +# # good +# if some_var +# do_something +# end +# +# # good +# # When using a boolean value for an infinite loop. +# while true +# break if condition +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:38 +class RuboCop::Cop::Lint::LiteralAsCondition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:176 + def message(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:45 + def on_and(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:139 + def on_case(case_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:156 + def on_case_match(case_match_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:69 + def on_if(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:57 + def on_or(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:170 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:108 + def on_until(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:123 + def on_until_post(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:77 + def on_while(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:92 + def on_while_post(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:206 + def basic_literal?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:238 + def check_case(case_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:197 + def check_for_literal(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:218 + def check_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:247 + def condition(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:262 + def condition_evaluation?(node, cond); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:271 + def correct_if_node(node, cond); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:228 + def handle_node(node); end + + # Unwrapping the body of a loop that runs once would leave a `break`, + # `next` or `redo` that belongs to it outside of any loop. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:184 + def orphans_loop_control_keyword?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:214 + def primitive_array?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:191 + def void_value_expression?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:255 + def when_conditions_range(when_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:42 +RuboCop::Cop::Lint::LiteralAsCondition::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/literal_as_condition.rb:43 +RuboCop::Cop::Lint::LiteralAsCondition::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# 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 +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/literal_assignment_in_condition.rb:35 +class RuboCop::Cop::Lint::LiteralAssignmentInCondition < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_assignment_in_condition.rb:39 + def on_if(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_assignment_in_condition.rb:52 + def on_until(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_assignment_in_condition.rb:51 + def on_while(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_assignment_in_condition.rb:72 + def all_literals?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_assignment_in_condition.rb:89 + def offense_range(asgn_node, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_assignment_in_condition.rb:85 + def parallel_assignment_with_splat_operator?(node); end + + # An assignment inside a block or method body within the condition belongs to + # that inner scope rather than the condition itself, so it is not inspected. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_assignment_in_condition.rb:68 + def scope_body?(node, child); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_assignment_in_condition.rb:56 + def traverse_node(node, &block); end +end + +# pkg:gem/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. +# +# NOTE: Array literals interpolated in regexps are not handled by this cop, but +# by `Lint/ArrayLiteralInRegexp` instead. +# +# @example +# +# # bad +# "result is #{10}" +# +# # good +# "result is 10" +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:18 +class RuboCop::Cop::Lint::LiteralInInterpolation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Interpolation + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::PercentLiteral + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:27 + def on_interpolation(begin_node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:57 + def array_in_regexp?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:79 + def autocorrected_value(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:153 + def autocorrected_value_for_array(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:159 + def autocorrected_value_for_hash(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:132 + def autocorrected_value_for_string(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:142 + def autocorrected_value_for_symbol(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:170 + def autocorrected_value_in_hash(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:149 + def autocorrected_value_in_hash_for_symbol(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:62 + def correctable_value(begin_node, final_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:201 + def ends_heredoc_line?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:138 + def escape_string_content(string); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:218 + def escape_trailing_hash_sign(begin_node, value); end + + # Each interpolation is checked against the original source, so correcting it in the + # same pass as a preceding one that leaves a `#` (or nothing) could join that `#` and + # a `{` from this one. It's left for the next iteration instead. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:232 + def follows_literal_interpolation?(begin_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:100 + def handle_special_regexp_chars(begin_node, value); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:210 + def in_array_percent_literal?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:42 + def offending?(node); end + + # Does node print its own source when converted to a string? + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:190 + def prints_as_self?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:240 + def replacement(node, expanded_value); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:195 + def space_literal?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:52 + def special_keyword?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:121 + def starts_interpolation_after_hash_sign?(begin_node, value); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:225 + def unescaped_hash_sign?(text); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:25 +RuboCop::Cop::Lint::LiteralInInterpolation::COMPOSITE = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/literal_in_interpolation.rb:24 +RuboCop::Cop::Lint::LiteralInInterpolation::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of `begin...end while/until something`. +# +# @safety +# The cop is unsafe because behavior can change in some cases, including +# if a local variable inside the loop body is accessed outside of it, or if the +# loop body raises a `StopIteration` exception (which `Kernel#loop` rescues). +# +# @example +# +# # bad +# +# # using while +# begin +# do_something +# end while some_condition +# +# # good +# +# # while replacement +# loop do +# do_something +# break unless some_condition +# end +# +# # bad +# +# # using until +# begin +# do_something +# end until some_condition +# +# # good +# +# # until replacement +# loop do +# do_something +# break if some_condition +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/loop.rb:44 +class RuboCop::Cop::Lint::Loop < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/loop.rb:55 + def on_until_post(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/loop.rb:51 + def on_while_post(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/loop.rb:90 + def build_break_line(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/loop.rb:76 + def insert_break_line(corrector, node, body); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/loop.rb:72 + def keyword_and_condition_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/loop.rb:61 + def register_offense(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/loop.rb:84 + def space_before_end(body); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/loop.rb:49 +RuboCop::Cop::Lint::Loop::MSG = T.let(T.unsafe(nil), String) + +# Checks for magic comments placed where Ruby silently ignores them. +# +# The `encoding` magic comment is only honored on the first line of a file, +# or on the second line when the first line is a shebang. Anywhere else it +# is silently ignored - even directly below another comment or a blank line. +# +# Other magic comments (such as `frozen_string_literal`) are honored +# anywhere before the first token of code, but are ignored after any code, +# with a warning emitted only when running Ruby with `-w`. +# +# A magic comment misplaced ahead of a shebang also renders the shebang +# ineffective, since a shebang is only recognized on the first line. +# +# NOTE: An `encoding` comment that is only preceded by other magic +# comments is not flagged by this cop; that case is handled by +# `Lint/OrderedMagicComments`. `shareable_constant_value` is never +# flagged, as Ruby intentionally allows it mid-file with block scoping. +# +# @safety +# This cop's autocorrection is unsafe because moving the magic comment +# to its effective position activates it, which changes runtime +# behavior (e.g. the source encoding or string mutability). +# +# @example +# # bad +# # Documentation comment +# puts 'hello' +# +# # good +# # Documentation comment +# puts 'hello' +# +# # bad +# require 'foo' +# +# # good +# require 'foo' +# +# # bad +# #!/usr/bin/env ruby +# puts 'hello' +# +# # good +# #!/usr/bin/env ruby +# puts 'hello' +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:57 +class RuboCop::Cop::Lint::MisplacedMagicComment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:66 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:75 + def check_comment(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:122 + def check_encoding_comment(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:201 + def check_magic_comment_above_shebang; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:158 + def check_top_block_comment(comment, directive); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:152 + def comment_encoding(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:235 + def comment_removal_range(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:221 + def comment_starts_line?(comment); end + + # With an effective encoding comment already in place, moving another + # one in would override it. Drop an identical duplicate and leave a + # conflicting one for a human to resolve. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:142 + def correct_encoding_comment(corrector, comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:180 + def effective_encoding_comment; end + + # First line that may carry an effective encoding comment. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:114 + def effective_encoding_line; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:172 + def encoding_comment_moving_in?; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:118 + def first_code_token; end + + # Prose that happens to open with `Encoding:` parses as an encoding + # comment (`# Encoding: force given encoding` yields `force`). Ruby + # ignores a misplaced encoding comment entirely, so a name no encoding + # answers to means the line is a comment, not a directive. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:102 + def known_encoding?(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:188 + def known_encoding_comment?(comment); end + + # The Emacs and Vim regexps in `MagicComment` match anywhere inside a + # comment, which would flag documentation that merely quotes a magic + # comment (e.g. `# # -*- coding: UTF-8 -*-`). Require the magic + # comment to start right after the `#`. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:94 + def magic_comment_shaped?(text); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:130 + def misplaced_encoding_position?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:225 + def move_comment(corrector, comment, target_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:214 + def preceded_only_by_magic_comments?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:109 + def shebang?; end + + # Insert below an effective encoding comment rather than above it, + # which would push it off the only lines where Ruby honors it. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:197 + def top_block_insertion_line; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:64 +RuboCop::Cop::Lint::MisplacedMagicComment::MSG_ABOVE_SHEBANG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:63 +RuboCop::Cop::Lint::MisplacedMagicComment::MSG_AFTER_CODE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/misplaced_magic_comment.rb:61 +RuboCop::Cop::Lint::MisplacedMagicComment::MSG_ENCODING = T.let(T.unsafe(nil), String) + +# cop disables on wide ranges of code, that later contributors to +# a file wouldn't be aware of. +# +# You can set `MaxRangeSize` to define the maximum number of +# consecutive lines a cop can be disabled for. +# +# - `.inf` any size (default) +# - `0` allows only single-line disables +# - `1` means the maximum allowed is as follows: +# +# [source,ruby] +# ---- +# a = 1 +# ---- +# +# @example MaxRangeSize: .inf (default) +# +# # good +# x= 0 +# # y = 1 +# # EOF +# +# # bad +# x= 0 +# # EOF +# +# @example MaxRangeSize: 2 +# +# # good +# x= 0 +# # With the previous, there are 2 lines on which cop is disabled. +# +# # bad +# x= 0 +# x += 1 +# # Including this, that's 3 lines on which the cop is disabled. +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/missing_cop_enable_directive.rb:55 +class RuboCop::Cop::Lint::MissingCopEnableDirective < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_cop_enable_directive.rb:61 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_cop_enable_directive.rb:99 + def acceptable_range?(cop, line_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_cop_enable_directive.rb:142 + def department_enabled?(cop, comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_cop_enable_directive.rb:73 + def each_missing_enable; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_cop_enable_directive.rb:111 + def expected_open_range?(cop, line_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_cop_enable_directive.rb:121 + def max_range; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_cop_enable_directive.rb:125 + def message(cop, comment, type = T.unsafe(nil)); end + + # A disable suspended by `enable-next` or `next +Cop` reopens below the + # statement, on a code line, so the comment that opened it has to come + # from the range rather than from its first line. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_cop_enable_directive.rb:92 + def opening_comment(line_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_cop_enable_directive.rb:84 + def statement_scoped?(line_range); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/missing_cop_enable_directive.rb:58 +RuboCop::Cop::Lint::MissingCopEnableDirective::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/missing_cop_enable_directive.rb:59 +RuboCop::Cop::Lint::MissingCopEnableDirective::MSG_BOUND = T.let(T.unsafe(nil), String) + +# Checks for the presence of constructors and lifecycle callbacks +# without calls to `super`. +# +# This cop does not consider `method_missing` (and `respond_to_missing?`) +# because in some cases it makes sense to overtake what is considered a +# 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`. +# +# When `AllCops/UseProjectIndex` is enabled and the `rubydex` gem is installed, +# the constructor check additionally consults the project-wide index: if the +# class' entire ancestry is resolvable and no ancestor defines `initialize`, +# no offense is registered, since `super` would only reach the no-op +# `Object#initialize`. Classes whose ancestry contains an unresolvable +# superclass or mixin (e.g. one defined in a gem) are still reported. +# +# @example +# # bad +# class Employee < Person +# def initialize(name, salary) +# @salary = salary +# end +# end +# +# # good +# class Employee < Person +# def initialize(name, salary) +# super(name) +# @salary = salary +# end +# end +# +# # bad +# Employee = Class.new(Person) do +# def initialize(name, salary) +# @salary = salary +# end +# end +# +# # good +# Employee = Class.new(Person) do +# def initialize(name, salary) +# super(name) +# @salary = salary +# end +# end +# +# # bad +# class Parent +# def self.inherited(base) +# do_something +# end +# end +# +# # good +# class Parent +# def self.inherited(base) +# super +# do_something +# end +# end +# +# # good +# class ClassWithNoParent +# def initialize +# do_something +# end +# end +# +# @example AllowedParentClasses: [MyAbstractClass] +# # good +# class MyConcreteClass < MyAbstractClass +# def initialize +# do_something +# end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:92 +class RuboCop::Cop::Lint::MissingSuper < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ProjectIndexHelp + + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:108 + def class_new_block(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:114 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:124 + def on_defs(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:159 + def allowed_class?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:163 + def allowed_classes; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:136 + def callback_method_def?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:142 + def contains_super?(node); end + + # With the project index, the offense is skipped when the class' whole ancestry + # is resolvable and none of the inherited ancestors defines `initialize` — + # `super` would only reach the no-op `Object#initialize`. An unresolvable + # superclass or mixin anywhere in the chain (e.g. a class from a gem) means + # the ancestry cannot be verified and the offense is kept. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:172 + def index_verified_stateless_ancestry?(class_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:146 + def inside_class_with_stateful_parent?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:132 + def offender?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:105 +RuboCop::Cop::Lint::MissingSuper::CALLBACKS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:96 +RuboCop::Cop::Lint::MissingSuper::CALLBACK_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:100 +RuboCop::Cop::Lint::MissingSuper::CLASS_LIFECYCLE_CALLBACKS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:95 +RuboCop::Cop::Lint::MissingSuper::CONSTRUCTOR_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:101 +RuboCop::Cop::Lint::MissingSuper::METHOD_LIFECYCLE_CALLBACKS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/missing_super.rb:98 +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. +# +# @safety +# The cop autocorrects regexp character classes +# by replacing one character range with two: `A-z` becomes `A-Za-z`. +# In most cases this is probably what was originally intended +# but it changes the regexp to no longer match symbols it used to include. +# For this reason, this cop's autocorrect is unsafe (it will +# change the behavior of the code). +# +# @example +# +# # bad +# r = /[A-z]/ +# +# # good +# r = /[A-Za-z]/ +# +# pkg:gem/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 + + # pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_case_range.rb:55 + def each_unsafe_regexp_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_case_range.rb:43 + def on_erange(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_case_range.rb:37 + def on_irange(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_case_range.rb:45 + def on_regexp(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_case_range.rb:71 + def build_source_range(range_start, range_end); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_case_range.rb:75 + def range_for(char); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_case_range.rb:81 + def range_pairs(expr); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_case_range.rb:101 + def regexp_range(source); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_case_range.rb:91 + def skip_expression?(expr); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_case_range.rb:95 + def skip_range?(range_start, range_end); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_case_range.rb:85 + def unsafe_range?(range_start, range_end); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_case_range.rb:32 +RuboCop::Cop::Lint::MixedCaseRange::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/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 +# named captures. +# +# @example +# # bad +# /(?FOO)(BAR)/ +# +# # good +# /(?FOO)(?BAR)/ +# +# # good +# /(?FOO)(?:BAR)/ +# +# # good +# /(FOO)(BAR)/ +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_regexp_capture_types.rb:24 +class RuboCop::Cop::Lint::MixedRegexpCaptureTypes < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_regexp_capture_types.rb:27 + def on_regexp(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/mixed_regexp_capture_types.rb:25 +RuboCop::Cop::Lint::MixedRegexpCaptureTypes::MSG = T.let(T.unsafe(nil), String) + +# In math and Python, we can use `x < y < z` style comparison to compare +# multiple values. However, we can't use the comparison in Ruby. However, +# the comparison is not a syntax error. This cop checks the bad usage of +# comparison operators. +# +# @example +# +# # bad +# x < y < z +# 10 <= x <= 20 +# +# # good +# x < y && y < z +# 10 <= x && x <= 20 +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/multiple_comparison.rb:20 +class RuboCop::Cop::Lint::MultipleComparison < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/multiple_comparison.rb:29 + def multiple_compare?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/multiple_comparison.rb:33 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/multiple_comparison.rb:24 +RuboCop::Cop::Lint::MultipleComparison::COMPARISON_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/multiple_comparison.rb:23 +RuboCop::Cop::Lint::MultipleComparison::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/multiple_comparison.rb:26 +RuboCop::Cop::Lint::MultipleComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/multiple_comparison.rb:25 +RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe(nil), Array) + +# Checks for probable typos in constant and method names: a name that +# does not resolve anywhere in the project, used in a namespace the +# project does define, with a close-named sibling to suggest instead. +# +# The check is powered by the project-wide index, so it only runs when +# `AllCops/UseProjectIndex` is enabled and the `rubydex` gem is installed. +# Without the index the cop does nothing. +# +# Constants are checked only in qualified references (`Foo::Bar`) whose +# namespace resolves in the index; bare names cannot be distinguished +# from constants provided by gems or the standard library. Methods are +# checked only in calls on constant receivers (`Foo.bar`) whose entire +# indexed ancestry is resolved, so methods gained through gem classes or +# dynamic definitions never produce offenses. In both cases an offense +# requires a similarly named alternative to exist — an unknown name +# alone is not reported, since the index does not see gems or the +# standard library. +# +# For the same reason, a namespace whose root segment names a gem in the +# bundle (`Flipper` for the `flipper` gem) is left alone: a project that +# reopens it (`module Flipper; module Adapters; ...`) makes it resolve in +# the index, while the members the gem itself defines stay invisible and +# would look like typos. Enabling `AllCops/ProjectIndexIncludesGems` +# indexes those sources and restores the check. +# +# Names that appear as symbols or inside string literals in the same +# file are never reported, since they usually belong to runtime +# definitions the index cannot see (`stub_const`, `const_set`, +# `define_method`, and the like). +# +# @example +# # bad - Services::UserCraetor is not defined, Services::UserCreator is +# Services::UserCraetor.new +# +# # good +# Services::UserCreator.new +# +# # bad - Report.generate_sumary is not defined, Report.generate_summary is +# Report.generate_sumary +# +# # good +# Report.generate_summary +# +# @example CheckConstants: false +# # good - constant references are not checked +# Services::UserCraetor.new +# +# @example CheckMethods: false +# # good - method calls are not checked +# Report.generate_sumary +# +# @example AllowedNames: ['generate_sumary'] +# # good - the name is explicitly allowed +# Report.generate_sumary +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/name_typo.rb:67 +class RuboCop::Cop::Lint::NameTypo < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ProjectIndexHelp + + # pkg:gem/rubocop#lib/rubocop/cop/lint/name_typo.rb:78 + def on_const(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/name_typo.rb:103 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/name_typo.rb:105 + def on_new_investigation; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/name_typo.rb:90 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/name_typo.rb:122 + def allowed_name?(name); end + + # The bundle's gems except those sourced from a local path, whose code + # lives in the project and is indexed like the rest of it — among them + # the project's own gem, which its lockfile lists in the `PATH` section. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/name_typo.rb:181 + def bundled_gem_names; end + + # Gem names normalized towards the constant they conventionally + # provide: `flipper` for `Flipper`, `activerecord` for `ActiveRecord`. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/name_typo.rb:174 + def bundled_gem_namespaces; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/name_typo.rb:112 + def check?(key); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/name_typo.rb:116 + def checkable_constant?(node); end + + # Whether the index can be trusted to list everything the namespace + # defines. A name missing from an incomplete member list is not + # evidence of a typo, so both gaps have to be ruled out first: + # an ancestor that does not resolve may contribute the name, and so + # may a gem that reopens the namespace. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/name_typo.rb:155 + def complete_index_members?(declaration); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/name_typo.rb:246 + def constant_member_names(namespace); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/name_typo.rb:138 + def constant_typo_suggestion(node); end + + # `defined?(Foo::Bar)` probes whether a name exists; unknown names + # there are deliberate. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/name_typo.rb:134 + def defined_check?(node); end + + # The last segment of a class, module or constant definition is being + # defined, not referenced. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/name_typo.rb:128 + def definition_identifier?(node); end + + # Whether the namespace's root segment names a gem in the bundle, + # which is then free to define members the index never sees: gem + # sources are only indexed when `AllCops/ProjectIndexIncludesGems` + # is enabled. A project that reopens such a namespace to add its own + # members (`module Flipper; module Adapters; ...`) makes it resolve + # in the index while most of what it holds stays invisible. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/name_typo.rb:165 + def gem_owned_namespace?(declaration); end + + # Names mentioned as symbols or inside string literals in the current + # file belong to runtime definitions (`stub_const`, `const_set`, + # `define_method`) that the index cannot see. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/name_typo.rb:231 + def literal_names; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/name_typo.rb:253 + def method_member_names(declaration); end + + # Writers are indexed under the reader's name, so setter calls are + # verified and spell-checked through the base name. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/name_typo.rb:187 + def method_typo_suggestion(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/name_typo.rb:218 + def responds_in_index?(declaration, name, base); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/name_typo.rb:214 + def setter_call?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/name_typo.rb:262 + def spell_check(name, dictionary); end + + # The receiver's declaration when it resolves in the index, everything + # it can inherit or be reopened with is visible there, and the method + # is not found — nil otherwise. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/name_typo.rb:204 + def unknown_method_owner(node, base); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/name_typo.rb:70 +RuboCop::Cop::Lint::NameTypo::CONSTANT_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/name_typo.rb:76 +RuboCop::Cop::Lint::NameTypo::LITERAL_IDENTIFIER_PATTERN = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/name_typo.rb:75 +RuboCop::Cop::Lint::NameTypo::METHOD_MEMBER_REGEXP = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/name_typo.rb:72 +RuboCop::Cop::Lint::NameTypo::METHOD_MSG = T.let(T.unsafe(nil), String) + +# Checks for nested method definitions. +# +# @example +# +# # bad +# +# # `bar` definition actually produces methods in the same scope +# # as the outer `foo` method. Furthermore, the `bar` method +# # will be redefined every time `foo` is invoked. +# def foo +# def bar +# end +# end +# +# # good +# +# def foo +# bar = -> { puts 'hello' } +# bar.call +# end +# +# # good +# +# # `class_eval`, `instance_eval`, `module_eval`, `class_exec`, `instance_exec`, and +# # `module_exec` blocks are allowed by default. +# +# def foo +# self.class.class_eval do +# def bar +# end +# end +# end +# +# def foo +# self.class.module_exec do +# def bar +# end +# end +# end +# +# # good +# +# def foo +# class << self +# def bar +# end +# end +# end +# +# @example AllowedMethods: [] (default) +# # bad +# def do_something +# has_many :articles do +# def find_or_create_by_name(name) +# end +# end +# end +# +# @example AllowedMethods: ['has_many'] +# # bad +# def do_something +# has_many :articles do +# def find_or_create_by_name(name) +# end +# end +# end +# +# @example AllowedPatterns: [] (default) +# # bad +# def foo(obj) +# obj.do_baz do +# def bar +# end +# end +# end +# +# @example AllowedPatterns: ['baz'] +# # good +# def foo(obj) +# obj.do_baz do +# def bar +# end +# end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/nested_method_definition.rb:91 +class RuboCop::Cop::Lint::NestedMethodDefinition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + + # pkg:gem/rubocop#lib/rubocop/cop/lint/nested_method_definition.rb:131 + def eval_call?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/nested_method_definition.rb:136 + def exec_call?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/nested_method_definition.rb:97 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/nested_method_definition.rb:111 + def on_defs(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/nested_method_definition.rb:124 + def allowed_method_name?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/nested_method_definition.rb:120 + def allowed_subject_type?(subject); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/nested_method_definition.rb:115 + def scoping_method_call?(child); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/nested_method_definition.rb:95 +RuboCop::Cop::Lint::NestedMethodDefinition::MSG = T.let(T.unsafe(nil), String) + +# Checks for nested percent literals. +# +# @example +# +# # bad +# +# # The percent literal for nested_attributes is parsed as four tokens, +# # yielding the array [:name, :content, :"%i[incorrectly", :"nested]"]. +# attributes = { +# valid_attributes: %i[name content], +# nested_attributes: %i[name content %i[incorrectly nested]] +# } +# +# # good +# +# # Neither is incompatible with the bad case, but probably the intended code. +# attributes = { +# valid_attributes: %i[name content], +# nested_attributes: [:name, :content, %i[incorrectly nested]] +# } +# +# attributes = { +# valid_attributes: %i[name content], +# nested_attributes: [:name, :content, [:incorrectly, :nested]] +# } +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/nested_percent_literal.rb:32 +class RuboCop::Cop::Lint::NestedPercentLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::PercentLiteral + + # pkg:gem/rubocop#lib/rubocop/cop/lint/nested_percent_literal.rb:44 + def on_array(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/nested_percent_literal.rb:48 + def on_percent_literal(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/nested_percent_literal.rb:54 + def contains_percent_literals?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/nested_percent_literal.rb:35 +RuboCop::Cop::Lint::NestedPercentLiteral::MSG = T.let(T.unsafe(nil), String) + +# The array of regular expressions representing percent literals that, +# if found within a percent literal expression, will cause a +# NestedPercentLiteral violation to be emitted. +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/nested_percent_literal.rb:41 +RuboCop::Cop::Lint::NestedPercentLiteral::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/nested_percent_literal.rb:42 +RuboCop::Cop::Lint::NestedPercentLiteral::REGEXES = T.let(T.unsafe(nil), Array) + +# Don't omit the accumulator when calling `next` in a `reduce` block. +# +# @example +# +# # bad +# result = (1..4).reduce(0) do |acc, i| +# next if i.odd? +# acc + i +# end +# +# # good +# result = (1..4).reduce(0) do |acc, i| +# next acc if i.odd? +# acc + i +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/next_without_accumulator.rb:21 +class RuboCop::Cop::Lint::NextWithoutAccumulator < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/next_without_accumulator.rb:24 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/next_without_accumulator.rb:39 + def on_block_body_of_reduce(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/next_without_accumulator.rb:34 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/next_without_accumulator.rb:33 + def on_numblock(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/next_without_accumulator.rb:47 + def parent_block_node(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/next_without_accumulator.rb:22 +RuboCop::Cop::Lint::NextWithoutAccumulator::MSG = T.let(T.unsafe(nil), String) + +# Checks for the presence of a `return` inside a `begin..end` block +# in assignment contexts. +# In this situation, the `return` will result in an exit from the current +# method, possibly leading to unexpected behavior. +# +# @example +# +# # bad +# @some_variable ||= begin +# return some_value if some_condition_is_met +# +# do_something +# end +# +# # good +# @some_variable ||= begin +# if some_condition_is_met +# some_value +# else +# do_something +# end +# end +# +# # good +# some_variable = if some_condition_is_met +# return if another_condition_is_met +# +# some_value +# else +# do_something +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb:38 +class RuboCop::Cop::Lint::NoReturnInBeginEndBlocks < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb:53 + def on_casgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb:51 + def on_cvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb:52 + def on_gvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb:50 + def on_ivasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb:41 + def on_lvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb:55 + def on_op_asgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb:54 + def on_or_asgn(node); end + + private + + # A `return` inside a nested method definition or lambda within the + # `begin..end` returns from that inner scope rather than the assignment + # context, so it is not an offense. A `return` inside a plain block (or + # `proc`) does propagate out, so it remains an offense. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb:63 + def return_from_inner_scope?(return_node, kwbegin_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb:39 +RuboCop::Cop::Lint::NoReturnInBeginEndBlocks::MSG = T.let(T.unsafe(nil), String) + +# Checks for non-atomic file operation. +# And then replace it with a nearly equivalent and atomic method. +# +# These can cause problems that are difficult to reproduce, +# especially in cases of frequent file operations in parallel, +# such as test runs with parallel_rspec. +# +# For examples: creating a directory if there is none, has the following problems +# +# An exception occurs when the directory didn't exist at the time of `exist?`, +# but someone else created it before `mkdir` was executed. +# +# Subsequent processes are executed without the directory that should be there +# when the directory existed at the time of `exist?`, +# but someone else deleted it shortly afterwards. +# +# @safety +# This cop is unsafe, because autocorrection change to atomic processing. +# The atomic processing of the replacement destination is not guaranteed +# to be strictly equivalent to that before the replacement. +# +# @example +# # bad - race condition with another process may result in an error in `mkdir` +# unless Dir.exist?(path) +# FileUtils.mkdir(path) +# end +# +# # good - atomic and idempotent creation +# FileUtils.mkdir_p(path) +# +# # bad - race condition with another process may result in an error in `remove` +# if File.exist?(path) +# FileUtils.remove(path) +# end +# +# # good - atomic and idempotent removal +# FileUtils.rm_f(path) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:44 +class RuboCop::Cop::Lint::NonAtomicFileOperation < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:76 + def explicit_not_force?(param0); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:71 + def force?(param0); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:80 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:66 + def receiver_and_method_name(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:61 + def send_exist_node(param0); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:98 + def allowable_use_with_if?(if_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:123 + def autocorrect(corrector, node, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:134 + def autocorrect_replace_method(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:154 + def force_method?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:168 + def force_method_name?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:164 + def force_option?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:92 + def if_node_child?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:113 + def message_change_force_method(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:117 + def message_remove_file_exist_check(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:102 + def register_offense(node, exist_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:142 + def replacement_method(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:158 + def require_mode_keyword?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:50 +RuboCop::Cop::Lint::NonAtomicFileOperation::MAKE_FORCE_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:51 +RuboCop::Cop::Lint::NonAtomicFileOperation::MAKE_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/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) + +# pkg:gem/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) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:54 +RuboCop::Cop::Lint::NonAtomicFileOperation::RECURSIVE_REMOVE_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:52 +RuboCop::Cop::Lint::NonAtomicFileOperation::REMOVE_FORCE_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/non_atomic_file_operation.rb:53 +RuboCop::Cop::Lint::NonAtomicFileOperation::REMOVE_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/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 +# the order in which files are returned. The final order is +# determined by the operating system and file system. +# This means that using them in cases where the order matters, +# such as requiring files, can lead to intermittent failures +# that are hard to debug. To ensure this doesn't happen, +# always sort the list. +# +# `Dir.glob` and `Dir[]` sort globbed results by default in Ruby 3.0. +# So all bad cases are acceptable when Ruby 3.0 or higher is used. +# +# NOTE: This cop will be deprecated and removed when supporting only Ruby 3.0 and higher. +# +# @safety +# This cop is unsafe in the case where sorting files changes existing +# expected behavior. +# +# @example +# +# # bad +# Dir["./lib/**/*.rb"].each do |file| +# require file +# end +# +# # good +# Dir["./lib/**/*.rb"].sort.each do |file| +# require file +# end +# +# # bad +# Dir.glob(Rails.root.join(__dir__, 'test', '*.rb')) do |file| +# require file +# end +# +# # good +# Dir.glob(Rails.root.join(__dir__, 'test', '*.rb')).sort.each do |file| +# require file +# end +# +# # bad +# Dir['./lib/**/*.rb'].each(&method(:require)) +# +# # good +# Dir['./lib/**/*.rb'].sort.each(&method(:require)) +# +# # bad +# Dir.glob(Rails.root.join('test', '*.rb'), &method(:require)) +# +# # good +# Dir.glob(Rails.root.join('test', '*.rb')).sort.each(&method(:require)) +# +# # good - Respect intent if `sort` keyword option is specified in Ruby 3.0 or higher. +# Dir.glob(Rails.root.join(__dir__, 'test', '*.rb'), sort: false).each(&method(:require)) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:60 +class RuboCop::Cop::Lint::NonDeterministicRequireOrder < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:174 + def loop_variable(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:157 + def method_require?(param0 = T.unsafe(nil)); end + + # NOTE: itblock is not handled because this cop is limited to Ruby <= 2.7 + # via `maximum_target_ruby_version`, so itblock nodes (Ruby 3.4+) are never encountered. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:70 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:92 + def on_block_pass(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:81 + def on_numblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:147 + def unsorted_dir_block?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:152 + def unsorted_dir_each?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:168 + def unsorted_dir_each_pass?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:162 + def unsorted_dir_glob_pass?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:179 + def var_is_required?(param0, param1); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:109 + def correct_block(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:119 + def correct_block_pass(corrector, node); end + + # Returns range of last argument including comma and whitespace. + # + # @return [Parser::Source::Range] + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:134 + def last_arg_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:138 + def unsorted_dir_loop?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:142 + def unsorted_dir_pass?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/non_deterministic_require_order.rb:64 +RuboCop::Cop::Lint::NonDeterministicRequireOrder::MSG = T.let(T.unsafe(nil), String) + +# Checks for non-local exits from iterators without a return +# value. It registers an offense under these conditions: +# +# * No value is returned, +# * the block is preceded by a method chain, +# * the block has arguments, +# * the method which receives the block is not `define_method` +# or `define_singleton_method`, +# * the return is not contained in an inner scope, e.g. a lambda or a +# method definition. +# +# @example +# +# class ItemApi +# rescue_from ValidationError do |e| # non-iteration block with arg +# return { message: 'validation error' } unless e.errors # allowed +# error_array = e.errors.map do |error| # block with method chain +# return if error.suppress? # warned +# return "#{error.param}: invalid" unless error.message # allowed +# "#{error.param}: #{error.message}" +# end +# { message: 'validation error', errors: error_array } +# end +# +# def update_items +# transaction do # block without arguments +# return unless update_necessary? # allowed +# find_each do |item| # block without method chain +# return if item.stock == 0 # false-negative... +# item.update!(foobar: true) +# end +# end +# end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/non_local_exit_from_iterator.rb:41 +class RuboCop::Cop::Lint::NonLocalExitFromIterator < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_local_exit_from_iterator.rb:77 + def chained_send?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_local_exit_from_iterator.rb:80 + def define_method?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_local_exit_from_iterator.rb:46 + def on_return(return_node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_local_exit_from_iterator.rb:72 + def return_value?(return_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/non_local_exit_from_iterator.rb:68 + def scoped_node?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/non_local_exit_from_iterator.rb:42 +RuboCop::Cop::Lint::NonLocalExitFromIterator::MSG = T.let(T.unsafe(nil), String) + +# Warns against the usage of unsafe number conversions. Unsafe +# number conversion can cause an unexpected error if auto type conversion +# fails. The cop prefers parsing with a number class instead. +# +# 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``). +# As such, this cop is disabled by default because it's not necessarily +# always correct to raise if a value is not numeric. +# +# NOTE: Some values cannot be converted properly using one of the `Kernel` +# methods (for instance, `Time` and `DateTime` values are allowed by this +# cop by default). Similarly, Rails' duration methods do not work well +# with `Integer()` and can be allowed with `AllowedMethods`. By default, +# there are no allowed methods. +# +# @safety +# Autocorrection is unsafe because it is not guaranteed that the +# replacement `Kernel` methods are able to properly handle the +# input if it is not a standard class. +# +# @example +# +# # bad +# +# '10'.to_i +# '10.2'.to_f +# '10'.to_c +# '1/3'.to_r +# ['1', '2', '3'].map(&:to_i) +# foo.try(:to_f) +# bar.send(:to_c) +# +# # good +# +# Integer('10', 10) +# Float('10.2') +# Complex('10') +# Rational('1/3') +# ['1', '2', '3'].map { |i| Integer(i, 10) } +# foo.try { |i| Float(i) } +# bar.send { |i| Complex(i) } +# +# @example AllowedMethods: [] (default) +# +# # bad +# 10.minutes.to_i +# +# @example AllowedMethods: [minutes] +# +# # good +# 10.minutes.to_i +# +# @example AllowedPatterns: [] (default) +# +# # bad +# 10.minutes.to_i +# +# @example AllowedPatterns: ['min*'] +# +# # good +# 10.minutes.to_i +# +# @example AllowedClasses: [Time, DateTime] (default) +# +# # good +# Time.now.to_datetime.to_i +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:73 +class RuboCop::Cop::Lint::NumberConversion < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:110 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:106 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:92 + def to_method(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:97 + def to_method_symbol(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:173 + def allow_receiver?(receiver); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:185 + def allowed_method_name?(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:195 + def conversion_method?(method_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:150 + def correct_method(node, receiver); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:154 + def correct_sym_method(to_method); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:159 + def current_method(node, receiver, to_method); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:133 + def handle_as_symbol(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:114 + def handle_conversion_method(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:203 + def ignored_class?(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:199 + def ignored_classes; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:164 + def remove_parentheses(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:169 + def safe_navigation?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:189 + def top_receiver(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:88 +RuboCop::Cop::Lint::NumberConversion::CONVERSION_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:78 +RuboCop::Cop::Lint::NumberConversion::CONVERSION_METHOD_CLASS_MAPPING = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:89 +RuboCop::Cop::Lint::NumberConversion::METHODS = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/number_conversion.rb:84 +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 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 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin19] +# -e:1: _1 is reserved for numbered parameter +# +# NOTE: The numbered parameters are from `_1` to `_9`. This cop checks `_0`, and over `_10` +# as well to prevent confusion. +# +# @example +# +# # bad +# _1 = :value +# +# # good +# non_numbered_parameter_name = :value +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/numbered_parameter_assignment.rb:30 +class RuboCop::Cop::Lint::NumberedParameterAssignment < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/numbered_parameter_assignment.rb:35 + def on_lvasgn(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/numbered_parameter_assignment.rb:32 +RuboCop::Cop::Lint::NumberedParameterAssignment::LVAR_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/numbered_parameter_assignment.rb:33 +RuboCop::Cop::Lint::NumberedParameterAssignment::NUMBERED_PARAMETER_RANGE = T.let(T.unsafe(nil), Range) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/numbered_parameter_assignment.rb:31 +RuboCop::Cop::Lint::NumberedParameterAssignment::NUM_PARAM_MSG = T.let(T.unsafe(nil), String) + +# Certain numeric operations have a constant result, usually 0 or 1. +# Multiplying a number by 0 will always return 0. +# Dividing a number by itself or raising it to the power of 0 will always return 1. +# As such, they can be replaced with that result. +# These are probably leftover from debugging, or are mistakes. +# Other numeric operations that are similarly leftover from debugging or mistakes +# are handled by `Lint/UselessNumericOperation`. +# +# NOTE: This cop doesn't detect offenses for the `-` and `%` operator because it +# can't determine the type of `x`. If `x` is an `Array` or `String`, it doesn't perform +# a numeric operation. +# +# @safety +# This cop is unsafe because the autocorrection drops the operands, which +# discards any side effects of evaluating them and can change behavior when +# the result is not actually constant. For example, `x / x` raises +# `ZeroDivisionError` when `x` is `0`, and returns `Float::NAN` (not `1`) +# when `x` is `0.0`; replacing it with `1` silences that. +# +# @example +# +# # bad +# x * 0 +# +# # good +# 0 +# +# # bad +# x *= 0 +# +# # good +# x = 0 +# +# # bad +# x / x +# x ** 0 +# +# # good +# 1 +# +# # bad +# x /= x +# x **= 0 +# +# # good +# x = 1 +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb:53 +class RuboCop::Cop::Lint::NumericOperationWithConstantResult < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb:64 + def abbreviated_assignment_with_constant_result?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb:78 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb:80 + def on_op_asgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb:67 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb:60 + def operation_with_constant_result?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb:91 + def constant_result?(lhs, operation, rhs); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb:56 +RuboCop::Cop::Lint::NumericOperationWithConstantResult::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb:57 +RuboCop::Cop::Lint::NumericOperationWithConstantResult::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for unintended or-assignment to a constant. +# +# Constants should always be assigned in the same location. And its value +# should always be the same. If constants are assigned in multiple +# locations, the result may vary depending on the order of `require`. +# +# @safety +# This cop is unsafe because code that is already conditionally +# assigning a constant may have its behavior changed by autocorrection. +# +# @example +# +# # bad +# CONST ||= 1 +# +# # good +# CONST = 1 +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/or_assignment_to_constant.rb:24 +class RuboCop::Cop::Lint::OrAssignmentToConstant < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/or_assignment_to_constant.rb:29 + def on_or_asgn(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/or_assignment_to_constant.rb:27 +RuboCop::Cop::Lint::OrAssignmentToConstant::MSG = T.let(T.unsafe(nil), String) + +# Checks the proper ordering of magic comments and whether +# a magic comment is not placed before a shebang. +# +# @safety +# This cop's autocorrection is unsafe because file encoding may change. +# +# @example +# # bad +# +# p [''.frozen?, ''.encoding] #=> [true, #] +# +# # good +# +# p [''.frozen?, ''.encoding] #=> [true, #] +# +# # good +# +# #!/usr/bin/env ruby +# p [''.frozen?, ''.encoding] #=> [true, #] +# +# pkg:gem/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 + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ordered_magic_comments.rb:38 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ordered_magic_comments.rb:55 + def autocorrect(corrector, encoding_line, other_magic_comment_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/ordered_magic_comments.rb:63 + def magic_comment_lines; end +end + +# pkg:gem/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 +# and thus always returns nil. +# +# @safety +# This cop is unsafe because it is naive in how it determines what +# references are available based on the last encountered regexp, but +# it cannot handle some cases, such as conditional regexp matches, which +# leads to false positives, such as: +# +# [source,ruby] +# ---- +# foo ? /(c)(b)/ =~ str : /(b)/ =~ str +# do_something if $2 +# # $2 is defined for the first condition but not the second, however +# # the cop will mark this as an offense. +# ---- +# +# This might be a good indication of code that should be refactored, +# however. +# +# @example +# +# /(foo)bar/ =~ 'foobar' +# +# # bad - always returns nil +# +# puts $2 # => nil +# +# # good +# +# puts $1 # => foo +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:38 +class RuboCop::Cop::Lint::OutOfRangeRegexpRef < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:66 + def after_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:55 + def after_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:74 + def on_in_pattern(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:51 + def on_match_with_lvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:47 + def on_new_investigation; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:80 + def on_nth_ref(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:68 + def on_when(node); end + + private + + # A call such as `hash[:key]` or `array[0]` cannot involve a regexp match: + # a non-string literal cannot act as a pattern (whereas `sub`, `gsub`, + # and `match` treat a string one as a pattern and do set backreferences), + # and `$~` is frame-local, so a user-defined method cannot change + # the caller's backreferences either. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:121 + def backrefs_unaffected?(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:105 + def check_regexp(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:129 + def regexp_first_argument?(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:96 + def regexp_patterns(in_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:134 + def regexp_receiver?(send_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:39 +RuboCop::Cop::Lint::OutOfRangeRegexpRef::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:42 +RuboCop::Cop::Lint::OutOfRangeRegexpRef::REGEXP_ARGUMENT_METHODS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:44 +RuboCop::Cop::Lint::OutOfRangeRegexpRef::REGEXP_CAPTURE_METHODS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:41 +RuboCop::Cop::Lint::OutOfRangeRegexpRef::REGEXP_RECEIVER_METHODS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/out_of_range_regexp_ref.rb:45 +RuboCop::Cop::Lint::OutOfRangeRegexpRef::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# Checks for space between the name of a called method and a left +# parenthesis. +# +# @example +# +# # bad +# do_something (foo) +# +# # good +# do_something(foo) +# do_something (2 + 3) * 4 +# do_something (foo * bar).baz +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:18 +class RuboCop::Cop::Lint::ParenthesesAsGroupedExpression < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:35 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:24 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:72 + def chained_calls?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:52 + def compound_range?(first_arg); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:56 + def invalid_bare_argument?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:63 + def keyword_operator?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:68 + def modifier_expression?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:87 + def space_range(expr, space_length); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:81 + def spaces_before_left_parenthesis(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:77 + def ternary_expression?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:39 + def valid_context?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:47 + def valid_first_argument?(first_arg); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:22 +RuboCop::Cop::Lint::ParenthesesAsGroupedExpression::MSG = T.let(T.unsafe(nil), String) + +# Checks for quotes and commas in %w, e.g. `%w('foo', "bar")` +# +# It is more likely that the additional characters are unintended (for +# example, mistranslating an array of literals to percent string notation) +# rather than meant to be part of the resulting strings. +# +# @safety +# The cop is unsafe because the correction changes the values in the array +# and that might have been done purposely. +# +# [source,ruby] +# ---- +# %w('foo', "bar") #=> ["'foo',", '"bar"'] +# %w(foo bar) #=> ['foo', 'bar'] +# ---- +# +# @example +# +# # bad +# %w('foo', "bar") +# +# # good +# %w(foo bar) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/percent_string_array.rb:29 +class RuboCop::Cop::Lint::PercentStringArray < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::PercentLiteral + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/percent_string_array.rb:40 + def on_array(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/percent_string_array.rb:44 + def on_percent_literal(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/percent_string_array.rb:61 + def contains_quotes_or_commas?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/percent_string_array.rb:34 +RuboCop::Cop::Lint::PercentStringArray::LEADING_QUOTE = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/percent_string_array.rb:37 +RuboCop::Cop::Lint::PercentStringArray::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/percent_string_array.rb:33 +RuboCop::Cop::Lint::PercentStringArray::QUOTES_AND_COMMAS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/percent_string_array.rb:35 +RuboCop::Cop::Lint::PercentStringArray::TRAILING_QUOTE = T.let(T.unsafe(nil), Regexp) + +# Checks for colons and commas in %i, e.g. `%i(:foo, :bar)` +# +# It is more likely that the additional characters are unintended (for +# example, mistranslating an array of literals to percent string notation) +# rather than meant to be part of the resulting symbols. +# +# @example +# +# # bad +# %i(:foo, :bar) +# +# # good +# %i(foo bar) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/percent_symbol_array.rb:19 +class RuboCop::Cop::Lint::PercentSymbolArray < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::PercentLiteral + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/percent_symbol_array.rb:26 + def on_array(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/percent_symbol_array.rb:30 + def on_percent_literal(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/percent_symbol_array.rb:38 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/percent_symbol_array.rb:48 + def contains_colons_or_commas?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/percent_symbol_array.rb:58 + def non_alphanumeric_literal?(literal); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/percent_symbol_array.rb:23 +RuboCop::Cop::Lint::PercentSymbolArray::MSG = T.let(T.unsafe(nil), String) + +# Checks for `raise` or `fail` statements which raise `Exception` or +# `Exception.new`. Use `StandardError` or a specific exception class instead. +# +# If you have defined your own namespaced `Exception` class, it is possible +# to configure the cop to allow it by setting `AllowedImplicitNamespaces` to +# an array with the names of the namespaces to allow. By default, this is set to +# `['Gem']`, which allows `Gem::Exception` to be raised without an explicit namespace. +# If not allowed, a false positive may be registered if `raise Exception` is called +# within the namespace. +# +# Alternatively, use a fully qualified name with `raise`/`fail` +# (eg. `raise Namespace::Exception`). +# +# @safety +# This cop is unsafe because it will change the exception class being +# raised, which is a change in behavior. +# +# @example +# # bad +# raise Exception, 'Error message here' +# raise Exception.new('Error message here') +# +# # good +# raise StandardError, 'Error message here' +# raise MyError.new, 'Error message here' +# +# @example AllowedImplicitNamespaces: ['Gem'] (default) +# # bad - `Foo` is not an allowed implicit namespace +# module Foo +# def self.foo +# raise Exception # This is qualified to `Foo::Exception`. +# end +# end +# +# # good +# module Gem +# def self.foo +# raise Exception # This is qualified to `Gem::Exception`. +# end +# end +# +# # good +# module Foo +# def self.foo +# raise Foo::Exception +# end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/raise_exception.rb:53 +class RuboCop::Cop::Lint::RaiseException < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/raise_exception.rb:60 + def exception?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/raise_exception.rb:65 + def exception_new_with_message?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/raise_exception.rb:70 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/raise_exception.rb:104 + def allow_implicit_namespaces; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/raise_exception.rb:76 + def check(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/raise_exception.rb:92 + def implicit_namespace?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/raise_exception.rb:56 +RuboCop::Cop::Lint::RaiseException::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/raise_exception.rb:57 +RuboCop::Cop::Lint::RaiseException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for `rand(1)` calls. +# Such calls always return `0`, and so do `rand(-1)`, `rand(1.0)`, and `rand(-1.0)`. +# +# @example +# +# # bad +# rand 1 +# Kernel.rand(-1) +# rand 1.0 +# rand(-1.0) +# +# # good +# 0 # just use 0 instead +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/rand_one.rb:19 +class RuboCop::Cop::Lint::RandOne < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/rand_one.rb:28 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/rand_one.rb:24 + def rand_one?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/rand_one.rb:36 + def message(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/rand_one.rb:20 +RuboCop::Cop::Lint::RandOne::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/rand_one.rb:21 +RuboCop::Cop::Lint::RandOne::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# removed without causing any offenses to be reported. It's implemented +# as a cop in that it inherits from the Cop base class and calls +# add_offense. The unusual part of its implementation is that it doesn't +# have any on_* methods or an investigate method. This means that it +# doesn't take part in the investigation phase when the other cops do +# their work. Instead, it waits until it's called in a later stage of the +# execution. The reason it can't be implemented as a normal cop is that +# it depends on the results of all other cops to do its work. +# +# +# @example +# # bad +# x += 1 +# +# # good +# x += 1 +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:28 +class RuboCop::Cop::Lint::RedundantCopDisableDirective < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:37 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil), offenses = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:35 + def offenses_to_check; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:35 + def offenses_to_check=(_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:42 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:445 + def add_department_marker(department); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:346 + def add_offense_for_cop_in_list(cop, range, ranges); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:305 + def add_offense_for_entire_comment(comment, cops); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:336 + def add_offense_for_some_cops(comment, cops); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:295 + def add_offenses(redundant_cops); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:428 + def all_cop_names; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:266 + def all_disabled?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:355 + def any_unknown_cop?(cops); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:69 + def comment_range_with_surrounding_space(directive_comment_range, line_comment_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:57 + def cop_disabled_line_ranges; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:377 + def cop_range(comment, cop); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:286 + def department_disabled?(cop, comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:437 + def department_marker?(department); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:415 + def describe(cop); end + + # A range opened by a `disable-next` directive starts at the statement, + # not at the directive comment above it, so ask the range itself. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:161 + def directive_comment(line_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:291 + def directive_count(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:92 + def directive_range_in_list(range, ranges); end + + # A cop that only the `Preview` defaults disable runs again as soon as + # preview is turned off, so its directives are still needed. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:133 + def disabled_by_preview?(cop); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:61 + def disabled_ranges; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:205 + def each_already_disabled(cop, line_ranges); end + + # A next-statement directive with no statement attached (or misplaced + # at the end of a code line) affects nothing, so it is redundant by + # definition. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:172 + def each_detached_next_directive; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:142 + def each_line_range(cop, line_ranges); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:106 + def each_redundant_disable(&block); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:432 + def ends_its_line?(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:278 + def expected_final_disable?(cop, line_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:238 + def find_redundant_all(range, next_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:233 + def find_redundant_cop(cop, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:248 + def find_redundant_department(cop, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:194 + def find_redundant_directive(cop, comment, line_range, next_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:254 + def followed_ranges?(range, next_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:270 + def ignore_offense?(line_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:371 + def leave_free_comment?(comment, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:384 + def matching_range(haystack, needle); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:424 + def message(cop_names, enabling: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:359 + def misplaced_next_directive?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:120 + def pending_cop_not_run?(cop); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:65 + def previous_line_blank?(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:258 + def range_with_offense?(range, offenses = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:441 + def remove_department_marker(department); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:324 + def remove_entire_comment(corrector, comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:155 + def should_skip_line_range?(cop, line_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:183 + def skip_directive?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:395 + def trailing_range?(ranges, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:365 + def unknown_cop?(cop); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:32 +RuboCop::Cop::Lint::RedundantCopDisableDirective::COP_NAME = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:33 +RuboCop::Cop::Lint::RedundantCopDisableDirective::DEPARTMENT_MARKER = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_disable_directive.rb:403 +RuboCop::Cop::Lint::RedundantCopDisableDirective::SIMILAR_COP_NAMES_CACHE = T.let(T.unsafe(nil), Hash) + +# removed. +# +# the cop checks whether any cop was actually enabled. +# +# @example +# +# # bad +# foo = 1 +# +# # good +# foo = 1 +# +# # bad +# foo = "1" +# baz +# +# # good +# foo = "1" +# baz +# +# # bad +# foo = 1 +# +# # good +# foo = "1" +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_enable_directive.rb:42 +class RuboCop::Cop::Lint::RedundantCopEnableDirective < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_enable_directive.rb:50 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_enable_directive.rb:159 + def all_or_name(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_enable_directive.rb:60 + def check_extra_enables; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_enable_directive.rb:65 + def check_orphan_pops; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_enable_directive.rb:112 + def comment_start(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_enable_directive.rb:116 + def cop_name_indention(comment, name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_enable_directive.rb:163 + def department?(directive, name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_enable_directive.rb:107 + def range_of_offense(comment, name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_enable_directive.rb:134 + def range_to_remove(begin_pos, end_pos, comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_enable_directive.rb:123 + def range_with_comma(comment, name); end + + # If the list of cops is comma-separated, but without an empty space after the comma, + # we should **not** remove the prepending empty space, thus begin_pos += 1 + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_enable_directive.rb:153 + def range_with_comma_after(comment, start, begin_pos, end_pos); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_enable_directive.rb:147 + def range_with_comma_before(start, begin_pos, end_pos); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_enable_directive.rb:83 + def register_offense(comment, cop_names); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_enable_directive.rb:77 + def register_orphan_pop(directive); end + + # When every cop on the directive is redundant the whole comment goes, `--` reason + # included; otherwise just the one cop is spliced out of the list. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_enable_directive.rb:99 + def removal_range(directive, comment, cop_names, name); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_enable_directive.rb:47 +RuboCop::Cop::Lint::RedundantCopEnableDirective::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_cop_enable_directive.rb:48 +RuboCop::Cop::Lint::RedundantCopEnableDirective::MSG_ORPHAN_POP = T.let(T.unsafe(nil), String) + +# Sort globbed results by default in Ruby 3.0. +# This cop checks for redundant `sort` method to `Dir.glob` and `Dir[]`. +# +# @safety +# This cop is unsafe, in case of having a file and a directory with +# identical names, since directory will be loaded before the file, which +# will break `exe/files.rb` that rely on `exe.rb` file. +# +# @example +# +# # bad +# Dir.glob('./lib/**/*.rb').sort.each do |file| +# end +# +# Dir['./lib/**/*.rb'].sort.each do |file| +# end +# +# # good +# Dir.glob('./lib/**/*.rb').each do |file| +# end +# +# Dir['./lib/**/*.rb'].each do |file| +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_dir_glob_sort.rb:30 +class RuboCop::Cop::Lint::RedundantDirGlobSort < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_dir_glob_sort.rb:41 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_dir_glob_sort.rb:71 + def autocorrect(corrector, dot, selector); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_dir_glob_sort.rb:56 + def dir_glob?(receiver); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_dir_glob_sort.rb:63 + def multiple_argument?(glob_method); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_dir_glob_sort.rb:67 + def sort_with_comparator?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_dir_glob_sort.rb:39 +RuboCop::Cop::Lint::RedundantDirGlobSort::GLOB_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_dir_glob_sort.rb:37 +RuboCop::Cop::Lint::RedundantDirGlobSort::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_dir_glob_sort.rb:38 +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*)/ +# +# pkg:gem/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 + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb:42 + def on_regexp(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb:83 + def character_set?(expr); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb:61 + def each_redundantly_quantified_pair(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb:87 + def mergeable_quantifier(expr); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb:103 + def merged_quantifier(exp1, exp2); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb:119 + def message(group, child, replacement); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb:115 + def quantifier_range(group, child); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb:75 + def redundant_group?(expr); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb:79 + def redundantly_quantifiable?(node); end +end + +# pkg:gem/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 +# they are already loaded. e.g. Ruby 2.2: +# +# ruby -ve 'p $LOADED_FEATURES.reject { |feature| %r|/| =~ feature }' +# ruby 2.2.8p477 (2017-09-14 revision 59906) [x86_64-darwin13] +# ["enumerator.so", "rational.so", "complex.so", "thread.rb"] +# +# Below are the features that each `TargetRubyVersion` targets. +# +# * 2.0+ ... `enumerator` +# * 2.1+ ... `thread` +# * 2.2+ ... Add `rational` and `complex` above +# * 2.7+ ... Add `ruby2_keywords` above +# * 3.1+ ... Add `fiber` above +# * 3.2+ ... Add `set` above +# * 4.0+ ... Add `pathname` above +# +# This cop target those features. +# +# @example +# # bad +# require 'unloaded_feature' +# require 'thread' +# +# # good +# require 'unloaded_feature' +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_require_statement.rb:34 +class RuboCop::Cop::Lint::RedundantRequireStatement < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_require_statement.rb:48 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_require_statement.rb:43 + def redundant_require_statement?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_require_statement.rb:67 + def redundant_feature?(feature_name); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_require_statement.rb:38 +RuboCop::Cop::Lint::RedundantRequireStatement::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_require_statement.rb:39 +RuboCop::Cop::Lint::RedundantRequireStatement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_require_statement.rb:40 +RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T.unsafe(nil), Array) + +# Checks for redundant safe navigation calls. +# 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 constant. The detection also applies +# to `self`, and to literal receivers, except for `nil`. +# +# 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. +# Note that the `AllowedMethod` option is not an option that specifies methods +# for which to suppress (allow) this cop's check. +# +# In the example below, the safe navigation operator (`&.`) is unnecessary +# because `NilClass` has methods like `respond_to?` and `is_a?`. +# +# The `InferNonNilReceiver` option specifies whether to look into previous code +# paths to infer if the receiver can't be nil. This check is unsafe because the receiver +# can be redefined between the safe navigation call and previous regular method call. +# It does the inference only in the current scope, e.g. within the same method definition etc. +# +# The `AdditionalNilMethods` option specifies additional custom methods which are +# defined on `NilClass`. When `InferNonNilReceiver` is set, they are used to determine +# whether the receiver can be nil. +# +# @safety +# This cop is unsafe, because autocorrection can change the return type of +# the expression. An offending expression that previously could return `nil` +# will be autocorrected to never return `nil`. +# +# @example +# # bad +# CamelCaseConst&.do_something +# +# # good +# CamelCaseConst.do_something +# +# # bad +# foo.to_s&.strip +# foo.to_i&.zero? +# foo.to_f&.zero? +# foo.to_a&.size +# foo.to_h&.size +# +# # good +# foo.to_s.strip +# foo.to_i.zero? +# foo.to_f.zero? +# foo.to_a.size +# foo.to_h.size +# +# # bad +# do_something if attrs&.respond_to?(:[]) +# +# # good +# do_something if attrs.respond_to?(:[]) +# +# # bad +# foo&.bar ? foo&.bar.baz : qux +# +# # good +# foo&.bar ? foo.bar.baz : qux +# +# # bad +# if foo&.bar +# foo&.bar.baz +# end +# +# # good +# if foo&.bar +# foo.bar.baz +# end +# +# # bad +# while node&.is_a?(BeginNode) +# node = node.parent +# end +# +# # good +# while node.is_a?(BeginNode) +# node = node.parent +# end +# +# # good - without `&.` this changes the return value for `nil` +# foo&.respond_to?(:to_a) +# foo&.respond_to?(:class) +# +# # 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 +# +# # bad +# self&.foo +# +# # good +# self.foo +# +# @example AllowedMethods: [nil_safe_method] +# # bad +# do_something if attrs&.nil_safe_method(:[]) +# +# # good +# do_something if attrs.nil_safe_method(:[]) +# do_something if attrs&.not_nil_safe_method(:[]) +# +# @example InferNonNilReceiver: false (default) +# # good +# foo.bar +# foo&.baz +# +# @example InferNonNilReceiver: true +# # bad +# foo.bar +# foo&.baz # would raise on previous line if `foo` is nil +# +# # good +# foo.bar +# foo.baz +# +# # bad +# if foo.condition? +# foo&.bar +# end +# +# # good +# if foo.condition? +# foo.bar +# end +# +# # good (different scopes) +# def method1 +# foo.bar +# end +# +# def method2 +# foo&.bar +# end +# +# @example AdditionalNilMethods: [present?] +# # good +# foo.present? +# foo&.bar +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:162 +class RuboCop::Cop::Lint::RedundantSafeNavigation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:183 + def conversion_with_default?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:194 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:212 + def on_or(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:178 + def respond_to_nil_method?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:275 + def additional_nil_methods; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:239 + def assume_receiver_instance_exists?(receiver); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:256 + def check?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:267 + def condition?(parent, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:245 + def guaranteed_instance?(node); end + + # Returns true when the `&.` is meaningful because the receiver may actually be nil. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:228 + def guarded_by_nil_receiver?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:271 + def infer_non_nil_receiver?; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:175 +RuboCop::Cop::Lint::RedundantSafeNavigation::GUARANTEED_INSTANCE_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:166 +RuboCop::Cop::Lint::RedundantSafeNavigation::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:167 +RuboCop::Cop::Lint::RedundantSafeNavigation::MSG_LITERAL = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:168 +RuboCop::Cop::Lint::RedundantSafeNavigation::MSG_NON_NIL = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:171 +RuboCop::Cop::Lint::RedundantSafeNavigation::NIL_METHODS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:173 +RuboCop::Cop::Lint::RedundantSafeNavigation::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) + +# Checks for unneeded usages of splat expansion. +# +# @example +# +# # bad +# a = *[1, 2, 3] +# a = *'a' +# a = *1 +# ['a', 'b', *%w(c d e), 'f', 'g'] +# +# # good +# c = [1, 2, 3] +# a = *c +# a, b = *c +# a, *b = *c +# a = *1..10 +# a = ['a'] +# ['a', 'b', 'c', 'd', 'e', 'f', 'g'] +# +# # bad +# do_something(*['foo', 'bar', 'baz']) +# +# # good +# do_something('foo', 'bar', 'baz') +# +# # bad +# begin +# foo +# rescue *[StandardError, ApplicationError] +# bar +# end +# +# # good +# begin +# foo +# rescue StandardError, ApplicationError +# bar +# end +# +# # bad +# case foo +# when *[1, 2, 3] +# bar +# else +# baz +# end +# +# # good +# case foo +# when 1, 2, 3 +# bar +# else +# baz +# end +# +# @example AllowPercentLiteralArrayArgument: true (default) +# +# # good +# do_something(*%w[foo bar baz]) +# +# @example AllowPercentLiteralArrayArgument: false +# +# # bad +# do_something(*%w[foo bar baz]) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:71 +class RuboCop::Cop::Lint::RedundantSplatExpansion < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:83 + def array_new?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:91 + def literal_expansion(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:95 + def on_splat(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:213 + def allow_percent_literal_array_argument?; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:135 + def array_new_inside_array_literal?(array_new_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:161 + def array_splat?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:112 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:165 + def method_argument?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:169 + def part_of_an_array?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:176 + def redundant_brackets?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:118 + def redundant_splat_expansion(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:188 + def remove_brackets(array); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:143 + def replacement_range_and_content(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:206 + def use_percent_literal_array_argument?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:184 + def wrap_in_brackets?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:75 +RuboCop::Cop::Lint::RedundantSplatExpansion::ARRAY_PARAM_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:80 +RuboCop::Cop::Lint::RedundantSplatExpansion::ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:74 +RuboCop::Cop::Lint::RedundantSplatExpansion::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:79 +RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_CAPITAL_I = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:77 +RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_CAPITAL_W = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_splat_expansion.rb:78 +RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_I = T.let(T.unsafe(nil), String) + +# pkg:gem/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, `print`, `puts`, and `warn` arguments, +# which is redundant. +# +# @example +# +# # bad +# "result is #{something.to_s}" +# print something.to_s +# puts something.to_s +# warn something.to_s +# +# # good +# "result is #{something}" +# print something +# puts something +# warn something +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_string_coercion.rb:23 +class RuboCop::Cop::Lint::RedundantStringCoercion < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Interpolation + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_string_coercion.rb:34 + def on_interpolation(begin_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_string_coercion.rb:42 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_string_coercion.rb:32 + def to_s_without_args?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_string_coercion.rb:54 + def register_offense(node, context); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_string_coercion.rb:27 +RuboCop::Cop::Lint::RedundantStringCoercion::MSG_DEFAULT = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_string_coercion.rb:28 +RuboCop::Cop::Lint::RedundantStringCoercion::MSG_SELF = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_string_coercion.rb:29 +RuboCop::Cop::Lint::RedundantStringCoercion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for redundant uses of `to_s`, `to_sym`, `to_i`, `to_f`, `to_d`, `to_r`, `to_c`, +# `to_a`, `to_h`, and `to_set`. +# +# When one of these methods is called on an object of the same type, that object +# is returned, making the call unnecessary. The cop detects conversion methods called +# on object literals, class constructors, class `[]` methods, and the `Kernel` methods +# `String()`, `Integer()`, `Float()`, BigDecimal(), `Rational()`, `Complex()`, and `Array()`. +# +# Specifically, these cases are detected for each conversion method: +# +# * `to_s` when called on a string literal, interpolated string, heredoc, +# or with `String.new` or `String()`. +# * `to_sym` when called on a symbol literal or interpolated symbol. +# * `to_i` when called on an integer literal or with `Integer()`. +# * `to_f` when called on a float literal or with `Float()`. +# * `to_d` when called with `BigDecimal()`. +# * `to_r` when called on a rational literal or with `Rational()`. +# * `to_c` when called on a complex literal or with `Complex()`. +# * `to_a` when called on an array literal, or with `Array.new`, `Array()` or `Array[]`. +# * `to_h` when called on a hash literal, or with `Hash.new`, `Hash()` or `Hash[]`. +# * `to_set` when called on `Set.new` or `Set[]`. +# +# In all cases, chaining one of the same `to_*` conversion methods listed above is redundant. +# +# The cop can also register an offense for chaining conversion methods on methods that are +# expected to return a specific type regardless of receiver (eg. `foo.inspect.to_s` and +# `foo.to_json.to_s`). +# +# @example +# # bad +# "text".to_s +# :sym.to_sym +# 42.to_i +# 8.5.to_f +# 12r.to_r +# 1i.to_c +# [].to_a +# {}.to_h +# Set.new.to_set +# +# # good +# "text" +# :sym +# 42 +# 8.5 +# 12r +# 1i +# [] +# {} +# Set.new +# +# # bad +# Integer(var).to_i +# +# # good +# Integer(var) +# +# # good - chaining to a type constructor with exceptions suppressed +# # in this case, `Integer()` could return `nil` +# Integer(var, exception: false).to_i +# +# # bad +# BigDecimal(var).to_d +# +# # good +# BigDecimal(var) +# +# # bad - chaining the same conversion +# foo.to_s.to_s +# +# # good +# foo.to_s +# +# # bad - chaining a conversion to a method that is expected to return the same type +# foo.inspect.to_s +# foo.to_json.to_s +# +# # good +# foo.inspect +# foo.to_json +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:87 +class RuboCop::Cop::Lint::RedundantTypeConversion < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:167 + def array_constructor?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:152 + def bigdecimal_constructor?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:162 + def complex_constructor?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:191 + def exception_false_keyword_argument?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:147 + def float_constructor?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:175 + def hash_constructor?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:142 + def integer_constructor?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:211 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:196 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:157 + def rational_constructor?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:184 + def set_constructor?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:134 + def string_constructor?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:129 + def type_constructor?(param0 = T.unsafe(nil), param1); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:253 + def chained_conversion?(node, receiver); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:259 + def chained_to_typed_method?(node, receiver); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:240 + def constructor?(node, receiver); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:247 + def constructor_suppresses_exceptions?(receiver); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:221 + def find_receiver(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:215 + def hash_or_set_with_block?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:234 + def literal_receiver?(node, receiver); end +end + +# Maps each conversion method to the pattern matcher for that type's constructors +# Not every type has a constructor, for instance Symbol. +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:107 +RuboCop::Cop::Lint::RedundantTypeConversion::CONSTRUCTOR_MAPPING = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:123 +RuboCop::Cop::Lint::RedundantTypeConversion::CONVERSION_METHODS = T.let(T.unsafe(nil), Set) + +# Maps conversion methods to the node types for the literals of that type +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:93 +RuboCop::Cop::Lint::RedundantTypeConversion::LITERAL_NODE_TYPES = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:90 +RuboCop::Cop::Lint::RedundantTypeConversion::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:124 +RuboCop::Cop::Lint::RedundantTypeConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# Methods that already are expected to return a given type, which makes a further +# conversion redundant. +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_type_conversion.rb:121 +RuboCop::Cop::Lint::RedundantTypeConversion::TYPED_METHODS = T.let(T.unsafe(nil), Hash) + +# Checks for redundant `with_index`. +# +# @example +# # bad +# ary.each_with_index do |v| +# v +# end +# +# # good +# ary.each do |v| +# v +# end +# +# # bad +# ary.each.with_index do |v| +# v +# end +# +# # good +# ary.each do |v| +# v +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_index.rb:29 +class RuboCop::Cop::Lint::RedundantWithIndex < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_index.rb:37 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_index.rb:55 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_index.rb:54 + def on_numblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_index.rb:60 + def redundant_with_index?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_index.rb:72 + def message(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_index.rb:80 + def with_index_range(send); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_index.rb:33 +RuboCop::Cop::Lint::RedundantWithIndex::MSG_EACH_WITH_INDEX = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_index.rb:34 +RuboCop::Cop::Lint::RedundantWithIndex::MSG_WITH_INDEX = T.let(T.unsafe(nil), String) + +# Checks for redundant `with_object`. +# +# @safety +# This cop's autocorrection is unsafe because the return value changes: +# `each_with_object` returns the memo object, while the corrected `each` returns +# the receiver. This matters when the result of the expression is used. +# +# @example +# # bad +# ary.each_with_object([]) do |v| +# v +# end +# +# # good +# ary.each do |v| +# v +# end +# +# # bad +# ary.each.with_object([]) do |v| +# v +# end +# +# # good +# ary.each do |v| +# v +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_object.rb:34 +class RuboCop::Cop::Lint::RedundantWithObject < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_object.rb:41 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_object.rb:57 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_object.rb:56 + def on_numblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_object.rb:62 + def redundant_with_object?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_object.rb:73 + def message(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_object.rb:81 + def with_object_range(send); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_object.rb:38 +RuboCop::Cop::Lint::RedundantWithObject::MSG_EACH_WITH_OBJECT = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_with_object.rb:39 +RuboCop::Cop::Lint::RedundantWithObject::MSG_WITH_OBJECT = T.let(T.unsafe(nil), String) + +# Checks if `include` or `prepend` is called in `refine` block. +# These methods are deprecated and should be replaced with `Refinement#import_methods`. +# +# It emulates deprecation warnings in Ruby 3.1. Functionality has been removed in Ruby 3.2. +# +# @safety +# This cop's autocorrection is unsafe because `include M` will affect the included class +# if any changes are made to module `M`. +# On the other hand, `import_methods M` uses a snapshot of method definitions, +# thus it will not be affected if module `M` changes. +# +# @example +# +# # bad +# refine Foo do +# include Bar +# end +# +# # bad +# refine Foo do +# prepend Bar +# end +# +# # good +# refine Foo do +# import_methods Bar +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/refinement_import_methods.rb:34 +class RuboCop::Cop::Lint::RefinementImportMethods < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # pkg:gem/rubocop#lib/rubocop/cop/lint/refinement_import_methods.rb:45 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/refinement_import_methods.rb:38 +RuboCop::Cop::Lint::RefinementImportMethods::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/refinement_import_methods.rb:39 +RuboCop::Cop::Lint::RefinementImportMethods::MSG_REMOVED = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/refinement_import_methods.rb:41 +RuboCop::Cop::Lint::RefinementImportMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for regexp literals used as `match-current-line`. +# If a regexp literal is in condition, the regexp matches `$_` implicitly. +# +# @example +# # bad +# if /foo/ +# do_something +# end +# +# # good +# if /foo/ =~ $_ +# do_something +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/regexp_as_condition.rb:19 +class RuboCop::Cop::Lint::RegexpAsCondition < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/regexp_as_condition.rb:25 + def on_match_current_line(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/regexp_as_condition.rb:22 +RuboCop::Cop::Lint::RegexpAsCondition::MSG = T.let(T.unsafe(nil), String) + +# Checks for method calls with at least one argument where no parentheses +# are used around the parameter list, and the call could be misread as an +# operand of a boolean operator (`&&` or `||`). Two forms are flagged: +# +# * a predicate method whose last argument is a `&&`/`||` expression, and +# * any method whose first argument is a ternary expression with a +# `&&`/`||` condition. +# +# The idea behind warning for these constructs is that the user might +# be under the impression that the return value from the method call is +# an operand of &&/||. +# +# @example +# +# # bad +# if day.is? :tuesday && month == :jan +# # ... +# end +# +# # good +# if day.is?(:tuesday) && month == :jan +# # ... +# end +# +# # bad +# foo a && b ? c : d +# +# # good +# foo(a && b ? c : d) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/require_parentheses.rb:35 +class RuboCop::Cop::Lint::RequireParentheses < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # pkg:gem/rubocop#lib/rubocop/cop/lint/require_parentheses.rb:49 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/require_parentheses.rb:40 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/require_parentheses.rb:63 + def check_predicate(predicate, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/require_parentheses.rb:53 + def check_ternary(ternary, node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/require_parentheses.rb:38 +RuboCop::Cop::Lint::RequireParentheses::MSG = T.let(T.unsafe(nil), String) + +# Checks that a range literal is enclosed in parentheses when the end of the range is +# at a line break. +# +# NOTE: The following is maybe intended for `(42..)`. But, compatible is `42..do_something`. +# So, this cop does not provide autocorrection because it is left to user. +# +# [source,ruby] +# ---- +# case condition +# when 42.. +# do_something +# end +# ---- +# +# @example +# +# # bad - Represents `(1..42)`, not endless range. +# 1.. +# 42 +# +# # good - It's incompatible, but your intentions when using endless range may be: +# (1..) +# 42 +# +# # good +# 1..42 +# +# # good +# (1..42) +# +# # good +# (1.. +# 42) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/require_range_parentheses.rb:40 +class RuboCop::Cop::Lint::RequireRangeParentheses < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/require_range_parentheses.rb:54 + def on_erange(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/require_range_parentheses.rb:44 + def on_irange(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/require_range_parentheses.rb:41 +RuboCop::Cop::Lint::RequireRangeParentheses::MSG = T.let(T.unsafe(nil), String) + +# Checks for a file requiring itself with `require_relative`. +# +# @example +# +# # bad +# +# # foo.rb +# require_relative 'foo' +# require_relative 'bar' +# +# # good +# +# # foo.rb +# require_relative 'bar' +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/require_relative_self_path.rb:21 +class RuboCop::Cop::Lint::RequireRelativeSelfPath < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/require_relative_self_path.rb:28 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/require_relative_self_path.rb:40 + def same_file?(file_path, required_feature); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/require_relative_self_path.rb:25 +RuboCop::Cop::Lint::RequireRelativeSelfPath::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/require_relative_self_path.rb:26 +RuboCop::Cop::Lint::RequireRelativeSelfPath::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for `rescue` blocks targeting the `Exception` class. +# +# @example +# +# # bad +# begin +# do_something +# rescue Exception +# handle_exception +# end +# +# # good +# begin +# do_something +# rescue ArgumentError +# handle_exception +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/rescue_exception.rb:23 +class RuboCop::Cop::Lint::RescueException < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/rescue_exception.rb:26 + def on_resbody(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/rescue_exception.rb:32 + def targets_exception?(rescue_arg_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/rescue_exception.rb:24 +RuboCop::Cop::Lint::RescueException::MSG = T.let(T.unsafe(nil), String) + +# Checks for arguments to `rescue` that will result in a `TypeError` +# if an exception is raised. +# +# @example +# # bad +# begin +# bar +# rescue nil +# baz +# end +# +# # bad +# def foo +# bar +# rescue 1, 'a', "#{b}", 0.0, [], {} +# baz +# end +# +# # good +# begin +# bar +# rescue +# baz +# end +# +# # good +# def foo +# bar +# rescue NameError +# baz +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/rescue_type.rb:37 +class RuboCop::Cop::Lint::RescueType < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/rescue_type.rb:56 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/rescue_type.rb:44 + def on_resbody(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/rescue_type.rb:65 + def correction(*exceptions); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/rescue_type.rb:76 + def invalid_exceptions(exceptions); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/rescue_type.rb:72 + def valid_exceptions(exceptions); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/rescue_type.rb:42 +RuboCop::Cop::Lint::RescueType::INVALID_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/rescue_type.rb:40 +RuboCop::Cop::Lint::RescueType::MSG = T.let(T.unsafe(nil), String) + +# Checks for the use of a return with a value in a context +# where the value will be ignored. (initialize and setter methods) +# +# @example +# +# # bad +# def initialize +# foo +# return :qux if bar? +# baz +# end +# +# def foo=(bar) +# return 42 +# end +# +# # good +# def initialize +# foo +# return if bar? +# baz +# end +# +# def foo=(bar) +# return +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/return_in_void_context.rb:32 +class RuboCop::Cop::Lint::ReturnInVoidContext < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/return_in_void_context.rb:38 + def on_return(return_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/return_in_void_context.rb:33 +RuboCop::Cop::Lint::ReturnInVoidContext::MSG = T.let(T.unsafe(nil), String) + +# Returning out of these methods only exits the block itself. +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/return_in_void_context.rb:36 +RuboCop::Cop::Lint::ReturnInVoidContext::SCOPE_CHANGING_METHODS = T.let(T.unsafe(nil), Array) + +# The safe navigation operator returns nil if the receiver is +# nil. If you chain an ordinary method call after a safe +# navigation operator, it raises NoMethodError. We should use a +# safe navigation operator after a safe navigation operator. +# This cop checks for the problem outlined above. +# +# @safety +# This cop's autocorrection is unsafe because it changes the behavior of +# the code: `x&.foo.bar` raises `NoMethodError` when `x` or `x&.foo` is `nil`, +# whereas the corrected `x&.foo&.bar` returns `nil` instead. The autocorrection +# also assumes that extending safe navigation through the chain is intended, +# while removing the first `&.` may be what was intended instead. +# +# @example +# +# # bad +# x&.foo.bar +# x&.foo + bar +# x&.foo[bar] +# +# # good +# x&.foo&.bar +# x&.foo || bar +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:29 +class RuboCop::Cop::Lint::SafeNavigationChain < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::NilMethods + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:40 + def bad_method?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:49 + def on_send(node); end + + private + + # @param [Parser::Source::Range] offense_range + # @param [RuboCop::AST::SendNode] send_node + # @return [String] + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:91 + def add_safe_navigation_operator(offense_range:, send_node:); end + + # @param [RuboCop::Cop::Corrector] corrector + # @param [Parser::Source::Range] offense_range + # @param [RuboCop::AST::SendNode] send_node + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:110 + def autocorrect(corrector, offense_range:, send_node:); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:119 + def brackets?(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:132 + def operator_inside_collection_literal?(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:123 + def require_parentheses?(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:69 + def require_safe_navigation?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:82 + def ternary_else_branch?(node, safe_nav); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:76 + def ternary_safe_navigation?(node, safe_nav); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:36 +RuboCop::Cop::Lint::SafeNavigationChain::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:37 +RuboCop::Cop::Lint::SafeNavigationChain::PLUS_MINUS_METHODS = T.let(T.unsafe(nil), Array) + +# Checks that if safe navigation is used in an `&&` or `||` condition, +# consistent and appropriate safe navigation, without excess or deficiency, +# is used for all method calls on the same object. +# +# @safety +# Autocorrection is unsafe because if the receiver is not a local variable +# but a method call, it may not be idempotent. For example, replacing +# `foo&.bar` with `foo.bar` could raise `NoMethodError` if `foo` returns +# `nil` on a subsequent call. +# +# @example +# # bad +# foo&.bar && foo&.baz +# +# # good +# foo&.bar && foo.baz +# +# # bad +# foo.bar && foo&.baz +# +# # good +# foo.bar && foo.baz +# +# # bad +# foo&.bar || foo.baz +# +# # good +# foo&.bar || foo&.baz +# +# # bad +# foo.bar || foo&.baz +# +# # good +# foo.bar || foo.baz +# +# # bad +# foo&.bar && (foobar.baz || foo&.baz) +# +# # good +# foo&.bar && (foobar.baz || foo.baz) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_consistency.rb:47 +class RuboCop::Cop::Lint::SafeNavigationConsistency < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::NilMethods + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_consistency.rb:54 + def on_and(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_consistency.rb:69 + def on_or(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_consistency.rb:103 + def already_appropriate_call?(operand, dot_op); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_consistency.rb:73 + def collect_operands(node, operand_nodes); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_consistency.rb:89 + def find_consistent_parts(grouped_operands); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_consistency.rb:129 + def most_left_indices(grouped_operands); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_consistency.rb:158 + def nilable?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_consistency.rb:142 + def operand_in_and?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_consistency.rb:150 + def operand_in_or?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_consistency.rb:120 + def operand_nodes(operand, operand_nodes); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_consistency.rb:80 + def receiver_name_as_key(method, fully_receivers); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_consistency.rb:109 + def register_offense(operand, dot_operator); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_consistency.rb:51 +RuboCop::Cop::Lint::SafeNavigationConsistency::USE_DOT_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_consistency.rb:52 +RuboCop::Cop::Lint::SafeNavigationConsistency::USE_SAFE_NAVIGATION_MSG = T.let(T.unsafe(nil), String) + +# Checks to make sure safe navigation isn't used with `empty?` in +# a conditional. +# +# While the safe navigation operator is generally a good idea, when +# checking `foo&.empty?` in a conditional, `foo` being `nil` will actually +# do the opposite of what the author intends. +# +# @example +# # bad +# return if foo&.empty? +# return unless foo&.empty? +# +# # good +# return if foo && foo.empty? +# return unless foo && foo.empty? +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_with_empty.rb:22 +class RuboCop::Cop::Lint::SafeNavigationWithEmpty < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_with_empty.rb:32 + def on_if(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_with_empty.rb:28 + def safe_navigation_empty_in_conditional?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_with_empty.rb:25 +RuboCop::Cop::Lint::SafeNavigationWithEmpty::MSG = T.let(T.unsafe(nil), String) + +# Checks if a file which has a shebang line as +# its first line is granted execute permission. +# +# @example +# # bad +# +# # A file which has a shebang line as its first line is not +# # granted execute permission. +# +# #!/usr/bin/env ruby +# puts 'hello, world' +# +# # good +# +# # A file which has a shebang line as its first line is +# # granted execute permission. +# +# #!/usr/bin/env ruby +# puts 'hello, world' +# +# # good +# +# # A file which has not a shebang line as its first line is not +# # granted execute permission. +# +# puts 'hello, world' +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/script_permission.rb:33 +class RuboCop::Cop::Lint::ScriptPermission < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/script_permission.rb:39 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/script_permission.rb:55 + def autocorrect; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/script_permission.rb:59 + def executable?(processed_source); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/script_permission.rb:70 + def format_message_from(processed_source); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/script_permission.rb:36 +RuboCop::Cop::Lint::ScriptPermission::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/script_permission.rb:37 +RuboCop::Cop::Lint::ScriptPermission::SHEBANG = T.let(T.unsafe(nil), String) + +# Checks for self-assignments. +# +# @example +# # bad +# 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] +# +# @example AllowRBSInlineAnnotation: false (default) +# # bad +# foo = foo #: Integer +# foo, bar = foo, bar #: Integer +# Foo = Foo #: Integer +# hash['foo'] = hash['foo'] #: Integer +# obj.attr = obj.attr #: Integer +# +# @example AllowRBSInlineAnnotation: true +# # good +# foo = foo #: Integer +# foo, bar = foo, bar #: Integer +# Foo = Foo #: Integer +# hash['foo'] = hash['foo'] #: Integer +# obj.attr = obj.attr #: Integer +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:42 +class RuboCop::Cop::Lint::SelfAssignment < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:95 + def on_and_asgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:75 + def on_casgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:61 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:72 + def on_cvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:73 + def on_gvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:71 + def on_ivasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:63 + def on_lvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:83 + def on_masgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:90 + def on_or_asgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:52 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:165 + def allow_rbs_inline_annotation?; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:150 + def handle_attribute_assignment(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:138 + def handle_key_assignment(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:122 + def multiple_self_assignment?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:99 + def or_and_asgn_self_assignment?(lhs, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:161 + def rbs_inline_annotation?(node); end + + # Compares two reader calls (attribute `foo.bar` or key `hash['foo']`). + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:111 + def reader_self_assignment?(lhs, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:133 + def rhs_matches_lhs?(rhs, lhs); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:45 +RuboCop::Cop::Lint::SelfAssignment::ASSIGNMENT_TYPE_TO_RHS_TYPE = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/self_assignment.rb:43 +RuboCop::Cop::Lint::SelfAssignment::MSG = T.let(T.unsafe(nil), String) + +# Checks for `send`, `public_send`, and `__send__` methods +# when using mix-in. +# +# `include` and `prepend` methods were private methods until Ruby 2.0, +# they were mixed-in via `send` method. This cop uses Ruby 2.1 or +# higher style that can be called by public methods. +# And `extend` method that was originally a public method is also targeted +# for style unification. +# +# @example +# # bad +# Foo.send(:include, Bar) +# Foo.send(:prepend, Bar) +# Foo.send(:extend, Bar) +# +# # bad +# Foo.public_send(:include, Bar) +# Foo.public_send(:prepend, Bar) +# Foo.public_send(:extend, Bar) +# +# # bad +# Foo.__send__(:include, Bar) +# Foo.__send__(:prepend, Bar) +# Foo.__send__(:extend, Bar) +# +# # good +# Foo.include Bar +# Foo.prepend Bar +# Foo.extend Bar +# +# pkg:gem/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 + + # pkg:gem/rubocop#lib/rubocop/cop/lint/send_with_mixin_argument.rb:53 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/send_with_mixin_argument.rb:46 + def send_with_mixin_argument?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/send_with_mixin_argument.rb:67 + def bad_location(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/send_with_mixin_argument.rb:73 + def message(method, module_name, bad_method); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/send_with_mixin_argument.rb:77 + def mixin_method?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/send_with_mixin_argument.rb:41 +RuboCop::Cop::Lint::SendWithMixinArgument::MIXIN_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/send_with_mixin_argument.rb:40 +RuboCop::Cop::Lint::SendWithMixinArgument::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/send_with_mixin_argument.rb:43 +RuboCop::Cop::Lint::SendWithMixinArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# pkg:gem/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. +# +# This cop has `IgnoreImplicitReferences` configuration option. +# It means argument shadowing is used in order to pass parameters +# to zero arity `super` when `IgnoreImplicitReferences` is `true`. +# +# @example +# +# # bad +# do_something do |foo| +# foo = 42 +# puts foo +# end +# +# def do_something(foo) +# foo = 42 +# puts foo +# end +# +# # good +# do_something do |foo| +# foo = foo + 42 +# puts foo +# end +# +# def do_something(foo) +# foo = foo + 42 +# puts foo +# end +# +# def do_something(foo) +# puts foo +# end +# +# @example IgnoreImplicitReferences: false (default) +# +# # bad +# def do_something(foo) +# foo = 42 +# super +# end +# +# def do_something(foo) +# foo = super +# bar +# end +# +# @example IgnoreImplicitReferences: true +# +# # good +# def do_something(foo) +# foo = 42 +# super +# end +# +# def do_something(foo) +# foo = super +# bar +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_argument.rb:66 +class RuboCop::Cop::Lint::ShadowedArgument < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_argument.rb:76 + def after_leaving_scope(scope, _variable_table); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_argument.rb:70 + def uses_var?(param0, param1); end + + private + + # Get argument references without assignments' references + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_argument.rb:161 + def argument_references(argument); end + + # Find the first argument assignment, which doesn't reference the + # argument at the rhs. If the assignment occurs inside a branch or + # block, it is impossible to tell whether it's executed, so precise + # shadowing location is not known. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_argument.rb:120 + def assignment_without_argument_usage(argument); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_argument.rb:82 + def check_argument(argument); end + + # Check whether the given node is always executed or not + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_argument.rb:152 + def conditional_assignment?(node, stop_search_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_argument.rb:171 + def ignore_implicit_references?; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_argument.rb:144 + def reference_pos(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_argument.rb:95 + def shadowing_assignment(argument); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_argument.rb:72 + def joining_forces; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_argument.rb:67 +RuboCop::Cop::Lint::ShadowedArgument::MSG = T.let(T.unsafe(nil), String) + +# Checks for a rescued exception that gets shadowed by a +# less specific exception being rescued before a more specific +# exception is rescued. +# +# An exception is considered shadowed if it is rescued after its +# ancestor is, or if it and its ancestor are both rescued in the +# same `rescue` statement. In both cases, the more specific rescue is +# unnecessary because it is covered by rescuing the less specific +# exception. (ie. `rescue Exception, StandardError` has the same behavior +# whether `StandardError` is included or not, because all ``StandardError``s +# are rescued by `rescue Exception`). +# +# @example +# +# # bad +# +# begin +# something +# rescue Exception +# handle_exception +# rescue StandardError +# handle_standard_error +# end +# +# # bad +# begin +# something +# rescue Exception, StandardError +# handle_error +# end +# +# # good +# +# begin +# something +# rescue StandardError +# handle_standard_error +# rescue Exception +# handle_exception +# end +# +# # good, however depending on runtime environment. +# # +# # This is a special case for system call errors. +# # System dependent error code depends on runtime environment. +# # For example, whether `Errno::EAGAIN` and `Errno::EWOULDBLOCK` are +# # the same error code or different error code depends on environment. +# # This good case is for `Errno::EAGAIN` and `Errno::EWOULDBLOCK` with +# # the same error code. +# begin +# something +# rescue Errno::EAGAIN, Errno::EWOULDBLOCK +# handle_standard_error +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_exception.rb:61 +class RuboCop::Cop::Lint::ShadowedException < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RescueNode + include ::RuboCop::Cop::RangeHelp + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_exception.rb:67 + def on_rescue(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_exception.rb:101 + def compare_exceptions(exception, other_exception); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_exception.rb:94 + def contains_multiple_levels_of_exceptions?(group); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_exception.rb:119 + def evaluate_exceptions(group); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_exception.rb:152 + def find_shadowing_rescue(rescues); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_exception.rb:84 + def offense_range(rescues); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_exception.rb:90 + def rescued_groups_for(rescues); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_exception.rb:137 + def sorted?(rescued_groups); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_exception.rb:115 + def system_call_err?(error); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/shadowed_exception.rb:65 +RuboCop::Cop::Lint::ShadowedException::MSG = T.let(T.unsafe(nil), String) + +# Checks for the use of local variable names from an outer scope +# in block arguments or block-local variables. This mirrors the warning +# given by `ruby -cw` prior to Ruby 2.6: +# "shadowing outer local variable - foo". +# +# The cop is now disabled by default to match the upstream Ruby behavior. +# It's useful, however, if you'd like to avoid shadowing variables from outer +# scopes, which some people consider an anti-pattern that makes it harder +# to keep track of what's going on in a program. +# +# NOTE: Shadowing of variables in block passed to `Ractor.new` is allowed +# because `Ractor` should not access outer variables. +# eg. following style is encouraged: +# +# [source,ruby] +# ---- +# worker_id, pipe = env +# Ractor.new(worker_id, pipe) do |worker_id, pipe| +# end +# ---- +# +# @example +# +# # bad +# def some_method +# foo = 1 +# +# 2.times do |foo| # shadowing outer `foo` +# do_something(foo) +# end +# end +# +# # good +# def some_method +# foo = 1 +# +# 2.times do |bar| +# do_something(bar) +# end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/shadowing_outer_local_variable.rb:46 +class RuboCop::Cop::Lint::ShadowingOuterLocalVariable < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowing_outer_local_variable.rb:58 + def before_declaring_variable(variable, variable_table); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowing_outer_local_variable.rb:50 + def ractor_block?(param0 = T.unsafe(nil)); end + + private + + # `case ... in` binds variables in the pattern itself, so a block argument in one + # `in` branch does not shadow a pattern variable from a different `in` branch of the + # same `case` (the branches are mutually exclusive). + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowing_outer_local_variable.rb:96 + def different_case_in_branch?(variable, outer_local_variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowing_outer_local_variable.rb:115 + def find_conditional_node_from_ascendant(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowing_outer_local_variable.rb:122 + def node_or_its_ascendant_conditional?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowing_outer_local_variable.rb:77 + def same_conditions_node_different_branch?(variable, outer_local_variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowing_outer_local_variable.rb:105 + def variable_node(variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowing_outer_local_variable.rb:73 + def variable_used_in_declaration_of_outer?(variable, outer_local_variable); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/lint/shadowing_outer_local_variable.rb:54 + def joining_forces; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/shadowing_outer_local_variable.rb:47 +RuboCop::Cop::Lint::ShadowingOuterLocalVariable::MSG = T.let(T.unsafe(nil), String) + +# Checks for `Hash` creation with a mutable default value. +# Creating a `Hash` in such a way will share the default value +# across all keys, causing unexpected behavior when modifying it. +# +# For example, when the `Hash` was created with an `Array` as the argument, +# calling `hash[:foo] << 'bar'` will also change the value of all +# other keys that have not been explicitly assigned to. +# +# @example +# # bad +# Hash.new([]) +# Hash.new({}) +# Hash.new(Array.new) +# Hash.new(Hash.new) +# +# # okay -- In rare cases that intentionally have this behavior, +# # without disabling the cop, you can set the default explicitly. +# h = Hash.new +# h.default = [] +# h[:a] << 1 +# h[:b] << 2 +# h # => {:a => [1, 2], :b => [1, 2]} +# +# # okay -- beware this will discard mutations and only remember assignments +# Hash.new { Array.new } +# Hash.new { Hash.new } +# Hash.new { {} } +# Hash.new { [] } +# +# # good - frozen solution will raise an error when mutation attempted +# Hash.new([].freeze) +# Hash.new({}.freeze) +# +# # good - using a proc will create a new object for each key +# h = Hash.new +# h.default_proc = ->(h, k) { [] } +# h.default_proc = ->(h, k) { {} } +# +# # good - using a block will create a new object for each key +# Hash.new { |h, k| h[k] = [] } +# Hash.new { |h, k| h[k] = {} } +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/shared_mutable_default.rb:47 +class RuboCop::Cop::Lint::SharedMutableDefault < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/shared_mutable_default.rb:66 + def capacity_keyword_argument?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shared_mutable_default.rb:53 + def hash_initialized_with_mutable_shared_object?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/shared_mutable_default.rb:70 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/shared_mutable_default.rb:48 +RuboCop::Cop::Lint::SharedMutableDefault::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/shared_mutable_default.rb:50 +RuboCop::Cop::Lint::SharedMutableDefault::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks unexpected overrides of the `Struct` built-in methods +# via `Struct.new`. +# +# @example +# # bad +# Bad = Struct.new(:members, :clone, :count) +# b = Bad.new([], true, 1) +# b.members #=> [] (overriding `Struct#members`) +# b.clone #=> true (overriding `Object#clone`) +# b.count #=> 1 (overriding `Enumerable#count`) +# +# # good +# Good = Struct.new(:id, :name) +# g = Good.new(1, "foo") +# g.members #=> [:id, :name] +# g.clone #=> # +# g.count #=> 2 +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/struct_new_override.rb:24 +class RuboCop::Cop::Lint::StructNewOverride < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/struct_new_override.rb:54 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/struct_new_override.rb:49 + def struct_new(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/struct_new_override.rb:25 +RuboCop::Cop::Lint::StructNewOverride::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/struct_new_override.rb:27 +RuboCop::Cop::Lint::StructNewOverride::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/struct_new_override.rb:46 +RuboCop::Cop::Lint::StructNewOverride::STRUCT_MEMBER_NAME_TYPES = T.let(T.unsafe(nil), Array) + +# This is based on `Struct.instance_methods.sort` in Ruby 4.0.0. +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/struct_new_override.rb:30 +RuboCop::Cop::Lint::StructNewOverride::STRUCT_METHOD_NAMES = T.let(T.unsafe(nil), Array) + +# Checks for `super` calls with explicit arguments that pass the wrong +# number of positional arguments to the overridden implementation, using +# the project index. +# +# The check is powered by the project-wide index, so it only runs when +# `AllCops/UseProjectIndex` is enabled and the `rubydex` gem is installed. +# Without the index the cop does nothing. +# +# Only `super` inside a plain instance method defined directly in a class +# body is considered, and only when the enclosing class resolves in the +# index and its entire ancestry is resolved, so a superclass method coming +# from a gem, the standard library, or a dynamic definition never produces +# an offense. The overridden implementation is the first ancestor after +# the enclosing class in the index's method resolution order that defines +# the method; when it is not a plain method definition (an `attr_*` or an +# alias) or its definitions disagree on arity, the call is not checked. +# Calls that forward arguments (`*`, `**`, `...`) are skipped, and bare +# `super` (which forwards the current method's parameters) is not checked. +# Methods the index attributes to `Object`, `Kernel`, or `BasicObject` +# are never used as the overridden implementation, since a `def` inside +# a block at the top level (`Struct.new do ... end`) is indexed under +# `Object` even though it defines a method somewhere else entirely. +# +# @example +# # Given the project defines: +# # class Base +# # def initialize(name, size); end +# # end +# +# # bad +# class Widget < Base +# def initialize(name) +# super(name) +# end +# end +# +# # good +# class Widget < Base +# def initialize(name) +# super(name, 0) +# end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/super_argument_mismatch.rb:49 +class RuboCop::Cop::Lint::SuperArgumentMismatch < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ProjectIndexHelp + include ::RuboCop::Cop::IndexedMethodArity + + # pkg:gem/rubocop#lib/rubocop/cop/lint/super_argument_mismatch.rb:69 + def on_super(node); end + + private + + # Whether one of the declaration's definitions is the given class + # node, anchoring the name-based lookup to the source being + # inspected (a qualified identifier like `class Foo::Bar` can + # resolve to a namespace other than the joined nesting names). + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/super_argument_mismatch.rb:143 + def declared_at?(declaration, class_node); end + + # The index declaration of the class whose body directly contains + # `def_node`, or nil when the method is not defined directly in a + # class body (module methods are excluded because their `super` + # target depends on where the module is mixed in) or the class does + # not resolve in the index. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/super_argument_mismatch.rb:128 + def enclosing_class_declaration(def_node); end + + # The `def` node whose method the `super` call re-dispatches, or nil + # when the context is not statically known: `super` inside a + # singleton method, inside `define_method` or an eval/refine block, + # or outside any method. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/super_argument_mismatch.rb:97 + def enclosing_instance_method(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/super_argument_mismatch.rb:88 + def message(method_name, parent, given, min, max); end + + # `[[min, max, has_keywords], parent]` for the implementation `super` + # dispatches to, or nil when the enclosing class or the overridden + # method is not statically known. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/super_argument_mismatch.rb:113 + def resolved_super_shape(def_node); end + + # The shape of the first implementation of `method_name` after the + # enclosing class in the index's method resolution order, or nil + # when no indexed ancestor defines it (e.g. it comes from a gem or + # the standard library, which are not indexed). + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/super_argument_mismatch.rb:156 + def super_method_shape(declaration, method_name); end +end + +# Methods the index attributes to the root namespaces are not +# trustworthy super targets: a `def` inside a block at the top level +# (`Struct.new do ... end`, `Class.new do ... end`) is indexed under +# `Object` even though it defines a method somewhere else entirely. +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/super_argument_mismatch.rb:67 +RuboCop::Cop::Lint::SuperArgumentMismatch::BUILTIN_ROOTS = T.let(T.unsafe(nil), Array) + +# Blocks that change what method (or scope) `super` refers to, or in +# which `super` is not statically resolvable. +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/super_argument_mismatch.rb:58 +RuboCop::Cop::Lint::SuperArgumentMismatch::CONTEXT_CHANGING_BLOCKS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/super_argument_mismatch.rb:53 +RuboCop::Cop::Lint::SuperArgumentMismatch::MSG = T.let(T.unsafe(nil), String) + +# Checks for `rescue` blocks with no body. +# +# @example +# +# # bad +# def some_method +# do_something +# rescue +# end +# +# # bad +# begin +# do_something +# rescue +# end +# +# # good +# def some_method +# do_something +# rescue +# handle_exception +# end +# +# # good +# begin +# do_something +# rescue +# handle_exception +# end +# +# @example AllowComments: true (default) +# +# # good +# def some_method +# do_something +# rescue +# # do nothing +# end +# +# # good +# begin +# do_something +# rescue +# # do nothing +# end +# +# @example AllowComments: false +# +# # bad +# def some_method +# do_something +# rescue +# # do nothing +# end +# +# # bad +# begin +# do_something +# rescue +# # do nothing +# end +# +# @example AllowNil: true (default) +# +# # good +# def some_method +# do_something +# rescue +# nil +# end +# +# # good +# begin +# do_something +# rescue +# # do nothing +# end +# +# # good +# do_something rescue nil +# +# @example AllowNil: false +# +# # bad +# def some_method +# do_something +# rescue +# nil +# end +# +# # bad +# begin +# do_something +# rescue +# nil +# end +# +# # bad +# do_something rescue nil +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/suppressed_exception.rb:105 +class RuboCop::Cop::Lint::SuppressedException < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/suppressed_exception.rb:108 + def on_resbody(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/suppressed_exception.rb:118 + def comment_between_rescue_and_end?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/suppressed_exception.rb:126 + def nil_body?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/suppressed_exception.rb:106 +RuboCop::Cop::Lint::SuppressedException::MSG = T.let(T.unsafe(nil), String) + +# Checks for cases where exceptions unrelated to the numeric constructors `Integer()`, +# `Float()`, `BigDecimal()`, `Complex()`, and `Rational()` may be unintentionally swallowed. +# +# @safety +# The cop is unsafe for autocorrection because unexpected errors occurring in the argument +# passed to numeric constructor (e.g., `Integer()`) can lead to incompatible behavior. +# For example, changing it to `Integer(potential_exception_method_call, exception: false)` +# ensures that exceptions raised by `potential_exception_method_call` are not ignored. +# +# [source,ruby] +# ---- +# Integer(potential_exception_method_call) rescue nil +# ---- +# +# @example +# +# # bad +# Integer(arg) rescue nil +# +# # bad +# begin +# Integer(arg) +# rescue +# nil +# end +# +# # bad +# begin +# Integer(arg) +# rescue +# end +# +# # good +# Integer(arg, exception: false) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb:41 +class RuboCop::Cop::Lint::SuppressedExceptionInNumberConversion < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # pkg:gem/rubocop#lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb:56 + def begin_numeric_constructor_rescue_nil(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb:75 + def constructor_receiver?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb:49 + def numeric_constructor_rescue_nil(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb:65 + def numeric_method?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb:82 + def on_rescue(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb:106 + def exception_keyword_argument?(method); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb:114 + def expected_exception_classes_only?(exception_classes); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb:46 +RuboCop::Cop::Lint::SuppressedExceptionInNumberConversion::EXPECTED_EXCEPTION_CLASSES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb:45 +RuboCop::Cop::Lint::SuppressedExceptionInNumberConversion::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of literal strings converted to +# a symbol where a literal symbol could be used instead. +# +# There are two possible styles for this cop. +# `strict` (default) will register an offense for any incorrect usage. +# `consistent` additionally requires hashes to use the same style for +# every symbol key (ie. if any symbol key needs to be quoted it requires +# all keys to be quoted). +# +# @example +# # bad +# 'string'.to_sym +# :symbol.to_sym +# 'underscored_string'.to_sym +# :'underscored_symbol' +# 'hyphenated-string'.to_sym +# "string_#{interpolation}".to_sym +# +# # good +# :string +# :symbol +# :underscored_string +# :underscored_symbol +# :'hyphenated-string' +# :"string_#{interpolation}" +# +# @example EnforcedStyle: strict (default) +# +# # bad +# { +# 'a': 1, +# "b": 2, +# 'c-d': 3 +# } +# +# # good (don't quote keys that don't require quoting) +# { +# a: 1, +# b: 2, +# 'c-d': 3 +# } +# +# @example EnforcedStyle: consistent +# +# # bad +# { +# a: 1, +# 'b-c': 2 +# } +# +# # good (quote all keys if any need quoting) +# { +# 'a': 1, +# 'b-c': 2 +# } +# +# # good (no quoting required) +# { +# a: 1, +# b: 2 +# } +# +# pkg:gem/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 + + # Reuse the already-escaped inner source for a plain `"..."` string so embedded + # quotes stay escaped. Percent literals (`%{}`, `%Q{}`, ...) and adjacent string + # concatenation have multi-character or no delimiters, so slicing the source would + # corrupt them; fall back to the node's value there. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/symbol_conversion.rb:97 + def dstr_correction(receiver); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/symbol_conversion.rb:122 + def on_hash(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/symbol_conversion.rb:78 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/symbol_conversion.rb:105 + def on_sym(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/symbol_conversion.rb:85 + def symbol_conversion_correction(receiver); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/symbol_conversion.rb:164 + def correct_hash_key(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/symbol_conversion.rb:183 + def correct_inconsistent_hash_keys(keys); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/symbol_conversion.rb:156 + def in_alias?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/symbol_conversion.rb:160 + def in_percent_literal_array?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/symbol_conversion.rb:143 + def properly_quoted?(source, value); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/symbol_conversion.rb:139 + def register_offense(node, correction:, message: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/symbol_conversion.rb:152 + def requires_quotes?(sym_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/symbol_conversion.rb:73 +RuboCop::Cop::Lint::SymbolConversion::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/symbol_conversion.rb:74 +RuboCop::Cop::Lint::SymbolConversion::MSG_CONSISTENCY = T.let(T.unsafe(nil), String) + +# pkg:gem/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 +# into RuboCop's offenses. +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/syntax.rb:8 +class RuboCop::Cop::Lint::Syntax < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/syntax.rb:11 + def on_other_file; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/syntax.rb:22 + def add_offense_from_diagnostic(diagnostic, ruby_version); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/syntax.rb:56 + def add_offense_from_error(error); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/syntax.rb:61 + def beautify_message(message); end + + # Expand zero-length diagnostic ranges so that editors and formatters + # can display them. This typically occurs when the parser reports + # `unexpected token $end` at EOF. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/syntax.rb:36 + def diagnostic_location(location); end + + # Override to skip multiline_ranges check which requires AST. + # Syntax errors mean the AST is nil, so we go directly to + # the EOL comment insertion path. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/syntax.rb:52 + def disable_offense(offense_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/syntax.rb:67 + def find_severity(_range, _severity); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/syntax.rb:9 +RuboCop::Cop::Lint::Syntax::LEVELS = T.let(T.unsafe(nil), Array) + +# Ensures that `to_enum`/`enum_for`, called for the current method, +# has correct arguments. +# +# @example +# # bad +# def foo(x, y = 1) +# return to_enum(__callee__, x) # `y` is missing +# end +# +# # good +# def foo(x, y = 1) +# # Alternatives to `__callee__` are `__method__` and `:foo`. +# return to_enum(__callee__, x, y) +# end +# +# # good +# def foo(x, y = 1) +# # It is also allowed if it is wrapped in some method like Sorbet. +# return to_enum(T.must(__callee__), x, y) +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/to_enum_arguments.rb:27 +class RuboCop::Cop::Lint::ToEnumArguments < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/to_enum_arguments.rb:33 + def enum_conversion_call?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/to_enum_arguments.rb:38 + def method_name?(param0 = T.unsafe(nil), param1); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/to_enum_arguments.rb:47 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/to_enum_arguments.rb:43 + def passing_keyword_arg?(param0 = T.unsafe(nil), param1); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/to_enum_arguments.rb:139 + def argument_match?(send_arg, def_arg); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/to_enum_arguments.rb:61 + def arguments_match?(arguments, def_node); end + + # A splat or argument forwarding on the call side can expand to any arity. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/to_enum_arguments.rb:92 + def expandable_arguments?(arguments); end + + # A call-side keyword splat or argument forwarding can expand to any set of keywords. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/to_enum_arguments.rb:118 + def expandable_keyword_arguments?(arguments); end + + # The enumerator re-invokes the method with these arguments, so passing + # unexpected keyword arguments raises `ArgumentError` at runtime. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/to_enum_arguments.rb:106 + def extra_keyword_arguments?(arguments, def_node); end + + # The enumerator re-invokes the method with these arguments, so passing more + # positional arguments than the method accepts raises `ArgumentError` at runtime. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/to_enum_arguments.rb:81 + def extra_positional_arguments?(arguments, def_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/to_enum_arguments.rb:161 + def keyword_hash_argument?(send_arg); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/to_enum_arguments.rb:132 + def keyword_parameters(def_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/to_enum_arguments.rb:124 + def passed_keyword_arguments(arguments); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/to_enum_arguments.rb:96 + def positional_arguments(arguments); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/to_enum_arguments.rb:100 + def positional_parameters(def_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/to_enum_arguments.rb:113 + def variadic_keyword_parameters?(def_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/to_enum_arguments.rb:87 + def variadic_parameters?(def_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/to_enum_arguments.rb:28 +RuboCop::Cop::Lint::ToEnumArguments::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/to_enum_arguments.rb:30 +RuboCop::Cop::Lint::ToEnumArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks to make sure `#to_json` includes an optional argument. +# When overriding `#to_json`, callers may invoke JSON +# generation via `JSON.generate(your_obj)`. Since `JSON#generate` allows +# for an optional argument, your method should too. +# +# @example +# # bad - incorrect arity +# def to_json +# JSON.generate([x, y]) +# end +# +# # good - preserving args +# def to_json(*args) +# JSON.generate([x, y], *args) +# end +# +# # good - discarding args +# def to_json(*_args) +# JSON.generate([x, y]) +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/to_json.rb:27 +class RuboCop::Cop::Lint::ToJSON < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/to_json.rb:32 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/to_json.rb:48 + def on_defs(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/to_json.rb:30 +RuboCop::Cop::Lint::ToJSON::MSG = T.let(T.unsafe(nil), String) + +# Checks for top level return with arguments. If there is a +# top-level return statement with an argument, then the argument is +# always ignored. This is detected automatically since Ruby 2.7. +# +# @example +# # bad +# return 1 +# +# # good +# return +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/top_level_return_with_argument.rb:16 +class RuboCop::Cop::Lint::TopLevelReturnWithArgument < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/top_level_return_with_argument.rb:21 + def on_return(return_node); end + + private + + # pkg:gem/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. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/top_level_return_with_argument.rb:42 + def top_level_return?(return_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/top_level_return_with_argument.rb:31 + def top_level_return_with_any_argument?(return_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/top_level_return_with_argument.rb:19 +RuboCop::Cop::Lint::TopLevelReturnWithArgument::MSG = T.let(T.unsafe(nil), String) + +# Checks for trailing commas in attribute declarations, such as +# `#attr_reader`. Leaving a trailing comma will nullify the next method +# definition by overriding it with a getter method. +# +# @example +# +# # bad +# class Foo +# attr_reader :foo, +# +# def bar +# puts "Unreachable." +# end +# end +# +# # good +# class Foo +# attr_reader :foo +# +# def bar +# puts "No problem!" +# end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb:30 +class RuboCop::Cop::Lint::TrailingCommaInAttributeDeclaration < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb:37 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb:50 + def trailing_comma_range(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb:34 +RuboCop::Cop::Lint::TrailingCommaInAttributeDeclaration::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb:35 +RuboCop::Cop::Lint::TrailingCommaInAttributeDeclaration::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for "triple quotes" (strings delimited by any odd number +# of quotes greater than 1). +# +# Ruby allows multiple strings to be implicitly concatenated by just +# being adjacent in a statement (ie. `"foo""bar" == "foobar"`). This sometimes +# gives the impression that there is something special about triple quotes, but +# in fact it is just extra unnecessary quotes and produces the same string. Each +# pair of quotes produces an additional concatenated empty string, so the result +# is still only the "actual" string within the delimiters. +# +# NOTE: Although this cop is called triple quotes, the same behavior is present +# for strings delimited by 5, 7, etc. quotation marks. +# +# @example +# # bad +# """ +# A string +# """ +# +# # bad +# ''' +# A string +# ''' +# +# # good +# " +# A string +# " +# +# # good +# < b } +# values.sort { |*x| x[0] <=> x[1] } +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/unexpected_block_arity.rb:41 +class RuboCop::Cop::Lint::UnexpectedBlockArity < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/unexpected_block_arity.rb:44 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unexpected_block_arity.rb:56 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unexpected_block_arity.rb:55 + def on_numblock(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unexpected_block_arity.rb:64 + def acceptable?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unexpected_block_arity.rb:76 + def arg_count(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unexpected_block_arity.rb:72 + def expected_arity(method); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unexpected_block_arity.rb:68 + def included_method?(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unexpected_block_arity.rb:60 + def methods; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/unexpected_block_arity.rb:42 +RuboCop::Cop::Lint::UnexpectedBlockArity::MSG = T.let(T.unsafe(nil), String) + +# Checks for using Fixnum or Bignum constant. +# +# @example +# +# # bad +# 1.is_a?(Fixnum) +# 1.is_a?(Bignum) +# +# # good +# 1.is_a?(Integer) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/unified_integer.rb:16 +class RuboCop::Cop::Lint::UnifiedInteger < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unified_integer.rb:22 + def fixnum_or_bignum_const(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unified_integer.rb:26 + def on_const(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/unified_integer.rb:19 +RuboCop::Cop::Lint::UnifiedInteger::MSG = T.let(T.unsafe(nil), String) + +# Looks for `reduce` or `inject` blocks where the value returned (implicitly or +# explicitly) does not include the accumulator. A block is considered valid as +# long as at least one return value includes the accumulator. +# +# If the accumulator is not included in the return value, then the entire +# block will just return a transformation of the last element value, and +# could be rewritten as such without a loop. +# +# Also catches instances where an index of the accumulator is returned, as +# this may change the type of object being retained. +# +# NOTE: For the purpose of reducing false positives, this cop only flags +# returns in `reduce` blocks where the element is the only variable in +# the expression (since we will not be able to tell what other variables +# relate to via static analysis). +# +# @example +# +# # bad +# (1..4).reduce(0) do |acc, el| +# el * 2 +# end +# +# # bad, may raise a NoMethodError after the first iteration +# %w(a b c).reduce({}) do |acc, letter| +# acc[letter] = true +# end +# +# # good +# (1..4).reduce(0) do |acc, el| +# acc + el * 2 +# end +# +# # good, element is returned but modified using the accumulator +# values.reduce do |acc, el| +# el << acc +# el +# end +# +# # good, returns the accumulator instead of the index +# %w(a b c).reduce({}) do |acc, letter| +# acc[letter] = true +# acc +# end +# +# # good, at least one branch returns the accumulator +# values.reduce(nil) do |result, value| +# break result if something? +# value +# end +# +# # good, recursive +# keys.reduce(self) { |result, key| result[key] } +# +# # ignored as the return value cannot be determined +# enum.reduce do |acc, el| +# x = foo(acc, el) +# bar(x) +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:65 +class RuboCop::Cop::Lint::UnmodifiedReduceAccumulator < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:78 + def accumulator_index?(param0 = T.unsafe(nil), param1); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:83 + def element_modified?(param0, param1); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:104 + def expression_values(param0); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:93 + def lvar_used?(param0 = T.unsafe(nil), param1); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:115 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:123 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:122 + def on_numblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:70 + def reduce_with_block?(param0 = T.unsafe(nil)); end + + private + + # Determine if a return value is acceptable for the purposes of this cop + # If it is an expression containing the accumulator, it is acceptable + # Otherwise, it is only unacceptable if it contains the iterated element, since we + # otherwise do not have enough information to prevent false positives. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:192 + def acceptable_return?(return_val, element_name); end + + # Exclude `begin` nodes inside a `dstr` from being collected by `return_values` + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:200 + def allowed_type?(parent_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:160 + def block_arg_name(node, index); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:143 + def check_return_values(block_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:177 + def potential_offense?(return_values, block_body, element_name, accumulator_name); end + + # Return values in a block are either the value given to next, + # the last line of a multiline block, or the only line of the block + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:129 + def return_values(block_body_node); end + + # Look for an index of the accumulator being returned, except where the index + # is the element. + # This is always an offense, in order to try to catch potential exceptions + # due to type mismatches + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:168 + def returned_accumulator_index(return_values, accumulator_name, element_name); end + + # If the accumulator is used in any return value, the node is acceptable since + # the accumulator has a chance to change each iteration + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:184 + def returns_accumulator_anywhere?(return_values, accumulator_name); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:66 +RuboCop::Cop::Lint::UnmodifiedReduceAccumulator::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb:67 +RuboCop::Cop::Lint::UnmodifiedReduceAccumulator::MSG_INDEX = T.let(T.unsafe(nil), String) + +# Checks for unreachable code. +# The check is based on the presence of flow-of-control +# statements in non-final position in `begin` (implicit) blocks. +# +# @example +# +# # bad +# def some_method +# return +# do_something +# end +# +# # bad +# def some_method +# if cond +# return +# else +# return +# end +# do_something +# end +# +# # good +# def some_method +# do_something +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:32 +class RuboCop::Cop::Lint::UnreachableCode < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:35 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:48 + def after_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:76 + def flow_command?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:52 + def on_begin(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:41 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:46 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:67 + def on_kwbegin(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:45 + def on_numblock(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:112 + def check_case(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:106 + def check_if(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:87 + def flow_expression?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:126 + def instance_eval_block?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:71 + def redefinable_flow_method?(method); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:122 + def register_redefinition(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:130 + def report_on_flow_command?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_code.rb:33 +RuboCop::Cop::Lint::UnreachableCode::MSG = T.let(T.unsafe(nil), String) + +# Checks for loops that will have at most one iteration. +# +# A loop that can never reach the second iteration is a possible error in the code. +# In rare cases where only one iteration (or at most one iteration) is intended behavior, +# the code should be refactored to use `if` conditionals. +# +# NOTE: Block methods that are used with ``Enumerable``s are considered to be loops. +# +# `AllowedPatterns` can be used to match against the block receiver in order to allow +# code that would otherwise be registered as an offense (eg. `times` used not in an +# `Enumerable` context). +# +# @example +# # bad +# while node +# do_something(node) +# node = node.parent +# break +# end +# +# # good +# while node +# do_something(node) +# node = node.parent +# end +# +# # bad +# def verify_list(head) +# item = head +# begin +# if verify(item) +# return true +# else +# return false +# end +# end while(item) +# end +# +# # good +# def verify_list(head) +# item = head +# begin +# if verify(item) +# item = item.next +# else +# return false +# end +# end while(item) +# +# true +# end +# +# # bad +# def find_something(items) +# items.each do |item| +# if something?(item) +# return item +# else +# raise NotFoundError +# end +# end +# end +# +# # good +# def find_something(items) +# items.each do |item| +# if something?(item) +# return item +# end +# end +# raise NotFoundError +# end +# +# # bad +# 2.times { raise ArgumentError } +# +# @example AllowedPatterns: ['(exactly|at_least|at_most)\(\d+\)\.times'] (default) +# +# # good +# exactly(2).times { raise StandardError } +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:86 +class RuboCop::Cop::Lint::UnreachableLoop < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedPattern + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:142 + def break_command?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:100 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:98 + def on_for(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:105 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:104 + def on_numblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:95 + def on_until(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:97 + def on_until_post(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:92 + def on_while(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:96 + def on_while_post(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:152 + def break_statement?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:118 + def check(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:175 + def check_case(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:169 + def check_if(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:200 + def conditional_continue_keyword?(break_statement); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:109 + def loop_method?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:189 + def preceded_by_continue_statement?(break_statement); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:129 + def statements(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:90 +RuboCop::Cop::Lint::UnreachableLoop::CONTINUE_KEYWORDS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_loop.rb:89 +RuboCop::Cop::Lint::UnreachableLoop::MSG = T.let(T.unsafe(nil), String) + +# Checks for unreachable `in` pattern branches in `case...in` statements. +# +# An `in` branch is unreachable when a previous branch uses an unguarded +# catch-all pattern that matches any value unconditionally. Any `in` branches +# (and `else`) that follow such a catch-all are dead code. +# +# A catch-all pattern is one of: +# +# * A bare variable capture (`in x`) +# * An underscore (`in _`) +# * A pattern alias where the left side is a catch-all (`in _ => y`) +# * An alternation pattern where at least one alternative is a catch-all +# (`in _ | Integer`) +# +# NOTE: A catch-all pattern with a guard clause (e.g., `in _ if condition`) +# does NOT make subsequent branches unreachable because the guard might +# not be satisfied. +# +# @example +# +# # bad +# case value +# in Integer +# handle_integer +# in x +# handle_other +# in String +# handle_string +# else +# handle_else +# end +# +# # good +# case value +# in Integer +# handle_integer +# in String +# handle_string +# in x +# handle_other +# end +# +# # bad - else is unreachable after catch-all +# case value +# in Integer +# handle_integer +# in _ +# handle_other +# else +# handle_else +# end +# +# # good - guard clause means catch-all might not match +# case value +# in x if x.positive? +# handle_positive +# in Integer +# handle_integer +# else +# handle_other +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_pattern_branch.rb:68 +class RuboCop::Cop::Lint::UnreachablePatternBranch < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::TargetRubyVersion + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_pattern_branch.rb:76 + def on_case_match(case_node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_pattern_branch.rb:98 + def catch_all_pattern?(pattern); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_pattern_branch.rb:71 +RuboCop::Cop::Lint::UnreachablePatternBranch::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/unreachable_pattern_branch.rb:72 +RuboCop::Cop::Lint::UnreachablePatternBranch::MSG_ELSE = T.let(T.unsafe(nil), String) + +# Common functionality for cops handling unused arguments. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/unused_argument.rb:7 +module RuboCop::Cop::Lint::UnusedArgument + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/unused_argument.rb:10 + def after_leaving_scope(scope, _variable_table); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/unused_argument.rb:16 + def check_argument(variable); end +end + +# Checks for unused block arguments. +# +# @example +# # bad +# do_something do |used, unused| +# puts used +# end +# +# do_something do |bar| +# puts :foo +# end +# +# define_method(:foo) do |bar| +# puts :baz +# end +# +# # good +# do_something do |used, _unused| +# puts used +# end +# +# do_something do +# puts :foo +# end +# +# define_method(:foo) do |_bar| +# puts :baz +# end +# +# @example IgnoreEmptyBlocks: true (default) +# # good +# do_something { |unused| } +# +# @example IgnoreEmptyBlocks: false +# # bad +# do_something { |unused| } +# +# @example AllowUnusedKeywordArguments: false (default) +# # bad +# do_something do |unused: 42| +# foo +# end +# +# @example AllowUnusedKeywordArguments: true +# # good +# do_something do |unused: 42| +# foo +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:55 +class RuboCop::Cop::Lint::UnusedBlockArgument < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Lint::UnusedArgument + extend ::RuboCop::Cop::AutoCorrector + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:162 + def allow_unused_keyword_arguments?; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:81 + def allowed_block?(variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:85 + def allowed_keyword_argument?(variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:99 + def augment_message(message, variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:65 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:69 + def check_argument(variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:149 + def define_method_call?(variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:156 + def empty_block?(variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:166 + def ignore_empty_blocks?; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:89 + def message(variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:132 + def message_for_lambda(variable, all_arguments); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:120 + def message_for_normal_block(variable, all_arguments); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:144 + def message_for_underscore_prefix(variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:77 + def used_block_local?(variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:112 + def variable_type(variable); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_block_argument.rb:59 + def joining_forces; end + end +end + +# Checks for unused method arguments. +# +# @example +# # bad +# def some_method(used, unused, _unused_but_allowed) +# puts used +# end +# +# # good +# def some_method(used, _unused, _unused_but_allowed) +# puts used +# end +# +# @example AllowUnusedKeywordArguments: false (default) +# # bad +# def do_something(used, unused: 42) +# used +# end +# +# @example AllowUnusedKeywordArguments: true +# # good +# def do_something(used, unused: 42) +# used +# end +# +# @example IgnoreEmptyMethods: true (default) +# # good +# def do_something(unused) +# end +# +# @example IgnoreEmptyMethods: false +# # bad +# def do_something(unused) +# end +# +# @example IgnoreNotImplementedMethods: true (default) +# # with default value of `NotImplementedExceptions: ['NotImplementedError']` +# +# # good +# def do_something(unused) +# raise NotImplementedError +# end +# +# def do_something_else(unused) +# fail "TODO" +# end +# +# @example IgnoreNotImplementedMethods: true +# # with `NotImplementedExceptions: ['AbstractMethodError']` +# +# # good +# def do_something(unused) +# raise AbstractMethodError +# end +# +# @example IgnoreNotImplementedMethods: false +# # bad +# def do_something(unused) +# raise NotImplementedError +# end +# +# def do_something_else(unused) +# fail "TODO" +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/unused_method_argument.rb:70 +class RuboCop::Cop::Lint::UnusedMethodArgument < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Lint::UnusedArgument + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_method_argument.rb:75 + def not_implemented?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_method_argument.rb:138 + def allowed_exception_class?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_method_argument.rb:90 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_method_argument.rb:103 + def block_argument_with_yield?(variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_method_argument.rb:94 + def check_argument(variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_method_argument.rb:112 + def ignored_method?(body); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_method_argument.rb:117 + def message(variable); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_method_argument.rb:80 + def autocorrect_incompatible_with; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_method_argument.rb:84 + def joining_forces; end + end +end + +# Checks for private instance methods that are not referenced anywhere +# in the project. +# +# The check is powered by the project-wide index, so it only runs when +# `AllCops/UseProjectIndex` is enabled and the `rubydex` gem is installed. +# Without the index the cop does nothing. +# +# A method counts as referenced when a call with its name appears anywhere +# in the indexed project (regardless of the receiver), when it is the source +# of an `alias`, or when its name appears in the same file as a symbol or +# inside a string literal (covering `send(:name)` and declarative DSLs like +# `before_action :name`). An interpolated symbol or string with a literal +# prefix (e.g. `send(:"format_#{type}")`) counts as a reference to every +# method whose name starts with that prefix; fully dynamic names cannot +# be detected. Methods defined in classes or modules with descendants are +# not checked, since they may be invoked through `super` or inherited +# dispatch. +# +# Methods whose names are composed by a framework (e.g. Rails +# `attribute_method_suffix` generating `attribute?` methods) can be +# excluded from the check with `AllowedNames` (exact names) or +# `AllowedPatterns` (regular expressions). +# +# The cop is disabled by default because symbol-based references from +# *other* files (e.g. a Rails callback declared in a concern) cannot be +# detected and would be reported as false positives. It is best suited +# for occasional dead-code sweeps rather than permanent enforcement. +# +# @example +# # bad - `helper` is never referenced anywhere in the project +# class Service +# def call +# do_something +# end +# +# private +# +# def helper +# end +# end +# +# # good +# class Service +# def call +# do_something(helper) +# end +# +# private +# +# def helper +# end +# end +# +# @example AllowedNames: ['attribute?'] +# # good - the name is explicitly allowed +# class Contact +# private +# +# def attribute? +# end +# end +# +# @example AllowedPatterns: ['_hook\z'] +# # good - the name matches an allowed pattern +# class Service +# private +# +# def before_save_hook +# end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/unused_private_method.rb:77 +class RuboCop::Cop::Lint::UnusedPrivateMethod < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::ProjectIndexHelp + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_private_method.rb:112 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_private_method.rb:106 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_private_method.rb:136 + def allowed_name?(method_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_private_method.rb:126 + def checkable_declaration(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_private_method.rb:165 + def compute_referenced_names; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_private_method.rb:203 + def interpolation_prefix(node); end + + # The leading literal fragment of an interpolated symbol or string acts + # as a method-name prefix: `send(:"format_#{type}")` may invoke any + # method whose name starts with `format_`. Only the leading fragment + # qualifies (a mid-string fragment is not a name prefix), and a fully + # dynamic name contributes nothing. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_private_method.rb:194 + def literal_name_prefixes; end + + # Symbol literals and identifier-like tokens inside string literals in the + # current file, covering `send(:name)`, declarative DSLs like + # `before_action :name` and names embedded in strings (e.g. node-pattern + # `#helper` references). + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_private_method.rb:174 + def literal_names; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_private_method.rb:142 + def method_declaration(node, namespace_node); end + + # An override of an inherited method may be invoked polymorphically + # (e.g. a framework hook), even when no direct reference exists. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_private_method.rb:223 + def override?(declaration, method_name); end + + # A method defined in a class or module with descendants may be invoked + # through `super` or inherited dispatch, which the index does not track. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_private_method.rb:214 + def owner_with_descendants?(declaration); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_private_method.rb:149 + def referenced?(method_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_private_method.rb:156 + def referenced_names; end + + class << self + # The reference-name set is a property of the index, not of the cop + # instance, so all per-file instances share one computation. A + # single-entry cache (instead of a hash keyed by index) avoids + # retaining stale graphs in long-lived processes. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_private_method.rb:103 + def cached_reference_names; end + + # The reference-name set is a property of the index, not of the cop + # instance, so all per-file instances share one computation. A + # single-entry cache (instead of a hash keyed by index) avoids + # retaining stale graphs in long-lived processes. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_private_method.rb:103 + def cached_reference_names=(_arg0); end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/unused_private_method.rb:83 +RuboCop::Cop::Lint::UnusedPrivateMethod::IDENTIFIER_PATTERN = T.let(T.unsafe(nil), Regexp) + +# Methods invoked implicitly by the Ruby runtime. +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/unused_private_method.rb:87 +RuboCop::Cop::Lint::UnusedPrivateMethod::IMPLICITLY_INVOKED_METHODS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/unused_private_method.rb:81 +RuboCop::Cop::Lint::UnusedPrivateMethod::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/unused_private_method.rb:84 +RuboCop::Cop::Lint::UnusedPrivateMethod::NAME_PREFIX_PATTERN = T.let(T.unsafe(nil), Regexp) + +# Identifies places where `URI.escape` can be replaced by +# `CGI.escape`, `URI.encode_www_form`, or `URI.encode_www_form_component` +# depending on your specific use case. +# Also this cop identifies places where `URI.unescape` can be replaced by +# `CGI.unescape`, `URI.decode_www_form`, +# or `URI.decode_www_form_component` depending on your specific use case. +# +# @example +# # bad +# URI.escape('http://example.com') +# URI.encode('http://example.com') +# +# # good +# CGI.escape('http://example.com') +# URI.encode_uri_component(uri) # Since Ruby 3.1 +# URI.encode_www_form([['example', 'param'], ['lang', 'en']]) +# URI.encode_www_form(page: 10, locale: 'en') +# URI.encode_www_form_component('http://example.com') +# +# # bad +# URI.unescape(enc_uri) +# URI.decode(enc_uri) +# +# # good +# CGI.unescape(enc_uri) +# URI.decode_uri_component(uri) # Since Ruby 3.1 +# URI.decode_www_form(enc_uri) +# URI.decode_www_form_component(enc_uri) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/uri_escape_unescape.rb:34 +class RuboCop::Cop::Lint::UriEscapeUnescape < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/uri_escape_unescape.rb:59 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/uri_escape_unescape.rb:53 + def uri_escape_unescape?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/uri_escape_unescape.rb:35 +RuboCop::Cop::Lint::UriEscapeUnescape::ALTERNATE_METHODS_OF_URI_ESCAPE = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/uri_escape_unescape.rb:40 +RuboCop::Cop::Lint::UriEscapeUnescape::ALTERNATE_METHODS_OF_URI_UNESCAPE = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/uri_escape_unescape.rb:49 +RuboCop::Cop::Lint::UriEscapeUnescape::METHOD_NAMES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/uri_escape_unescape.rb:46 +RuboCop::Cop::Lint::UriEscapeUnescape::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/uri_escape_unescape.rb:50 +RuboCop::Cop::Lint::UriEscapeUnescape::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where `URI.regexp` is obsolete and should not be used. +# +# For Ruby 3.3 or lower, use `URI::DEFAULT_PARSER.make_regexp`. +# For Ruby 3.4 or higher, use `URI::RFC2396_PARSER.make_regexp`. +# +# NOTE: If you need to support both Ruby 3.3 and lower as well as Ruby 3.4 and higher, +# consider manually changing the code as follows: +# +# [source,ruby] +# ---- +# defined?(URI::RFC2396_PARSER) ? URI::RFC2396_PARSER : URI::DEFAULT_PARSER +# ---- +# +# @example +# # bad +# URI.regexp('http://example.com') +# +# # good - Ruby 3.3 or lower +# URI::DEFAULT_PARSER.make_regexp('http://example.com') +# +# # good - Ruby 3.4 or higher +# URI::RFC2396_PARSER.make_regexp('http://example.com') +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/uri_regexp.rb:29 +class RuboCop::Cop::Lint::UriRegexp < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/uri_regexp.rb:40 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/uri_regexp.rb:36 + def uri_constant?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/uri_regexp.rb:32 +RuboCop::Cop::Lint::UriRegexp::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/uri_regexp.rb:33 +RuboCop::Cop::Lint::UriRegexp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for redundant access modifiers, including those with no +# code, those which are repeated, those which are on top-level, and +# leading `public` modifiers in a class or module body. +# Conditionally-defined methods are considered as always being defined, +# and thus access modifiers guarding such methods are not redundant. +# +# This cop has `ContextCreatingMethods` option. The default setting value +# is an empty array that means no method is specified. +# This setting is an array of methods which, when called, are known to +# create its own context in the module's current access context. +# +# It also has `MethodCreatingMethods` option. The default setting value +# is an empty array that means no method is specified. +# This setting is an array of methods which, when called, are known to +# create other methods in the module's current access context. +# +# @example +# # bad +# class Foo +# public # this is redundant (default access is public) +# +# def method +# end +# end +# +# # bad +# class Foo +# # The following is redundant (methods defined on the class' +# # singleton class are not affected by the private modifier) +# private +# +# def self.method3 +# end +# end +# +# # bad +# class Foo +# protected +# +# define_method(:method2) do +# end +# +# protected # this is redundant (repeated from previous modifier) +# +# [1,2,3].each do |i| +# define_method("foo#{i}") do +# end +# end +# end +# +# # bad +# class Foo +# private # this is redundant (no following methods are defined) +# end +# +# # bad +# private # this is useless (access modifiers have no effect on top-level) +# +# def method +# end +# +# # good +# class Foo +# private # this is not redundant (a method is defined) +# +# def method2 +# end +# end +# +# # good +# class Foo +# # The following is not redundant (conditionally defined methods are +# # considered as always defining a method) +# private +# +# if condition? +# def method +# end +# end +# end +# +# # good +# class Foo +# protected # this is not redundant (a method is defined) +# +# define_method(:method2) do +# end +# end +# +# @example ContextCreatingMethods: concerning +# # Lint/UselessAccessModifier: +# # ContextCreatingMethods: +# # - concerning +# +# # good +# require 'active_support/concern' +# class Foo +# concerning :Bar do +# def some_public_method +# end +# +# private +# +# def some_private_method +# end +# end +# +# # this is not redundant because `concerning` created its own context +# private +# +# def some_other_private_method +# end +# end +# +# @example MethodCreatingMethods: delegate +# # Lint/UselessAccessModifier: +# # MethodCreatingMethods: +# # - delegate +# +# # good +# require 'active_support/core_ext/module/delegation' +# class Foo +# # this is not redundant because `delegate` creates methods +# private +# +# delegate :method_a, to: :method_b +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:133 +class RuboCop::Cop::Lint::UselessAccessModifier < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:184 + def class_or_instance_eval?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:179 + def dynamic_method_definition?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:154 + def on_begin(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:145 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:139 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:152 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:142 + def on_module(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:151 + def on_numblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:143 + def on_sclass(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:174 + def static_method_definition?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:200 + def access_modifier?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:301 + def any_context_creating_methods?(child); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:274 + def any_method_definition?(child); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:167 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:214 + def check_child_nodes(node, unused, cur_vis); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:243 + def check_new_visibility(node, unused, new_vis, cur_vis); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:188 + def check_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:204 + def check_scope(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:232 + def check_send_node(node, cur_vis, unused); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:295 + def eval_call?(child); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:264 + def included_block?(block_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:268 + def method_definition?(child); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:291 + def start_of_new_scope?(child); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_access_modifier.rb:137 +RuboCop::Cop::Lint::UselessAccessModifier::MSG = T.let(T.unsafe(nil), String) + +# Checks for every useless assignment to local variable in every +# scope. +# The basic idea for this cop was from the warning of `ruby -cw`: +# +# [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. +# +# This cop's autocorrection avoids cases like `a ||= 1` because removing assignment from +# operator assignment can cause `NameError` if this assignment has been used to declare +# a local variable. For example, replacing `a ||= 1` with `a || 1` may cause +# "undefined local variable or method `a' for main:Object (NameError)". +# +# 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 +# def some_method +# some_var = 1 +# do_something +# end +# +# # good +# def some_method +# some_var = 1 +# do_something(some_var) +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:40 +class RuboCop::Cop::Lint::UselessAssignment < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:49 + def after_leaving_scope(scope, _variable_table); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:177 + def autocorrect(corrector, assignment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:116 + def chained_assignment?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:61 + def check_for_unused_assignment(variable, assignment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:53 + def check_for_unused_assignments(variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:161 + def collect_variable_like_names(scope); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:87 + def ignored_assignment?(variable, assignment_node, assignment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:92 + def message_for_useless_assignment(assignment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:122 + def message_specification(assignment, variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:132 + def multiple_assignment_message(variable_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:98 + def offense_range(assignment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:137 + def operator_assignment_message(scope, assignment); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:193 + def remove_exception_assignment_part(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:214 + def remove_local_variable_assignment_part(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:203 + def remove_trailing_character_from_operator(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:199 + def rename_variable_with_underscore(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:207 + def replace_named_capture_group_with_non_capturing_group(corrector, node, variable_name); end + + # TODO: More precise handling (rescue, ensure, nested begin, etc.) + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:151 + def return_value_node_of_scope(scope); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:106 + def sequential_assignment?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:144 + def similar_name_message(variable); end + + # Autocorrect is skipped when removing a variable would cause a syntax error + # (`x = 1, y = 2`), or where rewriting `x ||= 1`/`x &&= 1` to `x = 1` would raise + # `NameError` because the variable is not declared before the operator assignment. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:81 + def uncorrectable_assignment?(assignment_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:227 + def variable_in_loop_condition?(assignment_node, variable); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:170 + def variable_like_method_invocation?(node); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:45 + def joining_forces; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:43 +RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String) + +# Checks for useless constant scoping. Private constants must be defined using +# `private_constant`. Even if `private` access modifier is used, it is public scope despite +# its appearance. +# +# It does not support autocorrection due to behavior change and multiple ways to fix it. +# Or a public constant may be intended. +# +# Constant assignments that define classes or modules via `Class.new`, `Module.new`, +# `Struct.new`, or `Data.define` are allowed. Those forms are class and module definitions +# written with assignment syntax, and match the common practice of placing nested +# `class` / `module` bodies after `private` without intending private constant visibility. +# +# @example +# +# # bad +# class Foo +# private +# PRIVATE_CONST = 42 +# end +# +# # good +# class Foo +# PRIVATE_CONST = 42 +# private_constant :PRIVATE_CONST +# end +# +# # good +# class Foo +# PUBLIC_CONST = 42 # If private scope is not intended. +# end +# +# # good - class/module definitions via assignment, same as nested `class`/`module` +# class Foo +# private +# +# def some_private_method +# end +# +# MyClass = Class.new +# MyModule = Module.new +# MyStruct = Struct.new(:name) +# MyData = Data.define(:name) +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_constant_scoping.rb:50 +class RuboCop::Cop::Lint::UselessConstantScoping < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_constant_scoping.rb:62 + def class_or_module_definition_assignment?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_constant_scoping.rb:75 + def on_casgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_constant_scoping.rb:54 + def private_constants(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_constant_scoping.rb:85 + def after_private_modifier?(left_siblings); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_constant_scoping.rb:95 + def private_constantize?(right_siblings, const_value); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_constant_scoping.rb:51 +RuboCop::Cop::Lint::UselessConstantScoping::MSG = T.let(T.unsafe(nil), String) + +# Checks for usage of method `fetch` or `Array.new` with default value argument +# and block. In such cases, block will always be used as default value. +# +# This cop emulates Ruby warning "block supersedes default value argument" which +# applies to `Array.new`, `Array#fetch`, `Hash#fetch`, `ENV.fetch` and +# `Thread#fetch`. +# +# A `fetch` call without a receiver is considered a custom method and does not register +# an offense. +# +# @safety +# This cop is unsafe because the receiver could have nonstandard implementation +# of `fetch`, or be a class other than the one listed above. +# +# It is also unsafe because default value argument could have side effects: +# +# [source,ruby] +# ---- +# def x(a) = puts "side effect" +# Array.new(5, x(1)) { 2 } +# ---- +# +# so removing it would change behavior. +# +# @example +# # bad +# x.fetch(key, default_value) { block_value } +# Array.new(size, default_value) { block_value } +# +# # good +# x.fetch(key) { block_value } +# Array.new(size) { block_value } +# +# # also good - in case default value argument is desired instead +# x.fetch(key, default_value) +# Array.new(size, default_value) +# +# # good - keyword arguments aren't registered as offenses +# x.fetch(key, keyword: :arg) { block_value } +# +# @example AllowedReceivers: ['Rails.cache'] +# # good +# Rails.cache.fetch(name, options) { block } +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_default_value_argument.rb:50 +class RuboCop::Cop::Lint::UselessDefaultValueArgument < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedReceivers + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_default_value_argument.rb:59 + def default_value_argument_and_block(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_default_value_argument.rb:82 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_default_value_argument.rb:69 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_default_value_argument.rb:86 + def hash_without_braces?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_default_value_argument.rb:54 +RuboCop::Cop::Lint::UselessDefaultValueArgument::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_default_value_argument.rb:56 +RuboCop::Cop::Lint::UselessDefaultValueArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for calls to `defined?` with strings or symbols as the argument. +# Such calls will always return `'expression'`, you probably meant to +# check for the existence of a constant, method, or variable instead. +# +# `defined?` is part of the Ruby syntax and doesn't behave like normal methods. +# You can safely pass in what you are checking for directly, without encountering +# a `NameError`. +# +# When interpolation is used, oftentimes it is not possible to write the +# code with `defined?`. In these cases, switch to one of the more specific methods: +# +# * `class_variable_defined?` +# * `const_defined?` +# * `method_defined?` +# * `instance_variable_defined?` +# * `binding.local_variable_defined?` +# +# @example +# +# # bad +# defined?('FooBar') +# defined?(:FooBar) +# defined?(:foo_bar) +# defined?('foo_bar') +# +# # good +# defined?(FooBar) +# defined?(foo_bar) +# +# # bad - interpolation +# bar = 'Bar' +# defined?("Foo::#{bar}::Baz") +# +# # good +# bar = 'Bar' +# defined?(Foo) && Foo.const_defined?(bar) && Foo.const_get(bar).const_defined?(:Baz) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_defined.rb:42 +class RuboCop::Cop::Lint::UselessDefined < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_defined.rb:46 + def on_defined?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_defined.rb:43 +RuboCop::Cop::Lint::UselessDefined::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_defined.rb:44 +RuboCop::Cop::Lint::UselessDefined::TYPES = T.let(T.unsafe(nil), Hash) + +# Checks for useless `else` in `begin..end` without `rescue`. +# +# NOTE: This syntax is no longer valid on Ruby 2.6 or higher. +# +# @example +# +# # bad +# begin +# do_something +# else +# do_something_else # This will never be run. +# end +# +# # good +# begin +# do_something +# rescue +# handle_errors +# else +# do_something_else +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_else_without_rescue.rb:27 +class RuboCop::Cop::Lint::UselessElseWithoutRescue < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::TargetRubyVersion + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_else_without_rescue.rb:34 + def on_new_investigation; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_else_without_rescue.rb:30 +RuboCop::Cop::Lint::UselessElseWithoutRescue::MSG = T.let(T.unsafe(nil), String) + +# Checks for useless method definitions, specifically: empty constructors +# and methods just delegating to `super`. +# +# @safety +# This cop is unsafe as it can register false positives for cases when an empty +# constructor just overrides the parent constructor, which is bad anyway. +# +# @example +# # bad +# def initialize +# super +# end +# +# def method +# super +# end +# +# # good - with default arguments +# def initialize(x = Object.new) +# super +# end +# +# # good +# def initialize +# super +# initialize_internals +# end +# +# def method(*args) +# super(:extra_arg, *args) +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_method_definition.rb:38 +class RuboCop::Cop::Lint::UselessMethodDefinition < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_method_definition.rb:43 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_method_definition.rb:53 + def on_defs(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_method_definition.rb:65 + def delegating?(node, def_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_method_definition.rb:57 + def method_definition_with_modifier?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_method_definition.rb:61 + def use_rest_or_optional_args?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_method_definition.rb:41 +RuboCop::Cop::Lint::UselessMethodDefinition::MSG = T.let(T.unsafe(nil), String) + +# Certain numeric operations have no impact, being: +# Adding or subtracting 0, multiplying or dividing by 1 or raising to the power of 1. +# These are probably leftover from debugging, or are mistakes. +# +# @example +# +# # bad +# x + 0 +# x - 0 +# x * 1 +# x / 1 +# x ** 1 +# +# # good +# x +# +# # bad +# x += 0 +# x -= 0 +# x *= 1 +# x /= 1 +# x **= 1 +# +# # good +# x = x +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_numeric_operation.rb:32 +class RuboCop::Cop::Lint::UselessNumericOperation < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_numeric_operation.rb:56 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_numeric_operation.rb:58 + def on_op_asgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_numeric_operation.rb:48 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_numeric_operation.rb:44 + def useless_abbreviated_assignment?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_numeric_operation.rb:39 + def useless_operation?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_numeric_operation.rb:69 + def useless?(operation, number); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_numeric_operation.rb:35 +RuboCop::Cop::Lint::UselessNumericOperation::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_numeric_operation.rb:36 +RuboCop::Cop::Lint::UselessNumericOperation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for useless OR (`||` and `or`) expressions. +# +# Some methods always return a truthy value, even when called +# on `nil` (e.g. `nil.to_i` evaluates to `0`). Therefore, OR expressions +# appended after these methods will never evaluate. +# +# @safety +# As shown in the examples below, there are generally two possible ways to correct the +# offense, but this cop's autocorrection always chooses the option that preserves the +# current behavior. While this does not change how the code behaves, that option is not +# necessarily the appropriate fix in every situation. For this reason, the autocorrection +# provided by this cop is considered unsafe. +# +# @example +# +# # bad +# x.to_a || fallback +# x.to_c || fallback +# x.to_d || fallback +# x.to_i || fallback +# x.to_f || fallback +# x.to_h || fallback +# x.to_r || fallback +# x.to_s || fallback +# x.to_sym || fallback +# x.intern || fallback +# x.inspect || fallback +# x.hash || fallback +# x.object_id || fallback +# x.__id__ || fallback +# +# x.to_s or fallback +# +# # good - if fallback is same as return value of method called on nil +# x.to_a # nil.to_a returns [] +# x.to_c # nil.to_c returns (0+0i) +# x.to_d # nil.to_d returns 0.0 +# x.to_i # nil.to_i returns 0 +# x.to_f # nil.to_f returns 0.0 +# x.to_h # nil.to_h returns {} +# x.to_r # nil.to_r returns (0/1) +# x.to_s # nil.to_s returns '' +# x.to_sym # nil.to_sym raises an error +# x.intern # nil.intern raises an error +# x.inspect # nil.inspect returns "nil" +# x.hash # nil.hash returns an Integer +# x.object_id # nil.object_id returns an Integer +# x.__id__ # nil.object_id returns an Integer +# +# # good - if the intention is not to call the method on nil +# x&.to_a || fallback +# x&.to_c || fallback +# x&.to_d || fallback +# x&.to_i || fallback +# x&.to_f || fallback +# x&.to_h || fallback +# x&.to_r || fallback +# x&.to_s || fallback +# x&.to_sym || fallback +# x&.intern || fallback +# x&.inspect || fallback +# x&.hash || fallback +# x&.object_id || fallback +# x&.__id__ || fallback +# +# x&.to_s or fallback +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_or.rb:73 +class RuboCop::Cop::Lint::UselessOr < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_or.rb:87 + def on_or(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_or.rb:83 + def truthy_return_value_method?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_or.rb:100 + def report_offense(or_node, truthy_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_or.rb:76 +RuboCop::Cop::Lint::UselessOr::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_or.rb:78 +RuboCop::Cop::Lint::UselessOr::TRUTHY_RETURN_VALUE_METHODS = T.let(T.unsafe(nil), Set) + +# Checks for useless ``rescue``s, which only reraise rescued exceptions. +# +# @example +# # bad +# def foo +# do_something +# rescue +# raise +# end +# +# # bad +# def foo +# do_something +# rescue => e +# raise # or 'raise e', or 'raise $!', or 'raise $ERROR_INFO' +# end +# +# # good +# def foo +# do_something +# rescue +# do_cleanup +# raise +# end +# +# # bad (latest rescue) +# def foo +# do_something +# rescue ArgumentError +# # noop +# rescue +# raise +# end +# +# # good (not the latest rescue) +# def foo +# do_something +# rescue ArgumentError +# raise +# rescue +# # noop +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_rescue.rb:49 +class RuboCop::Cop::Lint::UselessRescue < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_rescue.rb:52 + def on_rescue(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_rescue.rb:82 + def exception_objects(resbody_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_rescue.rb:60 + def only_reraising?(resbody_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_rescue.rb:74 + def use_exception_variable_in_ensure?(resbody_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_rescue.rb:50 +RuboCop::Cop::Lint::UselessRescue::MSG = T.let(T.unsafe(nil), String) + +# Looks for `ruby2_keywords` calls for methods that do not need it. +# +# `ruby2_keywords` should only be called on methods that accept an argument splat +# (`\*args`) but do not have explicit keyword arguments (`k:` or `k: true`) or +# a keyword splat (`**kwargs`). +# +# @example +# # good (splat argument without keyword arguments) +# ruby2_keywords def foo(*args); end +# +# # bad (no arguments) +# ruby2_keywords def foo; end +# +# # good +# def foo; end +# +# # bad (positional argument) +# ruby2_keywords def foo(arg); end +# +# # good +# def foo(arg); end +# +# # bad (double splatted argument) +# ruby2_keywords def foo(**args); end +# +# # good +# def foo(**args); end +# +# # bad (keyword arguments) +# ruby2_keywords def foo(i:, j:); end +# +# # good +# def foo(i:, j:); end +# +# # bad (splat argument with keyword arguments) +# ruby2_keywords def foo(*args, i:, j:); end +# +# # good +# def foo(*args, i:, j:); end +# +# # bad (splat argument with double splat) +# ruby2_keywords def foo(*args, **kwargs); end +# +# # good +# def foo(*args, **kwargs); end +# +# # bad (ruby2_keywords given a symbol) +# def foo; end +# ruby2_keywords :foo +# +# # good +# def foo; end +# +# # bad (ruby2_keywords with dynamic method) +# define_method(:foo) { |arg| } +# ruby2_keywords :foo +# +# # good +# define_method(:foo) { |arg| } +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_ruby2_keywords.rb:66 +class RuboCop::Cop::Lint::UselessRuby2Keywords < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_ruby2_keywords.rb:72 + def method_definition(param0 = T.unsafe(nil), param1); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_ruby2_keywords.rb:79 + def on_send(node); end + + private + + # `ruby2_keywords` is only allowed if there's a `restarg` and no keyword arguments + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_ruby2_keywords.rb:124 + def allowed_arguments?(arguments); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_ruby2_keywords.rb:109 + def find_method_definition(node, method_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_ruby2_keywords.rb:91 + def inspect_def(node, def_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_ruby2_keywords.rb:97 + def inspect_sym(node, sym_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_ruby2_keywords.rb:67 +RuboCop::Cop::Lint::UselessRuby2Keywords::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_ruby2_keywords.rb:68 +RuboCop::Cop::Lint::UselessRuby2Keywords::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for setter call to local variable as the final +# expression of a function definition. +# +# @safety +# There are edge cases in which the local variable references a +# value that is also accessible outside the local scope. This is not +# detected by the cop, and it can yield a false positive. +# +# As well, autocorrection is unsafe because the method's +# return value will be changed. +# +# @example +# +# # bad +# def something +# x = Something.new +# x.attr = 5 +# end +# +# # good +# def something +# x = Something.new +# x.attr = 5 +# x +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:31 +class RuboCop::Cop::Lint::UselessSetterCall < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:37 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:54 + def on_defs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:59 + def setter_call_to_local_variable?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:63 + def last_expression(body); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:35 +RuboCop::Cop::Lint::UselessSetterCall::ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:34 +RuboCop::Cop::Lint::UselessSetterCall::MSG = T.let(T.unsafe(nil), String) + +# This class tracks variable assignments in a method body +# and if a variable contains object passed as argument at the end of +# the method. +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:72 +class RuboCop::Cop::Lint::UselessSetterCall::MethodVariableTracker + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:73 + def initialize(body_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:151 + def constructor?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:78 + def contain_local_object?(variable_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:143 + def process_assignment(asgn_node, rhs_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:96 + def process_assignment_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:134 + def process_binary_operator_assignment(op_asgn_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:126 + def process_logical_operator_assignment(asgn_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:109 + def process_multiple_assignment(masgn_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_setter_call.rb:88 + def scan(node, &block); end +end + +# Checks for uses of `Integer#times` that will never yield +# (when the integer ``<= 0``) or that will only ever yield once +# (`1.times`). +# +# @safety +# This cop is unsafe as `times` returns its receiver, which is +# *usually* OK, but might change behavior. +# +# @example +# # bad +# -5.times { do_something } +# 0.times { do_something } +# 1.times { do_something } +# 1.times { |i| do_something(i) } +# +# # good +# do_something +# do_something(1) +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_times.rb:24 +class RuboCop::Cop::Lint::UselessTimes < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_times.rb:37 + def block_arg(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_times.rb:42 + def block_reassigns_arg?(param0, param1); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_times.rb:46 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_times.rb:32 + def times_call?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_times.rb:62 + def autocorrect(corrector, count, node, proc_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_times.rb:84 + def autocorrect_block(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_times.rb:80 + def autocorrect_block_pass(corrector, node, proc_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_times.rb:115 + def fix_indentation(source, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_times.rb:72 + def never_process?(count, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_times.rb:108 + def orphans_loop_control_keyword?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_times.rb:127 + def own_line?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_times.rb:94 + def reducible_to_body?(node, block_arg); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_times.rb:76 + def remove_node(corrector, node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_times.rb:28 +RuboCop::Cop::Lint::UselessTimes::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_times.rb:29 +RuboCop::Cop::Lint::UselessTimes::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Utility classes for `Lint` department cops. +# +# pkg:gem/rubocop#lib/rubocop/cop/lint.rb:174 +module RuboCop::Cop::Lint::Utils; end + +# Utility class that checks if the receiver can't be nil. +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:8 +class RuboCop::Cop::Lint::Utils::NilReceiverChecker + # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:11 + def initialize(receiver, additional_nil_methods); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:19 + def cant_be_nil?; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:26 + def _cant_be_nil?(node, receiver); end + + # The name whose binding can differ between structurally equal occurrences: + # a local variable (block parameters included), or a bare `it` call, which is + # how `it` parses when the target Ruby version is below 3.4 even though the code + # may run on 3.4+ where `it` is the implicit block parameter. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:134 + def binding_name(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:142 + def binding_scope(occurrence); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:161 + def block_binds_name?(block_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:190 + def csend_root_receiver(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:180 + def else_branch?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:184 + def find_top_if(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:111 + def non_nil_condition?(condition, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:82 + def non_nil_method?(method_name); end + + # Structurally equal occurrences can be different variables: `it` binds to + # its innermost block, and a block parameter can shadow an outer variable of + # the same name. Evidence about such a receiver only holds when both occurrences + # resolve to the same binding. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:124 + def same_binding_as_receiver?(occurrence); end + + # Whether control reaches `node` by falling through its left siblings rather than by + # a non-sequential entry. A `resbody` is entered via an exception, the `ensure` branch + # runs even after a partway raise, and the `else` arm of an `if/elsif` chain is reached by + # branching (its `if/case` siblings are walked via parent recursion instead). + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:173 + def sequentially_reached?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:87 + def sole_condition_of_parent_if?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:9 +RuboCop::Cop::Lint::Utils::NilReceiverChecker::NIL_METHODS = T.let(T.unsafe(nil), Set) + +# 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] +# ---- +# +# NOTE: The last expression in an assignment method definition such as `def foo=(arg)` +# is not flagged. Ruby discards it (the method returns its argument), but the method can +# still be called directly and its return value relied upon, so flagging it would be a +# false positive for this lint. +# +# NOTE: A constant used in a void context is flagged but not autocorrected, since +# referencing a constant can trigger autoloading side effects (e.g. forcing a file to +# load before a monkey-patch), so removing it may change behavior. +# +# @example CheckForMethodsWithNoSideEffects: false (default) +# # bad +# def some_method +# some_num * 10 +# do_something +# end +# +# def some_method(some_var) +# some_var +# do_something +# end +# +# @example CheckForMethodsWithNoSideEffects: true +# # bad +# def some_method(some_array) +# some_array.sort +# do_something(some_array) +# end +# +# # good +# def some_method +# do_something +# some_num * 10 +# end +# +# def some_method(some_var) +# do_something +# some_var +# end +# +# def some_method(some_array) +# some_array.sort! +# do_something(some_array) +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:62 +class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:122 + def check_expression(expr); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:101 + def on_begin(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:90 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:106 + def on_ensure(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:99 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:104 + def on_kwbegin(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:98 + def on_numblock(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:306 + def all_keys_entirely_literal?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:310 + def all_values_entirely_literal?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:284 + def autocorrect_nonmutating_send(corrector, node, suggestion); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:266 + def autocorrect_void_expression(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:253 + def autocorrect_void_op(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:112 + def check_begin(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:144 + def check_case_expression(case_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:149 + def check_case_match_expression(case_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:234 + def check_ensure(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:140 + def check_if_expression(if_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:190 + def check_literal(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:216 + def check_nonmutating(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:200 + def check_self(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:172 + def check_var(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:208 + def check_void_expression(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:130 + def check_void_expression_nodes(expr); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:157 + def check_void_op(node, &block); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:293 + def entirely_literal?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:242 + def in_void_context?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:249 + def setter_method?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:278 + def void_expression_range(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:75 +RuboCop::Cop::Lint::Void::BINARY_OPERATORS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:69 +RuboCop::Cop::Lint::Void::CONST_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:72 +RuboCop::Cop::Lint::Void::EXPRESSION_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:70 +RuboCop::Cop::Lint::Void::LIT_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:85 +RuboCop::Cop::Lint::Void::METHODS_REPLACEABLE_BY_EACH = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:87 +RuboCop::Cop::Lint::Void::NONMUTATING_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:78 +RuboCop::Cop::Lint::Void::NONMUTATING_METHODS_WITH_BANG_VERSION = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:73 +RuboCop::Cop::Lint::Void::NONMUTATING_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:77 +RuboCop::Cop::Lint::Void::OPERATORS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:67 +RuboCop::Cop::Lint::Void::OP_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:71 +RuboCop::Cop::Lint::Void::SELF_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:76 +RuboCop::Cop::Lint::Void::UNARY_OPERATORS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/lint/void.rb:68 +RuboCop::Cop::Lint::Void::VAR_MSG = T.let(T.unsafe(nil), String) + +# Common functionality for obtaining source ranges from regexp matches +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/match_range.rb:6 +module RuboCop::Cop::MatchRange + include ::RuboCop::Cop::RangeHelp + + private + + # Return a new `Range` covering the first matching group number for each + # match of `regex` inside `range` + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/match_range.rb:13 + def each_match_range(range, regex); end + + # For a `match` inside `range`, return a new `Range` covering the match + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/match_range.rb:18 + def match_range(range, match); end +end + +# Message Annotator class annotates a basic offense message +# based on params passed into initializer. +# +# @see #initialize +# +# @example +# RuboCop::Cop::MessageAnnotator.new( +# config, cop_name, cop_config, @options +# ).annotate('message') +# #=> 'Cop/CopName: message (http://example.org/styleguide)' +# +# pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:15 +class RuboCop::Cop::MessageAnnotator + # @param config [RuboCop::Config] Check configs for all cops + # @note Message Annotator specifically checks the + # following config options for_all_cops + # :StyleGuideBaseURL [String] URL for styleguide + # :DisplayStyleGuide [Boolean] Include styleguide and reference URLs + # :ExtraDetails [Boolean] Include cop details + # :DisplayCopNames [Boolean] Include cop name + # + # @param [String] cop_name for specific cop name + # @param [Hash] cop_config configs for specific cop, from config#for_cop + # @option cop_config [String] :StyleGuide Extension of base styleguide URL + # @option cop_config [String] :References Full reference URLs + # @option cop_config [String] :Details + # + # @param [Hash, nil] options optional + # @option options [Boolean] :display_style_guide + # Include style guide and reference URLs + # @option options [Boolean] :extra_details + # Include cop specific details + # @option options [Boolean] :debug + # Include debug output + # @option options [Boolean] :display_cop_names + # Include cop name + # + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:47 + def initialize(config, cop_name, cop_config, options); end + + # Returns the annotated message, + # based on params passed into initializer + # + # @return [String] annotated message + # + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:58 + def annotate(message); end + + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:16 + def config; end + + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:16 + def cop_config; end + + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:16 + def cop_name; end + + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:16 + def options; end + + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:68 + def urls; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:115 + def debug?; end + + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:128 + def details; end + + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:119 + def display_cop_names?; end + + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:98 + def display_style_guide?; end + + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:111 + def extra_details?; end + + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:102 + def reference_urls; end + + # Returns the base style guide URL from AllCops or the specific department + # + # @return [String] style guide URL + # + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:91 + def style_guide_base_url; end + + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:74 + def style_guide_url; end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/message_annotator.rb:21 + def style_guide_urls; end + end +end + +# @api private +# +# This module handles measurement and reporting of complexity in methods. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/method_complexity.rb:8 +module RuboCop::Cop::MethodComplexity + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount + extend ::RuboCop::AST::NodePattern::Macros + extend ::RuboCop::ExcludeLimit + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/method_complexity.rb:38 + def define_method?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/method_complexity.rb:15 + def max=(value); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/method_complexity.rb:24 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/method_complexity.rb:17 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/method_complexity.rb:22 + def on_defs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/method_complexity.rb:33 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/method_complexity.rb:32 + def on_numblock(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/method_complexity.rb:43 + def check_complexity(node, method_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/method_complexity.rb:62 + def complexity(body); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/method_complexity.rb:74 + def location(node); end +end + +# Common code for cops that deal with preferred methods. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/method_preference.rb:6 +module RuboCop::Cop::MethodPreference + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/method_preference.rb:25 + def default_cop_config; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/method_preference.rb:9 + def preferred_method(method); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/method_preference.rb:13 + def preferred_methods; end +end + +# Cops for the `Metrics` department. The department's cops are registered for lazy loading +# and their files are loaded on demand. +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics.rb:7 +module RuboCop::Cop::Metrics + extend ::RuboCop::Cop::LazyLoader +end + +# Checks that the ABC size of methods is not higher than the +# configured maximum. The ABC size is based on assignments, branches +# (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric +# and https://en.wikipedia.org/wiki/ABC_Software_Metric. +# +# Interpreting ABC size: +# +# * ``<= 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 +# is meant to distinguish actual `attr_reader` from other methods. +# +# @example CountRepeatedAttributes: false (default is true) +# +# # `model` and `current_user`, referenced 3 times each, +# # are each counted as only 1 branch each if +# # `CountRepeatedAttributes` is set to 'false' +# +# def search +# @posts = model.active.visible_by(current_user) +# .search(params[:q]) +# @posts = model.some_process(@posts, current_user) +# @posts = model.another_process(@posts, current_user) +# +# render 'pages/search/page' +# end +# +# This cop also takes into account `AllowedMethods` (defaults to `[]`) +# And `AllowedPatterns` (defaults to `[]`) +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/abc_size.rb:39 +class RuboCop::Cop::Metrics::AbcSize < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount + include ::RuboCop::Cop::MethodComplexity + + private + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/abc_size.rb:47 + def complexity(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/abc_size.rb:42 +RuboCop::Cop::Metrics::AbcSize::MSG = T.let(T.unsafe(nil), String) + +# Checks if the length of a block exceeds some maximum value. +# Comment lines can optionally be ignored. +# The maximum allowed length is configurable. +# The cop can be configured to ignore blocks passed to certain methods. +# +# You can set constructs you want to fold with `CountAsOne`. +# +# 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 allowed methods. +# +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] +# +# something do +# array = [ # +1 +# 1, +# 2 +# ] +# +# hash = { # +1 +# key: 'value' +# } +# +# msg = <<~HEREDOC # +1 +# Heredoc +# content. +# HEREDOC +# +# foo( # +1 +# 1, +# 2 +# ) +# end # 4 points +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/block_length.rb:45 +class RuboCop::Cop::Metrics::BlockLength < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CodeLength + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/block_length.rb:52 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/block_length.rb:60 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/block_length.rb:59 + def on_numblock(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/block_length.rb:82 + def cop_label; end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/block_length.rb:64 + def method_receiver_excluded?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/block_length.rb:50 +RuboCop::Cop::Metrics::BlockLength::LABEL = T.let(T.unsafe(nil), String) + +# Checks for excessive nesting of conditional and looping constructs. +# Deeply nested code is harder to read, understand, and maintain. +# Extracting nested logic into methods improves clarity. +# +# You can configure if blocks are considered using the `CountBlocks` and `CountModifierForms` +# options. When both are set to `false` (the default) blocks and modifier forms are not +# counted towards the nesting level. Set them to `true` to include these in the nesting level +# calculation as well. +# +# The maximum level of nesting allowed is configurable. +# +# @example Max: 3 (default) +# # bad +# if condition1 +# if condition2 +# if condition3 +# if condition4 +# do_something +# end +# end +# end +# end +# +# # good +# if condition1 +# if condition2 +# if condition3 +# do_something +# end +# end +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/block_nesting.rb:37 +class RuboCop::Cop::Metrics::BlockNesting < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/metrics/block_nesting.rb:40 + def max=(value); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/block_nesting.rb:42 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/block_nesting.rb:51 + def check_nesting_level(node, max, current_level); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/block_nesting.rb:75 + def consider_node?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/block_nesting.rb:85 + def count_blocks?; end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/block_nesting.rb:67 + def count_if_block?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/block_nesting.rb:89 + def count_modifier_forms?; end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/block_nesting.rb:81 + def message(max); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/block_nesting.rb:38 +RuboCop::Cop::Metrics::BlockNesting::NESTING_BLOCKS = T.let(T.unsafe(nil), Array) + +# Checks if the length of a class exceeds some maximum value. +# Comment lines can optionally be ignored. +# The maximum allowed length is configurable. +# +# You can set constructs you want to fold with `CountAsOne`. +# +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of its actual size. +# +# NOTE: This cop also applies for `Struct` definitions. +# +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] +# +# class Foo +# ARRAY = [ # +1 +# 1, +# 2 +# ] +# +# HASH = { # +1 +# key: 'value' +# } +# +# MSG = <<~HEREDOC # +1 +# Heredoc +# content. +# HEREDOC +# +# foo( # +1 +# 1, +# 2 +# ) +# end # 4 points +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/class_length.rb:40 +class RuboCop::Cop::Metrics::ClassLength < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CodeLength + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/class_length.rb:55 + def on_casgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/class_length.rb:45 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/class_length.rb:49 + def on_sclass(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/class_length.rb:65 + def cop_label; end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/class_length.rb:69 + def find_expression_within_parent(parent); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/class_length.rb:43 +RuboCop::Cop::Metrics::ClassLength::LABEL = T.let(T.unsafe(nil), String) + +# Checks for literals with extremely many entries. This is indicative of +# configuration or data that may be better extracted somewhere else, like +# a database, fetched from an API, or read from a non-code file (CSV, +# JSON, YAML, etc.). +# +# @example +# # bad +# # Huge Array literal +# [1, 2, '...', 999_999_999] +# +# # bad +# # Huge Hash literal +# { 1 => 1, 2 => 2, '...' => '...', 999_999_999 => 999_999_999} +# +# # bad +# # Huge Set "literal" +# Set[1, 2, '...', 999_999_999] +# +# # good +# # Reasonably sized Array literal +# [1, 2, '...', 10] +# +# # good +# # Reading huge Array from external data source +# # File.readlines('numbers.txt', chomp: true).map!(&:to_i) +# +# # good +# # Reasonably sized Hash literal +# { 1 => 1, 2 => 2, '...' => '...', 10 => 10} +# +# # good +# # Reading huge Hash from external data source +# CSV.foreach('numbers.csv', headers: true).each_with_object({}) do |row, hash| +# hash[row["key"].to_i] = row["value"].to_i +# end +# +# # good +# # Reasonably sized Set "literal" +# Set[1, 2, '...', 10] +# +# # good +# # Reading huge Set from external data source +# SomeFramework.config_for(:something)[:numbers].to_set +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/collection_literal_length.rb:50 +class RuboCop::Cop::Metrics::CollectionLiteralLength < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/metrics/collection_literal_length.rb:60 + def on_array(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/collection_literal_length.rb:63 + def on_hash(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/collection_literal_length.rb:65 + def on_index(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/collection_literal_length.rb:71 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/collection_literal_length.rb:56 + def set_const?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/collection_literal_length.rb:77 + def collection_threshold; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/collection_literal_length.rb:51 +RuboCop::Cop::Metrics::CollectionLiteralLength::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/collection_literal_length.rb:53 +RuboCop::Cop::Metrics::CollectionLiteralLength::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks that the cyclomatic complexity of methods is not higher +# than the configured maximum. The cyclomatic complexity is the number of +# linearly independent paths through a method. The algorithm counts +# decision points and adds one. +# +# An if statement (or unless or ?:) increases the complexity by one. An +# else branch does not, since it doesn't add a decision point. The && +# operator (or keyword and) can be converted to a nested if statement, +# and ||/or is shorthand for a sequence of ifs, so they also add one. +# Loops can be said to have an exit condition, so they add one. +# Blocks that are calls to builtin iteration methods +# (e.g. `ary.map{...}`) also add one, others are ignored. +# +# @example +# +# def each_child_node(*types) # count begins: 1 +# unless block_given? # unless: +1 +# return to_enum(__method__, *types) +# end +# +# children.each do |child| # each{}: +1 +# next unless child.is_a?(Node) # unless: +1 +# +# yield child if types.empty? || # if: +1, ||: +1 +# types.include?(child.type) +# end +# +# self +# end # total: 6 +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/cyclomatic_complexity.rb:35 +class RuboCop::Cop::Metrics::CyclomaticComplexity < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount + include ::RuboCop::Cop::MethodComplexity + include ::RuboCop::Cop::Metrics::Utils::IteratingBlock + + private + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/cyclomatic_complexity.rb:45 + def complexity_score_for(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/cyclomatic_complexity.rb:40 +RuboCop::Cop::Metrics::CyclomaticComplexity::COUNTED_NODES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/cyclomatic_complexity.rb:39 +RuboCop::Cop::Metrics::CyclomaticComplexity::MSG = T.let(T.unsafe(nil), String) + +# Checks if the length of a method exceeds some maximum value. +# Comment lines can optionally be allowed. +# The maximum allowed length is configurable. +# +# You can set constructs you want to fold with `CountAsOne`. +# +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of its actual size. +# +# NOTE: The `ExcludedMethods` and `IgnoredMethods` configuration is +# deprecated and only kept for backwards compatibility. +# Please use `AllowedMethods` and `AllowedPatterns` instead. +# By default, there are no allowed methods. +# +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] +# +# def m +# array = [ # +1 +# 1, +# 2 +# ] +# +# hash = { # +1 +# key: 'value' +# } +# +# <<~HEREDOC # +1 +# Heredoc +# content. +# HEREDOC +# +# foo( # +1 +# 1, +# 2 +# ) +# end # 4 points +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/method_length.rb:43 +class RuboCop::Cop::Metrics::MethodLength < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CodeLength + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/method_length.rb:57 + def on_block(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/method_length.rb:50 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/method_length.rb:55 + def on_defs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/method_length.rb:66 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/method_length.rb:65 + def on_numblock(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/method_length.rb:74 + def allowed?(method_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/method_length.rb:70 + def cop_label; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/method_length.rb:48 +RuboCop::Cop::Metrics::MethodLength::LABEL = T.let(T.unsafe(nil), String) + +# Checks if the length of a module exceeds some maximum value. +# Comment lines can optionally be ignored. +# The maximum allowed length is configurable. +# +# You can set constructs you want to fold with `CountAsOne`. +# +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of its actual size. +# +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] +# +# module M +# ARRAY = [ # +1 +# 1, +# 2 +# ] +# +# HASH = { # +1 +# key: 'value' +# } +# +# MSG = <<~HEREDOC # +1 +# Heredoc +# content. +# HEREDOC +# +# foo( # +1 +# 1, +# 2 +# ) +# end # 4 points +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/module_length.rb:38 +class RuboCop::Cop::Metrics::ModuleLength < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CodeLength + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/module_length.rb:54 + def module_definition?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/module_length.rb:47 + def on_casgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/module_length.rb:43 + def on_module(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/module_length.rb:58 + def cop_label; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/module_length.rb:41 +RuboCop::Cop::Metrics::ModuleLength::LABEL = T.let(T.unsafe(nil), String) + +# Checks for methods with too many parameters. +# +# The maximum number of parameters is configurable. +# Keyword arguments can optionally be excluded from the total count, +# as they add less complexity than positional or optional parameters. +# +# Any number of arguments for `initialize` method inside a block of +# `Struct.new` and `Data.define` like this is always allowed: +# +# [source,ruby] +# ---- +# Struct.new(:one, :two, :three, :four, :five, keyword_init: true) do +# def initialize(one:, two:, three:, four:, five:) +# end +# end +# ---- +# +# This is because checking the number of arguments of the `initialize` method +# does not make sense. +# +# NOTE: Explicit block argument `&block` is not counted to prevent +# erroneous change that is avoided by making block argument implicit. +# +# @example Max: 3 +# # good +# def foo(a, b, c = 1) +# end +# +# @example Max: 2 +# # bad +# def foo(a, b, c = 1) +# end +# +# @example CountKeywordArgs: true (default) +# # counts keyword args towards the maximum +# +# # bad (assuming Max is 3) +# def foo(a, b, c, d: 1) +# end +# +# # good (assuming Max is 3) +# def foo(a, b, c: 1) +# end +# +# @example CountKeywordArgs: false +# # don't count keyword args towards the maximum +# +# # good (assuming Max is 3) +# def foo(a, b, c, d: 1) +# end +# +# This cop also checks for the maximum number of optional parameters. +# This can be configured using the `MaxOptionalParameters` config option. +# +# @example MaxOptionalParameters: 3 (default) +# # good +# def foo(a = 1, b = 2, c = 3) +# end +# +# @example MaxOptionalParameters: 2 +# # bad +# def foo(a = 1, b = 2, c = 3) +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/parameter_lists.rb:70 +class RuboCop::Cop::Metrics::ParameterLists < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/metrics/parameter_lists.rb:121 + def argument_to_lambda_or_proc?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/parameter_lists.rb:71 + def max=(value); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/parameter_lists.rb:72 + def max_optional_parameters=(value); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/parameter_lists.rb:104 + def on_args(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/parameter_lists.rb:90 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/parameter_lists.rb:102 + def on_defs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/parameter_lists.rb:81 + def struct_new_or_data_define_block?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/parameter_lists.rb:125 + def args_count(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/parameter_lists.rb:141 + def count_keyword_args?; end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/parameter_lists.rb:137 + def max_optional_parameters; end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/parameter_lists.rb:133 + def max_params; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/parameter_lists.rb:74 +RuboCop::Cop::Metrics::ParameterLists::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/parameter_lists.rb:77 +RuboCop::Cop::Metrics::ParameterLists::NAMED_KEYWORD_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/parameter_lists.rb:75 +RuboCop::Cop::Metrics::ParameterLists::OPTIONAL_PARAMETERS_MSG = T.let(T.unsafe(nil), String) + +# Tries to produce a complexity score that's a measure of the +# complexity the reader experiences when looking at a method. For that +# reason it considers `when` nodes as something that doesn't add as much +# complexity as an `if` or a `&&`. Except if it's one of those special +# `case`/`when` constructs where there's no expression after `case`. Then +# the cop treats it as an `if`/`elsif`/`elsif`... and lets all the `when` +# nodes count. In contrast to the CyclomaticComplexity cop, this cop +# considers `else` nodes as adding complexity. +# +# A `case`/`in` branch whose pattern is a simple literal (e.g. `in 1`, `in "red"`, `in 1..10`) +# or a constant/type (e.g. `in Integer`) and has no guard is just as easy to read as a `when` +# branch, so it is discounted the same way. Branches with structural patterns (e.g. array, +# hash, or find patterns), bindings, alternatives, or a guard add the full complexity of +# a decision point. +# +# @example +# +# def example_1 # 1 +# if cond # 1 +# case var # 2 (0.8 + 4 * 0.2, rounded) +# when 1 then func_one +# when 2 then func_two +# when 3 then func_three +# when 4..10 then func_other +# end +# else # 1 +# do_something until a && b # 2 +# end # === +# end # 7 complexity points +# +# def example_2 # 1 +# case color # 1 (3 * 0.2, rounded) +# in "red" then func_red +# in "blue" then func_blue +# in "green" then func_green +# end # === +# end # 2 complexity points +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/perceived_complexity.rb:43 +class RuboCop::Cop::Metrics::PerceivedComplexity < ::RuboCop::Cop::Metrics::CyclomaticComplexity + private + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/perceived_complexity.rb:53 + def complexity_score_for(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/perceived_complexity.rb:78 + def simple_in_pattern?(in_pattern_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/perceived_complexity.rb:46 +RuboCop::Cop::Metrics::PerceivedComplexity::COUNTED_NODES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/perceived_complexity.rb:44 +RuboCop::Cop::Metrics::PerceivedComplexity::MSG = T.let(T.unsafe(nil), String) + +# Utility classes for `Metrics` department cops. +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics.rb:22 +module RuboCop::Cop::Metrics::Utils; end + +# > ABC is .. a software size metric .. computed by counting the number +# > of assignments, branches and conditions for a section of code. +# > http://c2.com/cgi/wiki?AbcMetric +# +# We separate the *calculator* from the *cop* so that the calculation, +# the formula itself, is easier to test. +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:13 +class RuboCop::Cop::Metrics::Utils::AbcSizeCalculator + include ::RuboCop::AST::Sexp + include ::RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount + include ::RuboCop::Cop::Metrics::Utils::IteratingBlock + include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:34 + def initialize(node, discount_repeated_attributes: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:42 + def calculate; end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:76 + def calculate_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:65 + def else_branch?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:51 + def evaluate_branch_nodes(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:60 + def evaluate_condition_node(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:128 + def argument?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:86 + def assignment?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:124 + def branch?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:120 + def capturing_variable?(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:98 + def compound_assignment(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:132 + def condition?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:109 + def simple_assignment?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:71 + def visit_depth_last(node, &block); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:30 + def calculate(node, discount_repeated_attributes: T.unsafe(nil)); end + end +end + +# > Branch -- an explicit forward program branch out of scope -- a +# > function call, class method call .. +# > http://c2.com/cgi/wiki?AbcMetric +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:21 +RuboCop::Cop::Metrics::Utils::AbcSizeCalculator::BRANCH_NODES = T.let(T.unsafe(nil), Array) + +# > Condition -- a logical/Boolean test, == != <= >= < > else case +# > default try catch ? and unary conditionals. +# > http://c2.com/cgi/wiki?AbcMetric +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/abc_size_calculator.rb:26 +RuboCop::Cop::Metrics::Utils::AbcSizeCalculator::CONDITION_NODES = T.let(T.unsafe(nil), Array) + +# Helps to calculate code length for the provided node. +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:8 +class RuboCop::Cop::Metrics::Utils::CodeLengthCalculator + include ::RuboCop::PathUtil + include ::RuboCop::Cop::Util + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:16 + def initialize(node, processed_source, count_comments: T.unsafe(nil), foldable_types: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:24 + def calculate; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:181 + def another_args?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:42 + def build_foldable_checks(types); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:90 + def classlike_code_length(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:138 + def classlike_node?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:66 + def code_length(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:162 + def count_comments?; end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:126 + def each_top_level_descendant(node, types, &block); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:146 + def extract_body(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:142 + def foldable_node?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:121 + def heredoc_length(node); end + + # pkg:gem/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. + # + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:158 + def irrelevant_line?(source_line); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:110 + def line_numbers_of_inner_nodes(node, *types); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:106 + def namespace_module?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:185 + def node_with_heredoc?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:60 + def normalize_foldable_types(types); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:166 + def omit_length(descendant); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:177 + def parenthesized?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:189 + def source_from_node_with_heredoc(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:13 +RuboCop::Cop::Metrics::Utils::CodeLengthCalculator::CLASSLIKE_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/code_length_calculator.rb:12 +RuboCop::Cop::Metrics::Utils::CodeLengthCalculator::FOLDABLE_TYPES = T.let(T.unsafe(nil), Array) + +# Used to identify iterating blocks like `.map{}` and `.map(&:...)` +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/iterating_block.rb:8 +module RuboCop::Cop::Metrics::Utils::IteratingBlock + # Returns the name of the method called with a block + # if node is a block node, or a block-pass node. + # + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/iterating_block.rb:37 + def block_method_name(node); end + + # Returns nil if node is neither a block node or a block-pass node. + # Otherwise returns true/false if method call is a known iterating call + # + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/iterating_block.rb:53 + def iterating_block?(node); end + + # Returns true only when name is a known iterating type (e.g. :each, :transform_values). + # + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/iterating_block.rb:47 + def iterating_method?(name); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/iterating_block.rb:33 +RuboCop::Cop::Metrics::Utils::IteratingBlock::KNOWN_ITERATING_METHODS = T.let(T.unsafe(nil), Set) + +# @api private +# +# Identifies repetitions `{c}send` calls with no arguments: +# +# foo.bar +# foo.bar # => repeated +# foo.bar.baz.qux # => inner send repeated +# foo.bar.baz.other # => both inner send repeated +# foo.bar(2) # => not repeated +# +# It also invalidates sequences if a receiver is reassigned: +# +# xx.foo.bar +# xx.foo.baz # => inner send repeated +# self.xx = any # => invalidates everything so far +# xx.foo.baz # => no repetition +# self.xx.foo.baz # => all repeated +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb:25 +module RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount + include ::RuboCop::AST::Sexp + extend ::RuboCop::AST::NodePattern::Macros + + # Plug into the calculator + # + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb:37 + def initialize(node, discount_repeated_attributes: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb:68 + def attribute_call?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb:60 + def calculate_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb:50 + def discount_repeated_attributes?; end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb:54 + def evaluate_branch_nodes(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb:99 + def root_node?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb:73 + def discount_repeated_attribute?(send_node); end + + # Returns the "known_attributes" for the `node` by walking the receiver tree + # If at any step the subdirectory does not exist, it is yielded with the + # associated key (method_name) + # If the node is not a series of `(c)send` calls with no arguments, + # then `nil` is yielded + # + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb:110 + def find_attributes(node, &block); end + + # @returns `[receiver, method | nil]` for the given setter `node` + # or `nil` if it is not a setter. + # + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb:126 + def setter_to_getter(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb:87 + def update_repeated_attribute(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb:29 +RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount::VAR_SETTER_TO_GETTER = T.let(T.unsafe(nil), Hash) + +# @api private +# +# Identifies repetitions `&.` on the same variable: +# +# my_var&.foo +# my_var&.bar # => repeated +# my_var = baz # => reset +# my_var&.qux # => not repeated +# +# pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb:15 +module RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb:20 + def discount_for_repeated_csend?(csend_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb:34 + def reset_on_lvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb:16 + def reset_repeated_csend; end +end + +# Cops for the `Migration` department. The department's cops are registered for lazy loading +# and their files are loaded on demand. +# +# pkg:gem/rubocop#lib/rubocop/cop/migration.rb:7 +module RuboCop::Cop::Migration + extend ::RuboCop::Cop::LazyLoader +end + +# department name. +# +# @example +# # bad +# +# # good +# +# pkg:gem/rubocop#lib/rubocop/cop/migration/department_name.rb:18 +class RuboCop::Cop::Migration::DepartmentName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/migration/department_name.rb:31 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/migration/department_name.rb:53 + def check_cop_name(name, comment, offset); end + + # pkg:gem/rubocop#lib/rubocop/cop/migration/department_name.rb:75 + def contain_unexpected_character_for_department_name?(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/migration/department_name.rb:79 + def qualified_legacy_cop_name(cop_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/migration/department_name.rb:69 + def valid_content_token?(content_token); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/migration/department_name.rb:24 +RuboCop::Cop::Migration::DepartmentName::DISABLE_COMMENT_FORMAT = T.let(T.unsafe(nil), Regexp) + +# The token that makes up a disable comment. +# `DepartmentName/CopName` or` all`. +# +# pkg:gem/rubocop#lib/rubocop/cop/migration/department_name.rb:29 +RuboCop::Cop::Migration::DepartmentName::DISABLING_COPS_CONTENT_TOKEN = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop#lib/rubocop/cop/migration/department_name.rb:22 +RuboCop::Cop::Migration::DepartmentName::MSG = T.let(T.unsafe(nil), String) + +# Common functionality for checking minimum body length. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/min_body_length.rb:6 +module RuboCop::Cop::MinBodyLength + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/min_body_length.rb:13 + def min_body_length; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/min_body_length.rb:9 + def min_body_length?(node); end +end + +# Common functionality for checking minimum branches count. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/min_branches_count.rb:6 +module RuboCop::Cop::MinBranchesCount + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/min_branches_count.rb:29 + def if_conditional_branches(node, branches = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/min_branches_count.rb:22 + def min_branches_count; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/min_branches_count.rb:9 + def min_branches_count?(node); end +end + +# Common code for indenting the first elements in multiline +# array literals, hash literals, and method definitions. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_element_indentation.rb:7 +module RuboCop::Cop::MultilineElementIndentation + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_element_indentation.rb:42 + def check_expected_style(styles); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_element_indentation.rb:26 + def check_first(first, left_brace, left_parenthesis, offset); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_element_indentation.rb:80 + def detected_styles(actual_column, offset, left_parenthesis, left_brace); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_element_indentation.rb:85 + def detected_styles_for_column(column, left_parenthesis, left_brace); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_element_indentation.rb:10 + def each_argument_node(node, type); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_element_indentation.rb:66 + def hash_pair_where_value_beginning_with(left_brace, first); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_element_indentation.rb:98 + def incorrect_style_detected(styles, first, base_column_type); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_element_indentation.rb:50 + def indent_base(left_brace, first, left_parenthesis); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_element_indentation.rb:72 + def key_and_value_begin_on_same_line?(pair); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_element_indentation.rb:76 + def right_sibling_begins_on_subsequent_line?(pair); end +end + +# Common functionality for checking for a line break before each +# element in a multi-line collection. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_element_line_breaks.rb:7 +module RuboCop::Cop::MultilineElementLineBreaks + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_element_line_breaks.rb:25 + def all_on_same_line?(nodes, ignore_last: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_element_line_breaks.rb:10 + def check_line_breaks(_node, children, ignore_last: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_element_line_breaks.rb:33 + def heredoc_opened_before?(previous_children, child); end +end + +# Common functionality for checking multiline method calls and binary +# operations. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:7 +module RuboCop::Cop::MultilineExpressionIndentation + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:25 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:14 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:132 + def argument_in_method_call(node, kind); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:188 + def assignment_rhs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:67 + def check(range, node, lhs, rhs); end + + # The correct indentation of `node` is usually `IndentationWidth`, with + # one exception: prefix keywords. + # + # ``` + # while foo && # Here, `while` is called a "prefix keyword" + # bar # This is called "special indentation" + # baz + # end + # ``` + # + # Note that *postfix conditionals* do *not* get "special indentation". + # + # ``` + # next if foo && + # bar # normal indentation, not special + # ``` + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:57 + def correct_indentation(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:160 + def disqualified_rhs?(candidate, ancestor); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:202 + def grouped_expression?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:75 + def incorrect_style_detected(range, node, lhs, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:87 + def indentation(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:124 + def indented_keyword_expression(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:206 + def inside_arg_list_parentheses?(node, ancestor); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:101 + def keyword_message_tail(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:109 + def kw_node_with_special_indentation(node); end + + # 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 + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:34 + def left_hand_side(lhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:196 + def not_for_this_cop?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:91 + def operation_description(node, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:146 + def part_of_assignment_rhs(node, candidate); end + + # pkg:gem/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` + # begin on the same line. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:215 + def postfix_conditional?(node); end + + # The []= operator and setters (a.b = c) are parsed as :send nodes. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:176 + def valid_method_rhs_candidate?(candidate, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:165 + def valid_rhs?(candidate, ancestor); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:180 + def valid_rhs_candidate?(candidate, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:219 + def within_node?(inner, outer); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:11 +RuboCop::Cop::MultilineExpressionIndentation::ASSIGNMENT_MESSAGE_TAIL = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:10 +RuboCop::Cop::MultilineExpressionIndentation::DEFAULT_MESSAGE_TAIL = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:8 +RuboCop::Cop::MultilineExpressionIndentation::KEYWORD_ANCESTOR_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:12 +RuboCop::Cop::MultilineExpressionIndentation::KEYWORD_MESSAGE_TAIL = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_expression_indentation.rb:9 +RuboCop::Cop::MultilineExpressionIndentation::UNALIGNED_RHS_TYPES = T.let(T.unsafe(nil), Array) + +# Autocorrection logic for the closing brace of a literal either +# on the same line as the last contained elements, or a new line. +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:7 +class RuboCop::Cop::MultilineLiteralBraceCorrector + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineLiteralBraceLayout + include ::RuboCop::Cop::RangeHelp + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:15 + def initialize(corrector, node, processed_source); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:21 + def call; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:61 + def content_if_comment_present(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:51 + def correct_heredoc_argument_method_chain(corrector, end_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:46 + def correct_next_line_brace(corrector, end_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:42 + def correct_same_line_brace(corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:40 + def corrector; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:90 + def last_element_range_with_trailing_comma(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:99 + def last_element_trailing_comma_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:40 + def node; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:40 + def processed_source; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:86 + def remove_trailing_content_of_comment(corrector, range); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:76 + def select_content_to_be_inserted_after_last_element(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:69 + def use_heredoc_argument_method_chain?(parent); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:11 + def correct(corrector, node, processed_source); end + end +end + +# Common functionality for checking the closing brace of a literal is +# either on the same line as the last contained elements or a new line. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb:7 +module RuboCop::Cop::MultilineLiteralBraceLayout + include ::RuboCop::Cop::ConfigurableEnforcedStyle + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb:35 + def check(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb:12 + def check_brace_layout(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb:43 + def check_new_line(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb:51 + def check_same_line(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb:59 + def check_symmetrical(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb:87 + def children(node); end + + # This method depends on the fact that we have guarded + # against implicit and empty literals. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb:99 + def closing_brace_on_same_line?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb:75 + def empty_literal?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb:141 + def heredoc_opened_on_closing_brace_line?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb:83 + def ignored_literal?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb:79 + def implicit_literal?(node); end + + # Starting with the parent node and recursively for the parent node's + # children, check if the node is a HEREDOC and if the HEREDOC ends below + # or on the last line of the parent node. + # + # Example: + # + # # node is `b: ...` parameter + # # last_line_heredoc?(node) => false + # foo(a, + # b: { + # a: 1, + # c: <<-EOM + # baz + # EOM + # } + # ) + # + # # node is `b: ...` parameter + # # last_line_heredoc?(node) => true + # foo(a, + # b: <<-EOM + # baz + # EOM + # ) + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb:127 + def last_line_heredoc?(node, parent = T.unsafe(nil)); end + + # Returns true for the case + # [a, + # b # comment + # ].some_method + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb:27 + def new_line_needed_before_closing_brace?(node); end + + # This method depends on the fact that we have guarded + # against implicit and empty literals. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb:93 + def opening_brace_on_same_line?(node); end +end + +# Cops for the `Naming` department. The department's cops are registered for lazy loading +# and their files are loaded on demand. +# +# pkg:gem/rubocop#lib/rubocop/cop/naming.rb:7 +module RuboCop::Cop::Naming + extend ::RuboCop::Cop::LazyLoader +end + +# Avoid prefixing accessor method names with `get_` or `set_`. +# Applies to both instance and class methods. +# +# NOTE: Method names starting with `get_` or `set_` only register an offense +# when the methods match the expected arity for getters and setters respectively. +# Getters (`get_attribute`) must have no arguments to be registered, +# and setters (`set_attribute(value)`) must have exactly one. +# +# When `AllCops/UseProjectIndex` is enabled and the `rubydex` gem is +# installed, methods that override a method defined by an ancestor +# elsewhere in the project are not reported, since renaming an override +# breaks the inherited contract. +# +# @example +# # bad +# def set_attribute(value) +# end +# +# # good +# def attribute=(value) +# end +# +# # bad +# def get_attribute +# end +# +# # good +# def attribute +# end +# +# # accepted, incorrect arity for getter +# def get_value(attr) +# end +# +# # accepted, incorrect arity for setter +# def set_value +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/accessor_method_name.rb:43 +class RuboCop::Cop::Naming::AccessorMethodName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ProjectIndexHelp + + # pkg:gem/rubocop#lib/rubocop/cop/naming/accessor_method_name.rb:49 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/accessor_method_name.rb:58 + def on_defs(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/accessor_method_name.rb:74 + def bad_reader_name?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/accessor_method_name.rb:78 + def bad_writer_name?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/accessor_method_name.rb:62 + def message(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/accessor_method_name.rb:70 + def proper_attribute_name?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/accessor_method_name.rb:46 +RuboCop::Cop::Naming::AccessorMethodName::MSG_READER = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/accessor_method_name.rb:47 +RuboCop::Cop::Naming::AccessorMethodName::MSG_WRITER = T.let(T.unsafe(nil), String) + +# Checks for non-ascii characters in identifier and constant names. +# Identifiers are always checked and whether constants are checked +# can be controlled using AsciiConstants config. +# +# @example +# # bad +# def καλημερα # Greek alphabet (non-ascii) +# end +# +# # bad +# def こんにちはと言う # Japanese character (non-ascii) +# end +# +# # bad +# def hello_🍣 # Emoji (non-ascii) +# end +# +# # good +# def say_hello +# end +# +# # bad +# 신장 = 10 # Hangul character (non-ascii) +# +# # good +# height = 10 +# +# # bad +# params[:عرض_gteq] # Arabic character (non-ascii) +# +# # good +# params[:width_gteq] +# +# @example AsciiConstants: true (default) +# # bad +# class Foö +# end +# +# FOÖ = "foo" +# +# @example AsciiConstants: false +# # good +# class Foö +# end +# +# FOÖ = "foo" +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/ascii_identifiers.rb:53 +class RuboCop::Cop::Naming::AsciiIdentifiers < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # pkg:gem/rubocop#lib/rubocop/cop/naming/ascii_identifiers.rb:59 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/ascii_identifiers.rb:84 + def first_non_ascii_chars(string); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/ascii_identifiers.rb:74 + def first_offense_range(identifier); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/ascii_identifiers.rb:70 + def should_check?(token); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/ascii_identifiers.rb:57 +RuboCop::Cop::Naming::AsciiIdentifiers::CONSTANT_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/ascii_identifiers.rb:56 +RuboCop::Cop::Naming::AsciiIdentifiers::IDENTIFIER_MSG = T.let(T.unsafe(nil), String) + +# Makes sure that certain binary operator methods have their +# sole parameter named `other`. +# +# @example +# +# # bad +# def +(amount); end +# +# # good +# def +(other); end +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/binary_operator_parameter_name.rb:16 +class RuboCop::Cop::Naming::BinaryOperatorParameterName < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/naming/binary_operator_parameter_name.rb:29 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/binary_operator_parameter_name.rb:25 + def op_method_candidate?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/binary_operator_parameter_name.rb:46 + def op_method?(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/binary_operator_parameter_name.rb:61 + def redeclares?(block, name); end + + # A reference is shadowed when an enclosing block within the method redeclares the + # parameter name (as a block parameter or block-local). Such a reference points to + # the block's variable, not the operator's parameter, so it must not be renamed. + # + # pkg:gem/rubocop#lib/rubocop/cop/naming/binary_operator_parameter_name.rb:55 + def shadowed?(node, name, def_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/binary_operator_parameter_name.rb:22 +RuboCop::Cop::Naming::BinaryOperatorParameterName::EXCLUDED = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/binary_operator_parameter_name.rb:19 +RuboCop::Cop::Naming::BinaryOperatorParameterName::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/binary_operator_parameter_name.rb:21 +RuboCop::Cop::Naming::BinaryOperatorParameterName::OP_LIKE_METHODS = T.let(T.unsafe(nil), Array) + +# In Ruby 3.1, anonymous block forwarding has been added. +# +# This cop identifies places where `do_something(&block)` can be replaced +# by `do_something(&)`. +# +# It also supports the opposite style by alternative `explicit` option. +# You can specify the block variable name for autocorrection with `BlockForwardingName`. +# The default variable name is `block`. If the name is already in use, it will not be +# autocorrected. +# +# [NOTE] +# ==== +# Because of a bug in Ruby 3.3.0, when a block is referenced inside of another block, +# no offense will be registered until Ruby 3.4: +# +# [source,ruby] +# ---- +# def foo(&block) +# # Using an anonymous block would be a syntax error on Ruby 3.3.0 +# block_method { bar(&block) } +# end +# ---- +# ==== +# +# @example EnforcedStyle: anonymous (default) +# +# # bad +# def foo(&block) +# bar(&block) +# end +# +# # good +# def foo(&) +# bar(&) +# end +# +# @example EnforcedStyle: explicit +# +# # bad +# def foo(&) +# bar(&) +# end +# +# # good +# def foo(&block) +# bar(&block) +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:54 +class RuboCop::Cop::Naming::BlockForwarding < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:71 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:90 + def on_defs(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:121 + def anonymous_block_argument?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:104 + def block_argument_name_matched?(block_pass_node, last_argument); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:153 + def block_forwarding_name; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:94 + def expected_block_forwarding_style?(node, last_argument); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:125 + def explicit_block_argument?(node); end + + # Ruby 3.3.0 had a bug where accessing an anonymous block argument inside of a block + # was a syntax error in unambiguous cases: https://bugs.ruby-lang.org/issues/20090 + # We disallow this also for earlier Ruby versions so that code is forwards compatible. + # + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:113 + def invalidates_syntax?(block_pass_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:129 + def register_offense(block_argument, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:145 + def use_block_argument_as_local_variable?(node, last_argument); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:117 + def use_kwarg_in_method_definition?(node); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:64 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/block_forwarding.rb:62 +RuboCop::Cop::Naming::BlockForwarding::MSG = T.let(T.unsafe(nil), String) + +# Checks block parameter names for how descriptive they +# are. It is highly configurable. +# +# The `MinNameLength` config option takes an integer. It represents +# the minimum amount of characters the name must be. Its default is 1. +# The `AllowNamesEndingInNumbers` config option takes a boolean. When +# set to false, this cop will register offenses for names ending with +# numbers. Its default is false. The `AllowedNames` config option +# takes an array of permitted names that will never register an +# offense. The `ForbiddenNames` config option takes an array of +# restricted names that will always register an offense. +# +# @example +# # bad +# bar do |varOne, varTwo| +# varOne + varTwo +# end +# +# # With `AllowNamesEndingInNumbers` set to false +# foo { |num1, num2| num1 * num2 } +# +# # With `MinNameLength` set to number greater than 1 +# baz { |a, b, c| do_stuff(a, b, c) } +# +# # good +# bar do |thud, fred| +# thud + fred +# end +# +# foo { |speed, distance| speed * distance } +# +# baz { |age, height, gender| do_stuff(age, height, gender) } +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/block_parameter_name.rb:38 +class RuboCop::Cop::Naming::BlockParameterName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::UncommunicativeName + + # pkg:gem/rubocop#lib/rubocop/cop/naming/block_parameter_name.rb:41 + def on_block(node); end +end + +# Checks for class and module names with +# an underscore in them. +# +# `AllowedNames` config takes an array of permitted names. +# Its default value is `['module_parent']`. +# These names can be full class/module names or part of the name. +# eg. Adding `my_class` to the `AllowedNames` config will allow names like +# `my_class`, `my_class::User`, `App::my_class`, `App::my_class::User`, etc. +# +# @example +# # bad +# class My_Class +# end +# module My_Module +# end +# +# # good +# class MyClass +# end +# module MyModule +# end +# class module_parent::MyModule +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/class_and_module_camel_case.rb:29 +class RuboCop::Cop::Naming::ClassAndModuleCamelCase < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/naming/class_and_module_camel_case.rb:32 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/class_and_module_camel_case.rb:41 + def on_module(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/class_and_module_camel_case.rb:30 +RuboCop::Cop::Naming::ClassAndModuleCamelCase::MSG = T.let(T.unsafe(nil), String) + +# Checks whether constant names are written using +# SCREAMING_SNAKE_CASE. +# +# To avoid false positives, it ignores cases in which we cannot know +# for certain the type of value that would be assigned to a constant. +# +# @example +# # bad +# InchInCm = 2.54 +# INCHinCM = 2.54 +# Inch_In_Cm = 2.54 +# +# # good +# INCH_IN_CM = 2.54 +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/constant_name.rb:20 +class RuboCop::Cop::Naming::ConstantName < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/naming/constant_name.rb:27 + def class_or_struct_return_method?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/constant_name.rb:67 + def literal_receiver?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/constant_name.rb:33 + def on_casgn(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/constant_name.rb:55 + def allowed_assignment?(value); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/constant_name.rb:72 + def allowed_conditional_expression_on_rhs?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/constant_name.rb:62 + def allowed_method_call_on_rhs?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/constant_name.rb:76 + def contains_constant?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/constant_name.rb:21 +RuboCop::Cop::Naming::ConstantName::MSG = T.let(T.unsafe(nil), String) + +# Use POSIX character classes, so we allow accented characters rather +# than just standard ASCII characters +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/constant_name.rb:24 +RuboCop::Cop::Naming::ConstantName::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) + +# Makes sure that Ruby source files have snake_case +# names. Ruby scripts (i.e. source files with a shebang in the +# first line) are ignored. +# +# The cop also ignores `.gemspec` files, because Bundler +# recommends using dashes to separate namespaces in nested gems +# (i.e. `bundler-console` becomes `Bundler::Console`). As such, the +# gemspec is supposed to be named `bundler-console.gemspec`. +# +# When `ExpectMatchingDefinition` (default: `false`) is `true`, the cop requires +# each file to have a class, module or `Struct` defined in it that matches +# the filename. This can be further configured using +# `CheckDefinitionPathHierarchy` (default: `true`) to determine whether the +# path should match the namespace of the above definition. +# +# When `IgnoreExecutableScripts` (default: `true`) is `true`, files that start +# with a shebang line are not considered by the cop. +# +# When `Regex` is set, the cop will flag any filename that does not match +# the regular expression. +# +# @example +# # bad +# lib/layoutManager.rb +# +# anything/usingCamelCase +# +# # good +# lib/layout_manager.rb +# +# anything/using_snake_case.rake +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:39 +class RuboCop::Cop::Naming::FileName < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:54 + def on_new_investigation; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:47 + def struct_definition(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:132 + def allowed_acronyms; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:94 + def bad_filename_allowed?; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:120 + def check_definition_path_hierarchy?; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:167 + def defined_struct(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:124 + def definition_path_hierarchy_roots; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:116 + def expect_matching_definition?; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:136 + def filename_good?(basename); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:145 + def find_class_or_module(node, namespace); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:163 + def find_definition(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:63 + def for_bad_filename(file_path); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:112 + def ignore_executable_scripts?; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:200 + def match?(expected); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:204 + def match_acronym?(expected, name); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:90 + def matching_class?(file_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:86 + def matching_definition?(file_path); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:172 + def namespace_matches?(node, namespace, expected); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:98 + def no_definition_message(basename, file_path); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:104 + def other_message(basename); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:186 + def partial_matcher!(expected); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:75 + def perform_class_and_module_naming_checks(file_path, basename); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:128 + def regex; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:239 + def to_module_name(basename); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:212 + def to_namespace(path); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:41 +RuboCop::Cop::Naming::FileName::MSG_NO_DEFINITION = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:42 +RuboCop::Cop::Naming::FileName::MSG_REGEX = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:40 +RuboCop::Cop::Naming::FileName::MSG_SNAKE_CASE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/file_name.rb:44 +RuboCop::Cop::Naming::FileName::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) + +# Checks that your heredocs are using the configured case. +# By default it is configured to enforce uppercase heredocs. +# +# @example EnforcedStyle: uppercase (default) +# # bad +# <<-sql +# SELECT * FROM foo +# sql +# +# # good +# <<-SQL +# SELECT * FROM foo +# SQL +# +# @example EnforcedStyle: lowercase +# # bad +# <<-SQL +# SELECT * FROM foo +# SQL +# +# # good +# <<-sql +# SELECT * FROM foo +# sql +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/heredoc_delimiter_case.rb:30 +class RuboCop::Cop::Naming::HeredocDelimiterCase < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Heredoc + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/naming/heredoc_delimiter_case.rb:37 + def on_heredoc(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/heredoc_delimiter_case.rb:54 + def correct_case_delimiters?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/heredoc_delimiter_case.rb:65 + def correct_delimiters(source); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/heredoc_delimiter_case.rb:59 + def corrected_delimiter_in_body?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/heredoc_delimiter_case.rb:50 + def message(_node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/heredoc_delimiter_case.rb:35 +RuboCop::Cop::Naming::HeredocDelimiterCase::MSG = T.let(T.unsafe(nil), String) + +# Checks that your heredocs are using meaningful delimiters. +# By default it disallows `END` and `EO*`, and can be configured through +# forbidden listing additional delimiters. +# +# @example +# +# # good +# <<-SQL +# SELECT * FROM foo +# SQL +# +# # bad +# <<-END +# SELECT * FROM foo +# END +# +# # bad +# <<-EOS +# SELECT * FROM foo +# EOS +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/heredoc_delimiter_naming.rb:26 +class RuboCop::Cop::Naming::HeredocDelimiterNaming < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Heredoc + + # pkg:gem/rubocop#lib/rubocop/cop/naming/heredoc_delimiter_naming.rb:31 + def on_heredoc(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/heredoc_delimiter_naming.rb:49 + def forbidden_delimiter_regexps; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/heredoc_delimiter_naming.rb:53 + def forbidden_delimiters; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/heredoc_delimiter_naming.rb:41 + def meaningful_delimiters?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/heredoc_delimiter_naming.rb:29 +RuboCop::Cop::Naming::HeredocDelimiterNaming::MSG = T.let(T.unsafe(nil), String) + +# Recommends the use of inclusive language instead of problematic terms. +# The cop can check the following locations for offenses: +# +# - identifiers +# - constants +# - variables +# - strings +# - symbols +# - comments +# - file paths +# +# Each of these locations can be individually enabled/disabled via configuration, +# for example CheckIdentifiers = true/false. +# +# Flagged terms are configurable for the cop. For each flagged term an optional +# Regex can be specified to identify offenses. Suggestions for replacing a flagged term can +# be configured and will be displayed as part of the offense message. +# An AllowedRegex can be specified for a flagged term to exempt allowed uses of the term. +# `WholeWord: true` can be set on a flagged term to indicate the cop should only match when +# a term matches the whole word (partial matches will not be offenses). +# +# The cop supports autocorrection when there is only one suggestion. When there are multiple +# suggestions, the best suggestion cannot be identified and will not be autocorrected. +# +# @example FlaggedTerms: { whitelist: { Suggestions: ['allowlist'] } } +# # Suggest replacing identifier whitelist with allowlist +# +# # bad +# whitelist_users = %w(user1 user1) +# +# # good +# allowlist_users = %w(user1 user2) +# +# @example FlaggedTerms: { master: { Suggestions: ['main', 'primary', 'leader'] } } +# # Suggest replacing master in an instance variable name with main, primary, or leader +# +# # bad +# @master_node = 'node1.example.com' +# +# # good +# @primary_node = 'node1.example.com' +# +# @example FlaggedTerms: { whitelist: { Regex: !ruby/regexp '/white[-_\s]?list' } } +# # Identify problematic terms using a Regexp +# +# # bad +# white_list = %w(user1 user2) +# +# # good +# allow_list = %w(user1 user2) +# +# @example FlaggedTerms: { master: { AllowedRegex: 'master\'?s degree' } } +# # Specify allowed uses of the flagged term as a string or regexp. +# +# # bad +# # They had a masters +# +# # good +# # They had a master's degree +# +# @example FlaggedTerms: { slave: { WholeWord: true } } +# # Specify that only terms that are full matches will be flagged. +# +# # bad +# Slave +# +# # good (won't be flagged despite containing `slave`) +# TeslaVehicle +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:74 +class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:84 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:93 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:113 + def add_offenses_for_token(token, word_locations); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:178 + def add_to_flagged_term_hash(regex_string, term, term_definition); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:208 + def array_to_ignorecase_regex(strings); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:128 + def check_token?(type); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:258 + def create_message(word, message = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:232 + def create_multiple_word_message_for_file(words); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:228 + def create_single_word_message_for_file(word); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:204 + def ensure_regex_string(regex); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:171 + def extract_regexp(term, term_definition); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:266 + def find_flagged_term(word); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:280 + def format_suggestions(suggestions); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:212 + def investigate_filepath; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:102 + def investigate_tokens; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:246 + def mask_input(str); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:295 + def offense_range(token, word); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:162 + def preferred_sole_term(suggestions); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:132 + def preprocess_check_config; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:146 + def preprocess_flagged_terms; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:273 + def preprocess_suggestions(suggestions); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:194 + def process_allowed_regex(allowed); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:236 + def scan_for_words(input); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:185 + def set_regexes(flagged_term_strings, allowed_strings); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:78 +RuboCop::Cop::Naming::InclusiveLanguage::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:79 +RuboCop::Cop::Naming::InclusiveLanguage::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:80 +RuboCop::Cop::Naming::InclusiveLanguage::MSG_FOR_FILE_PATH = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:82 +class RuboCop::Cop::Naming::InclusiveLanguage::WordLocation < ::Struct + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:82 + def position; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:82 + def position=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:82 + def word; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:82 + def word=(_); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:82 + def [](*_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:82 + def inspect; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:82 + def keyword_init?; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:82 + def members; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/inclusive_language.rb:82 + def new(*_arg0); end + end +end + +# Checks for memoized methods whose instance variable name +# does not match the method name. Applies to both regular methods +# (defined with `def`) and dynamic methods (defined with +# `define_method` or `define_singleton_method`). +# +# This cop can be configured with the EnforcedStyleForLeadingUnderscores +# directive. It can be configured to allow for memoized instance variables +# prefixed with an underscore. Prefixing ivars with an underscore is a +# convention that is used to implicitly indicate that an ivar should not +# be set or referenced outside of the memoization method. +# +# @safety +# This cop relies on the pattern `@instance_var ||= ...`, +# but this is sometimes used for other purposes than memoization +# so this cop is considered unsafe. Also, its autocorrection is unsafe +# because it may conflict with instance variable names already in use. +# +# @example EnforcedStyleForLeadingUnderscores: disallowed (default) +# # bad +# # Method foo is memoized using an instance variable that is +# # not `@foo`. This can cause confusion and bugs. +# def foo +# @something ||= calculate_expensive_thing +# end +# +# def foo +# return @something if defined?(@something) +# @something = calculate_expensive_thing +# end +# +# # good +# def _foo +# @foo ||= calculate_expensive_thing +# end +# +# # good +# def foo +# @foo ||= calculate_expensive_thing +# end +# +# # good +# def foo +# @foo ||= begin +# calculate_expensive_thing +# end +# end +# +# # good +# def foo +# helper_variable = something_we_need_to_calculate_foo +# @foo ||= calculate_expensive_thing(helper_variable) +# end +# +# # good +# define_method(:foo) do +# @foo ||= calculate_expensive_thing +# end +# +# # good +# define_method(:foo) do +# return @foo if defined?(@foo) +# @foo = calculate_expensive_thing +# end +# +# @example EnforcedStyleForLeadingUnderscores: required +# # bad +# def foo +# @something ||= calculate_expensive_thing +# end +# +# # bad +# def foo +# @foo ||= calculate_expensive_thing +# end +# +# def foo +# return @foo if defined?(@foo) +# @foo = calculate_expensive_thing +# end +# +# # good +# def foo +# @_foo ||= calculate_expensive_thing +# end +# +# # good +# def _foo +# @_foo ||= calculate_expensive_thing +# end +# +# def foo +# return @_foo if defined?(@_foo) +# @_foo = calculate_expensive_thing +# end +# +# # good +# define_method(:foo) do +# @_foo ||= calculate_expensive_thing +# end +# +# # good +# define_method(:foo) do +# return @_foo if defined?(@_foo) +# @_foo = calculate_expensive_thing +# end +# +# @example EnforcedStyleForLeadingUnderscores: optional +# # bad +# def foo +# @something ||= calculate_expensive_thing +# end +# +# # good +# def foo +# @foo ||= calculate_expensive_thing +# end +# +# # good +# def foo +# @_foo ||= calculate_expensive_thing +# end +# +# # good +# def _foo +# @_foo ||= calculate_expensive_thing +# end +# +# # good +# def foo +# return @_foo if defined?(@_foo) +# @_foo = calculate_expensive_thing +# end +# +# # good +# define_method(:foo) do +# @foo ||= calculate_expensive_thing +# end +# +# # good +# define_method(:foo) do +# @_foo ||= calculate_expensive_thing +# end +# +# pkg:gem/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 + + # pkg:gem/rubocop#lib/rubocop/cop/naming/memoized_instance_variable_name.rb:198 + def defined_memoized?(param0 = T.unsafe(nil), param1); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/memoized_instance_variable_name.rb:161 + def method_definition?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/memoized_instance_variable_name.rb:206 + def on_defined?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/memoized_instance_variable_name.rb:171 + def on_or_asgn(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/memoized_instance_variable_name.rb:242 + def find_definition(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/memoized_instance_variable_name.rb:260 + def matches?(method_name, ivar_assign); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/memoized_instance_variable_name.rb:269 + def message(variable); end + + # Operator and other non-word method names (e.g. `[]`, `+`, `<=>`) cannot form a + # valid instance variable name, so there is no matching ivar to enforce and a + # suggested correction like `@[]` would be invalid Ruby. + # + # pkg:gem/rubocop#lib/rubocop/cop/naming/memoized_instance_variable_name.rb:256 + def nameable_method?(method_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/memoized_instance_variable_name.rb:238 + def style_parameter_name; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/memoized_instance_variable_name.rb:277 + def suggested_var(method_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/memoized_instance_variable_name.rb:283 + def variable_name_candidates(method_name); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/memoized_instance_variable_name.rb:157 +RuboCop::Cop::Naming::MemoizedInstanceVariableName::DYNAMIC_DEFINE_METHODS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/memoized_instance_variable_name.rb:158 +RuboCop::Cop::Naming::MemoizedInstanceVariableName::INITIALIZE_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/memoized_instance_variable_name.rb:153 +RuboCop::Cop::Naming::MemoizedInstanceVariableName::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/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, +# snake_case or camelCase, for their names. +# +# Method names matching patterns are always allowed. +# +# The cop can be configured with `AllowedPatterns` to allow certain regexp patterns: +# +# [source,yaml] +# ---- +# Naming/MethodName: +# AllowedPatterns: +# - '\AonSelectionBulkChange\z' +# - '\AonSelectionCleared\z' +# ---- +# +# As well, you can also forbid specific method names or regexp patterns +# using `ForbiddenIdentifiers` or `ForbiddenPatterns`: +# +# [source,yaml] +# ---- +# Naming/MethodName: +# ForbiddenIdentifiers: +# - 'def' +# - 'super' +# ForbiddenPatterns: +# - '_v1\z' +# - '_gen1\z' +# ---- +# +# @example EnforcedStyle: snake_case (default) +# # bad +# def fooBar; end +# +# # good +# def foo_bar; end +# +# # bad +# define_method :fooBar do +# end +# +# # good +# define_method :foo_bar do +# end +# +# # bad +# Struct.new(:fooBar) +# +# # good +# Struct.new(:foo_bar) +# +# # bad +# alias_method :fooBar, :some_method +# +# # good +# alias_method :foo_bar, :some_method +# +# @example EnforcedStyle: camelCase +# # bad +# def foo_bar; end +# +# # good +# def fooBar; end +# +# # bad +# define_method :foo_bar do +# end +# +# # good +# define_method :fooBar do +# end +# +# # bad +# Struct.new(:foo_bar) +# +# # good +# Struct.new(:fooBar) +# +# # bad +# alias_method :foo_bar, :some_method +# +# # good +# alias_method :fooBar, :some_method +# +# @example ForbiddenIdentifiers: ['def', 'super'] +# # bad +# def def; end +# def super; end +# +# @example ForbiddenPatterns: ['_v1\z', '_gen1\z'] +# # bad +# def release_v1; end +# def api_gen1; end +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:99 +class RuboCop::Cop::Naming::MethodName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::ConfigurableFormatting + include ::RuboCop::Cop::ConfigurableNaming + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::ForbiddenIdentifiers + include ::RuboCop::Cop::ForbiddenPattern + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:126 + def define_data?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:123 + def new_struct?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:153 + def on_alias(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:142 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:151 + def on_defs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:128 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:120 + def str_name(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:117 + def sym_name(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:235 + def attr_name(name_item); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:212 + def forbidden_name?(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:180 + def handle_alias_method(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:187 + def handle_attr_accessor(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:174 + def handle_define_data(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:161 + def handle_define_method(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:202 + def handle_method_name(node, name); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:167 + def handle_new_struct(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:250 + def message(style); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:239 + def range_position(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:217 + def register_forbidden_name(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:106 +RuboCop::Cop::Naming::MethodName::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:107 +RuboCop::Cop::Naming::MethodName::MSG_FORBIDDEN = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:113 +RuboCop::Cop::Naming::MethodName::OPERATOR_METHODS = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/method_name.rb:108 +RuboCop::Cop::Naming::MethodName::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks method parameter names for how descriptive they +# are. It is highly configurable. +# +# The `MinNameLength` config option takes an integer. It represents +# the minimum amount of characters the name must be. Its default is 3. +# The `AllowNamesEndingInNumbers` config option takes a boolean. When +# set to false, this cop will register offenses for names ending with +# numbers. Its default is false. The `AllowedNames` config option +# takes an array of permitted names that will never register an +# offense. The `ForbiddenNames` config option takes an array of +# restricted names that will always register an offense. +# +# @example +# # bad +# def bar(varOne, varTwo) +# varOne + varTwo +# end +# +# # With `AllowNamesEndingInNumbers` set to false +# def foo(num1, num2) +# num1 * num2 +# end +# +# # With `MinNameLength` set to number greater than 1 +# def baz(a, b, c) +# do_stuff(a, b, c) +# end +# +# # good +# def bar(thud, fred) +# thud + fred +# end +# +# def foo(speed, distance) +# speed * distance +# end +# +# def baz(age_a, height_b, gender_c) +# do_stuff(age_a, height_b, gender_c) +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/method_parameter_name.rb:46 +class RuboCop::Cop::Naming::MethodParameterName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::UncommunicativeName + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_parameter_name.rb:49 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/method_parameter_name.rb:54 + def on_defs(node); end +end + +# Checks that predicate methods end with `?` and non-predicate methods do not. +# +# The names of predicate methods (methods that return a boolean value) should end +# in a question mark. Methods that don't return a boolean shouldn't +# end in a question mark. +# +# The cop assesses a predicate method as one that returns boolean values. Likewise, +# a method that only returns literal values is assessed as non-predicate. Other predicate +# method calls are assumed to return boolean values. The cop does not make an assessment +# if the return type is unknown (non-predicate method calls, variables, etc.). +# +# NOTE: The `initialize` method and operator methods (`def ==`, etc.) are ignored. +# +# By default, the cop runs in `conservative` mode, which allows a method to be named +# with a question mark as long as at least one return value is boolean. In `aggressive` +# mode, methods with a question mark will register an offense if any known non-boolean +# return values are detected. +# +# The cop also has `AllowedMethods` configuration in order to prevent the cop from +# registering an offense from a method name that does not conform to the naming +# guidelines. By default, `call` is allowed. The cop also has `AllowedPatterns` +# configuration to allow method names by regular expression. +# +# Although returning a call to another predicate method is treated as a boolean value, +# certain method names can be known to not return a boolean, despite ending in a `?` +# (for example, `Numeric#nonzero?` returns `self` or `nil`). These methods can be +# configured using `NonBooleanPredicates`. +# +# The cop can furthermore be configured to allow all bang methods (method names +# ending with `!`), with `AllowBangMethods: true` (default false). +# +# @example Mode: conservative (default) +# # bad +# def foo +# bar == baz +# end +# +# # good +# def foo? +# bar == baz +# end +# +# # bad +# def foo? +# 5 +# end +# +# # good +# def foo +# 5 +# end +# +# # bad +# def foo +# x == y +# end +# +# # good +# def foo? +# x == y +# end +# +# # bad +# def foo +# !x +# end +# +# # good +# def foo? +# !x +# end +# +# # bad - returns the value of another predicate method +# def foo +# bar? +# end +# +# # good +# def foo? +# bar? +# end +# +# # good - operator method +# def ==(other) +# hash == other.hash +# end +# +# # good - at least one return value is boolean +# def foo? +# return unless bar? +# true +# end +# +# # ok - return type is not known +# def foo? +# bar +# end +# +# # ok - return type is not known +# def foo +# bar? +# end +# +# @example Mode: aggressive +# # bad - the method returns nil in some cases +# def foo? +# return unless bar? +# true +# end +# +# @example AllowedMethods: [call] (default) +# # good +# def call +# foo == bar +# end +# +# @example AllowedPatterns: [\Afoo] +# # good +# def foo? +# 'foo' +# end +# +# @example AllowBangMethods: false (default) +# # bad +# def save! +# true +# end +# +# @example AllowBangMethods: true +# # good +# def save! +# true +# end +# +# @example WaywardPredicates: ['infinite?', 'nonzero?'] (default) +# # good +# def non_predicate_method(num) +# num.infinite? +# end +# +# # good +# def non_predicate_method(num) +# num.nonzero? +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:151 +class RuboCop::Cop::Naming::PredicateMethod < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:158 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:170 + def on_defs(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:183 + def acceptable?(return_values); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:212 + def all_return_values_boolean?(return_values); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:313 + def allow_bang_methods?; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:174 + def allowed?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:307 + def allowed_bang_method?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:277 + def and_or?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:219 + def boolean_return?(value); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:303 + def conservative?; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:281 + def extract_and_or_clauses(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:288 + def extract_conditional_branches(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:246 + def extract_return_value(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:259 + def last_value(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:225 + def method_returning_boolean?(value); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:232 + def potential_non_predicate?(return_values); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:265 + def process_return_values(return_values); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:199 + def return_values(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:193 + def unknown_method_call?(value); end + + # If a method ending in `?` is known to not return a boolean value, + # (for example, `Numeric#nonzero?`) it should be treated as a non-boolean + # value, despite the method naming. + # + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:320 + def wayward_predicate?(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:324 + def wayward_predicates; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:156 +RuboCop::Cop::Naming::PredicateMethod::MSG_NON_PREDICATE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_method.rb:155 +RuboCop::Cop::Naming::PredicateMethod::MSG_PREDICATE = T.let(T.unsafe(nil), String) + +# Checks that predicate method names end with a question mark and +# do not start with a forbidden prefix. +# +# A method is determined to be a predicate method if its name starts with +# one of the prefixes listed in the `NamePrefix` configuration. The list +# defaults to `is_`, `has_`, and `have_` but may be overridden. +# +# Predicate methods must end with a question mark. +# +# When `ForbiddenPrefixes` is also set (as it is by default), predicate +# methods which begin with a forbidden prefix are not allowed, even if +# they end with a `?`. These methods should be changed to remove the +# prefix. +# +# When `UseSorbetSigs` is set to true (optional), the cop will only report +# offenses if the method has a Sorbet `sig` with a return type of +# `T::Boolean`. Dynamic methods are not supported with this configuration. +# +# When `AllCops/UseProjectIndex` is enabled and the `rubydex` gem is +# installed, methods that override a method defined by an ancestor +# elsewhere in the project are not reported, since renaming an override +# breaks the inherited contract. +# +# @example NamePrefix: ['is_', 'has_', 'have_'] (default) +# # bad +# def is_even(value) +# end +# +# # When ForbiddenPrefixes: ['is_', 'has_', 'have_'] (default) +# # good +# def even?(value) +# end +# +# # When ForbiddenPrefixes: [] +# # good +# def is_even?(value) +# end +# +# @example NamePrefix: ['seems_to_be_'] +# # bad +# def seems_to_be_even(value) +# end +# +# # When ForbiddenPrefixes: ['seems_to_be_'] +# # good +# def even?(value) +# end +# +# # When ForbiddenPrefixes: [] +# # good +# def seems_to_be_even?(value) +# end +# +# @example AllowedMethods: ['is_a?'] (default) +# # Despite starting with the `is_` prefix, this method is allowed +# # good +# def is_a?(value) +# end +# +# @example AllowedMethods: ['is_even?'] +# # good +# def is_even?(value) +# end +# +# @example UseSorbetSigs: false (default) +# # bad +# sig { returns(String) } +# def is_this_thing_on +# "yes" +# end +# +# # good - Sorbet signature is not evaluated +# sig { returns(String) } +# def is_this_thing_on? +# "yes" +# end +# +# @example UseSorbetSigs: true +# # bad +# sig { returns(T::Boolean) } +# def odd(value) +# end +# +# # good +# sig { returns(T::Boolean) } +# def odd?(value) +# end +# +# @example MethodDefinitionMacros: ['define_method', 'define_singleton_method'] (default) +# # bad +# define_method(:is_even) { |value| } +# +# # good +# define_method(:even?) { |value| } +# +# @example MethodDefinitionMacros: ['def_node_matcher'] +# # bad +# def_node_matcher(:is_even) { |value| } +# +# # good +# def_node_matcher(:even?) { |value| } +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_prefix.rb:108 +class RuboCop::Cop::Naming::PredicatePrefix < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ProjectIndexHelp + include ::RuboCop::Cop::AllowedMethods + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_prefix.rb:113 + def dynamic_method_define(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_prefix.rb:132 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_prefix.rb:145 + def on_defs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_prefix.rb:119 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_prefix.rb:167 + def sorbet_return_type(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_prefix.rb:147 + def validate_config; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_prefix.rb:177 + def allowed_method_name?(method_name, prefix); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_prefix.rb:185 + def expected_name(method_name, prefix); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_prefix.rb:199 + def forbidden_prefixes; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_prefix.rb:195 + def message(method_name, new_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_prefix.rb:211 + def method_definition_macro?(macro_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_prefix.rb:159 + def offending_prefixes_for(node, method_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_prefix.rb:203 + def predicate_prefixes; end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_prefix.rb:171 + def sorbet_sig?(node, return_type: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/predicate_prefix.rb:207 + def use_sorbet_sigs?; end +end + +# Makes sure that rescued exception variables are named as +# expected. +# +# The `PreferredName` config option takes a `String`. It represents +# the required name of the variable. Its default is `e`. +# +# NOTE: This cop does not consider nested rescues because it cannot +# guarantee that the variable from the outer rescue is not used within +# the inner rescue (in which case, changing the inner variable would +# shadow the outer variable). +# +# @example PreferredName: e (default) +# # bad +# begin +# # do something +# rescue MyException => exception +# # do something +# end +# +# # good +# begin +# # do something +# rescue MyException => e +# # do something +# end +# +# # good +# begin +# # do something +# rescue MyException => _e +# # do something +# end +# +# @example PreferredName: exception +# # bad +# begin +# # do something +# rescue MyException => e +# # do something +# end +# +# # good +# begin +# # do something +# rescue MyException => exception +# # do something +# end +# +# # good +# begin +# # do something +# rescue MyException => _exception +# # do something +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb:61 +class RuboCop::Cop::Naming::RescuedExceptionsVariableName < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb:66 + def on_resbody(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb:96 + def autocorrect(corrector, node, range, offending_name, preferred_name); end + + # Returns the reassignment node once the exception variable is reassigned (a truthy + # signal to stop correcting later references), or `nil` when no reassignment is found. + # + # pkg:gem/rubocop#lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb:122 + 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. + # + # pkg:gem/rubocop#lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb:148 + def correct_reassignment(corrector, node, offending_name, preferred_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb:165 + def message(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb:91 + def offense_range(resbody); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb:152 + def preferred_name(variable_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb:171 + def shadowed_variable_name?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb:161 + def variable_name(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb:109 + def variable_name_matches?(node, name); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb:64 +RuboCop::Cop::Naming::RescuedExceptionsVariableName::MSG = T.let(T.unsafe(nil), String) + +# Checks that the configured style (snake_case or camelCase) is used for all variable names. +# This includes local variables, instance variables, class variables, method arguments +# (positional, keyword, rest or block), and block arguments. +# +# The cop can also be configured to forbid using specific names for variables, using +# `ForbiddenIdentifiers` or `ForbiddenPatterns`. In addition to the above, this applies +# to global variables as well. +# +# Method definitions and method calls are not affected by this cop. +# +# @example EnforcedStyle: snake_case (default) +# # bad +# fooBar = 1 +# +# # good +# foo_bar = 1 +# +# @example EnforcedStyle: camelCase +# # bad +# foo_bar = 1 +# +# # good +# fooBar = 1 +# +# @example AllowedIdentifiers: ['fooBar'] +# # good (with EnforcedStyle: snake_case) +# fooBar = 1 +# +# @example AllowedPatterns: ['_v\d+\z'] +# # good (with EnforcedStyle: camelCase) +# release_v1 = true +# +# @example ForbiddenIdentifiers: ['fooBar'] +# # bad (in all cases) +# fooBar = 1 +# @fooBar = 1 +# @@fooBar = 1 +# $fooBar = 1 +# +# @example ForbiddenPatterns: ['_v\d+\z'] +# # bad (in all cases) +# release_v1 = true +# @release_v1 = true +# @@release_v1 = true +# $release_v1 = true +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:52 +class RuboCop::Cop::Naming::VariableName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedIdentifiers + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::ConfigurableFormatting + include ::RuboCop::Cop::ConfigurableNaming + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::ForbiddenIdentifiers + include ::RuboCop::Cop::ForbiddenPattern + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:78 + def on_arg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:84 + def on_blockarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:77 + def on_cvasgn(node); end + + # Only forbidden names are checked for global variable assignment + # + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:88 + def on_gvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:76 + def on_ivasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:82 + def on_kwarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:81 + def on_kwoptarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:83 + def on_kwrestarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:85 + def on_lvar(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:66 + def on_lvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:79 + def on_optarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:80 + def on_restarg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:62 + def valid_name?(node, name, given_style = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:97 + def forbidden_name?(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:101 + def message(style); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:105 + def register_forbidden_name(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:59 +RuboCop::Cop::Naming::VariableName::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/naming/variable_name.rb:60 +RuboCop::Cop::Naming::VariableName::MSG_FORBIDDEN = T.let(T.unsafe(nil), String) + +# Makes sure that all numbered variables use the +# configured style, snake_case, normalcase, or non_integer, +# for their numbering. +# +# Additionally, `CheckMethodNames` and `CheckSymbols` configuration options +# can be used to specify whether method names and symbols should be checked. +# Both are enabled by default. +# +# @example EnforcedStyle: normalcase (default) +# # bad +# :some_sym_1 +# variable_1 = 1 +# +# def some_method_1; end +# +# def some_method1(arg_1); end +# +# # good +# :some_sym1 +# variable1 = 1 +# +# def some_method1; end +# +# def some_method1(arg1); end +# +# @example EnforcedStyle: snake_case +# # bad +# :some_sym1 +# variable1 = 1 +# +# def some_method1; end +# +# def some_method_1(arg1); end +# +# # good +# :some_sym_1 +# variable_1 = 1 +# +# def some_method_1; end +# +# def some_method_1(arg_1); end +# +# @example EnforcedStyle: non_integer +# # bad +# :some_sym1 +# :some_sym_1 +# +# variable1 = 1 +# variable_1 = 1 +# +# def some_method1; end +# +# def some_method_1; end +# +# def some_methodone(arg1); end +# def some_methodone(arg_1); end +# +# # good +# :some_symone +# :some_sym_one +# +# variableone = 1 +# variable_one = 1 +# +# def some_methodone; end +# +# def some_method_one; end +# +# def some_methodone(argone); end +# def some_methodone(arg_one); end +# +# # In the following examples, we assume `EnforcedStyle: normalcase` (default). +# +# @example CheckMethodNames: true (default) +# # bad +# def some_method_1; end +# +# @example CheckMethodNames: false +# # good +# def some_method_1; end +# +# @example CheckSymbols: true (default) +# # bad +# :some_sym_1 +# +# @example CheckSymbols: false +# # good +# :some_sym_1 +# +# @example AllowedIdentifiers: [capture3] +# # good +# expect(Open3).to receive(:capture3) +# +# @example AllowedPatterns: ['_v\d+\z'] +# # good +# :some_sym_v1 +# +# pkg:gem/rubocop#lib/rubocop/cop/naming/variable_number.rb:103 +class RuboCop::Cop::Naming::VariableNumber < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedIdentifiers + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::ConfigurableFormatting + include ::RuboCop::Cop::ConfigurableNumbering + include ::RuboCop::Cop::AllowedPattern + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_number.rb:114 + def on_arg(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_number.rb:122 + def on_cvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_number.rb:125 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_number.rb:131 + def on_defs(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_number.rb:123 + def on_gvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_number.rb:121 + def on_ivasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_number.rb:120 + def on_lvasgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_number.rb:133 + def on_sym(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_number.rb:110 + def valid_name?(node, name, given_style = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/naming/variable_number.rb:144 + def message(style); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/naming/variable_number.rb:108 +RuboCop::Cop::Naming::VariableNumber::MSG = T.let(T.unsafe(nil), String) + +# Some common code shared between `NegatedIf` and +# `NegatedWhile` cops. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/negative_conditional.rb:7 +module RuboCop::Cop::NegativeConditional + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/negative_conditional.rb:18 + def empty_condition?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/negative_conditional.rb:15 + def single_negative?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/negative_conditional.rb:20 + def check_negative_conditional(node, message:, &block); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/negative_conditional.rb:10 +RuboCop::Cop::NegativeConditional::MSG = T.let(T.unsafe(nil), String) + +# This module provides a list of methods that are: +# 1. In the NilClass by default +# 2. Added to NilClass by explicitly requiring any standard libraries +# 3. Cop's configuration parameter AllowedMethods. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/nil_methods.rb:9 +module RuboCop::Cop::NilMethods + include ::RuboCop::Cop::AllowedMethods + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/nil_methods.rb:14 + def nil_methods; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/nil_methods.rb:18 + def other_stdlib_methods; end +end + +# An offense represents a style violation detected by RuboCop. +# +# pkg:gem/rubocop#lib/rubocop/cop/offense.rb:6 +class RuboCop::Cop::Offense + include ::Comparable + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:136 + def initialize(severity, location, message, cop_name, status = T.unsafe(nil), corrector = T.unsafe(nil), justification: T.unsafe(nil), corrections: T.unsafe(nil), correction_safe: T.unsafe(nil)); end + + # @api public + # + # Returns `-1`, `0`, or `+1` + # if this offense is less than, equal to, or greater than `other`. + # + # @return [Integer] + # comparison result + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:315 + def <=>(other); end + + # @api public + # + # @return [Boolean] + # returns `true` if two offenses contain same attributes + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:296 + def ==(other); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:237 + def column; end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:245 + def column_length; end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:269 + def column_range; end + + # @api public + # + # @!attribute [r] cop_name + # + # @return [String] + # the cop name as a String for which this offense is for. + # + # @example + # 'Layout/LineLength' + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:50 + def cop_name; end + + # @api public + # + # @!attribute [r] correctable? + # + # @return [Boolean] + # whether this offense can be automatically corrected via autocorrect. + # This includes todo comments, for example when requested with `--disable-uncorrectable`. + # An offense suppressed by a directive comment is not correctable - + # autocorrect will not touch it. + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:180 + def correctable?; end + + # @api public + # + # @!attribute [r] corrected? + # + # @return [Boolean] + # whether this offense is automatically corrected via + # autocorrect or a todo. + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:191 + def corrected?; end + + # @api public + # + # @!attribute [r] corrected_with_todo? + # + # @return [Boolean] + # whether this offense is automatically disabled via a todo. + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:201 + def corrected_with_todo?; end + + # @api public + # + # @!attribute [r] correction_safe + # + # @return [Boolean] + # whether autocorrection would apply {#corrections} in a normal `-a` + # run. A cop marked `Safe: false` or `SafeAutoCorrect: false` still + # builds its correction, but only `-A` applies it, so a consumer that + # applies edits itself has to make the same distinction. + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:122 + def correction_safe; end + + # @api public + # + # @!attribute [r] corrections + # + # @return [Array] + # the individual edits that autocorrecting this offense would make, in + # source order. Empty when the offense has no correction. Unlike + # {#corrector}, this survives serialization, so it is available on a + # cache hit and in parallel runs. + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:111 + def corrections; end + + # @api public + # + # @!attribute [r] corrector + # + # @return [Corrector | nil] + # the autocorrection for this offense, or `nil` when not available + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:61 + def corrector; end + + # @api public + # + # @!attribute [r] disabled? + # + # @return [Boolean] + # whether this offense was locally disabled with a + # disable or todo where it occurred. + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:212 + def disabled?; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:302 + def eql?(other); end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:254 + def first_line; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:304 + def hash; end + + # @api public + # + # @return [Parser::Source::Range] + # the range of the code that is highlighted + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:220 + def highlighted_area; end + + # @api public + # + # @!attribute [r] justification + # + # @return [String, nil] + # the reason given on the directive that suppressed this offense + # (the text after `--`), or `nil` when the offense is not suppressed + # or the directive carries no reason + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:100 + def justification; end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:264 + def last_column; end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:259 + def last_line; end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:234 + def line; end + + # @api public + # + # @!attribute [r] location + # + # @return [Parser::Source::Range] + # the location where the violation is detected. + # + # @see https://www.rubydoc.info/gems/parser/Parser/Source/Range + # Parser::Source::Range + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:28 + def location; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:157 + def marshal_dump; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:162 + def marshal_load(array); end + + # @api public + # + # @!attribute [r] message + # + # @return [String] + # human-readable message + # + # @example + # 'Line is too long. [90/80]' + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:39 + def message; end + + # @api private + # + # Internally we use column number that start at 0, but when + # outputting column numbers, we want them to start at 1. One + # reason is that editors, such as Emacs, expect this. + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:278 + def real_column; end + + # @api private + # + # The minimum value of `real_column` is 1, so the minimum value of + # `real_last_column` is also 1. A non-zero `last_column` is used as is, + # because the 0-based end-exclusive column is the same as the 1-based + # column of the last character. + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:288 + def real_last_column; end + + # @api public + # + # @!attribute [r] severity + # + # @return [RuboCop::Cop::Severity] + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:17 + def severity; end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:240 + def source_line; end + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:53 + def status; end + + # @api private + # This is just for debugging purpose. + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:227 + def to_s; end + + private + + # Extracted eagerly rather than on demand because the offense is frozen, + # and because a corrector cannot be serialized - the cache and parallel + # workers would otherwise hand back offenses that have lost their edits. + # + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:328 + def corrections_from(corrector); end +end + +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cop/offense.rb:10 +RuboCop::Cop::Offense::COMPARISON_ATTRIBUTES = T.let(T.unsafe(nil), Array) + +# A single edit of an autocorrection: the source range it replaces and +# the text it replaces it with. An insertion has an empty range, a +# removal an empty replacement. +# +# @api public +# +# pkg:gem/rubocop#lib/rubocop/cop/offense.rb:129 +class RuboCop::Cop::Offense::Correction < ::Struct + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:129 + def begin_pos; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:129 + def begin_pos=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:129 + def end_pos; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:129 + def end_pos=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:130 + def length; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:129 + def replacement; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:129 + def replacement=(_); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:129 + def [](*_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:129 + def inspect; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:129 + def keyword_init?; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:129 + def members; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:129 + def new(*_arg0); end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/offense.rb:89 +RuboCop::Cop::Offense::EMPTY_CORRECTIONS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/offense.rb:87 +RuboCop::Cop::Offense::NO_LOCATION = T.let(T.unsafe(nil), RuboCop::Cop::Offense::PseudoSourceRange) + +# pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 +class RuboCop::Cop::Offense::PseudoSourceRange < ::Struct + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:71 + def initialize(line, column, source_line, begin_pos, end_pos); end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 + def begin_pos; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 + def begin_pos=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 + def column; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 + def column=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:76 + def column_range; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 + def end_pos; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 + def end_pos=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:65 + def first_line; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:67 + def last_column; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:66 + def last_line; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:83 + def length; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 + def line; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 + def line=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:80 + def size; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:69 + def source_buffer; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 + def source_line; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 + def source_line=(_); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 + def [](*_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 + def inspect; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 + def keyword_init?; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 + def members; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:63 + def new(*_arg0); end + end +end + +# Common functionality for cops checking if and unless expressions. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/on_normal_if_unless.rb:6 +module RuboCop::Cop::OnNormalIfUnless + # pkg:gem/rubocop#lib/rubocop/cop/mixin/on_normal_if_unless.rb:7 + def on_if(node); end +end + +# This autocorrects gem dependency order +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/ordered_gem_corrector.rb:6 +class RuboCop::Cop::OrderedGemCorrector + extend ::RuboCop::Cop::OrderedGemNode + extend ::RuboCop::Cop::RangeHelp + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/correctors/ordered_gem_corrector.rb:11 + def comments_as_separators; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/ordered_gem_corrector.rb:13 + def correct(processed_source, node, previous_declaration, comments_as_separators); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/ordered_gem_corrector.rb:11 + def processed_source; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/ordered_gem_corrector.rb:33 + def declaration_with_comment(node); end + end +end + +# Common functionality for Bundler/OrderedGems and +# Gemspec/OrderedDependencies. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/ordered_gem_node.rb:7 +module RuboCop::Cop::OrderedGemNode + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/ordered_gem_node.rb:23 + def case_insensitive_out_of_order?(string_a, string_b); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/ordered_gem_node.rb:27 + def consecutive_lines?(previous, current); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/ordered_gem_node.rb:55 + def find_gem_name(gem_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/ordered_gem_node.rb:18 + def gem_canonical_name(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/ordered_gem_node.rb:49 + def gem_name(declaration_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/ordered_gem_node.rb:10 + def get_source_range(node, comments_as_separators); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/ordered_gem_node.rb:32 + def register_offense(previous, current); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/ordered_gem_node.rb:61 + def treat_comments_as_separators; end +end + +# Common functionality for handling parentheses. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/parentheses.rb:6 +module RuboCop::Cop::Parentheses + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/parentheses.rb:9 + def parens_required?(node); end +end + +# This autocorrects parentheses +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/parentheses_corrector.rb:6 +class RuboCop::Cop::ParenthesesCorrector + extend ::RuboCop::Cop::RangeHelp + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/correctors/parentheses_corrector.rb:12 + def correct(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/parentheses_corrector.rb:24 + def heredoc_strands_code_after_close_paren?(node); end + + private + + # Add a comma back after the heredoc identifier + # + # pkg:gem/rubocop#lib/rubocop/cop/correctors/parentheses_corrector.rb:145 + def add_heredoc_comma(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/parentheses_corrector.rb:89 + def chained_after_close_paren?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/parentheses_corrector.rb:75 + def comment_above_close_paren_swallows_chain?(node, buffer); end + + # If the node contains a heredoc, remove the comma too + # It'll be added back in the right place later + # + # pkg:gem/rubocop#lib/rubocop/cop/correctors/parentheses_corrector.rb:135 + def extend_range_for_heredoc(node, range); end + + # If removing parentheses leaves a comma on its own line, remove all the whitespace + # preceding it to prevent a syntax error. + # + # pkg:gem/rubocop#lib/rubocop/cop/correctors/parentheses_corrector.rb:112 + def handle_orphaned_comma(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/parentheses_corrector.rb:151 + def heredoc?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/parentheses_corrector.rb:53 + def heredoc_above_close_paren_swallows_chain?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/parentheses_corrector.rb:59 + def heredoc_body_before_close_paren?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/parentheses_corrector.rb:99 + def next_char_is_question_mark?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/parentheses_corrector.rb:103 + def only_closing_paren_before_comma?(node); end + + # Get a range for the closing parenthesis and all whitespace to the left of it + # + # pkg:gem/rubocop#lib/rubocop/cop/correctors/parentheses_corrector.rb:122 + def parens_range(node); end + + # When the line above `)` ends with a comment and a chained call follows `)`, + # crossing the newline would pull the chain into the comment. Preserve the newline. + # When a heredoc body comes before `)`, a chained call has to start on the line + # after the terminator instead, since the terminator must stay alone on its line. + # + # pkg:gem/rubocop#lib/rubocop/cop/correctors/parentheses_corrector.rb:38 + def remove_close_paren(corrector, node, buffer); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/parentheses_corrector.rb:95 + def ternary_condition?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/parentheses_corrector.rb:69 + def text_after_close_paren(node); end + end +end + +# Common functionality for checking whether a node is used in a pattern of +# pattern matching, where only some expressions are allowed. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/pattern_matching_help.rb:7 +module RuboCop::Cop::PatternMatchingHelp + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/pattern_matching_help.rb:15 + def in_pattern?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/pattern_matching_help.rb:8 +RuboCop::Cop::PatternMatchingHelp::PATTERN_TYPES = T.let(T.unsafe(nil), Array) + +# Common functionality for handling percent arrays. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_array.rb:6 +module RuboCop::Cop::PercentArray + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_array.rb:26 + def allowed_bracket_array?(node); end + + # @param [RuboCop::AST::ArrayNode] node + # @param [Array] elements + # @return [String] + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_array.rb:83 + def build_bracketed_array_with_appropriate_whitespace(elements:, node:); end + + # @param [String] preferred_array_code + # @return [String] + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_array.rb:56 + def build_message_for_bracketed_array(preferred_array_code); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_array.rb:67 + def check_bracketed_array(node, literal_prefix); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_array.rb:36 + def check_percent_array(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_array.rb:31 + def comments_in_array?(node); end + + # Override to determine values that are invalid in a percent array + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_array.rb:22 + def invalid_percent_array_contents?(_node); end + + # Ruby does not allow percent arrays in an ambiguous block context. + # + # @example + # + # foo %i[bar baz] { qux } + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_array.rb:14 + def invalid_percent_array_context?(node); end + + # Provides whitespace between elements for building a bracketed array. + # %w[ a b c ] + # ^^^ + # @param [RuboCop::AST::ArrayNode] node + # @return [String] + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_array.rb:98 + def whitespace_between(node); end + + # Provides leading whitespace for building a bracketed array. + # %w[ a b c ] + # ^^ + # @param [RuboCop::AST::ArrayNode] node + # @return [String] + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_array.rb:111 + def whitespace_leading(node); end + + # Provides trailing whitespace for building a bracketed array. + # %w[ a b c ] + # ^^^^ + # @param [RuboCop::AST::ArrayNode] node + # @return [String] + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_array.rb:120 + def whitespace_trailing(node); end +end + +# Common functionality for handling percent literals. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_literal.rb:6 +module RuboCop::Cop::PercentLiteral + include ::RuboCop::Cop::RangeHelp + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_literal.rb:23 + def begin_source(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_literal.rb:11 + def percent_literal?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_literal.rb:17 + def process(node, *types); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/percent_literal.rb:27 + def type(node); end +end + +# This autocorrects percent literals +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:6 +class RuboCop::Cop::PercentLiteralCorrector + include ::RuboCop::PathUtil + include ::RuboCop::Cop::Util + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:11 + def initialize(config, preferred_delimiters); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:9 + def config; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:16 + def correct(corrector, node, char); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:9 + def preferred_delimiters; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:46 + def autocorrect_multiline_words(node, escape, delimiters); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:52 + def autocorrect_words(node, escape, delimiters); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:34 + def delimiters_for(type); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:110 + def end_content(source); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:30 + def escape_words?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:78 + def first_line?(node, previous_line_num); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:89 + def fix_escaped_content(word_node, escape, delimiters); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:69 + def line_breaks(node, source, previous_line_num, base_line_num, node_index); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:38 + def new_contents(node, escape, delimiters); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:82 + def process_lines(node, previous_line_num, base_line_num, source_in_lines); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:58 + def process_multiline_words(node, escape, delimiters); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:96 + def substitute_escaped_delimiters(content, delimiters); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/percent_literal_corrector.rb:26 + def wrap_contents(corrector, node, contents, char, delimiters); end +end + +# Common functionality for checking whether an AST node/token is aligned +# with something on a preceding or following line +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:8 +module RuboCop::Cop::PrecedingFollowingAlignment + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:87 + def aligned_comment_lines; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:110 + def aligned_equals_operator?(range, lineno); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:141 + def aligned_identical?(range, line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:98 + def aligned_operator?(range, line, lineno); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:94 + def aligned_token?(range, line, lineno); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:43 + def aligned_with_adjacent_line?(range, predicate); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:61 + def aligned_with_any_line?(line_ranges, range, indent = T.unsafe(nil), &predicate); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:51 + def aligned_with_any_line_range?(line_ranges, range, &predicate); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:133 + def aligned_with_append_operator?(range, token); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:145 + def aligned_with_equals_sign(token, line_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:65 + def aligned_with_line?(line_nos, range, indent = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:23 + def aligned_with_operator?(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:127 + def aligned_with_preceding_equals?(range, token); end + + # Allows alignment with a preceding operator that ends with an `=`, + # including assignment and comparison operators. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:29 + def aligned_with_preceding_equals_operator(token); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:19 + def aligned_with_something?(range); end + + # Allows alignment with a subsequent operator that ends with an `=`, + # including assignment and comparison operators. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:37 + def aligned_with_subsequent_equals_operator(token); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:102 + def aligned_words?(range, line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:213 + def alignment_line_ranges(line_number); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:204 + def alignment_lines(line_number); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:15 + def allow_for_alignment?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:160 + def assignment_lines; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:164 + def assignment_tokens; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:226 + def definition_boundary_lines; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:279 + def first_operator_on_line(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:195 + def interrupting_operator_lines; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:189 + def relevant_assignment_lines(line_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:236 + def relevant_lines(line_range, boundary_lines = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:265 + def remove_equals_in_def(asgn_tokens, processed_source); end +end + +# Tokens that end with an `=`, as well as `<<`, that can be aligned together: +# `=`, `==`, `===`, `!=`, `<=`, `>=`, `<<` and operator assignment (`+=`, etc). +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/preceding_following_alignment.rb:11 +RuboCop::Cop::PrecedingFollowingAlignment::ASSIGNMENT_OR_COMPARISON_TOKENS = T.let(T.unsafe(nil), Array) + +# Common functionality for handling percent literal delimiters. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/preferred_delimiters.rb:6 +class RuboCop::Cop::PreferredDelimiters + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preferred_delimiters.rb:11 + def initialize(type, config, preferred_delimiters); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preferred_delimiters.rb:7 + def config; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preferred_delimiters.rb:17 + def delimiters; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preferred_delimiters.rb:7 + def type; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preferred_delimiters.rb:23 + def ensure_valid_preferred_delimiters; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preferred_delimiters.rb:30 + def preferred_delimiters; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/preferred_delimiters.rb:45 + def preferred_delimiters_config; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/preferred_delimiters.rb:9 +RuboCop::Cop::PreferredDelimiters::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Array) + +# Common helpers for cops that consult the project-wide static-analysis index +# via `Cop::Base#project_index`. +# +# Mixed-in cops gain the `external_dependency_checksum` override that invalidates +# the `ResultCache` whenever the indexed project files change on disk. +# To run index-backed analysis, cops should simply check whether `project_index` is non-nil; +# the runner only exposes a non-nil index when the user opted in via `AllCops/UseProjectIndex` +# and the underlying gem is available. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/project_index_help.rb:13 +module RuboCop::Cop::ProjectIndexHelp + # pkg:gem/rubocop#lib/rubocop/cop/mixin/project_index_help.rb:28 + def external_dependency_checksum; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/project_index_help.rb:185 + def compute_project_index_signature; end + + # Returns the definitions among `definitions` that live in a file other than the + # one being inspected, ordered by path and line. Definitions without a `file://` + # URI (e.g. Rubydex's built-in declarations) are ignored. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/project_index_help.rb:41 + def definitions_in_other_files(definitions); end + + # Whether every link of the declaration's ancestry is resolved in the + # index: no definition of any ancestor has an unresolved superclass or + # mixin reference. Unresolved links silently vanish from `ancestors`, + # so this is the completeness check that must pass before reasoning + # about what an ancestry does or does not define. `extend` mixins only + # affect the singleton class; pass `ignore_extend: true` when reasoning + # about instance-side ancestry only. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/project_index_help.rb:144 + def fully_resolved_index_ancestry?(declaration, ignore_extend: T.unsafe(nil)); end + + # A namespace without any singleton method has no singleton-class + # declaration of its own, so the lookup starts from the first ancestor + # that has one; its `find_member` covers the rest of the chain. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/project_index_help.rb:105 + def indexed_singleton_member(namespace, member_name); end + + # The declaration of `declaration`'s singleton class, or nil when no + # singleton method is defined on it anywhere in the project. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/project_index_help.rb:98 + def indexed_singleton_of(declaration); end + + # Whether an ancestor of `scope` other than `scope` itself defines + # `member_name`. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/project_index_help.rb:116 + def inherited_index_member?(scope, member_name); end + + # The lexical nesting the node's constants resolve through, outermost + # first. Only scopes whose *body* contains the node count: a class or + # module's identifier and superclass expression are evaluated before its + # scope exists, so ancestors reached through them are excluded. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/project_index_help.rb:82 + def lexical_nesting_of(node); end + + # Whether the `def`/`defs` node overrides a method defined by an ancestor + # of its enclosing class or module elsewhere in the project. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/project_index_help.rb:124 + def overrides_inherited_method?(def_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/project_index_help.rb:53 + def prior_definition_in_other_file(definitions); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/project_index_help.rb:176 + def project_index_signature; end + + # Resolves a constant node the way Ruby does: the first segment through + # the lexical nesting and every following segment inside the previous + # one. (Qualified names cannot be passed to `resolve_constant` as a + # whole, since it only applies the nesting to the full name. Later + # segments use `find_member` — the namespace and its ancestors — since + # `resolve_constant` cannot take an already-resolved namespace as the + # scope, only names as they appear in source.) + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/project_index_help.rb:64 + def resolve_constant_in_index(const_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/project_index_help.rb:159 + def resolved_mixin_references?(definition, ignore_extend: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/project_index_help.rb:153 + def resolved_superclass_reference?(definition); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/project_index_help.rb:169 + def same_file?(path, other); end + + class << self + # The signature is a property of the index, not of the cop, and computing + # it stats every indexed file, so all cops sharing an index share one + # computation. A single-entry cache (instead of a hash keyed by index) + # avoids retaining stale graphs in long-lived processes. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/project_index_help.rb:25 + def cached_index_signature; end + + # The signature is a property of the index, not of the cop, and computing + # it stats every indexed file, so all cops sharing an index share one + # computation. A single-entry cache (instead of a hash keyed by index) + # avoids retaining stale graphs in long-lived processes. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/project_index_help.rb:25 + def cached_index_signature=(_arg0); end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/project_index_help.rb:14 +RuboCop::Cop::ProjectIndexHelp::BUILTIN_DOCUMENT_URI = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/project_index_help.rb:15 +RuboCop::Cop::ProjectIndexHelp::FILE_URI_PREFIX = T.let(T.unsafe(nil), String) + +# Matches the spurious leading slash before a Windows drive letter that +# remains after stripping `file://` from a `file:///C:/...` URI. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/project_index_help.rb:18 +RuboCop::Cop::ProjectIndexHelp::WINDOWS_DRIVE_PREFIX = T.let(T.unsafe(nil), Regexp) + +# This autocorrects punctuation +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/punctuation_corrector.rb:6 +class RuboCop::Cop::PunctuationCorrector + class << self + # pkg:gem/rubocop#lib/rubocop/cop/correctors/punctuation_corrector.rb:12 + def add_space(corrector, token); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/punctuation_corrector.rb:8 + def remove_space(corrector, space_before); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/punctuation_corrector.rb:16 + def swap_comma(corrector, range); end + end +end + +# Methods that calculate and return Parser::Source::Ranges +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:6 +module RuboCop::Cop::RangeHelp + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:151 + def add_range(range1, range2); end + + # A range containing the first to the last argument + # of a method call or method definition. + # def foo(a, b:) + # ^^^^^ + # bar(1, 2, 3, &blk) + # ^^^^^^^^^^^^^ + # baz { |x, y:, z:| } + # ^^^^^^^^^ + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:45 + def arguments_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:93 + def column_offset_between(base_range, range); end + + # A range containing only the contents of a literal with delimiters (e.g. in + # `%i{1 2 3}` this will be the range covering `1 2 3` only). + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:33 + def contents_range(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:111 + def directions(side); end + + # Returns the column attribute of the range, except if the range is on + # the first line and there's a byte order mark at the beginning of that + # line, in which case 1 is subtracted from the column value. This gives + # the column as it appears when viewing the file in an editor. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:103 + def effective_column(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:120 + def final_pos(src, pos, increment, continuations, newlines, whitespace); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:127 + def move_pos(src, pos, step, condition, regexp); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:133 + def move_pos_str(src, pos, step, condition, needle); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:49 + def range_between(start_pos, end_pos); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:84 + def range_by_whole_lines(range, include_final_newline: T.unsafe(nil), buffer: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:144 + def range_with_comments(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:140 + def range_with_comments_and_lines(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:53 + def range_with_surrounding_comma(range, side = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:67 + def range_with_surrounding_space(range_positional = T.unsafe(nil), range: T.unsafe(nil), side: T.unsafe(nil), newlines: T.unsafe(nil), whitespace: T.unsafe(nil), continuations: T.unsafe(nil), buffer: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:12 + def source_range(source_buffer, line_number, column, length = T.unsafe(nil)); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:7 +RuboCop::Cop::RangeHelp::BYTE_ORDER_MARK = T.let(T.unsafe(nil), Integer) + +# The Unicode codepoint +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/range_help.rb:8 +module RuboCop::Cop::RangeHelp::NOT_GIVEN; end + +# Common functionality for handling Rational literals. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/rational_literal.rb:6 +module RuboCop::Cop::RationalLiteral + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/rational_literal.rb:12 + def rational_literal?(param0 = T.unsafe(nil)); end +end + +# Registry that tracks all cops by their badge and department. +# +# pkg:gem/rubocop#lib/rubocop/cop/registry.rb:19 +class RuboCop::Cop::Registry + include ::Enumerable + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:51 + def initialize(cops = T.unsafe(nil), options = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:304 + def ==(other); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:138 + def contains_cop_matching?(names); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:230 + def cops; end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:294 + def cops_for_department(department); end + + # @return [Boolean] Checks if given name is department + # + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:134 + def department?(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:196 + def department_missing?(badge, name); end + + # @return [Array] list of departments for current cops. + # + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:104 + def departments; end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:253 + def disabled(config); end + + # Returns the names of the disabled cops without loading any of them. + # + # @api private + # @return [Array] + # + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:261 + def disabled_names(config); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:90 + def dismiss(cop); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:320 + def each(&block); end + + # Returns the enabled cop classes, loading lazy-loaded cops only when they are enabled. + # + # @return [Array] + # + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:244 + def enabled(config); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:268 + def enabled?(cop, config); end + + # @param cop [Class, String, nil] the cop class or the qualified cop name + # + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:273 + def enabled_pending_cop?(cop_cfg, config, cop = T.unsafe(nil)); end + + # Preview cops are opt-in and stay silent otherwise, so unlike pending cops + # they are never reported as needing a decision. + # + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:285 + def enabled_preview_cop?(cop_cfg, config); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:86 + def enlist(cop); end + + # Returns a new registry containing the cops whose badge satisfies the given block, + # keeping lazy-loaded cops unloaded. + # + # @api private + # @return [Registry] + # + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:124 + def filter_by_badge(options = T.unsafe(nil)); end + + # @param [String] cop_name + # @return [Class, nil] + # + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:326 + def find_by_cop_name(cop_name); end + + # When a cop name is given returns a single-element array with the cop class. + # When a department name is given returns an array with all the cop classes + # for that department. + # + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:337 + def find_cops_by_directive(directive); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:357 + def freeze; end + + # Registers a cop by its badge and constant name without loading the class. + # The constant is resolved (loading the cop's file through `autoload`) only + # when the cop class itself is needed. + # + # @param badge [Badge, String] the badge, or the qualified cop name + # @param constant_name [String] the fully qualified constant name + # + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:75 + def lazy_load(badge, constant_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:236 + def length; end + + # Loads all cops that are registered for lazy loading. Useful when lazily registered cops + # must not outlive the current global registry, e.g. before a temporary global registry is + # discarded in tests. + # + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:347 + def load_all_lazy_cops; end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:289 + def names; end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:298 + def names_for_department(department); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:49 + def options; end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:200 + def print_department_missing_warning(name, path); end + + # Convert a user provided cop name into a properly namespaced name + # + # @example gives back a correctly qualified cop name + # + # registry = RuboCop::Cop::Registry + # registry.qualified_cop_name('Layout/EndOfLine', '') # => 'Layout/EndOfLine' + # + # @example fixes incorrect namespaces + # + # registry = RuboCop::Cop::Registry + # registry.qualified_cop_name('Lint/EndOfLine', '') # => 'Layout/EndOfLine' + # + # @example namespaces bare cop identifiers + # + # registry = RuboCop::Cop::Registry + # registry.qualified_cop_name('EndOfLine', '') # => 'Layout/EndOfLine' + # + # @example passes back unrecognized cop names + # + # registry = RuboCop::Cop::Registry + # registry.qualified_cop_name('NotACop', '') # => 'NotACop' + # + # @param name [String] Cop name extracted from config + # @param path [String, nil] Path of file that `name` was extracted from + # @param warn [Boolean] Print a warning if no department given for `name` + # + # @raise [AmbiguousCopName] + # if a bare identifier with two possible namespaces is provided + # + # @note Emits a warning if the provided name has an incorrect namespace + # + # @return [String] Qualified cop name + # + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:174 + def qualified_cop_name(name, path, warn: T.unsafe(nil), correct_namespace: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:216 + def qualify_badge(badge); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:186 + def resolve_cop_name(badge, name, path, warn); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:316 + def select(&block); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:308 + def sort!; end + + # @return [Hash{String => Array}] + # + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:224 + def to_h; end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:208 + def unqualified_cop_names; end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:49 + def warnings; end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:378 + def warnings?(path); end + + # @return [Registry] Cops for that specific department. + # + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:110 + def with_department(department); end + + # @return [Registry] Cops not for a specific department. + # + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:115 + def without_department(department); end + + protected + + # Adds an already-loaded cop class or a lazy-load constant name under the given badge, + # used to build filtered copies. + # + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:386 + def add_entry(badge, cop_or_name); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:405 + def clear_enrollment_queue; end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:473 + def emit_warning(path, message); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:422 + def enabled_cop_name?(cop_name, config); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:393 + def initialize_copy(reg); end + + # @return [Class, nil] the loaded cop class, or nil if the cop excluded + # itself from the registry while being loaded + # + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:442 + def load_lazy_cop(badge); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:478 + def registered?(badge); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:417 + def registered_badges; end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:463 + def resolve_badge(given_badge, real_badge, source_path, warn: T.unsafe(nil)); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:22 + def all; end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:375 + def global; end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:44 + def qualified_cop?(name); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:26 + def qualified_cop_name(name, origin, warn: T.unsafe(nil), correct_namespace: T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:40 + def reset!; end + + # Changes momentarily the global registry + # Intended for testing purposes + # + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:32 + def with_temporary_global(temp_global = T.unsafe(nil)); end + end +end + +# Verifies that a candidate correction of the inspected source is a +# syntactic no-op: the corrected source must parse successfully and produce +# the same AST as the original. +# +# This turns "is this piece of syntax redundant?" questions into a +# parser-backed check instead of a hand-maintained enumeration of grammar +# rules: instead of modeling which constructs make (for example) a line +# continuation or a pair of parentheses significant, a cop can apply the +# correction and let the parser answer. +# +# Cops implement `#apply_reparse_correction(corrector, item)` and call +# `verified_by_reparse(items)`, which returns the items whose corrections +# are verified. Items sharing a reparse scope (the innermost method +# definition or class/module body, which parse standalone and cannot +# capture outer local variables) are verified together with a single +# reparse, falling back to per-item verification when the batch does not +# hold. Scope groups are keyed by node identity, since structurally +# identical definitions in different places must not share a group. +# +# Two hooks customize the comparison: +# +# * `normalize_reparsed_ast(node)` - loosen strict tree equality where a +# cop's correction is equivalence-preserving beyond parse identity (such +# laws must be justified per cop; the default compares trees as-is). +# * `preprocess_reparsed_source(source)` - rewrite both sides before +# parsing (e.g. to neutralize `__LINE__` when a correction legitimately +# shifts line numbers). +# +# `__FILE__` is handled by parsing with the original path, and fragments +# containing `__LINE__` are verified by reparsing both sides so that +# fragment line offsets cancel out. +# +# Note that comments are invisible to the AST, so corrections that may +# touch comment text must be guarded separately by the caller. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/reparsed_equivalence.rb:39 +module RuboCop::Cop::ReparsedEquivalence + private + + # The corrections' edits are all contained within the scope, so the + # corrected fragment can be cut out of the corrected source by adjusting + # for the edits' length delta. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/reparsed_equivalence.rb:149 + def corrected_scope_fragment(scope, corrected); end + + # Whether the exact correction for `item` produces source that still + # parses, without requiring an equivalent AST. For corrections that + # intentionally change the tree. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/reparsed_equivalence.rb:76 + def correction_parses?(item); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/reparsed_equivalence.rb:131 + def corrections_verify?(scope, items); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/reparsed_equivalence.rb:103 + def item_range(item); end + + # Hook: loosen strict tree equality for corrections that are + # equivalence-preserving beyond parse identity. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/reparsed_equivalence.rb:87 + def normalize_reparsed_ast(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/reparsed_equivalence.rb:169 + def normalized_original(original_source, original_ast); end + + # Both sides are parsed with the original path so that `__FILE__` + # resolves identically. The original side is reparsed (instead of using + # the already parsed node) when preprocessing altered it or it contains + # `__LINE__`, whose values would otherwise differ from a fragment parsed + # at a different line offset. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/reparsed_equivalence.rb:161 + def parses_equivalently?(original_source, original_ast, corrected_source); end + + # Hook: rewrite both sides before parsing. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/reparsed_equivalence.rb:92 + def preprocess_reparsed_source(source); end + + # The innermost scope that both contains `range` and parses standalone. + # Method definitions and class/module bodies neither capture outer local + # variables nor continue an outer expression; blocks and single + # statements do not qualify, since an outer local would reparse as a + # method call. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/reparsed_equivalence.rb:112 + def reparse_scope(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/reparsed_equivalence.rb:96 + def scope_groups(items); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/reparsed_equivalence.rb:126 + def verification_too_large?(scope); end + + # Returns the items whose corrections are verified. `oversized` controls + # items whose reparse scope exceeds `MAX_VERIFICATION_FRAGMENT_SIZE`: + # `:report` accepts them unverified (for cops whose offense logic stands + # on its own and uses verification as a safety gate), `:verify` reparses + # regardless of size (for cops where verification is the offense logic). + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/reparsed_equivalence.rb:52 + def verified_by_reparse(items, oversized: T.unsafe(nil)); end + + # Verifies a group with a single reparse and bisects it when that fails, + # so a few significant items among many cost a logarithmic number of + # reparses rather than one each. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/reparsed_equivalence.rb:65 + def verified_subset(scope, group); end +end + +# Above this size, verification does not reparse. What happens to such +# items depends on `oversized`; in practice only machine-generated files +# come near the limit. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/reparsed_equivalence.rb:43 +RuboCop::Cop::ReparsedEquivalence::MAX_VERIFICATION_FRAGMENT_SIZE = T.let(T.unsafe(nil), Integer) + +# Ensure a require statement is present for a standard library determined +# by variable library_name +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/require_library.rb:7 +module RuboCop::Cop::RequireLibrary + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/require_library.rb:12 + def ensure_required(corrector, node, library_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/require_library.rb:33 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/require_library.rb:24 + def remove_subsequent_requires(corrector, node, library_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/require_library.rb:51 + def require_any_library?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/require_library.rb:56 + def require_library_name?(param0 = T.unsafe(nil), param1); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/require_library.rb:44 + def on_new_investigation; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/require_library.rb:10 +RuboCop::Cop::RequireLibrary::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# This class ensures a require statement is present for a standard library +# determined by the variable library_name +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/require_library_corrector.rb:7 +class RuboCop::Cop::RequireLibraryCorrector + extend ::RuboCop::Cop::RangeHelp + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/correctors/require_library_corrector.rb:11 + def correct(corrector, node, library_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/require_library_corrector.rb:17 + def require_statement(library_name); end + end +end + +# Common functionality for checking `rescue` nodes. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/rescue_node.rb:6 +module RuboCop::Cop::RescueNode + # pkg:gem/rubocop#lib/rubocop/cop/mixin/rescue_node.rb:7 + def modifier_locations; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/rescue_node.rb:13 + def rescue_modifier?(node); end + + # @deprecated Use ResbodyNode#exceptions instead + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/rescue_node.rb:20 + def rescued_exceptions(resbody); end +end + +# Common functionality for safe assignment. By safe assignment we mean +# putting parentheses around an assignment to indicate "I know I'm using an +# assignment as a condition. It's not a mistake." +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/safe_assignment.rb:8 +module RuboCop::Cop::SafeAssignment + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/safe_assignment.rb:14 + def empty_condition?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/safe_assignment.rb:20 + def safe_assignment?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/safe_assignment.rb:17 + def setter_method?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/safe_assignment.rb:22 + def safe_assignment_allowed?; end +end + +# Cops for the `Security` department. The department's cops are registered for lazy loading +# and their files are loaded on demand. +# +# pkg:gem/rubocop#lib/rubocop/cop/security.rb:7 +module RuboCop::Cop::Security + extend ::RuboCop::Cop::LazyLoader +end + +# Checks for implementations of the `hash` method which combine +# values using custom logic instead of delegating to `Array#hash`. +# +# Manually combining hashes is error prone and hard to follow, especially +# when there are many values. Poor implementations may also introduce +# performance or security concerns if they are prone to collisions. +# Delegating to `Array#hash` is clearer and safer, although it might be slower +# depending on the use case. +# +# @safety +# This cop may be unsafe if the application logic depends on the hash +# value, however this is inadvisable anyway. +# +# @example +# +# # bad +# def hash +# @foo ^ @bar +# end +# +# # good +# def hash +# [@foo, @bar].hash +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:30 +class RuboCop::Cop::Security::CompoundHash < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:59 + def bad_hash_combinator?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:76 + def contained_in_hash_method?(node, &block); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:43 + def dynamic_hash_method_definition?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:38 + def hash_method_definition?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:64 + def monuple_hash?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:103 + def on_csend(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:104 + def on_op_asgn(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:88 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:82 + def outer_bad_hash_combinator?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:69 + def redundant_hash?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:52 + def static_hash_method_definition?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:31 +RuboCop::Cop::Security::CompoundHash::COMBINATOR_IN_HASH_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:32 +RuboCop::Cop::Security::CompoundHash::MONUPLE_HASH_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:34 +RuboCop::Cop::Security::CompoundHash::REDUNDANT_HASH_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/security/compound_hash.rb:35 +RuboCop::Cop::Security::CompoundHash::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of `Kernel#eval` and `Binding#eval` with +# dynamic strings as arguments. Evaluating non-literal strings +# can enable code injection attacks and makes it difficult to +# reason about what code will actually be executed. +# +# Calls to `eval` with literal strings are not flagged by this cop, +# as they do not pose the same injection risk. +# +# @example +# +# # bad +# eval(something) +# binding.eval(something) +# Kernel.eval(something) +# +# # good - use safer alternatives +# obj.public_send(method_name) +# obj.send(method_name, *args) +# +# # good - literal strings are allowed +# eval("1 + 1") +# binding.eval("foo") +# +# pkg:gem/rubocop#lib/rubocop/cop/security/eval.rb:28 +class RuboCop::Cop::Security::Eval < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/security/eval.rb:33 + def eval?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/eval.rb:37 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/security/eval.rb:29 +RuboCop::Cop::Security::Eval::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/security/eval.rb:30 +RuboCop::Cop::Security::Eval::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the first argument to `IO.read`, `IO.binread`, `IO.write`, `IO.binwrite`, +# `IO.foreach`, and `IO.readlines`. +# +# If argument starts with a pipe character (`'|'`) and the receiver is the `IO` class, +# a subprocess is created in the same way as `Kernel#open`, and its output is returned. +# `Kernel#open` may allow unintentional command injection, which is the reason these +# `IO` methods are a security risk. +# Consider using `File.read` to disable the behavior of subprocess invocation. +# +# @safety +# This cop is unsafe because false positive will occur if the variable passed as +# the first argument is a command that is not a file path. +# +# @example +# +# # bad +# IO.read(path) +# IO.read('path') +# +# # good +# File.read(path) +# File.read('path') +# IO.read('| command') # Allow intentional command invocation. +# +# pkg:gem/rubocop#lib/rubocop/cop/security/io_methods.rb:30 +class RuboCop::Cop::Security::IoMethods < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/security/io_methods.rb:36 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/security/io_methods.rb:33 +RuboCop::Cop::Security::IoMethods::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/security/io_methods.rb:34 +RuboCop::Cop::Security::IoMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of JSON class methods which have potential +# security issues. +# +# `JSON.load` and similar methods allow deserialization of arbitrary ruby objects: +# +# [source,ruby] +# ---- +# require 'json/add/string' +# result = JSON.load('{ "json_class": "String", "raw": [72, 101, 108, 108, 111] }') +# pp result # => "Hello" +# ---- +# +# Never use `JSON.load` for untrusted user input. Prefer `JSON.parse` unless you have +# a concrete use-case for `JSON.load`. +# +# NOTE: Starting with `json` gem version 2.8.0, triggering this behavior without explicitly +# passing the `create_additions` keyword argument emits a deprecation warning, with the +# goal of being secure by default in the next major version 3.0.0. +# +# NOTE: Before `json` gem version 2.17.0, `JSON.load` only takes options as its third +# argument. A hash passed as the second argument is taken as the `proc` argument, so +# its `create_additions` option is ignored. Which `json` version runs can't be told +# statically (the lockfile may resolve a newer one than the default gem loaded in +# production), so options passed as the second argument are always reported. Pass +# `nil` as the second argument instead. +# +# @safety +# This cop's autocorrection is unsafe because it's potentially dangerous. +# If using a stream, like `JSON.load(open('file'))`, you will need to call +# `#read` manually, like `JSON.parse(open('file').read)`. +# Other similar issues may apply. +# +# @example +# # bad +# JSON.load('{}') +# JSON.restore('{}') +# +# # bad - ignored by `json` older than 2.17.0 +# JSON.load('{}', create_additions: false) +# +# # good +# JSON.parse('{}') +# JSON.unsafe_load('{}') +# +# # good - explicit use of `create_additions` option +# JSON.load('{}', nil, create_additions: true) +# JSON.load('{}', nil, create_additions: false) +# +# pkg:gem/rubocop#lib/rubocop/cop/security/json_load.rb:54 +class RuboCop::Cop::Security::JSONLoad < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/security/json_load.rb:61 + def insecure_json_load(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/json_load.rb:71 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/security/json_load.rb:57 +RuboCop::Cop::Security::JSONLoad::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/security/json_load.rb:58 +RuboCop::Cop::Security::JSONLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of Marshal class methods which have +# potential security issues leading to remote code execution when +# loading from an untrusted source. +# +# @example +# # bad +# Marshal.load("{}") +# Marshal.restore("{}") +# +# # good +# Marshal.dump("{}") +# +# # okish - deep copy hack +# Marshal.load(Marshal.dump({})) +# +# pkg:gem/rubocop#lib/rubocop/cop/security/marshal_load.rb:21 +class RuboCop::Cop::Security::MarshalLoad < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/security/marshal_load.rb:26 + def marshal_load(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/marshal_load.rb:31 + def on_send(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/security/marshal_load.rb:22 +RuboCop::Cop::Security::MarshalLoad::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/security/marshal_load.rb:23 +RuboCop::Cop::Security::MarshalLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of `Kernel#open` and `URI.open` with dynamic +# data. +# +# `Kernel#open` and `URI.open` enable not only file access but also process +# invocation by prefixing a pipe symbol (e.g., `open("| ls")`). +# So, it may lead to a serious security risk by using variable input to +# the argument of `Kernel#open` and `URI.open`. It would be better to use +# `File.open`, `IO.popen` or `URI.parse#open` explicitly. +# +# NOTE: `open` and `URI.open` with literal strings are not flagged by this +# cop. +# +# @safety +# This cop could register false positives if `open` is redefined +# in a class and then used without a receiver in that class. +# +# @example +# # bad +# open(something) +# open("| #{something}") +# open("| foo") +# URI.open(something) +# +# # good +# File.open(something) +# IO.popen(something) +# URI.parse(something).open +# +# # good (literal strings) +# open("foo.text") +# URI.open("http://example.com") +# URI.parse(url).open +# +# pkg:gem/rubocop#lib/rubocop/cop/security/open.rb:38 +class RuboCop::Cop::Security::Open < ::RuboCop::Cop::Base + # pkg:gem/rubocop#lib/rubocop/cop/security/open.rb:47 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/open.rb:43 + def open?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/security/open.rb:76 + def composite_string?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/open.rb:84 + def concatenated_string?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/open.rb:80 + def interpolated_string?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/open.rb:58 + def safe?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/open.rb:68 + def safe_argument?(argument); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/open.rb:72 + def simple_string?(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/security/open.rb:39 +RuboCop::Cop::Security::Open::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/security/open.rb:40 +RuboCop::Cop::Security::Open::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of YAML class methods which have +# potential security issues leading to remote code execution when +# loading from an untrusted source. +# +# NOTE: Ruby 3.1+ (Psych 4) uses `Psych.load` as `Psych.safe_load` by default. +# +# @safety +# The behavior of the code might change depending on what was +# in the YAML payload, since `YAML.safe_load` is more restrictive. +# +# @example +# # bad +# YAML.load("--- !ruby/object:Foo {}") # Psych 3 is unsafe by default +# +# # good +# YAML.safe_load("--- !ruby/object:Foo {}", [Foo]) # Ruby 2.5 (Psych 3) +# YAML.safe_load("--- !ruby/object:Foo {}", permitted_classes: [Foo]) # Ruby 3.0- (Psych 3) +# YAML.load("--- !ruby/object:Foo {}", permitted_classes: [Foo]) # Ruby 3.1+ (Psych 4) +# YAML.dump(foo) +# +# pkg:gem/rubocop#lib/rubocop/cop/security/yaml_load.rb:26 +class RuboCop::Cop::Security::YAMLLoad < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # pkg:gem/rubocop#lib/rubocop/cop/security/yaml_load.rb:40 + def on_send(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/security/yaml_load.rb:36 + def yaml_load(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/security/yaml_load.rb:30 +RuboCop::Cop::Security::YAMLLoad::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/security/yaml_load.rb:31 +RuboCop::Cop::Security::YAMLLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Severity class is simple value object about severity +# +# pkg:gem/rubocop#lib/rubocop/cop/severity.rb:6 +class RuboCop::Cop::Severity + include ::Comparable + + # @api private + # + # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:42 + def initialize(name_or_code); end + + # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:74 + def <=>(other); end + + # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:62 + def ==(other); end + + # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:54 + def code; end + + # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:70 + def hash; end + + # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:58 + def level; end + + # @api public + # + # @!attribute [r] name + # + # @return [Symbol] + # severity. + # any of `:info`, `:refactor`, `:convention`, `:warning`, `:error` or `:fatal`. + # + # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:22 + def name; end + + # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:50 + def to_s; end + + class << self + # The lowest severity that makes a run fail: `--fail-level` when given, + # otherwise `AllCops: FailLevel`. `autocorrect` is a pseudo level on the + # command line that gates on corrections instead, so it leaves the + # threshold at the configured one. + # + # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:28 + def minimum_to_fail(options, config); end + + # pkg:gem/rubocop#lib/rubocop/cop/severity.rb:36 + def name_from_code(code); end + end +end + +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cop/severity.rb:12 +RuboCop::Cop::Severity::CODE_TABLE = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubocop#lib/rubocop/cop/severity.rb:9 +RuboCop::Cop::Severity::NAMES = T.let(T.unsafe(nil), Array) + +# Common functionality for cops checking for missing space after +# punctuation. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/space_after_punctuation.rb:7 +module RuboCop::Cop::SpaceAfterPunctuation + # pkg:gem/rubocop#lib/rubocop/cop/mixin/space_after_punctuation.rb:10 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/space_after_punctuation.rb:39 + def allowed_type?(token); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/space_after_punctuation.rb:20 + def each_missing_space(tokens); end + + # The normal offset, i.e., the distance from the punctuation + # token where a space should be, is 1. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/space_after_punctuation.rb:50 + def offset; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/space_after_punctuation.rb:43 + def space_forbidden_before_rcurly?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/space_after_punctuation.rb:31 + def space_missing?(token1, token2); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/space_after_punctuation.rb:35 + def space_required_before?(token); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/space_after_punctuation.rb:8 +RuboCop::Cop::SpaceAfterPunctuation::MSG = T.let(T.unsafe(nil), String) + +# Common functionality for cops checking for space before +# punctuation. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/space_before_punctuation.rb:7 +module RuboCop::Cop::SpaceBeforePunctuation + include ::RuboCop::Cop::RangeHelp + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/space_before_punctuation.rb:12 + def on_new_investigation; end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/space_before_punctuation.rb:22 + def each_missing_space(tokens); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/space_before_punctuation.rb:34 + def space_missing?(token1, token2); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/space_before_punctuation.rb:38 + def space_required_after?(token); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/space_before_punctuation.rb:42 + def space_required_after_lcurly?; end +end + +# pkg:gem/rubocop#lib/rubocop/cop/mixin/space_before_punctuation.rb:10 +RuboCop::Cop::SpaceBeforePunctuation::MSG = T.let(T.unsafe(nil), String) + +# This autocorrects whitespace +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/space_corrector.rb:6 +class RuboCop::Cop::SpaceCorrector + extend ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::SurroundingSpace + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/correctors/space_corrector.rb:36 + def add_space(processed_source, corrector, left_token, right_token); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/space_corrector.rb:12 + def empty_corrections(processed_source, corrector, empty_config, left_token, right_token); end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/space_corrector.rb:10 + def processed_source; end + + # pkg:gem/rubocop#lib/rubocop/cop/correctors/space_corrector.rb:24 + def remove_space(processed_source, corrector, left_token, right_token); end + end +end + +# Common functionality for modifier cops. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:6 +module RuboCop::Cop::StatementModifier + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp + include ::RuboCop::Cop::AllowedPattern + + private + + # Whether an existing line is acceptable to `Layout/LineLength`, + # exemptions (the cop disabled at that line, an allowed pattern, an + # allowed cop directive, an allowed URI) included. Only for judging + # lines already in the source as too long - see + # `modifier_fits_on_single_line?` for why the exemptions must not apply + # when deciding whether a modifier line may be created. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:61 + def acceptable_line_length?(line, line_number); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:74 + def allowed_by_uri?(line); end + + # `Layout/LineLength`'s allowed patterns, so a modifier line that the + # user has configured that cop to accept is not flagged for length here. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:87 + def allowed_patterns; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:141 + def code_after(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:165 + def comment_disables_cop?(comment); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:133 + def first_line_comment(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:100 + def if_body_source(if_body); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:48 + def line_in_modifier_form(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:81 + def line_length_enabled_at_line?(line); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:119 + def method_source(if_body); end + + # The rendered modifier form is compared against the bare maximum, not + # `acceptable_line_length?`: `Layout/LineLength`'s exemptions describe + # long lines the user tolerates, not permission to manufacture new ones, + # so collapsing to modifier form must never push a line past the maximum. + # + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:42 + def modifier_fits_on_single_line?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:27 + def non_eligible_body?(body); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:34 + def non_eligible_condition?(condition); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:20 + def non_eligible_node?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:113 + def omitted_value_in_last_hash_arg?(if_body); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:147 + def parenthesize?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:12 + def single_line_as_modifier?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:159 + def ternary_branch_or_endless_method_body?(parent); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:92 + def to_modifier_form(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/statement_modifier.rb:125 + def wrapped_value(if_body); end +end + +# Classes that include this module just implement functions to determine +# what is an offense and how to do autocorrection. They get help with +# adding offenses for the faulty string nodes, and with filtering out +# nodes. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/string_help.rb:9 +module RuboCop::Cop::StringHelp + # pkg:gem/rubocop#lib/rubocop/cop/mixin/string_help.rb:26 + def on_regexp(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/string_help.rb:10 + def on_str(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/string_help.rb:32 + def inside_interpolation?(node); end +end + +# This autocorrects string literals +# +# pkg:gem/rubocop#lib/rubocop/cop/correctors/string_literal_corrector.rb:6 +class RuboCop::Cop::StringLiteralCorrector + extend ::RuboCop::PathUtil + extend ::RuboCop::Cop::Util + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/correctors/string_literal_corrector.rb:10 + def correct(corrector, node, style); end + end +end + +# Common functionality for cops checking single/double quotes. +# +# pkg:gem/rubocop#lib/rubocop/cop/mixin/string_literals_help.rb:6 +module RuboCop::Cop::StringLiteralsHelp + private + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/string_literals_help.rb:24 + def enforce_double_quotes?; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/string_literals_help.rb:20 + def preferred_string_literal; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/string_literals_help.rb:28 + def string_literals_config; end + + # pkg:gem/rubocop#lib/rubocop/cop/mixin/string_literals_help.rb:9 + def wrong_quotes?(src_or_node); end +end + +# Cops for the `Style` department. The department's cops are registered for lazy loading +# and their files are loaded on demand. +# +# pkg:gem/rubocop#lib/rubocop/cop/style.rb:7 +module RuboCop::Cop::Style + extend ::RuboCop::Cop::LazyLoader +end + +# Access modifiers should be declared to apply to a group of methods +# or inline before each method, depending on configuration. +# EnforcedStyle config covers only method definitions. +# Applications of visibility methods to symbols can be controlled +# using AllowModifiersOnSymbols config. +# Also, the visibility of `attr*` methods can be controlled using +# AllowModifiersOnAttrs config. +# +# In Ruby 3.0, `attr*` methods now return an array of defined method names +# as symbols. So we can write the modifier and `attr*` in inline style. +# AllowModifiersOnAttrs config allows `attr*` methods to be written in +# inline style without modifying applications that have been maintained +# for a long time in group style. Furthermore, developers who are not very +# familiar with Ruby may know that the modifier applies to `def`, but they +# may not know that it also applies to `attr*` methods. It would be easier +# to understand if we could write `attr*` methods in inline style. +# +# @safety +# Autocorrection is not safe, because the visibility of dynamically +# defined methods can vary depending on the state determined by +# the group access modifier. +# +# @example EnforcedStyle: group (default) +# # bad +# class Foo +# +# private def bar; end +# private def baz; end +# +# end +# +# # good +# class Foo +# +# private +# +# def bar; end +# def baz; end +# +# end +# +# @example EnforcedStyle: inline +# # bad +# class Foo +# +# private +# +# def bar; end +# def baz; end +# +# end +# +# # good +# class Foo +# +# private def bar; end +# private def baz; end +# +# end +# +# @example AllowModifiersOnSymbols: true (default) +# # good +# class Foo +# +# private :bar, :baz +# private *%i[qux quux] +# private *METHOD_NAMES +# private *private_methods +# +# end +# +# @example AllowModifiersOnSymbols: false +# # bad +# class Foo +# +# private :bar, :baz +# private *%i[qux quux] +# private *METHOD_NAMES +# private *private_methods +# +# end +# +# @example AllowModifiersOnAttrs: true (default) +# # good +# class Foo +# +# public attr_reader :bar +# protected attr_writer :baz +# private attr_accessor :qux +# private attr :quux +# +# def public_method; end +# +# private +# +# def private_method; end +# +# end +# +# @example AllowModifiersOnAttrs: false +# # bad +# class Foo +# +# public attr_reader :bar +# protected attr_writer :baz +# private attr_accessor :qux +# private attr :quux +# +# end +# +# @example AllowModifiersOnAliasMethod: true (default) +# # good +# class Foo +# +# public alias_method :bar, :foo +# protected alias_method :baz, :foo +# private alias_method :qux, :foo +# +# end +# +# @example AllowModifiersOnAliasMethod: false +# # bad +# class Foo +# +# public alias_method :bar, :foo +# protected alias_method :baz, :foo +# private alias_method :qux, :foo +# +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:135 +class RuboCop::Cop::Style::AccessModifierDeclarations < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:167 + def access_modifier_with_alias_method?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:161 + def access_modifier_with_attr?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:154 + def access_modifier_with_symbol?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:172 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:270 + def access_modifier_is_inlined?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:274 + def access_modifier_is_not_inlined?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:241 + def allow_modifiers_on_alias_method?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:237 + def allow_modifiers_on_attrs?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:233 + def allow_modifiers_on_symbols?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:187 + def allowed?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:202 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:211 + def autocorrect_group_style(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:218 + def autocorrect_inline_style(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:255 + def correctable_group_offense?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:375 + def def_source(node, def_nodes); end + + # `private(*names)` with a list computed at runtime names no definition + # the modifier could be grouped with. + # + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:198 + def dynamic_method_list?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:317 + def find_argument_less_modifier_node(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:298 + def find_corresponding_def_nodes(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:366 + def first_comment_or_node_start(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:262 + def group_style?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:266 + def inline_style?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:346 + def insert_inline_modifier(corrector, node, modifier_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:288 + def message(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:245 + def offense?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:229 + def percent_symbol_array?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:356 + def remove_modifier_node_within_begin(corrector, modifier_node, begin_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:350 + def remove_nodes(corrector, *nodes); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:331 + def replace_defs(corrector, node, def_nodes); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:278 + def right_siblings_same_inline_method?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:325 + def select_grouped_def_nodes(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:141 +RuboCop::Cop::Style::AccessModifierDeclarations::GROUP_STYLE_MESSAGE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:146 +RuboCop::Cop::Style::AccessModifierDeclarations::INLINE_STYLE_MESSAGE = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:151 +RuboCop::Cop::Style::AccessModifierDeclarations::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for grouping of accessors in `class` and `module` bodies. +# By default it enforces accessors to be placed in grouped +# declarations, reducing boilerplate. It can also be configured +# to enforce separating them into individual declarations for +# easier diffing and per-attribute documentation. +# +# NOTE: If there is a method call before the accessor method it is always allowed +# as it might be intended like Sorbet. +# +# NOTE: If there is a RBS::Inline annotation comment just after the accessor method +# it is always allowed. +# +# @example EnforcedStyle: grouped (default) +# # bad +# class Foo +# attr_reader :bar +# attr_reader :bax +# attr_reader :baz +# end +# +# # good +# class Foo +# attr_reader :bar, :bax, :baz +# end +# +# # good +# class Foo +# # may be intended comment for bar. +# attr_reader :bar +# +# sig { returns(String) } +# attr_reader :bax +# +# may_be_intended_annotation :baz +# attr_reader :baz +# end +# +# @example EnforcedStyle: separated +# # bad +# class Foo +# attr_reader :bar, :baz +# end +# +# # good +# class Foo +# attr_reader :bar +# attr_reader :baz +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:55 +class RuboCop::Cop::Style::AccessorGrouping < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::VisibilityHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:64 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:72 + def on_module(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:71 + def on_sclass(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:87 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:76 + def check(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:126 + def class_send_elements(class_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:183 + def group_accessors(node, accessors); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:104 + def groupable_accessor?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:146 + def groupable_sibling_accessor?(node, sibling); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:153 + def groupable_sibling_accessors(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:138 + def grouped_style?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:159 + def message(send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:164 + def preferred_accessors(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:99 + def previous_line_comment?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:204 + def range_with_trailing_argument_comment(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:189 + def separate_accessors(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:142 + def separated_style?; end + + # Group after constants + # + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:178 + def skip_for_grouping?(node); end + + # For a single-line declaration the parser associates the trailing + # comment with the first argument, not `last_argument`, so look through + # all arguments for a comment that trails the whole node. + # + # pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:216 + def trailing_argument_comment(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:61 +RuboCop::Cop::Style::AccessorGrouping::GROUPED_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/style/accessor_grouping.rb:62 +RuboCop::Cop::Style::AccessorGrouping::SEPARATED_MSG = T.let(T.unsafe(nil), String) + +# Enforces the use of either `#alias` or `#alias_method` +# depending on configuration. Consistent use of one or the +# other prevents confusion about their different semantics +# (e.g., `alias` is resolved at parse time, while `alias_method` +# is resolved at runtime). +# It also flags uses of `alias :symbol` rather than `alias bareword`. +# +# However, it will always enforce `alias_method` when `alias` is used +# in an instance method definition and in a singleton method definition. +# If used in a block, always enforce `alias_method` +# unless it is an `instance_eval` block. +# +# @example EnforcedStyle: prefer_alias (default) +# # bad +# alias_method :bar, :foo +# alias :bar :foo +# +# # good +# alias bar foo +# +# @example EnforcedStyle: prefer_alias_method +# # bad +# alias :bar :foo +# alias bar foo +# +# # good +# alias_method :bar, :foo +# +# pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:34 +class RuboCop::Cop::Style::Alias < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:56 + def on_alias(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:44 + def on_send(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:98 + def add_offense_for_args(node, &block); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:80 + def alias_keyword_possible?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:92 + def alias_method_possible?(node); end + + # `alias_method` is a method call whose return value can be used + # (e.g., as an argument to `public`/`module_function`, or as an assignment), + # but `alias` is a keyword statement that cannot appear in such positions. + # Detect these positions so the conversion does not produce a syntax error. + # + # pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:88 + def alias_method_value_used?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:70 + def autocorrect(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:137 + def bareword?(sym_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:177 + def bareword_for(sym_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:141 + def bareword_symbol?(sym_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:150 + def correct_alias_method_to_alias(corrector, send_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:157 + def correct_alias_to_alias_method(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:164 + def correct_alias_with_symbol_args(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:169 + def identifier(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:126 + def lexical_scope_type(node); end + + # In this expression, will `self` be the same as the innermost enclosing + # class or module block (:lexical)? Or will it be something else + # (:dynamic)? If we're in an instance_eval block, return that. + # + # pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:109 + def scope_type(node); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:38 +RuboCop::Cop::Style::Alias::MSG_ALIAS = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:39 +RuboCop::Cop::Style::Alias::MSG_ALIAS_METHOD = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:40 +RuboCop::Cop::Style::Alias::MSG_SYMBOL_ARGS = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/style/alias.rb:42 +RuboCop::Cop::Style::Alias::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Looks for endless methods inside operations of lower precedence (`and`, `or`, and +# modifier forms of `if`, `unless`, `while`, `until`) that are ambiguous due to +# lack of parentheses. This may lead to unexpected behavior as the code may appear +# to use these keywords as part of the method but in fact they modify +# the method definition itself. +# +# In these cases, using a normal method definition is more clear. +# +# @example +# +# # bad +# def foo = true if bar +# +# # good - using a non-endless method is more explicit +# def foo +# true +# end if bar +# +# # ok - method body is explicit +# def foo = (true if bar) +# +# # ok - method definition is explicit +# (def foo = true) if bar +# +# pkg:gem/rubocop#lib/rubocop/cop/style/ambiguous_endless_method_definition.rb:29 +class RuboCop::Cop::Style::AmbiguousEndlessMethodDefinition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::EndlessMethodRewriter + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::TargetRubyVersion + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/style/ambiguous_endless_method_definition.rb:40 + def ambiguous_endless_method_body(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/ambiguous_endless_method_definition.rb:48 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/ambiguous_endless_method_definition.rb:60 + def on_defs(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/style/ambiguous_endless_method_definition.rb:70 + def keyword(operation); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/ambiguous_endless_method_definition.rb:64 + def modifier_form?(operation); end +end + +# pkg:gem/rubocop#lib/rubocop/cop/style/ambiguous_endless_method_definition.rb:37 +RuboCop::Cop::Style::AmbiguousEndlessMethodDefinition::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of `and` and `or`, and suggests using `&&` and +# `||` instead. It can be configured to check only in conditions or in +# all contexts. +# +# @safety +# Autocorrection is unsafe because there is a different operator precedence +# between logical operators (`&&` and `||`) and semantic operators (`and` and `or`), +# and that might change the behavior. +# +# @example EnforcedStyle: conditionals (default) +# # bad +# if foo and bar +# end +# +# # good +# foo.save && return +# +# # good +# foo.save and return +# +# # good +# if foo && bar +# end +# +# @example EnforcedStyle: always +# # bad +# foo.save and return +# +# # bad +# if foo and bar +# end +# +# # good +# foo.save && return +# +# # good +# if foo && bar +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:44 +class RuboCop::Cop::Style::AndOr < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:55 + def on_and(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:60 + def on_if(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:58 + def on_or(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:65 + def on_until(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:66 + def on_until_post(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:63 + def on_while(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:64 + def on_while_post(node); end + + private + + # ! is a special case: + # 'x and !obj.method arg' can be autocorrected if we + # recurse down a level and add parens to 'obj.method arg' + # however, 'not x' also parses as (send x :!) + # + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:121 + def correct_not(node, receiver, corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:133 + def correct_other(node, corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:99 + def correct_send(node, corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:112 + def correct_setter(node, corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:148 + def correctable_send?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:140 + def keep_operator_precedence(corrector, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:95 + def message(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:89 + def on_conditionals(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:70 + def process_logical_operator(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:152 + def whitespace_before_arg(node); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:51 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:49 +RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) + +# In Ruby 2.7, arguments forwarding has been added. +# +# This cop identifies places where `do_something(*args, &block)` +# can be replaced by `do_something(...)`. +# +# In Ruby 3.1, anonymous block forwarding has been added. +# +# This cop identifies places where `do_something(&block)` can be replaced +# by `do_something(&)`; if desired, this functionality can be disabled +# by setting `UseAnonymousForwarding: false`. +# +# 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. +# +# This cop handles not only method forwarding but also forwarding to `super`. +# +# [NOTE] +# ==== +# Because of a bug in Ruby 3.3.0, when a block is referenced inside of another block, +# no offense will be registered until Ruby 3.4: +# +# [source,ruby] +# ---- +# def foo(&block) +# # Using an anonymous block would be a syntax error on Ruby 3.3.0 +# block_method { bar(&block) } +# 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 +# +# @example UseAnonymousForwarding: true (default, only relevant for Ruby >= 3.2) +# # bad +# def foo(*args, **kwargs, &block) +# args_only(*args) +# kwargs_only(**kwargs) +# block_only(&block) +# end +# +# # good +# def foo(*, **, &) +# args_only(*) +# kwargs_only(**) +# block_only(&) +# end +# +# @example UseAnonymousForwarding: false (only relevant for Ruby >= 3.2) +# # good +# def foo(*args, **kwargs, &block) +# args_only(*args) +# kwargs_only(**kwargs) +# block_only(&block) +# end +# +# @example AllowOnlyRestArgument: true (default, only relevant for Ruby < 3.2) +# # good +# def foo(*args) +# bar(*args) +# end +# +# def foo(**kwargs) +# bar(**kwargs) +# end +# +# @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. +# def foo(*args) +# bar(*args) +# end +# +# 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 +# +# # good +# def foo(**) +# bar(**) +# end +# +# @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 +# +# pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:141 +class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:159 + def on_def(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:179 + def on_defs(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:201 + def add_forward_all_offenses(node, send_classifications, forwardable_args); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:377 + def add_parens_if_missing(node, corrector); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:229 + def add_post_ruby_32_offenses(def_node, send_classifications, forwardable_args); end + + # Checks if forwarding is uses both in blocks and outside of blocks. + # On Ruby 3.3.0, anonymous block forwarding in blocks can be is a syntax + # error, so we only want to register an offense if we can change all occurrences. + # + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:310 + def all_forwarding_offenses_correctable?(send_classifications); end + + # Ruby 3.3.0 had a bug where accessing an anonymous block argument inside of a block + # was a syntax error in unambiguous cases: https://bugs.ruby-lang.org/issues/20090 + # We disallow this also for earlier Ruby versions so that code is forwards compatible. + # + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:321 + def allow_anonymous_forwarding_in_block?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:369 + def allow_only_rest_arguments?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:365 + def arguments_range(node, first_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:278 + def classification_and_forwards(def_node, send_node, referenced_lvars, forwardable_args); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:263 + def classify_send_nodes(def_node, send_nodes, referenced_lvars, forwardable_args); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:576 + def explicit_block_name?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:183 + def extract_forwardable_args(args); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:224 + def forward_all_first_argument(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:253 + def non_splat_or_block_pass_lvar_references(body); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:195 + def only_forwards_all?(send_classifications); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:187 + def redundant_forwardable_named_args(restarg, kwrestarg, blockarg); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:297 + def redundant_named_arg(arg, config_name, keyword); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:355 + def register_forward_all_offense(def_or_send, send_or_arguments, rest_or_splat); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:328 + def register_forward_args_offense(def_arguments_or_send, rest_arg_or_splat); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:344 + def register_forward_block_arg_offense(add_parens, def_arguments_or_send, block_arg); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:336 + def register_forward_kwargs_offense(add_parens, def_arguments_or_send, kwrest_arg_or_splat); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:373 + def use_anonymous_forwarding?; end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:155 + def autocorrect_incompatible_with; end + end +end + +# pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:151 +RuboCop::Cop::Style::ArgumentsForwarding::ARGS_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:153 +RuboCop::Cop::Style::ArgumentsForwarding::BLOCK_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:148 +RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_LVAR_TYPES = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:150 +RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:152 +RuboCop::Cop::Style::ArgumentsForwarding::KWARGS_MSG = T.let(T.unsafe(nil), String) + +# Classifies send nodes for possible rest/kwrest/all (including block) forwarding. +# +# pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:386 +class RuboCop::Cop::Style::ArgumentsForwarding::SendNodeClassifier + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:415 + def initialize(def_node, send_node, referenced_lvars, forwardable_args, **config); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:461 + def classification; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:399 + def def_all_anonymous_args?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:393 + def extract_forwarded_kwrest_arg(param0 = T.unsafe(nil), param1); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:449 + def forwarded_block_arg; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:396 + def forwarded_block_arg?(param0 = T.unsafe(nil), param1); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:437 + def forwarded_kwrest_arg; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:425 + def forwarded_rest_arg; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:390 + def forwarded_rest_arg?(param0 = T.unsafe(nil), param1); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:408 + def send_all_anonymous_args?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:547 + def additional_kwargs?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:543 + def additional_kwargs_or_forwarded_kwargs?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:557 + def allow_offense_for_no_block?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:528 + def any_arg_referenced?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:512 + def arguments; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:476 + def can_forward_all?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:551 + def forward_additional_kwargs?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:508 + def forwarded_rest_and_kwrest_args; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:570 + def missing_rest_arg_or_kwrest_arg?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:561 + def no_additional_args?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:536 + def no_post_splat_args?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:502 + def offensive_block_forwarding?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:524 + def referenced_block_arg?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:520 + def referenced_kwrest_arg?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:516 + def referenced_rest_arg?; end + + # def foo(a = 41, ...) is a syntax error in 3.0. + # + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:487 + def ruby_30_or_lower_optarg?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:491 + def ruby_32_only_anonymous_forwarding?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:498 + def ruby_32_or_higher_missing_rest_or_kwest?; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:532 + def target_ruby_version; end +end + +# Enforces the use of `Array()` instead of explicit `Array` check or `[*var]`. +# +# The cop is disabled by default due to safety concerns. +# +# @safety +# This cop is unsafe because a false positive may occur if +# the argument of `Array()` is (or could be) nil or depending +# on how the argument is handled by `Array()` (which can be +# different than just wrapping the argument in an array). +# +# For example: +# +# [source,ruby] +# ---- +# [nil] #=> [nil] +# Array(nil) #=> [] +# +# [{a: 'b'}] #= [{a: 'b'}] +# Array({a: 'b'}) #=> [[:a, 'b']] +# +# [Time.now] #=> [#